@aws/nx-plugin 1.0.0-rc.7 → 1.0.0-rc.71
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/LICENSE-THIRD-PARTY +7044 -6135
- package/README.md +9 -7
- package/generators.json +152 -10
- package/migrations.json +161 -0
- package/package.json +41 -22
- package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +295 -0
- package/src/agentcore-gateway/agent-connection/generator.d.ts +19 -0
- package/src/agentcore-gateway/agent-connection/generator.js +95 -0
- package/src/agentcore-gateway/agent-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/agent-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/agent-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/agent-connection/schema.d.ts +13 -0
- package/src/agentcore-gateway/agent-connection/schema.json +31 -0
- package/src/agentcore-gateway/attach-upstream.d.ts +49 -0
- package/src/agentcore-gateway/attach-upstream.js +59 -0
- package/src/agentcore-gateway/attach-upstream.js.map +1 -0
- package/src/agentcore-gateway/files/cedar/policies/README.md +61 -0
- package/src/agentcore-gateway/files/cedar/policies/permit-all.cedar +26 -0
- package/src/agentcore-gateway/files/project/http/local-dev.ts.template +77 -0
- package/src/agentcore-gateway/files/project/mcp/local-dev.ts.template +134 -0
- package/src/agentcore-gateway/gateway-connection/generator.d.ts +21 -0
- package/src/agentcore-gateway/gateway-connection/generator.js +103 -0
- package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.ts +13 -0
- package/src/agentcore-gateway/gateway-connection/schema.json +31 -0
- package/src/agentcore-gateway/generator.d.ts +89 -0
- package/src/agentcore-gateway/generator.js +212 -0
- package/src/agentcore-gateway/generator.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/generator.d.ts +19 -0
- package/src/agentcore-gateway/mcp-connection/generator.js +61 -0
- package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.ts +13 -0
- package/src/agentcore-gateway/mcp-connection/schema.json +31 -0
- package/src/agentcore-gateway/react-connection/__snapshots__/generator.spec.ts.snap +68 -0
- package/src/agentcore-gateway/react-connection/generator.d.ts +19 -0
- package/src/agentcore-gateway/react-connection/generator.js +119 -0
- package/src/agentcore-gateway/react-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/react-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/react-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/react-connection/schema.d.ts +13 -0
- package/src/agentcore-gateway/react-connection/schema.json +31 -0
- package/src/agentcore-gateway/schema.d.js +6 -0
- package/src/agentcore-gateway/schema.d.js.map +1 -0
- package/src/agentcore-gateway/schema.d.ts +17 -0
- package/src/agentcore-gateway/schema.json +72 -0
- package/src/agentcore-harness/__snapshots__/generator.spec.ts.snap +238 -0
- package/src/agentcore-harness/files/project/README.md.template +83 -0
- package/src/agentcore-harness/files/project/scripts/chat.ts.template +99 -0
- package/src/agentcore-harness/files/project/src/PROMPT.md.template +16 -0
- package/src/agentcore-harness/generator.d.ts +62 -0
- package/src/agentcore-harness/generator.js +158 -0
- package/src/agentcore-harness/generator.js.map +1 -0
- package/src/agentcore-harness/schema.d.js +8 -0
- package/src/agentcore-harness/schema.d.js.map +1 -0
- package/src/agentcore-harness/schema.d.ts +17 -0
- package/src/agentcore-harness/schema.json +53 -0
- package/src/connection/agent-local-dev.d.ts +49 -0
- package/src/connection/agent-local-dev.js +84 -0
- package/src/connection/agent-local-dev.js.map +1 -0
- package/src/connection/agent-runtime-config.js +9 -14
- package/src/connection/agent-runtime-config.js.map +1 -1
- package/src/connection/gateway-runtime-config.d.ts +19 -0
- package/src/connection/gateway-runtime-config.js +47 -0
- package/src/connection/gateway-runtime-config.js.map +1 -0
- package/src/connection/generator.d.ts +3 -10
- package/src/connection/generator.js +172 -194
- package/src/connection/generator.js.map +1 -1
- package/src/connection/{serve-local.d.ts → local-dev.d.ts} +3 -3
- package/src/connection/local-dev.js +37 -0
- package/src/connection/local-dev.js.map +1 -0
- package/src/connection/scaffold-catalog.d.ts +267 -0
- package/src/connection/scaffold-catalog.js +347 -0
- package/src/connection/scaffold-catalog.js.map +1 -0
- package/src/connection/schema-resolver.d.ts +5 -0
- package/src/connection/schema-resolver.js +27 -0
- package/src/connection/schema-resolver.js.map +1 -0
- package/src/connection/schema.d.js +6 -0
- package/src/connection/schema.d.js.map +1 -0
- package/src/connection/schema.d.ts +1 -0
- package/src/connection/schema.json +5 -0
- package/src/connection/supported-connections.d.ts +116 -0
- package/src/connection/supported-connections.js +163 -0
- package/src/connection/supported-connections.js.map +1 -0
- package/src/index.js +2 -5
- package/src/index.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +119 -72
- package/src/infra/app/files/app/README.md.template +8 -4
- package/src/infra/app/files/app/src/main.ts.template +5 -1
- package/src/infra/app/files/app/src/stages/application-stage.ts.template +1 -1
- package/src/infra/app/generator.d.ts +43 -0
- package/src/infra/app/generator.js +195 -127
- package/src/infra/app/generator.js.map +1 -1
- package/src/infra/app/schema.d.js +6 -0
- package/src/infra/app/schema.d.js.map +1 -0
- package/src/infra/app/schema.d.ts +1 -1
- package/src/infra/app/schema.json +5 -0
- package/src/init/generator.d.ts +31 -0
- package/src/init/generator.js +46 -0
- package/src/init/generator.js.map +1 -0
- package/src/init/schema.d.js +6 -0
- package/src/init/schema.d.js.map +1 -0
- package/src/init/schema.d.ts +16 -0
- package/src/init/schema.json +35 -0
- package/src/internal/test-matrix/generator.d.ts +29 -0
- package/src/internal/test-matrix/generator.js +698 -0
- package/src/internal/test-matrix/generator.js.map +1 -0
- package/src/internal/test-matrix/schema.d.js +6 -0
- package/src/internal/test-matrix/schema.d.js.map +1 -0
- package/src/internal/test-matrix/schema.d.ts +12 -0
- package/src/internal/test-matrix/schema.json +21 -0
- package/src/license/config-types.js +5 -3
- package/src/license/config-types.js.map +1 -1
- package/src/license/config.d.ts +1 -1
- package/src/license/config.js +267 -242
- package/src/license/config.js.map +1 -1
- package/src/license/dependency-check/check.js +51 -46
- package/src/license/dependency-check/check.js.map +1 -1
- package/src/license/dependency-check/collectors/collector.js +41 -71
- package/src/license/dependency-check/collectors/collector.js.map +1 -1
- package/src/license/dependency-check/collectors/npm-collector.js +34 -41
- package/src/license/dependency-check/collectors/npm-collector.js.map +1 -1
- package/src/license/dependency-check/collectors/python-collector.js +55 -62
- package/src/license/dependency-check/collectors/python-collector.js.map +1 -1
- package/src/license/dependency-check/evaluator.js +40 -68
- package/src/license/dependency-check/evaluator.js.map +1 -1
- package/src/license/dependency-check/executor.js +30 -22
- package/src/license/dependency-check/executor.js.map +1 -1
- package/src/license/dependency-check/pre-approved.js +949 -336
- package/src/license/dependency-check/pre-approved.js.map +1 -1
- package/src/license/dependency-check/types.js +2 -3
- package/src/license/dependency-check/types.js.map +1 -1
- package/src/license/generator.js +65 -68
- package/src/license/generator.js.map +1 -1
- package/src/license/index.js +3 -9
- package/src/license/index.js.map +1 -1
- package/src/license/known-exceptions.d.ts +1 -1
- package/src/license/known-exceptions.js +19 -13
- package/src/license/known-exceptions.js.map +1 -1
- package/src/license/schema.d.js +6 -0
- package/src/license/schema.d.js.map +1 -0
- package/src/license/schema.d.ts +2 -0
- package/src/license/schema.json +5 -0
- package/src/license/sync/generator.js +94 -119
- package/src/license/sync/generator.js.map +1 -1
- package/src/license/sync/project-file-sync.js +28 -35
- package/src/license/sync/project-file-sync.js.map +1 -1
- package/src/mcp-server/dev-server.d.ts +1 -0
- package/src/mcp-server/dev-server.js +18 -0
- package/src/mcp-server/dev-server.js.map +1 -0
- package/src/mcp-server/generator-info.js +149 -165
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/guide-pipeline.js +199 -206
- package/src/mcp-server/guide-pipeline.js.map +1 -1
- package/src/mcp-server/guide-render.js +10 -25
- package/src/mcp-server/guide-render.js.map +1 -1
- package/src/mcp-server/index.js +6 -10
- package/src/mcp-server/index.js.map +1 -1
- package/src/mcp-server/mdx-ast.js +39 -57
- package/src/mcp-server/mdx-ast.js.map +1 -1
- package/src/mcp-server/option-filter.js +33 -47
- package/src/mcp-server/option-filter.js.map +1 -1
- package/src/mcp-server/schema-registry.d.ts +9 -3
- package/src/mcp-server/schema-registry.js +41 -38
- package/src/mcp-server/schema-registry.js.map +1 -1
- package/src/mcp-server/schema.d.ts +1 -1
- package/src/mcp-server/schema.js +9 -7
- package/src/mcp-server/schema.js.map +1 -1
- package/src/mcp-server/server.js +24 -24
- package/src/mcp-server/server.js.map +1 -1
- package/src/mcp-server/tools/add-to-existing-project.d.ts +12 -0
- package/src/mcp-server/tools/add-to-existing-project.js +36 -0
- package/src/mcp-server/tools/add-to-existing-project.js.map +1 -0
- package/src/mcp-server/tools/create-workspace-command.js +23 -24
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.d.ts +1 -1
- package/src/mcp-server/tools/general-guidance.js +55 -32
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.js +29 -37
- package/src/mcp-server/tools/generator-guide.js.map +1 -1
- package/src/mcp-server/tools/list-generators.js +19 -25
- package/src/mcp-server/tools/list-generators.js.map +1 -1
- package/src/mcp-server/tools/upgrade-workspace.d.ts +11 -0
- package/src/mcp-server/tools/upgrade-workspace.js +32 -0
- package/src/mcp-server/tools/upgrade-workspace.js.map +1 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/metadata.json +3 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.d.ts +6 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.js +329 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.js.map +1 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/metadata.json +3 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/migration.d.ts +6 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/migration.js +234 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/migration.js.map +1 -0
- package/src/migrations/latest/smithy-server-package-rename/metadata.json +3 -0
- package/src/migrations/latest/smithy-server-package-rename/migration.d.ts +6 -0
- package/src/migrations/latest/smithy-server-package-rename/migration.js +123 -0
- package/src/migrations/latest/smithy-server-package-rename/migration.js.map +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/build-system-prompt.ts.fixture +23 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/build-user-prompt.ts.fixture +96 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/config-path.ts.fixture +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/file-to-translate.ts.fixture +10 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/get-files-to-translate.ts.fixture +96 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/header.ts.fixture +15 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/log.ts.fixture +18 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/main-call.ts.fixture +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/main.ts.fixture +79 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/project-root.ts.fixture +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/run-with-concurrency.ts.fixture +57 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/scripts-dir.ts.fixture +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/translate-file-for-language.ts.fixture +61 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/already-migrated.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/build-system-prompt.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/build-user-prompt.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/config-path.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/file-to-translate.grit +11 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/get-files-to-translate.grit +7 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/log.grit +3 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/main-call.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/main.grit +8 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/project-root.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/run-with-concurrency.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/translate-file-for-language.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/metadata.json +3 -0
- package/src/migrations/latest/translate-script-whole-file-writes/migration.d.ts +2 -0
- package/src/migrations/latest/translate-script-whole-file-writes/migration.js +103 -0
- package/src/migrations/latest/translate-script-whole-file-writes/migration.js.map +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/test-fixtures/released-script-first.ts.fixture +430 -0
- package/src/migrations/latest/translate-script-whole-file-writes/test-fixtures/released-script.ts.fixture +431 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.js +65 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.js +108 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.js +128 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.js +215 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.js +93 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.d.ts +96 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.js +670 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.js +89 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.js +449 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.js +78 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.js.map +1 -0
- package/src/{smithy/project/files/build.Dockerfile.template → migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/rc57-service.Dockerfile.fixture} +1 -4
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/__snapshots__/migration.spec.ts.snap +223 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.js +217 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/__snapshots__/migration.spec.ts.snap +149 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.js +195 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/__snapshots__/migration.spec.ts.snap +57 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.js +77 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/__snapshots__/migration.spec.ts.snap +48 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.js +91 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.js +412 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.js +33 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.js +83 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/legacy-service.Dockerfile.fixture +95 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.js +154 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.js +71 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.js +57 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.js.map +1 -0
- package/src/open-api/ts-client/__snapshots__/generator.additional-properties.spec.ts.snap +147 -33
- package/src/open-api/ts-client/__snapshots__/generator.arrays.spec.ts.snap +308 -75
- package/src/open-api/ts-client/__snapshots__/generator.complex-types.spec.ts.snap +298 -74
- package/src/open-api/ts-client/__snapshots__/generator.composite-types.spec.ts.snap +748 -103
- package/src/open-api/ts-client/__snapshots__/generator.content-type.spec.ts.snap +230 -37
- package/src/open-api/ts-client/__snapshots__/generator.duplicate-types.spec.ts.snap +249 -52
- package/src/open-api/ts-client/__snapshots__/generator.edge-cases.spec.ts.snap +5535 -0
- package/src/open-api/ts-client/__snapshots__/generator.fast-api-gaps.spec.ts.snap +736 -0
- package/src/open-api/ts-client/__snapshots__/generator.fast-api.spec.ts.snap +305 -71
- package/src/open-api/ts-client/__snapshots__/generator.multipart.spec.ts.snap +298 -0
- package/src/open-api/ts-client/__snapshots__/generator.primitive-types.spec.ts.snap +353 -82
- package/src/open-api/ts-client/__snapshots__/generator.request.spec.ts.snap +176 -55
- package/src/open-api/ts-client/__snapshots__/generator.reserved-keywords.spec.ts.snap +100 -24
- package/src/open-api/ts-client/__snapshots__/generator.response.spec.ts.snap +147 -33
- package/src/open-api/ts-client/__snapshots__/generator.spec-compliance.spec.ts.snap +1883 -0
- package/src/open-api/ts-client/__snapshots__/generator.streaming.spec.ts.snap +392 -88
- package/src/open-api/ts-client/__snapshots__/generator.tags.spec.ts.snap +200 -48
- package/src/open-api/ts-client/files/client.gen.ts.template +358 -24
- package/src/open-api/ts-client/files/types.gen.ts.template +6 -4
- package/src/open-api/ts-client/generator.js +41 -26
- package/src/open-api/ts-client/generator.js.map +1 -1
- package/src/open-api/ts-client/schema.d.js +6 -0
- package/src/open-api/ts-client/schema.d.js.map +1 -0
- package/src/open-api/ts-hooks/files/options-proxy.gen.ts.template +7 -2
- package/src/open-api/ts-hooks/generator.js +17 -21
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.spec.tsx +70 -0
- package/src/open-api/ts-hooks/schema.d.js +6 -0
- package/src/open-api/ts-hooks/schema.d.js.map +1 -0
- package/src/open-api/ts-metadata/generator.js +12 -20
- package/src/open-api/ts-metadata/generator.js.map +1 -1
- package/src/open-api/ts-metadata/schema.d.js +6 -0
- package/src/open-api/ts-metadata/schema.d.js.map +1 -0
- package/src/open-api/utils/codegen-data/languages.d.ts +0 -6
- package/src/open-api/utils/codegen-data/languages.js +59 -66
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data/types.d.ts +255 -10
- package/src/open-api/utils/codegen-data/types.js +54 -30
- package/src/open-api/utils/codegen-data/types.js.map +1 -1
- package/src/open-api/utils/codegen-data.d.ts +2 -2
- package/src/open-api/utils/codegen-data.js +494 -674
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.js +437 -246
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/open-api/utils/parse.js +8 -14
- package/src/open-api/utils/parse.js.map +1 -1
- package/src/open-api/utils/parser.d.ts +55 -0
- package/src/open-api/utils/parser.js +787 -0
- package/src/open-api/utils/parser.js.map +1 -0
- package/src/open-api/utils/refs.js +12 -22
- package/src/open-api/utils/refs.js.map +1 -1
- package/src/open-api/utils/types.d.ts +18 -0
- package/src/open-api/utils/types.js +5 -2
- package/src/open-api/utils/types.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +101 -20
- package/src/preset/generator.d.ts +14 -1
- package/src/preset/generator.js +76 -151
- package/src/preset/generator.js.map +1 -1
- package/src/preset/schema.d.js +6 -0
- package/src/preset/schema.d.js.map +1 -0
- package/src/preset/schema.d.ts +4 -1
- package/src/preset/schema.json +16 -5
- package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +326 -0
- package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +738 -0
- package/src/py/agent/__snapshots__/{generator.spec.ts.snap → generator.protocols.spec.ts.snap} +191 -315
- package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +231 -0
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +29 -0
- package/src/py/agent/a2a-connection/files/langchain/agent-connection/app/__targetAgentSnakeCase___client_langchain.py.template +29 -0
- package/src/py/agent/a2a-connection/generator.d.ts +24 -0
- package/src/py/agent/a2a-connection/generator.js +145 -88
- package/src/py/agent/a2a-connection/generator.js.map +1 -1
- package/src/py/agent/a2a-connection/schema.d.js +8 -0
- package/src/py/agent/a2a-connection/schema.d.js.map +1 -0
- package/src/py/agent/a2a-connection/schema.d.ts +1 -0
- package/src/py/agent/a2a-connection/schema.json +5 -0
- package/src/py/agent/files/deploy/Dockerfile.template +8 -1
- package/src/py/agent/files/langchain/a2a/main.py.template +94 -0
- package/src/py/agent/files/langchain/ag-ui/main.py.template +87 -0
- package/src/py/agent/files/langchain/common/agent.py.template +30 -0
- package/src/py/agent/files/{http → langchain/http}/init.py.template +17 -25
- package/src/py/agent/files/langchain/http/main.py.template +81 -0
- package/src/py/agent/files/{a2a → strands/a2a}/main.py.template +33 -15
- package/src/py/agent/files/strands/ag-ui/main.py.template +89 -0
- package/src/py/agent/files/{common → strands/common}/agent.py.template +2 -0
- package/src/py/agent/files/strands/http/init.py.template +97 -0
- package/src/py/agent/files/{http → strands/http}/main.py.template +4 -13
- package/src/py/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +184 -0
- package/src/py/agent/gateway-connection/files/agent-connection/app/__gatewaySnakeCase___client_strands.py.template +35 -0
- package/src/py/agent/gateway-connection/files/langchain/agent-connection/app/__gatewaySnakeCase___client_langchain.py.template +34 -0
- package/src/py/agent/gateway-connection/generator.d.ts +33 -0
- package/src/py/agent/gateway-connection/generator.js +153 -0
- package/src/py/agent/gateway-connection/generator.js.map +1 -0
- package/src/py/agent/gateway-connection/schema.d.js +6 -0
- package/src/py/agent/gateway-connection/schema.d.js.map +1 -0
- package/src/py/agent/gateway-connection/schema.d.ts +13 -0
- package/src/py/agent/gateway-connection/schema.json +31 -0
- package/src/py/agent/generator.d.ts +154 -1
- package/src/py/agent/generator.js +396 -197
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +154 -89
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +31 -0
- package/src/py/agent/mcp-connection/files/langchain/agent-connection/app/__mcpServerSnakeCase___client_langchain.py.template +31 -0
- package/src/py/agent/mcp-connection/generator.d.ts +23 -0
- package/src/py/agent/mcp-connection/generator.js +103 -130
- package/src/py/agent/mcp-connection/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/schema.d.js +8 -0
- package/src/py/agent/mcp-connection/schema.d.js.map +1 -0
- package/src/py/agent/mcp-connection/schema.d.ts +1 -0
- package/src/py/agent/mcp-connection/schema.json +5 -0
- package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +17 -19
- package/src/py/agent/react-connection/generator.d.ts +150 -1
- package/src/py/agent/react-connection/generator.js +105 -65
- package/src/py/agent/react-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +4 -4
- package/src/py/agent/react-connection/local-dev.js +36 -0
- package/src/py/agent/react-connection/local-dev.js.map +1 -0
- package/src/py/agent/react-connection/schema.d.js +8 -0
- package/src/py/agent/react-connection/schema.d.js.map +1 -0
- package/src/py/agent/react-connection/schema.d.ts +1 -0
- package/src/py/agent/react-connection/schema.json +5 -0
- package/src/py/agent/schema.d.js +6 -0
- package/src/py/agent/schema.d.js.map +1 -0
- package/src/py/agent/schema.d.ts +5 -1
- package/src/py/agent/schema.json +15 -1
- package/src/py/api/generator.js +12 -11
- package/src/py/api/generator.js.map +1 -1
- package/src/py/api/schema.d.js +6 -0
- package/src/py/api/schema.d.js.map +1 -0
- package/src/py/api/schema.d.ts +1 -0
- package/src/py/api/schema.json +5 -0
- package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +1520 -0
- package/src/py/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +63 -0
- package/src/py/dynamodb/agent-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/agent-connection/generator.js +45 -0
- package/src/py/dynamodb/agent-connection/generator.js.map +1 -0
- package/src/py/dynamodb/agent-connection/schema.d.js +8 -0
- package/src/py/dynamodb/agent-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/agent-connection/schema.d.ts +15 -0
- package/src/py/dynamodb/agent-connection/schema.json +27 -0
- package/src/py/dynamodb/fast-api-connection/__snapshots__/generator.spec.ts.snap +32 -0
- package/src/py/dynamodb/fast-api-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/fast-api-connection/generator.js +39 -0
- package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.js +8 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.ts +13 -0
- package/src/py/dynamodb/fast-api-connection/schema.json +23 -0
- package/src/py/dynamodb/files/__name__/__init__.py.template +6 -0
- package/src/py/dynamodb/files/__name__/client.py.template +39 -0
- package/src/py/dynamodb/files/__name__/entities/__init__.py.template +4 -0
- package/src/py/dynamodb/files/__name__/entities/base.py.template +63 -0
- package/src/py/dynamodb/files/__name__/entities/example.py.template +64 -0
- package/src/py/dynamodb/files/config.json.template +24 -0
- package/src/py/dynamodb/generator.d.ts +39 -0
- package/src/py/dynamodb/generator.js +130 -0
- package/src/py/dynamodb/generator.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +63 -0
- package/src/py/dynamodb/mcp-server-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/mcp-server-connection/generator.js +45 -0
- package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.js +8 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.ts +15 -0
- package/src/py/dynamodb/mcp-server-connection/schema.json +27 -0
- package/src/py/dynamodb/schema.d.js +6 -0
- package/src/py/dynamodb/schema.d.js.map +1 -0
- package/src/py/dynamodb/schema.d.ts +16 -0
- package/src/py/dynamodb/schema.json +76 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +240 -4693
- package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +5409 -0
- package/src/py/fast-api/files/app/__name__/init.py.template +5 -22
- package/src/py/fast-api/files/app/__name__/main.py.template +4 -1
- package/src/py/fast-api/generator.d.ts +72 -0
- package/src/py/fast-api/generator.js +134 -95
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +4 -3
- package/src/py/fast-api/react/generator.d.ts +16 -1
- package/src/py/fast-api/react/generator.js +38 -26
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/fast-api/react/open-api.js +31 -29
- package/src/py/fast-api/react/open-api.js.map +1 -1
- package/src/py/fast-api/react/schema.d.js +6 -0
- package/src/py/fast-api/react/schema.d.js.map +1 -0
- package/src/py/fast-api/react/schema.d.ts +1 -0
- package/src/py/fast-api/react/schema.json +5 -0
- package/src/py/fast-api/schema.d.js +6 -0
- package/src/py/fast-api/schema.d.js.map +1 -0
- package/src/py/fast-api/schema.d.ts +1 -0
- package/src/py/fast-api/schema.json +6 -0
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/py/lambda-function/generator.d.ts +21 -0
- package/src/py/lambda-function/generator.js +82 -62
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/lambda-function/schema.d.js +6 -0
- package/src/py/lambda-function/schema.d.js.map +1 -0
- package/src/py/lambda-function/schema.d.ts +1 -0
- package/src/py/lambda-function/schema.json +5 -0
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +221 -21
- package/src/py/mcp-server/files/deploy/Dockerfile.template +8 -1
- package/src/py/mcp-server/generator.d.ts +68 -0
- package/src/py/mcp-server/generator.js +204 -131
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/mcp-server/schema.d.js +6 -0
- package/src/py/mcp-server/schema.d.js.map +1 -0
- package/src/py/mcp-server/schema.d.ts +1 -0
- package/src/py/mcp-server/schema.json +6 -0
- package/src/py/project/generator.d.ts +27 -1
- package/src/py/project/generator.js +248 -130
- package/src/py/project/generator.js.map +1 -1
- package/src/py/project/schema.d.js +6 -0
- package/src/py/project/schema.d.js.map +1 -0
- package/src/py/project/schema.d.ts +1 -0
- package/src/py/project/schema.json +5 -0
- package/src/py/rdb/__snapshots__/generator.spec.ts.snap +2070 -0
- package/src/py/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +123 -0
- package/src/py/rdb/agent-connection/generator.d.ts +10 -0
- package/src/py/rdb/agent-connection/generator.js +52 -0
- package/src/py/rdb/agent-connection/generator.js.map +1 -0
- package/src/py/rdb/agent-connection/schema.d.js +8 -0
- package/src/py/rdb/agent-connection/schema.d.js.map +1 -0
- package/src/py/rdb/agent-connection/schema.d.ts +15 -0
- package/src/py/rdb/agent-connection/schema.json +27 -0
- package/src/py/rdb/fast-api-connection/__snapshots__/generator.spec.ts.snap +51 -0
- package/src/py/rdb/fast-api-connection/files/__apiModuleName__/dependencies/__rdbNameSnake__.py.template +14 -0
- package/src/py/rdb/fast-api-connection/generator.d.ts +10 -0
- package/src/py/rdb/fast-api-connection/generator.js +56 -0
- package/src/py/rdb/fast-api-connection/generator.js.map +1 -0
- package/src/py/rdb/fast-api-connection/schema.d.js +8 -0
- package/src/py/rdb/fast-api-connection/schema.d.js.map +1 -0
- package/src/py/rdb/fast-api-connection/schema.d.ts +13 -0
- package/src/py/rdb/fast-api-connection/schema.json +23 -0
- package/src/py/rdb/files/Dockerfile.create-db-user.template +14 -0
- package/src/py/rdb/files/Dockerfile.migration.template +14 -0
- package/src/py/rdb/files/__name__/__init__.py.template +3 -0
- package/src/py/rdb/files/__name__/connection.py.template +55 -0
- package/src/py/rdb/files/__name__/create_db_user_handler.py.template +97 -0
- package/src/py/rdb/files/__name__/migration_handler.py.template +36 -0
- package/src/py/rdb/files/__name__/models/__init__.py.template +3 -0
- package/src/py/rdb/files/__name__/models/example.py.template +8 -0
- package/src/py/rdb/files/__name__/utils.py.template +104 -0
- package/src/py/rdb/files/alembic.ini.template +38 -0
- package/src/py/rdb/files/config.json.template +14 -0
- package/src/py/rdb/files/migrations/env.py.template +80 -0
- package/src/py/rdb/files/migrations/script.py.mako.template +28 -0
- package/src/py/rdb/generator.d.ts +103 -0
- package/src/py/rdb/generator.js +328 -0
- package/src/py/rdb/generator.js.map +1 -0
- package/src/py/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +119 -0
- package/src/py/rdb/mcp-server-connection/generator.d.ts +10 -0
- package/src/py/rdb/mcp-server-connection/generator.js +52 -0
- package/src/py/rdb/mcp-server-connection/generator.js.map +1 -0
- package/src/py/rdb/mcp-server-connection/schema.d.js +8 -0
- package/src/py/rdb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/py/rdb/mcp-server-connection/schema.d.ts +15 -0
- package/src/py/rdb/mcp-server-connection/schema.json +27 -0
- package/src/py/rdb/schema.d.js +6 -0
- package/src/py/rdb/schema.d.js.map +1 -0
- package/src/py/rdb/schema.d.ts +16 -0
- package/src/py/rdb/schema.json +78 -0
- package/src/py/rdb/utils.d.ts +6 -0
- package/src/py/rdb/utils.js +16 -0
- package/src/py/rdb/utils.js.map +1 -0
- package/src/sdk/agentcore-gateway.d.ts +6 -0
- package/src/sdk/agentcore-gateway.js +7 -0
- package/src/sdk/agentcore-gateway.js.map +1 -0
- package/src/sdk/connection.d.ts +6 -0
- package/src/sdk/connection.js +6 -0
- package/src/sdk/connection.js.map +1 -0
- package/src/sdk/license.d.ts +8 -0
- package/src/sdk/license.js +7 -0
- package/src/sdk/license.js.map +1 -0
- package/src/sdk/open-api.d.ts +10 -0
- package/src/sdk/open-api.js +8 -0
- package/src/sdk/open-api.js.map +1 -0
- package/src/sdk/py.d.ts +18 -0
- package/src/sdk/py.js +12 -0
- package/src/sdk/py.js.map +1 -0
- package/src/sdk/terraform.d.ts +6 -0
- package/src/sdk/terraform.js +7 -0
- package/src/sdk/terraform.js.map +1 -0
- package/src/sdk/ts.d.ts +39 -0
- package/src/sdk/ts.js +41 -0
- package/src/sdk/ts.js.map +1 -0
- package/{sdk/utils/format.d.ts → src/sdk/utils/ast.d.ts} +1 -1
- package/src/sdk/utils/ast.js +6 -0
- package/src/sdk/utils/ast.js.map +1 -0
- package/{sdk/utils/ast.d.ts → src/sdk/utils/format.d.ts} +1 -2
- package/src/sdk/utils/format.js +6 -0
- package/src/sdk/utils/format.js.map +1 -0
- package/{sdk → src/sdk}/utils/test.d.ts +1 -1
- package/src/sdk/utils/test.js +6 -0
- package/src/sdk/utils/test.js.map +1 -0
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +245 -242
- package/src/smithy/project/files/{smithy-build.json.template → service/smithy-build.json.template} +5 -5
- package/src/smithy/project/files/{src → service/src}/operations/echo.smithy.template +1 -0
- package/src/smithy/project/files/shapes/smithy-build.json.template +7 -0
- package/src/smithy/project/files/shapes/src/main.smithy.template +11 -0
- package/src/smithy/project/files/ssdk-bundle/ssdk.rolldown.config.mjs.template +52 -0
- package/src/smithy/project/generator.d.ts +90 -0
- package/src/smithy/project/generator.js +223 -56
- package/src/smithy/project/generator.js.map +1 -1
- package/src/smithy/project/schema.d.js +6 -0
- package/src/smithy/project/schema.d.js.map +1 -0
- package/src/smithy/project/schema.d.ts +2 -0
- package/src/smithy/project/schema.json +28 -1
- package/src/smithy/react-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/smithy/react-connection/generator.d.ts +15 -0
- package/src/smithy/react-connection/generator.js +54 -48
- package/src/smithy/react-connection/generator.js.map +1 -1
- package/src/smithy/react-connection/schema.d.js +6 -0
- package/src/smithy/react-connection/schema.d.js.map +1 -0
- package/src/smithy/react-connection/schema.d.ts +1 -0
- package/src/smithy/react-connection/schema.json +5 -0
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +871 -109
- package/src/smithy/ts/api/files/handler.ts.template +3 -3
- package/src/smithy/ts/api/files/local-server.ts.template +3 -3
- package/src/smithy/ts/api/files/operations/echo.ts.template +2 -2
- package/src/smithy/ts/api/files/service.ts.template +3 -3
- package/src/smithy/ts/api/generator.d.ts +88 -0
- package/src/smithy/ts/api/generator.js +187 -114
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/smithy/ts/api/schema.d.js +6 -0
- package/src/smithy/ts/api/schema.d.js.map +1 -0
- package/src/smithy/ts/api/schema.d.ts +1 -0
- package/src/smithy/ts/api/schema.json +6 -0
- package/src/terraform/project/files/application/scripts/bootstrap.ts.template +40 -1
- package/src/terraform/project/files/application/src/main.tf.template +6 -1
- package/src/terraform/project/files/application/src/providers.tf.template +1 -1
- package/src/terraform/project/generator.d.ts +50 -0
- package/src/terraform/project/generator.js +212 -111
- package/src/terraform/project/generator.js.map +1 -1
- package/src/terraform/project/schema.d.js +9 -0
- package/src/terraform/project/schema.d.js.map +1 -0
- package/src/terraform/project/schema.d.ts +1 -0
- package/src/terraform/project/schema.json +5 -0
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +1182 -184
- package/src/trpc/backend/files/src/client/index.ts.template +1 -1
- package/src/trpc/backend/files/src/handler.ts.template +1 -1
- package/src/trpc/backend/files/src/index.ts.template +5 -5
- package/src/trpc/backend/files/src/init.ts.template +1 -1
- package/src/trpc/backend/files/src/local-server.ts.template +1 -1
- package/src/trpc/backend/files/src/middleware/index.ts.template +7 -7
- package/src/trpc/backend/files/src/procedures/echo.ts.template +3 -3
- package/src/trpc/backend/files/src/router.ts.template +2 -2
- package/src/trpc/backend/files/src/schema/echo.ts.template +2 -2
- package/src/trpc/backend/files/src/schema/index.ts.template +1 -1
- package/src/trpc/backend/generator.d.ts +90 -1
- package/src/trpc/backend/generator.js +177 -100
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.js +6 -0
- package/src/trpc/backend/schema.d.js.map +1 -0
- package/src/trpc/backend/schema.d.ts +1 -0
- package/src/trpc/backend/schema.json +6 -0
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +3 -3
- package/src/trpc/react/generator.d.ts +38 -1
- package/src/trpc/react/generator.js +105 -63
- package/src/trpc/react/generator.js.map +1 -1
- package/src/trpc/react/schema.d.js +6 -0
- package/src/trpc/react/schema.d.js.map +1 -0
- package/src/trpc/react/schema.d.ts +1 -0
- package/src/trpc/react/schema.json +5 -0
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +1452 -25
- package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +258 -0
- package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client-strands.ts.template +23 -0
- package/src/ts/agent/a2a-connection/generator.d.ts +46 -0
- package/src/ts/agent/a2a-connection/generator.js +110 -63
- package/src/ts/agent/a2a-connection/generator.js.map +1 -1
- package/src/ts/agent/a2a-connection/schema.d.js +8 -0
- package/src/ts/agent/a2a-connection/schema.d.js.map +1 -0
- package/src/ts/agent/a2a-connection/schema.d.ts +1 -0
- package/src/ts/agent/a2a-connection/schema.json +5 -0
- package/src/ts/agent/files/a2a/index.ts.template +1 -1
- package/src/ts/agent/files/ag-ui/index.ts.template +36 -11
- package/src/ts/agent/files/common/agent.ts.template +15 -2
- package/src/ts/agent/files/common/session.ts.template +43 -0
- package/src/ts/agent/files/deploy/Dockerfile.template +13 -2
- package/src/ts/agent/files/http/client.ts.template +2 -2
- package/src/ts/agent/files/http/index.ts.template +2 -2
- package/src/ts/agent/files/http/router.ts.template +5 -5
- package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +222 -0
- package/src/ts/agent/gateway-connection/files/agent-connection/app/__gatewayKebabCase__-client-strands.ts.template +30 -0
- package/src/ts/agent/gateway-connection/generator.d.ts +47 -0
- package/src/ts/agent/gateway-connection/generator.js +144 -0
- package/src/ts/agent/gateway-connection/generator.js.map +1 -0
- package/src/ts/agent/gateway-connection/schema.d.js +6 -0
- package/src/ts/agent/gateway-connection/schema.d.js.map +1 -0
- package/src/ts/agent/gateway-connection/schema.d.ts +13 -0
- package/src/ts/agent/gateway-connection/schema.json +31 -0
- package/src/ts/agent/generator.d.ts +205 -0
- package/src/ts/agent/generator.js +339 -156
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +194 -113
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +23 -0
- package/src/ts/agent/mcp-connection/generator.d.ts +37 -0
- package/src/ts/agent/mcp-connection/generator.js +88 -65
- package/src/ts/agent/mcp-connection/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/schema.d.js +8 -0
- package/src/ts/agent/mcp-connection/schema.d.js.map +1 -0
- package/src/ts/agent/mcp-connection/schema.d.ts +1 -0
- package/src/ts/agent/mcp-connection/schema.json +5 -0
- package/src/ts/agent/react-connection/__snapshots__/generator.spec.ts.snap +8 -4
- package/src/ts/agent/react-connection/files/src/components/__agentNameClassName__AgentClientProvider.tsx.template +2 -1
- package/src/ts/agent/react-connection/generator.d.ts +202 -1
- package/src/ts/agent/react-connection/generator.js +158 -99
- package/src/ts/agent/react-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +2 -2
- package/src/ts/agent/react-connection/local-dev.js +17 -0
- package/src/ts/agent/react-connection/local-dev.js.map +1 -0
- package/src/ts/agent/react-connection/schema.d.js +8 -0
- package/src/ts/agent/react-connection/schema.d.js.map +1 -0
- package/src/ts/agent/react-connection/schema.d.ts +1 -0
- package/src/ts/agent/react-connection/schema.json +5 -0
- package/src/ts/agent/schema.d.js +6 -0
- package/src/ts/agent/schema.d.js.map +1 -0
- package/src/ts/agent/schema.d.ts +4 -0
- package/src/ts/agent/schema.json +14 -0
- package/src/ts/api/generator.js +16 -16
- package/src/ts/api/generator.js.map +1 -1
- package/src/ts/api/schema.d.js +6 -0
- package/src/ts/api/schema.d.js.map +1 -0
- package/src/ts/api/schema.d.ts +1 -0
- package/src/ts/api/schema.json +5 -0
- package/src/ts/astro-docs/__snapshots__/generator.spec.ts.snap +28 -14
- package/src/ts/astro-docs/files/base/src/content/docs/en/index.mdx.template +2 -2
- package/src/ts/astro-docs/files/base/src/content.config.ts.template +4 -4
- package/src/ts/astro-docs/files/translation/scripts/translate.ts.template +272 -150
- package/src/ts/astro-docs/generator.d.ts +38 -0
- package/src/ts/astro-docs/generator.js +126 -61
- package/src/ts/astro-docs/generator.js.map +1 -1
- package/src/ts/astro-docs/schema.d.js +6 -0
- package/src/ts/astro-docs/schema.d.js.map +1 -0
- package/src/ts/astro-docs/schema.d.ts +2 -2
- package/src/ts/astro-docs/schema.json +3 -3
- package/src/ts/dcr-proxy/__snapshots__/generator.spec.ts.snap +982 -0
- package/src/ts/dcr-proxy/generator.d.ts +34 -0
- package/src/ts/dcr-proxy/generator.js +115 -0
- package/src/ts/dcr-proxy/generator.js.map +1 -0
- package/src/ts/dcr-proxy/schema.d.js +6 -0
- package/src/ts/dcr-proxy/schema.d.js.map +1 -0
- package/src/ts/dcr-proxy/schema.d.ts +13 -0
- package/src/ts/dcr-proxy/schema.json +44 -0
- package/src/ts/docs/generator.js +10 -10
- package/src/ts/docs/generator.js.map +1 -1
- package/src/ts/docs/schema.d.js +6 -0
- package/src/ts/docs/schema.d.js.map +1 -0
- package/src/ts/docs/schema.d.ts +1 -4
- package/src/ts/docs/schema.json +3 -3
- package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +400 -518
- package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +23 -5
- package/src/ts/dynamodb/agent-connection/generator.js +27 -23
- package/src/ts/dynamodb/agent-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/agent-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/agent-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/agent-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/agent-connection/schema.json +5 -0
- package/src/ts/dynamodb/files/config.json.template +24 -0
- package/src/ts/dynamodb/files/src/client.ts.template +30 -11
- package/src/ts/dynamodb/files/src/entities/example.ts.template +1 -1
- package/src/ts/dynamodb/files/src/entities/index.ts.template +1 -1
- package/src/ts/dynamodb/files/src/index.ts.template +2 -11
- package/src/ts/dynamodb/generator.d.ts +41 -0
- package/src/ts/dynamodb/generator.js +106 -64
- package/src/ts/dynamodb/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +23 -5
- package/src/ts/dynamodb/mcp-server-connection/generator.js +27 -23
- package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.json +5 -0
- package/src/ts/dynamodb/schema.d.js +6 -0
- package/src/ts/dynamodb/schema.d.js.map +1 -0
- package/src/ts/dynamodb/schema.d.ts +2 -0
- package/src/ts/dynamodb/schema.json +26 -2
- package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +12 -3
- package/src/ts/dynamodb/smithy-connection/generator.js +22 -22
- package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/smithy-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.json +5 -0
- package/src/ts/dynamodb/trpc-connection/__snapshots__/generator.spec.ts.snap +12 -3
- package/src/ts/dynamodb/trpc-connection/generator.js +22 -22
- package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/trpc-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.json +5 -0
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +8 -6
- package/src/ts/lambda-function/files/handler/__lambdaFunctionKebabCase__.ts.template +2 -1
- package/src/ts/lambda-function/generator.d.ts +38 -0
- package/src/ts/lambda-function/generator.js +98 -65
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lambda-function/io.js +83 -52
- package/src/ts/lambda-function/io.js.map +1 -1
- package/src/ts/lambda-function/schema.d.js +6 -0
- package/src/ts/lambda-function/schema.d.js.map +1 -0
- package/src/ts/lambda-function/schema.d.ts +1 -0
- package/src/ts/lambda-function/schema.json +5 -0
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +83 -45
- package/src/ts/lib/__snapshots__/vitest.spec.ts.snap +1 -1
- package/src/ts/lib/biome.js +71 -35
- package/src/ts/lib/biome.js.map +1 -1
- package/src/ts/lib/generator.d.ts +7 -0
- package/src/ts/lib/generator.js +115 -103
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/grit/vitest-pass-with-no-tests.grit +1 -4
- package/src/ts/lib/schema.d.js +6 -0
- package/src/ts/lib/schema.d.js.map +1 -0
- package/src/ts/lib/schema.d.ts +1 -1
- package/src/ts/lib/schema.json +5 -0
- package/src/ts/lib/ts-project-utils.d.ts +13 -1
- package/src/ts/lib/ts-project-utils.js +96 -71
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/types.d.ts +6 -0
- package/src/ts/lib/types.js +5 -2
- package/src/ts/lib/types.js.map +1 -1
- package/src/ts/lib/vitest.d.ts +10 -1
- package/src/ts/lib/vitest.js +54 -26
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +221 -44
- package/src/ts/mcp-server/files/Dockerfile.template +13 -2
- package/src/ts/mcp-server/generator.d.ts +110 -0
- package/src/ts/mcp-server/generator.js +231 -148
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/mcp-server/schema.d.js +6 -0
- package/src/ts/mcp-server/schema.d.js.map +1 -0
- package/src/ts/mcp-server/schema.d.ts +1 -0
- package/src/ts/mcp-server/schema.json +6 -0
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +28 -13
- package/src/ts/nx-generator/files/common/schema.d.ts.template +1 -0
- package/src/ts/nx-generator/files/common/schema.json.template +5 -0
- package/src/ts/nx-generator/files/local/generator.spec.ts.template +1 -1
- package/src/ts/nx-generator/files/local/generator.ts.template +3 -3
- package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.ts.template +6 -7
- package/src/ts/nx-generator/generator.d.ts +3 -0
- package/src/ts/nx-generator/generator.js +124 -73
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/nx-generator/schema.d.js +6 -0
- package/src/ts/nx-generator/schema.d.js.map +1 -0
- package/src/ts/nx-generator/schema.d.ts +1 -0
- package/src/ts/nx-generator/schema.json +5 -0
- package/src/ts/nx-migration/files/migration.spec.ts.template +26 -0
- package/src/ts/nx-migration/files/migration.ts.template +65 -0
- package/src/ts/nx-migration/files/prompt.md.template +46 -0
- package/src/ts/nx-migration/generator.d.ts +27 -0
- package/src/ts/nx-migration/generator.js +147 -0
- package/src/ts/nx-migration/generator.js.map +1 -0
- package/src/ts/nx-migration/schema.d.js +6 -0
- package/src/ts/nx-migration/schema.d.js.map +1 -0
- package/src/ts/nx-migration/schema.d.ts +13 -0
- package/src/ts/nx-migration/schema.json +63 -0
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +36 -25
- package/src/ts/nx-plugin/files/mcp-server/resources/GENERAL_GUIDANCE.md.template +5 -6
- package/src/ts/nx-plugin/files/mcp-server/server.ts.template +5 -5
- package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/tools/general-guidance.ts.template +1 -1
- package/src/ts/nx-plugin/files/mcp-server/tools/generator-guide.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/tools/list-generators.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/utils.ts.template +4 -4
- package/src/ts/nx-plugin/generator.d.ts +3 -0
- package/src/ts/nx-plugin/generator.js +67 -50
- package/src/ts/nx-plugin/generator.js.map +1 -1
- package/src/ts/nx-plugin/schema.d.js +9 -0
- package/src/ts/nx-plugin/schema.d.js.map +1 -0
- package/src/ts/nx-plugin/schema.json +5 -0
- package/src/ts/nx-plugin/utils.d.ts +27 -2
- package/src/ts/nx-plugin/utils.js +66 -51
- package/src/ts/nx-plugin/utils.js.map +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +553 -644
- package/src/ts/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +16 -6
- package/src/ts/rdb/agent-connection/generator.js +44 -39
- package/src/ts/rdb/agent-connection/generator.js.map +1 -1
- package/src/ts/rdb/agent-connection/schema.d.js +8 -0
- package/src/ts/rdb/agent-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/agent-connection/schema.d.ts +1 -0
- package/src/ts/rdb/agent-connection/schema.json +5 -0
- package/src/ts/rdb/files/Dockerfile.template +19 -1
- package/src/ts/rdb/files/config.json.template +14 -0
- package/src/ts/rdb/files/prisma.config.ts.template +6 -5
- package/src/ts/rdb/files/src/create-db-user-handler.ts.template +9 -11
- package/src/ts/rdb/files/src/index.ts.template +1 -2
- package/src/ts/rdb/files/src/migration-handler.ts.template +5 -30
- package/src/ts/rdb/files/src/prisma.ts.template +33 -25
- package/src/ts/rdb/files/src/utils.ts.template +3 -0
- package/src/ts/rdb/generator.d.ts +117 -4
- package/src/ts/rdb/generator.js +257 -138
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +16 -6
- package/src/ts/rdb/mcp-server-connection/generator.js +42 -37
- package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/schema.d.js +8 -0
- package/src/ts/rdb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/mcp-server-connection/schema.d.ts +1 -0
- package/src/ts/rdb/mcp-server-connection/schema.json +5 -0
- package/src/ts/rdb/schema.d.js +6 -0
- package/src/ts/rdb/schema.d.js.map +1 -0
- package/src/ts/rdb/schema.d.ts +1 -0
- package/src/ts/rdb/schema.json +7 -1
- package/src/ts/rdb/smithy-connection/__snapshots__/generator.spec.ts.snap +18 -9
- package/src/ts/rdb/smithy-connection/generator.js +48 -43
- package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
- package/src/ts/rdb/smithy-connection/schema.d.js +8 -0
- package/src/ts/rdb/smithy-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/smithy-connection/schema.d.ts +1 -0
- package/src/ts/rdb/smithy-connection/schema.json +5 -0
- package/src/ts/rdb/trpc-connection/__snapshots__/generator.spec.ts.snap +12 -3
- package/src/ts/rdb/trpc-connection/generator.js +37 -31
- package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
- package/src/ts/rdb/trpc-connection/schema.d.js +8 -0
- package/src/ts/rdb/trpc-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/trpc-connection/schema.d.ts +1 -0
- package/src/ts/rdb/trpc-connection/schema.json +5 -0
- package/src/ts/rdb/utils.js +9 -11
- package/src/ts/rdb/utils.js.map +1 -1
- package/src/ts/react-website/agui/files/common/src/hooks/useAgui__agentNameClassName__.tsx.template +17 -16
- package/src/ts/react-website/agui/generator.d.ts +97 -0
- package/src/ts/react-website/agui/generator.js +114 -67
- package/src/ts/react-website/agui/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +1391 -644
- package/src/ts/react-website/app/files/app/common/README.md.template +1 -1
- package/src/ts/react-website/app/generator.d.ts +142 -2
- package/src/ts/react-website/app/generator.js +333 -209
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/app/schema.d.js +6 -0
- package/src/ts/react-website/app/schema.d.js.map +1 -0
- package/src/ts/react-website/app/schema.d.ts +1 -1
- package/src/ts/react-website/app/schema.json +12 -6
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +161 -26
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +48 -12
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.ux-provider.spec.ts.snap +0 -20
- package/src/ts/react-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +2 -2
- package/src/ts/react-website/cognito-auth/generator.d.ts +25 -1
- package/src/ts/react-website/cognito-auth/generator.js +79 -64
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/grit/cloudscape-auth-menu.grit +3 -1
- package/src/ts/react-website/cognito-auth/grit/none-auth-menu.grit +1 -0
- package/src/ts/react-website/cognito-auth/grit/shadcn-auth-menu.grit +3 -1
- package/src/ts/react-website/cognito-auth/grit/shadcn-state-declarations.grit +3 -1
- package/src/ts/react-website/cognito-auth/schema.d.js +6 -0
- package/src/ts/react-website/cognito-auth/schema.d.js.map +1 -0
- package/src/ts/react-website/cognito-auth/schema.d.ts +1 -0
- package/src/ts/react-website/cognito-auth/schema.json +5 -0
- package/src/ts/react-website/cognito-auth/utils.js +34 -32
- package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
- package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/react-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +2 -2
- package/src/ts/react-website/runtime-config/generator.js +29 -31
- package/src/ts/react-website/runtime-config/generator.js.map +1 -1
- package/src/ts/react-website/runtime-config/schema.d.js +6 -0
- package/src/ts/react-website/runtime-config/schema.d.js.map +1 -0
- package/src/ts/react-website/runtime-config/schema.d.ts +1 -0
- package/src/ts/react-website/runtime-config/schema.json +5 -0
- package/src/ts/sync/generator.js +137 -60
- package/src/ts/sync/generator.js.map +1 -1
- package/src/ts/website/app/generator.js +10 -10
- package/src/ts/website/app/generator.js.map +1 -1
- package/src/ts/website/app/schema.d.js +6 -0
- package/src/ts/website/app/schema.d.js.map +1 -0
- package/src/ts/website/app/schema.d.ts +1 -1
- package/src/ts/website/app/schema.json +11 -6
- package/src/ts/website/auth/generator.d.ts +1 -1
- package/src/ts/website/auth/generator.js +11 -10
- package/src/ts/website/auth/generator.js.map +1 -1
- package/src/ts/website/auth/schema.d.js +6 -0
- package/src/ts/website/auth/schema.d.js.map +1 -0
- package/src/ts/website/auth/schema.d.ts +1 -0
- package/src/ts/website/auth/schema.json +5 -0
- package/src/utils/__snapshots__/shared-constructs.spec.ts.snap +21 -0
- package/src/utils/add-dependencies.d.ts +38 -0
- package/src/utils/add-dependencies.js +83 -0
- package/src/utils/add-dependencies.js.map +1 -0
- package/src/utils/agent-chat/agent-chat.d.ts +31 -0
- package/src/utils/agent-chat/agent-chat.js +31 -0
- package/src/utils/agent-chat/agent-chat.js.map +1 -0
- package/src/utils/agent-chat/files/a2a/chat.ts.template +33 -0
- package/src/utils/agent-chat/files/ag-ui/chat.ts.template +17 -0
- package/src/utils/agent-chat/files/common/agentcore.ts.template +81 -0
- package/src/utils/agent-chat/files/http-py/chat.ts.template +43 -0
- package/src/utils/agent-chat/files/http-ts/chat.ts.template +54 -0
- package/src/utils/agent-connection/agent-connection.d.ts +139 -26
- package/src/utils/agent-connection/agent-connection.js +500 -103
- package/src/utils/agent-connection/agent-connection.js.map +1 -1
- package/src/utils/agent-connection/files/core-a2a/agentcore-a2a-client-config.ts.template +93 -0
- package/src/utils/agent-connection/files/core-auth/agentcore-endpoints.ts.template +37 -0
- package/src/utils/agent-connection/files/core-auth/agentcore-fetch.ts.template +54 -0
- package/src/utils/agent-connection/files/core-gateway/agentcore-gateway-mcp-transport.ts.template +41 -0
- package/src/utils/agent-connection/files/core-mcp/agentcore-mcp-transport.ts.template +70 -0
- package/src/utils/agent-connection/files/core-runtime-config/runtime-config.ts.template +33 -33
- package/src/utils/agent-connection/files/core-shared/agentcore-transport.ts.template +39 -0
- package/src/utils/agent-connection/files/core-strands/a2a/agentcore-a2a-client-strands.ts.template +61 -0
- package/src/utils/agent-connection/files/core-strands/base/model-errors-strands.ts.template +47 -0
- package/src/utils/agent-connection/files/core-strands/base/tool-errors-strands.ts.template +29 -0
- package/src/utils/agent-connection/files/{core-runtime-config/with-session-id.ts.template → core-strands/base/with-session-id-strands.ts.template} +1 -1
- package/src/utils/agent-connection/files/core-strands/gateway/agentcore-gateway-mcp-client-strands.ts.template +26 -0
- package/src/utils/agent-connection/files/core-strands/mcp/agentcore-mcp-client-strands.ts.template +27 -0
- package/src/utils/agent-connection/files/py-core-a2a/agentcore_a2a_client_config.py.template +43 -0
- package/src/utils/agent-connection/files/py-core-auth/agentcore_endpoints.py.template +47 -0
- package/src/utils/agent-connection/files/py-core-auth/auth/session.py.template +51 -0
- package/src/utils/agent-connection/files/py-core-gateway/agentcore_gateway_mcp_transport.py.template +28 -0
- package/src/utils/agent-connection/files/py-core-langchain/a2a/agentcore_a2a_client_langchain.py.template +105 -0
- package/src/utils/agent-connection/files/py-core-langchain/gateway/agentcore_gateway_mcp_client_langchain.py.template +57 -0
- package/src/utils/agent-connection/files/py-core-langchain/mcp/agentcore_mcp_client_langchain.py.template +64 -0
- package/src/utils/agent-connection/files/py-core-mcp/agentcore_mcp_transport.py.template +34 -0
- package/src/utils/agent-connection/files/py-core-runtime-config/runtime_config.py.template +6 -18
- package/src/utils/agent-connection/files/py-core-runtime-config/session_context.py.template +2 -2
- package/src/utils/agent-connection/files/py-core-shared/agentcore_transport.py.template +40 -0
- package/src/utils/agent-connection/files/py-core-strands/a2a/agentcore_a2a_client_strands.py.template +111 -0
- package/src/utils/agent-connection/files/py-core-strands/base/model_errors_strands.py.template +40 -0
- package/src/utils/agent-connection/files/{py-core-runtime-config/with_session_id.py.template → py-core-strands/base/with_session_id_strands.py.template} +2 -2
- package/src/utils/agent-connection/files/py-core-strands/gateway/agentcore_gateway_mcp_client_strands.py.template +22 -0
- package/src/utils/agent-connection/files/py-core-strands/mcp/agentcore_mcp_client_strands.py.template +30 -0
- package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +79 -0
- package/src/utils/agent-core-constructs/agent-core-constructs.js +212 -38
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +170 -6
- package/src/utils/agent-core-constructs/files/cdk/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.ts.template +87 -0
- package/src/utils/agent-core-constructs/files/cdk/app/agentcore-harness/__nameKebabCase__/__nameKebabCase__.ts.template +366 -0
- package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/agentcore-gateway.ts.template +624 -0
- package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/readiness-probe/index.js.template +55 -0
- package/src/utils/agent-core-constructs/files/terraform/app/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +212 -1
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.tf.template +521 -0
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/render-cedar.cjs.template +13 -0
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-harness/__nameKebabCase__/__nameKebabCase__.tf.template +282 -0
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +159 -13
- package/src/utils/agent-core-constructs/files/terraform/core/agentcore-gateway/gateway.tf.template +14 -0
- package/src/utils/api-constructs/api-constructs.d.ts +30 -2
- package/src/utils/api-constructs/api-constructs.js +82 -32
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +20 -15
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +24 -16
- package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +26 -9
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account/index.js.template +70 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account.ts.template +82 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/rest-api.ts.template +56 -17
- package/src/utils/api-constructs/files/cdk/core/api/trpc/trpc-utils.ts.template +1 -1
- package/src/utils/api-constructs/files/cdk/core/api/utils/utils.ts.template +61 -7
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +101 -12
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +194 -8
- package/src/utils/api-constructs/files/terraform/core/api/http/http-api/http-api.tf.template +1 -1
- package/src/utils/api-constructs/files/terraform/core/api/rest/api-gateway-account/api-gateway-account.tf.template +83 -0
- package/src/utils/api-constructs/files/terraform/core/api/rest/rest-api/rest-api.tf.template +5 -11
- package/src/utils/api-constructs/open-api-metadata.js +22 -22
- package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
- package/src/utils/ast/website.js +18 -20
- package/src/utils/ast/website.js.map +1 -1
- package/src/utils/ast.d.ts +9 -0
- package/src/utils/ast.js +125 -86
- package/src/utils/ast.js.map +1 -1
- package/src/utils/base-tsconfig.d.ts +30 -0
- package/src/utils/base-tsconfig.js +32 -0
- package/src/utils/base-tsconfig.js.map +1 -0
- package/src/utils/bundle/bundle.d.ts +6 -1
- package/src/utils/bundle/bundle.js +58 -48
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/commands.d.ts +14 -3
- package/src/utils/commands.js +83 -28
- package/src/utils/commands.js.map +1 -1
- package/src/utils/config/index.d.ts +18 -2
- package/src/utils/config/index.js +5 -4
- package/src/utils/config/index.js.map +1 -1
- package/src/utils/config/utils.d.ts +8 -2
- package/src/utils/config/utils.js +56 -59
- package/src/utils/config/utils.js.map +1 -1
- package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +16 -3
- package/src/utils/connection/open-api/react.d.ts +31 -5
- package/src/utils/connection/open-api/react.js +106 -76
- package/src/utils/connection/open-api/react.js.map +1 -1
- package/src/utils/containers.js +22 -23
- package/src/utils/containers.js.map +1 -1
- package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.d.ts +38 -0
- package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js +93 -0
- package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js.map +1 -0
- package/src/utils/dcr-proxy-constructs/files/cdk/app/dcr-proxies/__nameKebabCase__/__nameKebabCase__.ts.template +227 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/authorization-server-metadata.ts.template +39 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/authorize.ts.template +26 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/mcp-proxy.ts.template +89 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/protected-resource-metadata.ts.template +13 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/register.ts.template +70 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/token.ts.template +75 -0
- package/src/utils/dcr-proxy-constructs/files/terraform/app/dcr-proxies/__nameKebabCase__/__nameKebabCase__.tf.template +410 -0
- package/src/utils/declared-dependencies.d.ts +140 -0
- package/src/utils/declared-dependencies.js +64 -0
- package/src/utils/declared-dependencies.js.map +1 -0
- package/src/utils/dependencies.d.ts +18 -0
- package/src/utils/dependencies.js +206 -0
- package/src/utils/dependencies.js.map +1 -0
- package/src/utils/docker.d.ts +89 -0
- package/src/utils/docker.js +125 -0
- package/src/utils/docker.js.map +1 -0
- package/src/utils/dynamodb-constructs/dynamodb-constructs.d.ts +1 -1
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js +39 -41
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -1
- package/src/utils/dynamodb-constructs/files/cdk/app/dynamodb/__nameKebabCase__.ts.template +18 -5
- package/src/utils/dynamodb-constructs/files/cdk/core/dynamodb.ts.template +1 -1
- package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +24 -17
- package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +1 -1
- package/src/utils/files/common/constructs/src/core/cloudfront.ts.template +14 -0
- package/src/utils/files/common/constructs/src/core/index.ts.template +5 -4
- package/src/utils/files/common/constructs/src/index.ts.template +2 -2
- package/src/utils/files/common/infra-config/src/index.ts.template +3 -3
- package/src/utils/files/common/infra-config/src/resolve-stage.ts.template +2 -2
- package/src/utils/files/common/infra-config/src/stages.config.ts.template +1 -1
- package/src/{ts/dynamodb/files/scripts → utils/files/common/scripts/src/dynamodb}/create-local-table.ts.template +65 -31
- package/src/utils/files/common/scripts/src/dynamodb/pull-image.ts.template +13 -0
- package/src/utils/files/common/scripts/src/dynamodb/start-container.ts.template +103 -0
- package/src/utils/files/common/scripts/src/infra/infra-deploy.ts.template +2 -0
- package/src/utils/files/common/scripts/src/infra/infra-destroy.ts.template +2 -0
- package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/cdk-command.ts.template +6 -3
- package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/run.ts.template +3 -3
- package/src/utils/files/common/scripts/src/rdb/mysql/wait-for-mysql-db.ts.template +32 -0
- package/src/utils/files/common/scripts/src/rdb/postgres/wait-for-postgres-db.ts.template +32 -0
- package/src/utils/files/common/scripts/src/rdb/shared/pull-image.ts.template +16 -0
- package/src/utils/files/common/scripts/src/rdb/shared/start-container.ts.template +115 -0
- package/src/utils/files/common/shadcn/readme/README.md.template +3 -3
- package/src/utils/files/common/shadcn/src/index.ts.template +2 -2
- package/src/utils/files/shadcn/components.json.template +1 -1
- package/src/utils/files/terraform/src/core/asset-bucket/asset-bucket.tf.template +63 -72
- package/src/utils/files/terraform/src/core/runtime-config/appconfig/appconfig.tf.template +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +12 -6
- package/src/utils/files/terraform/src/core/runtime-config/entry/entry.tf.template +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +9 -4
- package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +1 -1
- package/src/utils/format.d.ts +39 -4
- package/src/utils/format.js +318 -198
- package/src/utils/format.js.map +1 -1
- package/src/utils/fs.d.ts +24 -5
- package/src/utils/fs.js +40 -15
- package/src/utils/fs.js.map +1 -1
- package/src/utils/function-constructs/files/cdk/app/lambda-functions/__nameKebabCase__.ts.template +1 -1
- package/src/utils/function-constructs/files/terraform/app/lambda-functions/__nameKebabCase__/__nameKebabCase__.tf.template +2 -2
- package/src/utils/function-constructs/function-constructs.js +22 -25
- package/src/utils/function-constructs/function-constructs.js.map +1 -1
- package/src/utils/generators.js +18 -20
- package/src/utils/generators.js.map +1 -1
- package/src/utils/git.js +19 -34
- package/src/utils/git.js.map +1 -1
- package/src/utils/iac-providers.js +5 -5
- package/src/utils/iac-providers.js.map +1 -1
- package/src/utils/iac.js +12 -14
- package/src/utils/iac.js.map +1 -1
- package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +153 -24
- package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +28 -9
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +129 -12
- package/src/utils/identity-constructs/files/terraform/core/user-identity/main.tf.template +7 -0
- package/src/utils/identity-constructs/identity-constructs.d.ts +10 -0
- package/src/utils/identity-constructs/identity-constructs.js +52 -31
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
- package/src/utils/init.d.ts +72 -0
- package/src/utils/init.js +300 -0
- package/src/utils/init.js.map +1 -0
- package/src/utils/install.d.ts +32 -0
- package/src/utils/install.js +58 -0
- package/src/utils/install.js.map +1 -0
- package/src/utils/js.js +27 -20
- package/src/utils/js.js.map +1 -1
- package/src/utils/mcp.d.ts +9 -0
- package/src/utils/mcp.js +42 -41
- package/src/utils/mcp.js.map +1 -1
- package/src/utils/metrics.d.ts +7 -1
- package/src/utils/metrics.js +61 -46
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/migration-manifest.d.ts +58 -0
- package/src/utils/migration-manifest.js +76 -0
- package/src/utils/migration-manifest.js.map +1 -0
- package/src/utils/migration-versions.d.ts +145 -0
- package/src/utils/migration-versions.js +250 -0
- package/src/utils/migration-versions.js.map +1 -0
- package/src/utils/mock-project-graph.js +8 -12
- package/src/utils/mock-project-graph.js.map +1 -1
- package/src/utils/module-format.d.ts +25 -0
- package/src/utils/module-format.js +45 -0
- package/src/utils/module-format.js.map +1 -0
- package/src/utils/names.d.ts +22 -0
- package/src/utils/names.js +44 -48
- package/src/utils/names.js.map +1 -1
- package/src/utils/npm-scope.d.ts +0 -4
- package/src/utils/npm-scope.js +7 -20
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/nx.d.ts +74 -3
- package/src/utils/nx.js +196 -75
- package/src/utils/nx.js.map +1 -1
- package/src/utils/nxlv-python.js +27 -15
- package/src/utils/nxlv-python.js.map +1 -1
- package/src/utils/object.js +5 -11
- package/src/utils/object.js.map +1 -1
- package/src/utils/paths.js +11 -15
- package/src/utils/paths.js.map +1 -1
- package/src/utils/pkg-manager.js +4 -9
- package/src/utils/pkg-manager.js.map +1 -1
- package/src/utils/pnpm-workspace.d.ts +1 -12
- package/src/utils/pnpm-workspace.js +16 -43
- package/src/utils/pnpm-workspace.js.map +1 -1
- package/src/utils/port.d.ts +28 -6
- package/src/utils/port.js +67 -28
- package/src/utils/port.js.map +1 -1
- package/src/utils/project-package-json.d.ts +39 -0
- package/src/utils/project-package-json.js +119 -0
- package/src/utils/project-package-json.js.map +1 -0
- package/src/utils/py.d.ts +17 -3
- package/src/utils/py.js +73 -48
- package/src/utils/py.js.map +1 -1
- package/src/utils/rdb-constructs/files/cdk/app/dbs/__nameKebabCase__.ts.template +72 -18
- package/src/utils/rdb-constructs/files/cdk/core/rdb/aurora.ts.template +112 -88
- package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +127 -53
- package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +60 -53
- package/src/utils/rdb-constructs/rdb-constructs.d.ts +12 -1
- package/src/utils/rdb-constructs/rdb-constructs.js +38 -41
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/ruff.d.ts +59 -0
- package/src/utils/ruff.js +140 -0
- package/src/utils/ruff.js.map +1 -0
- package/src/utils/shared-constructs-constants.d.ts +46 -4
- package/src/utils/shared-constructs-constants.js +50 -15
- package/src/utils/shared-constructs-constants.js.map +1 -1
- package/src/utils/shared-constructs.d.ts +4 -1
- package/src/utils/shared-constructs.js +62 -67
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/shared-dynamodb-scripts.d.ts +18 -0
- package/src/utils/shared-dynamodb-scripts.js +35 -0
- package/src/utils/shared-dynamodb-scripts.js.map +1 -0
- package/src/utils/shared-infra-config.js +31 -30
- package/src/utils/shared-infra-config.js.map +1 -1
- package/src/utils/shared-infra-scripts.d.ts +26 -0
- package/src/utils/shared-infra-scripts.js +58 -0
- package/src/utils/shared-infra-scripts.js.map +1 -0
- package/src/utils/shared-rdb-scripts.d.ts +27 -0
- package/src/utils/shared-rdb-scripts.js +59 -0
- package/src/utils/shared-rdb-scripts.js.map +1 -0
- package/src/utils/shared-scripts.d.ts +1 -4
- package/src/utils/shared-scripts.js +12 -38
- package/src/utils/shared-scripts.js.map +1 -1
- package/src/utils/shared-shadcn.d.ts +26 -1
- package/src/utils/shared-shadcn.js +93 -67
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/smithy.d.ts +59 -0
- package/src/utils/smithy.js +73 -0
- package/src/utils/smithy.js.map +1 -0
- package/src/utils/test-git.d.ts +39 -0
- package/src/utils/test-git.js +117 -0
- package/src/utils/test-git.js.map +1 -0
- package/src/utils/test.d.ts +10 -0
- package/src/utils/test.js +44 -25
- package/src/utils/test.js.map +1 -1
- package/src/utils/toml.d.ts +5 -0
- package/src/utils/toml.js +17 -15
- package/src/utils/toml.js.map +1 -1
- package/src/utils/version-upgrade-migration/migration.d.ts +14 -0
- package/src/utils/version-upgrade-migration/migration.js +16 -0
- package/src/utils/version-upgrade-migration/migration.js.map +1 -0
- package/src/utils/version-upgrade-migration/nx-package-updates.d.ts +45 -0
- package/src/utils/version-upgrade-migration/nx-package-updates.js +50 -0
- package/src/utils/version-upgrade-migration/nx-package-updates.js.map +1 -0
- package/src/utils/version-upgrade-migration/owned-dependencies.d.ts +76 -0
- package/src/utils/version-upgrade-migration/owned-dependencies.js +146 -0
- package/src/utils/version-upgrade-migration/owned-dependencies.js.map +1 -0
- package/src/utils/version-upgrade-migration/register.d.ts +29 -0
- package/src/utils/version-upgrade-migration/register.js +42 -0
- package/src/utils/version-upgrade-migration/register.js.map +1 -0
- package/src/utils/version-upgrade-migration/sync-embedded-versions.d.ts +26 -0
- package/src/utils/version-upgrade-migration/sync-embedded-versions.js +352 -0
- package/src/utils/version-upgrade-migration/sync-embedded-versions.js.map +1 -0
- package/src/utils/version-upgrade-migration/sync-metrics-version.d.ts +13 -0
- package/src/utils/version-upgrade-migration/sync-metrics-version.js +33 -0
- package/src/utils/version-upgrade-migration/sync-metrics-version.js.map +1 -0
- package/src/utils/version-upgrade-migration/sync-vended-versions.d.ts +10 -0
- package/src/utils/version-upgrade-migration/sync-vended-versions.js +518 -0
- package/src/utils/version-upgrade-migration/sync-vended-versions.js.map +1 -0
- package/src/utils/version-upgrade-migration/vended-upgrade.d.ts +14 -0
- package/src/utils/version-upgrade-migration/vended-upgrade.js +40 -0
- package/src/utils/version-upgrade-migration/vended-upgrade.js.map +1 -0
- package/src/utils/versions.d.ts +240 -108
- package/src/utils/versions.js +265 -121
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/cdk/app/static-websites/__websiteNameKebabCase__.ts.template +2 -2
- package/src/utils/website-constructs/files/cdk/core/static-website.ts.template +207 -41
- package/src/utils/website-constructs/files/terraform/app/static-websites/__websiteNameKebabCase__/__websiteNameKebabCase__.tf.template +1 -1
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +145 -93
- package/src/utils/website-constructs/website-constructs.d.ts +11 -0
- package/src/utils/website-constructs/website-constructs.js +49 -30
- package/src/utils/website-constructs/website-constructs.js.map +1 -1
- package/bin/aws-nx-mcp.d.ts +0 -2
- package/bin/aws-nx-mcp.js +0 -17
- package/bin/aws-nx-mcp.js.map +0 -1
- package/sdk/connection.d.ts +0 -6
- package/sdk/connection.js +0 -10
- package/sdk/connection.js.map +0 -1
- package/sdk/license.d.ts +0 -8
- package/sdk/license.js +0 -13
- package/sdk/license.js.map +0 -1
- package/sdk/open-api.d.ts +0 -10
- package/sdk/open-api.js +0 -15
- package/sdk/open-api.js.map +0 -1
- package/sdk/py.d.ts +0 -14
- package/sdk/py.js +0 -18
- package/sdk/py.js.map +0 -1
- package/sdk/terraform.d.ts +0 -6
- package/sdk/terraform.js +0 -11
- package/sdk/terraform.js.map +0 -1
- package/sdk/ts.d.ts +0 -29
- package/sdk/ts.js +0 -47
- package/sdk/ts.js.map +0 -1
- package/sdk/utils/ast.js +0 -12
- package/sdk/utils/ast.js.map +0 -1
- package/sdk/utils/format.js +0 -10
- package/sdk/utils/format.js.map +0 -1
- package/sdk/utils/test.js +0 -10
- package/sdk/utils/test.js.map +0 -1
- package/src/connection/agent-serve-local.d.ts +0 -33
- package/src/connection/agent-serve-local.js +0 -48
- package/src/connection/agent-serve-local.js.map +0 -1
- package/src/connection/serve-local.js +0 -41
- package/src/connection/serve-local.js.map +0 -1
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client.py.template +0 -22
- package/src/py/agent/files/ag-ui/main.py.template +0 -37
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client.py.template +0 -22
- package/src/py/agent/react-connection/serve-local.js +0 -30
- package/src/py/agent/react-connection/serve-local.js.map +0 -1
- package/src/py/agent/scripts/http/chat.ts.template +0 -38
- package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client.ts.template +0 -19
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client.ts.template +0 -19
- package/src/ts/agent/react-connection/serve-local.js +0 -19
- package/src/ts/agent/react-connection/serve-local.js.map +0 -1
- package/src/ts/agent/scripts/http/chat.ts.template +0 -35
- package/src/ts/dynamodb/files/scripts/pull-image.ts.template +0 -15
- package/src/ts/dynamodb/files/scripts/start-container.ts.template +0 -81
- package/src/ts/dynamodb/files/src/constants.ts.template +0 -9
- package/src/ts/dynamodb/files/src/gsi.ts.template +0 -14
- package/src/ts/rdb/files/scripts/pull-image.ts.template +0 -15
- package/src/ts/rdb/files/scripts/start-container.ts.template +0 -84
- package/src/ts/rdb/files/scripts/wait-for-db.ts.template +0 -55
- package/src/ts/rdb/files/src/constants.ts.template +0 -8
- package/src/utils/agent-connection/files/core-a2a/agentcore-a2a-client.ts.template +0 -123
- package/src/utils/agent-connection/files/core-mcp/agentcore-mcp-client.ts.template +0 -128
- package/src/utils/agent-connection/files/py-core-a2a/agentcore_a2a_client.py.template +0 -120
- package/src/utils/agent-connection/files/py-core-mcp/agentcore_mcp_client.py.template +0 -89
- package/src/utils/files/common/scripts/src/infra-deploy.ts.template +0 -2
- package/src/utils/files/common/scripts/src/infra-destroy.ts.template +0 -2
- package/src/utils/files/terraform/scripts/reset-runtime-config.ts.template +0 -25
- /package/src/py/agent/files/{common → strands/common}/__init__.py.template +0 -0
- /package/src/smithy/project/files/{src → service/src}/main.smithy.template +0 -0
- /package/src/utils/files/common/scripts/src/{index.ts.template → infra/index.ts.template} +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/credentials.ts.template +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/stage-parser.ts.template +0 -0
|
@@ -0,0 +1,1883 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`openApiTsClientGenerator - spec compliance > should JSON-serialise a content-based query parameter with marshalled dates > client.gen.ts 1`] = `
|
|
4
|
+
"import type {
|
|
5
|
+
ContentParamRequestQueryParameters,
|
|
6
|
+
Filter,
|
|
7
|
+
ContentParamRequest,
|
|
8
|
+
} from './types.gen.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Utility for serialisation and deserialisation of API types.
|
|
12
|
+
*/
|
|
13
|
+
export class $IO {
|
|
14
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
15
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
16
|
+
|
|
17
|
+
public static ContentParamRequestQueryParameters = {
|
|
18
|
+
toJson: (model: ContentParamRequestQueryParameters): any => {
|
|
19
|
+
if (model === undefined || model === null) {
|
|
20
|
+
return model;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
...(model.filter === undefined
|
|
24
|
+
? {}
|
|
25
|
+
: {
|
|
26
|
+
filter: $IO.Filter.toJson(model.filter),
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
fromJson: (json: any): ContentParamRequestQueryParameters => {
|
|
31
|
+
if (json === undefined || json === null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
filter: $IO.Filter.fromJson(json['filter']),
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
public static Filter = {
|
|
41
|
+
toJson: (model: Filter): any => {
|
|
42
|
+
if (model === undefined || model === null) {
|
|
43
|
+
return model;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
...(model.field === undefined
|
|
47
|
+
? {}
|
|
48
|
+
: {
|
|
49
|
+
field: model.field,
|
|
50
|
+
}),
|
|
51
|
+
...(model.since === undefined
|
|
52
|
+
? {}
|
|
53
|
+
: {
|
|
54
|
+
since: model.since.toISOString(),
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
fromJson: (json: any): Filter => {
|
|
59
|
+
if (json === undefined || json === null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
field: json['field'],
|
|
64
|
+
...(json['since'] === undefined
|
|
65
|
+
? {}
|
|
66
|
+
: {
|
|
67
|
+
since: new Date(json['since']),
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Client configuration for TestApi
|
|
76
|
+
*/
|
|
77
|
+
export interface TestApiConfig {
|
|
78
|
+
/**
|
|
79
|
+
* Base URL for the API
|
|
80
|
+
*/
|
|
81
|
+
url: string;
|
|
82
|
+
/**
|
|
83
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
84
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
85
|
+
*/
|
|
86
|
+
fetch?: typeof fetch;
|
|
87
|
+
/**
|
|
88
|
+
* Additional configuration
|
|
89
|
+
*/
|
|
90
|
+
options?: {
|
|
91
|
+
/**
|
|
92
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
93
|
+
* the request in the OpenAPI specification.
|
|
94
|
+
* Set this to false to omit this header.
|
|
95
|
+
*/
|
|
96
|
+
omitContentTypeHeader?: boolean;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* API Client for TestApi
|
|
102
|
+
*/
|
|
103
|
+
export class TestApi {
|
|
104
|
+
private $config: TestApiConfig;
|
|
105
|
+
|
|
106
|
+
constructor(config: TestApiConfig) {
|
|
107
|
+
this.$config = config;
|
|
108
|
+
|
|
109
|
+
this.contentParam = this.contentParam.bind(this);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
113
|
+
csv: ',',
|
|
114
|
+
ssv: ' ',
|
|
115
|
+
pipes: '|',
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
119
|
+
if (value === undefined || value === null) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
if (typeof value !== 'object') {
|
|
123
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
124
|
+
}
|
|
125
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
126
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
127
|
+
);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
private $url = (
|
|
131
|
+
path: string,
|
|
132
|
+
pathParameters: { [key: string]: any },
|
|
133
|
+
queryParameters: { [key: string]: any },
|
|
134
|
+
collectionFormats?: {
|
|
135
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
136
|
+
},
|
|
137
|
+
): string => {
|
|
138
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
139
|
+
? this.$config.url.slice(0, -1)
|
|
140
|
+
: this.$config.url;
|
|
141
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
142
|
+
(withParams, [key, value]) =>
|
|
143
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
144
|
+
path,
|
|
145
|
+
);
|
|
146
|
+
const queryString = Object.entries(queryParameters)
|
|
147
|
+
.flatMap(([key, value]) => {
|
|
148
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
149
|
+
return value.map(
|
|
150
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
if (
|
|
154
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
155
|
+
value !== null &&
|
|
156
|
+
typeof value === 'object'
|
|
157
|
+
) {
|
|
158
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
159
|
+
}
|
|
160
|
+
const delimiter =
|
|
161
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
162
|
+
return [
|
|
163
|
+
\`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
164
|
+
];
|
|
165
|
+
})
|
|
166
|
+
.join('&');
|
|
167
|
+
return (
|
|
168
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
169
|
+
);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
private $headers = (
|
|
173
|
+
headerParameters: { [key: string]: any },
|
|
174
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
175
|
+
): [string, string][] => {
|
|
176
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
177
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
178
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
179
|
+
}
|
|
180
|
+
const delimiter =
|
|
181
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
182
|
+
return [
|
|
183
|
+
[
|
|
184
|
+
key,
|
|
185
|
+
Array.isArray(value)
|
|
186
|
+
? value.map(String).join(delimiter)
|
|
187
|
+
: String(value),
|
|
188
|
+
],
|
|
189
|
+
];
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
private $fetch: typeof fetch = (...args) =>
|
|
194
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
195
|
+
|
|
196
|
+
public async contentParam(input: ContentParamRequest): Promise<string> {
|
|
197
|
+
const pathParameters: { [key: string]: any } = {};
|
|
198
|
+
const queryParameters: { [key: string]: any } =
|
|
199
|
+
$IO.ContentParamRequestQueryParameters.toJson(input);
|
|
200
|
+
if (queryParameters['filter'] !== undefined) {
|
|
201
|
+
queryParameters['filter'] = JSON.stringify(queryParameters['filter']);
|
|
202
|
+
}
|
|
203
|
+
const headerParameters: { [key: string]: any } = {};
|
|
204
|
+
const queryCollectionFormats = {
|
|
205
|
+
filter: 'multi',
|
|
206
|
+
} as const;
|
|
207
|
+
|
|
208
|
+
const body = undefined;
|
|
209
|
+
|
|
210
|
+
const response = await this.$fetch(
|
|
211
|
+
this.$url(
|
|
212
|
+
'/query',
|
|
213
|
+
pathParameters,
|
|
214
|
+
queryParameters,
|
|
215
|
+
queryCollectionFormats,
|
|
216
|
+
),
|
|
217
|
+
{
|
|
218
|
+
headers: this.$headers(headerParameters),
|
|
219
|
+
method: 'GET',
|
|
220
|
+
body,
|
|
221
|
+
},
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
if (response.status === 200) {
|
|
225
|
+
return await response.json();
|
|
226
|
+
}
|
|
227
|
+
throw new Error(
|
|
228
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
"
|
|
233
|
+
`;
|
|
234
|
+
|
|
235
|
+
exports[`openApiTsClientGenerator - spec compliance > should JSON-serialise a content-based query parameter with marshalled dates > types.gen.ts 1`] = `
|
|
236
|
+
"export type ContentParamRequestQueryParameters = {
|
|
237
|
+
filter: Filter;
|
|
238
|
+
};
|
|
239
|
+
export type Filter = {
|
|
240
|
+
field: string;
|
|
241
|
+
since?: Date;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export type ContentParamRequest = ContentParamRequestQueryParameters;
|
|
245
|
+
export type ContentParamError = never;
|
|
246
|
+
"
|
|
247
|
+
`;
|
|
248
|
+
|
|
249
|
+
exports[`openApiTsClientGenerator - spec compliance > should keep a decimal format string un-corrupted and round-trip byte fields > client.gen.ts 1`] = `
|
|
250
|
+
"import type { BlobMeta, PutBlobMetaRequest } from './types.gen.js';
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Utility for serialisation and deserialisation of API types.
|
|
254
|
+
*/
|
|
255
|
+
export class $IO {
|
|
256
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
257
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
258
|
+
|
|
259
|
+
public static BlobMeta = {
|
|
260
|
+
toJson: (model: BlobMeta): any => {
|
|
261
|
+
if (model === undefined || model === null) {
|
|
262
|
+
return model;
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
...(model.data === undefined
|
|
266
|
+
? {}
|
|
267
|
+
: {
|
|
268
|
+
data: model.data,
|
|
269
|
+
}),
|
|
270
|
+
...(model.price === undefined
|
|
271
|
+
? {}
|
|
272
|
+
: {
|
|
273
|
+
price: model.price,
|
|
274
|
+
}),
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
fromJson: (json: any): BlobMeta => {
|
|
278
|
+
if (json === undefined || json === null) {
|
|
279
|
+
return json;
|
|
280
|
+
}
|
|
281
|
+
return {
|
|
282
|
+
data: json['data'],
|
|
283
|
+
price: json['price'],
|
|
284
|
+
};
|
|
285
|
+
},
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Client configuration for TestApi
|
|
291
|
+
*/
|
|
292
|
+
export interface TestApiConfig {
|
|
293
|
+
/**
|
|
294
|
+
* Base URL for the API
|
|
295
|
+
*/
|
|
296
|
+
url: string;
|
|
297
|
+
/**
|
|
298
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
299
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
300
|
+
*/
|
|
301
|
+
fetch?: typeof fetch;
|
|
302
|
+
/**
|
|
303
|
+
* Additional configuration
|
|
304
|
+
*/
|
|
305
|
+
options?: {
|
|
306
|
+
/**
|
|
307
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
308
|
+
* the request in the OpenAPI specification.
|
|
309
|
+
* Set this to false to omit this header.
|
|
310
|
+
*/
|
|
311
|
+
omitContentTypeHeader?: boolean;
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* API Client for TestApi
|
|
317
|
+
*/
|
|
318
|
+
export class TestApi {
|
|
319
|
+
private $config: TestApiConfig;
|
|
320
|
+
|
|
321
|
+
constructor(config: TestApiConfig) {
|
|
322
|
+
this.$config = config;
|
|
323
|
+
|
|
324
|
+
this.putBlobMeta = this.putBlobMeta.bind(this);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
328
|
+
csv: ',',
|
|
329
|
+
ssv: ' ',
|
|
330
|
+
pipes: '|',
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
334
|
+
if (value === undefined || value === null) {
|
|
335
|
+
return [];
|
|
336
|
+
}
|
|
337
|
+
if (typeof value !== 'object') {
|
|
338
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
339
|
+
}
|
|
340
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
341
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
342
|
+
);
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
private $url = (
|
|
346
|
+
path: string,
|
|
347
|
+
pathParameters: { [key: string]: any },
|
|
348
|
+
queryParameters: { [key: string]: any },
|
|
349
|
+
collectionFormats?: {
|
|
350
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
351
|
+
},
|
|
352
|
+
): string => {
|
|
353
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
354
|
+
? this.$config.url.slice(0, -1)
|
|
355
|
+
: this.$config.url;
|
|
356
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
357
|
+
(withParams, [key, value]) =>
|
|
358
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
359
|
+
path,
|
|
360
|
+
);
|
|
361
|
+
const queryString = Object.entries(queryParameters)
|
|
362
|
+
.flatMap(([key, value]) => {
|
|
363
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
364
|
+
return value.map(
|
|
365
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
if (
|
|
369
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
370
|
+
value !== null &&
|
|
371
|
+
typeof value === 'object'
|
|
372
|
+
) {
|
|
373
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
374
|
+
}
|
|
375
|
+
const delimiter =
|
|
376
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
377
|
+
return [
|
|
378
|
+
\`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
379
|
+
];
|
|
380
|
+
})
|
|
381
|
+
.join('&');
|
|
382
|
+
return (
|
|
383
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
384
|
+
);
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
private $headers = (
|
|
388
|
+
headerParameters: { [key: string]: any },
|
|
389
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
390
|
+
): [string, string][] => {
|
|
391
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
392
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
393
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
394
|
+
}
|
|
395
|
+
const delimiter =
|
|
396
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
397
|
+
return [
|
|
398
|
+
[
|
|
399
|
+
key,
|
|
400
|
+
Array.isArray(value)
|
|
401
|
+
? value.map(String).join(delimiter)
|
|
402
|
+
: String(value),
|
|
403
|
+
],
|
|
404
|
+
];
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
private $fetch: typeof fetch = (...args) =>
|
|
409
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
410
|
+
|
|
411
|
+
public async putBlobMeta(input: PutBlobMetaRequest): Promise<BlobMeta> {
|
|
412
|
+
const pathParameters: { [key: string]: any } = {};
|
|
413
|
+
const queryParameters: { [key: string]: any } = {};
|
|
414
|
+
const headerParameters: { [key: string]: any } = {};
|
|
415
|
+
if (!this.$config.options?.omitContentTypeHeader) {
|
|
416
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
417
|
+
}
|
|
418
|
+
const body =
|
|
419
|
+
typeof input === 'object'
|
|
420
|
+
? JSON.stringify($IO.BlobMeta.toJson(input))
|
|
421
|
+
: String($IO.BlobMeta.toJson(input));
|
|
422
|
+
|
|
423
|
+
const response = await this.$fetch(
|
|
424
|
+
this.$url('/blob-meta', pathParameters, queryParameters),
|
|
425
|
+
{
|
|
426
|
+
headers: this.$headers(headerParameters),
|
|
427
|
+
method: 'POST',
|
|
428
|
+
body,
|
|
429
|
+
},
|
|
430
|
+
);
|
|
431
|
+
|
|
432
|
+
if (response.status === 200) {
|
|
433
|
+
return $IO.BlobMeta.fromJson(await response.json());
|
|
434
|
+
}
|
|
435
|
+
throw new Error(
|
|
436
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
"
|
|
441
|
+
`;
|
|
442
|
+
|
|
443
|
+
exports[`openApiTsClientGenerator - spec compliance > should keep a decimal format string un-corrupted and round-trip byte fields > types.gen.ts 1`] = `
|
|
444
|
+
"export type BlobMeta = {
|
|
445
|
+
data: string;
|
|
446
|
+
price: string;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
export type PutBlobMetaRequest = BlobMeta;
|
|
450
|
+
export type PutBlobMetaError = never;
|
|
451
|
+
"
|
|
452
|
+
`;
|
|
453
|
+
|
|
454
|
+
exports[`openApiTsClientGenerator - spec compliance > should omit the body entirely for an optional request body > client.gen.ts 1`] = `
|
|
455
|
+
"import type { SearchRequestContent, SearchRequest } from './types.gen.js';
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Utility for serialisation and deserialisation of API types.
|
|
459
|
+
*/
|
|
460
|
+
export class $IO {
|
|
461
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
462
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
463
|
+
|
|
464
|
+
public static SearchRequestContent = {
|
|
465
|
+
toJson: (model: SearchRequestContent): any => {
|
|
466
|
+
if (model === undefined || model === null) {
|
|
467
|
+
return model;
|
|
468
|
+
}
|
|
469
|
+
return {
|
|
470
|
+
...(model.query === undefined
|
|
471
|
+
? {}
|
|
472
|
+
: {
|
|
473
|
+
query: model.query,
|
|
474
|
+
}),
|
|
475
|
+
};
|
|
476
|
+
},
|
|
477
|
+
fromJson: (json: any): SearchRequestContent => {
|
|
478
|
+
if (json === undefined || json === null) {
|
|
479
|
+
return json;
|
|
480
|
+
}
|
|
481
|
+
return {
|
|
482
|
+
query: json['query'],
|
|
483
|
+
};
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Client configuration for TestApi
|
|
490
|
+
*/
|
|
491
|
+
export interface TestApiConfig {
|
|
492
|
+
/**
|
|
493
|
+
* Base URL for the API
|
|
494
|
+
*/
|
|
495
|
+
url: string;
|
|
496
|
+
/**
|
|
497
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
498
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
499
|
+
*/
|
|
500
|
+
fetch?: typeof fetch;
|
|
501
|
+
/**
|
|
502
|
+
* Additional configuration
|
|
503
|
+
*/
|
|
504
|
+
options?: {
|
|
505
|
+
/**
|
|
506
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
507
|
+
* the request in the OpenAPI specification.
|
|
508
|
+
* Set this to false to omit this header.
|
|
509
|
+
*/
|
|
510
|
+
omitContentTypeHeader?: boolean;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* API Client for TestApi
|
|
516
|
+
*/
|
|
517
|
+
export class TestApi {
|
|
518
|
+
private $config: TestApiConfig;
|
|
519
|
+
|
|
520
|
+
constructor(config: TestApiConfig) {
|
|
521
|
+
this.$config = config;
|
|
522
|
+
|
|
523
|
+
this.search = this.search.bind(this);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
527
|
+
csv: ',',
|
|
528
|
+
ssv: ' ',
|
|
529
|
+
pipes: '|',
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
533
|
+
if (value === undefined || value === null) {
|
|
534
|
+
return [];
|
|
535
|
+
}
|
|
536
|
+
if (typeof value !== 'object') {
|
|
537
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
538
|
+
}
|
|
539
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
540
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
541
|
+
);
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
private $url = (
|
|
545
|
+
path: string,
|
|
546
|
+
pathParameters: { [key: string]: any },
|
|
547
|
+
queryParameters: { [key: string]: any },
|
|
548
|
+
collectionFormats?: {
|
|
549
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
550
|
+
},
|
|
551
|
+
): string => {
|
|
552
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
553
|
+
? this.$config.url.slice(0, -1)
|
|
554
|
+
: this.$config.url;
|
|
555
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
556
|
+
(withParams, [key, value]) =>
|
|
557
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
558
|
+
path,
|
|
559
|
+
);
|
|
560
|
+
const queryString = Object.entries(queryParameters)
|
|
561
|
+
.flatMap(([key, value]) => {
|
|
562
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
563
|
+
return value.map(
|
|
564
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
if (
|
|
568
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
569
|
+
value !== null &&
|
|
570
|
+
typeof value === 'object'
|
|
571
|
+
) {
|
|
572
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
573
|
+
}
|
|
574
|
+
const delimiter =
|
|
575
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
576
|
+
return [
|
|
577
|
+
\`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
578
|
+
];
|
|
579
|
+
})
|
|
580
|
+
.join('&');
|
|
581
|
+
return (
|
|
582
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
583
|
+
);
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
private $headers = (
|
|
587
|
+
headerParameters: { [key: string]: any },
|
|
588
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
589
|
+
): [string, string][] => {
|
|
590
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
591
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
592
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
593
|
+
}
|
|
594
|
+
const delimiter =
|
|
595
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
596
|
+
return [
|
|
597
|
+
[
|
|
598
|
+
key,
|
|
599
|
+
Array.isArray(value)
|
|
600
|
+
? value.map(String).join(delimiter)
|
|
601
|
+
: String(value),
|
|
602
|
+
],
|
|
603
|
+
];
|
|
604
|
+
});
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
private $fetch: typeof fetch = (...args) =>
|
|
608
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
609
|
+
|
|
610
|
+
public async search(input?: SearchRequest): Promise<string> {
|
|
611
|
+
const pathParameters: { [key: string]: any } = {};
|
|
612
|
+
const queryParameters: { [key: string]: any } = {};
|
|
613
|
+
const headerParameters: { [key: string]: any } = {};
|
|
614
|
+
if (!this.$config.options?.omitContentTypeHeader) {
|
|
615
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
616
|
+
}
|
|
617
|
+
const body =
|
|
618
|
+
input === undefined
|
|
619
|
+
? undefined
|
|
620
|
+
: typeof input === 'object'
|
|
621
|
+
? JSON.stringify($IO.SearchRequestContent.toJson(input))
|
|
622
|
+
: String($IO.SearchRequestContent.toJson(input));
|
|
623
|
+
|
|
624
|
+
const response = await this.$fetch(
|
|
625
|
+
this.$url('/search', pathParameters, queryParameters),
|
|
626
|
+
{
|
|
627
|
+
headers: this.$headers(headerParameters),
|
|
628
|
+
method: 'POST',
|
|
629
|
+
body,
|
|
630
|
+
},
|
|
631
|
+
);
|
|
632
|
+
|
|
633
|
+
if (response.status === 200) {
|
|
634
|
+
return await response.json();
|
|
635
|
+
}
|
|
636
|
+
throw new Error(
|
|
637
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
"
|
|
642
|
+
`;
|
|
643
|
+
|
|
644
|
+
exports[`openApiTsClientGenerator - spec compliance > should omit the body entirely for an optional request body > types.gen.ts 1`] = `
|
|
645
|
+
"export type SearchRequestContent = {
|
|
646
|
+
query: string;
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
export type SearchRequest = SearchRequestContent | undefined;
|
|
650
|
+
export type SearchError = never;
|
|
651
|
+
"
|
|
652
|
+
`;
|
|
653
|
+
|
|
654
|
+
exports[`openApiTsClientGenerator - spec compliance > should parse 4XX range responses as typed errors and 5XX text as raw text > client.gen.ts 1`] = `
|
|
655
|
+
"import type {
|
|
656
|
+
GetThing4XXResponse,
|
|
657
|
+
GetThingRequestPathParameters,
|
|
658
|
+
GetThingRequest,
|
|
659
|
+
} from './types.gen.js';
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Utility for serialisation and deserialisation of API types.
|
|
663
|
+
*/
|
|
664
|
+
export class $IO {
|
|
665
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
666
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
667
|
+
|
|
668
|
+
public static GetThing4XXResponse = {
|
|
669
|
+
toJson: (model: GetThing4XXResponse): any => {
|
|
670
|
+
if (model === undefined || model === null) {
|
|
671
|
+
return model;
|
|
672
|
+
}
|
|
673
|
+
return {
|
|
674
|
+
...(model.reason === undefined
|
|
675
|
+
? {}
|
|
676
|
+
: {
|
|
677
|
+
reason: model.reason,
|
|
678
|
+
}),
|
|
679
|
+
};
|
|
680
|
+
},
|
|
681
|
+
fromJson: (json: any): GetThing4XXResponse => {
|
|
682
|
+
if (json === undefined || json === null) {
|
|
683
|
+
return json;
|
|
684
|
+
}
|
|
685
|
+
return {
|
|
686
|
+
reason: json['reason'],
|
|
687
|
+
};
|
|
688
|
+
},
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
public static GetThingRequestPathParameters = {
|
|
692
|
+
toJson: (model: GetThingRequestPathParameters): any => {
|
|
693
|
+
if (model === undefined || model === null) {
|
|
694
|
+
return model;
|
|
695
|
+
}
|
|
696
|
+
return {
|
|
697
|
+
...(model.id === undefined
|
|
698
|
+
? {}
|
|
699
|
+
: {
|
|
700
|
+
id: model.id,
|
|
701
|
+
}),
|
|
702
|
+
};
|
|
703
|
+
},
|
|
704
|
+
fromJson: (json: any): GetThingRequestPathParameters => {
|
|
705
|
+
if (json === undefined || json === null) {
|
|
706
|
+
return json;
|
|
707
|
+
}
|
|
708
|
+
return {
|
|
709
|
+
id: json['id'],
|
|
710
|
+
};
|
|
711
|
+
},
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Client configuration for TestApi
|
|
717
|
+
*/
|
|
718
|
+
export interface TestApiConfig {
|
|
719
|
+
/**
|
|
720
|
+
* Base URL for the API
|
|
721
|
+
*/
|
|
722
|
+
url: string;
|
|
723
|
+
/**
|
|
724
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
725
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
726
|
+
*/
|
|
727
|
+
fetch?: typeof fetch;
|
|
728
|
+
/**
|
|
729
|
+
* Additional configuration
|
|
730
|
+
*/
|
|
731
|
+
options?: {
|
|
732
|
+
/**
|
|
733
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
734
|
+
* the request in the OpenAPI specification.
|
|
735
|
+
* Set this to false to omit this header.
|
|
736
|
+
*/
|
|
737
|
+
omitContentTypeHeader?: boolean;
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* API Client for TestApi
|
|
743
|
+
*/
|
|
744
|
+
export class TestApi {
|
|
745
|
+
private $config: TestApiConfig;
|
|
746
|
+
|
|
747
|
+
constructor(config: TestApiConfig) {
|
|
748
|
+
this.$config = config;
|
|
749
|
+
|
|
750
|
+
this.getThing = this.getThing.bind(this);
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
754
|
+
csv: ',',
|
|
755
|
+
ssv: ' ',
|
|
756
|
+
pipes: '|',
|
|
757
|
+
};
|
|
758
|
+
|
|
759
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
760
|
+
if (value === undefined || value === null) {
|
|
761
|
+
return [];
|
|
762
|
+
}
|
|
763
|
+
if (typeof value !== 'object') {
|
|
764
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
765
|
+
}
|
|
766
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
767
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
768
|
+
);
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
private $url = (
|
|
772
|
+
path: string,
|
|
773
|
+
pathParameters: { [key: string]: any },
|
|
774
|
+
queryParameters: { [key: string]: any },
|
|
775
|
+
collectionFormats?: {
|
|
776
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
777
|
+
},
|
|
778
|
+
): string => {
|
|
779
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
780
|
+
? this.$config.url.slice(0, -1)
|
|
781
|
+
: this.$config.url;
|
|
782
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
783
|
+
(withParams, [key, value]) =>
|
|
784
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
785
|
+
path,
|
|
786
|
+
);
|
|
787
|
+
const queryString = Object.entries(queryParameters)
|
|
788
|
+
.flatMap(([key, value]) => {
|
|
789
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
790
|
+
return value.map(
|
|
791
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
if (
|
|
795
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
796
|
+
value !== null &&
|
|
797
|
+
typeof value === 'object'
|
|
798
|
+
) {
|
|
799
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
800
|
+
}
|
|
801
|
+
const delimiter =
|
|
802
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
803
|
+
return [
|
|
804
|
+
\`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
805
|
+
];
|
|
806
|
+
})
|
|
807
|
+
.join('&');
|
|
808
|
+
return (
|
|
809
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
810
|
+
);
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
private $headers = (
|
|
814
|
+
headerParameters: { [key: string]: any },
|
|
815
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
816
|
+
): [string, string][] => {
|
|
817
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
818
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
819
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
820
|
+
}
|
|
821
|
+
const delimiter =
|
|
822
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
823
|
+
return [
|
|
824
|
+
[
|
|
825
|
+
key,
|
|
826
|
+
Array.isArray(value)
|
|
827
|
+
? value.map(String).join(delimiter)
|
|
828
|
+
: String(value),
|
|
829
|
+
],
|
|
830
|
+
];
|
|
831
|
+
});
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
private $fetch: typeof fetch = (...args) =>
|
|
835
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
836
|
+
|
|
837
|
+
public async getThing(input: GetThingRequest): Promise<string> {
|
|
838
|
+
const pathParameters: { [key: string]: any } =
|
|
839
|
+
$IO.GetThingRequestPathParameters.toJson(input);
|
|
840
|
+
const queryParameters: { [key: string]: any } = {};
|
|
841
|
+
const headerParameters: { [key: string]: any } = {};
|
|
842
|
+
|
|
843
|
+
const body = undefined;
|
|
844
|
+
|
|
845
|
+
const response = await this.$fetch(
|
|
846
|
+
this.$url('/things/{id}', pathParameters, queryParameters),
|
|
847
|
+
{
|
|
848
|
+
headers: this.$headers(headerParameters),
|
|
849
|
+
method: 'GET',
|
|
850
|
+
body,
|
|
851
|
+
},
|
|
852
|
+
);
|
|
853
|
+
|
|
854
|
+
if (response.status === 200) {
|
|
855
|
+
return await response.json();
|
|
856
|
+
}
|
|
857
|
+
if (response.status >= 400 && response.status < 500) {
|
|
858
|
+
throw {
|
|
859
|
+
status: response.status,
|
|
860
|
+
error: $IO.GetThing4XXResponse.fromJson(await response.json()),
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
if (response.status >= 500 && response.status < 600) {
|
|
864
|
+
throw {
|
|
865
|
+
status: response.status,
|
|
866
|
+
error: await response.text(),
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
throw new Error(
|
|
870
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
"
|
|
875
|
+
`;
|
|
876
|
+
|
|
877
|
+
exports[`openApiTsClientGenerator - spec compliance > should parse 4XX range responses as typed errors and 5XX text as raw text > types.gen.ts 1`] = `
|
|
878
|
+
"export type GetThing4XXResponse = {
|
|
879
|
+
reason: string;
|
|
880
|
+
};
|
|
881
|
+
export type GetThingRequestPathParameters = {
|
|
882
|
+
id: string;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
export type GetThingRequest = GetThingRequestPathParameters;
|
|
886
|
+
export type GetThing4XXError = {
|
|
887
|
+
status: _4XX;
|
|
888
|
+
error: GetThing4XXResponse;
|
|
889
|
+
};
|
|
890
|
+
export type GetThing5XXError = {
|
|
891
|
+
status: _5XX;
|
|
892
|
+
error: string;
|
|
893
|
+
};
|
|
894
|
+
export type GetThingError = GetThing4XXError | GetThing5XXError;
|
|
895
|
+
export type _4XX =
|
|
896
|
+
| 400
|
|
897
|
+
| 401
|
|
898
|
+
| 402
|
|
899
|
+
| 403
|
|
900
|
+
| 404
|
|
901
|
+
| 405
|
|
902
|
+
| 406
|
|
903
|
+
| 407
|
|
904
|
+
| 408
|
|
905
|
+
| 409
|
|
906
|
+
| 410
|
|
907
|
+
| 411
|
|
908
|
+
| 412
|
|
909
|
+
| 413
|
|
910
|
+
| 414
|
|
911
|
+
| 415
|
|
912
|
+
| 416
|
|
913
|
+
| 417
|
|
914
|
+
| 418
|
|
915
|
+
| 419
|
|
916
|
+
| 420
|
|
917
|
+
| 421
|
|
918
|
+
| 422
|
|
919
|
+
| 423
|
|
920
|
+
| 424
|
|
921
|
+
| 425
|
|
922
|
+
| 426
|
|
923
|
+
| 427
|
|
924
|
+
| 428
|
|
925
|
+
| 429
|
|
926
|
+
| 430
|
|
927
|
+
| 431
|
|
928
|
+
| 432
|
|
929
|
+
| 433
|
|
930
|
+
| 434
|
|
931
|
+
| 435
|
|
932
|
+
| 436
|
|
933
|
+
| 437
|
|
934
|
+
| 438
|
|
935
|
+
| 439
|
|
936
|
+
| 440
|
|
937
|
+
| 441
|
|
938
|
+
| 442
|
|
939
|
+
| 443
|
|
940
|
+
| 444
|
|
941
|
+
| 445
|
|
942
|
+
| 446
|
|
943
|
+
| 447
|
|
944
|
+
| 448
|
|
945
|
+
| 449
|
|
946
|
+
| 450
|
|
947
|
+
| 451
|
|
948
|
+
| 452
|
|
949
|
+
| 453
|
|
950
|
+
| 454
|
|
951
|
+
| 455
|
|
952
|
+
| 456
|
|
953
|
+
| 457
|
|
954
|
+
| 458
|
|
955
|
+
| 459
|
|
956
|
+
| 460
|
|
957
|
+
| 461
|
|
958
|
+
| 462
|
|
959
|
+
| 463
|
|
960
|
+
| 464
|
|
961
|
+
| 465
|
|
962
|
+
| 466
|
|
963
|
+
| 467
|
|
964
|
+
| 468
|
|
965
|
+
| 469
|
|
966
|
+
| 470
|
|
967
|
+
| 471
|
|
968
|
+
| 472
|
|
969
|
+
| 473
|
|
970
|
+
| 474
|
|
971
|
+
| 475
|
|
972
|
+
| 476
|
|
973
|
+
| 477
|
|
974
|
+
| 478
|
|
975
|
+
| 479
|
|
976
|
+
| 480
|
|
977
|
+
| 481
|
|
978
|
+
| 482
|
|
979
|
+
| 483
|
|
980
|
+
| 484
|
|
981
|
+
| 485
|
|
982
|
+
| 486
|
|
983
|
+
| 487
|
|
984
|
+
| 488
|
|
985
|
+
| 489
|
|
986
|
+
| 490
|
|
987
|
+
| 491
|
|
988
|
+
| 492
|
|
989
|
+
| 493
|
|
990
|
+
| 494
|
|
991
|
+
| 495
|
|
992
|
+
| 496
|
|
993
|
+
| 497
|
|
994
|
+
| 498
|
|
995
|
+
| 499;
|
|
996
|
+
export type _5XX =
|
|
997
|
+
| 500
|
|
998
|
+
| 501
|
|
999
|
+
| 502
|
|
1000
|
+
| 503
|
|
1001
|
+
| 504
|
|
1002
|
+
| 505
|
|
1003
|
+
| 506
|
|
1004
|
+
| 507
|
|
1005
|
+
| 508
|
|
1006
|
+
| 509
|
|
1007
|
+
| 510
|
|
1008
|
+
| 511
|
|
1009
|
+
| 512
|
|
1010
|
+
| 513
|
|
1011
|
+
| 514
|
|
1012
|
+
| 515
|
|
1013
|
+
| 516
|
|
1014
|
+
| 517
|
|
1015
|
+
| 518
|
|
1016
|
+
| 519
|
|
1017
|
+
| 520
|
|
1018
|
+
| 521
|
|
1019
|
+
| 522
|
|
1020
|
+
| 523
|
|
1021
|
+
| 524
|
|
1022
|
+
| 525
|
|
1023
|
+
| 526
|
|
1024
|
+
| 527
|
|
1025
|
+
| 528
|
|
1026
|
+
| 529
|
|
1027
|
+
| 530
|
|
1028
|
+
| 531
|
|
1029
|
+
| 532
|
|
1030
|
+
| 533
|
|
1031
|
+
| 534
|
|
1032
|
+
| 535
|
|
1033
|
+
| 536
|
|
1034
|
+
| 537
|
|
1035
|
+
| 538
|
|
1036
|
+
| 539
|
|
1037
|
+
| 540
|
|
1038
|
+
| 541
|
|
1039
|
+
| 542
|
|
1040
|
+
| 543
|
|
1041
|
+
| 544
|
|
1042
|
+
| 545
|
|
1043
|
+
| 546
|
|
1044
|
+
| 547
|
|
1045
|
+
| 548
|
|
1046
|
+
| 549
|
|
1047
|
+
| 550
|
|
1048
|
+
| 551
|
|
1049
|
+
| 552
|
|
1050
|
+
| 553
|
|
1051
|
+
| 554
|
|
1052
|
+
| 555
|
|
1053
|
+
| 556
|
|
1054
|
+
| 557
|
|
1055
|
+
| 558
|
|
1056
|
+
| 559
|
|
1057
|
+
| 560
|
|
1058
|
+
| 561
|
|
1059
|
+
| 562
|
|
1060
|
+
| 563
|
|
1061
|
+
| 564
|
|
1062
|
+
| 565
|
|
1063
|
+
| 566
|
|
1064
|
+
| 567
|
|
1065
|
+
| 568
|
|
1066
|
+
| 569
|
|
1067
|
+
| 570
|
|
1068
|
+
| 571
|
|
1069
|
+
| 572
|
|
1070
|
+
| 573
|
|
1071
|
+
| 574
|
|
1072
|
+
| 575
|
|
1073
|
+
| 576
|
|
1074
|
+
| 577
|
|
1075
|
+
| 578
|
|
1076
|
+
| 579
|
|
1077
|
+
| 580
|
|
1078
|
+
| 581
|
|
1079
|
+
| 582
|
|
1080
|
+
| 583
|
|
1081
|
+
| 584
|
|
1082
|
+
| 585
|
|
1083
|
+
| 586
|
|
1084
|
+
| 587
|
|
1085
|
+
| 588
|
|
1086
|
+
| 589
|
|
1087
|
+
| 590
|
|
1088
|
+
| 591
|
|
1089
|
+
| 592
|
|
1090
|
+
| 593
|
|
1091
|
+
| 594
|
|
1092
|
+
| 595
|
|
1093
|
+
| 596
|
|
1094
|
+
| 597
|
|
1095
|
+
| 598
|
|
1096
|
+
| 599;
|
|
1097
|
+
"
|
|
1098
|
+
`;
|
|
1099
|
+
|
|
1100
|
+
exports[`openApiTsClientGenerator - spec compliance > should send multipart parts with content types declared by the encoding object > client.gen.ts 1`] = `
|
|
1101
|
+
"import type {
|
|
1102
|
+
CreateDocumentRequestContent,
|
|
1103
|
+
CreateDocumentRequestContentMetadata,
|
|
1104
|
+
CreateDocumentRequest,
|
|
1105
|
+
} from './types.gen.js';
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* Utility for serialisation and deserialisation of API types.
|
|
1109
|
+
*/
|
|
1110
|
+
export class $IO {
|
|
1111
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
1112
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
1113
|
+
|
|
1114
|
+
public static CreateDocumentRequestContent = {
|
|
1115
|
+
toJson: (model: CreateDocumentRequestContent): any => {
|
|
1116
|
+
if (model === undefined || model === null) {
|
|
1117
|
+
return model;
|
|
1118
|
+
}
|
|
1119
|
+
return {
|
|
1120
|
+
...(model.metadata === undefined
|
|
1121
|
+
? {}
|
|
1122
|
+
: {
|
|
1123
|
+
metadata: $IO.CreateDocumentRequestContentMetadata.toJson(
|
|
1124
|
+
model.metadata,
|
|
1125
|
+
),
|
|
1126
|
+
}),
|
|
1127
|
+
...(model.file === undefined
|
|
1128
|
+
? {}
|
|
1129
|
+
: {
|
|
1130
|
+
file: model.file,
|
|
1131
|
+
}),
|
|
1132
|
+
};
|
|
1133
|
+
},
|
|
1134
|
+
fromJson: (json: any): CreateDocumentRequestContent => {
|
|
1135
|
+
if (json === undefined || json === null) {
|
|
1136
|
+
return json;
|
|
1137
|
+
}
|
|
1138
|
+
return {
|
|
1139
|
+
metadata: $IO.CreateDocumentRequestContentMetadata.fromJson(
|
|
1140
|
+
json['metadata'],
|
|
1141
|
+
),
|
|
1142
|
+
file: json['file'],
|
|
1143
|
+
};
|
|
1144
|
+
},
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
public static CreateDocumentRequestContentMetadata = {
|
|
1148
|
+
toJson: (model: CreateDocumentRequestContentMetadata): any => {
|
|
1149
|
+
if (model === undefined || model === null) {
|
|
1150
|
+
return model;
|
|
1151
|
+
}
|
|
1152
|
+
return {
|
|
1153
|
+
...(model.title === undefined
|
|
1154
|
+
? {}
|
|
1155
|
+
: {
|
|
1156
|
+
title: model.title,
|
|
1157
|
+
}),
|
|
1158
|
+
};
|
|
1159
|
+
},
|
|
1160
|
+
fromJson: (json: any): CreateDocumentRequestContentMetadata => {
|
|
1161
|
+
if (json === undefined || json === null) {
|
|
1162
|
+
return json;
|
|
1163
|
+
}
|
|
1164
|
+
return {
|
|
1165
|
+
title: json['title'],
|
|
1166
|
+
};
|
|
1167
|
+
},
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Client configuration for TestApi
|
|
1173
|
+
*/
|
|
1174
|
+
export interface TestApiConfig {
|
|
1175
|
+
/**
|
|
1176
|
+
* Base URL for the API
|
|
1177
|
+
*/
|
|
1178
|
+
url: string;
|
|
1179
|
+
/**
|
|
1180
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
1181
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
1182
|
+
*/
|
|
1183
|
+
fetch?: typeof fetch;
|
|
1184
|
+
/**
|
|
1185
|
+
* Additional configuration
|
|
1186
|
+
*/
|
|
1187
|
+
options?: {
|
|
1188
|
+
/**
|
|
1189
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
1190
|
+
* the request in the OpenAPI specification.
|
|
1191
|
+
* Set this to false to omit this header.
|
|
1192
|
+
*/
|
|
1193
|
+
omitContentTypeHeader?: boolean;
|
|
1194
|
+
};
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* API Client for TestApi
|
|
1199
|
+
*/
|
|
1200
|
+
export class TestApi {
|
|
1201
|
+
private $config: TestApiConfig;
|
|
1202
|
+
|
|
1203
|
+
constructor(config: TestApiConfig) {
|
|
1204
|
+
this.$config = config;
|
|
1205
|
+
|
|
1206
|
+
this.createDocument = this.createDocument.bind(this);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
1210
|
+
csv: ',',
|
|
1211
|
+
ssv: ' ',
|
|
1212
|
+
pipes: '|',
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
1216
|
+
if (value === undefined || value === null) {
|
|
1217
|
+
return [];
|
|
1218
|
+
}
|
|
1219
|
+
if (typeof value !== 'object') {
|
|
1220
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
1221
|
+
}
|
|
1222
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
1223
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
1224
|
+
);
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
private $url = (
|
|
1228
|
+
path: string,
|
|
1229
|
+
pathParameters: { [key: string]: any },
|
|
1230
|
+
queryParameters: { [key: string]: any },
|
|
1231
|
+
collectionFormats?: {
|
|
1232
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
1233
|
+
},
|
|
1234
|
+
): string => {
|
|
1235
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
1236
|
+
? this.$config.url.slice(0, -1)
|
|
1237
|
+
: this.$config.url;
|
|
1238
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
1239
|
+
(withParams, [key, value]) =>
|
|
1240
|
+
withParams.replace(\`{\${key}}\`, encodeURIComponent(\`\${value}\`)),
|
|
1241
|
+
path,
|
|
1242
|
+
);
|
|
1243
|
+
const queryString = Object.entries(queryParameters)
|
|
1244
|
+
.flatMap(([key, value]) => {
|
|
1245
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1246
|
+
return value.map(
|
|
1247
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
if (
|
|
1251
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
1252
|
+
value !== null &&
|
|
1253
|
+
typeof value === 'object'
|
|
1254
|
+
) {
|
|
1255
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
1256
|
+
}
|
|
1257
|
+
const delimiter =
|
|
1258
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
1259
|
+
return [
|
|
1260
|
+
\`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
1261
|
+
];
|
|
1262
|
+
})
|
|
1263
|
+
.join('&');
|
|
1264
|
+
return (
|
|
1265
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
1266
|
+
);
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1269
|
+
private $headers = (
|
|
1270
|
+
headerParameters: { [key: string]: any },
|
|
1271
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
1272
|
+
): [string, string][] => {
|
|
1273
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
1274
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1275
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
1276
|
+
}
|
|
1277
|
+
const delimiter =
|
|
1278
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
1279
|
+
return [
|
|
1280
|
+
[
|
|
1281
|
+
key,
|
|
1282
|
+
Array.isArray(value)
|
|
1283
|
+
? value.map(String).join(delimiter)
|
|
1284
|
+
: String(value),
|
|
1285
|
+
],
|
|
1286
|
+
];
|
|
1287
|
+
});
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
private $formData = (
|
|
1291
|
+
model: { [key: string]: any },
|
|
1292
|
+
partContentTypes?: { [key: string]: string },
|
|
1293
|
+
): FormData => {
|
|
1294
|
+
const formData = new FormData();
|
|
1295
|
+
const append = (key: string, value: any): void => {
|
|
1296
|
+
if (value === undefined || value === null) {
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
const partContentType = partContentTypes?.[key];
|
|
1300
|
+
if (value instanceof Blob || typeof value === 'string') {
|
|
1301
|
+
// A declared part content type overrides the default (text/plain for
|
|
1302
|
+
// strings, the Blob's own type otherwise)
|
|
1303
|
+
if (partContentType) {
|
|
1304
|
+
formData.append(key, new Blob([value], { type: partContentType }));
|
|
1305
|
+
} else {
|
|
1306
|
+
formData.append(key, value);
|
|
1307
|
+
}
|
|
1308
|
+
} else if (Array.isArray(value)) {
|
|
1309
|
+
value.forEach((v) => append(key, v));
|
|
1310
|
+
} else if (typeof value === 'object') {
|
|
1311
|
+
const serialized = JSON.stringify(value);
|
|
1312
|
+
if (partContentType) {
|
|
1313
|
+
formData.append(
|
|
1314
|
+
key,
|
|
1315
|
+
new Blob([serialized], { type: partContentType }),
|
|
1316
|
+
);
|
|
1317
|
+
} else {
|
|
1318
|
+
formData.append(key, serialized);
|
|
1319
|
+
}
|
|
1320
|
+
} else {
|
|
1321
|
+
formData.append(key, String(value));
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
Object.entries(model).forEach(([key, value]) => append(key, value));
|
|
1325
|
+
return formData;
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
private $fetch: typeof fetch = (...args) =>
|
|
1329
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
1330
|
+
|
|
1331
|
+
public async createDocument(input: CreateDocumentRequest): Promise<string> {
|
|
1332
|
+
const pathParameters: { [key: string]: any } = {};
|
|
1333
|
+
const queryParameters: { [key: string]: any } = {};
|
|
1334
|
+
const headerParameters: { [key: string]: any } = {};
|
|
1335
|
+
const body = this.$formData(
|
|
1336
|
+
$IO.CreateDocumentRequestContent.toJson(input),
|
|
1337
|
+
{ metadata: 'application/json' },
|
|
1338
|
+
);
|
|
1339
|
+
|
|
1340
|
+
const response = await this.$fetch(
|
|
1341
|
+
this.$url('/documents', pathParameters, queryParameters),
|
|
1342
|
+
{
|
|
1343
|
+
headers: this.$headers(headerParameters),
|
|
1344
|
+
method: 'POST',
|
|
1345
|
+
body,
|
|
1346
|
+
},
|
|
1347
|
+
);
|
|
1348
|
+
|
|
1349
|
+
if (response.status === 200) {
|
|
1350
|
+
return await response.json();
|
|
1351
|
+
}
|
|
1352
|
+
throw new Error(
|
|
1353
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
"
|
|
1358
|
+
`;
|
|
1359
|
+
|
|
1360
|
+
exports[`openApiTsClientGenerator - spec compliance > should send multipart parts with content types declared by the encoding object > types.gen.ts 1`] = `
|
|
1361
|
+
"export type CreateDocumentRequestContent = {
|
|
1362
|
+
metadata: CreateDocumentRequestContentMetadata;
|
|
1363
|
+
file: Blob;
|
|
1364
|
+
};
|
|
1365
|
+
export type CreateDocumentRequestContentMetadata = {
|
|
1366
|
+
title: string;
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1369
|
+
export type CreateDocumentRequest = CreateDocumentRequestContent;
|
|
1370
|
+
export type CreateDocumentError = never;
|
|
1371
|
+
"
|
|
1372
|
+
`;
|
|
1373
|
+
|
|
1374
|
+
exports[`openApiTsClientGenerator - spec compliance > should serialise exploded matrix and label path styles > client.gen.ts 1`] = `
|
|
1375
|
+
"import type {
|
|
1376
|
+
StyledRequestPathParameters,
|
|
1377
|
+
StyledRequest,
|
|
1378
|
+
} from './types.gen.js';
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Utility for serialisation and deserialisation of API types.
|
|
1382
|
+
*/
|
|
1383
|
+
export class $IO {
|
|
1384
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
1385
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
1386
|
+
|
|
1387
|
+
public static StyledRequestPathParameters = {
|
|
1388
|
+
toJson: (model: StyledRequestPathParameters): any => {
|
|
1389
|
+
if (model === undefined || model === null) {
|
|
1390
|
+
return model;
|
|
1391
|
+
}
|
|
1392
|
+
return {
|
|
1393
|
+
...(model.coords === undefined
|
|
1394
|
+
? {}
|
|
1395
|
+
: {
|
|
1396
|
+
coords: model.coords,
|
|
1397
|
+
}),
|
|
1398
|
+
...(model.tags === undefined
|
|
1399
|
+
? {}
|
|
1400
|
+
: {
|
|
1401
|
+
tags: model.tags,
|
|
1402
|
+
}),
|
|
1403
|
+
};
|
|
1404
|
+
},
|
|
1405
|
+
fromJson: (json: any): StyledRequestPathParameters => {
|
|
1406
|
+
if (json === undefined || json === null) {
|
|
1407
|
+
return json;
|
|
1408
|
+
}
|
|
1409
|
+
return {
|
|
1410
|
+
coords: json['coords'],
|
|
1411
|
+
tags: json['tags'],
|
|
1412
|
+
};
|
|
1413
|
+
},
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Client configuration for TestApi
|
|
1419
|
+
*/
|
|
1420
|
+
export interface TestApiConfig {
|
|
1421
|
+
/**
|
|
1422
|
+
* Base URL for the API
|
|
1423
|
+
*/
|
|
1424
|
+
url: string;
|
|
1425
|
+
/**
|
|
1426
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
1427
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
1428
|
+
*/
|
|
1429
|
+
fetch?: typeof fetch;
|
|
1430
|
+
/**
|
|
1431
|
+
* Additional configuration
|
|
1432
|
+
*/
|
|
1433
|
+
options?: {
|
|
1434
|
+
/**
|
|
1435
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
1436
|
+
* the request in the OpenAPI specification.
|
|
1437
|
+
* Set this to false to omit this header.
|
|
1438
|
+
*/
|
|
1439
|
+
omitContentTypeHeader?: boolean;
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* API Client for TestApi
|
|
1445
|
+
*/
|
|
1446
|
+
export class TestApi {
|
|
1447
|
+
private $config: TestApiConfig;
|
|
1448
|
+
|
|
1449
|
+
constructor(config: TestApiConfig) {
|
|
1450
|
+
this.$config = config;
|
|
1451
|
+
|
|
1452
|
+
this.styled = this.styled.bind(this);
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
1456
|
+
csv: ',',
|
|
1457
|
+
ssv: ' ',
|
|
1458
|
+
pipes: '|',
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
1462
|
+
if (value === undefined || value === null) {
|
|
1463
|
+
return [];
|
|
1464
|
+
}
|
|
1465
|
+
if (typeof value !== 'object') {
|
|
1466
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
1467
|
+
}
|
|
1468
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
1469
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
1470
|
+
);
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
private $url = (
|
|
1474
|
+
path: string,
|
|
1475
|
+
pathParameters: { [key: string]: any },
|
|
1476
|
+
queryParameters: { [key: string]: any },
|
|
1477
|
+
collectionFormats?: {
|
|
1478
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
1479
|
+
},
|
|
1480
|
+
pathStyles?: {
|
|
1481
|
+
[key: string]: { style: 'matrix' | 'label'; explode: boolean };
|
|
1482
|
+
},
|
|
1483
|
+
): string => {
|
|
1484
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
1485
|
+
? this.$config.url.slice(0, -1)
|
|
1486
|
+
: this.$config.url;
|
|
1487
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
1488
|
+
(withParams, [key, value]) => {
|
|
1489
|
+
const pathStyle = pathStyles?.[key];
|
|
1490
|
+
let rendered: string;
|
|
1491
|
+
if (pathStyle?.style === 'matrix') {
|
|
1492
|
+
// RFC 6570 path-style expansion: ;key=a,b (explode: ;key=a;key=b)
|
|
1493
|
+
rendered =
|
|
1494
|
+
Array.isArray(value) && pathStyle.explode
|
|
1495
|
+
? value
|
|
1496
|
+
.map((v) => \`;\${key}=\${encodeURIComponent(\`\${v}\`)}\`)
|
|
1497
|
+
.join('')
|
|
1498
|
+
: \`;\${key}=\${(Array.isArray(value) ? value : [value]).map((v) => encodeURIComponent(\`\${v}\`)).join(',')}\`;
|
|
1499
|
+
} else if (pathStyle?.style === 'label') {
|
|
1500
|
+
// RFC 6570 label expansion: .a,b (explode: .a.b)
|
|
1501
|
+
rendered = \`.\${(Array.isArray(value) ? value : [value]).map((v) => encodeURIComponent(\`\${v}\`)).join(pathStyle.explode ? '.' : ',')}\`;
|
|
1502
|
+
} else {
|
|
1503
|
+
rendered = encodeURIComponent(\`\${value}\`);
|
|
1504
|
+
}
|
|
1505
|
+
return withParams.replace(\`{\${key}}\`, rendered);
|
|
1506
|
+
},
|
|
1507
|
+
path,
|
|
1508
|
+
);
|
|
1509
|
+
const queryString = Object.entries(queryParameters)
|
|
1510
|
+
.flatMap(([key, value]) => {
|
|
1511
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1512
|
+
return value.map(
|
|
1513
|
+
(v) => \`\${encodeURIComponent(key)}=\${encodeURIComponent(\`\${v}\`)}\`,
|
|
1514
|
+
);
|
|
1515
|
+
}
|
|
1516
|
+
if (
|
|
1517
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
1518
|
+
value !== null &&
|
|
1519
|
+
typeof value === 'object'
|
|
1520
|
+
) {
|
|
1521
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
1522
|
+
}
|
|
1523
|
+
const delimiter =
|
|
1524
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
1525
|
+
return [
|
|
1526
|
+
\`\${encodeURIComponent(key)}=\${encodeURIComponent(Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
1527
|
+
];
|
|
1528
|
+
})
|
|
1529
|
+
.join('&');
|
|
1530
|
+
return (
|
|
1531
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
1532
|
+
);
|
|
1533
|
+
};
|
|
1534
|
+
|
|
1535
|
+
private $headers = (
|
|
1536
|
+
headerParameters: { [key: string]: any },
|
|
1537
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
1538
|
+
): [string, string][] => {
|
|
1539
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
1540
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1541
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
1542
|
+
}
|
|
1543
|
+
const delimiter =
|
|
1544
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
1545
|
+
return [
|
|
1546
|
+
[
|
|
1547
|
+
key,
|
|
1548
|
+
Array.isArray(value)
|
|
1549
|
+
? value.map(String).join(delimiter)
|
|
1550
|
+
: String(value),
|
|
1551
|
+
],
|
|
1552
|
+
];
|
|
1553
|
+
});
|
|
1554
|
+
};
|
|
1555
|
+
|
|
1556
|
+
private $fetch: typeof fetch = (...args) =>
|
|
1557
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
1558
|
+
|
|
1559
|
+
public async styled(input: StyledRequest): Promise<string> {
|
|
1560
|
+
const pathParameters: { [key: string]: any } =
|
|
1561
|
+
$IO.StyledRequestPathParameters.toJson(input);
|
|
1562
|
+
const queryParameters: { [key: string]: any } = {};
|
|
1563
|
+
const headerParameters: { [key: string]: any } = {};
|
|
1564
|
+
const pathParameterStyles = {
|
|
1565
|
+
coords: { style: 'matrix', explode: true },
|
|
1566
|
+
tags: { style: 'label', explode: true },
|
|
1567
|
+
} as const;
|
|
1568
|
+
|
|
1569
|
+
const body = undefined;
|
|
1570
|
+
|
|
1571
|
+
const response = await this.$fetch(
|
|
1572
|
+
this.$url(
|
|
1573
|
+
'/m/{coords}/l/{tags}',
|
|
1574
|
+
pathParameters,
|
|
1575
|
+
queryParameters,
|
|
1576
|
+
undefined,
|
|
1577
|
+
pathParameterStyles,
|
|
1578
|
+
),
|
|
1579
|
+
{
|
|
1580
|
+
headers: this.$headers(headerParameters),
|
|
1581
|
+
method: 'GET',
|
|
1582
|
+
body,
|
|
1583
|
+
},
|
|
1584
|
+
);
|
|
1585
|
+
|
|
1586
|
+
if (response.status === 200) {
|
|
1587
|
+
return await response.json();
|
|
1588
|
+
}
|
|
1589
|
+
throw new Error(
|
|
1590
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
1591
|
+
);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
"
|
|
1595
|
+
`;
|
|
1596
|
+
|
|
1597
|
+
exports[`openApiTsClientGenerator - spec compliance > should serialise exploded matrix and label path styles > types.gen.ts 1`] = `
|
|
1598
|
+
"export type StyledRequestPathParameters = {
|
|
1599
|
+
coords: Array<number>;
|
|
1600
|
+
tags: Array<string>;
|
|
1601
|
+
};
|
|
1602
|
+
|
|
1603
|
+
export type StyledRequest = StyledRequestPathParameters;
|
|
1604
|
+
export type StyledError = never;
|
|
1605
|
+
"
|
|
1606
|
+
`;
|
|
1607
|
+
|
|
1608
|
+
exports[`openApiTsClientGenerator - spec compliance > should serialise matrix and label path styles and allowReserved query parameters > client.gen.ts 1`] = `
|
|
1609
|
+
"import type {
|
|
1610
|
+
StyledRequestPathParameters,
|
|
1611
|
+
StyledRequestQueryParameters,
|
|
1612
|
+
StyledRequest,
|
|
1613
|
+
} from './types.gen.js';
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* Utility for serialisation and deserialisation of API types.
|
|
1617
|
+
*/
|
|
1618
|
+
export class $IO {
|
|
1619
|
+
public static $mapValues = (data: any, fn: (item: any) => any) =>
|
|
1620
|
+
Object.fromEntries(Object.entries(data).map(([k, v]) => [k, fn(v)]));
|
|
1621
|
+
|
|
1622
|
+
public static StyledRequestPathParameters = {
|
|
1623
|
+
toJson: (model: StyledRequestPathParameters): any => {
|
|
1624
|
+
if (model === undefined || model === null) {
|
|
1625
|
+
return model;
|
|
1626
|
+
}
|
|
1627
|
+
return {
|
|
1628
|
+
...(model.coords === undefined
|
|
1629
|
+
? {}
|
|
1630
|
+
: {
|
|
1631
|
+
coords: model.coords,
|
|
1632
|
+
}),
|
|
1633
|
+
...(model.tags === undefined
|
|
1634
|
+
? {}
|
|
1635
|
+
: {
|
|
1636
|
+
tags: model.tags,
|
|
1637
|
+
}),
|
|
1638
|
+
};
|
|
1639
|
+
},
|
|
1640
|
+
fromJson: (json: any): StyledRequestPathParameters => {
|
|
1641
|
+
if (json === undefined || json === null) {
|
|
1642
|
+
return json;
|
|
1643
|
+
}
|
|
1644
|
+
return {
|
|
1645
|
+
coords: json['coords'],
|
|
1646
|
+
tags: json['tags'],
|
|
1647
|
+
};
|
|
1648
|
+
},
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1651
|
+
public static StyledRequestQueryParameters = {
|
|
1652
|
+
toJson: (model: StyledRequestQueryParameters): any => {
|
|
1653
|
+
if (model === undefined || model === null) {
|
|
1654
|
+
return model;
|
|
1655
|
+
}
|
|
1656
|
+
return {
|
|
1657
|
+
...(model.filter === undefined
|
|
1658
|
+
? {}
|
|
1659
|
+
: {
|
|
1660
|
+
filter: model.filter,
|
|
1661
|
+
}),
|
|
1662
|
+
};
|
|
1663
|
+
},
|
|
1664
|
+
fromJson: (json: any): StyledRequestQueryParameters => {
|
|
1665
|
+
if (json === undefined || json === null) {
|
|
1666
|
+
return json;
|
|
1667
|
+
}
|
|
1668
|
+
return {
|
|
1669
|
+
filter: json['filter'],
|
|
1670
|
+
};
|
|
1671
|
+
},
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* Client configuration for TestApi
|
|
1677
|
+
*/
|
|
1678
|
+
export interface TestApiConfig {
|
|
1679
|
+
/**
|
|
1680
|
+
* Base URL for the API
|
|
1681
|
+
*/
|
|
1682
|
+
url: string;
|
|
1683
|
+
/**
|
|
1684
|
+
* Custom instance of fetch. By default the global 'fetch' is used.
|
|
1685
|
+
* You can override this to add custom middleware for use cases such as adding authentication headers.
|
|
1686
|
+
*/
|
|
1687
|
+
fetch?: typeof fetch;
|
|
1688
|
+
/**
|
|
1689
|
+
* Additional configuration
|
|
1690
|
+
*/
|
|
1691
|
+
options?: {
|
|
1692
|
+
/**
|
|
1693
|
+
* By default, the client will add a Content-Type header, set to the media type defined for
|
|
1694
|
+
* the request in the OpenAPI specification.
|
|
1695
|
+
* Set this to false to omit this header.
|
|
1696
|
+
*/
|
|
1697
|
+
omitContentTypeHeader?: boolean;
|
|
1698
|
+
};
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* API Client for TestApi
|
|
1703
|
+
*/
|
|
1704
|
+
export class TestApi {
|
|
1705
|
+
private $config: TestApiConfig;
|
|
1706
|
+
|
|
1707
|
+
constructor(config: TestApiConfig) {
|
|
1708
|
+
this.$config = config;
|
|
1709
|
+
|
|
1710
|
+
this.styled = this.styled.bind(this);
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
private $collectionDelimiters: { [format: string]: string } = {
|
|
1714
|
+
csv: ',',
|
|
1715
|
+
ssv: ' ',
|
|
1716
|
+
pipes: '|',
|
|
1717
|
+
};
|
|
1718
|
+
|
|
1719
|
+
private $deepObject = (key: string, value: any): string[] => {
|
|
1720
|
+
if (value === undefined || value === null) {
|
|
1721
|
+
return [];
|
|
1722
|
+
}
|
|
1723
|
+
if (typeof value !== 'object') {
|
|
1724
|
+
return [\`\${key}=\${encodeURIComponent(String(value))}\`];
|
|
1725
|
+
}
|
|
1726
|
+
return Object.entries(value).flatMap(([prop, v]) =>
|
|
1727
|
+
this.$deepObject(\`\${key}[\${encodeURIComponent(prop)}]\`, v),
|
|
1728
|
+
);
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
private $url = (
|
|
1732
|
+
path: string,
|
|
1733
|
+
pathParameters: { [key: string]: any },
|
|
1734
|
+
queryParameters: { [key: string]: any },
|
|
1735
|
+
collectionFormats?: {
|
|
1736
|
+
[key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' | 'deepObject';
|
|
1737
|
+
},
|
|
1738
|
+
pathStyles?: {
|
|
1739
|
+
[key: string]: { style: 'matrix' | 'label'; explode: boolean };
|
|
1740
|
+
},
|
|
1741
|
+
allowReserved?: string[],
|
|
1742
|
+
): string => {
|
|
1743
|
+
const baseUrl = this.$config.url.endsWith('/')
|
|
1744
|
+
? this.$config.url.slice(0, -1)
|
|
1745
|
+
: this.$config.url;
|
|
1746
|
+
// Reserved characters stay literal when a query parameter declares allowReserved
|
|
1747
|
+
const encodeQueryValue = (key: string, v: string): string =>
|
|
1748
|
+
allowReserved?.includes(key)
|
|
1749
|
+
? encodeURIComponent(v).replace(
|
|
1750
|
+
/%(2F|3A|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)/gi,
|
|
1751
|
+
(m) => decodeURIComponent(m),
|
|
1752
|
+
)
|
|
1753
|
+
: encodeURIComponent(v);
|
|
1754
|
+
const pathWithParameters = Object.entries(pathParameters).reduce(
|
|
1755
|
+
(withParams, [key, value]) => {
|
|
1756
|
+
const pathStyle = pathStyles?.[key];
|
|
1757
|
+
let rendered: string;
|
|
1758
|
+
if (pathStyle?.style === 'matrix') {
|
|
1759
|
+
// RFC 6570 path-style expansion: ;key=a,b (explode: ;key=a;key=b)
|
|
1760
|
+
rendered =
|
|
1761
|
+
Array.isArray(value) && pathStyle.explode
|
|
1762
|
+
? value
|
|
1763
|
+
.map((v) => \`;\${key}=\${encodeURIComponent(\`\${v}\`)}\`)
|
|
1764
|
+
.join('')
|
|
1765
|
+
: \`;\${key}=\${(Array.isArray(value) ? value : [value]).map((v) => encodeURIComponent(\`\${v}\`)).join(',')}\`;
|
|
1766
|
+
} else if (pathStyle?.style === 'label') {
|
|
1767
|
+
// RFC 6570 label expansion: .a,b (explode: .a.b)
|
|
1768
|
+
rendered = \`.\${(Array.isArray(value) ? value : [value]).map((v) => encodeURIComponent(\`\${v}\`)).join(pathStyle.explode ? '.' : ',')}\`;
|
|
1769
|
+
} else {
|
|
1770
|
+
rendered = encodeURIComponent(\`\${value}\`);
|
|
1771
|
+
}
|
|
1772
|
+
return withParams.replace(\`{\${key}}\`, rendered);
|
|
1773
|
+
},
|
|
1774
|
+
path,
|
|
1775
|
+
);
|
|
1776
|
+
const queryString = Object.entries(queryParameters)
|
|
1777
|
+
.flatMap(([key, value]) => {
|
|
1778
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1779
|
+
return value.map(
|
|
1780
|
+
(v) =>
|
|
1781
|
+
\`\${encodeURIComponent(key)}=\${encodeQueryValue(key, \`\${v}\`)}\`,
|
|
1782
|
+
);
|
|
1783
|
+
}
|
|
1784
|
+
if (
|
|
1785
|
+
collectionFormats?.[key] === 'deepObject' &&
|
|
1786
|
+
value !== null &&
|
|
1787
|
+
typeof value === 'object'
|
|
1788
|
+
) {
|
|
1789
|
+
return this.$deepObject(encodeURIComponent(key), value);
|
|
1790
|
+
}
|
|
1791
|
+
const delimiter =
|
|
1792
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
1793
|
+
return [
|
|
1794
|
+
\`\${encodeURIComponent(key)}=\${encodeQueryValue(key, Array.isArray(value) ? value.map(String).join(delimiter) : String(value))}\`,
|
|
1795
|
+
];
|
|
1796
|
+
})
|
|
1797
|
+
.join('&');
|
|
1798
|
+
return (
|
|
1799
|
+
baseUrl + pathWithParameters + (queryString ? \`?\${queryString}\` : '')
|
|
1800
|
+
);
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1803
|
+
private $headers = (
|
|
1804
|
+
headerParameters: { [key: string]: any },
|
|
1805
|
+
collectionFormats?: { [key: string]: 'multi' | 'csv' | 'ssv' | 'pipes' },
|
|
1806
|
+
): [string, string][] => {
|
|
1807
|
+
return Object.entries(headerParameters).flatMap(([key, value]) => {
|
|
1808
|
+
if (Array.isArray(value) && collectionFormats?.[key] === 'multi') {
|
|
1809
|
+
return value.map((v) => [key, String(v)]) as [string, string][];
|
|
1810
|
+
}
|
|
1811
|
+
const delimiter =
|
|
1812
|
+
this.$collectionDelimiters[collectionFormats?.[key] ?? 'csv'] ?? ',';
|
|
1813
|
+
return [
|
|
1814
|
+
[
|
|
1815
|
+
key,
|
|
1816
|
+
Array.isArray(value)
|
|
1817
|
+
? value.map(String).join(delimiter)
|
|
1818
|
+
: String(value),
|
|
1819
|
+
],
|
|
1820
|
+
];
|
|
1821
|
+
});
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
private $fetch: typeof fetch = (...args) =>
|
|
1825
|
+
(this.$config.fetch ?? fetch)(...args);
|
|
1826
|
+
|
|
1827
|
+
public async styled(input: StyledRequest): Promise<string> {
|
|
1828
|
+
const pathParameters: { [key: string]: any } =
|
|
1829
|
+
$IO.StyledRequestPathParameters.toJson(input);
|
|
1830
|
+
const queryParameters: { [key: string]: any } =
|
|
1831
|
+
$IO.StyledRequestQueryParameters.toJson(input);
|
|
1832
|
+
const headerParameters: { [key: string]: any } = {};
|
|
1833
|
+
const queryCollectionFormats = {
|
|
1834
|
+
filter: 'multi',
|
|
1835
|
+
} as const;
|
|
1836
|
+
const pathParameterStyles = {
|
|
1837
|
+
coords: { style: 'matrix', explode: false },
|
|
1838
|
+
tags: { style: 'label', explode: false },
|
|
1839
|
+
} as const;
|
|
1840
|
+
|
|
1841
|
+
const body = undefined;
|
|
1842
|
+
|
|
1843
|
+
const response = await this.$fetch(
|
|
1844
|
+
this.$url(
|
|
1845
|
+
'/m/{coords}/l/{tags}',
|
|
1846
|
+
pathParameters,
|
|
1847
|
+
queryParameters,
|
|
1848
|
+
queryCollectionFormats,
|
|
1849
|
+
pathParameterStyles,
|
|
1850
|
+
['filter'],
|
|
1851
|
+
),
|
|
1852
|
+
{
|
|
1853
|
+
headers: this.$headers(headerParameters),
|
|
1854
|
+
method: 'GET',
|
|
1855
|
+
body,
|
|
1856
|
+
},
|
|
1857
|
+
);
|
|
1858
|
+
|
|
1859
|
+
if (response.status === 200) {
|
|
1860
|
+
return await response.json();
|
|
1861
|
+
}
|
|
1862
|
+
throw new Error(
|
|
1863
|
+
\`Unknown response status \${response.status} returned by API\`,
|
|
1864
|
+
);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
"
|
|
1868
|
+
`;
|
|
1869
|
+
|
|
1870
|
+
exports[`openApiTsClientGenerator - spec compliance > should serialise matrix and label path styles and allowReserved query parameters > types.gen.ts 1`] = `
|
|
1871
|
+
"export type StyledRequestPathParameters = {
|
|
1872
|
+
coords: Array<number>;
|
|
1873
|
+
tags: Array<string>;
|
|
1874
|
+
};
|
|
1875
|
+
export type StyledRequestQueryParameters = {
|
|
1876
|
+
filter: string;
|
|
1877
|
+
};
|
|
1878
|
+
|
|
1879
|
+
export type StyledRequest = StyledRequestPathParameters &
|
|
1880
|
+
StyledRequestQueryParameters;
|
|
1881
|
+
export type StyledError = never;
|
|
1882
|
+
"
|
|
1883
|
+
`;
|