@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,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPropertyInfo = exports.getContentTransform = exports.findTransforms = exports.preferSourceKey = exports.preferName = exports.preferKey = exports.getType = void 0;
|
|
7
|
+
const forEach_js_1 = __importDefault(require("lodash/forEach.js"));
|
|
8
|
+
const difference_js_1 = __importDefault(require("lodash/difference.js"));
|
|
9
|
+
const pick_js_1 = __importDefault(require("lodash/pick.js"));
|
|
10
|
+
const get_js_1 = __importDefault(require("lodash/get.js"));
|
|
11
|
+
const schema_util_1 = require("./schema-util");
|
|
12
|
+
const utils_1 = require("./types/utils");
|
|
13
|
+
const refs_1 = require("./refs");
|
|
14
|
+
const unions_1 = require("./unions");
|
|
15
|
+
const typeCache = new WeakMap();
|
|
16
|
+
function getType(schema) {
|
|
17
|
+
let type = typeCache.get(schema);
|
|
18
|
+
if (type) {
|
|
19
|
+
return type;
|
|
20
|
+
}
|
|
21
|
+
type = schema.type;
|
|
22
|
+
// Handle nullable types for example: ['object', 'null']
|
|
23
|
+
if (Array.isArray(type)) {
|
|
24
|
+
const filtered = type.filter(name => name !== 'null');
|
|
25
|
+
if (!filtered.length) {
|
|
26
|
+
throw new Error(`Invalid schema`);
|
|
27
|
+
}
|
|
28
|
+
type = filtered[0];
|
|
29
|
+
}
|
|
30
|
+
typeCache.set(schema, type);
|
|
31
|
+
return type;
|
|
32
|
+
}
|
|
33
|
+
exports.getType = getType;
|
|
34
|
+
function ensureArray(value) {
|
|
35
|
+
return Array.isArray(value) ? value : [value];
|
|
36
|
+
}
|
|
37
|
+
function preferKey(name, schema) {
|
|
38
|
+
return (0, schema_util_1.getStorageKey)(schema) ?? name;
|
|
39
|
+
}
|
|
40
|
+
exports.preferKey = preferKey;
|
|
41
|
+
/**
|
|
42
|
+
* A key transform to select the field name
|
|
43
|
+
*/
|
|
44
|
+
const preferName = name => name;
|
|
45
|
+
exports.preferName = preferName;
|
|
46
|
+
function getLocalizedKey(key, locale) {
|
|
47
|
+
return locale ? `${key}:${locale}` : key;
|
|
48
|
+
}
|
|
49
|
+
function getNonDefaultLocales(projectSchema) {
|
|
50
|
+
return projectSchema.locales.filter(locale => locale !== projectSchema.defaultLocale);
|
|
51
|
+
}
|
|
52
|
+
function getLocalizedSourceKeys(keys, locales) {
|
|
53
|
+
return keys.flatMap(key => [{ key }, ...locales.map(locale => ({ key: `${key}:${locale}`, locale }))]);
|
|
54
|
+
}
|
|
55
|
+
function preferSourceKey(name, schema) {
|
|
56
|
+
const key = (0, schema_util_1.getStorageKey)(schema);
|
|
57
|
+
return key ? [key, name] : [name];
|
|
58
|
+
}
|
|
59
|
+
exports.preferSourceKey = preferSourceKey;
|
|
60
|
+
function findTransforms(pluginMap, schema, name, shape) {
|
|
61
|
+
const type = getType(schema);
|
|
62
|
+
if (pluginMap && (pluginMap[type] ?? pluginMap['*'])) {
|
|
63
|
+
const plugins = (pluginMap[type] ?? []).concat(pluginMap['*'] ?? []);
|
|
64
|
+
return plugins.find(plugin => plugin.filter(schema, name, shape));
|
|
65
|
+
}
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
exports.findTransforms = findTransforms;
|
|
69
|
+
function getContentTransform({ transforms, accumulators, keyTransform = preferKey, sourceKeyTransform = preferSourceKey, passThrough = true, allowNullObjects = false, projectSchema }) {
|
|
70
|
+
const nonDefaultLocales = getNonDefaultLocales(projectSchema);
|
|
71
|
+
const prepare = (schema, obj, name = '') => {
|
|
72
|
+
const shapeName = (0, refs_1.getRefShapeName)(projectSchema, schema);
|
|
73
|
+
schema = (0, refs_1.dereferenceSchema)(projectSchema, schema);
|
|
74
|
+
if (accumulators) {
|
|
75
|
+
accumulators.forEach(accumulator => {
|
|
76
|
+
accumulator.accumulate(obj, schema, name);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const shape = shapeName ? projectSchema.shapes[shapeName] : undefined;
|
|
80
|
+
const transform = findTransforms(transforms, schema, name, shape);
|
|
81
|
+
if (transform) {
|
|
82
|
+
const next = (value, schema, name) => prepare(schema, value, name);
|
|
83
|
+
return transform.process(obj, schema, name, shape, next);
|
|
84
|
+
}
|
|
85
|
+
if (obj && (0, unions_1.isUnionSchema)(schema)) {
|
|
86
|
+
for (const { shapeId, propSchema } of (0, unions_1.enumerateOneOfKeys)(projectSchema, schema.oneOf)) {
|
|
87
|
+
if (obj._shapeId === shapeId) {
|
|
88
|
+
return prepare(propSchema, obj, name);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (obj && (0, utils_1.isObjectSchema)(schema)) {
|
|
93
|
+
const result = {};
|
|
94
|
+
const assigned = new Set();
|
|
95
|
+
(0, forEach_js_1.default)(schema.properties, (fieldSchema, name) => {
|
|
96
|
+
const sourceKeys = ensureArray(sourceKeyTransform(name, fieldSchema, obj));
|
|
97
|
+
const localizedSourceKeys = getLocalizedSourceKeys(sourceKeys, nonDefaultLocales);
|
|
98
|
+
for (const { key: sourceKey, locale } of localizedSourceKeys) {
|
|
99
|
+
const value = prepare(fieldSchema, (0, get_js_1.default)(obj, sourceKey), name);
|
|
100
|
+
if (value !== undefined) {
|
|
101
|
+
assigned.add(sourceKey);
|
|
102
|
+
const transform = findTransforms(transforms, (0, refs_1.dereferenceSchema)(projectSchema, fieldSchema), name);
|
|
103
|
+
const getKey = transform?.keyTransform ? transform.keyTransform : keyTransform;
|
|
104
|
+
const key = getLocalizedKey(getKey(name, fieldSchema, sourceKey), locale);
|
|
105
|
+
result[key] = value;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
if (passThrough && obj) {
|
|
110
|
+
const keys = (0, difference_js_1.default)(Object.keys(obj), [...assigned]);
|
|
111
|
+
if (keys.length) {
|
|
112
|
+
Object.assign(result, (0, pick_js_1.default)(obj, keys));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
if ((0, utils_1.isArraySchema)(schema)) {
|
|
118
|
+
const itemSchema = schema.items;
|
|
119
|
+
if (Array.isArray(obj)) {
|
|
120
|
+
return obj.map(item => prepare(itemSchema, item, name));
|
|
121
|
+
}
|
|
122
|
+
if (obj === undefined) {
|
|
123
|
+
prepare(itemSchema, obj, name);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (allowNullObjects && (0, utils_1.isObjectSchema)(schema) && obj === null) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
// Allow properties that have not been transformed
|
|
130
|
+
return passThrough ? obj : undefined;
|
|
131
|
+
};
|
|
132
|
+
return prepare;
|
|
133
|
+
}
|
|
134
|
+
exports.getContentTransform = getContentTransform;
|
|
135
|
+
function transformKey(transforms, propSchema, name, transform = preferKey) {
|
|
136
|
+
const schemaTransform = findTransforms(transforms, propSchema, name);
|
|
137
|
+
if (schemaTransform?.keyTransform) {
|
|
138
|
+
transform = schemaTransform.keyTransform;
|
|
139
|
+
}
|
|
140
|
+
return transform(name, propSchema);
|
|
141
|
+
}
|
|
142
|
+
function getPropertyInfo(context, schema, path) {
|
|
143
|
+
const { projectSchema, transforms, keyTransform } = context;
|
|
144
|
+
const result = [];
|
|
145
|
+
const findProperty = (currentSchema, name, rest, path) => {
|
|
146
|
+
if ((0, utils_1.isObjectSchema)(currentSchema)) {
|
|
147
|
+
const propSchema = currentSchema.properties[name];
|
|
148
|
+
const isRequired = currentSchema.required?.includes(name) ?? false;
|
|
149
|
+
if (!propSchema) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const refSchema = (0, refs_1.dereferenceSchema)(projectSchema, propSchema);
|
|
153
|
+
const nextPath = path.concat(transformKey(transforms, refSchema, name, keyTransform));
|
|
154
|
+
if (rest.length) {
|
|
155
|
+
const [nextName, ...nextRest] = rest;
|
|
156
|
+
findProperty(refSchema, nextName, nextRest, nextPath);
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
result.push({ schema: refSchema, key: nextPath.join('.'), isRequired });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
else if ((0, unions_1.isUnionSchema)(currentSchema)) {
|
|
163
|
+
for (const optionSchema of currentSchema.oneOf) {
|
|
164
|
+
findProperty((0, refs_1.dereferenceSchema)(projectSchema, optionSchema), name, rest, path);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else if ((0, utils_1.isArraySchema)(currentSchema)) {
|
|
168
|
+
findProperty((0, refs_1.dereferenceSchema)(projectSchema, currentSchema.items), name, rest, path);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
const [first, ...rest] = path.split('.');
|
|
172
|
+
findProperty((0, refs_1.dereferenceSchema)(projectSchema, schema), first, rest, []);
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
exports.getPropertyInfo = getPropertyInfo;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createInputSchema = void 0;
|
|
7
|
+
const defaults_js_1 = __importDefault(require("lodash/fp/defaults.js"));
|
|
8
|
+
const util_1 = require("@takeshape/util");
|
|
9
|
+
const inputSchemaCache = new Map();
|
|
10
|
+
function getInputSchemaCache(options) {
|
|
11
|
+
// Ensure key order does not invalidate the cache
|
|
12
|
+
const key = JSON.stringify(options, Object.keys(options).sort());
|
|
13
|
+
let cache = inputSchemaCache.get(key);
|
|
14
|
+
if (!cache) {
|
|
15
|
+
cache = new WeakMap();
|
|
16
|
+
inputSchemaCache.set(key, cache);
|
|
17
|
+
}
|
|
18
|
+
return cache;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Convert all output properties in the schema to be input properties,
|
|
22
|
+
* For an update, remove `required` and `default` fields as well.
|
|
23
|
+
*/
|
|
24
|
+
function createInputSchema(schema, options = {}) {
|
|
25
|
+
const inputSchemaCache = getInputSchemaCache((0, defaults_js_1.default)({ isUpdate: false }, options));
|
|
26
|
+
let rewrittenSchema = inputSchemaCache.get(schema);
|
|
27
|
+
if (rewrittenSchema) {
|
|
28
|
+
return rewrittenSchema;
|
|
29
|
+
}
|
|
30
|
+
rewrittenSchema = (0, util_1.deepCloneWith)(schema, (value, key, parent, clone) => {
|
|
31
|
+
// Remove required
|
|
32
|
+
if (options.isUpdate && key === 'required' && Array.isArray(value) && value.length) {
|
|
33
|
+
return util_1.REMOVE;
|
|
34
|
+
}
|
|
35
|
+
// Remove default
|
|
36
|
+
if (options.isUpdate &&
|
|
37
|
+
key === 'default' &&
|
|
38
|
+
value !== undefined &&
|
|
39
|
+
(0, util_1.isIterableObject)(parent) &&
|
|
40
|
+
parent.type !== undefined) {
|
|
41
|
+
return util_1.REMOVE;
|
|
42
|
+
}
|
|
43
|
+
if (key === 'properties' && (0, util_1.isIterableObject)(value) && (0, util_1.isIterableObject)(parent) && parent.type === 'object') {
|
|
44
|
+
const newProperties = {};
|
|
45
|
+
for (const [key, prop] of Object.entries(value)) {
|
|
46
|
+
if ((0, util_1.isIterableObject)(prop) && (!prop['@resolver'] || prop['@input'])) {
|
|
47
|
+
newProperties[key] = clone(prop, key, value);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return newProperties;
|
|
51
|
+
}
|
|
52
|
+
if ((0, util_1.isIterableObject)(value) && (0, util_1.isIterableObject)(value['@input'])) {
|
|
53
|
+
const { '@input': input, '@l10n': l10n, '@syncLocaleStructure': syncLocaleStructure, '@mapping': mapping, title, ...output } = value;
|
|
54
|
+
return {
|
|
55
|
+
...clone(input, '@input', value),
|
|
56
|
+
title,
|
|
57
|
+
'@l10n': l10n,
|
|
58
|
+
'@syncLocaleStructure': syncLocaleStructure,
|
|
59
|
+
'@mapping': mapping,
|
|
60
|
+
'@output': output
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
inputSchemaCache.set(schema, rewrittenSchema);
|
|
65
|
+
return rewrittenSchema;
|
|
66
|
+
}
|
|
67
|
+
exports.createInputSchema = createInputSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEnumLikeSchema = void 0;
|
|
4
|
+
function isEnumLikeSchema(schema) {
|
|
5
|
+
if (schema.enum) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
if (schema.oneOf) {
|
|
9
|
+
return schema.oneOf.every(optionSchema => optionSchema.title !== undefined && (optionSchema.enum ?? optionSchema.const));
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
exports.isEnumLikeSchema = isEnumLikeSchema;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.flattenTemplates = void 0;
|
|
7
|
+
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
8
|
+
const util_1 = require("@takeshape/util");
|
|
9
|
+
const template_shapes_1 = require("./template-shapes");
|
|
10
|
+
const schema_util_1 = require("./schema-util");
|
|
11
|
+
const refs_1 = require("./refs");
|
|
12
|
+
function flattenTemplates(projectSchema) {
|
|
13
|
+
const templateRefs = (0, schema_util_1.getAllRefs)(projectSchema, ref => Boolean(ref.template));
|
|
14
|
+
if (!templateRefs.length) {
|
|
15
|
+
return projectSchema;
|
|
16
|
+
}
|
|
17
|
+
const newSchema = (0, util_1.deepClone)(projectSchema);
|
|
18
|
+
for (const ref of templateRefs) {
|
|
19
|
+
if (ref.template && (0, template_shapes_1.isValidTemplate)(ref.template)) {
|
|
20
|
+
const { shapeName, dependencies } = (0, template_shapes_1.resolveTemplate)(newSchema, ref.template, (0, refs_1.refItemToNamespacedShapeName)(ref));
|
|
21
|
+
(0, set_js_1.default)(newSchema, ref.path, ref.path[ref.path.length - 1] === '@ref' ? `local:${shapeName}` : shapeName);
|
|
22
|
+
Object.assign(newSchema.shapes, dependencies);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return newSchema;
|
|
26
|
+
}
|
|
27
|
+
exports.flattenTemplates = flattenTemplates;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIsLeaf = void 0;
|
|
4
|
+
const content_schema_transform_1 = require("./content-schema-transform");
|
|
5
|
+
const schema_util_1 = require("./schema-util");
|
|
6
|
+
const refs_1 = require("./refs");
|
|
7
|
+
const types_1 = require("./types");
|
|
8
|
+
const scalarTags = new Set(['draftjs']);
|
|
9
|
+
function isLeafTypeV3(projectSchema, propertySchema) {
|
|
10
|
+
const type = (0, content_schema_transform_1.getType)(propertySchema);
|
|
11
|
+
return Boolean(
|
|
12
|
+
// Must have key
|
|
13
|
+
(0, schema_util_1.getStorageKey)(propertySchema) &&
|
|
14
|
+
// If is not a structure, then is a leaf
|
|
15
|
+
(!['object', 'array'].includes(type) ||
|
|
16
|
+
// If is relationship, then is a leaf
|
|
17
|
+
(0, types_1.isPropertySchemaWithRelationship)(propertySchema['@output'] ?? propertySchema) ||
|
|
18
|
+
Boolean(propertySchema['@tag'] && scalarTags.has(propertySchema['@tag'])) ||
|
|
19
|
+
// If is array, then should not be a synchronized structure
|
|
20
|
+
(type === 'array' && !propertySchema['@syncLocaleStructure']) ||
|
|
21
|
+
(0, schema_util_1.isBuiltinType)(projectSchema, propertySchema)));
|
|
22
|
+
}
|
|
23
|
+
function getIsLeaf(projectSchema, shapeSchema) {
|
|
24
|
+
const leafMap = new Set();
|
|
25
|
+
const shapesSeen = new Set();
|
|
26
|
+
const collectLeaves = (schema) => {
|
|
27
|
+
const shapeName = (0, refs_1.getRefShapeName)(projectSchema, schema);
|
|
28
|
+
schema = shapeName ? (0, refs_1.followRef)(projectSchema, schema) : schema;
|
|
29
|
+
const key = (0, schema_util_1.getStorageKey)(schema);
|
|
30
|
+
if (key && isLeafTypeV3(projectSchema, schema)) {
|
|
31
|
+
leafMap.add(key);
|
|
32
|
+
}
|
|
33
|
+
if (shapeName) {
|
|
34
|
+
// Skip shapes we have already seen to avoid cycles
|
|
35
|
+
if (shapesSeen.has(shapeName)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
shapesSeen.add(shapeName);
|
|
39
|
+
}
|
|
40
|
+
const combo = schema.oneOf ?? schema.allOf;
|
|
41
|
+
if (combo) {
|
|
42
|
+
combo.map(collectLeaves);
|
|
43
|
+
}
|
|
44
|
+
else if (schema.properties) {
|
|
45
|
+
for (const name of Object.keys(schema.properties)) {
|
|
46
|
+
collectLeaves(schema.properties[name]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else if (schema.items) {
|
|
50
|
+
collectLeaves(schema.items);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
collectLeaves(shapeSchema);
|
|
54
|
+
return (key) => {
|
|
55
|
+
// Remove locale suffix
|
|
56
|
+
key = key ? key.split(':')[0] : key;
|
|
57
|
+
return Boolean(key && leafMap.has(key));
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
exports.getIsLeaf = getIsLeaf;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./content-schema-transform"), exports);
|
|
18
|
+
__exportStar(require("./get-is-leaf"), exports);
|
|
19
|
+
__exportStar(require("./project-schema"), exports);
|
|
20
|
+
__exportStar(require("./project-schema/migrate"), exports);
|
|
21
|
+
__exportStar(require("./schema-util"), exports);
|
|
22
|
+
__exportStar(require("./template-shapes"), exports);
|
|
23
|
+
__exportStar(require("./taxonomies"), exports);
|
|
24
|
+
__exportStar(require("./workflows"), exports);
|
|
25
|
+
__exportStar(require("./auth-schemas"), exports);
|
|
26
|
+
__exportStar(require("./api-version"), exports);
|
|
27
|
+
__exportStar(require("./migration"), exports);
|
|
28
|
+
__exportStar(require("./validate"), exports);
|
|
29
|
+
__exportStar(require("./builtin-schema"), exports);
|
|
30
|
+
__exportStar(require("./versions"), exports);
|
|
31
|
+
__exportStar(require("./mocks"), exports);
|
|
32
|
+
__exportStar(require("./scalars"), exports);
|
|
33
|
+
__exportStar(require("./refs"), exports);
|
|
34
|
+
__exportStar(require("./unions"), exports);
|
|
35
|
+
__exportStar(require("./enum"), exports);
|
|
36
|
+
__exportStar(require("./patterns"), exports);
|
|
37
|
+
__exportStar(require("./types/transforms"), exports);
|
|
38
|
+
__exportStar(require("./types/types"), exports);
|
|
39
|
+
__exportStar(require("./types/utils"), exports);
|
|
40
|
+
__exportStar(require("./flatten-templates"), exports);
|
|
41
|
+
__exportStar(require("./relationships"), exports);
|
|
42
|
+
__exportStar(require("./create-input-schema"), exports);
|
|
43
|
+
__exportStar(require("./schema-transform"), exports);
|
|
44
|
+
__exportStar(require("./interfaces"), exports);
|
|
45
|
+
__exportStar(require("./agents"), exports);
|
|
46
|
+
__exportStar(require("./services/services"), exports);
|
|
47
|
+
__exportStar(require("./services/util"), exports);
|
|
48
|
+
__exportStar(require("./services/types"), exports);
|
|
49
|
+
__exportStar(require("./util/api-indexing"), exports);
|
|
50
|
+
__exportStar(require("./util/form-config"), exports);
|
|
51
|
+
__exportStar(require("./util/ai-tools"), exports);
|
|
52
|
+
__exportStar(require("./util/detect-cycles"), exports);
|
|
53
|
+
__exportStar(require("./util/find-shape-at-path"), exports);
|
|
54
|
+
__exportStar(require("./util/get-conflicting-properties"), exports);
|
|
55
|
+
__exportStar(require("./util/get-return-shape"), exports);
|
|
56
|
+
__exportStar(require("./util/has-arg"), exports);
|
|
57
|
+
__exportStar(require("./util/merge"), exports);
|
|
58
|
+
__exportStar(require("./util/patch-schema"), exports);
|
|
59
|
+
__exportStar(require("./util/shapes"), exports);
|
|
60
|
+
__exportStar(require("./constants"), exports);
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getPossibleShapeNames = exports.interfaceToUnion = exports.getImplementingShapes = exports.pruneUnusedInterfaces = exports.getImplementationShapeNameMap = exports.getImplementationShapeMap = exports.isInterfaceRef = exports.isInterfaceShape = void 0;
|
|
7
|
+
const mapValues_js_1 = __importDefault(require("lodash/mapValues.js"));
|
|
8
|
+
const util_1 = require("@takeshape/util");
|
|
9
|
+
const refs_1 = require("./refs");
|
|
10
|
+
const unions_1 = require("./unions");
|
|
11
|
+
function isInterfaceShape(shape) {
|
|
12
|
+
return shape?.type === 'interface';
|
|
13
|
+
}
|
|
14
|
+
exports.isInterfaceShape = isInterfaceShape;
|
|
15
|
+
function isInterfaceRef(context, propertySchema) {
|
|
16
|
+
const ref = (0, refs_1.getRef)(context, propertySchema);
|
|
17
|
+
return Boolean(ref && isInterfaceShape((0, refs_1.refItemToShape)(context, ref)));
|
|
18
|
+
}
|
|
19
|
+
exports.isInterfaceRef = isInterfaceRef;
|
|
20
|
+
function add(record, key, value) {
|
|
21
|
+
if (!record[key]) {
|
|
22
|
+
record[key] = new Set([value]);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
record[key].add(value);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function getImplementationsHelper(shapeMap, mapFn) {
|
|
29
|
+
const result = {};
|
|
30
|
+
for (const shape of Object.values(shapeMap)) {
|
|
31
|
+
for (const interfaceName of shape.interfaces ?? []) {
|
|
32
|
+
add(result, interfaceName, mapFn(shape));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function getImplementationShapeMap(shapeMap) {
|
|
38
|
+
return getImplementationsHelper(shapeMap, x => x);
|
|
39
|
+
}
|
|
40
|
+
exports.getImplementationShapeMap = getImplementationShapeMap;
|
|
41
|
+
function getImplementationShapeNameMap(shapeMap) {
|
|
42
|
+
return getImplementationsHelper(shapeMap, shape => shape.name);
|
|
43
|
+
}
|
|
44
|
+
exports.getImplementationShapeNameMap = getImplementationShapeNameMap;
|
|
45
|
+
function pruneUnusedInterfaces(projectSchema, shapeMap) {
|
|
46
|
+
return (0, mapValues_js_1.default)(shapeMap, shape => {
|
|
47
|
+
const { interfaces } = shape;
|
|
48
|
+
if (interfaces?.length) {
|
|
49
|
+
const filteredInterfaces = interfaces.filter(refExpression => shapeMap[(0, refs_1.refItemToNamespacedShapeName)((0, refs_1.refExpressionToRefItem)(projectSchema, refExpression))]);
|
|
50
|
+
if (interfaces.length !== filteredInterfaces.length) {
|
|
51
|
+
return { ...shape, interfaces: filteredInterfaces };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return shape;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
exports.pruneUnusedInterfaces = pruneUnusedInterfaces;
|
|
58
|
+
function compareRefItems(refItem1, refItem2) {
|
|
59
|
+
return refItem1.typeName === refItem2.typeName && refItem1.serviceKey === refItem2.serviceKey;
|
|
60
|
+
}
|
|
61
|
+
function getImplementingShapes(context, interfaceRef) {
|
|
62
|
+
const shapeMap = context.shapes;
|
|
63
|
+
const implementingShapes = [];
|
|
64
|
+
for (const shape of Object.values(shapeMap)) {
|
|
65
|
+
if (shape.interfaces?.find(interfaceRefExpression => compareRefItems((0, refs_1.refExpressionToRefItem)(context, interfaceRefExpression), interfaceRef))) {
|
|
66
|
+
implementingShapes.push(shape);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return implementingShapes;
|
|
70
|
+
}
|
|
71
|
+
exports.getImplementingShapes = getImplementingShapes;
|
|
72
|
+
function interfaceToUnion(context, interfaceRef) {
|
|
73
|
+
const shapes = getImplementingShapes(context, interfaceRef);
|
|
74
|
+
return {
|
|
75
|
+
oneOf: shapes.map(shape => ({ '@ref': (0, refs_1.normalizeRefExpression)(context, shape.name) }))
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
exports.interfaceToUnion = interfaceToUnion;
|
|
79
|
+
function getPossibleShapeNames(projectSchema, shape) {
|
|
80
|
+
let names;
|
|
81
|
+
if (isInterfaceShape(shape)) {
|
|
82
|
+
names = getImplementingShapes(projectSchema, (0, refs_1.shapeToRefItem)(projectSchema, shape)).map(shape => shape.name);
|
|
83
|
+
}
|
|
84
|
+
else if ((0, unions_1.isUnionSchema)(shape.schema)) {
|
|
85
|
+
names = shape.schema.oneOf
|
|
86
|
+
.map(member => {
|
|
87
|
+
const ref = (0, refs_1.getRef)(projectSchema, member);
|
|
88
|
+
return ref && (0, refs_1.refItemToNamespacedShapeName)(ref);
|
|
89
|
+
})
|
|
90
|
+
.filter(util_1.isDefined);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
names = [shape.name];
|
|
94
|
+
}
|
|
95
|
+
return names;
|
|
96
|
+
}
|
|
97
|
+
exports.getPossibleShapeNames = getPossibleShapeNames;
|