@takeshape/schema 11.144.1 → 11.154.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/latest/all-fields-shapes-inline.json +1 -1
- package/examples/latest/all-fields-shapes.json +1 -1
- package/examples/latest/betzino.json +1 -1
- package/examples/latest/blog-schema.json +1 -1
- package/examples/latest/brewery-schema.json +1 -1
- package/examples/latest/chat-agent-schema.json +1 -1
- package/examples/latest/clear-cache-schema.json +1 -1
- package/examples/latest/complex-project-schema.json +1 -1
- package/examples/latest/complex-schema.json +1 -1
- package/examples/latest/edit-schema.json +1 -1
- package/examples/latest/frank-and-fred-schema.json +1 -1
- package/examples/latest/generate-agent-schema.json +1 -1
- package/examples/latest/klirr-schema.json +1 -1
- package/examples/latest/layers/rick-and-morty-layer.json +1 -1
- package/examples/latest/layers/shopify-layer-2023-01.json +1 -1
- package/examples/latest/layers/shopify-storefront-2023-04.json +1 -1
- package/examples/latest/layers/wordpress-2024-01.json +1 -1
- package/examples/latest/massive-schema.json +1 -1
- package/examples/latest/mill-components-schema.json +1 -1
- package/examples/latest/nested-shape-arrays.json +1 -1
- package/examples/latest/one-earth.json +1 -1
- package/examples/latest/pet-oneof-array.json +1 -1
- package/examples/latest/post-schema.json +1 -1
- package/examples/latest/pruned-shopify-product-schema.json +1 -1
- package/examples/latest/rag-example.json +1 -1
- package/examples/latest/real-world-schema.json +1 -1
- package/examples/latest/recursive-repeater-schema.json +1 -1
- package/examples/latest/recursive-schema.json +1 -1
- package/examples/latest/rick-and-morty-ast.json +1 -1
- package/examples/latest/rick-and-morty-graphql.json +1 -1
- package/examples/latest/rick-and-morty-rest.json +1 -1
- package/examples/latest/rick-and-morty-user-schema.json +1 -1
- package/examples/latest/rick-and-morty-with-indexing.json +1 -1
- package/examples/latest/schema-where-filter.json +1 -1
- package/examples/latest/schema-with-repeater-draftjs.json +1 -1
- package/examples/latest/schema-with-rick-and-morty.json +1 -1
- package/examples/latest/shape-books-v3_2_0.json +1 -1
- package/examples/latest/shape-books.json +1 -1
- package/examples/latest/shape-editor-schema-edited.json +1 -1
- package/examples/latest/shape-editor-schema-initial.json +1 -1
- package/examples/latest/shapedb-crud-every-prop-type.json +1 -1
- package/examples/latest/shopify-lookbook.json +1 -1
- package/examples/latest/shopify-product-2022-07.json +1 -1
- package/examples/latest/shopify-product-2023-04.json +1 -1
- package/examples/latest/shopify-store-with-widget.json +1 -1
- package/examples/latest/stripe-product-runtime-schema.json +1 -1
- package/examples/latest/stripe-starter-resolved.json +1 -1
- package/examples/latest/user-schema-no-required.json +1 -1
- package/examples/latest/user-schema-with-defaults.json +1 -1
- package/examples/latest/valvoline-ai-demo.json +1461 -1421
- package/examples/latest/vector-search-schema.json +1 -1
- package/package.json +10 -9
- package/dist/agents.d.ts +0 -62
- package/dist/agents.js +0 -338
- package/dist/api-version.d.ts +0 -5
- package/dist/api-version.js +0 -17
- package/dist/auth-schemas.d.ts +0 -128
- package/dist/auth-schemas.js +0 -7
- package/dist/auth-utils.d.ts +0 -5
- package/dist/auth-utils.js +0 -6
- package/dist/builtin-schema.d.ts +0 -18
- package/dist/builtin-schema.js +0 -683
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -1
- package/dist/content-schema-transform.d.ts +0 -35
- package/dist/content-schema-transform.js +0 -162
- package/dist/create-input-schema.d.ts +0 -9
- package/dist/create-input-schema.js +0 -68
- package/dist/enum.d.ts +0 -2
- package/dist/enum.js +0 -9
- package/dist/flatten-templates.d.ts +0 -2
- package/dist/flatten-templates.js +0 -20
- package/dist/get-is-leaf.d.ts +0 -3
- package/dist/get-is-leaf.js +0 -56
- package/dist/index.d.ts +0 -62
- package/dist/index.js +0 -59
- package/dist/interfaces.d.ts +0 -14
- package/dist/interfaces.js +0 -86
- package/dist/layers/layers.d.ts +0 -26
- package/dist/layers/layers.js +0 -301
- package/dist/layers/refs.d.ts +0 -102
- package/dist/layers/refs.js +0 -220
- package/dist/layers/type-utils.d.ts +0 -59
- package/dist/layers/type-utils.js +0 -118
- package/dist/layers/visitor.d.ts +0 -5
- package/dist/layers/visitor.js +0 -38
- package/dist/migration/index.d.ts +0 -73
- package/dist/migration/index.js +0 -103
- package/dist/migration/to/v3.0.0.d.ts +0 -4
- package/dist/migration/to/v3.0.0.js +0 -212
- package/dist/migration/to/v3.1.0.d.ts +0 -4
- package/dist/migration/to/v3.1.0.js +0 -194
- package/dist/migration/to/v3.10.0.d.ts +0 -4
- package/dist/migration/to/v3.10.0.js +0 -67
- package/dist/migration/to/v3.11.0.d.ts +0 -4
- package/dist/migration/to/v3.11.0.js +0 -85
- package/dist/migration/to/v3.12.3.d.ts +0 -4
- package/dist/migration/to/v3.12.3.js +0 -87
- package/dist/migration/to/v3.13.0.d.ts +0 -4
- package/dist/migration/to/v3.13.0.js +0 -17
- package/dist/migration/to/v3.17.0.d.ts +0 -4
- package/dist/migration/to/v3.17.0.js +0 -22
- package/dist/migration/to/v3.18.0.d.ts +0 -4
- package/dist/migration/to/v3.18.0.js +0 -64
- package/dist/migration/to/v3.18.1.d.ts +0 -4
- package/dist/migration/to/v3.18.1.js +0 -12
- package/dist/migration/to/v3.18.2.d.ts +0 -4
- package/dist/migration/to/v3.18.2.js +0 -19
- package/dist/migration/to/v3.20.0.d.ts +0 -4
- package/dist/migration/to/v3.20.0.js +0 -24
- package/dist/migration/to/v3.22.0.d.ts +0 -4
- package/dist/migration/to/v3.22.0.js +0 -25
- package/dist/migration/to/v3.24.0.d.ts +0 -4
- package/dist/migration/to/v3.24.0.js +0 -11
- package/dist/migration/to/v3.25.0.d.ts +0 -4
- package/dist/migration/to/v3.25.0.js +0 -11
- package/dist/migration/to/v3.3.0.d.ts +0 -4
- package/dist/migration/to/v3.3.0.js +0 -13
- package/dist/migration/to/v3.31.0.d.ts +0 -4
- package/dist/migration/to/v3.31.0.js +0 -38
- package/dist/migration/to/v3.32.0.d.ts +0 -4
- package/dist/migration/to/v3.32.0.js +0 -59
- package/dist/migration/to/v3.34.0.d.ts +0 -6
- package/dist/migration/to/v3.34.0.js +0 -111
- package/dist/migration/to/v3.36.0.d.ts +0 -4
- package/dist/migration/to/v3.36.0.js +0 -22
- package/dist/migration/to/v3.39.0.d.ts +0 -4
- package/dist/migration/to/v3.39.0.js +0 -45
- package/dist/migration/to/v3.40.0.d.ts +0 -4
- package/dist/migration/to/v3.40.0.js +0 -26
- package/dist/migration/to/v3.46.0.d.ts +0 -4
- package/dist/migration/to/v3.46.0.js +0 -35
- package/dist/migration/to/v3.57.0.d.ts +0 -4
- package/dist/migration/to/v3.57.0.js +0 -18
- package/dist/migration/to/v3.9.0.d.ts +0 -4
- package/dist/migration/to/v3.9.0.js +0 -79
- package/dist/migration/types.d.ts +0 -26
- package/dist/migration/types.js +0 -3
- package/dist/migration/utils.d.ts +0 -2
- package/dist/migration/utils.js +0 -6
- package/dist/mocks.d.ts +0 -14
- package/dist/mocks.js +0 -58
- package/dist/models/agent.d.ts +0 -3
- package/dist/models/agent.js +0 -29
- package/dist/models/project-schema.d.ts +0 -18
- package/dist/models/project-schema.js +0 -119
- package/dist/models/query.d.ts +0 -3
- package/dist/models/query.js +0 -38
- package/dist/models/runtime-schema.d.ts +0 -9
- package/dist/models/runtime-schema.js +0 -20
- package/dist/models/shape.d.ts +0 -4
- package/dist/models/shape.js +0 -36
- package/dist/models/types.d.ts +0 -36
- package/dist/models/types.js +0 -1
- package/dist/models/user-schema.d.ts +0 -7
- package/dist/models/user-schema.js +0 -9
- package/dist/patterns.d.ts +0 -12
- package/dist/patterns.js +0 -1
- package/dist/project-schema/index.d.ts +0 -211
- package/dist/project-schema/index.js +0 -83
- package/dist/project-schema/latest.d.ts +0 -2619
- package/dist/project-schema/latest.js +0 -7
- package/dist/project-schema/migrate.d.ts +0 -4
- package/dist/project-schema/migrate.js +0 -218
- package/dist/project-schema/v1.0.0.d.ts +0 -299
- package/dist/project-schema/v1.0.0.js +0 -7
- package/dist/project-schema/v3.0.0.d.ts +0 -478
- package/dist/project-schema/v3.0.0.js +0 -7
- package/dist/project-schema/v3.1.0.d.ts +0 -621
- package/dist/project-schema/v3.1.0.js +0 -7
- package/dist/project-schema/v3.10.0.d.ts +0 -1201
- package/dist/project-schema/v3.10.0.js +0 -7
- package/dist/project-schema/v3.11.0.d.ts +0 -1210
- package/dist/project-schema/v3.11.0.js +0 -7
- package/dist/project-schema/v3.12.0.d.ts +0 -1214
- package/dist/project-schema/v3.12.0.js +0 -7
- package/dist/project-schema/v3.12.1.d.ts +0 -1273
- package/dist/project-schema/v3.12.1.js +0 -7
- package/dist/project-schema/v3.12.2.d.ts +0 -1283
- package/dist/project-schema/v3.12.2.js +0 -7
- package/dist/project-schema/v3.12.3.d.ts +0 -1306
- package/dist/project-schema/v3.12.3.js +0 -7
- package/dist/project-schema/v3.13.0.d.ts +0 -1317
- package/dist/project-schema/v3.13.0.js +0 -7
- package/dist/project-schema/v3.13.1.d.ts +0 -1412
- package/dist/project-schema/v3.13.1.js +0 -7
- package/dist/project-schema/v3.14.0.d.ts +0 -1436
- package/dist/project-schema/v3.14.0.js +0 -7
- package/dist/project-schema/v3.15.0.d.ts +0 -1458
- package/dist/project-schema/v3.15.0.js +0 -7
- package/dist/project-schema/v3.16.0.d.ts +0 -1470
- package/dist/project-schema/v3.16.0.js +0 -7
- package/dist/project-schema/v3.17.0.d.ts +0 -1467
- package/dist/project-schema/v3.17.0.js +0 -7
- package/dist/project-schema/v3.17.1.d.ts +0 -1468
- package/dist/project-schema/v3.17.1.js +0 -7
- package/dist/project-schema/v3.18.0.d.ts +0 -1333
- package/dist/project-schema/v3.18.0.js +0 -7
- package/dist/project-schema/v3.18.1.d.ts +0 -1332
- package/dist/project-schema/v3.18.1.js +0 -7
- package/dist/project-schema/v3.18.2.d.ts +0 -1332
- package/dist/project-schema/v3.18.2.js +0 -7
- package/dist/project-schema/v3.19.0.d.ts +0 -1336
- package/dist/project-schema/v3.19.0.js +0 -7
- package/dist/project-schema/v3.2.0.d.ts +0 -632
- package/dist/project-schema/v3.2.0.js +0 -7
- package/dist/project-schema/v3.20.0.d.ts +0 -1336
- package/dist/project-schema/v3.20.0.js +0 -7
- package/dist/project-schema/v3.21.0.d.ts +0 -1338
- package/dist/project-schema/v3.21.0.js +0 -7
- package/dist/project-schema/v3.22.0.d.ts +0 -1344
- package/dist/project-schema/v3.22.0.js +0 -7
- package/dist/project-schema/v3.23.0.d.ts +0 -1376
- package/dist/project-schema/v3.23.0.js +0 -7
- package/dist/project-schema/v3.24.0.d.ts +0 -1364
- package/dist/project-schema/v3.24.0.js +0 -7
- package/dist/project-schema/v3.25.0.d.ts +0 -1363
- package/dist/project-schema/v3.25.0.js +0 -7
- package/dist/project-schema/v3.26.0.d.ts +0 -1388
- package/dist/project-schema/v3.26.0.js +0 -7
- package/dist/project-schema/v3.27.0.d.ts +0 -1397
- package/dist/project-schema/v3.27.0.js +0 -7
- package/dist/project-schema/v3.28.0.d.ts +0 -1416
- package/dist/project-schema/v3.28.0.js +0 -7
- package/dist/project-schema/v3.29.0.d.ts +0 -1423
- package/dist/project-schema/v3.29.0.js +0 -7
- package/dist/project-schema/v3.3.0.d.ts +0 -632
- package/dist/project-schema/v3.3.0.js +0 -7
- package/dist/project-schema/v3.30.0.d.ts +0 -1416
- package/dist/project-schema/v3.30.0.js +0 -7
- package/dist/project-schema/v3.31.0.d.ts +0 -1448
- package/dist/project-schema/v3.31.0.js +0 -7
- package/dist/project-schema/v3.32.0.d.ts +0 -1439
- package/dist/project-schema/v3.32.0.js +0 -7
- package/dist/project-schema/v3.33.0.d.ts +0 -1445
- package/dist/project-schema/v3.33.0.js +0 -7
- package/dist/project-schema/v3.34.0.d.ts +0 -1445
- package/dist/project-schema/v3.34.0.js +0 -7
- package/dist/project-schema/v3.35.0.d.ts +0 -1464
- package/dist/project-schema/v3.35.0.js +0 -7
- package/dist/project-schema/v3.36.0.d.ts +0 -1470
- package/dist/project-schema/v3.36.0.js +0 -7
- package/dist/project-schema/v3.37.0.d.ts +0 -1522
- package/dist/project-schema/v3.37.0.js +0 -7
- package/dist/project-schema/v3.38.0.d.ts +0 -1522
- package/dist/project-schema/v3.38.0.js +0 -7
- package/dist/project-schema/v3.39.0.d.ts +0 -1529
- package/dist/project-schema/v3.39.0.js +0 -7
- package/dist/project-schema/v3.4.0.d.ts +0 -624
- package/dist/project-schema/v3.4.0.js +0 -7
- package/dist/project-schema/v3.40.0.d.ts +0 -1530
- package/dist/project-schema/v3.40.0.js +0 -7
- package/dist/project-schema/v3.41.0.d.ts +0 -1530
- package/dist/project-schema/v3.41.0.js +0 -7
- package/dist/project-schema/v3.42.0.d.ts +0 -1534
- package/dist/project-schema/v3.42.0.js +0 -7
- package/dist/project-schema/v3.43.0.d.ts +0 -1536
- package/dist/project-schema/v3.43.0.js +0 -7
- package/dist/project-schema/v3.44.0.d.ts +0 -1621
- package/dist/project-schema/v3.44.0.js +0 -7
- package/dist/project-schema/v3.45.0.d.ts +0 -1650
- package/dist/project-schema/v3.45.0.js +0 -7
- package/dist/project-schema/v3.46.0.d.ts +0 -1703
- package/dist/project-schema/v3.46.0.js +0 -7
- package/dist/project-schema/v3.47.0.d.ts +0 -1736
- package/dist/project-schema/v3.47.0.js +0 -7
- package/dist/project-schema/v3.48.0.d.ts +0 -2208
- package/dist/project-schema/v3.48.0.js +0 -7
- package/dist/project-schema/v3.49.0.d.ts +0 -2217
- package/dist/project-schema/v3.49.0.js +0 -7
- package/dist/project-schema/v3.5.0.d.ts +0 -649
- package/dist/project-schema/v3.5.0.js +0 -7
- package/dist/project-schema/v3.5.1.d.ts +0 -649
- package/dist/project-schema/v3.5.1.js +0 -7
- package/dist/project-schema/v3.50.0.d.ts +0 -2269
- package/dist/project-schema/v3.50.0.js +0 -7
- package/dist/project-schema/v3.51.0.d.ts +0 -2269
- package/dist/project-schema/v3.51.0.js +0 -7
- package/dist/project-schema/v3.52.0.d.ts +0 -2269
- package/dist/project-schema/v3.52.0.js +0 -7
- package/dist/project-schema/v3.53.0.d.ts +0 -2350
- package/dist/project-schema/v3.53.0.js +0 -7
- package/dist/project-schema/v3.54.0.d.ts +0 -2369
- package/dist/project-schema/v3.54.0.js +0 -7
- package/dist/project-schema/v3.55.0.d.ts +0 -2369
- package/dist/project-schema/v3.55.0.js +0 -7
- package/dist/project-schema/v3.56.0.d.ts +0 -2405
- package/dist/project-schema/v3.56.0.js +0 -7
- package/dist/project-schema/v3.57.0.d.ts +0 -2601
- package/dist/project-schema/v3.57.0.js +0 -7
- package/dist/project-schema/v3.58.0.d.ts +0 -2601
- package/dist/project-schema/v3.58.0.js +0 -7
- package/dist/project-schema/v3.59.0.d.ts +0 -2619
- package/dist/project-schema/v3.59.0.js +0 -7
- package/dist/project-schema/v3.6.0.d.ts +0 -658
- package/dist/project-schema/v3.6.0.js +0 -7
- package/dist/project-schema/v3.7.0.d.ts +0 -961
- package/dist/project-schema/v3.7.0.js +0 -7
- package/dist/project-schema/v3.8.0.d.ts +0 -979
- package/dist/project-schema/v3.8.0.js +0 -7
- package/dist/project-schema/v3.9.0.d.ts +0 -1178
- package/dist/project-schema/v3.9.0.js +0 -7
- package/dist/project-schema/v4.0.0.d.ts +0 -1328
- package/dist/project-schema/v4.0.0.js +0 -7
- package/dist/refs.d.ts +0 -218
- package/dist/refs.js +0 -616
- package/dist/relationships.d.ts +0 -40
- package/dist/relationships.js +0 -302
- package/dist/resolvers/ai/abort-agent-message-args.d.ts +0 -16
- package/dist/resolvers/ai/abort-agent-message-args.js +0 -13
- package/dist/resolvers/ai/abort-agent-message-response.d.ts +0 -39
- package/dist/resolvers/ai/abort-agent-message-response.js +0 -19
- package/dist/resolvers/ai/agent-chat-args.d.ts +0 -17
- package/dist/resolvers/ai/agent-chat-args.js +0 -14
- package/dist/resolvers/ai/agent-chat-payload.d.ts +0 -35
- package/dist/resolvers/ai/agent-chat-payload.js +0 -26
- package/dist/resolvers/ai/agent-chat-response.d.ts +0 -289
- package/dist/resolvers/ai/agent-chat-response.js +0 -21
- package/dist/resolvers/ai/agent-generate-args.d.ts +0 -17
- package/dist/resolvers/ai/agent-generate-args.js +0 -14
- package/dist/resolvers/ai/agent-message-input.d.ts +0 -73
- package/dist/resolvers/ai/agent-message-input.js +0 -39
- package/dist/resolvers/ai/agent-message-output.d.ts +0 -169
- package/dist/resolvers/ai/agent-message-output.js +0 -77
- package/dist/resolvers/ai/agent-message-payload.d.ts +0 -507
- package/dist/resolvers/ai/agent-message-payload.js +0 -156
- package/dist/resolvers/ai/agent-run-mode.d.ts +0 -7
- package/dist/resolvers/ai/agent-run-mode.js +0 -9
- package/dist/resolvers/ai/agent-session-payload.d.ts +0 -515
- package/dist/resolvers/ai/agent-session-payload.js +0 -175
- package/dist/resolvers/ai/create-agent-session-response.d.ts +0 -199
- package/dist/resolvers/ai/create-agent-session-response.js +0 -9
- package/dist/resolvers/ai/embedding-search.d.ts +0 -54
- package/dist/resolvers/ai/embedding-search.js +0 -46
- package/dist/resolvers/ai/get-agent-message-args.d.ts +0 -16
- package/dist/resolvers/ai/get-agent-message-args.js +0 -13
- package/dist/resolvers/ai/get-agent-message-response.d.ts +0 -805
- package/dist/resolvers/ai/get-agent-message-response.js +0 -63
- package/dist/resolvers/ai/inspect-agent-args.d.ts +0 -16
- package/dist/resolvers/ai/inspect-agent-args.js +0 -13
- package/dist/resolvers/ai/inspect-agent-response.d.ts +0 -504
- package/dist/resolvers/ai/inspect-agent-response.js +0 -48
- package/dist/resolvers/ai/send-agent-feedback-args.d.ts +0 -52
- package/dist/resolvers/ai/send-agent-feedback-args.js +0 -16
- package/dist/resolvers/ai/send-agent-message-args.d.ts +0 -48
- package/dist/resolvers/ai/send-agent-message-args.js +0 -36
- package/dist/resolvers/ai/send-agent-message-response.d.ts +0 -353
- package/dist/resolvers/ai/send-agent-message-response.js +0 -51
- package/dist/resolvers/ai/types.d.ts +0 -6
- package/dist/resolvers/ai/types.js +0 -1
- package/dist/resolvers/takeshape/assets/asset-image-meta.d.ts +0 -79
- package/dist/resolvers/takeshape/assets/asset-image-meta.js +0 -98
- package/dist/resolvers/takeshape/assets/asset-image-params.d.ts +0 -901
- package/dist/resolvers/takeshape/assets/asset-image-params.js +0 -726
- package/dist/resolvers/takeshape/assets/asset-image.d.ts +0 -17
- package/dist/resolvers/takeshape/assets/asset-image.js +0 -15
- package/dist/resolvers/takeshape/assets/asset.d.ts +0 -125
- package/dist/resolvers/takeshape/assets/asset.js +0 -107
- package/dist/resolvers/takeshape/assets/constants.d.ts +0 -11
- package/dist/resolvers/takeshape/assets/constants.js +0 -11
- package/dist/resolvers/takeshape/builtins/constants.d.ts +0 -1
- package/dist/resolvers/takeshape/builtins/constants.js +0 -1
- package/dist/runtime-schema.d.ts +0 -6
- package/dist/runtime-schema.js +0 -85
- package/dist/scalars.d.ts +0 -2
- package/dist/scalars.js +0 -4
- package/dist/schema-transform.d.ts +0 -19
- package/dist/schema-transform.js +0 -74
- package/dist/schema-util.d.ts +0 -266
- package/dist/schema-util.js +0 -1127
- package/dist/schemas/auth-schemas.json +0 -374
- package/dist/schemas/index.d.ts +0 -4
- package/dist/schemas/index.js +0 -170
- package/dist/schemas/project-schema/experimental-2025-07.json +0 -1297
- package/dist/schemas/project-schema/latest.d.ts +0 -180
- package/dist/schemas/project-schema/latest.js +0 -11
- package/dist/schemas/project-schema/latest.json +0 -4846
- package/dist/schemas/project-schema/meta-schema-v1.0.0.json +0 -193
- package/dist/schemas/project-schema/meta-schema-v3.0.0.json +0 -608
- package/dist/schemas/project-schema/meta-schema-v3.1.0.json +0 -608
- package/dist/schemas/project-schema/meta-schema-v3.2.0.json +0 -612
- package/dist/schemas/project-schema/meta-schema-v3.3.0.json +0 -612
- package/dist/schemas/project-schema/meta-schema-v3.4.0.json +0 -637
- package/dist/schemas/project-schema/meta-schema-v3.5.0.json +0 -626
- package/dist/schemas/project-schema/meta-schema-v3.5.1.json +0 -626
- package/dist/schemas/project-schema/meta-schema-v3.6.0.json +0 -629
- package/dist/schemas/project-schema/meta-schema-v3.7.0.json +0 -1137
- package/dist/schemas/project-schema/meta-schema-v3.8.0.json +0 -1137
- package/dist/schemas/project-schema/meta-schema-v3.9.0.json +0 -1477
- package/dist/schemas/project-schema/v1.0.0.json +0 -321
- package/dist/schemas/project-schema/v3.0.0.json +0 -414
- package/dist/schemas/project-schema/v3.1.0.json +0 -572
- package/dist/schemas/project-schema/v3.10.0.json +0 -2097
- package/dist/schemas/project-schema/v3.11.0.json +0 -2141
- package/dist/schemas/project-schema/v3.12.0.json +0 -2144
- package/dist/schemas/project-schema/v3.12.1.json +0 -2282
- package/dist/schemas/project-schema/v3.12.2.json +0 -2304
- package/dist/schemas/project-schema/v3.12.3.json +0 -2357
- package/dist/schemas/project-schema/v3.13.0.json +0 -2377
- package/dist/schemas/project-schema/v3.14.0.json +0 -2385
- package/dist/schemas/project-schema/v3.15.0.json +0 -2365
- package/dist/schemas/project-schema/v3.16.0.json +0 -2373
- package/dist/schemas/project-schema/v3.17.0.json +0 -2378
- package/dist/schemas/project-schema/v3.17.1.json +0 -2380
- package/dist/schemas/project-schema/v3.18.0.json +0 -2356
- package/dist/schemas/project-schema/v3.18.1.json +0 -2357
- package/dist/schemas/project-schema/v3.18.2.json +0 -2357
- package/dist/schemas/project-schema/v3.19.0.json +0 -2369
- package/dist/schemas/project-schema/v3.2.0.json +0 -580
- package/dist/schemas/project-schema/v3.20.0.json +0 -2369
- package/dist/schemas/project-schema/v3.21.0.json +0 -2376
- package/dist/schemas/project-schema/v3.22.0.json +0 -2381
- package/dist/schemas/project-schema/v3.23.0.json +0 -2456
- package/dist/schemas/project-schema/v3.24.0.json +0 -2556
- package/dist/schemas/project-schema/v3.25.0.json +0 -2552
- package/dist/schemas/project-schema/v3.26.0.json +0 -2599
- package/dist/schemas/project-schema/v3.27.0.json +0 -2611
- package/dist/schemas/project-schema/v3.28.0.json +0 -2656
- package/dist/schemas/project-schema/v3.29.0.json +0 -2670
- package/dist/schemas/project-schema/v3.3.0.json +0 -581
- package/dist/schemas/project-schema/v3.30.0.json +0 -2656
- package/dist/schemas/project-schema/v3.31.0.json +0 -2714
- package/dist/schemas/project-schema/v3.32.0.json +0 -2708
- package/dist/schemas/project-schema/v3.33.0.json +0 -2715
- package/dist/schemas/project-schema/v3.34.0.json +0 -2715
- package/dist/schemas/project-schema/v3.35.0.json +0 -2748
- package/dist/schemas/project-schema/v3.36.0.json +0 -2756
- package/dist/schemas/project-schema/v3.37.0.json +0 -2821
- package/dist/schemas/project-schema/v3.38.0.json +0 -2819
- package/dist/schemas/project-schema/v3.39.0.json +0 -2827
- package/dist/schemas/project-schema/v3.4.0.json +0 -571
- package/dist/schemas/project-schema/v3.40.0.json +0 -2830
- package/dist/schemas/project-schema/v3.41.0.json +0 -2830
- package/dist/schemas/project-schema/v3.42.0.json +0 -2835
- package/dist/schemas/project-schema/v3.43.0.json +0 -2841
- package/dist/schemas/project-schema/v3.44.0.json +0 -3013
- package/dist/schemas/project-schema/v3.45.0.json +0 -3064
- package/dist/schemas/project-schema/v3.46.0.json +0 -3136
- package/dist/schemas/project-schema/v3.47.0.json +0 -3189
- package/dist/schemas/project-schema/v3.48.0.json +0 -3196
- package/dist/schemas/project-schema/v3.49.0.json +0 -3239
- package/dist/schemas/project-schema/v3.5.0.json +0 -571
- package/dist/schemas/project-schema/v3.5.1.json +0 -571
- package/dist/schemas/project-schema/v3.50.0.json +0 -3320
- package/dist/schemas/project-schema/v3.51.0.json +0 -3326
- package/dist/schemas/project-schema/v3.52.0.json +0 -3326
- package/dist/schemas/project-schema/v3.53.0.json +0 -3476
- package/dist/schemas/project-schema/v3.54.0.json +0 -3512
- package/dist/schemas/project-schema/v3.55.0.json +0 -3515
- package/dist/schemas/project-schema/v3.56.0.json +0 -3530
- package/dist/schemas/project-schema/v3.57.0.json +0 -4815
- package/dist/schemas/project-schema/v3.58.0.json +0 -4815
- package/dist/schemas/project-schema/v3.59.0.json +0 -4846
- package/dist/schemas/project-schema/v3.6.0.json +0 -587
- package/dist/schemas/project-schema/v3.7.0.json +0 -587
- package/dist/schemas/project-schema/v3.8.0.json +0 -604
- package/dist/schemas/project-schema/v3.9.0.json +0 -604
- package/dist/schemas/project-schema/v4.0.0.json +0 -2316
- package/dist/schemas/project-schema.json +0 -214
- package/dist/service-dependencies.d.ts +0 -13
- package/dist/service-dependencies.js +0 -165
- package/dist/services/services.d.ts +0 -31
- package/dist/services/services.js +0 -145
- package/dist/services/types.d.ts +0 -11
- package/dist/services/types.js +0 -1
- package/dist/services/util.d.ts +0 -16
- package/dist/services/util.js +0 -36
- package/dist/shape-paths.d.ts +0 -7
- package/dist/shape-paths.js +0 -28
- package/dist/taxonomies.d.ts +0 -15
- package/dist/taxonomies.js +0 -24
- package/dist/template-shapes/index.d.ts +0 -7
- package/dist/template-shapes/index.js +0 -33
- package/dist/template-shapes/names.d.ts +0 -10
- package/dist/template-shapes/names.js +0 -21
- package/dist/template-shapes/templates.d.ts +0 -32
- package/dist/template-shapes/templates.js +0 -316
- package/dist/template-shapes/types.d.ts +0 -15
- package/dist/template-shapes/types.js +0 -7
- package/dist/template-shapes/where.d.ts +0 -37
- package/dist/template-shapes/where.js +0 -400
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.js +0 -2
- package/dist/types/transforms.d.ts +0 -15
- package/dist/types/transforms.js +0 -1
- package/dist/types/types.d.ts +0 -200
- package/dist/types/types.js +0 -10
- package/dist/types/utils.d.ts +0 -112
- package/dist/types/utils.js +0 -269
- package/dist/unions.d.ts +0 -14
- package/dist/unions.js +0 -77
- package/dist/util/ai-tools.d.ts +0 -2
- package/dist/util/ai-tools.js +0 -14
- package/dist/util/api-indexing.d.ts +0 -9
- package/dist/util/api-indexing.js +0 -57
- package/dist/util/coerce-value.d.ts +0 -9
- package/dist/util/coerce-value.js +0 -32
- package/dist/util/detect-cycles.d.ts +0 -7
- package/dist/util/detect-cycles.js +0 -45
- package/dist/util/expressions.d.ts +0 -34
- package/dist/util/expressions.js +0 -350
- package/dist/util/find-shape-at-path.d.ts +0 -21
- package/dist/util/find-shape-at-path.js +0 -53
- package/dist/util/form-config.d.ts +0 -11
- package/dist/util/form-config.js +0 -62
- package/dist/util/get-conflicting-properties.d.ts +0 -6
- package/dist/util/get-conflicting-properties.js +0 -55
- package/dist/util/get-return-shape.d.ts +0 -4
- package/dist/util/get-return-shape.js +0 -30
- package/dist/util/has-arg.d.ts +0 -6
- package/dist/util/has-arg.js +0 -25
- package/dist/util/is-asset-property.d.ts +0 -3
- package/dist/util/is-asset-property.js +0 -11
- package/dist/util/mcp.d.ts +0 -8
- package/dist/util/mcp.js +0 -21
- package/dist/util/merge.d.ts +0 -15
- package/dist/util/merge.js +0 -254
- package/dist/util/patch-schema.d.ts +0 -8
- package/dist/util/patch-schema.js +0 -51
- package/dist/util/query-field-path.d.ts +0 -9
- package/dist/util/query-field-path.js +0 -23
- package/dist/util/shapes.d.ts +0 -5
- package/dist/util/shapes.js +0 -22
- package/dist/validate/ai.d.ts +0 -6
- package/dist/validate/ai.js +0 -183
- package/dist/validate/errors.d.ts +0 -3
- package/dist/validate/errors.js +0 -20
- package/dist/validate/types.d.ts +0 -1
- package/dist/validate/types.js +0 -1
- package/dist/validate/util.d.ts +0 -3
- package/dist/validate/util.js +0 -28
- package/dist/validate/validate.d.ts +0 -80
- package/dist/validate/validate.js +0 -1058
- package/dist/versions.d.ts +0 -4
- package/dist/versions.js +0 -4
- package/dist/workflows.d.ts +0 -14
- package/dist/workflows.js +0 -66
package/dist/schema-util.d.ts
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { type Maybe } from '@takeshape/util';
|
|
2
|
-
import { type SchemaDefaultsOptions } from './builtin-schema.ts';
|
|
3
|
-
import type { ProjectSchemaJSON, PropertySchema, QueryJSON, ServiceConfig, ShapeJSON, ShapeMap, ShapeSchema } from './project-schema/index.ts';
|
|
4
|
-
import { type RefItem, type RefItemWithPath, type ServicesContext, type ServicesShapesContext } from './refs.ts';
|
|
5
|
-
import { type LatestProjectSchemaWithServices, type LayerSchema, type SchemaPath, type SchemaPropertyName, type SchemaPropertyNode, type SchemaWithArgs, type ServiceMap } from './types/index.ts';
|
|
6
|
-
export declare function isBuiltinShape(ref: string): boolean;
|
|
7
|
-
export declare function isBuiltinQuery(name: string): boolean;
|
|
8
|
-
export declare function isBuiltinMutation(name: string): boolean;
|
|
9
|
-
export declare function isBuiltinType(projectSchema: ProjectSchemaJSON, refSchema: PropertySchema): boolean;
|
|
10
|
-
export declare const schemaMetadataKeys: readonly ["$comment", "title", "description", "@l10n", "@deprecationReason", "@tag", "@tags", "@syncLocaleStructure", "@sensitive"];
|
|
11
|
-
export declare const commonSchemaKeys: readonly ["type", "default", "readOnly", "$comment", "title", "description", "@l10n", "@deprecationReason", "@tag", "@tags", "@syncLocaleStructure", "@sensitive"];
|
|
12
|
-
export declare const scalarSchemaKeys: readonly ["type", "default", "readOnly", "$comment", "title", "description", "@l10n", "@deprecationReason", "@tag", "@tags", "@syncLocaleStructure", "@sensitive", "format", "oneOf", "multipleOf", "maximum", "exclusiveMaximum", "minimum", "exclusiveMinimum", "maxLength", "minLength", "pattern"];
|
|
13
|
-
export declare const objectSchemaKeys: readonly ["type", "default", "readOnly", "$comment", "title", "description", "@l10n", "@deprecationReason", "@tag", "@tags", "@syncLocaleStructure", "@sensitive", "properties", "required"];
|
|
14
|
-
export declare const arraySchemaKeys: readonly ["type", "default", "readOnly", "$comment", "title", "description", "@l10n", "@deprecationReason", "@tag", "@tags", "@syncLocaleStructure", "@sensitive", "items", "additionalItems", "maxItems", "minItems", "uniqueItems"];
|
|
15
|
-
export declare const multipleRelationshipSchemaKeys: string[];
|
|
16
|
-
export declare const nonStructuralSchemaKeys: string[];
|
|
17
|
-
export declare function getServiceIdFieldName(serviceFieldName: string): string;
|
|
18
|
-
export declare function getGeneratorVersion(generator: string): string;
|
|
19
|
-
export declare function pathBetween(fromShape: ShapeJSON, toShape: ShapeJSON, projectSchema: ProjectSchemaJSON, depthLimit?: number): string[];
|
|
20
|
-
type ShapeModelInfo = Pick<ShapeJSON, 'name' | 'model'>;
|
|
21
|
-
export declare function getShapeQueriesAndMutations(shapes: ShapeModelInfo | ShapeModelInfo[]): Pick<ProjectSchemaJSON, 'queries' | 'mutations'>;
|
|
22
|
-
export declare function getCommonBuiltInProperties(shape: Pick<ShapeJSON, 'id'>): Record<string, PropertySchema>;
|
|
23
|
-
export declare const DEFAULT_ID_FIELD = "id";
|
|
24
|
-
export declare function getIdField(obj?: {
|
|
25
|
-
idField?: string;
|
|
26
|
-
}): string;
|
|
27
|
-
export declare function getModelBuiltInProperties(projectSchema: Partial<Pick<ProjectSchemaJSON, 'apiVersion' | 'workflows'>>, shape: Pick<ShapeJSON, 'id' | 'workflow'>): Record<string, PropertySchema>;
|
|
28
|
-
/**
|
|
29
|
-
* Return all the built in property names,
|
|
30
|
-
*/
|
|
31
|
-
export declare function getBuiltInPropertyNames(profile?: BuiltInPropertiesProfile): Set<string>;
|
|
32
|
-
export declare enum BuiltInPropertiesProfile {
|
|
33
|
-
Model = 0,
|
|
34
|
-
Cached = 1,
|
|
35
|
-
None = 2
|
|
36
|
-
}
|
|
37
|
-
export declare const isBuiltInPropertyName: (name: string, profile?: BuiltInPropertiesProfile) => boolean;
|
|
38
|
-
export declare function applyBuiltinPropertiesToShape(projectSchema: ProjectSchemaJSON, shape: ShapeJSON): ShapeJSON;
|
|
39
|
-
/**
|
|
40
|
-
* Get all built-in shapes that are depended on by the given project schema.
|
|
41
|
-
* Required built-in shapes are always included.
|
|
42
|
-
*/
|
|
43
|
-
export declare function getBuiltinsUsed(builtInShapes: ShapeMap, projectSchema: ProjectSchemaJSON): ShapeMap;
|
|
44
|
-
export declare function applyDefaultsToSchema<T extends ProjectSchemaJSON>(projectSchema: T, options?: SchemaDefaultsOptions): T;
|
|
45
|
-
export declare function getArgsReference(projectSchema: ServicesContext, argsSchema: SchemaWithArgs): Maybe<RefItem>;
|
|
46
|
-
export declare function getArgsReferenceWithPath(context: ServicesContext, argsSchema: SchemaWithArgs, schemaPath?: SchemaPath): Maybe<RefItemWithPath>;
|
|
47
|
-
export declare function getArgsShapeSchema(context: ServicesShapesContext, argsSchema: SchemaWithArgs): Maybe<ShapeSchema>;
|
|
48
|
-
export declare function shapeToPropertySchema(projectSchema: ProjectSchemaJSON, shape: ShapeJSON): PropertySchema;
|
|
49
|
-
/**
|
|
50
|
-
* Currently this is not 100% valid JSON schema, but its output can be used with createSchemaValidator
|
|
51
|
-
*/
|
|
52
|
-
export declare function shapeToJsonSchema(projectSchema: ProjectSchemaJSON, shape: ShapeJSON): {
|
|
53
|
-
definitions: Record<string, PropertySchema>;
|
|
54
|
-
$ref?: string;
|
|
55
|
-
title?: string;
|
|
56
|
-
description?: string;
|
|
57
|
-
default?: any;
|
|
58
|
-
readOnly?: boolean;
|
|
59
|
-
multipleOf?: number;
|
|
60
|
-
maximum?: number;
|
|
61
|
-
exclusiveMaximum?: number;
|
|
62
|
-
minimum?: number;
|
|
63
|
-
exclusiveMinimum?: number;
|
|
64
|
-
maxLength?: import("./project-schema/latest.ts").NonNegativeInteger;
|
|
65
|
-
minLength?: import("./project-schema/latest.ts").NonNegativeIntegerDefault0;
|
|
66
|
-
pattern?: string;
|
|
67
|
-
additionalItems?: PropertySchema;
|
|
68
|
-
items?: PropertySchema;
|
|
69
|
-
maxItems?: import("./project-schema/latest.ts").NonNegativeInteger;
|
|
70
|
-
minItems?: import("./project-schema/latest.ts").NonNegativeIntegerDefault0;
|
|
71
|
-
uniqueItems?: boolean;
|
|
72
|
-
contains?: PropertySchema;
|
|
73
|
-
maxProperties?: import("./project-schema/latest.ts").NonNegativeInteger;
|
|
74
|
-
minProperties?: import("./project-schema/latest.ts").NonNegativeIntegerDefault0;
|
|
75
|
-
required?: import("./project-schema/latest.ts").StringArray;
|
|
76
|
-
additionalProperties?: PropertySchema | false;
|
|
77
|
-
properties?: {
|
|
78
|
-
[k: string]: PropertySchema;
|
|
79
|
-
};
|
|
80
|
-
const?: any;
|
|
81
|
-
enum?: any[];
|
|
82
|
-
type?: import("./project-schema/latest.ts").SimpleTypes | import("./project-schema/latest.ts").SimpleTypes[];
|
|
83
|
-
format?: string;
|
|
84
|
-
contentMediaType?: string;
|
|
85
|
-
contentEncoding?: string;
|
|
86
|
-
allOf?: import("./project-schema/latest.ts").SchemaArray;
|
|
87
|
-
discriminator?: {
|
|
88
|
-
propertyName?: string;
|
|
89
|
-
[k: string]: any;
|
|
90
|
-
};
|
|
91
|
-
oneOf?: import("./project-schema/latest.ts").SchemaArray;
|
|
92
|
-
extends?: import("./project-schema/latest.ts").ObjectOrRefArray;
|
|
93
|
-
'@backreference'?: import("./project-schema/latest.ts").BackReference;
|
|
94
|
-
'@input'?: PropertySchema;
|
|
95
|
-
'@output'?: PropertySchema;
|
|
96
|
-
'@syncLocaleStructure'?: boolean;
|
|
97
|
-
'@sensitive'?: boolean;
|
|
98
|
-
'@draftjs'?: boolean;
|
|
99
|
-
'@l10n'?: boolean;
|
|
100
|
-
'@key'?: string;
|
|
101
|
-
'@workflow'?: string;
|
|
102
|
-
'@mapping'?: import("./project-schema/latest.ts").FieldMapping;
|
|
103
|
-
'@tag'?: string;
|
|
104
|
-
'@tags'?: string[];
|
|
105
|
-
'@deprecationReason'?: string;
|
|
106
|
-
'@args'?: import("./project-schema/latest.ts").Args;
|
|
107
|
-
'@resolver'?: import("./project-schema/latest.ts").Resolver;
|
|
108
|
-
'@dependencies'?: import("./project-schema/latest.ts").Dependencies;
|
|
109
|
-
'@ref'?: import("./project-schema/latest.ts").Ref;
|
|
110
|
-
'@derivedFrom'?: string;
|
|
111
|
-
'@indexed'?: import("./project-schema/latest.ts").Indexed;
|
|
112
|
-
'@graphql'?: import("./project-schema/latest.ts").GraphQLConfig;
|
|
113
|
-
$id: string;
|
|
114
|
-
};
|
|
115
|
-
export declare function projectSchemaToJSONSchema(projectSchema: ProjectSchemaJSON): {
|
|
116
|
-
definitions: Record<string, PropertySchema>;
|
|
117
|
-
};
|
|
118
|
-
export declare function getShapeDependencies(projectSchema: ProjectSchemaJSON, shape: ShapeJSON, predicate?: (propSchema: PropertySchema) => boolean): string[];
|
|
119
|
-
type GetRelevantShapesParams = {
|
|
120
|
-
shapeNames?: string[];
|
|
121
|
-
shapeIds?: string[];
|
|
122
|
-
byId?: boolean;
|
|
123
|
-
includeDependencies?: boolean;
|
|
124
|
-
};
|
|
125
|
-
export declare function getRelevantShapes(projectSchema: ProjectSchemaJSON, params: GetRelevantShapesParams): ShapeMap;
|
|
126
|
-
/**
|
|
127
|
-
* Visitor callback return false to stop iterating
|
|
128
|
-
*/
|
|
129
|
-
export type PropertyVisitorCallback = ((schema: PropertySchema, path: SchemaPath) => boolean) | ((schema: PropertySchema, path: SchemaPath) => void);
|
|
130
|
-
export declare function visitSchemaProperties(root: PropertySchema, path: SchemaPath, callback: PropertyVisitorCallback): void;
|
|
131
|
-
export declare function visitShapeProperties(shapes: ShapeMap, callback: PropertyVisitorCallback): void;
|
|
132
|
-
export type RefPredicate = (ref: RefItemWithPath) => boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Walk through a `ProjectSchemaJSON` and collect all the `ref`s.
|
|
135
|
-
*/
|
|
136
|
-
export declare function getAllRefsInShapes(projectSchema: ServicesShapesContext, predicate?: RefPredicate): RefItemWithPath[];
|
|
137
|
-
export declare function getRefsInAgents(context: Pick<ProjectSchemaJSON, 'services' | 'agents'>, predicate?: RefPredicate): RefItemWithPath[];
|
|
138
|
-
/**
|
|
139
|
-
* Get all refs
|
|
140
|
-
*/
|
|
141
|
-
export declare function getAllRefsInQuery(projectSchema: ServicesShapesContext, queryPath: string[], query: QueryJSON, predicate?: (ref: RefItemWithPath) => boolean): RefItemWithPath[];
|
|
142
|
-
/**
|
|
143
|
-
* Collect refs from `queries` or `mutations`.
|
|
144
|
-
*/
|
|
145
|
-
export declare function getAllRefsInQueries(projectSchema: Pick<ProjectSchemaJSON, 'queries' | 'mutations' | 'shapes' | 'services'>, rootPropertyName: 'queries' | 'mutations', predicate?: RefPredicate): RefItemWithPath[];
|
|
146
|
-
/**
|
|
147
|
-
* Get all refs in a ProjectSchemaJSON
|
|
148
|
-
* @param predicate return true to include the ref in
|
|
149
|
-
*/
|
|
150
|
-
export declare function getAllRefs(projectSchema: Pick<ProjectSchemaJSON, 'queries' | 'mutations' | 'shapes' | 'services' | 'agents'>, predicate?: RefPredicate): RefItemWithPath[];
|
|
151
|
-
/**
|
|
152
|
-
* Get all valid refs in a ProjectSchemaJSON
|
|
153
|
-
* @param predicate return true to include the ref in
|
|
154
|
-
*/
|
|
155
|
-
export declare function getAllValidRefs(projectSchema: Pick<ProjectSchemaJSON, 'queries' | 'mutations' | 'shapes' | 'services'>, predicate?: RefPredicate): RefItemWithPath[];
|
|
156
|
-
export declare function splitMapping(mapping: string): string[];
|
|
157
|
-
export declare function findMapping(schema: PropertySchema, predicate: (mappingStr: string) => boolean): string | undefined;
|
|
158
|
-
export declare function getFirstMapping(schema: PropertySchema): string | undefined;
|
|
159
|
-
/**
|
|
160
|
-
* Find key for use storing data in ShapeDB or API Indexing this allows renaming of properties without db migration
|
|
161
|
-
* Mapping must be using the shapedb service id
|
|
162
|
-
* @param schema
|
|
163
|
-
*/
|
|
164
|
-
export declare function getStorageKey(schema: PropertySchema): string | undefined;
|
|
165
|
-
export declare function emptySchema(projectId: string): ProjectSchemaJSON;
|
|
166
|
-
export declare function createLayerSchema(partialSchema?: Partial<LayerSchema>): LayerSchema;
|
|
167
|
-
export declare function getShapesById(projectSchema: ProjectSchemaJSON): ShapeMap;
|
|
168
|
-
/**
|
|
169
|
-
* Walk through the project schema and return an array of all
|
|
170
|
-
* referenced shape names that are in a service namespace.
|
|
171
|
-
*
|
|
172
|
-
* @param projectSchema A V3 project schema.
|
|
173
|
-
*
|
|
174
|
-
* @returns A `string` array with all the shapes that are in namespaces.
|
|
175
|
-
*/
|
|
176
|
-
export declare function getAllNamespaceShapes(projectSchema: ProjectSchemaJSON): string[];
|
|
177
|
-
/**
|
|
178
|
-
* Returns a list of all shape names in a service namespace, excluding any
|
|
179
|
-
* that have been set directly in the project schema
|
|
180
|
-
*
|
|
181
|
-
* @todo It's unsound to discard dependencies in this way, should avoid
|
|
182
|
-
* collisions with aliases or similar any remote shape that collides,
|
|
183
|
-
* e.g., Shopify_Product -> Shopify_Product_2
|
|
184
|
-
*
|
|
185
|
-
* @param projectSchema A V3 project schema with remote service configs.
|
|
186
|
-
*
|
|
187
|
-
* @returns A `Set` of shape names.
|
|
188
|
-
*/
|
|
189
|
-
export declare function getNamespacedShapeNameList(projectSchema: LatestProjectSchemaWithServices): Set<string>;
|
|
190
|
-
/**
|
|
191
|
-
* Filter the service map to return only services passing the GraphQL Service
|
|
192
|
-
* typeguard.
|
|
193
|
-
*
|
|
194
|
-
* @param serviceMap A service map.
|
|
195
|
-
*
|
|
196
|
-
* @returns A new map with the filtered list of services
|
|
197
|
-
*/
|
|
198
|
-
export declare function filterGraphQLServiceMap(serviceMap: ServiceMap): Map<string, ServiceConfig>;
|
|
199
|
-
/**
|
|
200
|
-
* Creates a schema property list chainable fn, allowing you to manipulate and
|
|
201
|
-
* iterate the properties in a schema.
|
|
202
|
-
*/
|
|
203
|
-
export declare const createSchemaPropertyList: import("lodash").CurriedFunction2<ServicesShapesContext, PropertySchema | ShapeJSON, {
|
|
204
|
-
_propertyIterator: Map<string, PropertySchema>;
|
|
205
|
-
orderBy: (iteratees?: ((n: SchemaPropertyNode) => string)[], orders?: ("asc" | "desc")[]) => /*elided*/ any;
|
|
206
|
-
sortWith: (comparator?: (a: SchemaPropertyNode, b: SchemaPropertyNode) => number) => /*elided*/ any;
|
|
207
|
-
sortByNamesWithList: (comparatorArray?: string[]) => /*elided*/ any;
|
|
208
|
-
filterBy: (predicate: (n: SchemaPropertyNode) => boolean) => /*elided*/ any;
|
|
209
|
-
forEach: (iteratee: (n: SchemaPropertyNode) => void) => /*elided*/ any;
|
|
210
|
-
getNodes: () => SchemaPropertyNode[];
|
|
211
|
-
getObject: () => Record<string, PropertySchema>;
|
|
212
|
-
getNames: () => SchemaPropertyName[];
|
|
213
|
-
getValues: () => PropertySchema[];
|
|
214
|
-
}>;
|
|
215
|
-
declare class SchemaPropertyAccessor {
|
|
216
|
-
private readonly schema;
|
|
217
|
-
private readonly properties;
|
|
218
|
-
private readonly entries;
|
|
219
|
-
constructor(context: ServicesShapesContext, shapeOrSchema: PropertySchema | ShapeJSON);
|
|
220
|
-
getValue(propertyName: SchemaPropertyName): Maybe<PropertySchema>;
|
|
221
|
-
findValue(predicate: (n: SchemaPropertyNode) => boolean): Maybe<PropertySchema>;
|
|
222
|
-
findName(predicate: (n: SchemaPropertyNode) => boolean): Maybe<SchemaPropertyName>;
|
|
223
|
-
getKey(propertyName: SchemaPropertyName): Maybe<string>;
|
|
224
|
-
}
|
|
225
|
-
export type { SchemaPropertyAccessor };
|
|
226
|
-
/**
|
|
227
|
-
* Creates a schema property accessor, allowing you to safely access schema
|
|
228
|
-
* properties.
|
|
229
|
-
*/
|
|
230
|
-
export declare const createSchemaPropertyAccessor: import("lodash").CurriedFunction2<ServicesShapesContext, PropertySchema | ShapeJSON, SchemaPropertyAccessor>;
|
|
231
|
-
export type QueryMutationSlice = Pick<ProjectSchemaJSON, 'queries' | 'mutations'>;
|
|
232
|
-
/**
|
|
233
|
-
* Find the query in the schema that corresponds to the given shape and resolver.
|
|
234
|
-
*/
|
|
235
|
-
export declare const findQueryByShape: (projectSchema: QueryMutationSlice, shapeName: string, resolver: string) => string | undefined;
|
|
236
|
-
/**
|
|
237
|
-
* Find the query in the schema that corresponds to the given shape and resolver.
|
|
238
|
-
*/
|
|
239
|
-
export declare const findMutationByShape: (projectSchema: QueryMutationSlice, shapeName: string, resolver: string) => string | undefined;
|
|
240
|
-
/**
|
|
241
|
-
* Find the query in the schema that corresponds to the given shape and resolver.
|
|
242
|
-
* Throw an error if that query does not exist
|
|
243
|
-
*/
|
|
244
|
-
export declare const ensureQueryByShape: (projectSchema: QueryMutationSlice, shapeName: string, resolver: string) => string;
|
|
245
|
-
/**
|
|
246
|
-
* Find the mutation in the schema that corresponds to the given shape and resolver.
|
|
247
|
-
* Throw an error if that mutation does not exist
|
|
248
|
-
*/
|
|
249
|
-
export declare const ensureMutationByShape: (projectSchema: QueryMutationSlice, shapeName: string, resolver: string) => string;
|
|
250
|
-
export type ResolverWithDefaultMutation = 'shapedb:create' | 'shapedb:update' | 'shapedb:delete' | 'shapedb:duplicate';
|
|
251
|
-
/**
|
|
252
|
-
* Find the query in the schema that corresponds to the given shape and resolver.
|
|
253
|
-
*/
|
|
254
|
-
export declare const getDefaultMutationName: (shapeName: string, resolver: ResolverWithDefaultMutation) => string;
|
|
255
|
-
export declare function createShape(name: string, schema: ShapeSchema, rest?: Partial<ShapeJSON>): ShapeJSON;
|
|
256
|
-
export declare function queryToPropertySchema(projectSchema: ProjectSchemaJSON, query: QueryJSON): PropertySchema;
|
|
257
|
-
export declare function getQueriesShape(projectSchema: ProjectSchemaJSON, operation: 'query' | 'mutation'): ShapeJSON;
|
|
258
|
-
/**
|
|
259
|
-
* Return true if `schemaWithRef` is a ref to a shape named `shapeName`
|
|
260
|
-
*/
|
|
261
|
-
export declare function schemaMatchesShapeName(workingCopy: ProjectSchemaJSON, propertySchema: PropertySchema, shapeName: string): boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Return true if `shape` has a property that is an array of refs to `shapeName`
|
|
264
|
-
*/
|
|
265
|
-
export declare const shapeHasArrayPropOfShape: (projectSchema: ProjectSchemaJSON, shape: ShapeJSON, shapeName: string) => boolean;
|
|
266
|
-
export declare const getQueryMapName: (type: "query" | "mutation") => "queries" | "mutations";
|