@takeshape/schema 11.52.0 → 11.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/_examples.test.js +77 -0
- package/dist/__tests__/agents.test.js +163 -0
- package/dist/__tests__/api-version.test.js +24 -0
- package/dist/__tests__/builtin-schema.test.js +18 -0
- package/dist/__tests__/content-schema-transform.test.d.ts +1 -0
- package/dist/__tests__/content-schema-transform.test.js +522 -0
- package/dist/__tests__/create-input-schema.test.d.ts +1 -0
- package/dist/__tests__/create-input-schema.test.js +184 -0
- package/dist/__tests__/enum.test.d.ts +1 -0
- package/dist/__tests__/enum.test.js +36 -0
- package/dist/__tests__/flatten-templates.test.d.ts +1 -0
- package/dist/__tests__/flatten-templates.test.js +40 -0
- package/dist/__tests__/get-is-leaf.test.d.ts +1 -0
- package/dist/__tests__/get-is-leaf.test.js +50 -0
- package/dist/__tests__/interfaces.test.d.ts +1 -0
- package/dist/__tests__/interfaces.test.js +219 -0
- package/dist/__tests__/migration.test.d.ts +1 -0
- package/dist/__tests__/migration.test.js +34 -0
- package/dist/__tests__/mocks.test.d.ts +1 -0
- package/dist/__tests__/mocks.test.js +24 -0
- package/dist/__tests__/refs.test.d.ts +1 -0
- package/dist/__tests__/refs.test.js +752 -0
- package/dist/__tests__/relationships.test.d.ts +1 -0
- package/dist/__tests__/relationships.test.js +638 -0
- package/dist/__tests__/schema-transform.test.d.ts +1 -0
- package/dist/__tests__/schema-transform.test.js +205 -0
- package/dist/__tests__/schema-util.test.d.ts +1 -0
- package/dist/__tests__/schema-util.test.js +1731 -0
- package/dist/__tests__/service-dependencies.test.d.ts +1 -0
- package/dist/__tests__/service-dependencies.test.js +360 -0
- package/dist/__tests__/unions.test.d.ts +1 -0
- package/dist/__tests__/unions.test.js +44 -0
- package/dist/__tests__/validate.test.d.ts +1 -0
- package/dist/__tests__/validate.test.js +1926 -0
- package/dist/__tests__/workflows.test.d.ts +3 -0
- package/dist/__tests__/workflows.test.js +149 -0
- package/dist/agents.d.ts +14 -0
- package/dist/auth-schemas.d.ts +125 -0
- package/dist/builtin-schema.d.ts +8 -0
- package/dist/content-schema-transform.d.ts +35 -0
- package/dist/content-schema-transform.js +162 -0
- package/dist/create-input-schema.d.ts +9 -0
- package/dist/enum.d.ts +2 -0
- package/dist/flatten-templates.d.ts +2 -0
- package/dist/flatten-templates.js +20 -0
- package/dist/get-is-leaf.d.ts +3 -0
- package/dist/get-is-leaf.js +56 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +46 -0
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.js +85 -0
- package/dist/layers/__tests__/layers.test.d.ts +1 -0
- package/dist/layers/__tests__/layers.test.js +38 -0
- package/dist/layers/layers.d.ts +26 -0
- package/dist/layers/layers.js +301 -0
- package/dist/layers/refs.d.ts +102 -0
- package/dist/layers/refs.js +220 -0
- package/dist/layers/type-utils.d.ts +59 -0
- package/dist/layers/type-utils.js +118 -0
- package/dist/layers/visitor.d.ts +5 -0
- package/dist/layers/visitor.js +38 -0
- package/dist/migration/index.d.ts +64 -0
- package/dist/migration/index.js +122 -0
- package/dist/migration/to/__tests__/v3.10.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.10.0.test.js +90 -0
- package/dist/migration/to/__tests__/v3.12.3.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.12.3.test.js +103 -0
- package/dist/migration/to/__tests__/v3.17.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.17.test.js +71 -0
- package/dist/migration/to/__tests__/v3.34.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.34.0.test.js +240 -0
- package/dist/migration/to/__tests__/v3.39.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.39.0.test.js +116 -0
- package/dist/migration/to/__tests__/v3.46.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.46.0.test.js +59 -0
- package/dist/migration/to/v3.0.0.d.ts +4 -0
- package/dist/migration/to/v3.0.0.js +212 -0
- package/dist/migration/to/v3.1.0.d.ts +4 -0
- package/dist/migration/to/v3.1.0.js +194 -0
- package/dist/migration/to/v3.10.0.d.ts +4 -0
- package/dist/migration/to/v3.11.0.d.ts +4 -0
- package/dist/migration/to/v3.12.0.d.ts +4 -0
- package/dist/migration/to/v3.12.1.d.ts +4 -0
- package/dist/migration/to/v3.12.2.d.ts +4 -0
- package/dist/migration/to/v3.12.3.d.ts +4 -0
- package/dist/migration/to/v3.13.0.d.ts +4 -0
- package/dist/migration/to/v3.14.0.d.ts +4 -0
- package/dist/migration/to/v3.15.0.d.ts +4 -0
- package/dist/migration/to/v3.16.0.d.ts +4 -0
- package/dist/migration/to/v3.17.0.d.ts +4 -0
- package/dist/migration/to/v3.17.1.d.ts +4 -0
- package/dist/migration/to/v3.18.0.d.ts +4 -0
- package/dist/migration/to/v3.18.1.d.ts +4 -0
- package/dist/migration/to/v3.18.2.d.ts +4 -0
- package/dist/migration/to/v3.19.0.d.ts +4 -0
- package/dist/migration/to/v3.2.0.d.ts +4 -0
- package/dist/migration/to/v3.20.0.d.ts +4 -0
- package/dist/migration/to/v3.21.0.d.ts +4 -0
- package/dist/migration/to/v3.22.0.d.ts +4 -0
- package/dist/migration/to/v3.23.0.d.ts +4 -0
- package/dist/migration/to/v3.24.0.d.ts +4 -0
- package/dist/migration/to/v3.25.0.d.ts +4 -0
- package/dist/migration/to/v3.26.0.d.ts +4 -0
- package/dist/migration/to/v3.27.0.d.ts +4 -0
- package/dist/migration/to/v3.28.0.d.ts +4 -0
- package/dist/migration/to/v3.29.0.d.ts +4 -0
- package/dist/migration/to/v3.3.0.d.ts +4 -0
- package/dist/migration/to/v3.30.0.d.ts +4 -0
- package/dist/migration/to/v3.31.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.js +59 -0
- package/dist/migration/to/v3.33.0.d.ts +4 -0
- package/dist/migration/to/v3.34.0.d.ts +6 -0
- package/dist/migration/to/v3.34.0.js +116 -0
- package/dist/migration/to/v3.35.0.d.ts +4 -0
- package/dist/migration/to/v3.36.0.d.ts +4 -0
- package/dist/migration/to/v3.37.0.d.ts +4 -0
- package/dist/migration/to/v3.38.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.js +45 -0
- package/dist/migration/to/v3.4.0.d.ts +4 -0
- package/dist/migration/to/v3.40.0.d.ts +4 -0
- package/dist/migration/to/v3.41.0.d.ts +4 -0
- package/dist/migration/to/v3.42.0.d.ts +4 -0
- package/dist/migration/to/v3.43.0.d.ts +4 -0
- package/dist/migration/to/v3.44.0.d.ts +4 -0
- package/dist/migration/to/v3.45.0.d.ts +4 -0
- package/dist/migration/to/v3.46.0.d.ts +4 -0
- package/dist/migration/to/v3.47.0.d.ts +4 -0
- package/dist/migration/to/v3.48.0.d.ts +4 -0
- package/dist/migration/to/v3.49.0.d.ts +4 -0
- package/dist/migration/to/v3.5.0.d.ts +4 -0
- package/dist/migration/to/v3.5.1.d.ts +4 -0
- package/dist/migration/to/v3.50.0.d.ts +4 -0
- package/dist/migration/to/v3.51.0.d.ts +4 -0
- package/dist/migration/to/v3.6.0.d.ts +4 -0
- package/dist/migration/to/v3.7.0.d.ts +4 -0
- package/dist/migration/to/v3.8.0.d.ts +4 -0
- package/dist/migration/to/v3.9.0.d.ts +4 -0
- package/dist/migration/types.d.ts +19 -0
- package/dist/migration/types.js +1 -0
- package/dist/mocks.d.ts +13 -0
- package/dist/mocks.js +58 -0
- package/dist/models/__tests__/project-schema.test.d.ts +1 -0
- package/dist/models/__tests__/project-schema.test.js +67 -0
- package/dist/models/__tests__/query.test.d.ts +1 -0
- package/dist/models/__tests__/query.test.js +27 -0
- package/dist/models/__tests__/service.test.d.ts +1 -0
- package/dist/models/__tests__/service.test.js +17 -0
- package/dist/models/__tests__/shape.test.d.ts +1 -0
- package/dist/models/__tests__/shape.test.js +61 -0
- package/dist/models/project-schema.d.ts +35 -0
- package/dist/models/project-schema.js +92 -0
- package/dist/models/query.d.ts +17 -0
- package/dist/models/service.d.ts +12 -0
- package/dist/models/shape.d.ts +41 -0
- package/dist/models/shape.js +85 -0
- package/dist/patterns.js +1 -0
- package/dist/project-schema/index.d.ts +187 -0
- package/dist/project-schema/index.js +75 -0
- package/dist/project-schema/latest.d.ts +2222 -0
- package/dist/project-schema/migrate.d.ts +4 -0
- package/dist/project-schema/migrate.js +194 -0
- package/dist/project-schema/v3.48.0.d.ts +2161 -0
- package/dist/project-schema/v3.49.0.d.ts +2170 -0
- package/dist/project-schema/v3.50.0.d.ts +2222 -0
- package/dist/project-schema/v3.51.0.d.ts +2222 -0
- package/dist/refs.d.ts +226 -0
- package/dist/refs.js +608 -0
- package/dist/relationships.d.ts +40 -0
- package/dist/relationships.js +311 -0
- package/dist/runtime-schema.d.ts +5 -0
- package/dist/runtime-schema.js +80 -0
- package/dist/schema-transform.d.ts +19 -0
- package/dist/schema-transform.js +74 -0
- package/dist/schema-util.d.ts +210 -0
- package/dist/schema-util.js +1077 -0
- package/dist/schemas/auth-schemas.json +365 -0
- package/dist/schemas/index.js +154 -0
- package/dist/schemas/project-schema/experimental.json +1104 -0
- package/dist/service-dependencies.d.ts +13 -0
- package/dist/service-dependencies.js +165 -0
- package/dist/services/__tests__/services.test.d.ts +1 -0
- package/dist/services/__tests__/services.test.js +113 -0
- package/dist/services/services.d.ts +31 -0
- package/dist/services/services.js +145 -0
- package/dist/services/types.js +1 -0
- package/dist/services/util.d.ts +16 -0
- package/dist/taxonomies.d.ts +15 -0
- package/dist/taxonomies.js +24 -0
- package/dist/template-shapes/__tests__/index.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/index.test.js +40 -0
- package/dist/template-shapes/__tests__/names.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/names.test.js +19 -0
- package/dist/template-shapes/__tests__/templates.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/templates.test.js +80 -0
- package/dist/template-shapes/__tests__/where.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/where.test.js +218 -0
- package/dist/template-shapes/index.d.ts +7 -0
- package/dist/template-shapes/names.d.ts +10 -0
- package/dist/template-shapes/templates.d.ts +32 -0
- package/dist/template-shapes/templates.js +319 -0
- package/dist/template-shapes/types.d.ts +15 -0
- package/dist/template-shapes/where.d.ts +37 -0
- package/dist/template-shapes/where.js +402 -0
- package/dist/types/__tests__/utils.test.d.ts +1 -0
- package/dist/types/__tests__/utils.test.js +159 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/types/transforms.d.ts +13 -0
- package/dist/types/transforms.js +1 -0
- package/dist/types/types.d.ts +211 -0
- package/dist/types/utils.d.ts +117 -0
- package/dist/types/utils.js +279 -0
- package/dist/unions.d.ts +14 -0
- package/dist/unions.js +77 -0
- package/dist/util/__tests__/api-indexing.test.d.ts +1 -0
- package/dist/util/__tests__/api-indexing.test.js +129 -0
- package/dist/util/__tests__/detect-cycles.test.d.ts +1 -0
- package/dist/util/__tests__/detect-cycles.test.js +193 -0
- package/dist/util/__tests__/find-shape-at-path.test.d.ts +1 -0
- package/dist/util/__tests__/find-shape-at-path.test.js +41 -0
- package/dist/util/__tests__/form-config.test.d.ts +1 -0
- package/dist/util/__tests__/form-config.test.js +196 -0
- package/dist/util/__tests__/get-return-shape.test.d.ts +1 -0
- package/dist/util/__tests__/get-return-shape.test.js +27 -0
- package/dist/util/__tests__/has-args.test.d.ts +1 -0
- package/dist/util/__tests__/has-args.test.js +46 -0
- package/dist/util/__tests__/merge.test.d.ts +1 -0
- package/dist/util/__tests__/merge.test.js +1074 -0
- package/dist/util/__tests__/patch-schema.test.d.ts +1 -0
- package/dist/util/__tests__/patch-schema.test.js +82 -0
- package/dist/util/__tests__/shapes.test.d.ts +1 -0
- package/dist/util/__tests__/shapes.test.js +30 -0
- package/dist/util/ai-tools.d.ts +3 -0
- package/dist/util/api-indexing.d.ts +9 -0
- package/dist/util/api-indexing.js +57 -0
- package/dist/util/detect-cycles.d.ts +7 -0
- package/dist/util/detect-cycles.js +45 -0
- package/dist/util/find-shape-at-path.d.ts +21 -0
- package/dist/util/form-config.d.ts +11 -0
- package/dist/util/form-config.js +62 -0
- package/dist/util/get-conflicting-properties.d.ts +6 -0
- package/dist/util/get-conflicting-properties.js +55 -0
- package/dist/util/get-return-shape.d.ts +4 -0
- package/dist/util/get-return-shape.js +30 -0
- package/dist/util/has-arg.d.ts +4 -0
- package/dist/util/has-arg.js +13 -0
- package/dist/util/merge.d.ts +15 -0
- package/dist/util/merge.js +256 -0
- package/dist/util/patch-schema.d.ts +8 -0
- package/dist/util/shapes.d.ts +5 -0
- package/dist/validate/errors.d.ts +3 -0
- package/dist/validate/errors.js +20 -0
- package/dist/validate/validate.d.ts +73 -0
- package/dist/validate/validate.js +1107 -0
- package/dist/versions.d.ts +4 -0
- package/dist/versions.js +4 -0
- package/dist/workflows.d.ts +14 -0
- package/dist/workflows.js +66 -0
- package/examples/latest/agent-schema.json +12 -4
- package/examples/latest/all-fields-shapes-inline.json +52 -18
- package/examples/latest/all-fields-shapes.json +76 -26
- package/examples/latest/betzino.json +3139 -902
- package/examples/latest/blog-schema.json +28 -8
- package/examples/latest/brewery-schema.json +25 -7
- package/examples/latest/clear-cache-schema.json +7 -3
- package/examples/latest/complex-project-schema.json +359 -98
- package/examples/latest/complex-schema.json +1754 -487
- package/examples/latest/edit-schema.json +11 -4
- package/examples/latest/fabric-ecommerce.json +838 -187
- package/examples/latest/frank-and-fred-schema.json +1753 -486
- package/examples/latest/klirr-schema.json +2411 -682
- package/examples/latest/layers/rick-and-morty-layer.json +32 -11
- package/examples/latest/layers/shopify-layer-2023-01.json +8637 -2206
- package/examples/latest/layers/shopify-storefront-2023-04.json +1714 -404
- package/examples/latest/layers/wordpress-2024-01.json +2746 -691
- package/examples/latest/massive-schema.json +584 -131
- package/examples/latest/mill-components-schema.json +125 -29
- package/examples/latest/nested-shape-arrays.json +19 -7
- package/examples/latest/one-earth.json +1113 -236
- package/examples/latest/pet-oneof-array.json +22 -7
- package/examples/latest/post-schema.json +20 -6
- package/examples/latest/pruned-shopify-product-schema.json +830 -185
- package/examples/latest/rag-example.json +15 -5
- package/examples/latest/real-world-schema.json +56 -14
- package/examples/latest/recursive-repeater-schema.json +11 -4
- package/examples/latest/recursive-schema.json +11 -4
- package/examples/latest/rick-and-morty-ast.json +174 -45
- package/examples/latest/rick-and-morty-graphql.json +100 -25
- package/examples/latest/rick-and-morty-rest.json +7 -3
- package/examples/latest/rick-and-morty-with-indexing.json +13 -5
- package/examples/latest/schema-where-filter.json +40 -11
- package/examples/latest/schema-with-repeater-draftjs.json +8 -3
- package/examples/latest/schema-with-rick-and-morty.json +4 -2
- package/examples/latest/shape-books-v3_2_0.json +71 -17
- package/examples/latest/shape-books.json +71 -17
- package/examples/latest/shape-editor-schema-edited.json +69 -23
- package/examples/latest/shape-editor-schema-initial.json +28 -10
- package/examples/latest/shapedb-crud-every-prop-type.json +22 -8
- package/examples/latest/shopify-lookbook.json +19 -5
- package/examples/latest/shopify-product-2022-07.json +3217 -726
- package/examples/latest/shopify-product-2023-04.json +4496 -1012
- package/examples/latest/shopify-store-with-widget.json +942 -213
- package/examples/latest/stripe-product-runtime-schema.json +277 -81
- package/examples/latest/stripe-starter-resolved.json +1953 -476
- package/examples/latest/user-schema-no-required.json +13 -3
- package/examples/latest/user-schema-with-defaults.json +27 -5
- package/examples/latest/valvoline-ai-demo.json +69 -17
- package/examples/latest/vector-search-schema.json +24 -8
- package/package.json +24 -26
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/src/agents.js +0 -147
- package/dist/cjs/src/api-version.js +0 -24
- package/dist/cjs/src/auth-schemas.js +0 -8
- package/dist/cjs/src/builtin-schema.js +0 -616
- package/dist/cjs/src/constants.js +0 -4
- package/dist/cjs/src/content-schema-transform.js +0 -175
- package/dist/cjs/src/create-input-schema.js +0 -66
- package/dist/cjs/src/enum.js +0 -12
- package/dist/cjs/src/flatten-templates.js +0 -26
- package/dist/cjs/src/get-is-leaf.js +0 -59
- package/dist/cjs/src/index.js +0 -62
- package/dist/cjs/src/interfaces.js +0 -98
- package/dist/cjs/src/layers/layers.js +0 -313
- package/dist/cjs/src/layers/refs.js +0 -243
- package/dist/cjs/src/layers/type-utils.js +0 -145
- package/dist/cjs/src/layers/visitor.js +0 -42
- package/dist/cjs/src/migration/index.js +0 -142
- package/dist/cjs/src/migration/to/v3.0.0.js +0 -217
- package/dist/cjs/src/migration/to/v3.1.0.js +0 -199
- package/dist/cjs/src/migration/to/v3.10.0.js +0 -72
- package/dist/cjs/src/migration/to/v3.11.0.js +0 -90
- package/dist/cjs/src/migration/to/v3.12.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.2.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.3.js +0 -92
- package/dist/cjs/src/migration/to/v3.13.0.js +0 -22
- package/dist/cjs/src/migration/to/v3.14.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.15.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.16.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.17.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.17.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.18.0.js +0 -69
- package/dist/cjs/src/migration/to/v3.18.1.js +0 -20
- package/dist/cjs/src/migration/to/v3.18.2.js +0 -24
- package/dist/cjs/src/migration/to/v3.19.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.2.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.20.0.js +0 -29
- package/dist/cjs/src/migration/to/v3.21.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.22.0.js +0 -30
- package/dist/cjs/src/migration/to/v3.23.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.24.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.25.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.26.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.27.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.28.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.29.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.3.0.js +0 -15
- package/dist/cjs/src/migration/to/v3.30.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.31.0.js +0 -43
- package/dist/cjs/src/migration/to/v3.32.0.js +0 -61
- package/dist/cjs/src/migration/to/v3.33.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.34.0.js +0 -123
- package/dist/cjs/src/migration/to/v3.35.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.36.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.37.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.38.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.39.0.js +0 -47
- package/dist/cjs/src/migration/to/v3.4.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.40.0.js +0 -31
- package/dist/cjs/src/migration/to/v3.41.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.42.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.43.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.44.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.45.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.46.0.js +0 -37
- package/dist/cjs/src/migration/to/v3.47.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.48.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.49.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.50.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.51.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.6.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.7.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.8.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.9.0.js +0 -84
- package/dist/cjs/src/migration/types.js +0 -2
- package/dist/cjs/src/migration/utils.js +0 -10
- package/dist/cjs/src/mocks.js +0 -65
- package/dist/cjs/src/models/project-schema.js +0 -99
- package/dist/cjs/src/models/query.js +0 -35
- package/dist/cjs/src/models/service.js +0 -24
- package/dist/cjs/src/models/shape.js +0 -89
- package/dist/cjs/src/patterns.js +0 -2
- package/dist/cjs/src/project-schema/index.js +0 -156
- package/dist/cjs/src/project-schema/latest.js +0 -8
- package/dist/cjs/src/project-schema/migrate.js +0 -198
- package/dist/cjs/src/project-schema/v1.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.1.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.10.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.11.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.3.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.14.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.15.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.16.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.19.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.2.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.20.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.21.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.22.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.23.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.24.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.25.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.26.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.27.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.28.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.29.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.3.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.30.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.31.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.32.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.33.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.34.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.35.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.36.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.37.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.38.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.39.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.4.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.40.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.41.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.42.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.43.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.44.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.45.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.46.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.47.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.48.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.49.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.50.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.51.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.6.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.7.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.8.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.9.0.js +0 -8
- package/dist/cjs/src/project-schema/v4.0.0.js +0 -8
- package/dist/cjs/src/refs.js +0 -671
- package/dist/cjs/src/relationships.js +0 -326
- package/dist/cjs/src/runtime-schema.js +0 -88
- package/dist/cjs/src/scalars.js +0 -8
- package/dist/cjs/src/schema-transform.js +0 -83
- package/dist/cjs/src/schema-util.js +0 -1140
- package/dist/cjs/src/schemas/auth-schemas.json +0 -313
- package/dist/cjs/src/schemas/index.js +0 -162
- package/dist/cjs/src/schemas/project-schema/experimental.json +0 -1101
- package/dist/cjs/src/schemas/user-schema.json +0 -51
- package/dist/cjs/src/service-dependencies.js +0 -172
- package/dist/cjs/src/services/services.js +0 -156
- package/dist/cjs/src/services/types.js +0 -2
- package/dist/cjs/src/services/util.js +0 -45
- package/dist/cjs/src/taxonomies.js +0 -28
- package/dist/cjs/src/template-shapes/index.js +0 -37
- package/dist/cjs/src/template-shapes/names.js +0 -26
- package/dist/cjs/src/template-shapes/templates.js +0 -331
- package/dist/cjs/src/template-shapes/types.js +0 -10
- package/dist/cjs/src/template-shapes/where.js +0 -414
- package/dist/cjs/src/types/index.js +0 -19
- package/dist/cjs/src/types/transforms.js +0 -2
- package/dist/cjs/src/types/types.js +0 -21
- package/dist/cjs/src/types/utils.js +0 -344
- package/dist/cjs/src/unions.js +0 -88
- package/dist/cjs/src/user-schema.js +0 -8
- package/dist/cjs/src/util/ai-tools.js +0 -10
- package/dist/cjs/src/util/api-indexing.js +0 -62
- package/dist/cjs/src/util/detect-cycles.js +0 -48
- package/dist/cjs/src/util/find-shape-at-path.js +0 -57
- package/dist/cjs/src/util/form-config.js +0 -66
- package/dist/cjs/src/util/get-conflicting-properties.js +0 -58
- package/dist/cjs/src/util/get-return-shape.js +0 -34
- package/dist/cjs/src/util/has-arg.js +0 -17
- package/dist/cjs/src/util/merge.js +0 -269
- package/dist/cjs/src/util/patch-schema.js +0 -55
- package/dist/cjs/src/util/shapes.js +0 -31
- package/dist/cjs/src/validate.js +0 -1140
- package/dist/cjs/src/versions.js +0 -8
- package/dist/cjs/src/workflows.js +0 -76
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/src/content-schema-transform.js +0 -162
- package/dist/esm/src/flatten-templates.js +0 -20
- package/dist/esm/src/get-is-leaf.js +0 -56
- package/dist/esm/src/index.js +0 -46
- package/dist/esm/src/interfaces.js +0 -85
- package/dist/esm/src/layers/layers.js +0 -301
- package/dist/esm/src/layers/refs.js +0 -220
- package/dist/esm/src/layers/type-utils.js +0 -118
- package/dist/esm/src/layers/visitor.js +0 -38
- package/dist/esm/src/migration/index.js +0 -122
- package/dist/esm/src/migration/to/v3.0.0.js +0 -212
- package/dist/esm/src/migration/to/v3.1.0.js +0 -194
- package/dist/esm/src/migration/to/v3.32.0.js +0 -59
- package/dist/esm/src/migration/to/v3.34.0.js +0 -116
- package/dist/esm/src/migration/to/v3.39.0.js +0 -45
- package/dist/esm/src/mocks.js +0 -58
- package/dist/esm/src/models/project-schema.js +0 -92
- package/dist/esm/src/models/shape.js +0 -85
- package/dist/esm/src/project-schema/index.js +0 -138
- package/dist/esm/src/project-schema/migrate.js +0 -194
- package/dist/esm/src/refs.js +0 -608
- package/dist/esm/src/relationships.js +0 -311
- package/dist/esm/src/runtime-schema.js +0 -80
- package/dist/esm/src/schema-transform.js +0 -74
- package/dist/esm/src/schema-util.js +0 -1077
- package/dist/esm/src/schemas/auth-schemas.json +0 -313
- package/dist/esm/src/schemas/index.js +0 -154
- package/dist/esm/src/schemas/project-schema/experimental.json +0 -1101
- package/dist/esm/src/schemas/project-schema/latest.json +0 -3320
- package/dist/esm/src/schemas/project-schema/meta-schema-v1.0.0.json +0 -193
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.0.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.1.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.2.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.3.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.4.0.json +0 -637
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.0.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.1.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.6.0.json +0 -629
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.7.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.8.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.9.0.json +0 -1477
- package/dist/esm/src/schemas/project-schema/v1.0.0.json +0 -321
- package/dist/esm/src/schemas/project-schema/v3.0.0.json +0 -414
- package/dist/esm/src/schemas/project-schema/v3.1.0.json +0 -572
- package/dist/esm/src/schemas/project-schema/v3.10.0.json +0 -2097
- package/dist/esm/src/schemas/project-schema/v3.11.0.json +0 -2141
- package/dist/esm/src/schemas/project-schema/v3.12.0.json +0 -2144
- package/dist/esm/src/schemas/project-schema/v3.12.1.json +0 -2282
- package/dist/esm/src/schemas/project-schema/v3.12.2.json +0 -2304
- package/dist/esm/src/schemas/project-schema/v3.12.3.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.13.0.json +0 -2377
- package/dist/esm/src/schemas/project-schema/v3.14.0.json +0 -2385
- package/dist/esm/src/schemas/project-schema/v3.15.0.json +0 -2365
- package/dist/esm/src/schemas/project-schema/v3.16.0.json +0 -2373
- package/dist/esm/src/schemas/project-schema/v3.17.0.json +0 -2378
- package/dist/esm/src/schemas/project-schema/v3.17.1.json +0 -2380
- package/dist/esm/src/schemas/project-schema/v3.18.0.json +0 -2356
- package/dist/esm/src/schemas/project-schema/v3.18.1.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.18.2.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.19.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.2.0.json +0 -580
- package/dist/esm/src/schemas/project-schema/v3.20.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.21.0.json +0 -2376
- package/dist/esm/src/schemas/project-schema/v3.22.0.json +0 -2381
- package/dist/esm/src/schemas/project-schema/v3.23.0.json +0 -2456
- package/dist/esm/src/schemas/project-schema/v3.24.0.json +0 -2556
- package/dist/esm/src/schemas/project-schema/v3.25.0.json +0 -2552
- package/dist/esm/src/schemas/project-schema/v3.26.0.json +0 -2599
- package/dist/esm/src/schemas/project-schema/v3.27.0.json +0 -2611
- package/dist/esm/src/schemas/project-schema/v3.28.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.29.0.json +0 -2670
- package/dist/esm/src/schemas/project-schema/v3.3.0.json +0 -581
- package/dist/esm/src/schemas/project-schema/v3.30.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.31.0.json +0 -2714
- package/dist/esm/src/schemas/project-schema/v3.32.0.json +0 -2708
- package/dist/esm/src/schemas/project-schema/v3.33.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.34.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.35.0.json +0 -2748
- package/dist/esm/src/schemas/project-schema/v3.36.0.json +0 -2756
- package/dist/esm/src/schemas/project-schema/v3.37.0.json +0 -2821
- package/dist/esm/src/schemas/project-schema/v3.38.0.json +0 -2819
- package/dist/esm/src/schemas/project-schema/v3.39.0.json +0 -2827
- package/dist/esm/src/schemas/project-schema/v3.4.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.40.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.41.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.42.0.json +0 -2835
- package/dist/esm/src/schemas/project-schema/v3.43.0.json +0 -2841
- package/dist/esm/src/schemas/project-schema/v3.44.0.json +0 -3013
- package/dist/esm/src/schemas/project-schema/v3.45.0.json +0 -3064
- package/dist/esm/src/schemas/project-schema/v3.46.0.json +0 -3136
- package/dist/esm/src/schemas/project-schema/v3.47.0.json +0 -3189
- package/dist/esm/src/schemas/project-schema/v3.48.0.json +0 -3196
- package/dist/esm/src/schemas/project-schema/v3.49.0.json +0 -3239
- package/dist/esm/src/schemas/project-schema/v3.5.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.5.1.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.50.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.51.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.6.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.7.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.8.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v3.9.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v4.0.0.json +0 -2316
- package/dist/esm/src/schemas/project-schema.json +0 -190
- package/dist/esm/src/schemas/user-schema.json +0 -51
- package/dist/esm/src/service-dependencies.js +0 -165
- package/dist/esm/src/services/services.js +0 -145
- package/dist/esm/src/taxonomies.js +0 -24
- package/dist/esm/src/template-shapes/templates.js +0 -319
- package/dist/esm/src/template-shapes/where.js +0 -402
- package/dist/esm/src/types/index.js +0 -3
- package/dist/esm/src/types/utils.js +0 -279
- package/dist/esm/src/unions.js +0 -77
- package/dist/esm/src/user-schema.js +0 -7
- package/dist/esm/src/util/api-indexing.js +0 -57
- package/dist/esm/src/util/detect-cycles.js +0 -45
- package/dist/esm/src/util/form-config.js +0 -62
- package/dist/esm/src/util/get-conflicting-properties.js +0 -55
- package/dist/esm/src/util/get-return-shape.js +0 -30
- package/dist/esm/src/util/has-arg.js +0 -13
- package/dist/esm/src/util/merge.js +0 -256
- package/dist/esm/src/validate.js +0 -1126
- package/dist/esm/src/versions.js +0 -4
- package/dist/esm/src/workflows.js +0 -66
- package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/dist/types/src/agents.d.ts +0 -14
- package/dist/types/src/auth-schemas.d.ts +0 -104
- package/dist/types/src/builtin-schema.d.ts +0 -8
- package/dist/types/src/content-schema-transform.d.ts +0 -35
- package/dist/types/src/create-input-schema.d.ts +0 -9
- package/dist/types/src/enum.d.ts +0 -2
- package/dist/types/src/flatten-templates.d.ts +0 -2
- package/dist/types/src/get-is-leaf.d.ts +0 -3
- package/dist/types/src/index.d.ts +0 -48
- package/dist/types/src/interfaces.d.ts +0 -12
- package/dist/types/src/layers/layers.d.ts +0 -26
- package/dist/types/src/layers/refs.d.ts +0 -102
- package/dist/types/src/layers/type-utils.d.ts +0 -59
- package/dist/types/src/layers/visitor.d.ts +0 -5
- package/dist/types/src/migration/index.d.ts +0 -64
- package/dist/types/src/migration/to/v3.0.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.1.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.10.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.11.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.3.d.ts +0 -4
- package/dist/types/src/migration/to/v3.13.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.14.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.15.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.16.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.19.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.2.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.20.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.21.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.22.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.23.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.24.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.25.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.26.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.27.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.28.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.29.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.3.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.30.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.31.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.32.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.33.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.34.0.d.ts +0 -6
- package/dist/types/src/migration/to/v3.35.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.36.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.37.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.38.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.39.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.4.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.40.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.41.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.42.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.43.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.44.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.45.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.46.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.47.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.48.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.49.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.50.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.51.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.6.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.7.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.8.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.9.0.d.ts +0 -4
- package/dist/types/src/migration/types.d.ts +0 -19
- package/dist/types/src/mocks.d.ts +0 -13
- package/dist/types/src/models/project-schema.d.ts +0 -35
- package/dist/types/src/models/query.d.ts +0 -17
- package/dist/types/src/models/service.d.ts +0 -12
- package/dist/types/src/models/shape.d.ts +0 -41
- package/dist/types/src/project-schema/index.d.ts +0 -187
- package/dist/types/src/project-schema/latest.d.ts +0 -2221
- package/dist/types/src/project-schema/migrate.d.ts +0 -4
- package/dist/types/src/project-schema/v3.48.0.d.ts +0 -2160
- package/dist/types/src/project-schema/v3.49.0.d.ts +0 -2169
- package/dist/types/src/project-schema/v3.50.0.d.ts +0 -2221
- package/dist/types/src/project-schema/v3.51.0.d.ts +0 -2221
- package/dist/types/src/refs.d.ts +0 -226
- package/dist/types/src/relationships.d.ts +0 -40
- package/dist/types/src/runtime-schema.d.ts +0 -5
- package/dist/types/src/schema-transform.d.ts +0 -19
- package/dist/types/src/schema-util.d.ts +0 -210
- package/dist/types/src/service-dependencies.d.ts +0 -13
- package/dist/types/src/services/services.d.ts +0 -31
- package/dist/types/src/services/util.d.ts +0 -16
- package/dist/types/src/taxonomies.d.ts +0 -15
- package/dist/types/src/template-shapes/index.d.ts +0 -7
- package/dist/types/src/template-shapes/names.d.ts +0 -10
- package/dist/types/src/template-shapes/templates.d.ts +0 -32
- package/dist/types/src/template-shapes/types.d.ts +0 -15
- package/dist/types/src/template-shapes/where.d.ts +0 -37
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/transforms.d.ts +0 -13
- package/dist/types/src/types/types.d.ts +0 -211
- package/dist/types/src/types/utils.d.ts +0 -117
- package/dist/types/src/unions.d.ts +0 -14
- package/dist/types/src/user-schema.d.ts +0 -38
- package/dist/types/src/util/ai-tools.d.ts +0 -3
- package/dist/types/src/util/api-indexing.d.ts +0 -9
- package/dist/types/src/util/detect-cycles.d.ts +0 -7
- package/dist/types/src/util/find-shape-at-path.d.ts +0 -21
- package/dist/types/src/util/form-config.d.ts +0 -11
- package/dist/types/src/util/get-conflicting-properties.d.ts +0 -6
- package/dist/types/src/util/get-return-shape.d.ts +0 -4
- package/dist/types/src/util/has-arg.d.ts +0 -4
- package/dist/types/src/util/merge.d.ts +0 -15
- package/dist/types/src/util/patch-schema.d.ts +0 -8
- package/dist/types/src/util/shapes.d.ts +0 -5
- package/dist/types/src/validate.d.ts +0 -75
- package/dist/types/src/versions.d.ts +0 -4
- package/dist/types/src/workflows.d.ts +0 -14
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- /package/dist/{esm/src/migration/types.js → __tests__/_examples.test.d.ts} +0 -0
- /package/dist/{esm/src/patterns.js → __tests__/agents.test.d.ts} +0 -0
- /package/dist/{esm/src/services/types.js → __tests__/api-version.test.d.ts} +0 -0
- /package/dist/{esm/src/types/transforms.js → __tests__/builtin-schema.test.d.ts} +0 -0
- /package/dist/{esm/src/agents.js → agents.js} +0 -0
- /package/dist/{types/src/api-version.d.ts → api-version.d.ts} +0 -0
- /package/dist/{esm/src/api-version.js → api-version.js} +0 -0
- /package/dist/{esm/src/auth-schemas.js → auth-schemas.js} +0 -0
- /package/dist/{esm/src/builtin-schema.js → builtin-schema.js} +0 -0
- /package/dist/{types/src/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{esm/src/constants.js → constants.js} +0 -0
- /package/dist/{esm/src/create-input-schema.js → create-input-schema.js} +0 -0
- /package/dist/{esm/src/enum.js → enum.js} +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.10.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.11.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.3.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.13.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.14.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.15.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.16.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.19.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.2.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.20.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.21.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.22.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.23.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.24.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.25.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.26.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.27.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.28.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.29.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.3.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.30.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.31.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.33.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.35.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.36.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.37.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.38.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.4.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.40.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.41.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.42.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.43.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.44.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.45.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.46.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.47.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.48.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.49.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.50.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.51.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.6.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.7.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.8.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.9.0.js +0 -0
- /package/dist/{types/src/migration → migration}/utils.d.ts +0 -0
- /package/dist/{esm/src/migration → migration}/utils.js +0 -0
- /package/dist/{esm/src/models → models}/query.js +0 -0
- /package/dist/{esm/src/models → models}/service.js +0 -0
- /package/dist/{types/src/patterns.d.ts → patterns.d.ts} +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/latest.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v1.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v1.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.1.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.1.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.10.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.10.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.11.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.11.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.3.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.3.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.14.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.14.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.15.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.15.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.16.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.16.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.19.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.19.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.2.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.2.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.20.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.20.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.21.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.21.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.22.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.22.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.23.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.23.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.24.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.24.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.25.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.25.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.26.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.26.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.27.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.27.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.28.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.28.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.29.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.29.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.3.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.3.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.30.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.30.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.31.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.31.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.32.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.32.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.33.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.33.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.34.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.34.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.35.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.35.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.36.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.36.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.37.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.37.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.38.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.38.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.39.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.39.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.4.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.4.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.40.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.40.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.41.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.41.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.42.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.42.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.43.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.43.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.44.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.44.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.45.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.45.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.46.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.46.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.47.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.47.0.js +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.48.0.js +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.49.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.1.js +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.50.0.js +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.51.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.6.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.6.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.7.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.7.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.8.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.8.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.9.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.9.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v4.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v4.0.0.js +0 -0
- /package/dist/{types/src/scalars.d.ts → scalars.d.ts} +0 -0
- /package/dist/{esm/src/scalars.js → scalars.js} +0 -0
- /package/dist/{types/src/schemas → schemas}/index.d.ts +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/latest.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.10.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.11.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.3.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.13.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.14.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.15.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.16.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.19.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.20.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.21.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.22.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.23.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.24.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.25.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.26.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.27.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.28.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.29.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.30.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.31.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.32.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.33.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.34.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.35.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.36.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.37.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.38.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.39.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.40.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.41.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.42.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.43.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.44.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.45.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.46.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.47.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.48.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.49.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.50.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.51.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v4.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema.json +0 -0
- /package/dist/{types/src/services → services}/types.d.ts +0 -0
- /package/dist/{esm/src/services → services}/util.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/index.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/names.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/types.js +0 -0
- /package/dist/{esm/src/types → types}/types.js +0 -0
- /package/dist/{esm/src/util → util}/ai-tools.js +0 -0
- /package/dist/{esm/src/util → util}/find-shape-at-path.js +0 -0
- /package/dist/{esm/src/util → util}/patch-schema.js +0 -0
- /package/dist/{esm/src/util → util}/shapes.js +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import postSchemaJson from '@/examples/latest/post-schema.json';
|
|
2
|
+
import { expect, test } from 'vitest';
|
|
3
|
+
import { applyDefaultsToSchema } from "../schema-util.js";
|
|
4
|
+
import { defaultWorkflow, findWorkflowStep, getLiveStepKeys, getStatusField, getWorkflow, getWorkflowStepKeys, statusFallback } from "../workflows.js";
|
|
5
|
+
const postSchema = applyDefaultsToSchema(postSchemaJson);
|
|
6
|
+
test('getStatusFieldV3', () => {
|
|
7
|
+
const shape = {
|
|
8
|
+
name: 'post',
|
|
9
|
+
workflow: 'default',
|
|
10
|
+
title: 'post',
|
|
11
|
+
id: 'post',
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
title: { type: 'string' },
|
|
16
|
+
body: { type: 'string' }
|
|
17
|
+
},
|
|
18
|
+
required: ['title', 'body']
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
expect(getStatusField({ default: defaultWorkflow }, shape)).toEqual({
|
|
22
|
+
type: 'string',
|
|
23
|
+
'@workflow': 'default',
|
|
24
|
+
title: 'Status'
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
test('getWorkflow', () => {
|
|
28
|
+
expect(getWorkflow(postSchema, '<postContentTypeId>')).toEqual(defaultWorkflow);
|
|
29
|
+
});
|
|
30
|
+
export const simpleWorkflow = {
|
|
31
|
+
name: 'simple',
|
|
32
|
+
title: 'Simple',
|
|
33
|
+
steps: [
|
|
34
|
+
{
|
|
35
|
+
name: 'live',
|
|
36
|
+
title: 'Live',
|
|
37
|
+
key: 'ByAgr-BZ8',
|
|
38
|
+
color: '#5cd79b',
|
|
39
|
+
live: true
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
export const complexWorkflow = {
|
|
44
|
+
name: 'complex',
|
|
45
|
+
title: 'Complex',
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
name: 'draft',
|
|
49
|
+
title: 'Draft',
|
|
50
|
+
key: 'r1uCfi4ZL',
|
|
51
|
+
color: '#bdbdbd',
|
|
52
|
+
live: false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'artPhoto',
|
|
56
|
+
title: 'Art/Photo',
|
|
57
|
+
key: 'rkhRGs4WL',
|
|
58
|
+
color: '#5cd79b',
|
|
59
|
+
live: false
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'legal',
|
|
63
|
+
title: 'Legal',
|
|
64
|
+
key: 'SJtxS-rWI',
|
|
65
|
+
color: '#5cd79b',
|
|
66
|
+
live: false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'finalReview',
|
|
70
|
+
title: 'Final Review',
|
|
71
|
+
key: 'B1sxHZBZI',
|
|
72
|
+
color: '#5cd79b',
|
|
73
|
+
live: false
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'published',
|
|
77
|
+
title: 'Published',
|
|
78
|
+
key: 'Hk2xBZSbI',
|
|
79
|
+
color: '#5cd79b',
|
|
80
|
+
live: true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'homepage',
|
|
84
|
+
title: 'Homepage',
|
|
85
|
+
key: 'SypgH-S-8',
|
|
86
|
+
color: '#5cd79b',
|
|
87
|
+
live: true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'retired',
|
|
91
|
+
title: 'Retired',
|
|
92
|
+
key: 'ByAgr-BZ8',
|
|
93
|
+
color: '#5cd79b',
|
|
94
|
+
live: false
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
};
|
|
98
|
+
test('findWorkflowStep', () => {
|
|
99
|
+
expect(findWorkflowStep(complexWorkflow, 'Hk2xBZSbI')).toEqual({
|
|
100
|
+
index: 4,
|
|
101
|
+
step: complexWorkflow.steps[4]
|
|
102
|
+
});
|
|
103
|
+
expect(findWorkflowStep(complexWorkflow, 'bogus')).toBe(undefined);
|
|
104
|
+
});
|
|
105
|
+
test('statusFallback', () => {
|
|
106
|
+
expect(statusFallback(defaultWorkflow, true)).toMatchObject({
|
|
107
|
+
name: 'enabled'
|
|
108
|
+
});
|
|
109
|
+
expect(statusFallback(defaultWorkflow, false)).toMatchObject({
|
|
110
|
+
name: 'disabled'
|
|
111
|
+
});
|
|
112
|
+
expect(statusFallback(simpleWorkflow, true)).toMatchObject({ name: 'live' });
|
|
113
|
+
expect(statusFallback(simpleWorkflow, false)).toMatchObject({ name: 'live' });
|
|
114
|
+
expect(statusFallback(complexWorkflow, true)).toMatchObject({
|
|
115
|
+
name: 'published'
|
|
116
|
+
});
|
|
117
|
+
expect(statusFallback(complexWorkflow, false)).toMatchObject({
|
|
118
|
+
name: 'draft'
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
const allKeys = complexWorkflow.steps.map((step) => step.key);
|
|
122
|
+
test('getWorkflowStepKeys - gte', () => {
|
|
123
|
+
const filteredKeys = getWorkflowStepKeys(complexWorkflow, 'B1sxHZBZI', 'gte');
|
|
124
|
+
expect(filteredKeys).toEqual(allKeys.slice(3, 7));
|
|
125
|
+
expect(filteredKeys.includes('B1sxHZBZI')).toBe(true);
|
|
126
|
+
});
|
|
127
|
+
test('getWorkflowStepKeys - gt', () => {
|
|
128
|
+
expect(getWorkflowStepKeys(complexWorkflow, 'B1sxHZBZI', 'gt')).toEqual(allKeys.slice(4, 7));
|
|
129
|
+
});
|
|
130
|
+
test('getWorkflowStepKeys - lte', () => {
|
|
131
|
+
const filteredKeys = getWorkflowStepKeys(complexWorkflow, 'B1sxHZBZI', 'lte');
|
|
132
|
+
expect(filteredKeys).toEqual(allKeys.slice(0, 4));
|
|
133
|
+
expect(filteredKeys.includes('B1sxHZBZI')).toBe(true);
|
|
134
|
+
});
|
|
135
|
+
test('getWorkflowStepKeys - lt', () => {
|
|
136
|
+
expect(getWorkflowStepKeys(complexWorkflow, 'B1sxHZBZI', 'lt')).toEqual(allKeys.slice(0, 3));
|
|
137
|
+
});
|
|
138
|
+
test('getWorkflowStepKeys - eq', () => {
|
|
139
|
+
expect(getWorkflowStepKeys(complexWorkflow, 'B1sxHZBZI', 'eq')).toEqual(['B1sxHZBZI']);
|
|
140
|
+
});
|
|
141
|
+
test('getWorkflowStepKeys - in', () => {
|
|
142
|
+
expect(getWorkflowStepKeys(complexWorkflow, 'B1sxHZBZI', 'in')).toEqual(['B1sxHZBZI']);
|
|
143
|
+
});
|
|
144
|
+
test('getWorkflowStepKeys - step not found', () => {
|
|
145
|
+
expect(() => getWorkflowStepKeys(complexWorkflow, 'bogus', 'lt')).toThrowErrorMatchingInlineSnapshot(`[Error: Cannot find step "bogus" in workflow "Complex"]`);
|
|
146
|
+
});
|
|
147
|
+
test('getLiveStepKeys', () => {
|
|
148
|
+
expect(getLiveStepKeys(complexWorkflow)).toEqual(allKeys.slice(4, 6));
|
|
149
|
+
});
|
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AgentAPIArgument, AgentJSON, Args, ProjectSchemaJSON } from './project-schema/index.ts';
|
|
2
|
+
export declare const END_AGENT_EXECUTION = "endAgentExecution";
|
|
3
|
+
export declare const BUILT_IN_CHAT_ARGS: AgentAPIArgument[];
|
|
4
|
+
export declare const BUILT_IN_CHAT_ARG_NAMES: string[];
|
|
5
|
+
export type AgentEndTransition = {
|
|
6
|
+
type: 'done' | 'progress';
|
|
7
|
+
originStateId: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const getAgentEndTransitions: (agent: AgentJSON, includeSuspend?: boolean) => AgentEndTransition[];
|
|
10
|
+
export declare const getAgentEndStates: (agent: AgentJSON, includeSuspend?: boolean) => Set<string>;
|
|
11
|
+
export declare const getInspectAgentSessionQueryName: (agentName: string) => string;
|
|
12
|
+
export declare const removeBuiltInArgs: (args: AgentAPIArgument[]) => AgentAPIArgument[];
|
|
13
|
+
export declare const createArgs: (agent: AgentJSON) => Args | undefined;
|
|
14
|
+
export declare function addAiQueries(projectSchema: ProjectSchemaJSON): ProjectSchemaJSON;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
3
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A role import document is an array of role
|
|
8
|
+
*
|
|
9
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
10
|
+
* via the `definition` "RoleImport".
|
|
11
|
+
*/
|
|
12
|
+
export type RoleImport = RoleInput[];
|
|
13
|
+
export interface AuthSchemas {
|
|
14
|
+
[k: string]: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
18
|
+
* via the `definition` "Condition".
|
|
19
|
+
*/
|
|
20
|
+
export interface Condition {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
24
|
+
* via the `definition` "Statement".
|
|
25
|
+
*/
|
|
26
|
+
export interface Statement {
|
|
27
|
+
Effect?: 'Allow' | 'Deny';
|
|
28
|
+
Sid?: string;
|
|
29
|
+
Action?: string[];
|
|
30
|
+
NotAction?: string[];
|
|
31
|
+
Resource?: string[];
|
|
32
|
+
NotResource?: string[];
|
|
33
|
+
Principal?: {
|
|
34
|
+
AWS?: string[];
|
|
35
|
+
Service?: string[];
|
|
36
|
+
};
|
|
37
|
+
Condition?: Condition;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
41
|
+
* via the `definition` "AccessPolicyDocument".
|
|
42
|
+
*/
|
|
43
|
+
export interface AccessPolicyDocument {
|
|
44
|
+
Version: string;
|
|
45
|
+
Statement: Statement[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
49
|
+
* via the `definition` "ApiKey".
|
|
50
|
+
*/
|
|
51
|
+
export interface ApiKey {
|
|
52
|
+
projectId: string;
|
|
53
|
+
name: string;
|
|
54
|
+
role?: string;
|
|
55
|
+
permissions?: AccessPolicyDocument;
|
|
56
|
+
lastUsed?: string;
|
|
57
|
+
apiKey?: string;
|
|
58
|
+
id: string;
|
|
59
|
+
delinquent?: boolean;
|
|
60
|
+
apiRateLimit?: number;
|
|
61
|
+
deactivated?: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
65
|
+
* via the `definition` "UserPermission".
|
|
66
|
+
*/
|
|
67
|
+
export interface UserPermission {
|
|
68
|
+
projectId: string;
|
|
69
|
+
userId: string;
|
|
70
|
+
role: string;
|
|
71
|
+
permissions?: AccessPolicyDocument;
|
|
72
|
+
created?: number;
|
|
73
|
+
updated?: number;
|
|
74
|
+
deactivated?: number;
|
|
75
|
+
delinquent?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
79
|
+
* via the `definition` "Role".
|
|
80
|
+
*/
|
|
81
|
+
export interface Role {
|
|
82
|
+
projectId: string;
|
|
83
|
+
name: string;
|
|
84
|
+
conditions?: Condition;
|
|
85
|
+
permissions: AccessPolicyDocument;
|
|
86
|
+
builtIn?: boolean;
|
|
87
|
+
created?: number;
|
|
88
|
+
updated?: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Input type for role creation and updates.
|
|
92
|
+
*
|
|
93
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
94
|
+
* via the `definition` "RoleInput".
|
|
95
|
+
*/
|
|
96
|
+
export interface RoleInput {
|
|
97
|
+
projectId?: string;
|
|
98
|
+
name: string;
|
|
99
|
+
conditions?: Condition;
|
|
100
|
+
permissions: AccessPolicyDocument;
|
|
101
|
+
builtIn?: boolean;
|
|
102
|
+
created?: number;
|
|
103
|
+
updated?: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* This interface was referenced by `AuthSchemas`'s JSON-Schema
|
|
107
|
+
* via the `definition` "User".
|
|
108
|
+
*/
|
|
109
|
+
export interface User {
|
|
110
|
+
id: string;
|
|
111
|
+
email: string;
|
|
112
|
+
fullName: string;
|
|
113
|
+
created: number;
|
|
114
|
+
updated: number;
|
|
115
|
+
firstTime: boolean;
|
|
116
|
+
avatarPath?: string;
|
|
117
|
+
intercomHash?: string;
|
|
118
|
+
googleUserId?: string;
|
|
119
|
+
comcastId?: string;
|
|
120
|
+
token?: string;
|
|
121
|
+
policies?: AccessPolicyDocument[];
|
|
122
|
+
preferences?: {
|
|
123
|
+
[k: string]: any;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FormMap, ShapeJSON, ShapeMap } from './project-schema/index.ts';
|
|
2
|
+
import type { Content } from './types/index.ts';
|
|
3
|
+
export declare function isAsset(content: Content): boolean;
|
|
4
|
+
export declare function getAssetS3Path(content: Content): string | undefined;
|
|
5
|
+
export declare function setAssetS3Path(content: Content, path: string): void;
|
|
6
|
+
export declare const jsonShape: ShapeJSON;
|
|
7
|
+
export declare const builtInShapes: ShapeMap;
|
|
8
|
+
export declare const builtInForms: FormMap;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ProjectSchemaJSON, PropertySchema, ShapeJSON } from './project-schema/index.ts';
|
|
2
|
+
import type { ContentTransform, KeyTransform, PropertyTransform, PropertyTransformMap, SchemaType, SourceKeyTransform } from './types/index.ts';
|
|
3
|
+
export declare function getType(schema: Pick<PropertySchema, 'type'>): SchemaType;
|
|
4
|
+
export declare function preferKey(name: string, schema: PropertySchema): string;
|
|
5
|
+
/**
|
|
6
|
+
* A key transform to select the field name
|
|
7
|
+
*/
|
|
8
|
+
export declare const preferName: KeyTransform;
|
|
9
|
+
export declare function preferSourceKey(name: string, schema: PropertySchema): string[];
|
|
10
|
+
export declare function findTransforms(pluginMap: PropertyTransformMap | undefined, schema: PropertySchema, name: string, shape?: ShapeJSON): PropertyTransform | undefined;
|
|
11
|
+
export type Accumulator<T = unknown> = {
|
|
12
|
+
accumulate(value: unknown, schema: PropertySchema, name: string): void;
|
|
13
|
+
getResults(): T;
|
|
14
|
+
};
|
|
15
|
+
export type ContentTransformParams = {
|
|
16
|
+
transforms?: PropertyTransformMap;
|
|
17
|
+
accumulators?: Accumulator[];
|
|
18
|
+
projectSchema: ProjectSchemaJSON;
|
|
19
|
+
keyTransform?: KeyTransform;
|
|
20
|
+
sourceKeyTransform?: SourceKeyTransform;
|
|
21
|
+
passThrough?: boolean;
|
|
22
|
+
allowNullObjects?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function getContentTransform({ transforms, accumulators, keyTransform, sourceKeyTransform, passThrough, allowNullObjects, projectSchema }: ContentTransformParams): ContentTransform;
|
|
25
|
+
export type PropertyInfo = {
|
|
26
|
+
schema: PropertySchema;
|
|
27
|
+
key: string;
|
|
28
|
+
isRequired: boolean;
|
|
29
|
+
};
|
|
30
|
+
export type GetPropertyInfoContext = {
|
|
31
|
+
projectSchema: ProjectSchemaJSON;
|
|
32
|
+
transforms?: PropertyTransformMap;
|
|
33
|
+
keyTransform?: KeyTransform;
|
|
34
|
+
};
|
|
35
|
+
export declare function getPropertyInfo(context: GetPropertyInfoContext, schema: PropertySchema, path: string): PropertyInfo[];
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import difference from 'lodash/difference.js';
|
|
2
|
+
import forEach from 'lodash/forEach.js';
|
|
3
|
+
import get from 'lodash/get.js';
|
|
4
|
+
import pick from 'lodash/pick.js';
|
|
5
|
+
import { dereferenceSchema, getRefShapeName } from "./refs.js";
|
|
6
|
+
import { getStorageKey } from "./schema-util.js";
|
|
7
|
+
import { isArraySchema, isObjectSchema } from "./types/utils.js";
|
|
8
|
+
import { enumerateOneOfKeys, isUnionSchema } from "./unions.js";
|
|
9
|
+
const typeCache = new WeakMap();
|
|
10
|
+
export function getType(schema) {
|
|
11
|
+
let type = typeCache.get(schema);
|
|
12
|
+
if (type) {
|
|
13
|
+
return type;
|
|
14
|
+
}
|
|
15
|
+
type = schema.type;
|
|
16
|
+
// Handle nullable types for example: ['object', 'null']
|
|
17
|
+
if (Array.isArray(type)) {
|
|
18
|
+
const filtered = type.filter((name) => name !== 'null');
|
|
19
|
+
if (!filtered.length) {
|
|
20
|
+
throw new Error('Invalid schema');
|
|
21
|
+
}
|
|
22
|
+
type = filtered[0];
|
|
23
|
+
}
|
|
24
|
+
typeCache.set(schema, type);
|
|
25
|
+
return type;
|
|
26
|
+
}
|
|
27
|
+
function ensureArray(value) {
|
|
28
|
+
return Array.isArray(value) ? value : [value];
|
|
29
|
+
}
|
|
30
|
+
export function preferKey(name, schema) {
|
|
31
|
+
return getStorageKey(schema) ?? name;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A key transform to select the field name
|
|
35
|
+
*/
|
|
36
|
+
export const preferName = (name) => name;
|
|
37
|
+
function getLocalizedKey(key, locale) {
|
|
38
|
+
return locale ? `${key}:${locale}` : key;
|
|
39
|
+
}
|
|
40
|
+
function getNonDefaultLocales(projectSchema) {
|
|
41
|
+
return projectSchema.locales.filter((locale) => locale !== projectSchema.defaultLocale);
|
|
42
|
+
}
|
|
43
|
+
function getLocalizedSourceKeys(keys, locales) {
|
|
44
|
+
return keys.flatMap((key) => [{ key }, ...locales.map((locale) => ({ key: `${key}:${locale}`, locale }))]);
|
|
45
|
+
}
|
|
46
|
+
export function preferSourceKey(name, schema) {
|
|
47
|
+
const key = getStorageKey(schema);
|
|
48
|
+
return key ? [key, name] : [name];
|
|
49
|
+
}
|
|
50
|
+
export function findTransforms(pluginMap, schema, name, shape) {
|
|
51
|
+
const type = getType(schema);
|
|
52
|
+
if (pluginMap && (pluginMap[type] ?? pluginMap['*'])) {
|
|
53
|
+
const plugins = (pluginMap[type] ?? []).concat(pluginMap['*'] ?? []);
|
|
54
|
+
return plugins.find((plugin) => plugin.filter(schema, name, shape));
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
export function getContentTransform({ transforms, accumulators, keyTransform = preferKey, sourceKeyTransform = preferSourceKey, passThrough = true, allowNullObjects = false, projectSchema }) {
|
|
59
|
+
const nonDefaultLocales = getNonDefaultLocales(projectSchema);
|
|
60
|
+
const prepare = (schema, obj, name = '') => {
|
|
61
|
+
const shapeName = getRefShapeName(projectSchema, schema);
|
|
62
|
+
schema = dereferenceSchema(projectSchema, schema);
|
|
63
|
+
if (accumulators) {
|
|
64
|
+
for (const accumulator of accumulators) {
|
|
65
|
+
accumulator.accumulate(obj, schema, name);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const shape = shapeName ? projectSchema.shapes[shapeName] : undefined;
|
|
69
|
+
const transform = findTransforms(transforms, schema, name, shape);
|
|
70
|
+
if (transform) {
|
|
71
|
+
const next = (value, schema, name) => prepare(schema, value, name);
|
|
72
|
+
return transform.process(obj, schema, name, shape, next);
|
|
73
|
+
}
|
|
74
|
+
if (obj && isUnionSchema(schema)) {
|
|
75
|
+
for (const { shapeId, propSchema } of enumerateOneOfKeys(projectSchema, schema.oneOf)) {
|
|
76
|
+
if (obj._shapeId === shapeId) {
|
|
77
|
+
return prepare(propSchema, obj, name);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (obj && isObjectSchema(schema)) {
|
|
82
|
+
const result = {};
|
|
83
|
+
const assigned = new Set();
|
|
84
|
+
forEach(schema.properties, (fieldSchema, name) => {
|
|
85
|
+
const sourceKeys = ensureArray(sourceKeyTransform(name, fieldSchema, obj));
|
|
86
|
+
const localizedSourceKeys = getLocalizedSourceKeys(sourceKeys, nonDefaultLocales);
|
|
87
|
+
for (const { key: sourceKey, locale } of localizedSourceKeys) {
|
|
88
|
+
const value = prepare(fieldSchema, get(obj, sourceKey), name);
|
|
89
|
+
if (value !== undefined) {
|
|
90
|
+
assigned.add(sourceKey);
|
|
91
|
+
const transform = findTransforms(transforms, dereferenceSchema(projectSchema, fieldSchema), name);
|
|
92
|
+
const getKey = transform?.keyTransform ? transform.keyTransform : keyTransform;
|
|
93
|
+
const key = getLocalizedKey(getKey(name, fieldSchema, sourceKey), locale);
|
|
94
|
+
result[key] = value;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
if (passThrough && obj) {
|
|
99
|
+
const keys = difference(Object.keys(obj), [...assigned]);
|
|
100
|
+
if (keys.length) {
|
|
101
|
+
Object.assign(result, pick(obj, keys));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
if (isArraySchema(schema)) {
|
|
107
|
+
const itemSchema = schema.items;
|
|
108
|
+
if (Array.isArray(obj)) {
|
|
109
|
+
return obj.map((item) => prepare(itemSchema, item, name));
|
|
110
|
+
}
|
|
111
|
+
if (obj === undefined) {
|
|
112
|
+
prepare(itemSchema, obj, name);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (allowNullObjects && isObjectSchema(schema) && obj === null) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
// Allow properties that have not been transformed
|
|
119
|
+
return passThrough ? obj : undefined;
|
|
120
|
+
};
|
|
121
|
+
return prepare;
|
|
122
|
+
}
|
|
123
|
+
function transformKey(transforms, propSchema, name, transform = preferKey) {
|
|
124
|
+
const schemaTransform = findTransforms(transforms, propSchema, name);
|
|
125
|
+
if (schemaTransform?.keyTransform) {
|
|
126
|
+
transform = schemaTransform.keyTransform;
|
|
127
|
+
}
|
|
128
|
+
return transform(name, propSchema);
|
|
129
|
+
}
|
|
130
|
+
export function getPropertyInfo(context, schema, path) {
|
|
131
|
+
const { projectSchema, transforms, keyTransform } = context;
|
|
132
|
+
const result = [];
|
|
133
|
+
const findProperty = (currentSchema, name, rest, path) => {
|
|
134
|
+
if (isObjectSchema(currentSchema)) {
|
|
135
|
+
const propSchema = currentSchema.properties[name];
|
|
136
|
+
const isRequired = currentSchema.required?.includes(name) ?? false;
|
|
137
|
+
if (!propSchema) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const refSchema = dereferenceSchema(projectSchema, propSchema);
|
|
141
|
+
const nextPath = path.concat(transformKey(transforms, refSchema, name, keyTransform));
|
|
142
|
+
if (rest.length) {
|
|
143
|
+
const [nextName, ...nextRest] = rest;
|
|
144
|
+
findProperty(refSchema, nextName, nextRest, nextPath);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
result.push({ schema: refSchema, key: nextPath.join('.'), isRequired });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else if (isUnionSchema(currentSchema)) {
|
|
151
|
+
for (const optionSchema of currentSchema.oneOf) {
|
|
152
|
+
findProperty(dereferenceSchema(projectSchema, optionSchema), name, rest, path);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else if (isArraySchema(currentSchema)) {
|
|
156
|
+
findProperty(dereferenceSchema(projectSchema, currentSchema.items), name, rest, path);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const [first, ...rest] = path.split('.');
|
|
160
|
+
findProperty(dereferenceSchema(projectSchema, schema), first, rest, []);
|
|
161
|
+
return result;
|
|
162
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ProjectSchemaJSON, PropertySchema, ShapeSchema } from './project-schema/index.ts';
|
|
2
|
+
export type CreateInputSchemaOptions = {
|
|
3
|
+
isUpdate?: boolean;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Convert all output properties in the schema to be input properties,
|
|
7
|
+
* For an update, remove `required` and `default` fields as well.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createInputSchema<T extends ProjectSchemaJSON | ShapeSchema | PropertySchema>(schema: T, options?: CreateInputSchemaOptions): T;
|
package/dist/enum.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { deepClone } from '@takeshape/util';
|
|
2
|
+
import set from 'lodash/set.js';
|
|
3
|
+
import { refItemToNamespacedShapeName } from "./refs.js";
|
|
4
|
+
import { getAllRefs } from "./schema-util.js";
|
|
5
|
+
import { isValidTemplate, resolveTemplate } from "./template-shapes/index.js";
|
|
6
|
+
export function flattenTemplates(projectSchema) {
|
|
7
|
+
const templateRefs = getAllRefs(projectSchema, (ref) => Boolean(ref.template));
|
|
8
|
+
if (!templateRefs.length) {
|
|
9
|
+
return projectSchema;
|
|
10
|
+
}
|
|
11
|
+
const newSchema = deepClone(projectSchema);
|
|
12
|
+
for (const ref of templateRefs) {
|
|
13
|
+
if (ref.template && isValidTemplate(ref.template)) {
|
|
14
|
+
const { shapeName, dependencies } = resolveTemplate(newSchema, ref.template, refItemToNamespacedShapeName(ref));
|
|
15
|
+
set(newSchema, ref.path, ref.path[ref.path.length - 1] === '@ref' ? `local:${shapeName}` : shapeName);
|
|
16
|
+
Object.assign(newSchema.shapes, dependencies);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return newSchema;
|
|
20
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { getType } from "./content-schema-transform.js";
|
|
2
|
+
import { followRef, getRefShapeName } from "./refs.js";
|
|
3
|
+
import { getStorageKey, isBuiltinType } from "./schema-util.js";
|
|
4
|
+
import { isPropertySchemaWithRelationship } from "./types/index.js";
|
|
5
|
+
const scalarTags = new Set(['draftjs']);
|
|
6
|
+
function isLeafTypeV3(projectSchema, propertySchema) {
|
|
7
|
+
const type = getType(propertySchema);
|
|
8
|
+
return Boolean(
|
|
9
|
+
// Must have key
|
|
10
|
+
getStorageKey(propertySchema) &&
|
|
11
|
+
// If is not a structure, then is a leaf
|
|
12
|
+
(!['object', 'array'].includes(type) ||
|
|
13
|
+
// If is relationship, then is a leaf
|
|
14
|
+
isPropertySchemaWithRelationship(propertySchema['@output'] ?? propertySchema) ||
|
|
15
|
+
Boolean(propertySchema['@tag'] && scalarTags.has(propertySchema['@tag'])) ||
|
|
16
|
+
// If is array, then should not be a synchronized structure
|
|
17
|
+
(type === 'array' && !propertySchema['@syncLocaleStructure']) ||
|
|
18
|
+
isBuiltinType(projectSchema, propertySchema)));
|
|
19
|
+
}
|
|
20
|
+
export function getIsLeaf(projectSchema, shapeSchema) {
|
|
21
|
+
const leafMap = new Set();
|
|
22
|
+
const shapesSeen = new Set();
|
|
23
|
+
const collectLeaves = (schema) => {
|
|
24
|
+
const shapeName = getRefShapeName(projectSchema, schema);
|
|
25
|
+
schema = shapeName ? followRef(projectSchema, schema) : schema;
|
|
26
|
+
const key = getStorageKey(schema);
|
|
27
|
+
if (key && isLeafTypeV3(projectSchema, schema)) {
|
|
28
|
+
leafMap.add(key);
|
|
29
|
+
}
|
|
30
|
+
if (shapeName) {
|
|
31
|
+
// Skip shapes we have already seen to avoid cycles
|
|
32
|
+
if (shapesSeen.has(shapeName)) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
shapesSeen.add(shapeName);
|
|
36
|
+
}
|
|
37
|
+
const combo = schema.oneOf ?? schema.allOf;
|
|
38
|
+
if (combo) {
|
|
39
|
+
combo.map(collectLeaves);
|
|
40
|
+
}
|
|
41
|
+
else if (schema.properties) {
|
|
42
|
+
for (const name of Object.keys(schema.properties)) {
|
|
43
|
+
collectLeaves(schema.properties[name]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (schema.items) {
|
|
47
|
+
collectLeaves(schema.items);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
collectLeaves(shapeSchema);
|
|
51
|
+
return (key) => {
|
|
52
|
+
// Remove locale suffix
|
|
53
|
+
key = key ? key.split(':')[0] : key;
|
|
54
|
+
return Boolean(key && leafMap.has(key));
|
|
55
|
+
};
|
|
56
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type { RoleImport, Condition, Statement, AccessPolicyDocument, ApiKey, UserPermission, Role, RoleInput, User } from './auth-schemas.ts';
|
|
2
|
+
export type { ProjectSchemaUpdate } from './migration/types.ts';
|
|
3
|
+
export * from './content-schema-transform.ts';
|
|
4
|
+
export * from './get-is-leaf.ts';
|
|
5
|
+
export * from './project-schema/index.ts';
|
|
6
|
+
export * from './project-schema/migrate.ts';
|
|
7
|
+
export * from './schema-util.ts';
|
|
8
|
+
export * from './template-shapes/index.ts';
|
|
9
|
+
export * from './taxonomies.ts';
|
|
10
|
+
export * from './workflows.ts';
|
|
11
|
+
export * from './api-version.ts';
|
|
12
|
+
export * from './migration/index.ts';
|
|
13
|
+
export * from './validate/validate.ts';
|
|
14
|
+
export * from './validate/errors.ts';
|
|
15
|
+
export * from './builtin-schema.ts';
|
|
16
|
+
export * from './versions.ts';
|
|
17
|
+
export * from './mocks.ts';
|
|
18
|
+
export * from './scalars.ts';
|
|
19
|
+
export * from './refs.ts';
|
|
20
|
+
export * from './unions.ts';
|
|
21
|
+
export * from './enum.ts';
|
|
22
|
+
export * from './patterns.ts';
|
|
23
|
+
export * from './types/transforms.ts';
|
|
24
|
+
export * from './types/types.ts';
|
|
25
|
+
export * from './types/utils.ts';
|
|
26
|
+
export * from './flatten-templates.ts';
|
|
27
|
+
export * from './relationships.ts';
|
|
28
|
+
export * from './create-input-schema.ts';
|
|
29
|
+
export * from './schema-transform.ts';
|
|
30
|
+
export * from './interfaces.ts';
|
|
31
|
+
export * from './agents.ts';
|
|
32
|
+
export * from './services/services.ts';
|
|
33
|
+
export * from './services/util.ts';
|
|
34
|
+
export * from './services/types.ts';
|
|
35
|
+
export * from './util/api-indexing.ts';
|
|
36
|
+
export * from './util/form-config.ts';
|
|
37
|
+
export * from './util/ai-tools.ts';
|
|
38
|
+
export * from './util/detect-cycles.ts';
|
|
39
|
+
export * from './util/find-shape-at-path.ts';
|
|
40
|
+
export * from './util/get-conflicting-properties.ts';
|
|
41
|
+
export * from './util/get-return-shape.ts';
|
|
42
|
+
export * from './util/has-arg.ts';
|
|
43
|
+
export * from './util/merge.ts';
|
|
44
|
+
export * from './util/patch-schema.ts';
|
|
45
|
+
export * from './util/shapes.ts';
|
|
46
|
+
export * from './constants.ts';
|
|
47
|
+
export * from './runtime-schema.ts';
|
|
48
|
+
export * from './service-dependencies.ts';
|