@takeshape/schema 11.40.0 → 11.41.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/cjs/package.json +1 -0
- package/dist/cjs/src/agents.js +58 -0
- package/dist/cjs/src/api-version.js +24 -0
- package/dist/cjs/src/auth-schemas.js +8 -0
- package/dist/cjs/src/builtin-schema.js +616 -0
- package/dist/cjs/src/constants.js +4 -0
- package/dist/cjs/src/content-schema-transform.js +175 -0
- package/dist/cjs/src/create-input-schema.js +67 -0
- package/dist/cjs/src/enum.js +13 -0
- package/dist/cjs/src/flatten-templates.js +27 -0
- package/dist/cjs/src/get-is-leaf.js +60 -0
- package/dist/cjs/src/index.js +60 -0
- package/dist/cjs/src/interfaces.js +97 -0
- package/dist/cjs/src/layers/layers.js +308 -0
- package/dist/cjs/src/layers/refs.js +243 -0
- package/dist/cjs/src/layers/type-utils.js +146 -0
- package/dist/cjs/src/layers/visitor.js +43 -0
- package/dist/cjs/src/migration/index.js +140 -0
- package/dist/cjs/src/migration/to/v3.0.0.js +205 -0
- package/dist/cjs/src/migration/to/v3.1.0.js +197 -0
- package/dist/cjs/src/migration/to/v3.10.0.js +72 -0
- package/dist/cjs/src/migration/to/v3.11.0.js +90 -0
- package/dist/cjs/src/migration/to/v3.12.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.12.1.js +12 -0
- package/dist/cjs/src/migration/to/v3.12.2.js +12 -0
- package/dist/cjs/src/migration/to/v3.12.3.js +92 -0
- package/dist/cjs/src/migration/to/v3.13.0.js +22 -0
- package/dist/cjs/src/migration/to/v3.14.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.15.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.16.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.17.0.js +27 -0
- package/dist/cjs/src/migration/to/v3.17.1.js +12 -0
- package/dist/cjs/src/migration/to/v3.18.0.js +69 -0
- package/dist/cjs/src/migration/to/v3.18.1.js +20 -0
- package/dist/cjs/src/migration/to/v3.18.2.js +24 -0
- package/dist/cjs/src/migration/to/v3.19.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.2.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.20.0.js +26 -0
- package/dist/cjs/src/migration/to/v3.21.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.22.0.js +30 -0
- package/dist/cjs/src/migration/to/v3.23.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.24.0.js +13 -0
- package/dist/cjs/src/migration/to/v3.25.0.js +13 -0
- package/dist/cjs/src/migration/to/v3.26.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.27.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.28.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.29.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.3.0.js +15 -0
- package/dist/cjs/src/migration/to/v3.30.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.31.0.js +43 -0
- package/dist/cjs/src/migration/to/v3.32.0.js +59 -0
- package/dist/cjs/src/migration/to/v3.33.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.34.0.js +127 -0
- package/dist/cjs/src/migration/to/v3.35.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.36.0.js +27 -0
- package/dist/cjs/src/migration/to/v3.37.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.38.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.39.0.js +47 -0
- package/dist/cjs/src/migration/to/v3.4.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.40.0.js +31 -0
- package/dist/cjs/src/migration/to/v3.41.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.42.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.43.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.44.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.45.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.46.0.js +37 -0
- package/dist/cjs/src/migration/to/v3.47.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.48.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.49.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.5.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.5.1.js +12 -0
- package/dist/cjs/src/migration/to/v3.50.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.6.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.7.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.8.0.js +12 -0
- package/dist/cjs/src/migration/to/v3.9.0.js +84 -0
- package/dist/cjs/src/migration/types.js +2 -0
- package/dist/cjs/src/migration/utils.js +11 -0
- package/dist/cjs/src/mocks.js +66 -0
- package/dist/cjs/src/models/project-schema.js +99 -0
- package/dist/cjs/src/models/query.js +35 -0
- package/dist/cjs/src/models/service.js +24 -0
- package/dist/cjs/src/models/shape.js +89 -0
- package/dist/cjs/src/patterns.js +2 -0
- package/dist/cjs/src/project-schema/index.js +154 -0
- package/dist/cjs/src/project-schema/latest.js +8 -0
- package/dist/cjs/src/project-schema/migrate.js +197 -0
- package/dist/cjs/src/project-schema/v1.0.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.0.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.1.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.10.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.11.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.12.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.12.1.js +8 -0
- package/dist/cjs/src/project-schema/v3.12.2.js +8 -0
- package/dist/cjs/src/project-schema/v3.12.3.js +8 -0
- package/dist/cjs/src/project-schema/v3.13.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.13.1.js +8 -0
- package/dist/cjs/src/project-schema/v3.14.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.15.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.16.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.17.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.17.1.js +8 -0
- package/dist/cjs/src/project-schema/v3.18.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.18.1.js +8 -0
- package/dist/cjs/src/project-schema/v3.18.2.js +8 -0
- package/dist/cjs/src/project-schema/v3.19.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.2.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.20.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.21.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.22.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.23.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.24.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.25.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.26.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.27.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.28.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.29.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.3.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.30.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.31.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.32.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.33.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.34.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.35.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.36.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.37.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.38.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.39.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.4.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.40.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.41.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.42.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.43.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.44.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.45.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.46.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.47.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.48.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.49.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.5.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.5.1.js +8 -0
- package/dist/cjs/src/project-schema/v3.50.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.6.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.7.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.8.0.js +8 -0
- package/dist/cjs/src/project-schema/v3.9.0.js +8 -0
- package/dist/cjs/src/project-schema/v4.0.0.js +8 -0
- package/dist/cjs/src/refs.js +662 -0
- package/dist/cjs/src/relationships.js +237 -0
- package/dist/cjs/src/scalars.js +8 -0
- package/dist/cjs/src/schema-transform.js +83 -0
- package/dist/cjs/src/schema-util.js +1133 -0
- package/dist/cjs/src/schemas/index.js +164 -0
- package/dist/cjs/src/services/services.js +156 -0
- package/dist/cjs/src/services/types.js +2 -0
- package/dist/cjs/src/services/util.js +46 -0
- package/dist/cjs/src/taxonomies.js +28 -0
- package/dist/cjs/src/template-shapes/index.js +38 -0
- package/dist/cjs/src/template-shapes/names.js +27 -0
- package/dist/cjs/src/template-shapes/templates.js +325 -0
- package/dist/cjs/src/template-shapes/types.js +10 -0
- package/dist/cjs/src/template-shapes/where.js +403 -0
- package/dist/cjs/src/types/index.js +19 -0
- package/dist/cjs/src/types/transforms.js +2 -0
- package/dist/cjs/src/types/types.js +21 -0
- package/dist/cjs/src/types/utils.js +345 -0
- package/dist/cjs/src/unions.js +90 -0
- package/dist/cjs/src/user-schema.js +8 -0
- package/dist/cjs/src/util/ai-tools.js +11 -0
- package/dist/cjs/src/util/api-indexing.js +62 -0
- package/dist/cjs/src/util/detect-cycles.js +49 -0
- package/dist/cjs/src/util/find-shape-at-path.js +58 -0
- package/dist/cjs/src/util/form-config.js +68 -0
- package/dist/cjs/src/util/get-conflicting-properties.js +59 -0
- package/dist/cjs/src/util/get-return-shape.js +35 -0
- package/dist/cjs/src/util/has-arg.js +18 -0
- package/dist/cjs/src/util/merge.js +261 -0
- package/dist/cjs/src/util/patch-schema.js +50 -0
- package/dist/cjs/src/util/shapes.js +32 -0
- package/dist/cjs/src/validate.js +1087 -0
- package/dist/cjs/src/versions.js +8 -0
- package/dist/cjs/src/workflows.js +76 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/src/agents.js +49 -0
- package/dist/esm/src/api-version.js +17 -0
- package/dist/esm/src/auth-schemas.js +7 -0
- package/dist/esm/src/builtin-schema.js +610 -0
- package/dist/esm/src/constants.js +1 -0
- package/dist/esm/src/content-schema-transform.js +162 -0
- package/dist/esm/src/create-input-schema.js +60 -0
- package/dist/esm/src/enum.js +9 -0
- package/dist/esm/src/flatten-templates.js +20 -0
- package/dist/esm/src/get-is-leaf.js +56 -0
- package/dist/esm/src/index.js +44 -0
- package/dist/esm/src/interfaces.js +83 -0
- package/dist/esm/src/layers/layers.js +295 -0
- package/dist/esm/src/layers/refs.js +220 -0
- package/dist/esm/src/layers/type-utils.js +118 -0
- package/dist/esm/src/layers/visitor.js +38 -0
- package/dist/esm/src/migration/index.js +120 -0
- package/dist/esm/src/migration/to/v3.0.0.js +200 -0
- package/dist/esm/src/migration/to/v3.1.0.js +192 -0
- package/dist/esm/src/migration/to/v3.10.0.js +67 -0
- package/dist/esm/src/migration/to/v3.11.0.js +85 -0
- package/dist/esm/src/migration/to/v3.12.0.js +10 -0
- package/dist/esm/src/migration/to/v3.12.1.js +10 -0
- package/dist/esm/src/migration/to/v3.12.2.js +10 -0
- package/dist/esm/src/migration/to/v3.12.3.js +87 -0
- package/dist/esm/src/migration/to/v3.13.0.js +17 -0
- package/dist/esm/src/migration/to/v3.14.0.js +10 -0
- package/dist/esm/src/migration/to/v3.15.0.js +10 -0
- package/dist/esm/src/migration/to/v3.16.0.js +10 -0
- package/dist/esm/src/migration/to/v3.17.0.js +22 -0
- package/dist/esm/src/migration/to/v3.17.1.js +10 -0
- package/dist/esm/src/migration/to/v3.18.0.js +64 -0
- package/dist/esm/src/migration/to/v3.18.1.js +15 -0
- package/dist/esm/src/migration/to/v3.18.2.js +19 -0
- package/dist/esm/src/migration/to/v3.19.0.js +10 -0
- package/dist/esm/src/migration/to/v3.2.0.js +10 -0
- package/dist/esm/src/migration/to/v3.20.0.js +21 -0
- package/dist/esm/src/migration/to/v3.21.0.js +10 -0
- package/dist/esm/src/migration/to/v3.22.0.js +25 -0
- package/dist/esm/src/migration/to/v3.23.0.js +10 -0
- package/dist/esm/src/migration/to/v3.24.0.js +11 -0
- package/dist/esm/src/migration/to/v3.25.0.js +11 -0
- package/dist/esm/src/migration/to/v3.26.0.js +10 -0
- package/dist/esm/src/migration/to/v3.27.0.js +10 -0
- package/dist/esm/src/migration/to/v3.28.0.js +10 -0
- package/dist/esm/src/migration/to/v3.29.0.js +10 -0
- package/dist/esm/src/migration/to/v3.3.0.js +13 -0
- package/dist/esm/src/migration/to/v3.30.0.js +10 -0
- package/dist/esm/src/migration/to/v3.31.0.js +38 -0
- package/dist/esm/src/migration/to/v3.32.0.js +57 -0
- package/dist/esm/src/migration/to/v3.33.0.js +10 -0
- package/dist/esm/src/migration/to/v3.34.0.js +119 -0
- package/dist/esm/src/migration/to/v3.35.0.js +10 -0
- package/dist/esm/src/migration/to/v3.36.0.js +22 -0
- package/dist/esm/src/migration/to/v3.37.0.js +10 -0
- package/dist/esm/src/migration/to/v3.38.0.js +10 -0
- package/dist/esm/src/migration/to/v3.39.0.js +45 -0
- package/dist/esm/src/migration/to/v3.4.0.js +10 -0
- package/dist/esm/src/migration/to/v3.40.0.js +26 -0
- package/dist/esm/src/migration/to/v3.41.0.js +10 -0
- package/dist/esm/src/migration/to/v3.42.0.js +10 -0
- package/dist/esm/src/migration/to/v3.43.0.js +10 -0
- package/dist/esm/src/migration/to/v3.44.0.js +10 -0
- package/dist/esm/src/migration/to/v3.45.0.js +10 -0
- package/dist/esm/src/migration/to/v3.46.0.js +35 -0
- package/dist/esm/src/migration/to/v3.47.0.js +10 -0
- package/dist/esm/src/migration/to/v3.48.0.js +10 -0
- package/dist/esm/src/migration/to/v3.49.0.js +10 -0
- package/dist/esm/src/migration/to/v3.5.0.js +10 -0
- package/dist/esm/src/migration/to/v3.5.1.js +10 -0
- package/dist/esm/src/migration/to/v3.50.0.js +10 -0
- package/dist/esm/src/migration/to/v3.6.0.js +10 -0
- package/dist/esm/src/migration/to/v3.7.0.js +10 -0
- package/dist/esm/src/migration/to/v3.8.0.js +10 -0
- package/dist/esm/src/migration/to/v3.9.0.js +79 -0
- package/dist/esm/src/migration/types.js +1 -0
- package/dist/esm/src/migration/utils.js +6 -0
- package/dist/esm/src/mocks.js +58 -0
- package/dist/esm/src/models/project-schema.js +92 -0
- package/dist/esm/src/models/query.js +31 -0
- package/dist/esm/src/models/service.js +20 -0
- package/dist/esm/src/models/shape.js +85 -0
- package/dist/esm/src/patterns.js +1 -0
- package/dist/esm/src/project-schema/index.js +136 -0
- package/dist/esm/src/project-schema/latest.js +7 -0
- package/dist/esm/src/project-schema/migrate.js +192 -0
- package/dist/esm/src/project-schema/v1.0.0.js +7 -0
- package/dist/esm/src/project-schema/v3.0.0.js +7 -0
- package/dist/esm/src/project-schema/v3.1.0.js +7 -0
- package/dist/esm/src/project-schema/v3.10.0.js +7 -0
- package/dist/esm/src/project-schema/v3.11.0.js +7 -0
- package/dist/esm/src/project-schema/v3.12.0.js +7 -0
- package/dist/esm/src/project-schema/v3.12.1.js +7 -0
- package/dist/esm/src/project-schema/v3.12.2.js +7 -0
- package/dist/esm/src/project-schema/v3.12.3.js +7 -0
- package/dist/esm/src/project-schema/v3.13.0.js +7 -0
- package/dist/esm/src/project-schema/v3.13.1.js +7 -0
- package/dist/esm/src/project-schema/v3.14.0.js +7 -0
- package/dist/esm/src/project-schema/v3.15.0.js +7 -0
- package/dist/esm/src/project-schema/v3.16.0.js +7 -0
- package/dist/esm/src/project-schema/v3.17.0.js +7 -0
- package/dist/esm/src/project-schema/v3.17.1.js +7 -0
- package/dist/esm/src/project-schema/v3.18.0.js +7 -0
- package/dist/esm/src/project-schema/v3.18.1.js +7 -0
- package/dist/esm/src/project-schema/v3.18.2.js +7 -0
- package/dist/esm/src/project-schema/v3.19.0.js +7 -0
- package/dist/esm/src/project-schema/v3.2.0.js +7 -0
- package/dist/esm/src/project-schema/v3.20.0.js +7 -0
- package/dist/esm/src/project-schema/v3.21.0.js +7 -0
- package/dist/esm/src/project-schema/v3.22.0.js +7 -0
- package/dist/esm/src/project-schema/v3.23.0.js +7 -0
- package/dist/esm/src/project-schema/v3.24.0.js +7 -0
- package/dist/esm/src/project-schema/v3.25.0.js +7 -0
- package/dist/esm/src/project-schema/v3.26.0.js +7 -0
- package/dist/esm/src/project-schema/v3.27.0.js +7 -0
- package/dist/esm/src/project-schema/v3.28.0.js +7 -0
- package/dist/esm/src/project-schema/v3.29.0.js +7 -0
- package/dist/esm/src/project-schema/v3.3.0.js +7 -0
- package/dist/esm/src/project-schema/v3.30.0.js +7 -0
- package/dist/esm/src/project-schema/v3.31.0.js +7 -0
- package/dist/esm/src/project-schema/v3.32.0.js +7 -0
- package/dist/esm/src/project-schema/v3.33.0.js +7 -0
- package/dist/esm/src/project-schema/v3.34.0.js +7 -0
- package/dist/esm/src/project-schema/v3.35.0.js +7 -0
- package/dist/esm/src/project-schema/v3.36.0.js +7 -0
- package/dist/esm/src/project-schema/v3.37.0.js +7 -0
- package/dist/esm/src/project-schema/v3.38.0.js +7 -0
- package/dist/esm/src/project-schema/v3.39.0.js +7 -0
- package/dist/esm/src/project-schema/v3.4.0.js +7 -0
- package/dist/esm/src/project-schema/v3.40.0.js +7 -0
- package/dist/esm/src/project-schema/v3.41.0.js +7 -0
- package/dist/esm/src/project-schema/v3.42.0.js +7 -0
- package/dist/esm/src/project-schema/v3.43.0.js +7 -0
- package/dist/esm/src/project-schema/v3.44.0.js +7 -0
- package/dist/esm/src/project-schema/v3.45.0.js +7 -0
- package/dist/esm/src/project-schema/v3.46.0.js +7 -0
- package/dist/esm/src/project-schema/v3.47.0.js +7 -0
- package/dist/esm/src/project-schema/v3.48.0.js +7 -0
- package/dist/esm/src/project-schema/v3.49.0.js +7 -0
- package/dist/esm/src/project-schema/v3.5.0.js +7 -0
- package/dist/esm/src/project-schema/v3.5.1.js +7 -0
- package/dist/esm/src/project-schema/v3.50.0.js +7 -0
- package/dist/esm/src/project-schema/v3.6.0.js +7 -0
- package/dist/esm/src/project-schema/v3.7.0.js +7 -0
- package/dist/esm/src/project-schema/v3.8.0.js +7 -0
- package/dist/esm/src/project-schema/v3.9.0.js +7 -0
- package/dist/esm/src/project-schema/v4.0.0.js +7 -0
- package/dist/esm/src/refs.js +598 -0
- package/dist/esm/src/relationships.js +222 -0
- package/dist/esm/src/scalars.js +4 -0
- package/dist/esm/src/schema-transform.js +74 -0
- package/dist/esm/src/schema-util.js +1069 -0
- package/dist/esm/src/schemas/index.js +154 -0
- package/dist/esm/src/services/services.js +144 -0
- package/dist/esm/src/services/types.js +1 -0
- package/dist/esm/src/services/util.js +36 -0
- package/dist/esm/src/taxonomies.js +24 -0
- package/dist/esm/src/template-shapes/index.js +33 -0
- package/dist/esm/src/template-shapes/names.js +21 -0
- package/dist/esm/src/template-shapes/templates.js +313 -0
- package/dist/esm/src/template-shapes/types.js +7 -0
- package/dist/esm/src/template-shapes/where.js +391 -0
- package/dist/esm/src/types/index.js +3 -0
- package/dist/esm/src/types/transforms.js +1 -0
- package/dist/esm/src/types/types.js +18 -0
- package/dist/esm/src/types/utils.js +279 -0
- package/dist/esm/src/unions.js +79 -0
- package/dist/esm/src/user-schema.js +7 -0
- package/dist/esm/src/util/ai-tools.js +6 -0
- package/dist/esm/src/util/api-indexing.js +57 -0
- package/dist/esm/src/util/detect-cycles.js +45 -0
- package/dist/esm/src/util/find-shape-at-path.js +53 -0
- package/dist/esm/src/util/form-config.js +63 -0
- package/dist/esm/src/util/get-conflicting-properties.js +55 -0
- package/dist/esm/src/util/get-return-shape.js +30 -0
- package/dist/esm/src/util/has-arg.js +13 -0
- package/dist/esm/src/util/merge.js +247 -0
- package/dist/esm/src/util/patch-schema.js +42 -0
- package/dist/esm/src/util/shapes.js +22 -0
- package/dist/esm/src/validate.js +1073 -0
- package/dist/esm/src/versions.js +4 -0
- package/dist/esm/src/workflows.js +66 -0
- package/dist/types/src/agents.d.ts +11 -0
- package/dist/types/src/api-version.d.ts +5 -0
- package/dist/types/src/auth-schemas.d.ts +104 -0
- package/dist/types/src/builtin-schema.d.ts +8 -0
- package/dist/types/src/constants.d.ts +1 -0
- package/dist/types/src/content-schema-transform.d.ts +35 -0
- package/dist/types/src/create-input-schema.d.ts +9 -0
- package/dist/types/src/enum.d.ts +2 -0
- package/dist/types/src/flatten-templates.d.ts +2 -0
- package/dist/types/src/get-is-leaf.d.ts +3 -0
- package/dist/types/src/index.d.ts +46 -0
- package/dist/types/src/interfaces.d.ts +12 -0
- package/dist/types/src/layers/layers.d.ts +26 -0
- package/dist/types/src/layers/refs.d.ts +103 -0
- package/dist/types/src/layers/type-utils.d.ts +59 -0
- package/dist/types/src/layers/visitor.d.ts +5 -0
- package/dist/types/src/migration/index.d.ts +63 -0
- package/dist/types/src/migration/to/v3.0.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.1.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.10.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.11.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.12.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.12.1.d.ts +4 -0
- package/dist/types/src/migration/to/v3.12.2.d.ts +4 -0
- package/dist/types/src/migration/to/v3.12.3.d.ts +4 -0
- package/dist/types/src/migration/to/v3.13.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.14.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.15.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.16.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.17.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.17.1.d.ts +4 -0
- package/dist/types/src/migration/to/v3.18.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.18.1.d.ts +4 -0
- package/dist/types/src/migration/to/v3.18.2.d.ts +4 -0
- package/dist/types/src/migration/to/v3.19.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.2.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.20.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.21.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.22.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.23.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.24.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.25.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.26.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.27.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.28.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.29.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.3.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.30.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.31.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.32.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.33.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.34.0.d.ts +6 -0
- package/dist/types/src/migration/to/v3.35.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.36.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.37.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.38.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.39.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.4.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.40.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.41.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.42.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.43.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.44.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.45.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.46.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.47.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.48.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.49.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.5.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.5.1.d.ts +4 -0
- package/dist/types/src/migration/to/v3.50.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.6.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.7.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.8.0.d.ts +4 -0
- package/dist/types/src/migration/to/v3.9.0.d.ts +4 -0
- package/dist/types/src/migration/types.d.ts +20 -0
- package/dist/types/src/migration/utils.d.ts +2 -0
- package/dist/types/src/mocks.d.ts +13 -0
- package/dist/types/src/models/project-schema.d.ts +35 -0
- package/dist/types/src/models/query.d.ts +17 -0
- package/dist/types/src/models/service.d.ts +12 -0
- package/dist/types/src/models/shape.d.ts +41 -0
- package/dist/types/src/patterns.d.ts +12 -0
- package/dist/types/src/project-schema/index.d.ts +184 -0
- package/dist/types/src/project-schema/latest.d.ts +2032 -0
- package/dist/types/src/project-schema/migrate.d.ts +4 -0
- package/dist/types/src/project-schema/v1.0.0.d.ts +299 -0
- package/dist/types/src/project-schema/v3.0.0.d.ts +478 -0
- package/dist/types/src/project-schema/v3.1.0.d.ts +621 -0
- package/dist/types/src/project-schema/v3.10.0.d.ts +1201 -0
- package/dist/types/src/project-schema/v3.11.0.d.ts +1210 -0
- package/dist/types/src/project-schema/v3.12.0.d.ts +1214 -0
- package/dist/types/src/project-schema/v3.12.1.d.ts +1273 -0
- package/dist/types/src/project-schema/v3.12.2.d.ts +1283 -0
- package/dist/types/src/project-schema/v3.12.3.d.ts +1306 -0
- package/dist/types/src/project-schema/v3.13.0.d.ts +1317 -0
- package/dist/types/src/project-schema/v3.13.1.d.ts +1412 -0
- package/dist/types/src/project-schema/v3.14.0.d.ts +1436 -0
- package/dist/types/src/project-schema/v3.15.0.d.ts +1458 -0
- package/dist/types/src/project-schema/v3.16.0.d.ts +1470 -0
- package/dist/types/src/project-schema/v3.17.0.d.ts +1467 -0
- package/dist/types/src/project-schema/v3.17.1.d.ts +1468 -0
- package/dist/types/src/project-schema/v3.18.0.d.ts +1333 -0
- package/dist/types/src/project-schema/v3.18.1.d.ts +1332 -0
- package/dist/types/src/project-schema/v3.18.2.d.ts +1332 -0
- package/dist/types/src/project-schema/v3.19.0.d.ts +1336 -0
- package/dist/types/src/project-schema/v3.2.0.d.ts +632 -0
- package/dist/types/src/project-schema/v3.20.0.d.ts +1336 -0
- package/dist/types/src/project-schema/v3.21.0.d.ts +1338 -0
- package/dist/types/src/project-schema/v3.22.0.d.ts +1344 -0
- package/dist/types/src/project-schema/v3.23.0.d.ts +1376 -0
- package/dist/types/src/project-schema/v3.24.0.d.ts +1364 -0
- package/dist/types/src/project-schema/v3.25.0.d.ts +1363 -0
- package/dist/types/src/project-schema/v3.26.0.d.ts +1388 -0
- package/dist/types/src/project-schema/v3.27.0.d.ts +1397 -0
- package/dist/types/src/project-schema/v3.28.0.d.ts +1416 -0
- package/dist/types/src/project-schema/v3.29.0.d.ts +1423 -0
- package/dist/types/src/project-schema/v3.3.0.d.ts +632 -0
- package/dist/types/src/project-schema/v3.30.0.d.ts +1416 -0
- package/dist/types/src/project-schema/v3.31.0.d.ts +1448 -0
- package/dist/types/src/project-schema/v3.32.0.d.ts +1439 -0
- package/dist/types/src/project-schema/v3.33.0.d.ts +1445 -0
- package/dist/types/src/project-schema/v3.34.0.d.ts +1445 -0
- package/dist/types/src/project-schema/v3.35.0.d.ts +1464 -0
- package/dist/types/src/project-schema/v3.36.0.d.ts +1470 -0
- package/dist/types/src/project-schema/v3.37.0.d.ts +1522 -0
- package/dist/types/src/project-schema/v3.38.0.d.ts +1522 -0
- package/dist/types/src/project-schema/v3.39.0.d.ts +1529 -0
- package/dist/types/src/project-schema/v3.4.0.d.ts +624 -0
- package/dist/types/src/project-schema/v3.40.0.d.ts +1530 -0
- package/dist/types/src/project-schema/v3.41.0.d.ts +1530 -0
- package/dist/types/src/project-schema/v3.42.0.d.ts +1534 -0
- package/dist/types/src/project-schema/v3.43.0.d.ts +1536 -0
- package/dist/types/src/project-schema/v3.44.0.d.ts +1621 -0
- package/dist/types/src/project-schema/v3.45.0.d.ts +1650 -0
- package/dist/types/src/project-schema/v3.46.0.d.ts +1703 -0
- package/dist/types/src/project-schema/v3.47.0.d.ts +1736 -0
- package/dist/types/src/project-schema/v3.48.0.d.ts +1989 -0
- package/dist/types/src/project-schema/v3.49.0.d.ts +1998 -0
- package/dist/types/src/project-schema/v3.5.0.d.ts +649 -0
- package/dist/types/src/project-schema/v3.5.1.d.ts +649 -0
- package/dist/types/src/project-schema/v3.50.0.d.ts +2032 -0
- package/dist/types/src/project-schema/v3.6.0.d.ts +658 -0
- package/dist/types/src/project-schema/v3.7.0.d.ts +961 -0
- package/dist/types/src/project-schema/v3.8.0.d.ts +979 -0
- package/dist/types/src/project-schema/v3.9.0.d.ts +1178 -0
- package/dist/types/src/project-schema/v4.0.0.d.ts +1328 -0
- package/dist/types/src/refs.d.ts +227 -0
- package/dist/types/src/relationships.d.ts +36 -0
- package/dist/types/src/scalars.d.ts +2 -0
- package/dist/types/src/schema-transform.d.ts +19 -0
- package/dist/types/src/schema-util.d.ts +211 -0
- package/dist/types/src/schemas/index.d.ts +6 -0
- package/dist/types/src/services/services.d.ts +31 -0
- package/dist/types/src/services/types.d.ts +11 -0
- package/dist/types/src/services/util.d.ts +16 -0
- package/dist/types/src/taxonomies.d.ts +15 -0
- package/dist/types/src/template-shapes/index.d.ts +7 -0
- package/dist/types/src/template-shapes/names.d.ts +10 -0
- package/dist/types/src/template-shapes/templates.d.ts +32 -0
- package/dist/types/src/template-shapes/types.d.ts +15 -0
- package/dist/types/src/template-shapes/where.d.ts +37 -0
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/transforms.d.ts +13 -0
- package/dist/types/src/types/types.d.ts +210 -0
- package/dist/types/src/types/utils.d.ts +117 -0
- package/dist/types/src/unions.d.ts +14 -0
- package/dist/types/src/user-schema.d.ts +38 -0
- package/dist/types/src/util/ai-tools.d.ts +3 -0
- package/dist/types/src/util/api-indexing.d.ts +9 -0
- package/dist/types/src/util/detect-cycles.d.ts +7 -0
- package/dist/types/src/util/find-shape-at-path.d.ts +21 -0
- package/dist/types/src/util/form-config.d.ts +11 -0
- package/dist/types/src/util/get-conflicting-properties.d.ts +6 -0
- package/dist/types/src/util/get-return-shape.d.ts +4 -0
- package/dist/types/src/util/has-arg.d.ts +4 -0
- package/dist/types/src/util/merge.d.ts +15 -0
- package/dist/types/src/util/patch-schema.d.ts +8 -0
- package/dist/types/src/util/shapes.d.ts +5 -0
- package/dist/types/src/validate.d.ts +70 -0
- package/dist/types/src/versions.d.ts +4 -0
- package/dist/types/src/workflows.d.ts +14 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -0
- package/package.json +47 -23
- package/dist/agents.d.ts +0 -12
- package/dist/agents.d.ts.map +0 -1
- package/dist/agents.js +0 -61
- package/dist/api-version.d.ts +0 -6
- package/dist/api-version.d.ts.map +0 -1
- package/dist/api-version.js +0 -25
- package/dist/auth-schemas.d.ts +0 -105
- package/dist/auth-schemas.d.ts.map +0 -1
- package/dist/auth-schemas.js +0 -5
- package/dist/builtin-schema.d.ts +0 -9
- package/dist/builtin-schema.d.ts.map +0 -1
- package/dist/builtin-schema.js +0 -681
- package/dist/content-schema-transform.d.ts +0 -48
- package/dist/content-schema-transform.d.ts.map +0 -1
- package/dist/content-schema-transform.js +0 -207
- package/dist/create-input-schema.d.ts +0 -10
- package/dist/create-input-schema.d.ts.map +0 -1
- package/dist/create-input-schema.js +0 -74
- package/dist/enum.d.ts +0 -3
- package/dist/enum.d.ts.map +0 -1
- package/dist/enum.js +0 -15
- package/dist/flatten-templates.d.ts +0 -3
- package/dist/flatten-templates.d.ts.map +0 -1
- package/dist/flatten-templates.js +0 -30
- package/dist/get-is-leaf.d.ts +0 -4
- package/dist/get-is-leaf.d.ts.map +0 -1
- package/dist/get-is-leaf.js +0 -58
- package/dist/index.d.ts +0 -33
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -335
- package/dist/interfaces.d.ts +0 -13
- package/dist/interfaces.d.ts.map +0 -1
- package/dist/interfaces.js +0 -99
- package/dist/layers/layers.d.ts +0 -27
- package/dist/layers/layers.d.ts.map +0 -1
- package/dist/layers/layers.js +0 -324
- package/dist/layers/refs.d.ts +0 -104
- package/dist/layers/refs.d.ts.map +0 -1
- package/dist/layers/refs.js +0 -279
- package/dist/layers/type-utils.d.ts +0 -60
- package/dist/layers/type-utils.d.ts.map +0 -1
- package/dist/layers/type-utils.js +0 -166
- package/dist/layers/visitor.d.ts +0 -6
- package/dist/layers/visitor.d.ts.map +0 -1
- package/dist/layers/visitor.js +0 -42
- package/dist/migration/index.d.ts +0 -64
- package/dist/migration/index.d.ts.map +0 -1
- package/dist/migration/index.js +0 -142
- package/dist/migration/to/utils/v3.34.0-utils.d.ts +0 -1
- package/dist/migration/to/utils/v3.34.0-utils.d.ts.map +0 -1
- package/dist/migration/to/utils/v3.34.0-utils.js +0 -1
- package/dist/migration/to/v3.0.0.d.ts +0 -5
- package/dist/migration/to/v3.0.0.d.ts.map +0 -1
- package/dist/migration/to/v3.0.0.js +0 -263
- package/dist/migration/to/v3.1.0.d.ts +0 -5
- package/dist/migration/to/v3.1.0.d.ts.map +0 -1
- package/dist/migration/to/v3.1.0.js +0 -206
- package/dist/migration/to/v3.10.0.d.ts +0 -5
- package/dist/migration/to/v3.10.0.d.ts.map +0 -1
- package/dist/migration/to/v3.10.0.js +0 -91
- package/dist/migration/to/v3.11.0.d.ts +0 -5
- package/dist/migration/to/v3.11.0.d.ts.map +0 -1
- package/dist/migration/to/v3.11.0.js +0 -97
- package/dist/migration/to/v3.12.0.d.ts +0 -5
- package/dist/migration/to/v3.12.0.d.ts.map +0 -1
- package/dist/migration/to/v3.12.0.js +0 -16
- package/dist/migration/to/v3.12.1.d.ts +0 -5
- package/dist/migration/to/v3.12.1.d.ts.map +0 -1
- package/dist/migration/to/v3.12.1.js +0 -16
- package/dist/migration/to/v3.12.2.d.ts +0 -5
- package/dist/migration/to/v3.12.2.d.ts.map +0 -1
- package/dist/migration/to/v3.12.2.js +0 -16
- package/dist/migration/to/v3.12.3.d.ts +0 -5
- package/dist/migration/to/v3.12.3.d.ts.map +0 -1
- package/dist/migration/to/v3.12.3.js +0 -83
- package/dist/migration/to/v3.13.0.d.ts +0 -5
- package/dist/migration/to/v3.13.0.d.ts.map +0 -1
- package/dist/migration/to/v3.13.0.js +0 -26
- package/dist/migration/to/v3.14.0.d.ts +0 -5
- package/dist/migration/to/v3.14.0.d.ts.map +0 -1
- package/dist/migration/to/v3.14.0.js +0 -16
- package/dist/migration/to/v3.15.0.d.ts +0 -5
- package/dist/migration/to/v3.15.0.d.ts.map +0 -1
- package/dist/migration/to/v3.15.0.js +0 -16
- package/dist/migration/to/v3.16.0.d.ts +0 -5
- package/dist/migration/to/v3.16.0.d.ts.map +0 -1
- package/dist/migration/to/v3.16.0.js +0 -16
- package/dist/migration/to/v3.17.0.d.ts +0 -5
- package/dist/migration/to/v3.17.0.d.ts.map +0 -1
- package/dist/migration/to/v3.17.0.js +0 -34
- package/dist/migration/to/v3.17.1.d.ts +0 -5
- package/dist/migration/to/v3.17.1.d.ts.map +0 -1
- package/dist/migration/to/v3.17.1.js +0 -16
- package/dist/migration/to/v3.18.0.d.ts +0 -5
- package/dist/migration/to/v3.18.0.d.ts.map +0 -1
- package/dist/migration/to/v3.18.0.js +0 -71
- package/dist/migration/to/v3.18.1.d.ts +0 -5
- package/dist/migration/to/v3.18.1.d.ts.map +0 -1
- package/dist/migration/to/v3.18.1.js +0 -22
- package/dist/migration/to/v3.18.2.d.ts +0 -5
- package/dist/migration/to/v3.18.2.d.ts.map +0 -1
- package/dist/migration/to/v3.18.2.js +0 -29
- package/dist/migration/to/v3.19.0.d.ts +0 -5
- package/dist/migration/to/v3.19.0.d.ts.map +0 -1
- package/dist/migration/to/v3.19.0.js +0 -16
- package/dist/migration/to/v3.2.0.d.ts +0 -5
- package/dist/migration/to/v3.2.0.d.ts.map +0 -1
- package/dist/migration/to/v3.2.0.js +0 -16
- package/dist/migration/to/v3.20.0.d.ts +0 -5
- package/dist/migration/to/v3.20.0.d.ts.map +0 -1
- package/dist/migration/to/v3.20.0.js +0 -32
- package/dist/migration/to/v3.21.0.d.ts +0 -5
- package/dist/migration/to/v3.21.0.d.ts.map +0 -1
- package/dist/migration/to/v3.21.0.js +0 -16
- package/dist/migration/to/v3.22.0.d.ts +0 -5
- package/dist/migration/to/v3.22.0.d.ts.map +0 -1
- package/dist/migration/to/v3.22.0.js +0 -38
- package/dist/migration/to/v3.23.0.d.ts +0 -5
- package/dist/migration/to/v3.23.0.d.ts.map +0 -1
- package/dist/migration/to/v3.23.0.js +0 -16
- package/dist/migration/to/v3.24.0.d.ts +0 -5
- package/dist/migration/to/v3.24.0.d.ts.map +0 -1
- package/dist/migration/to/v3.24.0.js +0 -22
- package/dist/migration/to/v3.25.0.d.ts +0 -5
- package/dist/migration/to/v3.25.0.d.ts.map +0 -1
- package/dist/migration/to/v3.25.0.js +0 -20
- package/dist/migration/to/v3.26.0.d.ts +0 -5
- package/dist/migration/to/v3.26.0.d.ts.map +0 -1
- package/dist/migration/to/v3.26.0.js +0 -16
- package/dist/migration/to/v3.27.0.d.ts +0 -5
- package/dist/migration/to/v3.27.0.d.ts.map +0 -1
- package/dist/migration/to/v3.27.0.js +0 -16
- package/dist/migration/to/v3.28.0.d.ts +0 -5
- package/dist/migration/to/v3.28.0.d.ts.map +0 -1
- package/dist/migration/to/v3.28.0.js +0 -16
- package/dist/migration/to/v3.29.0.d.ts +0 -5
- package/dist/migration/to/v3.29.0.d.ts.map +0 -1
- package/dist/migration/to/v3.29.0.js +0 -16
- package/dist/migration/to/v3.3.0.d.ts +0 -5
- package/dist/migration/to/v3.3.0.d.ts.map +0 -1
- package/dist/migration/to/v3.3.0.js +0 -22
- package/dist/migration/to/v3.30.0.d.ts +0 -5
- package/dist/migration/to/v3.30.0.d.ts.map +0 -1
- package/dist/migration/to/v3.30.0.js +0 -16
- package/dist/migration/to/v3.31.0.d.ts +0 -5
- package/dist/migration/to/v3.31.0.d.ts.map +0 -1
- package/dist/migration/to/v3.31.0.js +0 -42
- package/dist/migration/to/v3.32.0.d.ts +0 -5
- package/dist/migration/to/v3.32.0.d.ts.map +0 -1
- package/dist/migration/to/v3.32.0.js +0 -97
- package/dist/migration/to/v3.33.0.d.ts +0 -5
- package/dist/migration/to/v3.33.0.d.ts.map +0 -1
- package/dist/migration/to/v3.33.0.js +0 -16
- package/dist/migration/to/v3.34.0.d.ts +0 -7
- package/dist/migration/to/v3.34.0.d.ts.map +0 -1
- package/dist/migration/to/v3.34.0.js +0 -150
- package/dist/migration/to/v3.35.0.d.ts +0 -5
- package/dist/migration/to/v3.35.0.d.ts.map +0 -1
- package/dist/migration/to/v3.35.0.js +0 -16
- package/dist/migration/to/v3.36.0.d.ts +0 -5
- package/dist/migration/to/v3.36.0.d.ts.map +0 -1
- package/dist/migration/to/v3.36.0.js +0 -29
- package/dist/migration/to/v3.37.0.d.ts +0 -5
- package/dist/migration/to/v3.37.0.d.ts.map +0 -1
- package/dist/migration/to/v3.37.0.js +0 -16
- package/dist/migration/to/v3.38.0.d.ts +0 -5
- package/dist/migration/to/v3.38.0.d.ts.map +0 -1
- package/dist/migration/to/v3.38.0.js +0 -16
- package/dist/migration/to/v3.39.0.d.ts +0 -5
- package/dist/migration/to/v3.39.0.d.ts.map +0 -1
- package/dist/migration/to/v3.39.0.js +0 -54
- package/dist/migration/to/v3.4.0.d.ts +0 -5
- package/dist/migration/to/v3.4.0.d.ts.map +0 -1
- package/dist/migration/to/v3.4.0.js +0 -16
- package/dist/migration/to/v3.40.0.d.ts +0 -5
- package/dist/migration/to/v3.40.0.d.ts.map +0 -1
- package/dist/migration/to/v3.40.0.js +0 -33
- package/dist/migration/to/v3.41.0.d.ts +0 -5
- package/dist/migration/to/v3.41.0.d.ts.map +0 -1
- package/dist/migration/to/v3.41.0.js +0 -16
- package/dist/migration/to/v3.42.0.d.ts +0 -5
- package/dist/migration/to/v3.42.0.d.ts.map +0 -1
- package/dist/migration/to/v3.42.0.js +0 -16
- package/dist/migration/to/v3.43.0.d.ts +0 -5
- package/dist/migration/to/v3.43.0.d.ts.map +0 -1
- package/dist/migration/to/v3.43.0.js +0 -16
- package/dist/migration/to/v3.44.0.d.ts +0 -5
- package/dist/migration/to/v3.44.0.d.ts.map +0 -1
- package/dist/migration/to/v3.44.0.js +0 -16
- package/dist/migration/to/v3.45.0.d.ts +0 -5
- package/dist/migration/to/v3.45.0.d.ts.map +0 -1
- package/dist/migration/to/v3.45.0.js +0 -16
- package/dist/migration/to/v3.46.0.d.ts +0 -5
- package/dist/migration/to/v3.46.0.d.ts.map +0 -1
- package/dist/migration/to/v3.46.0.js +0 -37
- package/dist/migration/to/v3.47.0.d.ts +0 -5
- package/dist/migration/to/v3.47.0.d.ts.map +0 -1
- package/dist/migration/to/v3.47.0.js +0 -16
- package/dist/migration/to/v3.48.0.d.ts +0 -5
- package/dist/migration/to/v3.48.0.d.ts.map +0 -1
- package/dist/migration/to/v3.48.0.js +0 -16
- package/dist/migration/to/v3.49.0.d.ts +0 -5
- package/dist/migration/to/v3.49.0.d.ts.map +0 -1
- package/dist/migration/to/v3.49.0.js +0 -16
- package/dist/migration/to/v3.5.0.d.ts +0 -5
- package/dist/migration/to/v3.5.0.d.ts.map +0 -1
- package/dist/migration/to/v3.5.0.js +0 -16
- package/dist/migration/to/v3.5.1.d.ts +0 -5
- package/dist/migration/to/v3.5.1.d.ts.map +0 -1
- package/dist/migration/to/v3.5.1.js +0 -16
- package/dist/migration/to/v3.50.0.d.ts +0 -5
- package/dist/migration/to/v3.50.0.d.ts.map +0 -1
- package/dist/migration/to/v3.50.0.js +0 -16
- package/dist/migration/to/v3.6.0.d.ts +0 -5
- package/dist/migration/to/v3.6.0.d.ts.map +0 -1
- package/dist/migration/to/v3.6.0.js +0 -16
- package/dist/migration/to/v3.7.0.d.ts +0 -5
- package/dist/migration/to/v3.7.0.d.ts.map +0 -1
- package/dist/migration/to/v3.7.0.js +0 -16
- package/dist/migration/to/v3.8.0.d.ts +0 -5
- package/dist/migration/to/v3.8.0.d.ts.map +0 -1
- package/dist/migration/to/v3.8.0.js +0 -16
- package/dist/migration/to/v3.9.0.d.ts +0 -5
- package/dist/migration/to/v3.9.0.d.ts.map +0 -1
- package/dist/migration/to/v3.9.0.js +0 -84
- package/dist/migration/types.d.ts +0 -21
- package/dist/migration/types.d.ts.map +0 -1
- package/dist/migration/types.js +0 -5
- package/dist/migration/utils.d.ts +0 -3
- package/dist/migration/utils.d.ts.map +0 -1
- package/dist/migration/utils.js +0 -13
- package/dist/mocks.d.ts +0 -14
- package/dist/mocks.d.ts.map +0 -1
- package/dist/mocks.js +0 -71
- package/dist/models/project-schema.d.ts +0 -36
- package/dist/models/project-schema.d.ts.map +0 -1
- package/dist/models/project-schema.js +0 -98
- package/dist/models/query.d.ts +0 -18
- package/dist/models/query.d.ts.map +0 -1
- package/dist/models/query.js +0 -35
- package/dist/models/service.d.ts +0 -13
- package/dist/models/service.d.ts.map +0 -1
- package/dist/models/service.js +0 -25
- package/dist/models/shape.d.ts +0 -42
- package/dist/models/shape.d.ts.map +0 -1
- package/dist/models/shape.js +0 -86
- package/dist/patterns.d.ts +0 -13
- package/dist/patterns.d.ts.map +0 -1
- package/dist/patterns.js +0 -5
- package/dist/project-schema/index.d.ts +0 -185
- package/dist/project-schema/index.d.ts.map +0 -1
- package/dist/project-schema/index.js +0 -879
- package/dist/project-schema/latest.d.ts +0 -2033
- package/dist/project-schema/latest.d.ts.map +0 -1
- package/dist/project-schema/latest.js +0 -5
- package/dist/project-schema/migrate.d.ts +0 -5
- package/dist/project-schema/migrate.d.ts.map +0 -1
- package/dist/project-schema/migrate.js +0 -201
- package/dist/project-schema/v1.0.0.d.ts +0 -300
- package/dist/project-schema/v1.0.0.d.ts.map +0 -1
- package/dist/project-schema/v1.0.0.js +0 -5
- package/dist/project-schema/v3.0.0.d.ts +0 -479
- package/dist/project-schema/v3.0.0.d.ts.map +0 -1
- package/dist/project-schema/v3.0.0.js +0 -5
- package/dist/project-schema/v3.1.0.d.ts +0 -622
- package/dist/project-schema/v3.1.0.d.ts.map +0 -1
- package/dist/project-schema/v3.1.0.js +0 -5
- package/dist/project-schema/v3.10.0.d.ts +0 -1202
- package/dist/project-schema/v3.10.0.d.ts.map +0 -1
- package/dist/project-schema/v3.10.0.js +0 -5
- package/dist/project-schema/v3.11.0.d.ts +0 -1211
- package/dist/project-schema/v3.11.0.d.ts.map +0 -1
- package/dist/project-schema/v3.11.0.js +0 -5
- package/dist/project-schema/v3.12.0.d.ts +0 -1215
- package/dist/project-schema/v3.12.0.d.ts.map +0 -1
- package/dist/project-schema/v3.12.0.js +0 -5
- package/dist/project-schema/v3.12.1.d.ts +0 -1274
- package/dist/project-schema/v3.12.1.d.ts.map +0 -1
- package/dist/project-schema/v3.12.1.js +0 -5
- package/dist/project-schema/v3.12.2.d.ts +0 -1284
- package/dist/project-schema/v3.12.2.d.ts.map +0 -1
- package/dist/project-schema/v3.12.2.js +0 -5
- package/dist/project-schema/v3.12.3.d.ts +0 -1307
- package/dist/project-schema/v3.12.3.d.ts.map +0 -1
- package/dist/project-schema/v3.12.3.js +0 -5
- package/dist/project-schema/v3.13.0.d.ts +0 -1318
- package/dist/project-schema/v3.13.0.d.ts.map +0 -1
- package/dist/project-schema/v3.13.0.js +0 -5
- package/dist/project-schema/v3.13.1.d.ts +0 -1413
- package/dist/project-schema/v3.13.1.d.ts.map +0 -1
- package/dist/project-schema/v3.13.1.js +0 -5
- package/dist/project-schema/v3.14.0.d.ts +0 -1437
- package/dist/project-schema/v3.14.0.d.ts.map +0 -1
- package/dist/project-schema/v3.14.0.js +0 -5
- package/dist/project-schema/v3.15.0.d.ts +0 -1459
- package/dist/project-schema/v3.15.0.d.ts.map +0 -1
- package/dist/project-schema/v3.15.0.js +0 -5
- package/dist/project-schema/v3.16.0.d.ts +0 -1471
- package/dist/project-schema/v3.16.0.d.ts.map +0 -1
- package/dist/project-schema/v3.16.0.js +0 -5
- package/dist/project-schema/v3.17.0.d.ts +0 -1468
- package/dist/project-schema/v3.17.0.d.ts.map +0 -1
- package/dist/project-schema/v3.17.0.js +0 -5
- package/dist/project-schema/v3.17.1.d.ts +0 -1469
- package/dist/project-schema/v3.17.1.d.ts.map +0 -1
- package/dist/project-schema/v3.17.1.js +0 -5
- package/dist/project-schema/v3.18.0.d.ts +0 -1334
- package/dist/project-schema/v3.18.0.d.ts.map +0 -1
- package/dist/project-schema/v3.18.0.js +0 -5
- package/dist/project-schema/v3.18.1.d.ts +0 -1333
- package/dist/project-schema/v3.18.1.d.ts.map +0 -1
- package/dist/project-schema/v3.18.1.js +0 -5
- package/dist/project-schema/v3.18.2.d.ts +0 -1333
- package/dist/project-schema/v3.18.2.d.ts.map +0 -1
- package/dist/project-schema/v3.18.2.js +0 -5
- package/dist/project-schema/v3.19.0.d.ts +0 -1337
- package/dist/project-schema/v3.19.0.d.ts.map +0 -1
- package/dist/project-schema/v3.19.0.js +0 -5
- package/dist/project-schema/v3.2.0.d.ts +0 -633
- package/dist/project-schema/v3.2.0.d.ts.map +0 -1
- package/dist/project-schema/v3.2.0.js +0 -5
- package/dist/project-schema/v3.20.0.d.ts +0 -1337
- package/dist/project-schema/v3.20.0.d.ts.map +0 -1
- package/dist/project-schema/v3.20.0.js +0 -5
- package/dist/project-schema/v3.21.0.d.ts +0 -1339
- package/dist/project-schema/v3.21.0.d.ts.map +0 -1
- package/dist/project-schema/v3.21.0.js +0 -5
- package/dist/project-schema/v3.22.0.d.ts +0 -1345
- package/dist/project-schema/v3.22.0.d.ts.map +0 -1
- package/dist/project-schema/v3.22.0.js +0 -5
- package/dist/project-schema/v3.23.0.d.ts +0 -1377
- package/dist/project-schema/v3.23.0.d.ts.map +0 -1
- package/dist/project-schema/v3.23.0.js +0 -5
- package/dist/project-schema/v3.24.0.d.ts +0 -1365
- package/dist/project-schema/v3.24.0.d.ts.map +0 -1
- package/dist/project-schema/v3.24.0.js +0 -5
- package/dist/project-schema/v3.25.0.d.ts +0 -1364
- package/dist/project-schema/v3.25.0.d.ts.map +0 -1
- package/dist/project-schema/v3.25.0.js +0 -5
- package/dist/project-schema/v3.26.0.d.ts +0 -1389
- package/dist/project-schema/v3.26.0.d.ts.map +0 -1
- package/dist/project-schema/v3.26.0.js +0 -5
- package/dist/project-schema/v3.27.0.d.ts +0 -1398
- package/dist/project-schema/v3.27.0.d.ts.map +0 -1
- package/dist/project-schema/v3.27.0.js +0 -5
- package/dist/project-schema/v3.28.0.d.ts +0 -1417
- package/dist/project-schema/v3.28.0.d.ts.map +0 -1
- package/dist/project-schema/v3.28.0.js +0 -5
- package/dist/project-schema/v3.29.0.d.ts +0 -1424
- package/dist/project-schema/v3.29.0.d.ts.map +0 -1
- package/dist/project-schema/v3.29.0.js +0 -5
- package/dist/project-schema/v3.3.0.d.ts +0 -633
- package/dist/project-schema/v3.3.0.d.ts.map +0 -1
- package/dist/project-schema/v3.3.0.js +0 -5
- package/dist/project-schema/v3.30.0.d.ts +0 -1417
- package/dist/project-schema/v3.30.0.d.ts.map +0 -1
- package/dist/project-schema/v3.30.0.js +0 -5
- package/dist/project-schema/v3.31.0.d.ts +0 -1449
- package/dist/project-schema/v3.31.0.d.ts.map +0 -1
- package/dist/project-schema/v3.31.0.js +0 -5
- package/dist/project-schema/v3.32.0.d.ts +0 -1440
- package/dist/project-schema/v3.32.0.d.ts.map +0 -1
- package/dist/project-schema/v3.32.0.js +0 -5
- package/dist/project-schema/v3.33.0.d.ts +0 -1446
- package/dist/project-schema/v3.33.0.d.ts.map +0 -1
- package/dist/project-schema/v3.33.0.js +0 -5
- package/dist/project-schema/v3.34.0.d.ts +0 -1446
- package/dist/project-schema/v3.34.0.d.ts.map +0 -1
- package/dist/project-schema/v3.34.0.js +0 -5
- package/dist/project-schema/v3.35.0.d.ts +0 -1465
- package/dist/project-schema/v3.35.0.d.ts.map +0 -1
- package/dist/project-schema/v3.35.0.js +0 -5
- package/dist/project-schema/v3.36.0.d.ts +0 -1471
- package/dist/project-schema/v3.36.0.d.ts.map +0 -1
- package/dist/project-schema/v3.36.0.js +0 -5
- package/dist/project-schema/v3.37.0.d.ts +0 -1523
- package/dist/project-schema/v3.37.0.d.ts.map +0 -1
- package/dist/project-schema/v3.37.0.js +0 -5
- package/dist/project-schema/v3.38.0.d.ts +0 -1523
- package/dist/project-schema/v3.38.0.d.ts.map +0 -1
- package/dist/project-schema/v3.38.0.js +0 -5
- package/dist/project-schema/v3.39.0.d.ts +0 -1530
- package/dist/project-schema/v3.39.0.d.ts.map +0 -1
- package/dist/project-schema/v3.39.0.js +0 -5
- package/dist/project-schema/v3.4.0.d.ts +0 -625
- package/dist/project-schema/v3.4.0.d.ts.map +0 -1
- package/dist/project-schema/v3.4.0.js +0 -5
- package/dist/project-schema/v3.40.0.d.ts +0 -1531
- package/dist/project-schema/v3.40.0.d.ts.map +0 -1
- package/dist/project-schema/v3.40.0.js +0 -5
- package/dist/project-schema/v3.41.0.d.ts +0 -1531
- package/dist/project-schema/v3.41.0.d.ts.map +0 -1
- package/dist/project-schema/v3.41.0.js +0 -5
- package/dist/project-schema/v3.42.0.d.ts +0 -1535
- package/dist/project-schema/v3.42.0.d.ts.map +0 -1
- package/dist/project-schema/v3.42.0.js +0 -5
- package/dist/project-schema/v3.43.0.d.ts +0 -1537
- package/dist/project-schema/v3.43.0.d.ts.map +0 -1
- package/dist/project-schema/v3.43.0.js +0 -5
- package/dist/project-schema/v3.44.0.d.ts +0 -1622
- package/dist/project-schema/v3.44.0.d.ts.map +0 -1
- package/dist/project-schema/v3.44.0.js +0 -5
- package/dist/project-schema/v3.45.0.d.ts +0 -1651
- package/dist/project-schema/v3.45.0.d.ts.map +0 -1
- package/dist/project-schema/v3.45.0.js +0 -5
- package/dist/project-schema/v3.46.0.d.ts +0 -1704
- package/dist/project-schema/v3.46.0.d.ts.map +0 -1
- package/dist/project-schema/v3.46.0.js +0 -5
- package/dist/project-schema/v3.47.0.d.ts +0 -1737
- package/dist/project-schema/v3.47.0.d.ts.map +0 -1
- package/dist/project-schema/v3.47.0.js +0 -5
- package/dist/project-schema/v3.48.0.d.ts +0 -1990
- package/dist/project-schema/v3.48.0.d.ts.map +0 -1
- package/dist/project-schema/v3.48.0.js +0 -5
- package/dist/project-schema/v3.49.0.d.ts +0 -1999
- package/dist/project-schema/v3.49.0.d.ts.map +0 -1
- package/dist/project-schema/v3.49.0.js +0 -5
- package/dist/project-schema/v3.5.0.d.ts +0 -650
- package/dist/project-schema/v3.5.0.d.ts.map +0 -1
- package/dist/project-schema/v3.5.0.js +0 -5
- package/dist/project-schema/v3.5.1.d.ts +0 -650
- package/dist/project-schema/v3.5.1.d.ts.map +0 -1
- package/dist/project-schema/v3.5.1.js +0 -5
- package/dist/project-schema/v3.50.0.d.ts +0 -2033
- package/dist/project-schema/v3.50.0.d.ts.map +0 -1
- package/dist/project-schema/v3.50.0.js +0 -5
- package/dist/project-schema/v3.6.0.d.ts +0 -659
- package/dist/project-schema/v3.6.0.d.ts.map +0 -1
- package/dist/project-schema/v3.6.0.js +0 -5
- package/dist/project-schema/v3.7.0.d.ts +0 -962
- package/dist/project-schema/v3.7.0.d.ts.map +0 -1
- package/dist/project-schema/v3.7.0.js +0 -5
- package/dist/project-schema/v3.8.0.d.ts +0 -980
- package/dist/project-schema/v3.8.0.d.ts.map +0 -1
- package/dist/project-schema/v3.8.0.js +0 -5
- package/dist/project-schema/v3.9.0.d.ts +0 -1179
- package/dist/project-schema/v3.9.0.d.ts.map +0 -1
- package/dist/project-schema/v3.9.0.js +0 -5
- package/dist/project-schema/v4.0.0.d.ts +0 -1329
- package/dist/project-schema/v4.0.0.d.ts.map +0 -1
- package/dist/project-schema/v4.0.0.js +0 -5
- package/dist/refs.d.ts +0 -228
- package/dist/refs.d.ts.map +0 -1
- package/dist/refs.js +0 -754
- package/dist/relationships.d.ts +0 -37
- package/dist/relationships.d.ts.map +0 -1
- package/dist/relationships.js +0 -243
- package/dist/scalars.d.ts +0 -3
- package/dist/scalars.d.ts.map +0 -1
- package/dist/scalars.js +0 -11
- package/dist/schema-transform.d.ts +0 -4
- package/dist/schema-transform.d.ts.map +0 -1
- package/dist/schema-transform.js +0 -47
- package/dist/schema-util.d.ts +0 -220
- package/dist/schema-util.d.ts.map +0 -1
- package/dist/schema-util.js +0 -1247
- package/dist/schemas/index.d.ts +0 -5
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/index.js +0 -96
- package/dist/schemas/index.ts +0 -152
- package/dist/services.d.ts +0 -55
- package/dist/services.d.ts.map +0 -1
- package/dist/services.js +0 -168
- package/dist/taxonomies.d.ts +0 -16
- package/dist/taxonomies.d.ts.map +0 -1
- package/dist/taxonomies.js +0 -41
- package/dist/template-shapes/index.d.ts +0 -8
- package/dist/template-shapes/index.d.ts.map +0 -1
- package/dist/template-shapes/index.js +0 -43
- package/dist/template-shapes/templates.d.ts +0 -42
- package/dist/template-shapes/templates.d.ts.map +0 -1
- package/dist/template-shapes/templates.js +0 -423
- package/dist/template-shapes/types.d.ts +0 -16
- package/dist/template-shapes/types.d.ts.map +0 -1
- package/dist/template-shapes/types.js +0 -13
- package/dist/template-shapes/where.d.ts +0 -38
- package/dist/template-shapes/where.d.ts.map +0 -1
- package/dist/template-shapes/where.js +0 -472
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -27
- package/dist/types/types.d.ts +0 -211
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/types.js +0 -60
- package/dist/types/utils.d.ts +0 -116
- package/dist/types/utils.d.ts.map +0 -1
- package/dist/types/utils.js +0 -364
- package/dist/unions.d.ts +0 -28
- package/dist/unions.d.ts.map +0 -1
- package/dist/unions.js +0 -137
- package/dist/user-schema.d.ts +0 -39
- package/dist/user-schema.d.ts.map +0 -1
- package/dist/user-schema.js +0 -5
- package/dist/util/ai-tools.d.ts +0 -4
- package/dist/util/ai-tools.d.ts.map +0 -1
- package/dist/util/ai-tools.js +0 -15
- package/dist/util/api-indexing.d.ts +0 -10
- package/dist/util/api-indexing.d.ts.map +0 -1
- package/dist/util/api-indexing.js +0 -75
- package/dist/util/detect-cycles.d.ts +0 -8
- package/dist/util/detect-cycles.d.ts.map +0 -1
- package/dist/util/detect-cycles.js +0 -54
- package/dist/util/find-shape-at-path.d.ts +0 -22
- package/dist/util/find-shape-at-path.d.ts.map +0 -1
- package/dist/util/find-shape-at-path.js +0 -61
- package/dist/util/form-config.d.ts +0 -12
- package/dist/util/form-config.d.ts.map +0 -1
- package/dist/util/form-config.js +0 -79
- package/dist/util/get-conflicting-properties.d.ts +0 -7
- package/dist/util/get-conflicting-properties.d.ts.map +0 -1
- package/dist/util/get-conflicting-properties.js +0 -59
- package/dist/util/get-return-shape.d.ts +0 -5
- package/dist/util/get-return-shape.d.ts.map +0 -1
- package/dist/util/get-return-shape.js +0 -38
- package/dist/util/has-arg.d.ts +0 -5
- package/dist/util/has-arg.d.ts.map +0 -1
- package/dist/util/has-arg.js +0 -20
- package/dist/util/index.d.ts +0 -11
- package/dist/util/index.d.ts.map +0 -1
- package/dist/util/index.js +0 -115
- package/dist/util/merge.d.ts +0 -16
- package/dist/util/merge.d.ts.map +0 -1
- package/dist/util/merge.js +0 -307
- package/dist/util/patch-schema.d.ts +0 -9
- package/dist/util/patch-schema.d.ts.map +0 -1
- package/dist/util/patch-schema.js +0 -52
- package/dist/validate.d.ts +0 -71
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -1117
- package/dist/versions.d.ts +0 -5
- package/dist/versions.d.ts.map +0 -1
- package/dist/versions.js +0 -17
- package/dist/workflows.d.ts +0 -15
- package/dist/workflows.d.ts.map +0 -1
- package/dist/workflows.js +0 -81
- package/es/agents.js +0 -51
- package/es/api-version.js +0 -17
- package/es/auth-schemas.js +0 -1
- package/es/builtin-schema.js +0 -671
- package/es/content-schema-transform.js +0 -192
- package/es/create-input-schema.js +0 -67
- package/es/enum.js +0 -9
- package/es/flatten-templates.js +0 -23
- package/es/get-is-leaf.js +0 -52
- package/es/index.js +0 -33
- package/es/interfaces.js +0 -85
- package/es/layers/layers.js +0 -311
- package/es/layers/refs.js +0 -256
- package/es/layers/type-utils.js +0 -138
- package/es/layers/visitor.js +0 -35
- package/es/migration/index.js +0 -120
- package/es/migration/to/utils/v3.34.0-utils.js +0 -0
- package/es/migration/to/v3.0.0.js +0 -256
- package/es/migration/to/v3.1.0.js +0 -200
- package/es/migration/to/v3.10.0.js +0 -84
- package/es/migration/to/v3.11.0.js +0 -90
- package/es/migration/to/v3.12.0.js +0 -10
- package/es/migration/to/v3.12.1.js +0 -10
- package/es/migration/to/v3.12.2.js +0 -10
- package/es/migration/to/v3.12.3.js +0 -76
- package/es/migration/to/v3.13.0.js +0 -19
- package/es/migration/to/v3.14.0.js +0 -10
- package/es/migration/to/v3.15.0.js +0 -10
- package/es/migration/to/v3.16.0.js +0 -10
- package/es/migration/to/v3.17.0.js +0 -27
- package/es/migration/to/v3.17.1.js +0 -10
- package/es/migration/to/v3.18.0.js +0 -64
- package/es/migration/to/v3.18.1.js +0 -15
- package/es/migration/to/v3.18.2.js +0 -22
- package/es/migration/to/v3.19.0.js +0 -10
- package/es/migration/to/v3.2.0.js +0 -10
- package/es/migration/to/v3.20.0.js +0 -25
- package/es/migration/to/v3.21.0.js +0 -10
- package/es/migration/to/v3.22.0.js +0 -31
- package/es/migration/to/v3.23.0.js +0 -10
- package/es/migration/to/v3.24.0.js +0 -16
- package/es/migration/to/v3.25.0.js +0 -14
- package/es/migration/to/v3.26.0.js +0 -10
- package/es/migration/to/v3.27.0.js +0 -10
- package/es/migration/to/v3.28.0.js +0 -10
- package/es/migration/to/v3.29.0.js +0 -10
- package/es/migration/to/v3.3.0.js +0 -16
- package/es/migration/to/v3.30.0.js +0 -10
- package/es/migration/to/v3.31.0.js +0 -35
- package/es/migration/to/v3.32.0.js +0 -91
- package/es/migration/to/v3.33.0.js +0 -10
- package/es/migration/to/v3.34.0.js +0 -142
- package/es/migration/to/v3.35.0.js +0 -10
- package/es/migration/to/v3.36.0.js +0 -22
- package/es/migration/to/v3.37.0.js +0 -10
- package/es/migration/to/v3.38.0.js +0 -10
- package/es/migration/to/v3.39.0.js +0 -48
- package/es/migration/to/v3.4.0.js +0 -10
- package/es/migration/to/v3.40.0.js +0 -26
- package/es/migration/to/v3.41.0.js +0 -10
- package/es/migration/to/v3.42.0.js +0 -10
- package/es/migration/to/v3.43.0.js +0 -10
- package/es/migration/to/v3.44.0.js +0 -10
- package/es/migration/to/v3.45.0.js +0 -10
- package/es/migration/to/v3.46.0.js +0 -31
- package/es/migration/to/v3.47.0.js +0 -10
- package/es/migration/to/v3.48.0.js +0 -10
- package/es/migration/to/v3.49.0.js +0 -10
- package/es/migration/to/v3.5.0.js +0 -10
- package/es/migration/to/v3.5.1.js +0 -10
- package/es/migration/to/v3.50.0.js +0 -10
- package/es/migration/to/v3.6.0.js +0 -10
- package/es/migration/to/v3.7.0.js +0 -10
- package/es/migration/to/v3.8.0.js +0 -10
- package/es/migration/to/v3.9.0.js +0 -77
- package/es/migration/types.js +0 -1
- package/es/migration/utils.js +0 -6
- package/es/mocks.js +0 -62
- package/es/models/project-schema.js +0 -90
- package/es/models/query.js +0 -28
- package/es/models/service.js +0 -18
- package/es/models/shape.js +0 -79
- package/es/patterns.js +0 -1
- package/es/project-schema/index.js +0 -138
- package/es/project-schema/latest.js +0 -1
- package/es/project-schema/migrate.js +0 -195
- package/es/project-schema/v1.0.0.js +0 -1
- package/es/project-schema/v3.0.0.js +0 -1
- package/es/project-schema/v3.1.0.js +0 -1
- package/es/project-schema/v3.10.0.js +0 -1
- package/es/project-schema/v3.11.0.js +0 -1
- package/es/project-schema/v3.12.0.js +0 -1
- package/es/project-schema/v3.12.1.js +0 -1
- package/es/project-schema/v3.12.2.js +0 -1
- package/es/project-schema/v3.12.3.js +0 -1
- package/es/project-schema/v3.13.0.js +0 -1
- package/es/project-schema/v3.13.1.js +0 -1
- package/es/project-schema/v3.14.0.js +0 -1
- package/es/project-schema/v3.15.0.js +0 -1
- package/es/project-schema/v3.16.0.js +0 -1
- package/es/project-schema/v3.17.0.js +0 -1
- package/es/project-schema/v3.17.1.js +0 -1
- package/es/project-schema/v3.18.0.js +0 -1
- package/es/project-schema/v3.18.1.js +0 -1
- package/es/project-schema/v3.18.2.js +0 -1
- package/es/project-schema/v3.19.0.js +0 -1
- package/es/project-schema/v3.2.0.js +0 -1
- package/es/project-schema/v3.20.0.js +0 -1
- package/es/project-schema/v3.21.0.js +0 -1
- package/es/project-schema/v3.22.0.js +0 -1
- package/es/project-schema/v3.23.0.js +0 -1
- package/es/project-schema/v3.24.0.js +0 -1
- package/es/project-schema/v3.25.0.js +0 -1
- package/es/project-schema/v3.26.0.js +0 -1
- package/es/project-schema/v3.27.0.js +0 -1
- package/es/project-schema/v3.28.0.js +0 -1
- package/es/project-schema/v3.29.0.js +0 -1
- package/es/project-schema/v3.3.0.js +0 -1
- package/es/project-schema/v3.30.0.js +0 -1
- package/es/project-schema/v3.31.0.js +0 -1
- package/es/project-schema/v3.32.0.js +0 -1
- package/es/project-schema/v3.33.0.js +0 -1
- package/es/project-schema/v3.34.0.js +0 -1
- package/es/project-schema/v3.35.0.js +0 -1
- package/es/project-schema/v3.36.0.js +0 -1
- package/es/project-schema/v3.37.0.js +0 -1
- package/es/project-schema/v3.38.0.js +0 -1
- package/es/project-schema/v3.39.0.js +0 -1
- package/es/project-schema/v3.4.0.js +0 -1
- package/es/project-schema/v3.40.0.js +0 -1
- package/es/project-schema/v3.41.0.js +0 -1
- package/es/project-schema/v3.42.0.js +0 -1
- package/es/project-schema/v3.43.0.js +0 -1
- package/es/project-schema/v3.44.0.js +0 -1
- package/es/project-schema/v3.45.0.js +0 -1
- package/es/project-schema/v3.46.0.js +0 -1
- package/es/project-schema/v3.47.0.js +0 -1
- package/es/project-schema/v3.48.0.js +0 -1
- package/es/project-schema/v3.49.0.js +0 -1
- package/es/project-schema/v3.5.0.js +0 -1
- package/es/project-schema/v3.5.1.js +0 -1
- package/es/project-schema/v3.50.0.js +0 -1
- package/es/project-schema/v3.6.0.js +0 -1
- package/es/project-schema/v3.7.0.js +0 -1
- package/es/project-schema/v3.8.0.js +0 -1
- package/es/project-schema/v3.9.0.js +0 -1
- package/es/project-schema/v4.0.0.js +0 -1
- package/es/refs.js +0 -690
- package/es/relationships.js +0 -229
- package/es/scalars.js +0 -4
- package/es/schema-transform.js +0 -40
- package/es/schema-util.js +0 -1166
- package/es/schemas/index.js +0 -78
- package/es/schemas/index.ts +0 -152
- package/es/services.js +0 -154
- package/es/taxonomies.js +0 -34
- package/es/template-shapes/index.js +0 -36
- package/es/template-shapes/templates.js +0 -406
- package/es/template-shapes/types.js +0 -7
- package/es/template-shapes/where.js +0 -459
- package/es/types/index.js +0 -2
- package/es/types/types.js +0 -62
- package/es/types/utils.js +0 -298
- package/es/unions.js +0 -123
- package/es/user-schema.js +0 -1
- package/es/util/ai-tools.js +0 -8
- package/es/util/api-indexing.js +0 -66
- package/es/util/detect-cycles.js +0 -48
- package/es/util/find-shape-at-path.js +0 -55
- package/es/util/form-config.js +0 -73
- package/es/util/get-conflicting-properties.js +0 -54
- package/es/util/get-return-shape.js +0 -31
- package/es/util/has-arg.js +0 -13
- package/es/util/index.js +0 -10
- package/es/util/merge.js +0 -293
- package/es/util/patch-schema.js +0 -44
- package/es/validate.js +0 -1102
- package/es/versions.js +0 -4
- package/es/workflows.js +0 -68
- /package/dist/{schemas → cjs/src/schemas}/auth-schemas.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/experimental.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/latest.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v1.0.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.0.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.1.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.10.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.11.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.1.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.2.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.3.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.13.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.14.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.15.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.16.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.17.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.17.1.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.18.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.18.1.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.18.2.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.19.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.2.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.20.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.21.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.22.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.23.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.24.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.25.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.26.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.27.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.28.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.29.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.3.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.30.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.31.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.32.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.33.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.34.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.35.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.36.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.37.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.38.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.39.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.4.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.40.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.41.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.42.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.43.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.44.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.45.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.46.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.47.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.48.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.49.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.5.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.5.1.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.50.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.6.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.7.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.8.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.9.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema/v4.0.0.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/project-schema.json +0 -0
- /package/dist/{schemas → cjs/src/schemas}/user-schema.json +0 -0
- /package/{es → dist/esm/src}/schemas/auth-schemas.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/experimental.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/latest.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v1.0.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.0.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.1.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.2.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.3.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.4.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.5.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.5.1.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.6.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.7.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.8.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.9.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v1.0.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.0.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.1.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.10.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.11.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.12.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.12.1.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.12.2.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.12.3.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.13.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.14.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.15.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.16.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.17.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.17.1.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.18.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.18.1.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.18.2.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.19.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.2.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.20.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.21.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.22.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.23.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.24.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.25.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.26.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.27.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.28.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.29.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.3.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.30.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.31.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.32.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.33.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.34.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.35.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.36.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.37.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.38.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.39.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.4.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.40.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.41.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.42.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.43.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.44.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.45.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.46.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.47.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.48.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.49.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.5.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.5.1.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.50.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.6.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.7.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.8.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v3.9.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema/v4.0.0.json +0 -0
- /package/{es → dist/esm/src}/schemas/project-schema.json +0 -0
- /package/{es → dist/esm/src}/schemas/user-schema.json +0 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import unset from "lodash/unset.js";
|
|
2
|
+
import isFunction from "lodash/isFunction.js";
|
|
3
|
+
import uniqBy from "lodash/uniqBy.js";
|
|
4
|
+
import md5 from "blueimp-md5";
|
|
5
|
+
import { pascalCase, isDefined, formatShapeName } from "@takeshape/util";
|
|
6
|
+
import { createSchemaPropertyList, createShape, getAllRefsInShapes } from "../schema-util.js";
|
|
7
|
+
import { workflowsEnabled } from "../api-version.js";
|
|
8
|
+
import { followRef, getRef, getRefOrItemsRef, hasRefProperty, hasResolvableRef, refItemToShape, refItemToNamespacedShapeName } from "../refs.js";
|
|
9
|
+
import { enumerateOneOfKeys, isUnionSchema } from "../unions.js";
|
|
10
|
+
import { isCachedShape, isObjectSchema, isPropertySchemaWithRelationship } from "../types/utils.js";
|
|
11
|
+
import { isEqualRelationship, getRelationship, getRelationshipShapes } from "../relationships.js";
|
|
12
|
+
export const MAX_RELATIONSHIP_DEPTH = 1;
|
|
13
|
+
export const exceededRelationshipDepth = (depth = 0) => depth >= MAX_RELATIONSHIP_DEPTH;
|
|
14
|
+
class ShapeCache {
|
|
15
|
+
thunks = new Map();
|
|
16
|
+
unresolved = new Set();
|
|
17
|
+
has(shapeName) {
|
|
18
|
+
return this.thunks.has(shapeName);
|
|
19
|
+
}
|
|
20
|
+
set(shapeName, thunk) {
|
|
21
|
+
this.thunks.set(shapeName, thunk);
|
|
22
|
+
if (isFunction(thunk)) {
|
|
23
|
+
this.unresolved.add(shapeName);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
resolveAll() {
|
|
27
|
+
while (this.unresolved.size) {
|
|
28
|
+
const shapeName = this.unresolved.values().next().value;
|
|
29
|
+
const thunk = this.thunks.get(shapeName);
|
|
30
|
+
if (isFunction(thunk)) {
|
|
31
|
+
this.thunks.set(shapeName, thunk());
|
|
32
|
+
this.unresolved.delete(shapeName);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const result = {};
|
|
36
|
+
for (const [shapeName, shape] of this.thunks) {
|
|
37
|
+
result[shapeName] = shape;
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export const fieldTypeComparison = {
|
|
43
|
+
id: { comparators: ["eq", "in"], type: "string" },
|
|
44
|
+
boolean: { comparators: ["eq"], type: "boolean" },
|
|
45
|
+
string: { comparators: ["eq", "in", "match", "regexp"], type: "string" },
|
|
46
|
+
date: { comparators: ["eq", "lt", "lte", "gt", "gte"], type: "string" },
|
|
47
|
+
number: { comparators: ["eq", "lt", "lte", "gt", "gte", "in"], type: "number" },
|
|
48
|
+
integer: { comparators: ["eq", "lt", "lte", "gt", "gte", "in"], type: "integer" },
|
|
49
|
+
workflow: { comparators: ["eq", "lt", "lte", "gt", "gte", "in"], type: "string" },
|
|
50
|
+
draftjs: { comparators: ["match"], type: "string" },
|
|
51
|
+
mdx: { comparators: ["match"], type: "string" }
|
|
52
|
+
};
|
|
53
|
+
export const comparatorDescriptions = {
|
|
54
|
+
eq: "Exact match",
|
|
55
|
+
gt: "Greater than",
|
|
56
|
+
gte: "Greater than or equal",
|
|
57
|
+
lt: "Less than",
|
|
58
|
+
lte: "Less than or equal",
|
|
59
|
+
in: "Array of possible exact match values.",
|
|
60
|
+
match: "Full text searching with fuzzy matching.",
|
|
61
|
+
regexp: "Regular expression string matching. Use of * wildcards could degrade performance."
|
|
62
|
+
};
|
|
63
|
+
export const booleanOperators = ["AND", "OR", "NOT"];
|
|
64
|
+
export const boolOpDescriptionMap = {
|
|
65
|
+
AND: "AND takes an array of conditions that must appear in the matching results. Nested boolean operators can be used to create complex filters.",
|
|
66
|
+
OR: "OR takes an array of conditions that should appear in the matching results. Nested boolean operators can be used to create complex filters.",
|
|
67
|
+
NOT: "NOT takes a single condition that must not appear in the matching results."
|
|
68
|
+
};
|
|
69
|
+
function getConflictingProperties(projectSchema, shapes) {
|
|
70
|
+
const conflicts = new Set();
|
|
71
|
+
const allProps = {};
|
|
72
|
+
for (const shape of Object.values(shapes)) {
|
|
73
|
+
for (const [name, prop] of createSchemaPropertyList(projectSchema, shape).getNodes()) {
|
|
74
|
+
if (name in allProps && (allProps[name].type !== prop.type || !isEqualRelationship(allProps[name], prop))) {
|
|
75
|
+
conflicts.add(name);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (isObjectSchema(shape.schema)) {
|
|
79
|
+
Object.assign(allProps, shape.schema.properties);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return conflicts;
|
|
83
|
+
}
|
|
84
|
+
export function getFieldTypeComparison(fieldType) {
|
|
85
|
+
const comparison = fieldTypeComparison[fieldType];
|
|
86
|
+
if (!comparison) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
const { comparators, type } = comparison;
|
|
90
|
+
const result = {};
|
|
91
|
+
for (const op of comparators) {
|
|
92
|
+
const description = comparatorDescriptions[op];
|
|
93
|
+
result[op] = op === "in" ? { type: "array", items: { type }, description } : { description, type };
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
function isId(name) {
|
|
98
|
+
return name === "_id" || name === "_contentTypeId" || name === "_shapeId";
|
|
99
|
+
}
|
|
100
|
+
function isNonRelationshipRef(prop) {
|
|
101
|
+
return Boolean(hasRefProperty(prop) && !getRelationship(prop));
|
|
102
|
+
}
|
|
103
|
+
function getPropType(projectSchema, name, prop) {
|
|
104
|
+
if (prop["@workflow"]) {
|
|
105
|
+
return "workflow";
|
|
106
|
+
}
|
|
107
|
+
if (prop["@tag"] === "draftjs") {
|
|
108
|
+
return "draftjs";
|
|
109
|
+
}
|
|
110
|
+
if (prop["@tag"] === "mdx") {
|
|
111
|
+
return "mdx";
|
|
112
|
+
}
|
|
113
|
+
if (prop.format === "date-time") {
|
|
114
|
+
return "date";
|
|
115
|
+
}
|
|
116
|
+
if (isId(name)) {
|
|
117
|
+
return "id";
|
|
118
|
+
}
|
|
119
|
+
if (isNonRelationshipRef(prop)) {
|
|
120
|
+
const followed = followRef(projectSchema, prop);
|
|
121
|
+
if (followed.enum) {
|
|
122
|
+
return "string";
|
|
123
|
+
}
|
|
124
|
+
return "object";
|
|
125
|
+
}
|
|
126
|
+
return prop.type;
|
|
127
|
+
}
|
|
128
|
+
function truncateNames(names) {
|
|
129
|
+
// For unions of many types hash the names this reduces shape name size while still allowing reuse
|
|
130
|
+
return names.length > 80 ? md5(names) : names;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get a formatted string of related shape names from a property schema with a
|
|
134
|
+
* relationship resolver
|
|
135
|
+
*/
|
|
136
|
+
function getRelationshipShapeName(refs) {
|
|
137
|
+
return refs
|
|
138
|
+
.map(ref => {
|
|
139
|
+
const shapeName = ref.split(":")[1];
|
|
140
|
+
return formatShapeName(shapeName);
|
|
141
|
+
})
|
|
142
|
+
.sort()
|
|
143
|
+
.join("");
|
|
144
|
+
}
|
|
145
|
+
function joinShapeNames(shapes) {
|
|
146
|
+
return shapes.sort().join("");
|
|
147
|
+
}
|
|
148
|
+
function getTypeName(name, prop, shapeName, context) {
|
|
149
|
+
const { projectSchema, relationshipDepth, conflictingProperties } = context;
|
|
150
|
+
let type = getPropType(projectSchema, name, prop);
|
|
151
|
+
if (isId(name)) {
|
|
152
|
+
return `TSWhereID`;
|
|
153
|
+
}
|
|
154
|
+
const relationship = getRelationship(prop);
|
|
155
|
+
if (relationship) {
|
|
156
|
+
const relationshipName = getRelationshipShapeName(relationship.refs);
|
|
157
|
+
if (!relationshipName) {
|
|
158
|
+
throw new Error(`Relationship property "${prop.title ?? ""}" is missing related shapes`);
|
|
159
|
+
}
|
|
160
|
+
const shapeNames = truncateNames(relationshipName);
|
|
161
|
+
return `TSWhere${shapeNames}Relationship`;
|
|
162
|
+
}
|
|
163
|
+
if (isUnionSchema(prop)) {
|
|
164
|
+
if (prop.oneOf.length > 1) {
|
|
165
|
+
const shapeNames = truncateNames(joinShapeNames(enumerateOneOfKeys(projectSchema, prop.oneOf).map(child => child.shapeName)));
|
|
166
|
+
return `TSWhere${shapeNames}Union`;
|
|
167
|
+
}
|
|
168
|
+
type = "object";
|
|
169
|
+
prop = prop.oneOf[0];
|
|
170
|
+
}
|
|
171
|
+
if (type === "object" || type === "array") {
|
|
172
|
+
const prefix = `TS${relationshipDepth >= MAX_RELATIONSHIP_DEPTH ? "Shallow" : ""}Where`;
|
|
173
|
+
const fieldName = `${conflictingProperties?.has(name) ? "_" : ""}${formatShapeName(name)}`;
|
|
174
|
+
const refItem = getRefOrItemsRef(projectSchema, prop);
|
|
175
|
+
const suffix = refItem ? refItemToNamespacedShapeName(refItem) : `${shapeName}${fieldName}`;
|
|
176
|
+
return `${prefix}${suffix}`;
|
|
177
|
+
}
|
|
178
|
+
return `TSWhere${pascalCase(type)}`;
|
|
179
|
+
}
|
|
180
|
+
function skipField({ name, prop, workflowsEnabled, exceededRelationshipDepth, isIndexedShape }) {
|
|
181
|
+
const isRelationship = isPropertySchemaWithRelationship(prop);
|
|
182
|
+
return Boolean(prop["@sensitive"] ??
|
|
183
|
+
(Boolean(prop["@resolver"] && !isIndexedShape && !isRelationship) ||
|
|
184
|
+
Boolean(isRelationship && exceededRelationshipDepth) ||
|
|
185
|
+
Boolean((name === "_enabled" || name === "_enabledAt") && workflowsEnabled)));
|
|
186
|
+
}
|
|
187
|
+
export function getFields(typeName, shapes, context) {
|
|
188
|
+
const { relationshipDepth, booleanOperators, projectSchema } = context;
|
|
189
|
+
const result = {};
|
|
190
|
+
const tooDeep = exceededRelationshipDepth(relationshipDepth);
|
|
191
|
+
const conflictingProperties = shapes.length ? getConflictingProperties(projectSchema, shapes) : undefined;
|
|
192
|
+
const fieldContext = { ...context, conflictingProperties };
|
|
193
|
+
for (const shape of shapes) {
|
|
194
|
+
const nodes = createSchemaPropertyList(projectSchema, shape)
|
|
195
|
+
.filterBy(([name, prop]) => !skipField({
|
|
196
|
+
name,
|
|
197
|
+
prop,
|
|
198
|
+
workflowsEnabled: workflowsEnabled(projectSchema.apiVersion),
|
|
199
|
+
isIndexedShape: isCachedShape(shape),
|
|
200
|
+
exceededRelationshipDepth: exceededRelationshipDepth(relationshipDepth)
|
|
201
|
+
}))
|
|
202
|
+
.getNodes();
|
|
203
|
+
for (const [name, property] of nodes) {
|
|
204
|
+
Object.assign(result, getPropertyComparisonType(name, property, shape.name, fieldContext));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return tooDeep || booleanOperators === false ? result : Object.assign(result, getBooleanOperatorTypes(typeName));
|
|
208
|
+
}
|
|
209
|
+
function getBooleanOperatorTypes(typeName) {
|
|
210
|
+
const result = {};
|
|
211
|
+
for (const op of booleanOperators) {
|
|
212
|
+
const refSchema = { "@ref": `local:${typeName}` };
|
|
213
|
+
result[op] = op === "NOT" ? refSchema : { type: "array", items: refSchema };
|
|
214
|
+
}
|
|
215
|
+
return result;
|
|
216
|
+
}
|
|
217
|
+
export function getPropertyComparisonType(name, prop, shapeName, context) {
|
|
218
|
+
const { shapeCache, projectSchema, relationshipDepth, conflictingProperties } = context;
|
|
219
|
+
if (skipField({
|
|
220
|
+
name,
|
|
221
|
+
prop,
|
|
222
|
+
workflowsEnabled: workflowsEnabled(projectSchema.apiVersion),
|
|
223
|
+
isIndexedShape: isCachedShape(projectSchema.shapes[shapeName]),
|
|
224
|
+
exceededRelationshipDepth: exceededRelationshipDepth(relationshipDepth)
|
|
225
|
+
})) {
|
|
226
|
+
return undefined;
|
|
227
|
+
}
|
|
228
|
+
const fieldType = getPropType(projectSchema, name, prop) ?? "string";
|
|
229
|
+
const typeName = getTypeName(name, prop, shapeName, context);
|
|
230
|
+
const relationship = getRelationship(prop);
|
|
231
|
+
if (hasRefProperty(prop.items ?? prop)) {
|
|
232
|
+
if (!hasResolvableRef(projectSchema, prop.items ?? prop)) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
if (prop.items) {
|
|
236
|
+
prop = { ...prop, items: followRef(projectSchema, prop.items) };
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
prop = followRef(projectSchema, prop);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (!shapeCache.has(typeName) && !projectSchema.shapes[typeName]) {
|
|
243
|
+
shapeCache.set(typeName, () => {
|
|
244
|
+
let props;
|
|
245
|
+
const propOrItems = prop.items ?? prop;
|
|
246
|
+
if (isId(name)) {
|
|
247
|
+
props = getFieldTypeComparison("id");
|
|
248
|
+
}
|
|
249
|
+
else if (relationship) {
|
|
250
|
+
const shapes = getRelationshipShapes(projectSchema.shapes, relationship.refs);
|
|
251
|
+
props = getFields(typeName, shapes, {
|
|
252
|
+
...context,
|
|
253
|
+
relationshipDepth: relationshipDepth + 1
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
else if (isUnionSchema(propOrItems)) {
|
|
257
|
+
const shapes = enumerateOneOfKeys(projectSchema, propOrItems.oneOf).map(option => projectSchema.shapes[option.shapeName]);
|
|
258
|
+
props = getFields(typeName, shapes, {
|
|
259
|
+
...context,
|
|
260
|
+
booleanOperators: false
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
else if (fieldType === "object" || (fieldType === "array" && prop.items?.type === "object")) {
|
|
264
|
+
const properties = prop.items?.properties ?? prop.properties;
|
|
265
|
+
if (properties) {
|
|
266
|
+
props ??= {};
|
|
267
|
+
const fieldContext = {
|
|
268
|
+
...context,
|
|
269
|
+
conflictingProperties: undefined // non-union objects have no conflicts
|
|
270
|
+
};
|
|
271
|
+
for (const propName of Object.keys(properties)) {
|
|
272
|
+
Object.assign(props, getPropertyComparisonType(propName, properties[propName], shapeName, fieldContext));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
// Treat non-object arrays as their base type
|
|
278
|
+
let type;
|
|
279
|
+
if (typeof prop.items?.type === "string") {
|
|
280
|
+
type = prop.items.type;
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
type = fieldType;
|
|
284
|
+
}
|
|
285
|
+
props = getFieldTypeComparison(type);
|
|
286
|
+
}
|
|
287
|
+
return createShape(typeName, {
|
|
288
|
+
type: "object",
|
|
289
|
+
properties: props ?? {}
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
if (shapeCache.has(typeName) || projectSchema.shapes[typeName]) {
|
|
294
|
+
const fieldName = `${conflictingProperties?.has(name) ? `${shapeName}_` : ""}${name}`;
|
|
295
|
+
return {
|
|
296
|
+
[fieldName]: {
|
|
297
|
+
"@ref": `local:${typeName}`
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
function findEmpty(shapes) {
|
|
303
|
+
const empty = new Set();
|
|
304
|
+
for (const [shapeName, shape] of Object.entries(shapes)) {
|
|
305
|
+
if (isObjectSchema(shape.schema) && Object.keys(shape.schema.properties).length === 0) {
|
|
306
|
+
empty.add(shapeName);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return empty;
|
|
310
|
+
}
|
|
311
|
+
function getRefSummary(shapes) {
|
|
312
|
+
const result = {};
|
|
313
|
+
for (const ref of getAllRefsInShapes({ shapes, services: {} })) {
|
|
314
|
+
const path = ref.path.slice(1, ref.path.length - 1);
|
|
315
|
+
if (result[ref.typeName]) {
|
|
316
|
+
result[ref.typeName].push(path);
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
result[ref.typeName] = [path];
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return result;
|
|
323
|
+
}
|
|
324
|
+
function pruneEmpty(shapes) {
|
|
325
|
+
let toPrune = findEmpty(shapes);
|
|
326
|
+
if (toPrune.size) {
|
|
327
|
+
const refSummary = getRefSummary(shapes);
|
|
328
|
+
while (toPrune.size) {
|
|
329
|
+
for (const shapeName of toPrune) {
|
|
330
|
+
unset(shapes, shapeName);
|
|
331
|
+
for (const path of refSummary[shapeName] ?? []) {
|
|
332
|
+
unset(shapes, path);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
toPrune = findEmpty(shapes);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return shapes;
|
|
339
|
+
}
|
|
340
|
+
function getReferencedShape(context) {
|
|
341
|
+
return (prop) => {
|
|
342
|
+
const ref = getRef(context, prop);
|
|
343
|
+
return ref && refItemToShape(context, ref);
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Expand union shapes
|
|
348
|
+
*/
|
|
349
|
+
function expandUnionShapes(projectSchema, shapes) {
|
|
350
|
+
return uniqBy(shapes.flatMap(shape => isUnionSchema(shape.schema) ? shape.schema.oneOf.map(getReferencedShape(projectSchema)).filter(isDefined) : shape), "name");
|
|
351
|
+
}
|
|
352
|
+
export function getWhereShape(projectSchema, selectedShapes) {
|
|
353
|
+
const shapeName = selectedShapes.length === 1 ? `TSWhere${pascalCase(selectedShapes[0].name)}Input` : "TSWhereInput";
|
|
354
|
+
if (projectSchema.shapes[shapeName]) {
|
|
355
|
+
return { shapeName, dependencies: {} };
|
|
356
|
+
}
|
|
357
|
+
const expandedShapes = expandUnionShapes(projectSchema, selectedShapes);
|
|
358
|
+
const isManyContentTypes = expandedShapes.length > 1;
|
|
359
|
+
const shapeCache = new ShapeCache();
|
|
360
|
+
const fields = getFields(shapeName, expandedShapes, {
|
|
361
|
+
projectSchema,
|
|
362
|
+
shapeCache,
|
|
363
|
+
relationshipDepth: 0
|
|
364
|
+
});
|
|
365
|
+
return {
|
|
366
|
+
shapeName,
|
|
367
|
+
dependencies: pruneEmpty({
|
|
368
|
+
[shapeName]: createShape(shapeName, {
|
|
369
|
+
type: "object",
|
|
370
|
+
properties: {
|
|
371
|
+
...fields,
|
|
372
|
+
...(isManyContentTypes && getBooleanOperatorTypes(shapeName))
|
|
373
|
+
}
|
|
374
|
+
}),
|
|
375
|
+
...shapeCache.resolveAll()
|
|
376
|
+
})
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
export function getWhereSearchArg(projectSchema, selectedShapes) {
|
|
380
|
+
const { shapeName, dependencies } = getWhereShape(projectSchema, selectedShapes);
|
|
381
|
+
const schema = {
|
|
382
|
+
type: "object",
|
|
383
|
+
properties: {
|
|
384
|
+
where: {
|
|
385
|
+
"@ref": `local:${shapeName}`,
|
|
386
|
+
description: "The where clause uses the boolean AND, OR, and NOT parameters to construct complex filters based on the values of your fields. It applies an implicit AND to all the top-level keys. To avoid this, use a single OR or NOT key as the only top-level key."
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
return { schema, dependencies };
|
|
391
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const projectSchemaImportOptionalProps = ['projectId', 'locales', 'defaultLocale', 'author'];
|
|
2
|
+
export const legacyProjectSchemaImportOptionalProps = ['created', 'updated', 'version', 'dataKey'];
|
|
3
|
+
/**
|
|
4
|
+
* Types of refs
|
|
5
|
+
*/
|
|
6
|
+
export var RefType;
|
|
7
|
+
(function (RefType) {
|
|
8
|
+
RefType["@ref"] = "@ref";
|
|
9
|
+
RefType["$ref"] = "$ref";
|
|
10
|
+
})(RefType || (RefType = {}));
|
|
11
|
+
/**
|
|
12
|
+
* Types of args
|
|
13
|
+
*/
|
|
14
|
+
export var ArgsType;
|
|
15
|
+
(function (ArgsType) {
|
|
16
|
+
ArgsType["@args"] = "@args";
|
|
17
|
+
ArgsType["args"] = "args";
|
|
18
|
+
})(ArgsType || (ArgsType = {}));
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { isRecord } from "@takeshape/util";
|
|
2
|
+
import isPlainObject from "lodash/isPlainObject.js";
|
|
3
|
+
import isString from "lodash/isString.js";
|
|
4
|
+
import isArray from "lodash/isArray.js";
|
|
5
|
+
import has from "lodash/has.js";
|
|
6
|
+
import isUndefined from "lodash/isUndefined.js";
|
|
7
|
+
import { latestSchemaJson } from "../schemas/index.js";
|
|
8
|
+
import { ArgsType, RefType } from "./types.js";
|
|
9
|
+
/** Resolver Type Utils **/
|
|
10
|
+
/**
|
|
11
|
+
* Only tests that the shape is right, not that the name is correct. That's a job for the validator.
|
|
12
|
+
*/
|
|
13
|
+
export function isBasicResolver(resolver) {
|
|
14
|
+
return isRecord(resolver) && isString(resolver.name);
|
|
15
|
+
}
|
|
16
|
+
export function isServiceResolver(resolver) {
|
|
17
|
+
return isRecord(resolver) && isString(resolver.name) && isString(resolver.service);
|
|
18
|
+
}
|
|
19
|
+
export function isComposeResolver(resolver) {
|
|
20
|
+
return Boolean(isArray(resolver?.compose) &&
|
|
21
|
+
resolver.compose.length &&
|
|
22
|
+
resolver.compose.every(isBasicResolver));
|
|
23
|
+
}
|
|
24
|
+
const { definitions: { takeshapeResolver, shapedbResolver, utilResolver, graphqlResolver, restResolver, awsLambdaResolver } } = latestSchemaJson;
|
|
25
|
+
export function isTakeshapeResolver(resolver) {
|
|
26
|
+
return isBasicResolver(resolver) && takeshapeResolver.properties.name.enum.includes(resolver.name);
|
|
27
|
+
}
|
|
28
|
+
export function isShapedbResolver(resolver) {
|
|
29
|
+
return isBasicResolver(resolver) && shapedbResolver.properties.name.enum.includes(resolver.name);
|
|
30
|
+
}
|
|
31
|
+
export function isGraphqlResolver(resolver) {
|
|
32
|
+
return isBasicResolver(resolver) && graphqlResolver.properties.name.enum.includes(resolver.name);
|
|
33
|
+
}
|
|
34
|
+
export function isRestResolver(resolver) {
|
|
35
|
+
return isBasicResolver(resolver) && restResolver.properties.name.enum.includes(resolver.name);
|
|
36
|
+
}
|
|
37
|
+
export function isAwsLambdaResolver(resolver) {
|
|
38
|
+
return isBasicResolver(resolver) && awsLambdaResolver.properties.name.enum.includes(resolver.name);
|
|
39
|
+
}
|
|
40
|
+
export function isUtilResolver(resolver) {
|
|
41
|
+
return isBasicResolver(resolver) && utilResolver.properties.name.enum.includes(resolver.name);
|
|
42
|
+
}
|
|
43
|
+
export const aiResolverNames = ["ai:generateText", "ai:chat"];
|
|
44
|
+
export function isAIResolverName(name) {
|
|
45
|
+
return name ? aiResolverNames.includes(name) : false;
|
|
46
|
+
}
|
|
47
|
+
export function isAIResolver(resolver) {
|
|
48
|
+
return isBasicResolver(resolver) && isAIResolverName(resolver.name);
|
|
49
|
+
}
|
|
50
|
+
export function isAIAgentStateExecution(agentExecution) {
|
|
51
|
+
return agentExecution.type === "generate" || agentExecution.type === "chat";
|
|
52
|
+
}
|
|
53
|
+
export function isProjectSchemaWithServices(schema) {
|
|
54
|
+
return !isUndefined(schema.services);
|
|
55
|
+
}
|
|
56
|
+
export function containsResolver(resolver, predicate) {
|
|
57
|
+
if (isBasicResolver(resolver)) {
|
|
58
|
+
return predicate(resolver);
|
|
59
|
+
}
|
|
60
|
+
return Boolean(resolver.compose.find(resolver => containsResolver(resolver, predicate)));
|
|
61
|
+
}
|
|
62
|
+
/** Directive Mapping Utils **/
|
|
63
|
+
/**
|
|
64
|
+
* Determine whether the ambiguous Directive structure is a DirectiveMappingMap
|
|
65
|
+
*/
|
|
66
|
+
export function isDirectiveMappingMap(maybeMap) {
|
|
67
|
+
return isPlainObject(maybeMap) && Object.keys(maybeMap).length > 0;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Determine whether the ambiguous Directive structure is a DirectiveMappingArray
|
|
71
|
+
*/
|
|
72
|
+
export function isDirectiveMappingArray(maybeArray) {
|
|
73
|
+
return isArray(maybeArray) && isArray(maybeArray[0]) && isString(maybeArray[0][0]) && isArray(maybeArray[0][1]);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Determine whether the ambiguous Directive structure is a DirectiveConfig array
|
|
77
|
+
*/
|
|
78
|
+
export function isDirectiveConfig(maybeConfig) {
|
|
79
|
+
return isArray(maybeConfig) && isArray(maybeConfig[0]) && isString(maybeConfig[0][0]) && isRecord(maybeConfig[0][1]);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Determine whether a ParameterSerializeOption is a content type serializer
|
|
83
|
+
*/
|
|
84
|
+
export function isParameterSerializeContentOptions(maybeContent) {
|
|
85
|
+
return Boolean(maybeContent.contentType);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Determine whether an unknown variable is a `ParameterOp`
|
|
89
|
+
*/
|
|
90
|
+
export function isParameterOp(maybeOp) {
|
|
91
|
+
const op = maybeOp;
|
|
92
|
+
if (!op.path) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
return isParameterOpNested(op) || isParameterOpMapping(op) || isParameterOpValue(op) || isParameterOpOp(op);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Determine whether a `ParameterOp` is a `ParameterOpNested`
|
|
99
|
+
*/
|
|
100
|
+
export function isParameterOpNested(maybeOp) {
|
|
101
|
+
return Boolean(maybeOp.ops);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Determine whether a `ParameterOp` is a `ParameterOpMapping`
|
|
105
|
+
*/
|
|
106
|
+
export function isParameterOpMapping(maybeOp) {
|
|
107
|
+
return Boolean(maybeOp.mapping);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Determine whether a `ParameterOp` is a `ParameterOpValue`
|
|
111
|
+
*/
|
|
112
|
+
export function isParameterOpValue(maybeOp) {
|
|
113
|
+
return Boolean(maybeOp.value);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Determine whether a `ParameterOp` is a `ParameterOpOp`
|
|
117
|
+
*/
|
|
118
|
+
export function isParameterOpOp(maybeOp) {
|
|
119
|
+
const op = maybeOp;
|
|
120
|
+
if (!op.op) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return !(isParameterOpNested(op) || isParameterOpMapping(op) || isParameterOpValue(op));
|
|
124
|
+
}
|
|
125
|
+
const { definitions: { parameterSerializeStyleOptionsForSearchParams, parameterSerializeStyleOptionsForPathParams } } = latestSchemaJson;
|
|
126
|
+
export function isParameterSerializeStyleForSearchParams(maybeParam) {
|
|
127
|
+
return Boolean(maybeParam && parameterSerializeStyleOptionsForSearchParams.properties.style.enum.includes(maybeParam));
|
|
128
|
+
}
|
|
129
|
+
export function isParameterSerializeStyleForPathParams(maybeParam) {
|
|
130
|
+
return Boolean(maybeParam && parameterSerializeStyleOptionsForPathParams.properties.style.enum.includes(maybeParam));
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Determine whether a ParameterSerializeOption is a style serializer
|
|
134
|
+
*/
|
|
135
|
+
export function isParameterSerializeStyleOptions(maybeStyle) {
|
|
136
|
+
return Boolean(maybeStyle.style);
|
|
137
|
+
}
|
|
138
|
+
/** Typeguards for different types of shape schemas **/
|
|
139
|
+
export function isRefSchema(propertySchema) {
|
|
140
|
+
return isString(propertySchema["@ref"]) || isString(propertySchema.$ref);
|
|
141
|
+
}
|
|
142
|
+
export function isRefSchemaLegacy(propertySchema) {
|
|
143
|
+
return isString(propertySchema.$ref);
|
|
144
|
+
}
|
|
145
|
+
export function isAllOfSchema(propertySchema) {
|
|
146
|
+
return isArray(propertySchema.allOf);
|
|
147
|
+
}
|
|
148
|
+
export function isExtendsSchema(propertySchema) {
|
|
149
|
+
return isRecord(propertySchema) && isArray(propertySchema.extends);
|
|
150
|
+
}
|
|
151
|
+
export function isOneOfSchema(propertySchema) {
|
|
152
|
+
return isArray(propertySchema.oneOf);
|
|
153
|
+
}
|
|
154
|
+
export function isEnumSchema(obj) {
|
|
155
|
+
return isArray(obj.enum);
|
|
156
|
+
}
|
|
157
|
+
export function isArraySchema(propertySchema) {
|
|
158
|
+
return propertySchema.type === "array" && isRecord(propertySchema.items);
|
|
159
|
+
}
|
|
160
|
+
export function isReturnShapeArraySchema(returnShape) {
|
|
161
|
+
return typeof returnShape === "object" && returnShape.type === "array";
|
|
162
|
+
}
|
|
163
|
+
export function isObjectSchema(propertySchema) {
|
|
164
|
+
return isRecord(propertySchema) && propertySchema.type === "object" && isRecord(propertySchema.properties);
|
|
165
|
+
}
|
|
166
|
+
/** Service Config Utils **/
|
|
167
|
+
/**
|
|
168
|
+
* Test all required props, currently:
|
|
169
|
+
* "name", "slug", "provider", "serviceType", "authenticationType"
|
|
170
|
+
*/
|
|
171
|
+
export function isAnyServiceConfig(maybeConfig) {
|
|
172
|
+
return (maybeConfig &&
|
|
173
|
+
isString(maybeConfig.title) &&
|
|
174
|
+
isString(maybeConfig.id) &&
|
|
175
|
+
isString(maybeConfig.provider) &&
|
|
176
|
+
isString(maybeConfig.serviceType) &&
|
|
177
|
+
isString(maybeConfig.authenticationType));
|
|
178
|
+
}
|
|
179
|
+
export function isGraphQLServiceConfig(maybeConfig) {
|
|
180
|
+
return (isAnyServiceConfig(maybeConfig) && maybeConfig.serviceType === "graphql" && isString(maybeConfig.options?.endpoint));
|
|
181
|
+
}
|
|
182
|
+
export function isRESTServiceConfig(maybeConfig) {
|
|
183
|
+
return isAnyServiceConfig(maybeConfig) && maybeConfig.serviceType === "rest";
|
|
184
|
+
}
|
|
185
|
+
export function isOpenAPIServiceConfig(maybeConfig) {
|
|
186
|
+
return isAnyServiceConfig(maybeConfig) && maybeConfig.serviceType === "openapi";
|
|
187
|
+
}
|
|
188
|
+
export function isShopifyServiceConfig(maybeShopify) {
|
|
189
|
+
return maybeShopify.provider === "shopify";
|
|
190
|
+
}
|
|
191
|
+
export function isEncryptedServiceConfig(maybeConfig) {
|
|
192
|
+
return isAnyServiceConfig(maybeConfig) && isString(maybeConfig.authentication);
|
|
193
|
+
}
|
|
194
|
+
export function isServiceConfigWithOAuth2Authentication(maybeServiceConfig) {
|
|
195
|
+
return (isAnyServiceConfig(maybeServiceConfig) &&
|
|
196
|
+
isServiceAuthentication(maybeServiceConfig.authentication) &&
|
|
197
|
+
isOAuth2Authentication(maybeServiceConfig.authentication));
|
|
198
|
+
}
|
|
199
|
+
export function isServiceConfigWithCustomAuthentication(maybeServiceConfig) {
|
|
200
|
+
return (isAnyServiceConfig(maybeServiceConfig) &&
|
|
201
|
+
isServiceAuthentication(maybeServiceConfig.authentication) &&
|
|
202
|
+
isCustomAuthentication(maybeServiceConfig.authentication));
|
|
203
|
+
}
|
|
204
|
+
/** Authentication Utils **/
|
|
205
|
+
export function isServiceAuthentication(maybeAuthentication) {
|
|
206
|
+
return maybeAuthentication?.type;
|
|
207
|
+
}
|
|
208
|
+
export function isBearerAuthentication(authentication) {
|
|
209
|
+
return authentication?.type === "bearer";
|
|
210
|
+
}
|
|
211
|
+
export function isBasicAuthentication(authentication) {
|
|
212
|
+
return authentication?.type === "basic";
|
|
213
|
+
}
|
|
214
|
+
export function isSearchParamsAuthentication(authentication) {
|
|
215
|
+
return authentication?.type === "searchParams";
|
|
216
|
+
}
|
|
217
|
+
export function isOAuth2Authentication(authentication) {
|
|
218
|
+
return authentication?.type === "oauth2";
|
|
219
|
+
}
|
|
220
|
+
export function isOAuth2BearerAuthentication(authentication) {
|
|
221
|
+
return authentication?.type === "oauth2Bearer";
|
|
222
|
+
}
|
|
223
|
+
export function isGoogleAuthentication(authentication) {
|
|
224
|
+
return authentication?.type === "google";
|
|
225
|
+
}
|
|
226
|
+
export function isCustomAuthentication(authentication) {
|
|
227
|
+
return authentication?.type === "custom";
|
|
228
|
+
}
|
|
229
|
+
/** Miscellaneous Utils **/
|
|
230
|
+
/**
|
|
231
|
+
* A utility to return the type of args present on a schema.
|
|
232
|
+
*
|
|
233
|
+
* @param argsSchema Any schema that may have an `args` property.
|
|
234
|
+
*/
|
|
235
|
+
export const getArgsType = (argsSchema) => {
|
|
236
|
+
if (has(argsSchema, "@args")) {
|
|
237
|
+
return ArgsType["@args"];
|
|
238
|
+
}
|
|
239
|
+
if (has(argsSchema, "args")) {
|
|
240
|
+
return ArgsType.args;
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* A utility to return the type of ref present on a schema.
|
|
245
|
+
*
|
|
246
|
+
* @param refSchema Any schema that may have a `ref` property.
|
|
247
|
+
*/
|
|
248
|
+
export const getRefType = (refSchema) => {
|
|
249
|
+
if (has(refSchema, "@ref")) {
|
|
250
|
+
return RefType["@ref"];
|
|
251
|
+
}
|
|
252
|
+
if (has(refSchema, "$ref")) {
|
|
253
|
+
return RefType.$ref;
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
export function isPropertySchemaWithRelationship(schema) {
|
|
257
|
+
return schema["@resolver"]?.name === "shapedb:getRelated";
|
|
258
|
+
}
|
|
259
|
+
export function isModelShape(shape) {
|
|
260
|
+
return Boolean(shape.model);
|
|
261
|
+
}
|
|
262
|
+
export function isCachedShape(shape) {
|
|
263
|
+
return shape.cache?.enabled === true && shape.loaders !== undefined;
|
|
264
|
+
}
|
|
265
|
+
export function listCachedShapes(shapes) {
|
|
266
|
+
return Object.values(shapes).filter(isCachedShape);
|
|
267
|
+
}
|
|
268
|
+
export function getCachedShapeMap(shapes) {
|
|
269
|
+
const results = {};
|
|
270
|
+
for (const shape of Object.values(shapes)) {
|
|
271
|
+
if (isCachedShape(shape)) {
|
|
272
|
+
results[shape.name] = shape;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return results;
|
|
276
|
+
}
|
|
277
|
+
export function isMeshShape(shape) {
|
|
278
|
+
return Boolean(shape.joins);
|
|
279
|
+
}
|