@slycode/slycode 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/messaging/index.js +4 -2
- package/dist/messaging/index.js.map +1 -1
- package/dist/messaging/stt.d.ts +1 -0
- package/dist/messaging/stt.js +66 -57
- package/dist/messaging/stt.js.map +1 -1
- package/dist/messaging/types.d.ts +1 -0
- package/dist/web/.next/BUILD_ID +1 -1
- package/dist/web/.next/build-manifest.json +2 -2
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/endpoint/endpointResolver.js +33 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/index.js +3057 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/models/S3ServiceException.js +12 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/models/errors.js +203 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/runtimeConfig.js +67 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/runtimeConfig.shared.js +56 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/dist-cjs/schemas/schemas_0.js +3258 -0
- package/dist/web/.next/node_modules/@aws-sdk/client-s3-ecbef8e33fd0b8f0/package.json +127 -0
- package/dist/web/.next/prerender-manifest.json +3 -3
- package/dist/web/.next/server/app/_global-error.html +2 -2
- package/dist/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/api/transcribe/route.js +5 -5
- package/dist/web/.next/server/app/api/transcribe/route.js.nft.json +1 -1
- package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__1b9e0d6e._.js +19 -0
- package/dist/web/.next/server/chunks/{[root-of-the-server]__a4d171b5._.js → [root-of-the-server]__4297cb97._.js} +3 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__52da7fe0._.js +5 -0
- package/dist/web/.next/server/chunks/{[root-of-the-server]__53ef96b9._.js → [root-of-the-server]__cf14e306._.js} +2 -2
- package/dist/web/.next/server/chunks/[root-of-the-server]__d5272169._.js +3 -0
- package/dist/web/.next/server/chunks/[root-of-the-server]__d56e68cb._.js +3 -0
- package/dist/web/.next/server/chunks/[root-of-the-server]__f5dae2ad._.js +3 -0
- package/dist/web/.next/server/chunks/{node_modules_ec9ae6c4._.js → node_modules_269a84e6._.js} +5 -5
- package/dist/web/.next/server/chunks/node_modules_9fc3887b._.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_@aws-sdk_credential-provider-sso_dist-es_loadSso_570f147e.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_@aws-sdk_nested-clients_dist-es_submodules_sts_index_c78619b3.js +1 -1
- package/dist/web/.next/server/chunks/node_modules_@smithy_smithy-client_dist-es_create-aggregated-client_db42850b.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_c58ca22f._.js +3 -0
- package/dist/web/.next/server/chunks/node_modules_f96dfac4._.js +7 -0
- package/dist/web/.next/server/pages/404.html +1 -1
- package/dist/web/.next/server/pages/500.html +2 -2
- package/dist/web/.next/server/server-reference-manifest.js +1 -1
- package/dist/web/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/.next/static/chunks/{0bab8c7c82cef548.js → 17bf7ad67057dc74.js} +1 -1
- package/dist/web/.next/static/chunks/{1b46e836090e130b.js → 29b5d391d655a999.js} +1 -1
- package/dist/web/.next/static/chunks/{345c46e638c28d26.js → 8cb404d087e9f3c7.js} +1 -1
- package/dist/web/.next/static/chunks/{de965b463aff71a9.js → e8b318caa49fce00.js} +1 -1
- package/dist/web/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +119 -0
- package/dist/web/node_modules/@aws/lambda-invoke-store/package.json +55 -0
- package/dist/web/node_modules/@aws-crypto/crc32/build/main/aws_crc32.js +31 -0
- package/dist/web/node_modules/@aws-crypto/crc32/build/main/index.js +108 -0
- package/dist/web/node_modules/@aws-crypto/crc32/package.json +32 -0
- package/dist/web/node_modules/@aws-crypto/crc32c/build/main/aws_crc32c.js +31 -0
- package/dist/web/node_modules/@aws-crypto/crc32c/build/main/index.js +78 -0
- package/dist/web/node_modules/@aws-crypto/crc32c/package.json +32 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/convertToBuffer.js +24 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/index.js +14 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/isEmptyData.js +13 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/numToUint8.js +15 -0
- package/dist/web/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +20 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +32 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/package.json +60 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +47 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/package.json +61 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/dist-cjs/index.js +65 -0
- package/dist/web/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/package.json +66 -0
- package/dist/web/node_modules/@aws-crypto/util/package.json +32 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/auth/httpAuthSchemeProvider.js +126 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +33 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +3057 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/models/S3ServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/models/errors.js +203 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +67 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +56 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/dist-cjs/schemas/schemas_0.js +3258 -0
- package/dist/web/node_modules/@aws-sdk/client-s3/package.json +127 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/index.js +2212 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +307 -0
- package/dist/web/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1859 -0
- package/dist/web/node_modules/@aws-sdk/core/package.json +121 -0
- package/dist/web/node_modules/@aws-sdk/crc64-nvme/dist-cjs/index.js +101 -0
- package/dist/web/node_modules/@aws-sdk/crc64-nvme/package.json +50 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +41 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-env/package.json +63 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +46 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +70 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +53 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +17 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +5 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-http/package.json +70 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +224 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-ini/package.json +74 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +286 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-login/package.json +68 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +156 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-node/package.json +72 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +79 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-process/package.json +64 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +192 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +8 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-sso/package.json +66 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +34 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +62 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@aws-sdk/credential-provider-web-identity/package.json +73 -0
- package/dist/web/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-cjs/index.js +352 -0
- package/dist/web/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +60 -0
- package/dist/web/node_modules/@aws-sdk/middleware-expect-continue/dist-cjs/index.js +48 -0
- package/dist/web/node_modules/@aws-sdk/middleware-expect-continue/package.json +58 -0
- package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/getCrc32ChecksumAlgorithmFunction.js +26 -0
- package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +451 -0
- package/dist/web/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +78 -0
- package/dist/web/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +41 -0
- package/dist/web/node_modules/@aws-sdk/middleware-host-header/package.json +59 -0
- package/dist/web/node_modules/@aws-sdk/middleware-location-constraint/dist-cjs/index.js +30 -0
- package/dist/web/node_modules/@aws-sdk/middleware-location-constraint/package.json +57 -0
- package/dist/web/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +48 -0
- package/dist/web/node_modules/@aws-sdk/middleware-logger/package.json +59 -0
- package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +29 -0
- package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/recursionDetectionMiddleware.js +33 -0
- package/dist/web/node_modules/@aws-sdk/middleware-recursion-detection/package.json +63 -0
- package/dist/web/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +570 -0
- package/dist/web/node_modules/@aws-sdk/middleware-sdk-s3/package.json +72 -0
- package/dist/web/node_modules/@aws-sdk/middleware-ssec/dist-cjs/index.js +73 -0
- package/dist/web/node_modules/@aws-sdk/middleware-ssec/package.json +57 -0
- package/dist/web/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +194 -0
- package/dist/web/node_modules/@aws-sdk/middleware-user-agent/package.json +63 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +133 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +170 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/SigninServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/models/errors.js +64 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.js +53 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/runtimeConfig.shared.js +49 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/schemas/schemas_0.js +125 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/ruleset.js +106 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +160 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/SSOServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/models/errors.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.js +53 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.shared.js +49 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/schemas/schemas_0.js +90 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +56 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +106 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +172 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/SSOOIDCServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/models/errors.js +195 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.js +53 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +49 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/schemas/schemas_0.js +140 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js +54 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +62 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/EndpointParameters.js +19 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js +18 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js +145 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +202 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/STSServiceException.js +12 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/models/errors.js +95 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js +67 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +50 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeExtensions.js +13 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/schemas/schemas_0.js +195 -0
- package/dist/web/node_modules/@aws-sdk/nested-clients/package.json +147 -0
- package/dist/web/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +38 -0
- package/dist/web/node_modules/@aws-sdk/region-config-resolver/dist-cjs/regionConfig/stsRegionDefaultResolver.js +20 -0
- package/dist/web/node_modules/@aws-sdk/region-config-resolver/package.json +62 -0
- package/dist/web/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +121 -0
- package/dist/web/node_modules/@aws-sdk/signature-v4-multi-region/package.json +61 -0
- package/dist/web/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +157 -0
- package/dist/web/node_modules/@aws-sdk/token-providers/package.json +70 -0
- package/dist/web/node_modules/@aws-sdk/util-arn-parser/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@aws-sdk/util-arn-parser/package.json +55 -0
- package/dist/web/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +406 -0
- package/dist/web/node_modules/@aws-sdk/util-endpoints/package.json +60 -0
- package/dist/web/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +185 -0
- package/dist/web/node_modules/@aws-sdk/util-user-agent-node/package.json +69 -0
- package/dist/web/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +131 -0
- package/dist/web/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +23 -0
- package/dist/web/node_modules/@aws-sdk/xml-builder/package.json +63 -0
- package/dist/web/node_modules/@smithy/config-resolver/dist-cjs/index.js +198 -0
- package/dist/web/node_modules/@smithy/config-resolver/package.json +66 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/index.js +345 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1096 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +259 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +884 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +698 -0
- package/dist/web/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +694 -0
- package/dist/web/node_modules/@smithy/core/package.json +146 -0
- package/dist/web/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +372 -0
- package/dist/web/node_modules/@smithy/credential-provider-imds/package.json +70 -0
- package/dist/web/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +388 -0
- package/dist/web/node_modules/@smithy/eventstream-codec/package.json +65 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +7 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-config-resolver/package.json +62 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-node/dist-cjs/index.js +53 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-node/package.json +62 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-universal/dist-cjs/index.js +132 -0
- package/dist/web/node_modules/@smithy/eventstream-serde-universal/package.json +66 -0
- package/dist/web/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +233 -0
- package/dist/web/node_modules/@smithy/fetch-http-handler/package.json +69 -0
- package/dist/web/node_modules/@smithy/hash-node/dist-cjs/index.js +42 -0
- package/dist/web/node_modules/@smithy/hash-node/package.json +65 -0
- package/dist/web/node_modules/@smithy/hash-stream-node/dist-cjs/index.js +67 -0
- package/dist/web/node_modules/@smithy/hash-stream-node/package.json +65 -0
- package/dist/web/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
- package/dist/web/node_modules/@smithy/is-array-buffer/package.json +61 -0
- package/dist/web/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +46 -0
- package/dist/web/node_modules/@smithy/middleware-content-length/package.json +64 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +7 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointUrlConfig.js +35 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +264 -0
- package/dist/web/node_modules/@smithy/middleware-endpoint/package.json +75 -0
- package/dist/web/node_modules/@smithy/middleware-retry/dist-cjs/index.js +355 -0
- package/dist/web/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +7 -0
- package/dist/web/node_modules/@smithy/middleware-retry/package.json +79 -0
- package/dist/web/node_modules/@smithy/middleware-serde/dist-cjs/index.js +104 -0
- package/dist/web/node_modules/@smithy/middleware-serde/package.json +66 -0
- package/dist/web/node_modules/@smithy/middleware-stack/dist-cjs/index.js +285 -0
- package/dist/web/node_modules/@smithy/middleware-stack/package.json +64 -0
- package/dist/web/node_modules/@smithy/node-config-provider/dist-cjs/index.js +62 -0
- package/dist/web/node_modules/@smithy/node-config-provider/package.json +66 -0
- package/dist/web/node_modules/@smithy/node-http-handler/dist-cjs/index.js +762 -0
- package/dist/web/node_modules/@smithy/node-http-handler/package.json +68 -0
- package/dist/web/node_modules/@smithy/property-provider/dist-cjs/index.js +117 -0
- package/dist/web/node_modules/@smithy/property-provider/package.json +61 -0
- package/dist/web/node_modules/@smithy/protocol-http/dist-cjs/index.js +169 -0
- package/dist/web/node_modules/@smithy/protocol-http/package.json +62 -0
- package/dist/web/node_modules/@smithy/querystring-builder/dist-cjs/index.js +26 -0
- package/dist/web/node_modules/@smithy/querystring-builder/package.json +61 -0
- package/dist/web/node_modules/@smithy/querystring-parser/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@smithy/querystring-parser/package.json +61 -0
- package/dist/web/node_modules/@smithy/service-error-classification/dist-cjs/index.js +77 -0
- package/dist/web/node_modules/@smithy/service-error-classification/package.json +60 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getHomeDir.js +26 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFilepath.js +12 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js +15 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +196 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js +16 -0
- package/dist/web/node_modules/@smithy/shared-ini-file-loader/package.json +73 -0
- package/dist/web/node_modules/@smithy/signature-v4/dist-cjs/index.js +556 -0
- package/dist/web/node_modules/@smithy/signature-v4/package.json +70 -0
- package/dist/web/node_modules/@smithy/smithy-client/dist-cjs/index.js +635 -0
- package/dist/web/node_modules/@smithy/smithy-client/package.json +70 -0
- package/dist/web/node_modules/@smithy/types/dist-cjs/index.js +91 -0
- package/dist/web/node_modules/@smithy/types/package.json +61 -0
- package/dist/web/node_modules/@smithy/url-parser/dist-cjs/index.js +23 -0
- package/dist/web/node_modules/@smithy/url-parser/package.json +62 -0
- package/dist/web/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js +16 -0
- package/dist/web/node_modules/@smithy/util-base64/dist-cjs/index.js +27 -0
- package/dist/web/node_modules/@smithy/util-base64/dist-cjs/toBase64.js +19 -0
- package/dist/web/node_modules/@smithy/util-base64/package.json +74 -0
- package/dist/web/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +30 -0
- package/dist/web/node_modules/@smithy/util-body-length-browser/package.json +61 -0
- package/dist/web/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +32 -0
- package/dist/web/node_modules/@smithy/util-body-length-node/package.json +62 -0
- package/dist/web/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
- package/dist/web/node_modules/@smithy/util-buffer-from/package.json +62 -0
- package/dist/web/node_modules/@smithy/util-config-provider/dist-cjs/index.js +30 -0
- package/dist/web/node_modules/@smithy/util-config-provider/package.json +63 -0
- package/dist/web/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +74 -0
- package/dist/web/node_modules/@smithy/util-defaults-mode-node/package.json +67 -0
- package/dist/web/node_modules/@smithy/util-endpoints/dist-cjs/index.js +472 -0
- package/dist/web/node_modules/@smithy/util-endpoints/package.json +69 -0
- package/dist/web/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +38 -0
- package/dist/web/node_modules/@smithy/util-hex-encoding/package.json +61 -0
- package/dist/web/node_modules/@smithy/util-middleware/dist-cjs/index.js +15 -0
- package/dist/web/node_modules/@smithy/util-middleware/package.json +67 -0
- package/dist/web/node_modules/@smithy/util-retry/dist-cjs/index.js +278 -0
- package/dist/web/node_modules/@smithy/util-retry/package.json +71 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +36 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js +7 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +64 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +39 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js +12 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +60 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +103 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js +31 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js +41 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +34 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/headStream.js +42 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/index.js +108 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +68 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +54 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js +10 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/splitStream.js +16 -0
- package/dist/web/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +10 -0
- package/dist/web/node_modules/@smithy/util-stream/package.json +99 -0
- package/dist/web/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +9 -0
- package/dist/web/node_modules/@smithy/util-uri-escape/package.json +60 -0
- package/dist/web/node_modules/@smithy/util-utf8/dist-cjs/index.js +32 -0
- package/dist/web/node_modules/@smithy/util-utf8/package.json +67 -0
- package/dist/web/node_modules/@smithy/util-waiter/dist-cjs/index.js +179 -0
- package/dist/web/node_modules/@smithy/util-waiter/package.json +63 -0
- package/dist/web/node_modules/@smithy/uuid/dist-cjs/index.js +36 -0
- package/dist/web/node_modules/@smithy/uuid/dist-cjs/randomUUID.js +6 -0
- package/dist/web/node_modules/@smithy/uuid/package.json +66 -0
- package/dist/web/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/dist/web/node_modules/fast-xml-parser/package.json +94 -0
- package/dist/web/node_modules/tslib/package.json +47 -0
- package/dist/web/node_modules/tslib/tslib.js +484 -0
- package/dist/web/package-lock.json +433 -161
- package/dist/web/package.json +2 -1
- package/dist/web/src/app/api/transcribe/route.ts +84 -74
- package/dist/web/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/templates/kanban-seed.json +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__0f8687da._.js +0 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__0f9b71fd._.js +0 -5
- package/dist/web/.next/server/chunks/[root-of-the-server]__1dec5018._.js +0 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__2605d761._.js +0 -9
- package/dist/web/.next/server/chunks/[root-of-the-server]__8ce673c9._.js +0 -3
- package/dist/web/.next/server/chunks/[root-of-the-server]__a43db24d._.js +0 -19
- package/dist/web/.next/server/chunks/[root-of-the-server]__c7ac3578._.js +0 -5
- package/dist/web/.next/server/chunks/a9bf9_@aws-sdk_core_dist-es_submodules_protocols_json_AwsRestJsonProtocol_764d7a83.js +0 -3
- /package/dist/web/.next/static/{eGpcv9LfmamGIm1II8SKL → rlJUIaeDUP-JDj2nvHySS}/_buildManifest.js +0 -0
- /package/dist/web/.next/static/{eGpcv9LfmamGIm1II8SKL → rlJUIaeDUP-JDj2nvHySS}/_clientMiddlewareManifest.json +0 -0
- /package/dist/web/.next/static/{eGpcv9LfmamGIm1II8SKL → rlJUIaeDUP-JDj2nvHySS}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,884 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utilStream = require('@smithy/util-stream');
|
|
4
|
+
var schema = require('@smithy/core/schema');
|
|
5
|
+
var serde = require('@smithy/core/serde');
|
|
6
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
7
|
+
var utilBase64 = require('@smithy/util-base64');
|
|
8
|
+
var utilUtf8 = require('@smithy/util-utf8');
|
|
9
|
+
|
|
10
|
+
const collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
11
|
+
if (streamBody instanceof Uint8Array) {
|
|
12
|
+
return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
13
|
+
}
|
|
14
|
+
if (!streamBody) {
|
|
15
|
+
return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
16
|
+
}
|
|
17
|
+
const fromContext = context.streamCollector(streamBody);
|
|
18
|
+
return utilStream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
function extendedEncodeURIComponent(str) {
|
|
22
|
+
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
|
|
23
|
+
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
class SerdeContext {
|
|
28
|
+
serdeContext;
|
|
29
|
+
setSerdeContext(serdeContext) {
|
|
30
|
+
this.serdeContext = serdeContext;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class HttpProtocol extends SerdeContext {
|
|
35
|
+
options;
|
|
36
|
+
compositeErrorRegistry;
|
|
37
|
+
constructor(options) {
|
|
38
|
+
super();
|
|
39
|
+
this.options = options;
|
|
40
|
+
this.compositeErrorRegistry = schema.TypeRegistry.for(options.defaultNamespace);
|
|
41
|
+
for (const etr of options.errorTypeRegistries ?? []) {
|
|
42
|
+
this.compositeErrorRegistry.copyFrom(etr);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
getRequestType() {
|
|
46
|
+
return protocolHttp.HttpRequest;
|
|
47
|
+
}
|
|
48
|
+
getResponseType() {
|
|
49
|
+
return protocolHttp.HttpResponse;
|
|
50
|
+
}
|
|
51
|
+
setSerdeContext(serdeContext) {
|
|
52
|
+
this.serdeContext = serdeContext;
|
|
53
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
54
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
55
|
+
if (this.getPayloadCodec()) {
|
|
56
|
+
this.getPayloadCodec().setSerdeContext(serdeContext);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
updateServiceEndpoint(request, endpoint) {
|
|
60
|
+
if ("url" in endpoint) {
|
|
61
|
+
request.protocol = endpoint.url.protocol;
|
|
62
|
+
request.hostname = endpoint.url.hostname;
|
|
63
|
+
request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;
|
|
64
|
+
request.path = endpoint.url.pathname;
|
|
65
|
+
request.fragment = endpoint.url.hash || void 0;
|
|
66
|
+
request.username = endpoint.url.username || void 0;
|
|
67
|
+
request.password = endpoint.url.password || void 0;
|
|
68
|
+
if (!request.query) {
|
|
69
|
+
request.query = {};
|
|
70
|
+
}
|
|
71
|
+
for (const [k, v] of endpoint.url.searchParams.entries()) {
|
|
72
|
+
request.query[k] = v;
|
|
73
|
+
}
|
|
74
|
+
if (endpoint.headers) {
|
|
75
|
+
for (const [name, values] of Object.entries(endpoint.headers)) {
|
|
76
|
+
request.headers[name] = values.join(", ");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return request;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
request.protocol = endpoint.protocol;
|
|
83
|
+
request.hostname = endpoint.hostname;
|
|
84
|
+
request.port = endpoint.port ? Number(endpoint.port) : undefined;
|
|
85
|
+
request.path = endpoint.path;
|
|
86
|
+
request.query = {
|
|
87
|
+
...endpoint.query,
|
|
88
|
+
};
|
|
89
|
+
if (endpoint.headers) {
|
|
90
|
+
for (const [name, value] of Object.entries(endpoint.headers)) {
|
|
91
|
+
request.headers[name] = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return request;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
setHostPrefix(request, operationSchema, input) {
|
|
98
|
+
if (this.serdeContext?.disableHostPrefix) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const inputNs = schema.NormalizedSchema.of(operationSchema.input);
|
|
102
|
+
const opTraits = schema.translateTraits(operationSchema.traits ?? {});
|
|
103
|
+
if (opTraits.endpoint) {
|
|
104
|
+
let hostPrefix = opTraits.endpoint?.[0];
|
|
105
|
+
if (typeof hostPrefix === "string") {
|
|
106
|
+
const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel);
|
|
107
|
+
for (const [name] of hostLabelInputs) {
|
|
108
|
+
const replacement = input[name];
|
|
109
|
+
if (typeof replacement !== "string") {
|
|
110
|
+
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
111
|
+
}
|
|
112
|
+
hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
|
|
113
|
+
}
|
|
114
|
+
request.hostname = hostPrefix + request.hostname;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
deserializeMetadata(output) {
|
|
119
|
+
return {
|
|
120
|
+
httpStatusCode: output.statusCode,
|
|
121
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
122
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
123
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
|
|
127
|
+
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
128
|
+
return eventStreamSerde.serializeEventStream({
|
|
129
|
+
eventStream,
|
|
130
|
+
requestSchema,
|
|
131
|
+
initialRequest,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async deserializeEventStream({ response, responseSchema, initialResponseContainer, }) {
|
|
135
|
+
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
136
|
+
return eventStreamSerde.deserializeEventStream({
|
|
137
|
+
response,
|
|
138
|
+
responseSchema,
|
|
139
|
+
initialResponseContainer,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
async loadEventStreamCapability() {
|
|
143
|
+
const { EventStreamSerde } = await import('@smithy/core/event-streams');
|
|
144
|
+
return new EventStreamSerde({
|
|
145
|
+
marshaller: this.getEventStreamMarshaller(),
|
|
146
|
+
serializer: this.serializer,
|
|
147
|
+
deserializer: this.deserializer,
|
|
148
|
+
serdeContext: this.serdeContext,
|
|
149
|
+
defaultContentType: this.getDefaultContentType(),
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
getDefaultContentType() {
|
|
153
|
+
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
154
|
+
}
|
|
155
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
156
|
+
return [];
|
|
157
|
+
}
|
|
158
|
+
getEventStreamMarshaller() {
|
|
159
|
+
const context = this.serdeContext;
|
|
160
|
+
if (!context.eventStreamMarshaller) {
|
|
161
|
+
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
162
|
+
}
|
|
163
|
+
return context.eventStreamMarshaller;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
class HttpBindingProtocol extends HttpProtocol {
|
|
168
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
169
|
+
const input = {
|
|
170
|
+
...(_input ?? {}),
|
|
171
|
+
};
|
|
172
|
+
const serializer = this.serializer;
|
|
173
|
+
const query = {};
|
|
174
|
+
const headers = {};
|
|
175
|
+
const endpoint = await context.endpoint();
|
|
176
|
+
const ns = schema.NormalizedSchema.of(operationSchema?.input);
|
|
177
|
+
const payloadMemberNames = [];
|
|
178
|
+
const payloadMemberSchemas = [];
|
|
179
|
+
let hasNonHttpBindingMember = false;
|
|
180
|
+
let payload;
|
|
181
|
+
const request = new protocolHttp.HttpRequest({
|
|
182
|
+
protocol: "",
|
|
183
|
+
hostname: "",
|
|
184
|
+
port: undefined,
|
|
185
|
+
path: "",
|
|
186
|
+
fragment: undefined,
|
|
187
|
+
query: query,
|
|
188
|
+
headers: headers,
|
|
189
|
+
body: undefined,
|
|
190
|
+
});
|
|
191
|
+
if (endpoint) {
|
|
192
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
193
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
194
|
+
const opTraits = schema.translateTraits(operationSchema.traits);
|
|
195
|
+
if (opTraits.http) {
|
|
196
|
+
request.method = opTraits.http[0];
|
|
197
|
+
const [path, search] = opTraits.http[1].split("?");
|
|
198
|
+
if (request.path == "/") {
|
|
199
|
+
request.path = path;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
request.path += path;
|
|
203
|
+
}
|
|
204
|
+
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
205
|
+
Object.assign(query, Object.fromEntries(traitSearchParams));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
209
|
+
const memberTraits = memberNs.getMergedTraits() ?? {};
|
|
210
|
+
const inputMemberValue = input[memberName];
|
|
211
|
+
if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
|
|
212
|
+
if (memberTraits.httpLabel) {
|
|
213
|
+
if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {
|
|
214
|
+
throw new Error(`No value provided for input HTTP label: ${memberName}.`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (memberTraits.httpPayload) {
|
|
220
|
+
const isStreaming = memberNs.isStreaming();
|
|
221
|
+
if (isStreaming) {
|
|
222
|
+
const isEventStream = memberNs.isStructSchema();
|
|
223
|
+
if (isEventStream) {
|
|
224
|
+
if (input[memberName]) {
|
|
225
|
+
payload = await this.serializeEventStream({
|
|
226
|
+
eventStream: input[memberName],
|
|
227
|
+
requestSchema: ns,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
payload = inputMemberValue;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
serializer.write(memberNs, inputMemberValue);
|
|
237
|
+
payload = serializer.flush();
|
|
238
|
+
}
|
|
239
|
+
delete input[memberName];
|
|
240
|
+
}
|
|
241
|
+
else if (memberTraits.httpLabel) {
|
|
242
|
+
serializer.write(memberNs, inputMemberValue);
|
|
243
|
+
const replacement = serializer.flush();
|
|
244
|
+
if (request.path.includes(`{${memberName}+}`)) {
|
|
245
|
+
request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
|
|
246
|
+
}
|
|
247
|
+
else if (request.path.includes(`{${memberName}}`)) {
|
|
248
|
+
request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
|
|
249
|
+
}
|
|
250
|
+
delete input[memberName];
|
|
251
|
+
}
|
|
252
|
+
else if (memberTraits.httpHeader) {
|
|
253
|
+
serializer.write(memberNs, inputMemberValue);
|
|
254
|
+
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
255
|
+
delete input[memberName];
|
|
256
|
+
}
|
|
257
|
+
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
258
|
+
for (const [key, val] of Object.entries(inputMemberValue)) {
|
|
259
|
+
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
260
|
+
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
261
|
+
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
262
|
+
}
|
|
263
|
+
delete input[memberName];
|
|
264
|
+
}
|
|
265
|
+
else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
|
|
266
|
+
this.serializeQuery(memberNs, inputMemberValue, query);
|
|
267
|
+
delete input[memberName];
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
hasNonHttpBindingMember = true;
|
|
271
|
+
payloadMemberNames.push(memberName);
|
|
272
|
+
payloadMemberSchemas.push(memberNs);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (hasNonHttpBindingMember && input) {
|
|
276
|
+
const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#");
|
|
277
|
+
const requiredMembers = ns.getSchema()[6];
|
|
278
|
+
const payloadSchema = [
|
|
279
|
+
3,
|
|
280
|
+
namespace,
|
|
281
|
+
name,
|
|
282
|
+
ns.getMergedTraits(),
|
|
283
|
+
payloadMemberNames,
|
|
284
|
+
payloadMemberSchemas,
|
|
285
|
+
undefined,
|
|
286
|
+
];
|
|
287
|
+
if (requiredMembers) {
|
|
288
|
+
payloadSchema[6] = requiredMembers;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
payloadSchema.pop();
|
|
292
|
+
}
|
|
293
|
+
serializer.write(payloadSchema, input);
|
|
294
|
+
payload = serializer.flush();
|
|
295
|
+
}
|
|
296
|
+
request.headers = headers;
|
|
297
|
+
request.query = query;
|
|
298
|
+
request.body = payload;
|
|
299
|
+
return request;
|
|
300
|
+
}
|
|
301
|
+
serializeQuery(ns, data, query) {
|
|
302
|
+
const serializer = this.serializer;
|
|
303
|
+
const traits = ns.getMergedTraits();
|
|
304
|
+
if (traits.httpQueryParams) {
|
|
305
|
+
for (const [key, val] of Object.entries(data)) {
|
|
306
|
+
if (!(key in query)) {
|
|
307
|
+
const valueSchema = ns.getValueSchema();
|
|
308
|
+
Object.assign(valueSchema.getMergedTraits(), {
|
|
309
|
+
...traits,
|
|
310
|
+
httpQuery: key,
|
|
311
|
+
httpQueryParams: undefined,
|
|
312
|
+
});
|
|
313
|
+
this.serializeQuery(valueSchema, val, query);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (ns.isListSchema()) {
|
|
319
|
+
const sparse = !!ns.getMergedTraits().sparse;
|
|
320
|
+
const buffer = [];
|
|
321
|
+
for (const item of data) {
|
|
322
|
+
serializer.write([ns.getValueSchema(), traits], item);
|
|
323
|
+
const serializable = serializer.flush();
|
|
324
|
+
if (sparse || serializable !== undefined) {
|
|
325
|
+
buffer.push(serializable);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
query[traits.httpQuery] = buffer;
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
serializer.write([ns, traits], data);
|
|
332
|
+
query[traits.httpQuery] = serializer.flush();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
336
|
+
const deserializer = this.deserializer;
|
|
337
|
+
const ns = schema.NormalizedSchema.of(operationSchema.output);
|
|
338
|
+
const dataObject = {};
|
|
339
|
+
if (response.statusCode >= 300) {
|
|
340
|
+
const bytes = await collectBody(response.body, context);
|
|
341
|
+
if (bytes.byteLength > 0) {
|
|
342
|
+
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
343
|
+
}
|
|
344
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
345
|
+
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
346
|
+
}
|
|
347
|
+
for (const header in response.headers) {
|
|
348
|
+
const value = response.headers[header];
|
|
349
|
+
delete response.headers[header];
|
|
350
|
+
response.headers[header.toLowerCase()] = value;
|
|
351
|
+
}
|
|
352
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
|
|
353
|
+
if (nonHttpBindingMembers.length) {
|
|
354
|
+
const bytes = await collectBody(response.body, context);
|
|
355
|
+
if (bytes.byteLength > 0) {
|
|
356
|
+
const dataFromBody = await deserializer.read(ns, bytes);
|
|
357
|
+
for (const member of nonHttpBindingMembers) {
|
|
358
|
+
if (dataFromBody[member] != null) {
|
|
359
|
+
dataObject[member] = dataFromBody[member];
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
else if (nonHttpBindingMembers.discardResponseBody) {
|
|
365
|
+
await collectBody(response.body, context);
|
|
366
|
+
}
|
|
367
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
368
|
+
return dataObject;
|
|
369
|
+
}
|
|
370
|
+
async deserializeHttpMessage(schema$1, context, response, arg4, arg5) {
|
|
371
|
+
let dataObject;
|
|
372
|
+
if (arg4 instanceof Set) {
|
|
373
|
+
dataObject = arg5;
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
dataObject = arg4;
|
|
377
|
+
}
|
|
378
|
+
let discardResponseBody = true;
|
|
379
|
+
const deserializer = this.deserializer;
|
|
380
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
381
|
+
const nonHttpBindingMembers = [];
|
|
382
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
383
|
+
const memberTraits = memberSchema.getMemberTraits();
|
|
384
|
+
if (memberTraits.httpPayload) {
|
|
385
|
+
discardResponseBody = false;
|
|
386
|
+
const isStreaming = memberSchema.isStreaming();
|
|
387
|
+
if (isStreaming) {
|
|
388
|
+
const isEventStream = memberSchema.isStructSchema();
|
|
389
|
+
if (isEventStream) {
|
|
390
|
+
dataObject[memberName] = await this.deserializeEventStream({
|
|
391
|
+
response,
|
|
392
|
+
responseSchema: ns,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
dataObject[memberName] = utilStream.sdkStreamMixin(response.body);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
else if (response.body) {
|
|
400
|
+
const bytes = await collectBody(response.body, context);
|
|
401
|
+
if (bytes.byteLength > 0) {
|
|
402
|
+
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
else if (memberTraits.httpHeader) {
|
|
407
|
+
const key = String(memberTraits.httpHeader).toLowerCase();
|
|
408
|
+
const value = response.headers[key];
|
|
409
|
+
if (null != value) {
|
|
410
|
+
if (memberSchema.isListSchema()) {
|
|
411
|
+
const headerListValueSchema = memberSchema.getValueSchema();
|
|
412
|
+
headerListValueSchema.getMergedTraits().httpHeader = key;
|
|
413
|
+
let sections;
|
|
414
|
+
if (headerListValueSchema.isTimestampSchema() &&
|
|
415
|
+
headerListValueSchema.getSchema() === 4) {
|
|
416
|
+
sections = serde.splitEvery(value, ",", 2);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
sections = serde.splitHeader(value);
|
|
420
|
+
}
|
|
421
|
+
const list = [];
|
|
422
|
+
for (const section of sections) {
|
|
423
|
+
list.push(await deserializer.read(headerListValueSchema, section.trim()));
|
|
424
|
+
}
|
|
425
|
+
dataObject[memberName] = list;
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
dataObject[memberName] = await deserializer.read(memberSchema, value);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
433
|
+
dataObject[memberName] = {};
|
|
434
|
+
for (const [header, value] of Object.entries(response.headers)) {
|
|
435
|
+
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
436
|
+
const valueSchema = memberSchema.getValueSchema();
|
|
437
|
+
valueSchema.getMergedTraits().httpHeader = header;
|
|
438
|
+
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
else if (memberTraits.httpResponseCode) {
|
|
443
|
+
dataObject[memberName] = response.statusCode;
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
nonHttpBindingMembers.push(memberName);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
nonHttpBindingMembers.discardResponseBody = discardResponseBody;
|
|
450
|
+
return nonHttpBindingMembers;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
class RpcProtocol extends HttpProtocol {
|
|
455
|
+
async serializeRequest(operationSchema, input, context) {
|
|
456
|
+
const serializer = this.serializer;
|
|
457
|
+
const query = {};
|
|
458
|
+
const headers = {};
|
|
459
|
+
const endpoint = await context.endpoint();
|
|
460
|
+
const ns = schema.NormalizedSchema.of(operationSchema?.input);
|
|
461
|
+
const schema$1 = ns.getSchema();
|
|
462
|
+
let payload;
|
|
463
|
+
const request = new protocolHttp.HttpRequest({
|
|
464
|
+
protocol: "",
|
|
465
|
+
hostname: "",
|
|
466
|
+
port: undefined,
|
|
467
|
+
path: "/",
|
|
468
|
+
fragment: undefined,
|
|
469
|
+
query: query,
|
|
470
|
+
headers: headers,
|
|
471
|
+
body: undefined,
|
|
472
|
+
});
|
|
473
|
+
if (endpoint) {
|
|
474
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
475
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
476
|
+
}
|
|
477
|
+
const _input = {
|
|
478
|
+
...input,
|
|
479
|
+
};
|
|
480
|
+
if (input) {
|
|
481
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
482
|
+
if (eventStreamMember) {
|
|
483
|
+
if (_input[eventStreamMember]) {
|
|
484
|
+
const initialRequest = {};
|
|
485
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
486
|
+
if (memberName !== eventStreamMember && _input[memberName]) {
|
|
487
|
+
serializer.write(memberSchema, _input[memberName]);
|
|
488
|
+
initialRequest[memberName] = serializer.flush();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
payload = await this.serializeEventStream({
|
|
492
|
+
eventStream: _input[eventStreamMember],
|
|
493
|
+
requestSchema: ns,
|
|
494
|
+
initialRequest,
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
else {
|
|
499
|
+
serializer.write(schema$1, _input);
|
|
500
|
+
payload = serializer.flush();
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
request.headers = Object.assign(request.headers, headers);
|
|
504
|
+
request.query = query;
|
|
505
|
+
request.body = payload;
|
|
506
|
+
request.method = "POST";
|
|
507
|
+
return request;
|
|
508
|
+
}
|
|
509
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
510
|
+
const deserializer = this.deserializer;
|
|
511
|
+
const ns = schema.NormalizedSchema.of(operationSchema.output);
|
|
512
|
+
const dataObject = {};
|
|
513
|
+
if (response.statusCode >= 300) {
|
|
514
|
+
const bytes = await collectBody(response.body, context);
|
|
515
|
+
if (bytes.byteLength > 0) {
|
|
516
|
+
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
517
|
+
}
|
|
518
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
519
|
+
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
520
|
+
}
|
|
521
|
+
for (const header in response.headers) {
|
|
522
|
+
const value = response.headers[header];
|
|
523
|
+
delete response.headers[header];
|
|
524
|
+
response.headers[header.toLowerCase()] = value;
|
|
525
|
+
}
|
|
526
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
527
|
+
if (eventStreamMember) {
|
|
528
|
+
dataObject[eventStreamMember] = await this.deserializeEventStream({
|
|
529
|
+
response,
|
|
530
|
+
responseSchema: ns,
|
|
531
|
+
initialResponseContainer: dataObject,
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
const bytes = await collectBody(response.body, context);
|
|
536
|
+
if (bytes.byteLength > 0) {
|
|
537
|
+
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
541
|
+
return dataObject;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
|
|
546
|
+
if (input != null && input[memberName] !== undefined) {
|
|
547
|
+
const labelValue = labelValueProvider();
|
|
548
|
+
if (labelValue == null || labelValue.length <= 0) {
|
|
549
|
+
throw new Error("Empty value provided for input HTTP label: " + memberName + ".");
|
|
550
|
+
}
|
|
551
|
+
resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel
|
|
552
|
+
? labelValue
|
|
553
|
+
.split("/")
|
|
554
|
+
.map((segment) => extendedEncodeURIComponent(segment))
|
|
555
|
+
.join("/")
|
|
556
|
+
: extendedEncodeURIComponent(labelValue));
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
throw new Error("No value provided for input HTTP label: " + memberName + ".");
|
|
560
|
+
}
|
|
561
|
+
return resolvedPath;
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
function requestBuilder(input, context) {
|
|
565
|
+
return new RequestBuilder(input, context);
|
|
566
|
+
}
|
|
567
|
+
class RequestBuilder {
|
|
568
|
+
input;
|
|
569
|
+
context;
|
|
570
|
+
query = {};
|
|
571
|
+
method = "";
|
|
572
|
+
headers = {};
|
|
573
|
+
path = "";
|
|
574
|
+
body = null;
|
|
575
|
+
hostname = "";
|
|
576
|
+
resolvePathStack = [];
|
|
577
|
+
constructor(input, context) {
|
|
578
|
+
this.input = input;
|
|
579
|
+
this.context = context;
|
|
580
|
+
}
|
|
581
|
+
async build() {
|
|
582
|
+
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
583
|
+
this.path = basePath;
|
|
584
|
+
for (const resolvePath of this.resolvePathStack) {
|
|
585
|
+
resolvePath(this.path);
|
|
586
|
+
}
|
|
587
|
+
return new protocolHttp.HttpRequest({
|
|
588
|
+
protocol,
|
|
589
|
+
hostname: this.hostname || hostname,
|
|
590
|
+
port,
|
|
591
|
+
method: this.method,
|
|
592
|
+
path: this.path,
|
|
593
|
+
query: this.query,
|
|
594
|
+
body: this.body,
|
|
595
|
+
headers: this.headers,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
hn(hostname) {
|
|
599
|
+
this.hostname = hostname;
|
|
600
|
+
return this;
|
|
601
|
+
}
|
|
602
|
+
bp(uriLabel) {
|
|
603
|
+
this.resolvePathStack.push((basePath) => {
|
|
604
|
+
this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
|
|
605
|
+
});
|
|
606
|
+
return this;
|
|
607
|
+
}
|
|
608
|
+
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
609
|
+
this.resolvePathStack.push((path) => {
|
|
610
|
+
this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
611
|
+
});
|
|
612
|
+
return this;
|
|
613
|
+
}
|
|
614
|
+
h(headers) {
|
|
615
|
+
this.headers = headers;
|
|
616
|
+
return this;
|
|
617
|
+
}
|
|
618
|
+
q(query) {
|
|
619
|
+
this.query = query;
|
|
620
|
+
return this;
|
|
621
|
+
}
|
|
622
|
+
b(body) {
|
|
623
|
+
this.body = body;
|
|
624
|
+
return this;
|
|
625
|
+
}
|
|
626
|
+
m(method) {
|
|
627
|
+
this.method = method;
|
|
628
|
+
return this;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function determineTimestampFormat(ns, settings) {
|
|
633
|
+
if (settings.timestampFormat.useTrait) {
|
|
634
|
+
if (ns.isTimestampSchema() &&
|
|
635
|
+
(ns.getSchema() === 5 ||
|
|
636
|
+
ns.getSchema() === 6 ||
|
|
637
|
+
ns.getSchema() === 7)) {
|
|
638
|
+
return ns.getSchema();
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
|
|
642
|
+
const bindingFormat = settings.httpBindings
|
|
643
|
+
? typeof httpPrefixHeaders === "string" || Boolean(httpHeader)
|
|
644
|
+
? 6
|
|
645
|
+
: Boolean(httpQuery) || Boolean(httpLabel)
|
|
646
|
+
? 5
|
|
647
|
+
: undefined
|
|
648
|
+
: undefined;
|
|
649
|
+
return bindingFormat ?? settings.timestampFormat.default;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
class FromStringShapeDeserializer extends SerdeContext {
|
|
653
|
+
settings;
|
|
654
|
+
constructor(settings) {
|
|
655
|
+
super();
|
|
656
|
+
this.settings = settings;
|
|
657
|
+
}
|
|
658
|
+
read(_schema, data) {
|
|
659
|
+
const ns = schema.NormalizedSchema.of(_schema);
|
|
660
|
+
if (ns.isListSchema()) {
|
|
661
|
+
return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
|
|
662
|
+
}
|
|
663
|
+
if (ns.isBlobSchema()) {
|
|
664
|
+
return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data);
|
|
665
|
+
}
|
|
666
|
+
if (ns.isTimestampSchema()) {
|
|
667
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
668
|
+
switch (format) {
|
|
669
|
+
case 5:
|
|
670
|
+
return serde._parseRfc3339DateTimeWithOffset(data);
|
|
671
|
+
case 6:
|
|
672
|
+
return serde._parseRfc7231DateTime(data);
|
|
673
|
+
case 7:
|
|
674
|
+
return serde._parseEpochTimestamp(data);
|
|
675
|
+
default:
|
|
676
|
+
console.warn("Missing timestamp format, parsing value with Date constructor:", data);
|
|
677
|
+
return new Date(data);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
if (ns.isStringSchema()) {
|
|
681
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
682
|
+
let intermediateValue = data;
|
|
683
|
+
if (mediaType) {
|
|
684
|
+
if (ns.getMergedTraits().httpHeader) {
|
|
685
|
+
intermediateValue = this.base64ToUtf8(intermediateValue);
|
|
686
|
+
}
|
|
687
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
688
|
+
if (isJson) {
|
|
689
|
+
intermediateValue = serde.LazyJsonString.from(intermediateValue);
|
|
690
|
+
}
|
|
691
|
+
return intermediateValue;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
if (ns.isNumericSchema()) {
|
|
695
|
+
return Number(data);
|
|
696
|
+
}
|
|
697
|
+
if (ns.isBigIntegerSchema()) {
|
|
698
|
+
return BigInt(data);
|
|
699
|
+
}
|
|
700
|
+
if (ns.isBigDecimalSchema()) {
|
|
701
|
+
return new serde.NumericValue(data, "bigDecimal");
|
|
702
|
+
}
|
|
703
|
+
if (ns.isBooleanSchema()) {
|
|
704
|
+
return String(data).toLowerCase() === "true";
|
|
705
|
+
}
|
|
706
|
+
return data;
|
|
707
|
+
}
|
|
708
|
+
base64ToUtf8(base64String) {
|
|
709
|
+
return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(base64String));
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
class HttpInterceptingShapeDeserializer extends SerdeContext {
|
|
714
|
+
codecDeserializer;
|
|
715
|
+
stringDeserializer;
|
|
716
|
+
constructor(codecDeserializer, codecSettings) {
|
|
717
|
+
super();
|
|
718
|
+
this.codecDeserializer = codecDeserializer;
|
|
719
|
+
this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
|
|
720
|
+
}
|
|
721
|
+
setSerdeContext(serdeContext) {
|
|
722
|
+
this.stringDeserializer.setSerdeContext(serdeContext);
|
|
723
|
+
this.codecDeserializer.setSerdeContext(serdeContext);
|
|
724
|
+
this.serdeContext = serdeContext;
|
|
725
|
+
}
|
|
726
|
+
read(schema$1, data) {
|
|
727
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
728
|
+
const traits = ns.getMergedTraits();
|
|
729
|
+
const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8;
|
|
730
|
+
if (traits.httpHeader || traits.httpResponseCode) {
|
|
731
|
+
return this.stringDeserializer.read(ns, toString(data));
|
|
732
|
+
}
|
|
733
|
+
if (traits.httpPayload) {
|
|
734
|
+
if (ns.isBlobSchema()) {
|
|
735
|
+
const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8;
|
|
736
|
+
if (typeof data === "string") {
|
|
737
|
+
return toBytes(data);
|
|
738
|
+
}
|
|
739
|
+
return data;
|
|
740
|
+
}
|
|
741
|
+
else if (ns.isStringSchema()) {
|
|
742
|
+
if ("byteLength" in data) {
|
|
743
|
+
return toString(data);
|
|
744
|
+
}
|
|
745
|
+
return data;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return this.codecDeserializer.read(ns, data);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
class ToStringShapeSerializer extends SerdeContext {
|
|
753
|
+
settings;
|
|
754
|
+
stringBuffer = "";
|
|
755
|
+
constructor(settings) {
|
|
756
|
+
super();
|
|
757
|
+
this.settings = settings;
|
|
758
|
+
}
|
|
759
|
+
write(schema$1, value) {
|
|
760
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
761
|
+
switch (typeof value) {
|
|
762
|
+
case "object":
|
|
763
|
+
if (value === null) {
|
|
764
|
+
this.stringBuffer = "null";
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
if (ns.isTimestampSchema()) {
|
|
768
|
+
if (!(value instanceof Date)) {
|
|
769
|
+
throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);
|
|
770
|
+
}
|
|
771
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
772
|
+
switch (format) {
|
|
773
|
+
case 5:
|
|
774
|
+
this.stringBuffer = value.toISOString().replace(".000Z", "Z");
|
|
775
|
+
break;
|
|
776
|
+
case 6:
|
|
777
|
+
this.stringBuffer = serde.dateToUtcString(value);
|
|
778
|
+
break;
|
|
779
|
+
case 7:
|
|
780
|
+
this.stringBuffer = String(value.getTime() / 1000);
|
|
781
|
+
break;
|
|
782
|
+
default:
|
|
783
|
+
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
784
|
+
this.stringBuffer = String(value.getTime() / 1000);
|
|
785
|
+
}
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
if (ns.isBlobSchema() && "byteLength" in value) {
|
|
789
|
+
this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value);
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
if (ns.isListSchema() && Array.isArray(value)) {
|
|
793
|
+
let buffer = "";
|
|
794
|
+
for (const item of value) {
|
|
795
|
+
this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
|
|
796
|
+
const headerItem = this.flush();
|
|
797
|
+
const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : serde.quoteHeader(headerItem);
|
|
798
|
+
if (buffer !== "") {
|
|
799
|
+
buffer += ", ";
|
|
800
|
+
}
|
|
801
|
+
buffer += serialized;
|
|
802
|
+
}
|
|
803
|
+
this.stringBuffer = buffer;
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
this.stringBuffer = JSON.stringify(value, null, 2);
|
|
807
|
+
break;
|
|
808
|
+
case "string":
|
|
809
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
810
|
+
let intermediateValue = value;
|
|
811
|
+
if (mediaType) {
|
|
812
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
813
|
+
if (isJson) {
|
|
814
|
+
intermediateValue = serde.LazyJsonString.from(intermediateValue);
|
|
815
|
+
}
|
|
816
|
+
if (ns.getMergedTraits().httpHeader) {
|
|
817
|
+
this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString());
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
this.stringBuffer = value;
|
|
822
|
+
break;
|
|
823
|
+
default:
|
|
824
|
+
if (ns.isIdempotencyToken()) {
|
|
825
|
+
this.stringBuffer = serde.generateIdempotencyToken();
|
|
826
|
+
}
|
|
827
|
+
else {
|
|
828
|
+
this.stringBuffer = String(value);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
flush() {
|
|
833
|
+
const buffer = this.stringBuffer;
|
|
834
|
+
this.stringBuffer = "";
|
|
835
|
+
return buffer;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
class HttpInterceptingShapeSerializer {
|
|
840
|
+
codecSerializer;
|
|
841
|
+
stringSerializer;
|
|
842
|
+
buffer;
|
|
843
|
+
constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
|
|
844
|
+
this.codecSerializer = codecSerializer;
|
|
845
|
+
this.stringSerializer = stringSerializer;
|
|
846
|
+
}
|
|
847
|
+
setSerdeContext(serdeContext) {
|
|
848
|
+
this.codecSerializer.setSerdeContext(serdeContext);
|
|
849
|
+
this.stringSerializer.setSerdeContext(serdeContext);
|
|
850
|
+
}
|
|
851
|
+
write(schema$1, value) {
|
|
852
|
+
const ns = schema.NormalizedSchema.of(schema$1);
|
|
853
|
+
const traits = ns.getMergedTraits();
|
|
854
|
+
if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
|
|
855
|
+
this.stringSerializer.write(ns, value);
|
|
856
|
+
this.buffer = this.stringSerializer.flush();
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
return this.codecSerializer.write(ns, value);
|
|
860
|
+
}
|
|
861
|
+
flush() {
|
|
862
|
+
if (this.buffer !== undefined) {
|
|
863
|
+
const buffer = this.buffer;
|
|
864
|
+
this.buffer = undefined;
|
|
865
|
+
return buffer;
|
|
866
|
+
}
|
|
867
|
+
return this.codecSerializer.flush();
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
exports.FromStringShapeDeserializer = FromStringShapeDeserializer;
|
|
872
|
+
exports.HttpBindingProtocol = HttpBindingProtocol;
|
|
873
|
+
exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;
|
|
874
|
+
exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;
|
|
875
|
+
exports.HttpProtocol = HttpProtocol;
|
|
876
|
+
exports.RequestBuilder = RequestBuilder;
|
|
877
|
+
exports.RpcProtocol = RpcProtocol;
|
|
878
|
+
exports.SerdeContext = SerdeContext;
|
|
879
|
+
exports.ToStringShapeSerializer = ToStringShapeSerializer;
|
|
880
|
+
exports.collectBody = collectBody;
|
|
881
|
+
exports.determineTimestampFormat = determineTimestampFormat;
|
|
882
|
+
exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
|
|
883
|
+
exports.requestBuilder = requestBuilder;
|
|
884
|
+
exports.resolvedPath = resolvedPath;
|