From 6b8afb2f67c20539bd63f8c4668edb08a903bf59 Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Fri, 21 Nov 2025 14:30:38 -0500 Subject: [PATCH 1/8] probably a lot --- .gitignore | 34 +++ README.md | 15 ++ bun.lock | 359 ++++++++++++++++++++++++++ package.json | 22 ++ playground-itty.ts | 30 +++ playground.ts | 9 + rsbuild.config.ts | 53 ++++ scripts/generate-clients.ts | 480 +++++++++++++++++++++++++++++++++++ scripts/model-schema.ts | 200 +++++++++++++++ src/aws-errors.ts | 141 +++++++++++ src/client.ts | 27 ++ src/clients.gen/s3.ts | 487 ++++++++++++++++++++++++++++++++++++ src/credentials.ts | 33 +++ src/errors.ts | 92 +++++++ src/protocols/logger.ts | 14 ++ src/protocols/rest-xml.ts | 82 ++++++ src/service-metadata.ts | 10 + todo.md | 5 + tsconfig.json | 31 +++ 19 files changed, 2124 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 bun.lock create mode 100644 package.json create mode 100644 playground-itty.ts create mode 100644 playground.ts create mode 100644 rsbuild.config.ts create mode 100644 scripts/generate-clients.ts create mode 100644 scripts/model-schema.ts create mode 100644 src/aws-errors.ts create mode 100644 src/client.ts create mode 100644 src/clients.gen/s3.ts create mode 100644 src/credentials.ts create mode 100644 src/errors.ts create mode 100644 src/protocols/logger.ts create mode 100644 src/protocols/rest-xml.ts create mode 100644 src/service-metadata.ts create mode 100644 todo.md create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a14702c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# dependencies (bun install) +node_modules + +# output +out +dist +*.tgz + +# code coverage +coverage +*.lcov + +# logs +logs +_.log +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# caches +.eslintcache +.cache +*.tsbuildinfo + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 00000000..39884667 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# itty-aws-2 + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v1.3.0. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. diff --git a/bun.lock b/bun.lock new file mode 100644 index 00000000..7250d2a2 --- /dev/null +++ b/bun.lock @@ -0,0 +1,359 @@ +{ + "lockfileVersion": 1, + "workspaces": { + "": { + "name": "itty-aws-2", + "dependencies": { + "@aws-sdk/credential-providers": "^3.933.0", + "@effect/platform": "^0.93.3", + "@effect/platform-bun": "^0.83.0", + "aws4fetch": "^1.0.20", + "effect": "^3.19.4", + }, + "devDependencies": { + "@rsbuild/core": "^1.6.7", + "@types/bun": "latest", + "@types/node": "^24.10.1", + "dedent": "^1.7.0", + }, + "peerDependencies": { + "typescript": "^5", + }, + }, + }, + "packages": { + "@aws-crypto/sha256-browser": ["@aws-crypto/sha256-browser@5.2.0", "", { "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw=="], + + "@aws-crypto/sha256-js": ["@aws-crypto/sha256-js@5.2.0", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA=="], + + "@aws-crypto/supports-web-crypto": ["@aws-crypto/supports-web-crypto@5.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg=="], + + "@aws-crypto/util": ["@aws-crypto/util@5.2.0", "", { "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ=="], + + "@aws-sdk/client-cognito-identity": ["@aws-sdk/client-cognito-identity@3.933.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "3.932.0", "@aws-sdk/credential-provider-node": "3.933.0", "@aws-sdk/middleware-host-header": "3.930.0", "@aws-sdk/middleware-logger": "3.930.0", "@aws-sdk/middleware-recursion-detection": "3.933.0", "@aws-sdk/middleware-user-agent": "3.932.0", "@aws-sdk/region-config-resolver": "3.930.0", "@aws-sdk/types": "3.930.0", "@aws-sdk/util-endpoints": "3.930.0", "@aws-sdk/util-user-agent-browser": "3.930.0", "@aws-sdk/util-user-agent-node": "3.932.0", "@smithy/config-resolver": "^4.4.3", "@smithy/core": "^3.18.2", "@smithy/fetch-http-handler": "^5.3.6", "@smithy/hash-node": "^4.2.5", "@smithy/invalid-dependency": "^4.2.5", "@smithy/middleware-content-length": "^4.2.5", "@smithy/middleware-endpoint": "^4.3.9", "@smithy/middleware-retry": "^4.4.9", "@smithy/middleware-serde": "^4.2.5", "@smithy/middleware-stack": "^4.2.5", "@smithy/node-config-provider": "^4.3.5", "@smithy/node-http-handler": "^4.4.5", "@smithy/protocol-http": "^5.3.5", "@smithy/smithy-client": "^4.9.5", "@smithy/types": "^4.9.0", "@smithy/url-parser": "^4.2.5", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.8", "@smithy/util-defaults-mode-node": "^4.2.11", "@smithy/util-endpoints": "^3.2.5", "@smithy/util-middleware": "^4.2.5", "@smithy/util-retry": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-DoZbb00//40hsqhY4/3xbIryJRiDe8auX9sQHOMWdf9rXqxGfj7ygqlnbFwERhU8pn2UFnhkUsxFLoDkxkL9kA=="], + + "@aws-sdk/client-sso": ["@aws-sdk/client-sso@3.933.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "3.932.0", "@aws-sdk/middleware-host-header": "3.930.0", "@aws-sdk/middleware-logger": "3.930.0", "@aws-sdk/middleware-recursion-detection": "3.933.0", "@aws-sdk/middleware-user-agent": "3.932.0", "@aws-sdk/region-config-resolver": "3.930.0", "@aws-sdk/types": "3.930.0", "@aws-sdk/util-endpoints": "3.930.0", "@aws-sdk/util-user-agent-browser": "3.930.0", "@aws-sdk/util-user-agent-node": "3.932.0", "@smithy/config-resolver": "^4.4.3", "@smithy/core": "^3.18.2", "@smithy/fetch-http-handler": "^5.3.6", "@smithy/hash-node": "^4.2.5", "@smithy/invalid-dependency": "^4.2.5", "@smithy/middleware-content-length": "^4.2.5", "@smithy/middleware-endpoint": "^4.3.9", "@smithy/middleware-retry": "^4.4.9", "@smithy/middleware-serde": "^4.2.5", "@smithy/middleware-stack": "^4.2.5", "@smithy/node-config-provider": "^4.3.5", "@smithy/node-http-handler": "^4.4.5", "@smithy/protocol-http": "^5.3.5", "@smithy/smithy-client": "^4.9.5", "@smithy/types": "^4.9.0", "@smithy/url-parser": "^4.2.5", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.8", "@smithy/util-defaults-mode-node": "^4.2.11", "@smithy/util-endpoints": "^3.2.5", "@smithy/util-middleware": "^4.2.5", "@smithy/util-retry": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-zwGLSiK48z3PzKpQiDMKP85+fpIrPMF1qQOQW9OW7BGj5AuBZIisT2O4VzIgYJeh+t47MLU7VgBQL7muc+MJDg=="], + + "@aws-sdk/core": ["@aws-sdk/core@3.932.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@aws-sdk/xml-builder": "3.930.0", "@smithy/core": "^3.18.2", "@smithy/node-config-provider": "^4.3.5", "@smithy/property-provider": "^4.2.5", "@smithy/protocol-http": "^5.3.5", "@smithy/signature-v4": "^5.3.5", "@smithy/smithy-client": "^4.9.5", "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-middleware": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-AS8gypYQCbNojwgjvZGkJocC2CoEICDx9ZJ15ILsv+MlcCVLtUJSRSx3VzJOUY2EEIaGLRrPNlIqyn/9/fySvA=="], + + "@aws-sdk/credential-provider-cognito-identity": ["@aws-sdk/credential-provider-cognito-identity@3.933.0", "", { "dependencies": { "@aws-sdk/client-cognito-identity": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/property-provider": "^4.2.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-7rSYkIDB2fMfe/BTVI/HHZMFuyjIhgA9H/lhjYCkJFBWCtrc4D73smdn6LZUT811VE1QnvO6gjGfRju7TIn7og=="], + + "@aws-sdk/credential-provider-env": ["@aws-sdk/credential-provider-env@3.932.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/types": "3.930.0", "@smithy/property-provider": "^4.2.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-ozge/c7NdHUDyHqro6+P5oHt8wfKSUBN+olttiVfBe9Mw3wBMpPa3gQ0pZnG+gwBkKskBuip2bMR16tqYvUSEA=="], + + "@aws-sdk/credential-provider-http": ["@aws-sdk/credential-provider-http@3.932.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/types": "3.930.0", "@smithy/fetch-http-handler": "^5.3.6", "@smithy/node-http-handler": "^4.4.5", "@smithy/property-provider": "^4.2.5", "@smithy/protocol-http": "^5.3.5", "@smithy/smithy-client": "^4.9.5", "@smithy/types": "^4.9.0", "@smithy/util-stream": "^4.5.6", "tslib": "^2.6.2" } }, "sha512-b6N9Nnlg8JInQwzBkUq5spNaXssM3h3zLxGzpPrnw0nHSIWPJPTbZzA5Ca285fcDUFuKP+qf3qkuqlAjGOdWhg=="], + + "@aws-sdk/credential-provider-ini": ["@aws-sdk/credential-provider-ini@3.933.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/credential-provider-env": "3.932.0", "@aws-sdk/credential-provider-http": "3.932.0", "@aws-sdk/credential-provider-process": "3.932.0", "@aws-sdk/credential-provider-sso": "3.933.0", "@aws-sdk/credential-provider-web-identity": "3.933.0", "@aws-sdk/nested-clients": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/credential-provider-imds": "^4.2.5", "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-HygGyKuMG5AaGXsmM0d81miWDon55xwalRHB3UmDg3QBhtunbNIoIaWUbNTKuBZXcIN6emeeEZw/YgSMqLc0YA=="], + + "@aws-sdk/credential-provider-node": ["@aws-sdk/credential-provider-node@3.933.0", "", { "dependencies": { "@aws-sdk/credential-provider-env": "3.932.0", "@aws-sdk/credential-provider-http": "3.932.0", "@aws-sdk/credential-provider-ini": "3.933.0", "@aws-sdk/credential-provider-process": "3.932.0", "@aws-sdk/credential-provider-sso": "3.933.0", "@aws-sdk/credential-provider-web-identity": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/credential-provider-imds": "^4.2.5", "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-L2dE0Y7iMLammQewPKNeEh1z/fdJyYEU+/QsLBD9VEh+SXcN/FIyTi21Isw8wPZN6lMB9PDVtISzBnF8HuSFrw=="], + + "@aws-sdk/credential-provider-process": ["@aws-sdk/credential-provider-process@3.932.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/types": "3.930.0", "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-BodZYKvT4p/Dkm28Ql/FhDdS1+p51bcZeMMu2TRtU8PoMDHnVDhHz27zASEKSZwmhvquxHrZHB0IGuVqjZUtSQ=="], + + "@aws-sdk/credential-provider-sso": ["@aws-sdk/credential-provider-sso@3.933.0", "", { "dependencies": { "@aws-sdk/client-sso": "3.933.0", "@aws-sdk/core": "3.932.0", "@aws-sdk/token-providers": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-/R1DBR7xNcuZIhS2RirU+P2o8E8/fOk+iLAhbqeSTq+g09fP/F6W7ouFpS5eVE2NIfWG7YBFoVddOhvuqpn51g=="], + + "@aws-sdk/credential-provider-web-identity": ["@aws-sdk/credential-provider-web-identity@3.933.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/nested-clients": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-c7Eccw2lhFx2/+qJn3g+uIDWRuWi2A6Sz3PVvckFUEzPsP0dPUo19hlvtarwP5GzrsXn0yEPRVhpewsIaSCGaQ=="], + + "@aws-sdk/credential-providers": ["@aws-sdk/credential-providers@3.933.0", "", { "dependencies": { "@aws-sdk/client-cognito-identity": "3.933.0", "@aws-sdk/core": "3.932.0", "@aws-sdk/credential-provider-cognito-identity": "3.933.0", "@aws-sdk/credential-provider-env": "3.932.0", "@aws-sdk/credential-provider-http": "3.932.0", "@aws-sdk/credential-provider-ini": "3.933.0", "@aws-sdk/credential-provider-node": "3.933.0", "@aws-sdk/credential-provider-process": "3.932.0", "@aws-sdk/credential-provider-sso": "3.933.0", "@aws-sdk/credential-provider-web-identity": "3.933.0", "@aws-sdk/nested-clients": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/config-resolver": "^4.4.3", "@smithy/core": "^3.18.2", "@smithy/credential-provider-imds": "^4.2.5", "@smithy/node-config-provider": "^4.3.5", "@smithy/property-provider": "^4.2.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-sDOejl6e68zKbOZC/5f3MFF2iA3KooBqJsmJTwPp/rj7Yx/4cSoSlMZ8Iy/YVbZ+CYk+QtNJmayxdeKNMLIccA=="], + + "@aws-sdk/middleware-host-header": ["@aws-sdk/middleware-host-header@3.930.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-x30jmm3TLu7b/b+67nMyoV0NlbnCVT5DI57yDrhXAPCtdgM1KtdLWt45UcHpKOm1JsaIkmYRh2WYu7Anx4MG0g=="], + + "@aws-sdk/middleware-logger": ["@aws-sdk/middleware-logger@3.930.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-vh4JBWzMCBW8wREvAwoSqB2geKsZwSHTa0nSt0OMOLp2PdTYIZDi0ZiVMmpfnjcx9XbS6aSluLv9sKx4RrG46A=="], + + "@aws-sdk/middleware-recursion-detection": ["@aws-sdk/middleware-recursion-detection@3.933.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@aws/lambda-invoke-store": "^0.2.0", "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-qgrMlkVKzTCAdNw2A05DC2sPBo0KRQ7wk+lbYSRJnWVzcrceJhnmhoZVV5PFv7JtchK7sHVcfm9lcpiyd+XaCA=="], + + "@aws-sdk/middleware-user-agent": ["@aws-sdk/middleware-user-agent@3.932.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/types": "3.930.0", "@aws-sdk/util-endpoints": "3.930.0", "@smithy/core": "^3.18.2", "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-9BGTbJyA/4PTdwQWE9hAFIJGpsYkyEW20WON3i15aDqo5oRZwZmqaVageOD57YYqG8JDJjvcwKyDdR4cc38dvg=="], + + "@aws-sdk/nested-clients": ["@aws-sdk/nested-clients@3.933.0", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "3.932.0", "@aws-sdk/middleware-host-header": "3.930.0", "@aws-sdk/middleware-logger": "3.930.0", "@aws-sdk/middleware-recursion-detection": "3.933.0", "@aws-sdk/middleware-user-agent": "3.932.0", "@aws-sdk/region-config-resolver": "3.930.0", "@aws-sdk/types": "3.930.0", "@aws-sdk/util-endpoints": "3.930.0", "@aws-sdk/util-user-agent-browser": "3.930.0", "@aws-sdk/util-user-agent-node": "3.932.0", "@smithy/config-resolver": "^4.4.3", "@smithy/core": "^3.18.2", "@smithy/fetch-http-handler": "^5.3.6", "@smithy/hash-node": "^4.2.5", "@smithy/invalid-dependency": "^4.2.5", "@smithy/middleware-content-length": "^4.2.5", "@smithy/middleware-endpoint": "^4.3.9", "@smithy/middleware-retry": "^4.4.9", "@smithy/middleware-serde": "^4.2.5", "@smithy/middleware-stack": "^4.2.5", "@smithy/node-config-provider": "^4.3.5", "@smithy/node-http-handler": "^4.4.5", "@smithy/protocol-http": "^5.3.5", "@smithy/smithy-client": "^4.9.5", "@smithy/types": "^4.9.0", "@smithy/url-parser": "^4.2.5", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", "@smithy/util-defaults-mode-browser": "^4.3.8", "@smithy/util-defaults-mode-node": "^4.2.11", "@smithy/util-endpoints": "^3.2.5", "@smithy/util-middleware": "^4.2.5", "@smithy/util-retry": "^4.2.5", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-o1GX0+IPlFi/D8ei9y/jj3yucJWNfPnbB5appVBWevAyUdZA5KzQ2nK/hDxiu9olTZlFEFpf1m1Rn3FaGxHqsw=="], + + "@aws-sdk/region-config-resolver": ["@aws-sdk/region-config-resolver@3.930.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@smithy/config-resolver": "^4.4.3", "@smithy/node-config-provider": "^4.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-KL2JZqH6aYeQssu1g1KuWsReupdfOoxD6f1as2VC+rdwYFUu4LfzMsFfXnBvvQWWqQ7rZHWOw1T+o5gJmg7Dzw=="], + + "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.933.0", "", { "dependencies": { "@aws-sdk/core": "3.932.0", "@aws-sdk/nested-clients": "3.933.0", "@aws-sdk/types": "3.930.0", "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-Qzq7zj9yXUgAAJEbbmqRhm0jmUndl8nHG0AbxFEfCfQRVZWL96Qzx0mf8lYwT9hIMrXncLwy31HOthmbXwFRwQ=="], + + "@aws-sdk/types": ["@aws-sdk/types@3.930.0", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-we/vaAgwlEFW7IeftmCLlLMw+6hFs3DzZPJw7lVHbj/5HJ0bz9gndxEsS2lQoeJ1zhiiLqAqvXxmM43s0MBg0A=="], + + "@aws-sdk/util-endpoints": ["@aws-sdk/util-endpoints@3.930.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@smithy/types": "^4.9.0", "@smithy/url-parser": "^4.2.5", "@smithy/util-endpoints": "^3.2.5", "tslib": "^2.6.2" } }, "sha512-M2oEKBzzNAYr136RRc6uqw3aWlwCxqTP1Lawps9E1d2abRPvl1p1ztQmmXp1Ak4rv8eByIZ+yQyKQ3zPdRG5dw=="], + + "@aws-sdk/util-locate-window": ["@aws-sdk/util-locate-window@3.893.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-T89pFfgat6c8nMmpI8eKjBcDcgJq36+m9oiXbcUzeU55MP9ZuGgBomGjGnHaEyF36jenW9gmg3NfZDm0AO2XPg=="], + + "@aws-sdk/util-user-agent-browser": ["@aws-sdk/util-user-agent-browser@3.930.0", "", { "dependencies": { "@aws-sdk/types": "3.930.0", "@smithy/types": "^4.9.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-q6lCRm6UAe+e1LguM5E4EqM9brQlDem4XDcQ87NzEvlTW6GzmNCO0w1jS0XgCFXQHjDxjdlNFX+5sRbHijwklg=="], + + "@aws-sdk/util-user-agent-node": ["@aws-sdk/util-user-agent-node@3.932.0", "", { "dependencies": { "@aws-sdk/middleware-user-agent": "3.932.0", "@aws-sdk/types": "3.930.0", "@smithy/node-config-provider": "^4.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" }, "peerDependencies": { "aws-crt": ">=1.0.0" }, "optionalPeers": ["aws-crt"] }, "sha512-/kC6cscHrZL74TrZtgiIL5jJNbVsw9duGGPurmaVgoCbP7NnxyaSWEurbNV3VPNPhNE3bV3g4Ci+odq+AlsYQg=="], + + "@aws-sdk/xml-builder": ["@aws-sdk/xml-builder@3.930.0", "", { "dependencies": { "@smithy/types": "^4.9.0", "fast-xml-parser": "5.2.5", "tslib": "^2.6.2" } }, "sha512-YIfkD17GocxdmlUVc3ia52QhcWuRIUJonbF8A2CYfcWNV3HzvAqpcPeC0bYUhkK+8e8YO1ARnLKZQE0TlwzorA=="], + + "@aws/lambda-invoke-store": ["@aws/lambda-invoke-store@0.2.0", "", {}, "sha512-D1jAmAZQYMoPiacfgNf7AWhg3DFN3Wq/vQv3WINt9znwjzHp2x+WzdJFxxj7xZL7V1U79As6G8f7PorMYWBKsQ=="], + + "@effect/cluster": ["@effect/cluster@0.52.11", "", { "peerDependencies": { "@effect/platform": "^0.93.3", "@effect/rpc": "^0.72.1", "@effect/sql": "^0.48.0", "@effect/workflow": "^0.12.5", "effect": "^3.19.4" } }, "sha512-iFYuiSrNZVvQIcfWxnwGoIF9rWNXHzN8vqLGnel6sdEycApCgN5o24yO/hoz73rOV6N6jnVz9X1LW3/wgJ/TQg=="], + + "@effect/experimental": ["@effect/experimental@0.57.3", "", { "dependencies": { "uuid": "^11.0.3" }, "peerDependencies": { "@effect/platform": "^0.93.3", "effect": "^3.19.4", "ioredis": "^5", "lmdb": "^3" }, "optionalPeers": ["ioredis", "lmdb"] }, "sha512-/45T9dltr+zNCgPNFfSuRw4oCvwn0tz+vI4p/SfpUCuhHp0IElsXTpHInK6YOLFYyYXZNamQrlKiOBQZNoUT0Q=="], + + "@effect/platform": ["@effect/platform@0.93.3", "", { "dependencies": { "find-my-way-ts": "^0.1.6", "msgpackr": "^1.11.4", "multipasta": "^0.2.7" }, "peerDependencies": { "effect": "^3.19.4" } }, "sha512-s88zctkeXba24Mjy7MEFMuam1p5sXmsG7uQjPIDE6EiC+2IFUQd8976TtangiU0e8qu0SALpjIH1P1QyC7/1og=="], + + "@effect/platform-bun": ["@effect/platform-bun@0.83.0", "", { "dependencies": { "@effect/platform-node-shared": "^0.53.0", "multipasta": "^0.2.7" }, "peerDependencies": { "@effect/cluster": "^0.52.0", "@effect/platform": "^0.93.0", "@effect/rpc": "^0.72.1", "@effect/sql": "^0.48.0", "effect": "^3.19.0" } }, "sha512-cjE4b0TRva/BXKDzYEB12h32AO0nidk6qN99j8IIOivfFlTUsuI2o36wKg8zxiMV6tdeylXIORxTD+Zvvz1XkQ=="], + + "@effect/platform-node-shared": ["@effect/platform-node-shared@0.53.0", "", { "dependencies": { "@parcel/watcher": "^2.5.1", "multipasta": "^0.2.7", "ws": "^8.18.2" }, "peerDependencies": { "@effect/cluster": "^0.52.0", "@effect/platform": "^0.93.0", "@effect/rpc": "^0.72.1", "@effect/sql": "^0.48.0", "effect": "^3.19.0" } }, "sha512-xqhYyUYotVUJi7Tqd/iM+tqEoNm6fVowcPm9naxKZCa6WPD6TnRfaogxjkB3yNBnPY63Ya/sIkfkeZXA3MwF3w=="], + + "@effect/rpc": ["@effect/rpc@0.72.1", "", { "dependencies": { "msgpackr": "^1.11.4" }, "peerDependencies": { "@effect/platform": "^0.93.0", "effect": "^3.19.0" } }, "sha512-crpiAxDvFxM/fGhLuAgB1V8JOtfCm8/6ZdOP4MIdkz14I/ff3LdLJpf8hHJpYIbwYXypglAeAaHpfuZOt5f+SA=="], + + "@effect/sql": ["@effect/sql@0.48.0", "", { "dependencies": { "uuid": "^11.0.3" }, "peerDependencies": { "@effect/experimental": "^0.57.0", "@effect/platform": "^0.93.0", "effect": "^3.19.0" } }, "sha512-tubdizHriDwzHUnER9UsZ/0TtF6O2WJckzeYDbVSRPeMkrpdpyEzEsoKctechTm65B3Bxy6JIixGPg2FszY72A=="], + + "@effect/workflow": ["@effect/workflow@0.12.5", "", { "peerDependencies": { "@effect/experimental": "^0.57.1", "@effect/platform": "^0.93.2", "@effect/rpc": "^0.72.1", "effect": "^3.19.3" } }, "sha512-9vsXqprb30FfWU84lwOi13bJpVXgl0q58hb5tpWb2uTDFmLHEoF8a/P3Io2dD47ZA/4VGf47NCkj+15QLIeGeQ=="], + + "@emnapi/core": ["@emnapi/core@1.7.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" } }, "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.7.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA=="], + + "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.1.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ=="], + + "@module-federation/error-codes": ["@module-federation/error-codes@0.21.4", "", {}, "sha512-ClpL5MereWNXh+EgDjz7w4RrC1JlisQTvXDa1gLxpviHafzNDfdViVmuhi9xXVuj+EYo8KU70Y999KHhk9424Q=="], + + "@module-federation/runtime": ["@module-federation/runtime@0.21.4", "", { "dependencies": { "@module-federation/error-codes": "0.21.4", "@module-federation/runtime-core": "0.21.4", "@module-federation/sdk": "0.21.4" } }, "sha512-wgvGqryurVEvkicufJmTG0ZehynCeNLklv8kIk5BLIsWYSddZAE+xe4xov1kgH5fIJQAoQNkRauFFjVNlHoAkA=="], + + "@module-federation/runtime-core": ["@module-federation/runtime-core@0.21.4", "", { "dependencies": { "@module-federation/error-codes": "0.21.4", "@module-federation/sdk": "0.21.4" } }, "sha512-SGpmoOLGNxZofpTOk6Lxb2ewaoz5wMi93AFYuuJB04HTVcngEK+baNeUZ2D/xewrqNIJoMY6f5maUjVfIIBPUA=="], + + "@module-federation/runtime-tools": ["@module-federation/runtime-tools@0.21.4", "", { "dependencies": { "@module-federation/runtime": "0.21.4", "@module-federation/webpack-bundler-runtime": "0.21.4" } }, "sha512-RzFKaL0DIjSmkn76KZRfzfB6dD07cvID84950jlNQgdyoQFUGkqD80L6rIpVCJTY/R7LzR3aQjHnoqmq4JPo3w=="], + + "@module-federation/sdk": ["@module-federation/sdk@0.21.4", "", {}, "sha512-tzvhOh/oAfX++6zCDDxuvioHY4Jurf8vcfoCbKFxusjmyKr32GPbwFDazUP+OPhYCc3dvaa9oWU6X/qpUBLfJw=="], + + "@module-federation/webpack-bundler-runtime": ["@module-federation/webpack-bundler-runtime@0.21.4", "", { "dependencies": { "@module-federation/runtime": "0.21.4", "@module-federation/sdk": "0.21.4" } }, "sha512-dusmR3uPnQh9u9ChQo3M+GLOuGFthfvnh7WitF/a1eoeTfRmXqnMFsXtZCUK+f/uXf+64874Zj/bhAgbBcVHZA=="], + + "@msgpackr-extract/msgpackr-extract-darwin-arm64": ["@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw=="], + + "@msgpackr-extract/msgpackr-extract-darwin-x64": ["@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw=="], + + "@msgpackr-extract/msgpackr-extract-linux-arm": ["@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3", "", { "os": "linux", "cpu": "arm" }, "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw=="], + + "@msgpackr-extract/msgpackr-extract-linux-arm64": ["@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg=="], + + "@msgpackr-extract/msgpackr-extract-linux-x64": ["@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3", "", { "os": "linux", "cpu": "x64" }, "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg=="], + + "@msgpackr-extract/msgpackr-extract-win32-x64": ["@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3", "", { "os": "win32", "cpu": "x64" }, "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ=="], + + "@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.0.7", "", { "dependencies": { "@emnapi/core": "^1.5.0", "@emnapi/runtime": "^1.5.0", "@tybys/wasm-util": "^0.10.1" } }, "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw=="], + + "@parcel/watcher": ["@parcel/watcher@2.5.1", "", { "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", "micromatch": "^4.0.5", "node-addon-api": "^7.0.0" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.5.1", "@parcel/watcher-darwin-arm64": "2.5.1", "@parcel/watcher-darwin-x64": "2.5.1", "@parcel/watcher-freebsd-x64": "2.5.1", "@parcel/watcher-linux-arm-glibc": "2.5.1", "@parcel/watcher-linux-arm-musl": "2.5.1", "@parcel/watcher-linux-arm64-glibc": "2.5.1", "@parcel/watcher-linux-arm64-musl": "2.5.1", "@parcel/watcher-linux-x64-glibc": "2.5.1", "@parcel/watcher-linux-x64-musl": "2.5.1", "@parcel/watcher-win32-arm64": "2.5.1", "@parcel/watcher-win32-ia32": "2.5.1", "@parcel/watcher-win32-x64": "2.5.1" } }, "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg=="], + + "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.1", "", { "os": "android", "cpu": "arm64" }, "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA=="], + + "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw=="], + + "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg=="], + + "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ=="], + + "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA=="], + + "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q=="], + + "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w=="], + + "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg=="], + + "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A=="], + + "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg=="], + + "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw=="], + + "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ=="], + + "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.1", "", { "os": "win32", "cpu": "x64" }, "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA=="], + + "@rsbuild/core": ["@rsbuild/core@1.6.7", "", { "dependencies": { "@rspack/core": "1.6.4", "@rspack/lite-tapable": "~1.1.0", "@swc/helpers": "^0.5.17", "core-js": "~3.46.0", "jiti": "^2.6.1" }, "bin": { "rsbuild": "bin/rsbuild.js" } }, "sha512-V0INbMrT/LwyhzKmvpupe2oSvPFWaivz7sdriFRp381BJvD0d2pYcq9iRW91bxgMRX78MgTzFYAu868hMAzoSw=="], + + "@rspack/binding": ["@rspack/binding@1.6.4", "", { "optionalDependencies": { "@rspack/binding-darwin-arm64": "1.6.4", "@rspack/binding-darwin-x64": "1.6.4", "@rspack/binding-linux-arm64-gnu": "1.6.4", "@rspack/binding-linux-arm64-musl": "1.6.4", "@rspack/binding-linux-x64-gnu": "1.6.4", "@rspack/binding-linux-x64-musl": "1.6.4", "@rspack/binding-wasm32-wasi": "1.6.4", "@rspack/binding-win32-arm64-msvc": "1.6.4", "@rspack/binding-win32-ia32-msvc": "1.6.4", "@rspack/binding-win32-x64-msvc": "1.6.4" } }, "sha512-vUxc/zUdsCuyysOvP4CTdIYxsZPb2jIXST5vrLABiTPIaHpXZ0hVdgKif2XPJwJeuCVS6w25xvyPN0mBCU0MvQ=="], + + "@rspack/binding-darwin-arm64": ["@rspack/binding-darwin-arm64@1.6.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-qD2C5xwdY2qKEXTZiPJQx1L1kELapOc0AaZDqcAyzXs30d1qTKpx6PdyW3HN+gueKovyWZwMMYfz6RxcMCnaDQ=="], + + "@rspack/binding-darwin-x64": ["@rspack/binding-darwin-x64@1.6.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-IHceyLDxeubqIrGz4gUqJavnygTij4vtDDE2Fkgobz7hkTJwGtD5mxBKbVNRqGvhrasVw0h9rEjR7tdbDSiUhQ=="], + + "@rspack/binding-linux-arm64-gnu": ["@rspack/binding-linux-arm64-gnu@1.6.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-Ldpoz2wWnBaL2+XKLIOyCZMkAkd4pk/L24EVgma3SpRtwgenLEr10bQupvwGAK5OLkjayslOTZmRiAv0FH5o/w=="], + + "@rspack/binding-linux-arm64-musl": ["@rspack/binding-linux-arm64-musl@1.6.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-3fLMSDK5yMjKmx7iFbYG3P3A0xNdtmNu09v5P6hzq65tkJ3dflIt3p8DvtOTURtuSgQZV2A1LDd9hpIXdnigqA=="], + + "@rspack/binding-linux-x64-gnu": ["@rspack/binding-linux-x64-gnu@1.6.4", "", { "os": "linux", "cpu": "x64" }, "sha512-5YzXUKLnaiqND05CDgkKE0WNRtC1ulkVncYs78xPikonzZmgVXa8eRaTPOZC6ZjpLR0eTsg+MSesLUsPUu27hA=="], + + "@rspack/binding-linux-x64-musl": ["@rspack/binding-linux-x64-musl@1.6.4", "", { "os": "linux", "cpu": "x64" }, "sha512-KcSFla8a9bXG1mmV5oQ1R5h/dSXfd41/qHOsNuLqho2UCX8CVh4dezUA153dj7p1S4yOhTy6VZZi6C1szweE9A=="], + + "@rspack/binding-wasm32-wasi": ["@rspack/binding-wasm32-wasi@1.6.4", "", { "dependencies": { "@napi-rs/wasm-runtime": "1.0.7" }, "cpu": "none" }, "sha512-mfFJbDJkRy5I1iW3m0JlWbc0X8pjVd+GRUz5nhbccwEhSQOc27ao3evf7XPU4aaDxud1B3UEqYiRcRmtm1BrjA=="], + + "@rspack/binding-win32-arm64-msvc": ["@rspack/binding-win32-arm64-msvc@1.6.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-QtIqxsfeTSS1lwfaPGrPFfJ9ir/3aWZv5t3iAgYj/CNUA8MTKWt4vQKcco7NRIGK4ZLMI+dgJBFtvd/lUDMQsw=="], + + "@rspack/binding-win32-ia32-msvc": ["@rspack/binding-win32-ia32-msvc@1.6.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-HXEWGDllgh0jFwjGhkGcLqb0dzXbc/rA8vQr2JcSdC41p1DTzLgO215jWdKSIvzCzhyPh3VeQkXk76hjFB2cLQ=="], + + "@rspack/binding-win32-x64-msvc": ["@rspack/binding-win32-x64-msvc@1.6.4", "", { "os": "win32", "cpu": "x64" }, "sha512-MAO5rOnGYoeuT2LPn/P7JVJCi3d78XoXgOq3tkGh6qXhvhkjsBRtYluWCzACXQpXfFHEWYd7uT5yHoZgxiVuoA=="], + + "@rspack/core": ["@rspack/core@1.6.4", "", { "dependencies": { "@module-federation/runtime-tools": "0.21.4", "@rspack/binding": "1.6.4", "@rspack/lite-tapable": "1.1.0" }, "peerDependencies": { "@swc/helpers": ">=0.5.1" }, "optionalPeers": ["@swc/helpers"] }, "sha512-5F1+MQD8rfbFbUHnaiZe4jqOu9pnSb+PliqQvi0lj+uvpMpcS3sJDIs/mz6P1u87lfkfBXChIT4zSLAzeOgMWw=="], + + "@rspack/lite-tapable": ["@rspack/lite-tapable@1.1.0", "", {}, "sha512-E2B0JhYFmVAwdDiG14+DW0Di4Ze4Jg10Pc4/lILUrd5DRCaklduz2OvJ5HYQ6G+hd+WTzqQb3QnDNfK4yvAFYw=="], + + "@smithy/abort-controller": ["@smithy/abort-controller@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-j7HwVkBw68YW8UmFRcjZOmssE77Rvk0GWAIN1oFBhsaovQmZWYCIcGa9/pwRB0ExI8Sk9MWNALTjftjHZea7VA=="], + + "@smithy/config-resolver": ["@smithy/config-resolver@4.4.3", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.5", "@smithy/types": "^4.9.0", "@smithy/util-config-provider": "^4.2.0", "@smithy/util-endpoints": "^3.2.5", "@smithy/util-middleware": "^4.2.5", "tslib": "^2.6.2" } }, "sha512-ezHLe1tKLUxDJo2LHtDuEDyWXolw8WGOR92qb4bQdWq/zKenO5BvctZGrVJBK08zjezSk7bmbKFOXIVyChvDLw=="], + + "@smithy/core": ["@smithy/core@3.18.4", "", { "dependencies": { "@smithy/middleware-serde": "^4.2.6", "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-middleware": "^4.2.5", "@smithy/util-stream": "^4.5.6", "@smithy/util-utf8": "^4.2.0", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" } }, "sha512-o5tMqPZILBvvROfC8vC+dSVnWJl9a0u9ax1i1+Bq8515eYjUJqqk5XjjEsDLoeL5dSqGSh6WGdVx1eJ1E/Nwhw=="], + + "@smithy/credential-provider-imds": ["@smithy/credential-provider-imds@4.2.5", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.5", "@smithy/property-provider": "^4.2.5", "@smithy/types": "^4.9.0", "@smithy/url-parser": "^4.2.5", "tslib": "^2.6.2" } }, "sha512-BZwotjoZWn9+36nimwm/OLIcVe+KYRwzMjfhd4QT7QxPm9WY0HiOV8t/Wlh+HVUif0SBVV7ksq8//hPaBC/okQ=="], + + "@smithy/fetch-http-handler": ["@smithy/fetch-http-handler@5.3.6", "", { "dependencies": { "@smithy/protocol-http": "^5.3.5", "@smithy/querystring-builder": "^4.2.5", "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "tslib": "^2.6.2" } }, "sha512-3+RG3EA6BBJ/ofZUeTFJA7mHfSYrZtQIrDP9dI8Lf7X6Jbos2jptuLrAAteDiFVrmbEmLSuRG/bUKzfAXk7dhg=="], + + "@smithy/hash-node": ["@smithy/hash-node@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-DpYX914YOfA3UDT9CN1BM787PcHfWRBB43fFGCYrZFUH0Jv+5t8yYl+Pd5PW4+QzoGEDvn5d5QIO4j2HyYZQSA=="], + + "@smithy/invalid-dependency": ["@smithy/invalid-dependency@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-2L2erASEro1WC5nV+plwIMxrTXpvpfzl4e+Nre6vBVRR2HKeGGcvpJyyL3/PpiSg+cJG2KpTmZmq934Olb6e5A=="], + + "@smithy/is-array-buffer": ["@smithy/is-array-buffer@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ=="], + + "@smithy/middleware-content-length": ["@smithy/middleware-content-length@4.2.5", "", { "dependencies": { "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-Y/RabVa5vbl5FuHYV2vUCwvh/dqzrEY/K2yWPSqvhFUwIY0atLqO4TienjBXakoy4zrKAMCZwg+YEqmH7jaN7A=="], + + "@smithy/middleware-endpoint": ["@smithy/middleware-endpoint@4.3.11", "", { "dependencies": { "@smithy/core": "^3.18.4", "@smithy/middleware-serde": "^4.2.6", "@smithy/node-config-provider": "^4.3.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "@smithy/url-parser": "^4.2.5", "@smithy/util-middleware": "^4.2.5", "tslib": "^2.6.2" } }, "sha512-eJXq9VJzEer1W7EQh3HY2PDJdEcEUnv6sKuNt4eVjyeNWcQFS4KmnY+CKkYOIR6tSqarn6bjjCqg1UB+8UJiPQ=="], + + "@smithy/middleware-retry": ["@smithy/middleware-retry@4.4.11", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.5", "@smithy/protocol-http": "^5.3.5", "@smithy/service-error-classification": "^4.2.5", "@smithy/smithy-client": "^4.9.7", "@smithy/types": "^4.9.0", "@smithy/util-middleware": "^4.2.5", "@smithy/util-retry": "^4.2.5", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" } }, "sha512-EL5OQHvFOKneJVRgzRW4lU7yidSwp/vRJOe542bHgExN3KNThr1rlg0iE4k4SnA+ohC+qlUxoK+smKeAYPzfAQ=="], + + "@smithy/middleware-serde": ["@smithy/middleware-serde@4.2.6", "", { "dependencies": { "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-VkLoE/z7e2g8pirwisLz8XJWedUSY8my/qrp81VmAdyrhi94T+riBfwP+AOEEFR9rFTSonC/5D2eWNmFabHyGQ=="], + + "@smithy/middleware-stack": ["@smithy/middleware-stack@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-bYrutc+neOyWxtZdbB2USbQttZN0mXaOyYLIsaTbJhFsfpXyGWUxJpEuO1rJ8IIJm2qH4+xJT0mxUSsEDTYwdQ=="], + + "@smithy/node-config-provider": ["@smithy/node-config-provider@4.3.5", "", { "dependencies": { "@smithy/property-provider": "^4.2.5", "@smithy/shared-ini-file-loader": "^4.4.0", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-UTurh1C4qkVCtqggI36DGbLB2Kv8UlcFdMXDcWMbqVY2uRg0XmT9Pb4Vj6oSQ34eizO1fvR0RnFV4Axw4IrrAg=="], + + "@smithy/node-http-handler": ["@smithy/node-http-handler@4.4.5", "", { "dependencies": { "@smithy/abort-controller": "^4.2.5", "@smithy/protocol-http": "^5.3.5", "@smithy/querystring-builder": "^4.2.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-CMnzM9R2WqlqXQGtIlsHMEZfXKJVTIrqCNoSd/QpAyp+Dw0a1Vps13l6ma1fH8g7zSPNsA59B/kWgeylFuA/lw=="], + + "@smithy/property-provider": ["@smithy/property-provider@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-8iLN1XSE1rl4MuxvQ+5OSk/Zb5El7NJZ1td6Tn+8dQQHIjp59Lwl6bd0+nzw6SKm2wSSriH2v/I9LPzUic7EOg=="], + + "@smithy/protocol-http": ["@smithy/protocol-http@5.3.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-RlaL+sA0LNMp03bf7XPbFmT5gN+w3besXSWMkA8rcmxLSVfiEXElQi4O2IWwPfxzcHkxqrwBFMbngB8yx/RvaQ=="], + + "@smithy/querystring-builder": ["@smithy/querystring-builder@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "@smithy/util-uri-escape": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-y98otMI1saoajeik2kLfGyRp11e5U/iJYH/wLCh3aTV/XutbGT9nziKGkgCaMD1ghK7p6htHMm6b6scl9JRUWg=="], + + "@smithy/querystring-parser": ["@smithy/querystring-parser@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-031WCTdPYgiQRYNPXznHXof2YM0GwL6SeaSyTH/P72M1Vz73TvCNH2Nq8Iu2IEPq9QP2yx0/nrw5YmSeAi/AjQ=="], + + "@smithy/service-error-classification": ["@smithy/service-error-classification@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0" } }, "sha512-8fEvK+WPE3wUAcDvqDQG1Vk3ANLR8Px979te96m84CbKAjBVf25rPYSzb4xU4hlTyho7VhOGnh5i62D/JVF0JQ=="], + + "@smithy/shared-ini-file-loader": ["@smithy/shared-ini-file-loader@4.4.0", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-5WmZ5+kJgJDjwXXIzr1vDTG+RhF9wzSODQBfkrQ2VVkYALKGvZX1lgVSxEkgicSAFnFhPj5rudJV0zoinqS0bA=="], + + "@smithy/signature-v4": ["@smithy/signature-v4@5.3.5", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.0", "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "@smithy/util-hex-encoding": "^4.2.0", "@smithy/util-middleware": "^4.2.5", "@smithy/util-uri-escape": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-xSUfMu1FT7ccfSXkoLl/QRQBi2rOvi3tiBZU2Tdy3I6cgvZ6SEi9QNey+lqps/sJRnogIS+lq+B1gxxbra2a/w=="], + + "@smithy/smithy-client": ["@smithy/smithy-client@4.9.7", "", { "dependencies": { "@smithy/core": "^3.18.4", "@smithy/middleware-endpoint": "^4.3.11", "@smithy/middleware-stack": "^4.2.5", "@smithy/protocol-http": "^5.3.5", "@smithy/types": "^4.9.0", "@smithy/util-stream": "^4.5.6", "tslib": "^2.6.2" } }, "sha512-pskaE4kg0P9xNQWihfqlTMyxyFR3CH6Sr6keHYghgyqqDXzjl2QJg5lAzuVe/LzZiOzcbcVtxKYi1/fZPt/3DA=="], + + "@smithy/types": ["@smithy/types@4.9.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-MvUbdnXDTwykR8cB1WZvNNwqoWVaTRA0RLlLmf/cIFNMM2cKWz01X4Ly6SMC4Kks30r8tT3Cty0jmeWfiuyHTA=="], + + "@smithy/url-parser": ["@smithy/url-parser@4.2.5", "", { "dependencies": { "@smithy/querystring-parser": "^4.2.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-VaxMGsilqFnK1CeBX+LXnSuaMx4sTL/6znSZh2829txWieazdVxr54HmiyTsIbpOTLcf5nYpq9lpzmwRdxj6rQ=="], + + "@smithy/util-base64": ["@smithy/util-base64@4.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-GkXZ59JfyxsIwNTWFnjmFEI8kZpRNIBfxKjv09+nkAWPt/4aGaEWMM04m4sxgNVWkbt2MdSvE3KF/PfX4nFedQ=="], + + "@smithy/util-body-length-browser": ["@smithy/util-body-length-browser@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg=="], + + "@smithy/util-body-length-node": ["@smithy/util-body-length-node@4.2.1", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-h53dz/pISVrVrfxV1iqXlx5pRg3V2YWFcSQyPyXZRrZoZj4R4DeWRDo1a7dd3CPTcFi3kE+98tuNyD2axyZReA=="], + + "@smithy/util-buffer-from": ["@smithy/util-buffer-from@4.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew=="], + + "@smithy/util-config-provider": ["@smithy/util-config-provider@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-YEjpl6XJ36FTKmD+kRJJWYvrHeUvm5ykaUS5xK+6oXffQPHeEM4/nXlZPe+Wu0lsgRUcNZiliYNh/y7q9c2y6Q=="], + + "@smithy/util-defaults-mode-browser": ["@smithy/util-defaults-mode-browser@4.3.10", "", { "dependencies": { "@smithy/property-provider": "^4.2.5", "@smithy/smithy-client": "^4.9.7", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-3iA3JVO1VLrP21FsZZpMCeF93aqP3uIOMvymAT3qHIJz2YlgDeRvNUspFwCNqd/j3qqILQJGtsVQnJZICh/9YA=="], + + "@smithy/util-defaults-mode-node": ["@smithy/util-defaults-mode-node@4.2.13", "", { "dependencies": { "@smithy/config-resolver": "^4.4.3", "@smithy/credential-provider-imds": "^4.2.5", "@smithy/node-config-provider": "^4.3.5", "@smithy/property-provider": "^4.2.5", "@smithy/smithy-client": "^4.9.7", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-PTc6IpnpSGASuzZAgyUtaVfOFpU0jBD2mcGwrgDuHf7PlFgt5TIPxCYBDbFQs06jxgeV3kd/d/sok1pzV0nJRg=="], + + "@smithy/util-endpoints": ["@smithy/util-endpoints@3.2.5", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-3O63AAWu2cSNQZp+ayl9I3NapW1p1rR5mlVHcF6hAB1dPZUQFfRPYtplWX/3xrzWthPGj5FqB12taJJCfH6s8A=="], + + "@smithy/util-hex-encoding": ["@smithy/util-hex-encoding@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw=="], + + "@smithy/util-middleware": ["@smithy/util-middleware@4.2.5", "", { "dependencies": { "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-6Y3+rvBF7+PZOc40ybeZMcGln6xJGVeY60E7jy9Mv5iKpMJpHgRE6dKy9ScsVxvfAYuEX4Q9a65DQX90KaQ3bA=="], + + "@smithy/util-retry": ["@smithy/util-retry@4.2.5", "", { "dependencies": { "@smithy/service-error-classification": "^4.2.5", "@smithy/types": "^4.9.0", "tslib": "^2.6.2" } }, "sha512-GBj3+EZBbN4NAqJ/7pAhsXdfzdlznOh8PydUijy6FpNIMnHPSMO2/rP4HKu+UFeikJxShERk528oy7GT79YiJg=="], + + "@smithy/util-stream": ["@smithy/util-stream@4.5.6", "", { "dependencies": { "@smithy/fetch-http-handler": "^5.3.6", "@smithy/node-http-handler": "^4.4.5", "@smithy/types": "^4.9.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-hex-encoding": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-qWw/UM59TiaFrPevefOZ8CNBKbYEP6wBAIlLqxn3VAIo9rgnTNc4ASbVrqDmhuwI87usnjhdQrxodzAGFFzbRQ=="], + + "@smithy/util-uri-escape": ["@smithy/util-uri-escape@4.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA=="], + + "@smithy/util-utf8": ["@smithy/util-utf8@4.2.0", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.0", "tslib": "^2.6.2" } }, "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw=="], + + "@smithy/uuid": ["@smithy/uuid@1.1.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-4aUIteuyxtBUhVdiQqcDhKFitwfd9hqoSDYY2KRXiWtgoWJ9Bmise+KfEPDiVHWeJepvF8xJO9/9+WDIciMFFw=="], + + "@standard-schema/spec": ["@standard-schema/spec@1.0.0", "", {}, "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA=="], + + "@swc/helpers": ["@swc/helpers@0.5.17", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="], + + "@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], + + "@types/bun": ["@types/bun@1.3.2", "", { "dependencies": { "bun-types": "1.3.2" } }, "sha512-t15P7k5UIgHKkxwnMNkJbWlh/617rkDGEdSsDbu+qNHTaz9SKf7aC8fiIlUdD5RPpH6GEkP0cK7WlvmrEBRtWg=="], + + "@types/node": ["@types/node@24.10.1", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ=="], + + "@types/react": ["@types/react@19.2.6", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-p/jUvulfgU7oKtj6Xpk8cA2Y1xKTtICGpJYeJXz2YVO2UcvjQgeRMLDGfDeqeRW2Ta+0QNFwcc8X3GH8SxZz6w=="], + + "aws4fetch": ["aws4fetch@1.0.20", "", {}, "sha512-/djoAN709iY65ETD6LKCtyyEI04XIBP5xVvfmNxsEP0uJB5tyaGBztSryRr4HqMStr9R06PisQE7m9zDTXKu6g=="], + + "bowser": ["bowser@2.12.1", "", {}, "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "bun-types": ["bun-types@1.3.2", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-i/Gln4tbzKNuxP70OWhJRZz1MRfvqExowP7U6JKoI8cntFrtxg7RJK3jvz7wQW54UuvNC8tbKHHri5fy74FVqg=="], + + "core-js": ["core-js@3.46.0", "", {}, "sha512-vDMm9B0xnqqZ8uSBpZ8sNtRtOdmfShrvT6h2TuQGLs0Is+cR0DYbj/KWP6ALVNbWPpqA/qPLoOuppJN07humpA=="], + + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "dedent": ["dedent@1.7.0", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ=="], + + "detect-libc": ["detect-libc@1.0.3", "", { "bin": { "detect-libc": "./bin/detect-libc.js" } }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], + + "effect": ["effect@3.19.4", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "fast-check": "^3.23.1" } }, "sha512-gApFffMwpDVgmw/FzCaYWt6zw4m0xAnQf5+cPS0+Sl85AxfeovJeEIsiEQVlk+ZvtBYcoPXxi65GIyruzanQ5g=="], + + "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="], + + "fast-xml-parser": ["fast-xml-parser@5.2.5", "", { "dependencies": { "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "find-my-way-ts": ["find-my-way-ts@0.1.6", "", {}, "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + + "msgpackr": ["msgpackr@1.11.5", "", { "optionalDependencies": { "msgpackr-extract": "^3.0.2" } }, "sha512-UjkUHN0yqp9RWKy0Lplhh+wlpdt9oQBYgULZOiFhV3VclSF1JnSQWZ5r9gORQlNYaUKQoR8itv7g7z1xDDuACA=="], + + "msgpackr-extract": ["msgpackr-extract@3.0.3", "", { "dependencies": { "node-gyp-build-optional-packages": "5.2.2" }, "optionalDependencies": { "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" }, "bin": { "download-msgpackr-prebuilds": "bin/download-prebuilds.js" } }, "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA=="], + + "multipasta": ["multipasta@0.2.7", "", {}, "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA=="], + + "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], + + "node-gyp-build-optional-packages": ["node-gyp-build-optional-packages@5.2.2", "", { "dependencies": { "detect-libc": "^2.0.1" }, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-optional": "optional.js", "node-gyp-build-optional-packages-test": "build-test.js" } }, "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw=="], + + "picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], + + "strnum": ["strnum@2.1.1", "", {}, "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + + "uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="], + + "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + + "@aws-crypto/sha256-browser/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], + + "@aws-crypto/util/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], + + "node-gyp-build-optional-packages/detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="], + + "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="], + + "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], + + "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/is-array-buffer@2.2.0", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="], + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..462b4407 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "itty-aws-2", + "module": "index.ts", + "type": "module", + "private": true, + "devDependencies": { + "@rsbuild/core": "^1.6.7", + "@types/bun": "latest", + "@types/node": "^24.10.1", + "dedent": "^1.7.0" + }, + "peerDependencies": { + "typescript": "^5" + }, + "dependencies": { + "@aws-sdk/credential-providers": "^3.933.0", + "@effect/platform": "^0.93.3", + "@effect/platform-bun": "^0.83.0", + "aws4fetch": "^1.0.20", + "effect": "^3.19.4" + } +} diff --git a/playground-itty.ts b/playground-itty.ts new file mode 100644 index 00000000..f32e2d3a --- /dev/null +++ b/playground-itty.ts @@ -0,0 +1,30 @@ +import { BunContext, BunRuntime } from "@effect/platform-bun"; +import * as Effect from "effect/Effect"; +import * as S3 from "./src/clients.gen/s3"; +import { NodeProviderChainCredentialsLive } from "./src/credentials"; + +const program = Effect.gen(function* () { + const result = yield* S3.createBucket({ + Bucket: "alchemy-7uzxjcR", + ACL: "private", + GrantWrite: "", + CreateBucketConfiguration: { + Tags: [ + { + Key: "Name", + Value: "Alchemy", + }, + ], + }, + }); + console.log(result); +}).pipe(Effect.provide(S3.createClient({}))); + +BunRuntime.runMain( + program.pipe( + //todo(pear): make this not a function so we can replace with like S3.testClient or something + Effect.provide(S3.createClient({})), + Effect.provide(NodeProviderChainCredentialsLive), + Effect.provide(BunContext.layer), + ), +); diff --git a/playground.ts b/playground.ts new file mode 100644 index 00000000..1d7bad30 --- /dev/null +++ b/playground.ts @@ -0,0 +1,9 @@ +// import { BunContext, BunRuntime } from "@effect/platform-bun"; +import * as Effect from "effect/Effect"; + +export const program = Effect.gen(function* () { + const result = yield* Effect.succeed({ hello: "world" }); + console.log(result); +}); + +// BunRuntime.runMain(program.pipe(Effect.provide(BunContext.layer))); diff --git a/rsbuild.config.ts b/rsbuild.config.ts new file mode 100644 index 00000000..070d033c --- /dev/null +++ b/rsbuild.config.ts @@ -0,0 +1,53 @@ +import { defineConfig } from "@rsbuild/core"; + +export default defineConfig({ + source: { + entry: { + index: process.argv[4], + }, + }, + output: { + target: "node", + externals: [ + "@effect/platform", + "@effect/platform-node-shared", + "@effect/platform-bun", + "effect", + "@aws-sdk/credential-providers", + ], + // externals: { + // "@effect/platform": "@effect/platform", + // "@effect/platform-node-shared": "@effect/platform-node-shared", + // "@effect/platform-bun": "@effect/platform-bun", + // effect: "effect", + // "@aws-sdk/credential-providers": "@aws-sdk/credential-providers", + // }, + minify: { + js: true, + jsOptions: { + minimizerOptions: { + // minify: false, + // mangle: false, + }, + }, + }, + distPath: { + root: "dist", + js: ".", + }, + filename: { + js: "bundle.js", + }, + }, + tools: { + htmlPlugin: false, + }, + performance: { + // bundleAnalyze: { + // generateStatsFile: true, + // }, + chunkSplit: { + strategy: "all-in-one", + }, + }, +}); diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts new file mode 100644 index 00000000..fa36d480 --- /dev/null +++ b/scripts/generate-clients.ts @@ -0,0 +1,480 @@ +import { FileSystem, Path } from "@effect/platform"; +import { BunContext, BunRuntime } from "@effect/platform-bun"; +import { + Effect, + LogLevel, + Logger, + Schema, + Data, + Context, + Match, + Ref, +} from "effect"; +import { + SmithyModel, + ServiceShape, + GenericShape, + ShapeTypeMap, +} from "./model-schema"; +import { ServiceMetadata } from "../src/service-metadata"; +import dedent from "dedent"; + +class ModelService extends Context.Tag("ModelService")< + ModelService, + SmithyModel +>() {} + +class TypeStore extends Context.Tag("TypeStore")< + TypeStore, + { + aliases: Ref.Ref>; + errors: Ref.Ref>; + } +>() {} + +//todo(pear): don't hardcode - cli flag + default +const TEST_OUTPUT_PATH = "./src/clients.gen/s3.ts"; +const TEST_MODAL_PATH = + "D:/code/OSS/aws/api-models-aws/models/s3/service/2006-03-01/s3-2006-03-01.json"; + +//todo(pear): add this to a categeroy +//todo(pear): add details about the root error to this +export class ShapeNotFound extends Data.TaggedError("ShapeNotFound")<{ + message: string; +}> {} +export class ProtocolNotFound extends Data.TaggedError( + "ProtocolNotFound", +)<{}> {} + +//* todo(pear): better error here - most of these need to be handled +export class UnableToTransformShapeToType extends Data.TaggedError( + "UnableToTransformShapeToType", +)<{ + message: string; +}> {} + +//todo(pear): remove this in favor of find shape +const findServiceShape = Effect.gen(function* () { + const model = yield* ModelService; + const serviceEntry = Object.entries(model.shapes).find( + ([_, shape]) => shape.type === "service", + ); + + return serviceEntry + ? (serviceEntry as [string, ServiceShape]) + : yield* Effect.fail( + new ShapeNotFound({ message: "service shape not found" }), + ); +}); + +//todo(pear): cache this +function findShape( + shapeId: string, + type: T, +): Effect.Effect<[string, ShapeTypeMap[T]], ShapeNotFound, ModelService>; +function findShape( + shapeId: string, + type?: string, +): Effect.Effect<[string, GenericShape], ShapeNotFound, ModelService>; +function findShape( + shapeId: string, + type?: string, +): Effect.Effect<[string, GenericShape], ShapeNotFound, ModelService> { + const effect = Effect.gen(function* () { + const model = yield* ModelService; + const entry = Object.entries(model.shapes).find( + ([id, shape]) => + (type == null ? true : shape.type === type) && id === shapeId, + ); + + return entry + ? (entry as any) + : yield* Effect.fail( + new ShapeNotFound({ + message: `unable to find ${type ?? "unknown"}: ${shapeId}`, + }), + ); + }); + + return effect; +} + +function formatName(shapeId: string, lowercase = false) { + let name = shapeId.split("#")[1] ?? ""; + if (lowercase) { + name = name.charAt(0).toLowerCase() + name.slice(1); + } + return name; +} + +const createTsAlias = (shapeId: string) => + Effect.fn(function* (type: string) { + const { aliases } = yield* TypeStore; + const alias = formatName(shapeId); + + const existing = yield* Ref.get(aliases); + if (existing.has(alias)) { + return alias; + } + + yield* Ref.update(aliases, (map) => map.set(alias, type)); + return alias; + }); + +const createTsError = (shapeId: string) => + Effect.fn(function* (type: string) { + const { errors } = yield* TypeStore; + const errorName = `${formatName(shapeId)}Error`; + + const existing = yield* Ref.get(errors); + if (existing.has(errorName)) { + return errorName; + } + + yield* Ref.update(errors, (map) => map.set(errorName, type)); + return errorName; + }); + +//todo(pear): cache this +const convertShapeToTypescript: ( + args_0: [string, GenericShape], +) => Effect.Effect< + string, + ShapeNotFound | UnableToTransformShapeToType, + ModelService | TypeStore +> = Effect.fn(function* ([targetShapeId, targetShape]: [string, GenericShape]) { + const typescriptType = yield* Match.value(targetShape).pipe( + Match.when( + (s) => + // shape.type === "bigDecimal" || + // shape.type === "bigInteger" || + // shape.type === "double" || + // shape.type === "float" || + s.type === "integer" || s.type === "long", + () => Effect.succeed("number"), + ), + Match.when( + (s) => s.type === "string", + () => Effect.succeed("string"), + ), + Match.when( + (s) => s.type === "blob", + () => Effect.succeed("Uint8Array"), + ), + Match.when( + (s) => s.type === "boolean", + () => Effect.succeed("boolean"), + ), + Match.when( + (s) => s.type === "timestamp", + () => Effect.succeed("Date | string"), + ), + Match.when( + (s) => s.type === "enum", + (s) => + Effect.succeed( + Object.values(s.members) + .map(({ traits }) => `"${traits["smithy.api#enumValue"]}"`) + .join(" | "), + ).pipe(Effect.flatMap(createTsAlias(targetShapeId))), + ), + Match.when( + (s) => s.type === "list", + (s) => + findShape(s.member.target).pipe( + Effect.flatMap(convertShapeToTypescript), + Effect.map((type) => `Array<${type}>`), + ), + ), + Match.when( + (s) => s.type === "structure", + (s) => + Effect.all( + Object.entries(s.members).map(([memberName, member]) => + findShape(member.target).pipe( + Effect.flatMap(convertShapeToTypescript), + Effect.map( + (type) => + `${memberName}${member.traits?.["smithy.api#required"] != null ? "" : "?"}: ${type}`, + ), + ), + ), + { concurrency: "unbounded" }, + ).pipe( + Effect.map((members) => `{${members.join(", ")}}`), + Effect.flatMap(createTsAlias(targetShapeId)), + ), + ), + Match.when( + (s) => s.type === "union", + (s) => + Effect.all( + Object.entries(s.members).map(([_memberName, member]) => + findShape(member.target).pipe( + Effect.flatMap(convertShapeToTypescript), + ), + ), + { concurrency: "unbounded" }, + ).pipe( + Effect.map((members) => members.join(" | ")), + Effect.flatMap(createTsAlias(targetShapeId)), + ), + ), + Match.when( + (s) => s.type === "map", + (s) => + Effect.all( + [ + findShape(s.key.target).pipe( + Effect.flatMap(convertShapeToTypescript), + ), + findShape(s.value.target).pipe( + Effect.flatMap(convertShapeToTypescript), + ), + ], + { concurrency: "unbounded" }, + ).pipe( + Effect.map( + ([keyType, valueType]) => `Record<${keyType}, ${valueType}>`, + ), + Effect.flatMap(createTsAlias(targetShapeId)), + ), + ), + Match.orElse((s) => + Effect.fail( + new UnableToTransformShapeToType({ + message: `type ${s.type} at ${targetShapeId}`, + }), + ), + ), + // Match.exhaustive, + ); + + return typescriptType; +}); + +const generateClient = Effect.fn(function* ( + modelPath: string, + outputPath: string, +) { + const fs = yield* FileSystem.FileSystem; + const path = yield* Path.Path; + + //* here we store types that we aren't inlining + const typeAliasStore = yield* Ref.make>(new Map()); + const typeErrorStore = yield* Ref.make>(new Map()); + + const model = yield* fs + .readFileString(modelPath) + .pipe(Effect.flatMap(Schema.decodeUnknown(Schema.parseJson(SmithyModel)))); + + const client = Effect.gen(function* () { + const [_serviceShapeName, serviceShape] = yield* findServiceShape; + + const protocol = Object.keys(serviceShape.traits).find((key) => + key.startsWith("aws.protocols#"), + ); + + if (protocol == null) { + return yield* Effect.fail(new ProtocolNotFound()); + } + + const metadata = { + protocol, + sdkId: serviceShape.traits["aws.api#service"].sdkId, + sigV4ServiceName: serviceShape.traits["aws.auth#sigv4"].name, + version: serviceShape.version, + } satisfies ServiceMetadata; + + // const imports = `import { type Effect, Layer, Context, Schema as S } from "effect";\nimport type { CommonAwsError } from "../aws-errors";\nimport { makeOperation } from "../client";` + const imports = [ + `import { type Effect, Layer, Context, Schema as S } from "effect";`, + `import type { CommonAwsError } from "../aws-errors";`, + `import { makeOperation } from "../client";`, + ]; + + const serviceName = `${metadata.sdkId}ClientRequirement`; + + const clientServiceTag = dedent`export class ${serviceName} extends Context.Tag("${serviceName}")<${serviceName}, { call: (metadata: any) => (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {}`; + + //todo(pear): move to match + const createClient = yield* Effect.if( + protocol === "aws.protocols#restXml", + { + onFalse: () => + Effect.succeed( + `import { loggerProvider } from "../protocols/logger";\nexport const createClient = (config: any) => Layer.succeed(${serviceName}, loggerProvider(config, metadata));`, + ), + onTrue: () => { + imports.push( + `import { restXmlProvider, type EndpointMetadata, type ClientConfig } from "../protocols/rest-xml";`, + ); + return Effect.succeed( + `export const createClient = (config: ClientConfig) => Layer.effect(${serviceName}, restXmlProvider(config, metadata));`, + ); + }, + }, + ); + + const operations = yield* Effect.forEach( + serviceShape.operations, + Effect.fn(function* ({ target: operationId }: { target: string }) { + const [_id, operationShape] = yield* findShape( + operationId, + "operation", + ); + + const errors = yield* Effect.all( + (operationShape.errors ?? []).map(({ target: errorShapeId }) => + findShape(errorShapeId).pipe( + Effect.flatMap(convertShapeToTypescript), + //todo(pear): error categories + Effect.flatMap(createTsError(errorShapeId)), + ), + ), + ); + + const outputType = yield* Effect.if( + operationShape.output.target === "smithy.api#Unit", + { + onTrue: () => Effect.succeed("void"), + onFalse: () => + findShape(operationShape.output.target, "structure").pipe( + Effect.flatMap(convertShapeToTypescript), + ), + }, + ); + + const body = yield* Effect.if( + operationShape.input.target === "smithy.api#Unit", + { + onTrue: () => Effect.succeed("void"), + onFalse: Effect.fn(function* () { + const [_structureId, structure] = yield* findShape( + operationShape.input.target, + "structure", + ); + return yield* Effect.reduce( + Object.entries(structure.members), + {} as Record, + (acc, [key, value]) => { + if (value.traits?.["smithy.api#httpHeader"] != null) { + if ( + "x-amz-" + + key + .replace(/([A-Z])/g, "-$1") + .toLowerCase() + .slice(1) === + value.traits["smithy.api#httpHeader"] + ) { + return Effect.succeed(acc); + } + return Effect.succeed({ + ...acc, + [key]: value.traits["smithy.api#httpHeader"], + }); + } + if (value.traits?.["smithy.api#httpLabel"] != null) { + return Effect.succeed({ + ...acc, + [key]: `p:${value.traits?.["smithy.rules#contextParam"]?.name ?? key}`, + }); + } + if (value.traits?.["smithy.api#httpPayload"] != null) { + return Effect.succeed({ + ...acc, + [key]: `b:${value.traits["smithy.api#xmlName"]}`, + }); + } + return Effect.succeed(acc); + }, + ); + }), + }, + ); + + const inputType = yield* Effect.if( + operationShape.output.target === "smithy.api#Unit", + { + onTrue: () => Effect.succeed("void"), + onFalse: () => + findShape(operationShape.input.target, "structure").pipe( + Effect.flatMap(convertShapeToTypescript), + ), + }, + ); + + errors.push("CommonAwsError"); + + const traits = operationShape.traits["smithy.api#http"]; + + const endpointMeta = `{ method: "${traits.method}", uri: "${traits.uri}", body: ${JSON.stringify(body)} }`; + + return `export const ${formatName(operationId, true)} = /*@__PURE__*/ makeOperation<${inputType}, ${outputType}, ${errors.join(" | ")}, typeof ${serviceName}>(${endpointMeta}, ${serviceName})`; + // return `export const ${formatName(operationId)} = (inputs: ${inputShape}) => Effect.Effect<${outputShape}, ${errors.join(" | ")}>`; + }), + ); + + const aliasedTypes = yield* Ref.get(typeAliasStore).pipe( + Effect.map((t) => + Array.from(t.entries()) + .map(([alias, type]) => `type ${alias} = ${type};`) + .join("\n"), + ), + ); + + const errorTypes = yield* Ref.get(typeErrorStore).pipe( + Effect.map((t) => + Array.from(t.entries()) + .map( + ([errorName, type]) => + `export declare class ${errorName} extends S.TaggedError<${type}>()(("${errorName}"), {}).pipe() {}`, + ) + .join("\n"), + ), + ); + + const content = dedent` + ${imports.join("\n")} + + //==== Exports ==== + export const metadata = ${JSON.stringify(metadata)} + + ${clientServiceTag} + ${createClient} + + ${operations.join("\n")} + + //==== Aliased Types ==== + ${aliasedTypes} + + //==== Error Types ==== + ${errorTypes}\n`; + + yield* fs.makeDirectory( + path.dirname(path.join(process.cwd(), outputPath)), + { + recursive: true, + }, + ); + + yield* fs.writeFileString(path.join(process.cwd(), outputPath), content); + }); + + return yield* client.pipe( + Effect.provideService(ModelService, model), + Effect.provideService(TypeStore, { + aliases: typeAliasStore, + errors: typeErrorStore, + }), + ); + + // console.log({ schema, typeDetails, errorTypes }); +}); + +BunRuntime.runMain( + generateClient(TEST_MODAL_PATH, TEST_OUTPUT_PATH).pipe( + Logger.withMinimumLogLevel(LogLevel.Debug), + Effect.provide(BunContext.layer), + ), +); diff --git a/scripts/model-schema.ts b/scripts/model-schema.ts new file mode 100644 index 00000000..496f18a8 --- /dev/null +++ b/scripts/model-schema.ts @@ -0,0 +1,200 @@ +import { Schema as S } from "effect"; + +// Smithy shape types +export const ShapeType = S.Literal( + "service", // + "timestamp", // + "integer", // + "boolean", // + "string", // + "long", // + "float", // todo(pear) it was NOT IN S3 so I didn't make a shape + "double", // todo(pear) it was NOT IN S3 so I didn't make a shape + "bigInteger", // todo(pear) it was NOT IN S3 so I didn't make a shape + "bigDecimal", // todo(pear) it was NOT IN S3 so I didn't make a shape + "blob", // + "list", // + "map", // + "set", // todo(pear) it was NOT IN S3 so I didn't make a shape + "union", // + "enum", // + "resource", // todo(pear) it was NOT IN S3 so I didn't make a shape + "structure", // + "operation", // +); + +// Trait definition +export const Trait = S.Record({ + key: S.String, + value: S.Unknown, +}); + +// Member definition +export const Member = S.Struct({ + target: S.String, + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); + +export const ServiceShape = S.Struct({ + type: S.Literal("service"), + version: S.String, + operations: S.Array(S.Struct({ target: S.String })), + traits: S.extend( + //* dynamic record must be first so schema doesn't remove the values when decoding + S.Record({ key: S.String, value: S.Unknown }), + S.Struct({ + "aws.api#service": S.Struct({ sdkId: S.String }), + "aws.auth#sigv4": S.Struct({ name: S.String }), + }), + ), +}); + +export const TimestampShape = S.Struct({ + type: S.Literal("timestamp"), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); +export const IntegerShape = S.Struct({ + type: S.Literal("integer"), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); +export const BooleanShape = S.Struct({ + type: S.Literal("boolean"), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); +export const StringShape = S.Struct({ + type: S.Literal("string"), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); +export const LongShape = S.Struct({ + type: S.Literal("long"), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); +export const BlobShape = S.Struct({ + type: S.Literal("blob"), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); + +export const ListShape = S.Struct({ + type: S.Literal("list"), + member: S.Struct({ + target: S.String, + }), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); + +export const MapShape = S.Struct({ + type: S.Literal("map"), + key: S.Struct({ + target: S.String, + }), + value: S.Struct({ + target: S.String, + }), +}); + +export const UnionShape = S.Struct({ + type: S.Literal("union"), + members: S.Record({ + key: S.String, + value: S.Struct({ + target: S.String, + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), + }), + }), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); + +export const EnumShape = S.Struct({ + type: S.Literal("enum"), + members: S.Record({ + key: S.String, + value: S.Struct({ + target: S.Literal("smithy.api#Unit"), + traits: S.Struct({ + "smithy.api#enumValue": S.String, + }), + }), + }), + traits: S.optional(S.Record({ key: S.String, value: S.Unknown })), +}); + +export const StructureShape = S.Struct({ + type: S.Literal("structure"), + members: S.Record({ key: S.String, value: Member }), + traits: S.Record({ key: S.String, value: S.Unknown }), +}); + +export const OperationShape = S.Struct({ + type: S.Literal("operation"), + input: S.Struct({ target: S.String }), + output: S.Struct({ target: S.String }), + errors: S.optional(S.Array(S.Struct({ target: S.String }))), + traits: S.extend( + //* dynamic record must be first so schema doesn't remove the values when decoding + S.Record({ key: S.String, value: S.Unknown }), + S.Struct({ + "smithy.api#http": S.Struct({ method: S.String, uri: S.String }), + }), + ), +}); + +export const GenericShape = S.Union( + ServiceShape, + TimestampShape, + IntegerShape, + BooleanShape, + StringShape, + LongShape, + BlobShape, + ListShape, + MapShape, + UnionShape, + EnumShape, + StructureShape, + OperationShape, +); + +// Smithy model +export const SmithyModel = S.Struct({ + smithy: S.String, + metadata: S.optional(S.Record({ key: S.String, value: S.Unknown })), + shapes: S.Record({ + key: S.String, + value: GenericShape, + }), +}); + +// Type exports +export type ShapeType = typeof ShapeType.Type; +export type Member = typeof Member.Type; +export type GenericShape = typeof GenericShape.Type; +export type TimestampShape = typeof TimestampShape.Type; +export type ServiceShape = typeof ServiceShape.Type; +export type IntegerShape = typeof IntegerShape.Type; +export type BooleanShape = typeof BooleanShape.Type; +export type StringShape = typeof StringShape.Type; +export type LongShape = typeof LongShape.Type; +export type BlobShape = typeof BlobShape.Type; +export type ListShape = typeof ListShape.Type; +export type MapShape = typeof MapShape.Type; +export type UnionShape = typeof UnionShape.Type; +export type EnumShape = typeof EnumShape.Type; +export type StructureShape = typeof StructureShape.Type; +export type OperationShape = typeof OperationShape.Type; +export type SmithyModel = typeof SmithyModel.Type; + +export type ShapeTypeMap = { + service: ServiceShape; + timestamp: TimestampShape; + integer: IntegerShape; + boolean: BooleanShape; + string: StringShape; + long: LongShape; + blob: BlobShape; + list: ListShape; + map: MapShape; + union: UnionShape; + enum: EnumShape; + structure: StructureShape; + operation: OperationShape; +}; diff --git a/src/aws-errors.ts b/src/aws-errors.ts new file mode 100644 index 00000000..0bc0a48d --- /dev/null +++ b/src/aws-errors.ts @@ -0,0 +1,141 @@ +import * as S from "effect/Schema"; +import { withCategory, ERROR_CATEGORIES } from "./errors"; + +export type CommonAwsError = + | AccessDeniedException + | ExpiredTokenException + | IncompleteSignature + | InternalFailure + | MalformedHttpRequestException + | NotAuthorized + | OptInRequired + | RequestAbortedException + | RequestEntityTooLargeException + | RequestExpired + | RequestTimeoutException + | ServiceUnavailable + | ThrottlingException + | UnrecognizedClientException + | UnknownOperationException + | ValidationError + | ValidationException; + +//==== Common AWS Errors ==== +export class AccessDeniedException extends S.TaggedError()( + "AccessDeniedException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class ExpiredTokenException extends S.TaggedError()( + "ExpiredTokenException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class IncompleteSignature extends S.TaggedError()( + "IncompleteSignature", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class InternalFailure extends S.TaggedError()( + "InternalFailure", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class MalformedHttpRequestException extends S.TaggedError()( + "MalformedHttpRequestException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class NotAuthorized extends S.TaggedError()( + "NotAuthorized", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class OptInRequired extends S.TaggedError()( + "OptInRequired", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class RequestAbortedException extends S.TaggedError()( + "RequestAbortedException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class RequestEntityTooLargeException extends S.TaggedError()( + "RequestEntityTooLargeException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class RequestExpired extends S.TaggedError()( + "RequestExpired", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class RequestTimeoutException extends S.TaggedError()( + "RequestTimeoutException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class ServiceUnavailable extends S.TaggedError()( + "ServiceUnavailable", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class ThrottlingException extends S.TaggedError()( + "ThrottlingException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class UnrecognizedClientException extends S.TaggedError()( + "UnrecognizedClientException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class UnknownOperationException extends S.TaggedError()( + "UnknownOperationException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class ValidationError extends S.TaggedError()( + "ValidationError", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} + +export class ValidationException extends S.TaggedError()( + "ValidationException", + {}, +).pipe( + withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), +) {} diff --git a/src/client.ts b/src/client.ts new file mode 100644 index 00000000..11c86b89 --- /dev/null +++ b/src/client.ts @@ -0,0 +1,27 @@ +import * as Effect from "effect/Effect"; +import * as Context from "effect/Context"; + +export function makeOperation< + Input, + Ouput, + Error, + ClientTag extends Context.Tag< + any, + { + call: (metadata: any) => (input: any) => Effect.Effect; + _endpointMetadataType: any; + } + >, +>( + metadata: Context.Tag.Service["_endpointMetadataType"], + clientTag: ClientTag, +): ( + input: Input, +) => Effect.Effect> { + //todo(pear): remove to pipes + return (input: any) => + Effect.gen(function* () { + const client = yield* clientTag; + return yield* client.call(metadata)(input); + }); +} diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts new file mode 100644 index 00000000..e91a8acc --- /dev/null +++ b/src/clients.gen/s3.ts @@ -0,0 +1,487 @@ +import { type Effect, Layer, Context, Schema as S } from "effect"; +import type { CommonAwsError } from "../aws-errors"; +import { makeOperation } from "../client"; +import { restXmlProvider, type EndpointMetadata, type ClientConfig } from "../protocols/rest-xml"; + +//==== Exports ==== +export const metadata = {"protocol":"aws.protocols#restXml","sdkId":"S3","sigV4ServiceName":"s3","version":"2006-03-01"} + +export class S3ClientRequirement extends Context.Tag("S3ClientRequirement") (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {} +export const createClient = (config: ClientConfig) => Layer.effect(S3ClientRequirement, restXmlProvider(config, metadata)); + +export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":"p:Bucket","Key":"p:Key","MultipartUpload":"b:CompleteMultipartUpload","ChecksumCRC32":"x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-checksum-sha1","ChecksumSHA256":"x-amz-checksum-sha256","MpuObjectSize":"x-amz-mp-object-size","IfMatch":"If-Match","IfNoneMatch":"If-None-Match","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const copyObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":"x-amz-acl","Bucket":"p:Bucket","CacheControl":"Cache-Control","ContentDisposition":"Content-Disposition","ContentEncoding":"Content-Encoding","ContentLanguage":"Content-Language","ContentType":"Content-Type","Expires":"Expires","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","IfMatch":"If-Match","IfNoneMatch":"If-None-Match","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled","CopySourceSSECustomerAlgorithm":"x-amz-copy-source-server-side-encryption-customer-algorithm","CopySourceSSECustomerKey":"x-amz-copy-source-server-side-encryption-customer-key","CopySourceSSECustomerKeyMD5":"x-amz-copy-source-server-side-encryption-customer-key-MD5","ObjectLockLegalHoldStatus":"x-amz-object-lock-legal-hold","ExpectedSourceBucketOwner":"x-amz-source-expected-bucket-owner"} }, S3ClientRequirement) +export const createBucket = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}", body: {"ACL":"x-amz-acl","Bucket":"p:Bucket","CreateBucketConfiguration":"b:CreateBucketConfiguration","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","ObjectLockEnabledForBucket":"x-amz-bucket-object-lock-enabled"} }, S3ClientRequirement) +export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","MetadataConfiguration":"b:MetadataConfiguration"} }, S3ClientRequirement) +export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","MetadataTableConfiguration":"b:MetadataTableConfiguration"} }, S3ClientRequirement) +export const createMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":"x-amz-acl","Bucket":"p:Bucket","CacheControl":"Cache-Control","ContentDisposition":"Content-Disposition","ContentEncoding":"Content-Encoding","ContentLanguage":"Content-Language","ContentType":"Content-Type","Expires":"Expires","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled","ObjectLockLegalHoldStatus":"x-amz-object-lock-legal-hold"} }, S3ClientRequirement) +export const createSession = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":"x-amz-create-session-mode","Bucket":"p:Bucket","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled"} }, S3ClientRequirement) +export const deleteBucket = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketCors = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const deleteObject = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":"p:Bucket","Key":"p:Key","MFA":"x-amz-mfa","IfMatch":"If-Match"} }, S3ClientRequirement) +export const deleteObjects = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":"p:Bucket","Delete":"b:Delete","MFA":"x-amz-mfa","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketCors = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketEncryption = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketLocation = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?location", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketLogging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketPolicy = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketReplication = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketVersioning = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getBucketWebsite = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?website", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getObject = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":"p:Bucket","IfMatch":"If-Match","IfModifiedSince":"If-Modified-Since","IfNoneMatch":"If-None-Match","IfUnmodifiedSince":"If-Unmodified-Since","Key":"p:Key","Range":"Range","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const getObjectAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const getObjectAttributes = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const getObjectRetention = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const getObjectTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const getObjectTorrent = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) +export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const headBucket = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const headObject = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":"p:Bucket","IfMatch":"If-Match","IfModifiedSince":"If-Modified-Since","IfNoneMatch":"If-None-Match","IfUnmodifiedSince":"If-Unmodified-Since","Key":"p:Key","Range":"Range","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listBuckets = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/?x-id=ListBuckets", body: {} }, S3ClientRequirement) +export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {} }, S3ClientRequirement) +export const listMultipartUploads = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listObjects = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listObjectsV2 = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listObjectVersions = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const listParts = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":"p:Bucket","AccelerateConfiguration":"b:AccelerateConfiguration","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putBucketAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":"x-amz-acl","AccessControlPolicy":"b:AccessControlPolicy","Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp"} }, S3ClientRequirement) +export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":"p:Bucket","AnalyticsConfiguration":"b:AnalyticsConfiguration"} }, S3ClientRequirement) +export const putBucketCors = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":"p:Bucket","CORSConfiguration":"b:CORSConfiguration","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putBucketEncryption = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ServerSideEncryptionConfiguration":"b:ServerSideEncryptionConfiguration"} }, S3ClientRequirement) +export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":"p:Bucket","IntelligentTieringConfiguration":"b:IntelligentTieringConfiguration"} }, S3ClientRequirement) +export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":"p:Bucket","InventoryConfiguration":"b:InventoryConfiguration"} }, S3ClientRequirement) +export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":"p:Bucket","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","LifecycleConfiguration":"b:LifecycleConfiguration"} }, S3ClientRequirement) +export const putBucketLogging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":"p:Bucket","BucketLoggingStatus":"b:BucketLoggingStatus","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":"p:Bucket","MetricsConfiguration":"b:MetricsConfiguration"} }, S3ClientRequirement) +export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":"p:Bucket","NotificationConfiguration":"b:NotificationConfiguration"} }, S3ClientRequirement) +export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","OwnershipControls":"b:OwnershipControls","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putBucketPolicy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","Policy":"b:undefined"} }, S3ClientRequirement) +export const putBucketReplication = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ReplicationConfiguration":"b:ReplicationConfiguration","Token":"x-amz-bucket-object-lock-token"} }, S3ClientRequirement) +export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","RequestPaymentConfiguration":"b:RequestPaymentConfiguration"} }, S3ClientRequirement) +export const putBucketTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","Tagging":"b:Tagging"} }, S3ClientRequirement) +export const putBucketVersioning = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","MFA":"x-amz-mfa","VersioningConfiguration":"b:VersioningConfiguration"} }, S3ClientRequirement) +export const putBucketWebsite = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","WebsiteConfiguration":"b:WebsiteConfiguration"} }, S3ClientRequirement) +export const putObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":"x-amz-acl","Body":"b:undefined","Bucket":"p:Bucket","CacheControl":"Cache-Control","ContentDisposition":"Content-Disposition","ContentEncoding":"Content-Encoding","ContentLanguage":"Content-Language","ContentLength":"Content-Length","ContentMD5":"Content-MD5","ContentType":"Content-Type","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ChecksumCRC32":"x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-checksum-sha1","ChecksumSHA256":"x-amz-checksum-sha256","Expires":"Expires","IfMatch":"If-Match","IfNoneMatch":"If-None-Match","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled","ObjectLockLegalHoldStatus":"x-amz-object-lock-legal-hold"} }, S3ClientRequirement) +export const putObjectAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":"x-amz-acl","AccessControlPolicy":"b:AccessControlPolicy","Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","Key":"p:Key"} }, S3ClientRequirement) +export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":"p:Bucket","Key":"p:Key","LegalHold":"b:LegalHold","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":"p:Bucket","ObjectLockConfiguration":"b:ObjectLockConfiguration","Token":"x-amz-bucket-object-lock-token","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putObjectRetention = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":"p:Bucket","Key":"p:Key","Retention":"b:Retention","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const putObjectTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":"p:Bucket","Key":"p:Key","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","Tagging":"b:Tagging"} }, S3ClientRequirement) +export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","PublicAccessBlockConfiguration":"b:PublicAccessBlockConfiguration"} }, S3ClientRequirement) +export const renameObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":"p:Bucket","Key":"p:Key","DestinationIfMatch":"If-Match","DestinationIfNoneMatch":"If-None-Match","DestinationIfModifiedSince":"If-Modified-Since","DestinationIfUnmodifiedSince":"If-Unmodified-Since","SourceIfMatch":"x-amz-rename-source-if-match","SourceIfNoneMatch":"x-amz-rename-source-if-none-match","SourceIfModifiedSince":"x-amz-rename-source-if-modified-since","SourceIfUnmodifiedSince":"x-amz-rename-source-if-unmodified-since"} }, S3ClientRequirement) +export const restoreObject = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":"p:Bucket","Key":"p:Key","RestoreRequest":"b:RestoreRequest","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) +export const selectObjectContent = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","InventoryTableConfiguration":"b:InventoryTableConfiguration"} }, S3ClientRequirement) +export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","JournalTableConfiguration":"b:JournalTableConfiguration"} }, S3ClientRequirement) +export const uploadPart = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":"b:undefined","Bucket":"p:Bucket","ContentLength":"Content-Length","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ChecksumCRC32":"x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-checksum-sha1","ChecksumSHA256":"x-amz-checksum-sha256","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) +export const uploadPartCopy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","CopySourceSSECustomerAlgorithm":"x-amz-copy-source-server-side-encryption-customer-algorithm","CopySourceSSECustomerKey":"x-amz-copy-source-server-side-encryption-customer-key","CopySourceSSECustomerKeyMD5":"x-amz-copy-source-server-side-encryption-customer-key-MD5","ExpectedSourceBucketOwner":"x-amz-source-expected-bucket-owner"} }, S3ClientRequirement) +export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":"b:undefined","StatusCode":"x-amz-fwd-status","ErrorCode":"x-amz-fwd-error-code","ErrorMessage":"x-amz-fwd-error-message","AcceptRanges":"x-amz-fwd-header-accept-ranges","CacheControl":"x-amz-fwd-header-Cache-Control","ContentDisposition":"x-amz-fwd-header-Content-Disposition","ContentEncoding":"x-amz-fwd-header-Content-Encoding","ContentLanguage":"x-amz-fwd-header-Content-Language","ContentLength":"Content-Length","ContentRange":"x-amz-fwd-header-Content-Range","ContentType":"x-amz-fwd-header-Content-Type","ChecksumCRC32":"x-amz-fwd-header-x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-fwd-header-x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-fwd-header-x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-fwd-header-x-amz-checksum-sha1","ChecksumSHA256":"x-amz-fwd-header-x-amz-checksum-sha256","DeleteMarker":"x-amz-fwd-header-x-amz-delete-marker","ETag":"x-amz-fwd-header-ETag","Expires":"x-amz-fwd-header-Expires","Expiration":"x-amz-fwd-header-x-amz-expiration","LastModified":"x-amz-fwd-header-Last-Modified","MissingMeta":"x-amz-fwd-header-x-amz-missing-meta","ObjectLockMode":"x-amz-fwd-header-x-amz-object-lock-mode","ObjectLockLegalHoldStatus":"x-amz-fwd-header-x-amz-object-lock-legal-hold","ObjectLockRetainUntilDate":"x-amz-fwd-header-x-amz-object-lock-retain-until-date","PartsCount":"x-amz-fwd-header-x-amz-mp-parts-count","ReplicationStatus":"x-amz-fwd-header-x-amz-replication-status","RequestCharged":"x-amz-fwd-header-x-amz-request-charged","Restore":"x-amz-fwd-header-x-amz-restore","ServerSideEncryption":"x-amz-fwd-header-x-amz-server-side-encryption","SSECustomerAlgorithm":"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm","SSEKMSKeyId":"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id","SSECustomerKeyMD5":"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5","StorageClass":"x-amz-fwd-header-x-amz-storage-class","TagCount":"x-amz-fwd-header-x-amz-tagging-count","VersionId":"x-amz-fwd-header-x-amz-version-id","BucketKeyEnabled":"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"} }, S3ClientRequirement) + +//==== Aliased Types ==== +type NoSuchUpload = {}; +type RequestCharged = "requester"; +type AbortMultipartUploadOutput = {RequestCharged?: RequestCharged}; +type RequestPayer = "requester"; +type AbortMultipartUploadRequest = {Bucket: string, Key: string, UploadId: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, IfMatchInitiatedTime?: Date | string}; +type ChecksumType = "COMPOSITE" | "FULL_OBJECT"; +type ServerSideEncryption = "AES256" | "aws:fsx" | "aws:kms" | "aws:kms:dsse"; +type CompleteMultipartUploadOutput = {Location?: string, Bucket?: string, Key?: string, Expiration?: string, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, ServerSideEncryption?: ServerSideEncryption, VersionId?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; +type CompletedPart = {ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, PartNumber?: number}; +type CompletedMultipartUpload = {Parts?: Array}; +type CompleteMultipartUploadRequest = {Bucket: string, Key: string, MultipartUpload?: CompletedMultipartUpload, UploadId: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, MpuObjectSize?: number, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, IfMatch?: string, IfNoneMatch?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string}; +type ObjectNotInActiveTierError = {}; +type CopyObjectResult = {ETag?: string, LastModified?: Date | string, ChecksumType?: ChecksumType, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; +type CopyObjectOutput = {CopyObjectResult?: CopyObjectResult, Expiration?: string, CopySourceVersionId?: string, VersionId?: string, ServerSideEncryption?: ServerSideEncryption, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; +type ObjectCannedACL = "private" | "public-read" | "public-read-write" | "authenticated-read" | "aws-exec-read" | "bucket-owner-read" | "bucket-owner-full-control"; +type ChecksumAlgorithm = "CRC32" | "CRC32C" | "SHA1" | "SHA256" | "CRC64NVME"; +type MetadataDirective = "COPY" | "REPLACE"; +type TaggingDirective = "COPY" | "REPLACE"; +type StorageClass = "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "GLACIER" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR" | "SNOW" | "EXPRESS_ONEZONE" | "FSX_OPENZFS"; +type ObjectLockMode = "GOVERNANCE" | "COMPLIANCE"; +type ObjectLockLegalHoldStatus = "ON" | "OFF"; +type Metadata = Record; +type CopyObjectRequest = {ACL?: ObjectCannedACL, Bucket: string, CacheControl?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentType?: string, CopySource: string, CopySourceIfMatch?: string, CopySourceIfModifiedSince?: Date | string, CopySourceIfNoneMatch?: string, CopySourceIfUnmodifiedSince?: Date | string, Expires?: string, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWriteACP?: string, IfMatch?: string, IfNoneMatch?: string, Key: string, Metadata?: Metadata, MetadataDirective?: MetadataDirective, TaggingDirective?: TaggingDirective, ServerSideEncryption?: ServerSideEncryption, StorageClass?: StorageClass, WebsiteRedirectLocation?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, CopySourceSSECustomerAlgorithm?: string, CopySourceSSECustomerKey?: string, CopySourceSSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, Tagging?: string, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus, ExpectedBucketOwner?: string, ExpectedSourceBucketOwner?: string}; +type BucketAlreadyExists = {}; +type BucketAlreadyOwnedByYou = {}; +type CreateBucketOutput = {Location?: string, BucketArn?: string}; +type BucketCannedACL = "private" | "public-read" | "public-read-write" | "authenticated-read"; +type ObjectOwnership = "BucketOwnerPreferred" | "ObjectWriter" | "BucketOwnerEnforced"; +type BucketLocationConstraint = "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "EU" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "il-central-1" | "me-central-1" | "me-south-1" | "sa-east-1" | "us-east-2" | "us-gov-east-1" | "us-gov-west-1" | "us-west-1" | "us-west-2"; +type LocationType = "AvailabilityZone" | "LocalZone"; +type DataRedundancy = "SingleAvailabilityZone" | "SingleLocalZone"; +type BucketType = "Directory"; +type LocationInfo = {Type?: LocationType, Name?: string}; +type BucketInfo = {DataRedundancy?: DataRedundancy, Type?: BucketType}; +type Tag = {Key: string, Value: string}; +type CreateBucketConfiguration = {LocationConstraint?: BucketLocationConstraint, Location?: LocationInfo, Bucket?: BucketInfo, Tags?: Array}; +type CreateBucketRequest = {ACL?: BucketCannedACL, Bucket: string, CreateBucketConfiguration?: CreateBucketConfiguration, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWrite?: string, GrantWriteACP?: string, ObjectLockEnabledForBucket?: boolean, ObjectOwnership?: ObjectOwnership}; +type CreateMultipartUploadOutput = {AbortDate?: Date | string, AbortRuleId?: string, Bucket?: string, Key?: string, UploadId?: string, ServerSideEncryption?: ServerSideEncryption, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; +type CreateMultipartUploadRequest = {ACL?: ObjectCannedACL, Bucket: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentType?: string, Expires?: string, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWriteACP?: string, Key: string, Metadata?: Metadata, ServerSideEncryption?: ServerSideEncryption, StorageClass?: StorageClass, WebsiteRedirectLocation?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestPayer?: RequestPayer, Tagging?: string, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus, ExpectedBucketOwner?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; +type NoSuchBucket = {}; +type SessionCredentials = {AccessKeyId: string, SecretAccessKey: string, SessionToken: string, Expiration: Date | string}; +type CreateSessionOutput = {ServerSideEncryption?: ServerSideEncryption, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, Credentials: SessionCredentials}; +type SessionMode = "ReadOnly" | "ReadWrite"; +type CreateSessionRequest = {SessionMode?: SessionMode, Bucket: string, ServerSideEncryption?: ServerSideEncryption, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean}; +type DeleteObjectOutput = {DeleteMarker?: boolean, VersionId?: string, RequestCharged?: RequestCharged}; +type DeleteObjectRequest = {Bucket: string, Key: string, MFA?: string, VersionId?: string, RequestPayer?: RequestPayer, BypassGovernanceRetention?: boolean, ExpectedBucketOwner?: string, IfMatch?: string, IfMatchLastModifiedTime?: Date | string, IfMatchSize?: number}; +type DeletedObject = {Key?: string, VersionId?: string, DeleteMarker?: boolean, DeleteMarkerVersionId?: string}; +type Error = {Key?: string, VersionId?: string, Code?: string, Message?: string}; +type DeleteObjectsOutput = {Deleted?: Array, RequestCharged?: RequestCharged, Errors?: Array}; +type ObjectIdentifier = {Key: string, VersionId?: string, ETag?: string, LastModifiedTime?: Date | string, Size?: number}; +type Delete = {Objects: Array, Quiet?: boolean}; +type DeleteObjectsRequest = {Bucket: string, Delete: Delete, MFA?: string, RequestPayer?: RequestPayer, BypassGovernanceRetention?: boolean, ExpectedBucketOwner?: string, ChecksumAlgorithm?: ChecksumAlgorithm}; +type DeleteObjectTaggingOutput = {VersionId?: string}; +type DeleteObjectTaggingRequest = {Bucket: string, Key: string, VersionId?: string, ExpectedBucketOwner?: string}; +type BucketAccelerateStatus = "Enabled" | "Suspended"; +type GetBucketAccelerateConfigurationOutput = {Status?: BucketAccelerateStatus, RequestCharged?: RequestCharged}; +type GetBucketAccelerateConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; +type Permission = "FULL_CONTROL" | "WRITE" | "WRITE_ACP" | "READ" | "READ_ACP"; +type Owner = {DisplayName?: string, ID?: string}; +type Type = "CanonicalUser" | "AmazonCustomerByEmail" | "Group"; +type Grantee = {DisplayName?: string, EmailAddress?: string, ID?: string, URI?: string, Type: Type}; +type Grant = {Grantee?: Grantee, Permission?: Permission}; +type GetBucketAclOutput = {Owner?: Owner, Grants?: Array}; +type GetBucketAclRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type StorageClassAnalysisSchemaVersion = "V_1"; +type AnalyticsS3ExportFileFormat = "CSV"; +type AnalyticsAndOperator = {Prefix?: string, Tags?: Array}; +type AnalyticsS3BucketDestination = {Format: AnalyticsS3ExportFileFormat, BucketAccountId?: string, Bucket: string, Prefix?: string}; +type AnalyticsFilter = string | Tag | AnalyticsAndOperator; +type AnalyticsExportDestination = {S3BucketDestination: AnalyticsS3BucketDestination}; +type StorageClassAnalysisDataExport = {OutputSchemaVersion: StorageClassAnalysisSchemaVersion, Destination: AnalyticsExportDestination}; +type StorageClassAnalysis = {DataExport?: StorageClassAnalysisDataExport}; +type AnalyticsConfiguration = {Id: string, Filter?: AnalyticsFilter, StorageClassAnalysis: StorageClassAnalysis}; +type GetBucketAnalyticsConfigurationOutput = {AnalyticsConfiguration?: AnalyticsConfiguration}; +type GetBucketAnalyticsConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; +type CORSRule = {ID?: string, AllowedHeaders?: Array, AllowedMethods: Array, AllowedOrigins: Array, ExposeHeaders?: Array, MaxAgeSeconds?: number}; +type GetBucketCorsOutput = {CORSRules?: Array}; +type GetBucketCorsRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type ServerSideEncryptionByDefault = {SSEAlgorithm: ServerSideEncryption, KMSMasterKeyID?: string}; +type ServerSideEncryptionRule = {ApplyServerSideEncryptionByDefault?: ServerSideEncryptionByDefault, BucketKeyEnabled?: boolean}; +type ServerSideEncryptionConfiguration = {Rules: Array}; +type GetBucketEncryptionOutput = {ServerSideEncryptionConfiguration?: ServerSideEncryptionConfiguration}; +type GetBucketEncryptionRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type IntelligentTieringStatus = "Enabled" | "Disabled"; +type IntelligentTieringAccessTier = "ARCHIVE_ACCESS" | "DEEP_ARCHIVE_ACCESS"; +type Tiering = {Days: number, AccessTier: IntelligentTieringAccessTier}; +type IntelligentTieringAndOperator = {Prefix?: string, Tags?: Array}; +type IntelligentTieringFilter = {Prefix?: string, Tag?: Tag, And?: IntelligentTieringAndOperator}; +type IntelligentTieringConfiguration = {Id: string, Filter?: IntelligentTieringFilter, Status: IntelligentTieringStatus, Tierings: Array}; +type GetBucketIntelligentTieringConfigurationOutput = {IntelligentTieringConfiguration?: IntelligentTieringConfiguration}; +type GetBucketIntelligentTieringConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; +type InventoryIncludedObjectVersions = "All" | "Current"; +type InventoryOptionalField = "Size" | "LastModifiedDate" | "StorageClass" | "ETag" | "IsMultipartUploaded" | "ReplicationStatus" | "EncryptionStatus" | "ObjectLockRetainUntilDate" | "ObjectLockMode" | "ObjectLockLegalHoldStatus" | "IntelligentTieringAccessTier" | "BucketKeyStatus" | "ChecksumAlgorithm" | "ObjectAccessControlList" | "ObjectOwner"; +type InventoryFrequency = "Daily" | "Weekly"; +type InventoryFilter = {Prefix: string}; +type InventorySchedule = {Frequency: InventoryFrequency}; +type InventoryFormat = "CSV" | "ORC" | "Parquet"; +type SSES3 = {}; +type SSEKMS = {KeyId: string}; +type InventoryEncryption = {SSES3?: SSES3, SSEKMS?: SSEKMS}; +type InventoryS3BucketDestination = {AccountId?: string, Bucket: string, Format: InventoryFormat, Prefix?: string, Encryption?: InventoryEncryption}; +type InventoryDestination = {S3BucketDestination: InventoryS3BucketDestination}; +type InventoryConfiguration = {Destination: InventoryDestination, IsEnabled: boolean, Filter?: InventoryFilter, Id: string, IncludedObjectVersions: InventoryIncludedObjectVersions, OptionalFields?: Array, Schedule: InventorySchedule}; +type GetBucketInventoryConfigurationOutput = {InventoryConfiguration?: InventoryConfiguration}; +type GetBucketInventoryConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; +type TransitionDefaultMinimumObjectSize = "varies_by_storage_class" | "all_storage_classes_128K"; +type ExpirationStatus = "Enabled" | "Disabled"; +type TransitionStorageClass = "GLACIER" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "DEEP_ARCHIVE" | "GLACIER_IR"; +type LifecycleExpiration = {Date?: Date | string, Days?: number, ExpiredObjectDeleteMarker?: boolean}; +type Transition = {Date?: Date | string, Days?: number, StorageClass?: TransitionStorageClass}; +type NoncurrentVersionTransition = {NoncurrentDays?: number, StorageClass?: TransitionStorageClass, NewerNoncurrentVersions?: number}; +type NoncurrentVersionExpiration = {NoncurrentDays?: number, NewerNoncurrentVersions?: number}; +type AbortIncompleteMultipartUpload = {DaysAfterInitiation?: number}; +type LifecycleRuleAndOperator = {Prefix?: string, Tags?: Array, ObjectSizeGreaterThan?: number, ObjectSizeLessThan?: number}; +type LifecycleRuleFilter = {Prefix?: string, Tag?: Tag, ObjectSizeGreaterThan?: number, ObjectSizeLessThan?: number, And?: LifecycleRuleAndOperator}; +type LifecycleRule = {Expiration?: LifecycleExpiration, ID?: string, Prefix?: string, Filter?: LifecycleRuleFilter, Status: ExpirationStatus, Transitions?: Array, NoncurrentVersionTransitions?: Array, NoncurrentVersionExpiration?: NoncurrentVersionExpiration, AbortIncompleteMultipartUpload?: AbortIncompleteMultipartUpload}; +type GetBucketLifecycleConfigurationOutput = {Rules?: Array, TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize}; +type GetBucketLifecycleConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type GetBucketLocationOutput = {LocationConstraint?: BucketLocationConstraint}; +type GetBucketLocationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type BucketLogsPermission = "FULL_CONTROL" | "READ" | "WRITE"; +type SimplePrefix = {}; +type PartitionDateSource = "EventTime" | "DeliveryTime"; +type PartitionedPrefix = {PartitionDateSource?: PartitionDateSource}; +type TargetGrant = {Grantee?: Grantee, Permission?: BucketLogsPermission}; +type TargetObjectKeyFormat = {SimplePrefix?: SimplePrefix, PartitionedPrefix?: PartitionedPrefix}; +type LoggingEnabled = {TargetBucket: string, TargetGrants?: Array, TargetPrefix: string, TargetObjectKeyFormat?: TargetObjectKeyFormat}; +type GetBucketLoggingOutput = {LoggingEnabled?: LoggingEnabled}; +type GetBucketLoggingRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type S3TablesBucketType = "aws" | "customer"; +type InventoryConfigurationState = "ENABLED" | "DISABLED"; +type DestinationResult = {TableBucketType?: S3TablesBucketType, TableBucketArn?: string, TableNamespace?: string}; +type ExpirationState = "ENABLED" | "DISABLED"; +type ErrorDetails = {ErrorCode?: string, ErrorMessage?: string}; +type RecordExpiration = {Expiration: ExpirationState, Days?: number}; +type JournalTableConfigurationResult = {TableStatus: string, Error?: ErrorDetails, TableName: string, TableArn?: string, RecordExpiration: RecordExpiration}; +type InventoryTableConfigurationResult = {ConfigurationState: InventoryConfigurationState, TableStatus?: string, Error?: ErrorDetails, TableName?: string, TableArn?: string}; +type MetadataConfigurationResult = {DestinationResult: DestinationResult, JournalTableConfigurationResult?: JournalTableConfigurationResult, InventoryTableConfigurationResult?: InventoryTableConfigurationResult}; +type GetBucketMetadataConfigurationResult = {MetadataConfigurationResult: MetadataConfigurationResult}; +type GetBucketMetadataConfigurationOutput = {GetBucketMetadataConfigurationResult?: GetBucketMetadataConfigurationResult}; +type GetBucketMetadataConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type S3TablesDestinationResult = {TableBucketArn: string, TableName: string, TableArn: string, TableNamespace: string}; +type MetadataTableConfigurationResult = {S3TablesDestinationResult: S3TablesDestinationResult}; +type GetBucketMetadataTableConfigurationResult = {MetadataTableConfigurationResult: MetadataTableConfigurationResult, Status: string, Error?: ErrorDetails}; +type GetBucketMetadataTableConfigurationOutput = {GetBucketMetadataTableConfigurationResult?: GetBucketMetadataTableConfigurationResult}; +type GetBucketMetadataTableConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type MetricsAndOperator = {Prefix?: string, Tags?: Array, AccessPointArn?: string}; +type MetricsFilter = string | Tag | string | MetricsAndOperator; +type MetricsConfiguration = {Id: string, Filter?: MetricsFilter}; +type GetBucketMetricsConfigurationOutput = {MetricsConfiguration?: MetricsConfiguration}; +type GetBucketMetricsConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; +type EventBridgeConfiguration = {}; +type Event = "s3:ReducedRedundancyLostObject" | "s3:ObjectCreated:*" | "s3:ObjectCreated:Put" | "s3:ObjectCreated:Post" | "s3:ObjectCreated:Copy" | "s3:ObjectCreated:CompleteMultipartUpload" | "s3:ObjectRemoved:*" | "s3:ObjectRemoved:Delete" | "s3:ObjectRemoved:DeleteMarkerCreated" | "s3:ObjectRestore:*" | "s3:ObjectRestore:Post" | "s3:ObjectRestore:Completed" | "s3:Replication:*" | "s3:Replication:OperationFailedReplication" | "s3:Replication:OperationNotTracked" | "s3:Replication:OperationMissedThreshold" | "s3:Replication:OperationReplicatedAfterThreshold" | "s3:ObjectRestore:Delete" | "s3:LifecycleTransition" | "s3:IntelligentTiering" | "s3:ObjectAcl:Put" | "s3:LifecycleExpiration:*" | "s3:LifecycleExpiration:Delete" | "s3:LifecycleExpiration:DeleteMarkerCreated" | "s3:ObjectTagging:*" | "s3:ObjectTagging:Put" | "s3:ObjectTagging:Delete"; +type FilterRuleName = "prefix" | "suffix"; +type FilterRule = {Name?: FilterRuleName, Value?: string}; +type S3KeyFilter = {FilterRules?: Array}; +type NotificationConfigurationFilter = {Key?: S3KeyFilter}; +type TopicConfiguration = {Id?: string, TopicArn: string, Events: Array, Filter?: NotificationConfigurationFilter}; +type QueueConfiguration = {Id?: string, QueueArn: string, Events: Array, Filter?: NotificationConfigurationFilter}; +type LambdaFunctionConfiguration = {Id?: string, LambdaFunctionArn: string, Events: Array, Filter?: NotificationConfigurationFilter}; +type NotificationConfiguration = {TopicConfigurations?: Array, QueueConfigurations?: Array, LambdaFunctionConfigurations?: Array, EventBridgeConfiguration?: EventBridgeConfiguration}; +type GetBucketNotificationConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type OwnershipControlsRule = {ObjectOwnership: ObjectOwnership}; +type OwnershipControls = {Rules: Array}; +type GetBucketOwnershipControlsOutput = {OwnershipControls?: OwnershipControls}; +type GetBucketOwnershipControlsRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type GetBucketPolicyOutput = {Policy?: string}; +type GetBucketPolicyRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type PolicyStatus = {IsPublic?: boolean}; +type GetBucketPolicyStatusOutput = {PolicyStatus?: PolicyStatus}; +type GetBucketPolicyStatusRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type ReplicationRuleStatus = "Enabled" | "Disabled"; +type ExistingObjectReplicationStatus = "Enabled" | "Disabled"; +type DeleteMarkerReplicationStatus = "Enabled" | "Disabled"; +type ExistingObjectReplication = {Status: ExistingObjectReplicationStatus}; +type DeleteMarkerReplication = {Status?: DeleteMarkerReplicationStatus}; +type SseKmsEncryptedObjectsStatus = "Enabled" | "Disabled"; +type ReplicaModificationsStatus = "Enabled" | "Disabled"; +type OwnerOverride = "Destination"; +type ReplicationTimeStatus = "Enabled" | "Disabled"; +type MetricsStatus = "Enabled" | "Disabled"; +type SseKmsEncryptedObjects = {Status: SseKmsEncryptedObjectsStatus}; +type ReplicaModifications = {Status: ReplicaModificationsStatus}; +type AccessControlTranslation = {Owner: OwnerOverride}; +type EncryptionConfiguration = {ReplicaKmsKeyID?: string}; +type SourceSelectionCriteria = {SseKmsEncryptedObjects?: SseKmsEncryptedObjects, ReplicaModifications?: ReplicaModifications}; +type ReplicationTimeValue = {Minutes?: number}; +type ReplicationRuleAndOperator = {Prefix?: string, Tags?: Array}; +type ReplicationTime = {Status: ReplicationTimeStatus, Time: ReplicationTimeValue}; +type Metrics = {Status: MetricsStatus, EventThreshold?: ReplicationTimeValue}; +type ReplicationRuleFilter = {Prefix?: string, Tag?: Tag, And?: ReplicationRuleAndOperator}; +type Destination = {Bucket: string, Account?: string, StorageClass?: StorageClass, AccessControlTranslation?: AccessControlTranslation, EncryptionConfiguration?: EncryptionConfiguration, ReplicationTime?: ReplicationTime, Metrics?: Metrics}; +type ReplicationRule = {ID?: string, Priority?: number, Prefix?: string, Filter?: ReplicationRuleFilter, Status: ReplicationRuleStatus, SourceSelectionCriteria?: SourceSelectionCriteria, ExistingObjectReplication?: ExistingObjectReplication, Destination: Destination, DeleteMarkerReplication?: DeleteMarkerReplication}; +type ReplicationConfiguration = {Role: string, Rules: Array}; +type GetBucketReplicationOutput = {ReplicationConfiguration?: ReplicationConfiguration}; +type GetBucketReplicationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type Payer = "Requester" | "BucketOwner"; +type GetBucketRequestPaymentOutput = {Payer?: Payer}; +type GetBucketRequestPaymentRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type GetBucketTaggingOutput = {TagSet: Array}; +type GetBucketTaggingRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type BucketVersioningStatus = "Enabled" | "Suspended"; +type MFADeleteStatus = "Enabled" | "Disabled"; +type GetBucketVersioningOutput = {Status?: BucketVersioningStatus, MFADelete?: MFADeleteStatus}; +type GetBucketVersioningRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type Protocol = "http" | "https"; +type RedirectAllRequestsTo = {HostName: string, Protocol?: Protocol}; +type IndexDocument = {Suffix: string}; +type ErrorDocument = {Key: string}; +type Condition = {HttpErrorCodeReturnedEquals?: string, KeyPrefixEquals?: string}; +type Redirect = {HostName?: string, HttpRedirectCode?: string, Protocol?: Protocol, ReplaceKeyPrefixWith?: string, ReplaceKeyWith?: string}; +type RoutingRule = {Condition?: Condition, Redirect: Redirect}; +type GetBucketWebsiteOutput = {RedirectAllRequestsTo?: RedirectAllRequestsTo, IndexDocument?: IndexDocument, ErrorDocument?: ErrorDocument, RoutingRules?: Array}; +type GetBucketWebsiteRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type InvalidObjectState = {StorageClass?: StorageClass, AccessTier?: IntelligentTieringAccessTier}; +type NoSuchKey = {}; +type ReplicationStatus = "COMPLETE" | "PENDING" | "FAILED" | "REPLICA" | "COMPLETED"; +type GetObjectOutput = {Body?: Uint8Array, DeleteMarker?: boolean, AcceptRanges?: string, Expiration?: string, Restore?: string, LastModified?: Date | string, ContentLength?: number, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, MissingMeta?: number, VersionId?: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentRange?: string, ContentType?: string, Expires?: string, WebsiteRedirectLocation?: string, ServerSideEncryption?: ServerSideEncryption, Metadata?: Metadata, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, StorageClass?: StorageClass, RequestCharged?: RequestCharged, ReplicationStatus?: ReplicationStatus, PartsCount?: number, TagCount?: number, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus}; +type ChecksumMode = "ENABLED"; +type GetObjectRequest = {Bucket: string, IfMatch?: string, IfModifiedSince?: Date | string, IfNoneMatch?: string, IfUnmodifiedSince?: Date | string, Key: string, Range?: string, ResponseCacheControl?: string, ResponseContentDisposition?: string, ResponseContentEncoding?: string, ResponseContentLanguage?: string, ResponseContentType?: string, ResponseExpires?: Date | string, VersionId?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, PartNumber?: number, ExpectedBucketOwner?: string, ChecksumMode?: ChecksumMode}; +type GetObjectAclOutput = {Owner?: Owner, Grants?: Array, RequestCharged?: RequestCharged}; +type GetObjectAclRequest = {Bucket: string, Key: string, VersionId?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; +type Checksum = {ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType}; +type ObjectPart = {PartNumber?: number, Size?: number, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; +type GetObjectAttributesParts = {TotalPartsCount?: number, PartNumberMarker?: string, NextPartNumberMarker?: string, MaxParts?: number, IsTruncated?: boolean, Parts?: Array}; +type GetObjectAttributesOutput = {DeleteMarker?: boolean, LastModified?: Date | string, VersionId?: string, RequestCharged?: RequestCharged, ETag?: string, Checksum?: Checksum, ObjectParts?: GetObjectAttributesParts, StorageClass?: StorageClass, ObjectSize?: number}; +type ObjectAttributes = "ETag" | "Checksum" | "ObjectParts" | "StorageClass" | "ObjectSize"; +type GetObjectAttributesRequest = {Bucket: string, Key: string, VersionId?: string, MaxParts?: number, PartNumberMarker?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, ObjectAttributes: Array}; +type ObjectLockLegalHold = {Status?: ObjectLockLegalHoldStatus}; +type GetObjectLegalHoldOutput = {LegalHold?: ObjectLockLegalHold}; +type GetObjectLegalHoldRequest = {Bucket: string, Key: string, VersionId?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; +type ObjectLockEnabled = "Enabled"; +type ObjectLockRetentionMode = "GOVERNANCE" | "COMPLIANCE"; +type DefaultRetention = {Mode?: ObjectLockRetentionMode, Days?: number, Years?: number}; +type ObjectLockRule = {DefaultRetention?: DefaultRetention}; +type ObjectLockConfiguration = {ObjectLockEnabled?: ObjectLockEnabled, Rule?: ObjectLockRule}; +type GetObjectLockConfigurationOutput = {ObjectLockConfiguration?: ObjectLockConfiguration}; +type GetObjectLockConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type ObjectLockRetention = {Mode?: ObjectLockRetentionMode, RetainUntilDate?: Date | string}; +type GetObjectRetentionOutput = {Retention?: ObjectLockRetention}; +type GetObjectRetentionRequest = {Bucket: string, Key: string, VersionId?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; +type GetObjectTaggingOutput = {VersionId?: string, TagSet: Array}; +type GetObjectTaggingRequest = {Bucket: string, Key: string, VersionId?: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; +type GetObjectTorrentOutput = {Body?: Uint8Array, RequestCharged?: RequestCharged}; +type GetObjectTorrentRequest = {Bucket: string, Key: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; +type PublicAccessBlockConfiguration = {BlockPublicAcls?: boolean, IgnorePublicAcls?: boolean, BlockPublicPolicy?: boolean, RestrictPublicBuckets?: boolean}; +type GetPublicAccessBlockOutput = {PublicAccessBlockConfiguration?: PublicAccessBlockConfiguration}; +type GetPublicAccessBlockRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type NotFound = {}; +type HeadBucketOutput = {BucketArn?: string, BucketLocationType?: LocationType, BucketLocationName?: string, BucketRegion?: string, AccessPointAlias?: boolean}; +type HeadBucketRequest = {Bucket: string, ExpectedBucketOwner?: string}; +type ArchiveStatus = "ARCHIVE_ACCESS" | "DEEP_ARCHIVE_ACCESS"; +type HeadObjectOutput = {DeleteMarker?: boolean, AcceptRanges?: string, Expiration?: string, Restore?: string, ArchiveStatus?: ArchiveStatus, LastModified?: Date | string, ContentLength?: number, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, ETag?: string, MissingMeta?: number, VersionId?: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentType?: string, ContentRange?: string, Expires?: string, WebsiteRedirectLocation?: string, ServerSideEncryption?: ServerSideEncryption, Metadata?: Metadata, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, StorageClass?: StorageClass, RequestCharged?: RequestCharged, ReplicationStatus?: ReplicationStatus, PartsCount?: number, TagCount?: number, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus}; +type HeadObjectRequest = {Bucket: string, IfMatch?: string, IfModifiedSince?: Date | string, IfNoneMatch?: string, IfUnmodifiedSince?: Date | string, Key: string, Range?: string, ResponseCacheControl?: string, ResponseContentDisposition?: string, ResponseContentEncoding?: string, ResponseContentLanguage?: string, ResponseContentType?: string, ResponseExpires?: Date | string, VersionId?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, PartNumber?: number, ExpectedBucketOwner?: string, ChecksumMode?: ChecksumMode}; +type ListBucketAnalyticsConfigurationsOutput = {IsTruncated?: boolean, ContinuationToken?: string, NextContinuationToken?: string, AnalyticsConfigurationList?: Array}; +type ListBucketAnalyticsConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; +type ListBucketIntelligentTieringConfigurationsOutput = {IsTruncated?: boolean, ContinuationToken?: string, NextContinuationToken?: string, IntelligentTieringConfigurationList?: Array}; +type ListBucketIntelligentTieringConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; +type ListBucketInventoryConfigurationsOutput = {ContinuationToken?: string, InventoryConfigurationList?: Array, IsTruncated?: boolean, NextContinuationToken?: string}; +type ListBucketInventoryConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; +type ListBucketMetricsConfigurationsOutput = {IsTruncated?: boolean, ContinuationToken?: string, NextContinuationToken?: string, MetricsConfigurationList?: Array}; +type ListBucketMetricsConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; +type Bucket = {Name?: string, CreationDate?: Date | string, BucketRegion?: string, BucketArn?: string}; +type ListBucketsOutput = {Buckets?: Array, Owner?: Owner, ContinuationToken?: string, Prefix?: string}; +type ListBucketsRequest = {MaxBuckets?: number, ContinuationToken?: string, Prefix?: string, BucketRegion?: string}; +type ListDirectoryBucketsOutput = {Buckets?: Array, ContinuationToken?: string}; +type ListDirectoryBucketsRequest = {ContinuationToken?: string, MaxDirectoryBuckets?: number}; +type EncodingType = "url"; +type CommonPrefix = {Prefix?: string}; +type Initiator = {ID?: string, DisplayName?: string}; +type MultipartUpload = {UploadId?: string, Key?: string, Initiated?: Date | string, StorageClass?: StorageClass, Owner?: Owner, Initiator?: Initiator, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; +type ListMultipartUploadsOutput = {Bucket?: string, KeyMarker?: string, UploadIdMarker?: string, NextKeyMarker?: string, Prefix?: string, Delimiter?: string, NextUploadIdMarker?: string, MaxUploads?: number, IsTruncated?: boolean, Uploads?: Array, CommonPrefixes?: Array, EncodingType?: EncodingType, RequestCharged?: RequestCharged}; +type ListMultipartUploadsRequest = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, KeyMarker?: string, MaxUploads?: number, Prefix?: string, UploadIdMarker?: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; +type ObjectStorageClass = "STANDARD" | "REDUCED_REDUNDANCY" | "GLACIER" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR" | "SNOW" | "EXPRESS_ONEZONE" | "FSX_OPENZFS"; +type RestoreStatus = {IsRestoreInProgress?: boolean, RestoreExpiryDate?: Date | string}; +type Object = {Key?: string, LastModified?: Date | string, ETag?: string, ChecksumAlgorithm?: Array, ChecksumType?: ChecksumType, Size?: number, StorageClass?: ObjectStorageClass, Owner?: Owner, RestoreStatus?: RestoreStatus}; +type ListObjectsOutput = {IsTruncated?: boolean, Marker?: string, NextMarker?: string, Contents?: Array, Name?: string, Prefix?: string, Delimiter?: string, MaxKeys?: number, CommonPrefixes?: Array, EncodingType?: EncodingType, RequestCharged?: RequestCharged}; +type OptionalObjectAttributes = "RestoreStatus"; +type ListObjectsRequest = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, Marker?: string, MaxKeys?: number, Prefix?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, OptionalObjectAttributes?: Array}; +type ListObjectsV2Output = {IsTruncated?: boolean, Contents?: Array, Name?: string, Prefix?: string, Delimiter?: string, MaxKeys?: number, CommonPrefixes?: Array, EncodingType?: EncodingType, KeyCount?: number, ContinuationToken?: string, NextContinuationToken?: string, StartAfter?: string, RequestCharged?: RequestCharged}; +type ListObjectsV2Request = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, MaxKeys?: number, Prefix?: string, ContinuationToken?: string, FetchOwner?: boolean, StartAfter?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, OptionalObjectAttributes?: Array}; +type ObjectVersionStorageClass = "STANDARD"; +type ObjectVersion = {ETag?: string, ChecksumAlgorithm?: Array, ChecksumType?: ChecksumType, Size?: number, StorageClass?: ObjectVersionStorageClass, Key?: string, VersionId?: string, IsLatest?: boolean, LastModified?: Date | string, Owner?: Owner, RestoreStatus?: RestoreStatus}; +type DeleteMarkerEntry = {Owner?: Owner, Key?: string, VersionId?: string, IsLatest?: boolean, LastModified?: Date | string}; +type ListObjectVersionsOutput = {IsTruncated?: boolean, KeyMarker?: string, VersionIdMarker?: string, NextKeyMarker?: string, NextVersionIdMarker?: string, Versions?: Array, DeleteMarkers?: Array, Name?: string, Prefix?: string, Delimiter?: string, MaxKeys?: number, CommonPrefixes?: Array, EncodingType?: EncodingType, RequestCharged?: RequestCharged}; +type ListObjectVersionsRequest = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, KeyMarker?: string, MaxKeys?: number, Prefix?: string, VersionIdMarker?: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer, OptionalObjectAttributes?: Array}; +type Part = {PartNumber?: number, LastModified?: Date | string, ETag?: string, Size?: number, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; +type ListPartsOutput = {AbortDate?: Date | string, AbortRuleId?: string, Bucket?: string, Key?: string, UploadId?: string, PartNumberMarker?: string, NextPartNumberMarker?: string, MaxParts?: number, IsTruncated?: boolean, Parts?: Array, Initiator?: Initiator, Owner?: Owner, StorageClass?: StorageClass, RequestCharged?: RequestCharged, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; +type ListPartsRequest = {Bucket: string, Key: string, MaxParts?: number, PartNumberMarker?: string, UploadId: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string}; +type PutBucketLifecycleConfigurationOutput = {TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize}; +type BucketLifecycleConfiguration = {Rules: Array}; +type PutBucketLifecycleConfigurationRequest = {Bucket: string, ChecksumAlgorithm?: ChecksumAlgorithm, LifecycleConfiguration?: BucketLifecycleConfiguration, ExpectedBucketOwner?: string, TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize}; +type EncryptionTypeMismatch = {}; +type InvalidRequest = {}; +type InvalidWriteOffset = {}; +type TooManyParts = {}; +type PutObjectOutput = {Expiration?: string, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, ServerSideEncryption?: ServerSideEncryption, VersionId?: string, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, Size?: number, RequestCharged?: RequestCharged}; +type PutObjectRequest = {ACL?: ObjectCannedACL, Body?: Uint8Array, Bucket: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentLength?: number, ContentMD5?: string, ContentType?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, Expires?: string, IfMatch?: string, IfNoneMatch?: string, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWriteACP?: string, Key: string, WriteOffsetBytes?: number, Metadata?: Metadata, ServerSideEncryption?: ServerSideEncryption, StorageClass?: StorageClass, WebsiteRedirectLocation?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestPayer?: RequestPayer, Tagging?: string, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus, ExpectedBucketOwner?: string}; +type PutObjectAclOutput = {RequestCharged?: RequestCharged}; +type AccessControlPolicy = {Grants?: Array, Owner?: Owner}; +type PutObjectAclRequest = {ACL?: ObjectCannedACL, AccessControlPolicy?: AccessControlPolicy, Bucket: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWrite?: string, GrantWriteACP?: string, Key: string, RequestPayer?: RequestPayer, VersionId?: string, ExpectedBucketOwner?: string}; +type PutObjectLegalHoldOutput = {RequestCharged?: RequestCharged}; +type PutObjectLegalHoldRequest = {Bucket: string, Key: string, LegalHold?: ObjectLockLegalHold, RequestPayer?: RequestPayer, VersionId?: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; +type PutObjectLockConfigurationOutput = {RequestCharged?: RequestCharged}; +type PutObjectLockConfigurationRequest = {Bucket: string, ObjectLockConfiguration?: ObjectLockConfiguration, RequestPayer?: RequestPayer, Token?: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; +type PutObjectRetentionOutput = {RequestCharged?: RequestCharged}; +type PutObjectRetentionRequest = {Bucket: string, Key: string, Retention?: ObjectLockRetention, RequestPayer?: RequestPayer, VersionId?: string, BypassGovernanceRetention?: boolean, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; +type PutObjectTaggingOutput = {VersionId?: string}; +type Tagging = {TagSet: Array}; +type PutObjectTaggingRequest = {Bucket: string, Key: string, VersionId?: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, Tagging: Tagging, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; +type IdempotencyParameterMismatch = {}; +type RenameObjectOutput = {}; +type RenameObjectRequest = {Bucket: string, Key: string, RenameSource: string, DestinationIfMatch?: string, DestinationIfNoneMatch?: string, DestinationIfModifiedSince?: Date | string, DestinationIfUnmodifiedSince?: Date | string, SourceIfMatch?: string, SourceIfNoneMatch?: string, SourceIfModifiedSince?: Date | string, SourceIfUnmodifiedSince?: Date | string, ClientToken?: string}; +type ObjectAlreadyInActiveTierError = {}; +type RestoreObjectOutput = {RequestCharged?: RequestCharged, RestoreOutputPath?: string}; +type RestoreRequestType = "SELECT"; +type Tier = "Standard" | "Bulk" | "Expedited"; +type ExpressionType = "SQL"; +type GlacierJobParameters = {Tier: Tier}; +type CompressionType = "NONE" | "GZIP" | "BZIP2"; +type ParquetInput = {}; +type FileHeaderInfo = "USE" | "IGNORE" | "NONE"; +type JSONType = "DOCUMENT" | "LINES"; +type QuoteFields = "ALWAYS" | "ASNEEDED"; +type CSVInput = {FileHeaderInfo?: FileHeaderInfo, Comments?: string, QuoteEscapeCharacter?: string, RecordDelimiter?: string, FieldDelimiter?: string, QuoteCharacter?: string, AllowQuotedRecordDelimiter?: boolean}; +type JSONInput = {Type?: JSONType}; +type CSVOutput = {QuoteFields?: QuoteFields, QuoteEscapeCharacter?: string, RecordDelimiter?: string, FieldDelimiter?: string, QuoteCharacter?: string}; +type JSONOutput = {RecordDelimiter?: string}; +type Encryption = {EncryptionType: ServerSideEncryption, KMSKeyId?: string, KMSContext?: string}; +type MetadataEntry = {Name?: string, Value?: string}; +type InputSerialization = {CSV?: CSVInput, CompressionType?: CompressionType, JSON?: JSONInput, Parquet?: ParquetInput}; +type OutputSerialization = {CSV?: CSVOutput, JSON?: JSONOutput}; +type SelectParameters = {InputSerialization: InputSerialization, ExpressionType: ExpressionType, Expression: string, OutputSerialization: OutputSerialization}; +type S3Location = {BucketName: string, Prefix: string, Encryption?: Encryption, CannedACL?: ObjectCannedACL, AccessControlList?: Array, Tagging?: Tagging, UserMetadata?: Array, StorageClass?: StorageClass}; +type OutputLocation = {S3?: S3Location}; +type RestoreRequest = {Days?: number, GlacierJobParameters?: GlacierJobParameters, Type?: RestoreRequestType, Tier?: Tier, Description?: string, SelectParameters?: SelectParameters, OutputLocation?: OutputLocation}; +type RestoreObjectRequest = {Bucket: string, Key: string, VersionId?: string, RestoreRequest?: RestoreRequest, RequestPayer?: RequestPayer, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; +type ContinuationEvent = {}; +type EndEvent = {}; +type RecordsEvent = {Payload?: Uint8Array}; +type Stats = {BytesScanned?: number, BytesProcessed?: number, BytesReturned?: number}; +type Progress = {BytesScanned?: number, BytesProcessed?: number, BytesReturned?: number}; +type StatsEvent = {Details?: Stats}; +type ProgressEvent = {Details?: Progress}; +type SelectObjectContentEventStream = RecordsEvent | StatsEvent | ProgressEvent | ContinuationEvent | EndEvent; +type SelectObjectContentOutput = {Payload?: SelectObjectContentEventStream}; +type RequestProgress = {Enabled?: boolean}; +type ScanRange = {Start?: number, End?: number}; +type SelectObjectContentRequest = {Bucket: string, Key: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, Expression: string, ExpressionType: ExpressionType, RequestProgress?: RequestProgress, InputSerialization: InputSerialization, OutputSerialization: OutputSerialization, ScanRange?: ScanRange, ExpectedBucketOwner?: string}; +type UploadPartOutput = {ServerSideEncryption?: ServerSideEncryption, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; +type UploadPartRequest = {Body?: Uint8Array, Bucket: string, ContentLength?: number, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, Key: string, PartNumber: number, UploadId: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; +type CopyPartResult = {ETag?: string, LastModified?: Date | string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; +type UploadPartCopyOutput = {CopySourceVersionId?: string, CopyPartResult?: CopyPartResult, ServerSideEncryption?: ServerSideEncryption, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; +type UploadPartCopyRequest = {Bucket: string, CopySource: string, CopySourceIfMatch?: string, CopySourceIfModifiedSince?: Date | string, CopySourceIfNoneMatch?: string, CopySourceIfUnmodifiedSince?: Date | string, CopySourceRange?: string, Key: string, PartNumber: number, UploadId: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, CopySourceSSECustomerAlgorithm?: string, CopySourceSSECustomerKey?: string, CopySourceSSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, ExpectedSourceBucketOwner?: string}; + +//==== Error Types ==== +export declare class NoSuchUploadError extends S.TaggedError()(("NoSuchUploadError"), {}).pipe() {} +export declare class ObjectNotInActiveTierErrorError extends S.TaggedError()(("ObjectNotInActiveTierErrorError"), {}).pipe() {} +export declare class BucketAlreadyExistsError extends S.TaggedError()(("BucketAlreadyExistsError"), {}).pipe() {} +export declare class BucketAlreadyOwnedByYouError extends S.TaggedError()(("BucketAlreadyOwnedByYouError"), {}).pipe() {} +export declare class NoSuchBucketError extends S.TaggedError()(("NoSuchBucketError"), {}).pipe() {} +export declare class InvalidObjectStateError extends S.TaggedError()(("InvalidObjectStateError"), {}).pipe() {} +export declare class NoSuchKeyError extends S.TaggedError()(("NoSuchKeyError"), {}).pipe() {} +export declare class NotFoundError extends S.TaggedError()(("NotFoundError"), {}).pipe() {} +export declare class EncryptionTypeMismatchError extends S.TaggedError()(("EncryptionTypeMismatchError"), {}).pipe() {} +export declare class InvalidRequestError extends S.TaggedError()(("InvalidRequestError"), {}).pipe() {} +export declare class InvalidWriteOffsetError extends S.TaggedError()(("InvalidWriteOffsetError"), {}).pipe() {} +export declare class TooManyPartsError extends S.TaggedError()(("TooManyPartsError"), {}).pipe() {} +export declare class IdempotencyParameterMismatchError extends S.TaggedError()(("IdempotencyParameterMismatchError"), {}).pipe() {} +export declare class ObjectAlreadyInActiveTierErrorError extends S.TaggedError()(("ObjectAlreadyInActiveTierErrorError"), {}).pipe() {} diff --git a/src/credentials.ts b/src/credentials.ts new file mode 100644 index 00000000..2e7e4b9d --- /dev/null +++ b/src/credentials.ts @@ -0,0 +1,33 @@ +import { fromNodeProviderChain } from "@aws-sdk/credential-providers"; +import { Data, Effect, Context, Layer } from "effect"; + +export interface AwsCredentials { + readonly accessKeyId: string; + readonly secretAccessKey: string; + readonly sessionToken?: string; +} + +//todo(pear): add this to a categeroy +//todo(pear): add details about the root error to this +export class AwsCredentialProviderError extends Data.TaggedError( + "AwsCredentialProviderError", +)<{}> {} + +export class Credentials extends Context.Tag("Credentials")< + Credentials, + { + readonly getCredentials: () => Effect.Effect< + AwsCredentials, + AwsCredentialProviderError, + never + >; + } +>() {} + +export const NodeProviderChainCredentialsLive = Layer.succeed(Credentials, { + getCredentials: () => + Effect.tryPromise({ + try: () => fromNodeProviderChain()(), + catch: () => new AwsCredentialProviderError(), + }), +}); diff --git a/src/errors.ts b/src/errors.ts new file mode 100644 index 00000000..625257d4 --- /dev/null +++ b/src/errors.ts @@ -0,0 +1,92 @@ +import * as Context from "effect/Context"; +import * as Effect from "effect/Effect"; +import * as Predicate from "effect/Predicate"; +import * as Schedule from "effect/Schedule"; + +export const ERROR_CATEGORIES = { + AWS_ERROR: "AWS_ERROR", + COMMON_ERROR: "COMMON_ERROR", +} as const; + +export type ERROR_CATEGORY = + (typeof ERROR_CATEGORIES)[keyof typeof ERROR_CATEGORIES]; + +export const categoriesKey = "@alchemy-run/itty-aws/error/categories"; + +export const withCategory = + >(...categories: Categories) => + , Ret, C extends { new (...args: Args): Ret }>( + C: C, + ): C & { + new ( + ...args: Args + ): Ret & { [categoriesKey]: { [Cat in Categories[number]]: true } }; + } => { + // @ts-expect-error + const Mixed = class extends C {}; + + for (const category of categories) { + if (!(categoriesKey in Mixed.prototype)) { + // @ts-expect-error + Mixed.prototype[categoriesKey] = {}; + } + // @ts-expect-error + Mixed.prototype[categoriesKey][category] = true; + } + + return Mixed as any; + }; + +export type AllKeys = E extends { [categoriesKey]: infer Q } + ? keyof Q + : never; +export type ExtractAll = Cats extends any + ? Extract + : never; + +export const catchCategory = + >, A2, E2, R2>( + ...args: [ + ...Categories, + f: (err: ExtractAll) => Effect.Effect, + ] + ) => + ( + effect: Effect.Effect, + ): Effect.Effect< + A | A2, + E2 | Exclude>, + R | R2 + > => { + const f = args.pop()!; + const categories = args; + return Effect.catchIf( + effect, + (e) => { + if (Predicate.isObject(e) && Predicate.hasProperty(categoriesKey)(e)) { + for (const cat of categories) { + // @ts-expect-error + if (cat in e[categoriesKey]) { + return true; + } + } + } + return false; + }, // @ts-expect-error + (e) => f(e), + ) as any; + }; + +export class RetryPolicy extends Context.Tag("RetryPolicy")< + RetryPolicy, + { + readonly getSchedule: ( + error: unknown, + errorDetails?: unknown, + ) => Effect.Effect< + Schedule.Schedule, + never, + never + >; + } +>() {} diff --git a/src/protocols/logger.ts b/src/protocols/logger.ts new file mode 100644 index 00000000..0a388d13 --- /dev/null +++ b/src/protocols/logger.ts @@ -0,0 +1,14 @@ +import { Effect } from "effect"; +import type { ServiceMetadata } from "../service-metadata"; + +export function loggerProvider(clientConfig: any, metadata: ServiceMetadata) { + return { + call: (endpointMetadata: any) => (input: any) => + Effect.sync(() => { + console.log("Client Config:", clientConfig); + console.log("Service metadata:", metadata); + console.log("Endpoint metadata:", endpointMetadata); + console.log("Input:", input); + }), + }; +} diff --git a/src/protocols/rest-xml.ts b/src/protocols/rest-xml.ts new file mode 100644 index 00000000..279d0458 --- /dev/null +++ b/src/protocols/rest-xml.ts @@ -0,0 +1,82 @@ +import { Effect, Match } from "effect"; +import type { ServiceMetadata } from "../service-metadata"; +import { Credentials } from "../credentials"; + +export type ClientConfig = {}; + +//todo(pear): make these single letter variables +export type EndpointMetadata = { + method: string; //todo(pear): narrower type + uri: string; + //* p: => path, b: => body, default string => header; missing => header x-amz- + body: Record; +}; + +export const restXmlProvider = Effect.fn(function* ( + clientConfig: ClientConfig, + metadata: ServiceMetadata, +) { + const credentials = yield* Credentials; + return { + call: (endpointMetadata: EndpointMetadata) => + Effect.fn(function* (input: Record) { + const result = yield* Effect.reduce( + Object.entries(input), + { + url: endpointMetadata.uri, + body: {} as Record, + headers: {} as Record, + }, + (acc, [key, value]) => { + const mapping = endpointMetadata.body[key]; + if (!mapping) { + return Effect.succeed({ + ...acc, + headers: { + ...acc.headers, + ["x-amz-" + + key + .replace(/([A-Z])/g, "-$1") + .toLowerCase() + .slice(1)]: value, + }, + }); + } + + return Match.value(mapping).pipe( + Match.when( + (m) => m.startsWith("p:"), + (m) => + Effect.succeed({ + ...acc, + url: acc.url.replace( + new RegExp(`\\{${key}\\+?\\}`, "g"), + String(value), + ), + }), + ), + Match.when( + (m) => m.startsWith("b:"), + (m) => + Effect.succeed({ + ...acc, + body: { ...acc.body, [m.slice(2)]: value }, + }), + ), + Match.orElse((m) => + Effect.succeed({ + ...acc, + headers: { ...acc.headers, [m]: value }, + }), + ), + ); + }, + ); + + console.log(result); + }), + } as { + call: (metadata: any) => (input: any) => Effect.Effect; + _endpointMetadataType: EndpointMetadata; + }; +}); diff --git a/src/service-metadata.ts b/src/service-metadata.ts new file mode 100644 index 00000000..1b948fec --- /dev/null +++ b/src/service-metadata.ts @@ -0,0 +1,10 @@ +import { Schema as S } from "effect"; + +export const ServiceMetadata = S.Struct({ + sdkId: S.String, + version: S.String, + protocol: S.String, + sigV4ServiceName: S.String, +}); + +export type ServiceMetadata = typeof ServiceMetadata.Type; diff --git a/todo.md b/todo.md new file mode 100644 index 00000000..f3895b27 --- /dev/null +++ b/todo.md @@ -0,0 +1,5 @@ +# todo +- move effect deps to peer deps +- export each operation on its own rather than via metadata +- generate a report on kb per bundle (see effect 4 / effect-smol?) @sam +- warning for people who don't know how to bundle diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..2d59bdb8 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,31 @@ +{ + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist"], + "compilerOptions": { + "types": ["bun-types", "@types/node"], + // Environment setup & latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +} From d502459c9bf32b001ddb79c9781675749442459d Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:03:49 -0500 Subject: [PATCH 2/8] chore: move to array for xml endpoint metadata --- rsbuild.config.ts | 13 +-- scripts/generate-clients.ts | 11 +- src/clients.gen/s3.ts | 204 ++++++++++++++++++------------------ src/protocols/rest-xml.ts | 82 +++++---------- todo.md | 1 - 5 files changed, 141 insertions(+), 170 deletions(-) diff --git a/rsbuild.config.ts b/rsbuild.config.ts index 070d033c..95e8f44e 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -7,21 +7,14 @@ export default defineConfig({ }, }, output: { + module: true, target: "node", externals: [ - "@effect/platform", - "@effect/platform-node-shared", - "@effect/platform-bun", + /^@effect\/(.*)/, "effect", + /^effect\/(.*)/, "@aws-sdk/credential-providers", ], - // externals: { - // "@effect/platform": "@effect/platform", - // "@effect/platform-node-shared": "@effect/platform-node-shared", - // "@effect/platform-bun": "@effect/platform-bun", - // effect: "effect", - // "@aws-sdk/credential-providers": "@aws-sdk/credential-providers", - // }, minify: { js: true, jsOptions: { diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts index fa36d480..a69c54aa 100644 --- a/scripts/generate-clients.ts +++ b/scripts/generate-clients.ts @@ -9,6 +9,7 @@ import { Context, Match, Ref, + Equivalence, } from "effect"; import { SmithyModel, @@ -53,7 +54,6 @@ export class UnableToTransformShapeToType extends Data.TaggedError( message: string; }> {} -//todo(pear): remove this in favor of find shape const findServiceShape = Effect.gen(function* () { const model = yield* ModelService; const serviceEntry = Object.entries(model.shapes).find( @@ -371,19 +371,22 @@ const generateClient = Effect.fn(function* ( } return Effect.succeed({ ...acc, - [key]: value.traits["smithy.api#httpHeader"], + [key]: [value.traits["smithy.api#httpHeader"]], }); } if (value.traits?.["smithy.api#httpLabel"] != null) { return Effect.succeed({ ...acc, - [key]: `p:${value.traits?.["smithy.rules#contextParam"]?.name ?? key}`, + [key]: [ + "p", + value.traits["smithy.rules#contextParam"]?.name ?? key, + ], }); } if (value.traits?.["smithy.api#httpPayload"] != null) { return Effect.succeed({ ...acc, - [key]: `b:${value.traits["smithy.api#xmlName"]}`, + [key]: ["b", value.traits["smithy.api#xmlName"] ?? key], }); } return Effect.succeed(acc); diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts index e91a8acc..5de38cf8 100644 --- a/src/clients.gen/s3.ts +++ b/src/clients.gen/s3.ts @@ -9,110 +9,110 @@ export const metadata = {"protocol":"aws.protocols#restXml","sdkId":"S3","sigV4S export class S3ClientRequirement extends Context.Tag("S3ClientRequirement") (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {} export const createClient = (config: ClientConfig) => Layer.effect(S3ClientRequirement, restXmlProvider(config, metadata)); -export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":"p:Bucket","Key":"p:Key","MultipartUpload":"b:CompleteMultipartUpload","ChecksumCRC32":"x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-checksum-sha1","ChecksumSHA256":"x-amz-checksum-sha256","MpuObjectSize":"x-amz-mp-object-size","IfMatch":"If-Match","IfNoneMatch":"If-None-Match","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const copyObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":"x-amz-acl","Bucket":"p:Bucket","CacheControl":"Cache-Control","ContentDisposition":"Content-Disposition","ContentEncoding":"Content-Encoding","ContentLanguage":"Content-Language","ContentType":"Content-Type","Expires":"Expires","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","IfMatch":"If-Match","IfNoneMatch":"If-None-Match","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled","CopySourceSSECustomerAlgorithm":"x-amz-copy-source-server-side-encryption-customer-algorithm","CopySourceSSECustomerKey":"x-amz-copy-source-server-side-encryption-customer-key","CopySourceSSECustomerKeyMD5":"x-amz-copy-source-server-side-encryption-customer-key-MD5","ObjectLockLegalHoldStatus":"x-amz-object-lock-legal-hold","ExpectedSourceBucketOwner":"x-amz-source-expected-bucket-owner"} }, S3ClientRequirement) -export const createBucket = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}", body: {"ACL":"x-amz-acl","Bucket":"p:Bucket","CreateBucketConfiguration":"b:CreateBucketConfiguration","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","ObjectLockEnabledForBucket":"x-amz-bucket-object-lock-enabled"} }, S3ClientRequirement) -export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","MetadataConfiguration":"b:MetadataConfiguration"} }, S3ClientRequirement) -export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","MetadataTableConfiguration":"b:MetadataTableConfiguration"} }, S3ClientRequirement) -export const createMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":"x-amz-acl","Bucket":"p:Bucket","CacheControl":"Cache-Control","ContentDisposition":"Content-Disposition","ContentEncoding":"Content-Encoding","ContentLanguage":"Content-Language","ContentType":"Content-Type","Expires":"Expires","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled","ObjectLockLegalHoldStatus":"x-amz-object-lock-legal-hold"} }, S3ClientRequirement) -export const createSession = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":"x-amz-create-session-mode","Bucket":"p:Bucket","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled"} }, S3ClientRequirement) -export const deleteBucket = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketCors = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const deleteObject = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":"p:Bucket","Key":"p:Key","MFA":"x-amz-mfa","IfMatch":"If-Match"} }, S3ClientRequirement) -export const deleteObjects = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":"p:Bucket","Delete":"b:Delete","MFA":"x-amz-mfa","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketCors = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketEncryption = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketLocation = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?location", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketLogging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketPolicy = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketReplication = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketVersioning = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getBucketWebsite = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?website", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getObject = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":"p:Bucket","IfMatch":"If-Match","IfModifiedSince":"If-Modified-Since","IfNoneMatch":"If-None-Match","IfUnmodifiedSince":"If-Unmodified-Since","Key":"p:Key","Range":"Range","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const getObjectAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const getObjectAttributes = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const getObjectRetention = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const getObjectTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const getObjectTorrent = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":"p:Bucket","Key":"p:Key"} }, S3ClientRequirement) -export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const headBucket = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const headObject = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":"p:Bucket","IfMatch":"If-Match","IfModifiedSince":"If-Modified-Since","IfNoneMatch":"If-None-Match","IfUnmodifiedSince":"If-Unmodified-Since","Key":"p:Key","Range":"Range","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) +export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MultipartUpload":["b","CompleteMultipartUpload"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"MpuObjectSize":["x-amz-mp-object-size"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const copyObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]} }, S3ClientRequirement) +export const createBucket = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CreateBucketConfiguration":["b","CreateBucketConfiguration"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"ObjectLockEnabledForBucket":["x-amz-bucket-object-lock-enabled"]} }, S3ClientRequirement) +export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataConfiguration":["b","MetadataConfiguration"]} }, S3ClientRequirement) +export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataTableConfiguration":["b","MetadataTableConfiguration"]} }, S3ClientRequirement) +export const createMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]} }, S3ClientRequirement) +export const createSession = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":["x-amz-create-session-mode"],"Bucket":["p","Bucket"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"]} }, S3ClientRequirement) +export const deleteBucket = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketCors = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const deleteObject = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MFA":["x-amz-mfa"],"IfMatch":["If-Match"]} }, S3ClientRequirement) +export const deleteObjects = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":["p","Bucket"],"Delete":["b","Delete"],"MFA":["x-amz-mfa"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketCors = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketEncryption = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketLocation = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?location", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketLogging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketPolicy = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketReplication = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketVersioning = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getBucketWebsite = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getObject = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const getObjectAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const getObjectAttributes = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const getObjectRetention = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const getObjectTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const getObjectTorrent = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) +export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const headBucket = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const headObject = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) export const listBuckets = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/?x-id=ListBuckets", body: {} }, S3ClientRequirement) export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {} }, S3ClientRequirement) -export const listMultipartUploads = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listObjects = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listObjectsV2 = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listObjectVersions = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":"p:Bucket"} }, S3ClientRequirement) -export const listParts = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":"p:Bucket","AccelerateConfiguration":"b:AccelerateConfiguration","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putBucketAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":"x-amz-acl","AccessControlPolicy":"b:AccessControlPolicy","Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp"} }, S3ClientRequirement) -export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":"p:Bucket","AnalyticsConfiguration":"b:AnalyticsConfiguration"} }, S3ClientRequirement) -export const putBucketCors = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":"p:Bucket","CORSConfiguration":"b:CORSConfiguration","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putBucketEncryption = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ServerSideEncryptionConfiguration":"b:ServerSideEncryptionConfiguration"} }, S3ClientRequirement) -export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":"p:Bucket","IntelligentTieringConfiguration":"b:IntelligentTieringConfiguration"} }, S3ClientRequirement) -export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":"p:Bucket","InventoryConfiguration":"b:InventoryConfiguration"} }, S3ClientRequirement) -export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":"p:Bucket","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","LifecycleConfiguration":"b:LifecycleConfiguration"} }, S3ClientRequirement) -export const putBucketLogging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":"p:Bucket","BucketLoggingStatus":"b:BucketLoggingStatus","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":"p:Bucket","MetricsConfiguration":"b:MetricsConfiguration"} }, S3ClientRequirement) -export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":"p:Bucket","NotificationConfiguration":"b:NotificationConfiguration"} }, S3ClientRequirement) -export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","OwnershipControls":"b:OwnershipControls","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putBucketPolicy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","Policy":"b:undefined"} }, S3ClientRequirement) -export const putBucketReplication = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ReplicationConfiguration":"b:ReplicationConfiguration","Token":"x-amz-bucket-object-lock-token"} }, S3ClientRequirement) -export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","RequestPaymentConfiguration":"b:RequestPaymentConfiguration"} }, S3ClientRequirement) -export const putBucketTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","Tagging":"b:Tagging"} }, S3ClientRequirement) -export const putBucketVersioning = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","MFA":"x-amz-mfa","VersioningConfiguration":"b:VersioningConfiguration"} }, S3ClientRequirement) -export const putBucketWebsite = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","WebsiteConfiguration":"b:WebsiteConfiguration"} }, S3ClientRequirement) -export const putObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":"x-amz-acl","Body":"b:undefined","Bucket":"p:Bucket","CacheControl":"Cache-Control","ContentDisposition":"Content-Disposition","ContentEncoding":"Content-Encoding","ContentLanguage":"Content-Language","ContentLength":"Content-Length","ContentMD5":"Content-MD5","ContentType":"Content-Type","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ChecksumCRC32":"x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-checksum-sha1","ChecksumSHA256":"x-amz-checksum-sha256","Expires":"Expires","IfMatch":"If-Match","IfNoneMatch":"If-None-Match","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","SSEKMSKeyId":"x-amz-server-side-encryption-aws-kms-key-id","SSEKMSEncryptionContext":"x-amz-server-side-encryption-context","BucketKeyEnabled":"x-amz-server-side-encryption-bucket-key-enabled","ObjectLockLegalHoldStatus":"x-amz-object-lock-legal-hold"} }, S3ClientRequirement) -export const putObjectAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":"x-amz-acl","AccessControlPolicy":"b:AccessControlPolicy","Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","GrantReadACP":"x-amz-grant-read-acp","GrantWriteACP":"x-amz-grant-write-acp","Key":"p:Key"} }, S3ClientRequirement) -export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":"p:Bucket","Key":"p:Key","LegalHold":"b:LegalHold","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":"p:Bucket","ObjectLockConfiguration":"b:ObjectLockConfiguration","Token":"x-amz-bucket-object-lock-token","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putObjectRetention = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":"p:Bucket","Key":"p:Key","Retention":"b:Retention","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const putObjectTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":"p:Bucket","Key":"p:Key","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","Tagging":"b:Tagging"} }, S3ClientRequirement) -export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","PublicAccessBlockConfiguration":"b:PublicAccessBlockConfiguration"} }, S3ClientRequirement) -export const renameObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":"p:Bucket","Key":"p:Key","DestinationIfMatch":"If-Match","DestinationIfNoneMatch":"If-None-Match","DestinationIfModifiedSince":"If-Modified-Since","DestinationIfUnmodifiedSince":"If-Unmodified-Since","SourceIfMatch":"x-amz-rename-source-if-match","SourceIfNoneMatch":"x-amz-rename-source-if-none-match","SourceIfModifiedSince":"x-amz-rename-source-if-modified-since","SourceIfUnmodifiedSince":"x-amz-rename-source-if-unmodified-since"} }, S3ClientRequirement) -export const restoreObject = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":"p:Bucket","Key":"p:Key","RestoreRequest":"b:RestoreRequest","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm"} }, S3ClientRequirement) -export const selectObjectContent = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","InventoryTableConfiguration":"b:InventoryTableConfiguration"} }, S3ClientRequirement) -export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":"p:Bucket","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","JournalTableConfiguration":"b:JournalTableConfiguration"} }, S3ClientRequirement) -export const uploadPart = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":"b:undefined","Bucket":"p:Bucket","ContentLength":"Content-Length","ContentMD5":"Content-MD5","ChecksumAlgorithm":"x-amz-sdk-checksum-algorithm","ChecksumCRC32":"x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-checksum-sha1","ChecksumSHA256":"x-amz-checksum-sha256","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5"} }, S3ClientRequirement) -export const uploadPartCopy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":"p:Bucket","Key":"p:Key","SSECustomerAlgorithm":"x-amz-server-side-encryption-customer-algorithm","SSECustomerKey":"x-amz-server-side-encryption-customer-key","SSECustomerKeyMD5":"x-amz-server-side-encryption-customer-key-MD5","CopySourceSSECustomerAlgorithm":"x-amz-copy-source-server-side-encryption-customer-algorithm","CopySourceSSECustomerKey":"x-amz-copy-source-server-side-encryption-customer-key","CopySourceSSECustomerKeyMD5":"x-amz-copy-source-server-side-encryption-customer-key-MD5","ExpectedSourceBucketOwner":"x-amz-source-expected-bucket-owner"} }, S3ClientRequirement) -export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":"b:undefined","StatusCode":"x-amz-fwd-status","ErrorCode":"x-amz-fwd-error-code","ErrorMessage":"x-amz-fwd-error-message","AcceptRanges":"x-amz-fwd-header-accept-ranges","CacheControl":"x-amz-fwd-header-Cache-Control","ContentDisposition":"x-amz-fwd-header-Content-Disposition","ContentEncoding":"x-amz-fwd-header-Content-Encoding","ContentLanguage":"x-amz-fwd-header-Content-Language","ContentLength":"Content-Length","ContentRange":"x-amz-fwd-header-Content-Range","ContentType":"x-amz-fwd-header-Content-Type","ChecksumCRC32":"x-amz-fwd-header-x-amz-checksum-crc32","ChecksumCRC32C":"x-amz-fwd-header-x-amz-checksum-crc32c","ChecksumCRC64NVME":"x-amz-fwd-header-x-amz-checksum-crc64nvme","ChecksumSHA1":"x-amz-fwd-header-x-amz-checksum-sha1","ChecksumSHA256":"x-amz-fwd-header-x-amz-checksum-sha256","DeleteMarker":"x-amz-fwd-header-x-amz-delete-marker","ETag":"x-amz-fwd-header-ETag","Expires":"x-amz-fwd-header-Expires","Expiration":"x-amz-fwd-header-x-amz-expiration","LastModified":"x-amz-fwd-header-Last-Modified","MissingMeta":"x-amz-fwd-header-x-amz-missing-meta","ObjectLockMode":"x-amz-fwd-header-x-amz-object-lock-mode","ObjectLockLegalHoldStatus":"x-amz-fwd-header-x-amz-object-lock-legal-hold","ObjectLockRetainUntilDate":"x-amz-fwd-header-x-amz-object-lock-retain-until-date","PartsCount":"x-amz-fwd-header-x-amz-mp-parts-count","ReplicationStatus":"x-amz-fwd-header-x-amz-replication-status","RequestCharged":"x-amz-fwd-header-x-amz-request-charged","Restore":"x-amz-fwd-header-x-amz-restore","ServerSideEncryption":"x-amz-fwd-header-x-amz-server-side-encryption","SSECustomerAlgorithm":"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm","SSEKMSKeyId":"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id","SSECustomerKeyMD5":"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5","StorageClass":"x-amz-fwd-header-x-amz-storage-class","TagCount":"x-amz-fwd-header-x-amz-tagging-count","VersionId":"x-amz-fwd-header-x-amz-version-id","BucketKeyEnabled":"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"} }, S3ClientRequirement) +export const listMultipartUploads = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listObjects = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listObjectsV2 = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listObjectVersions = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) +export const listParts = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"],"AccelerateConfiguration":["b","AccelerateConfiguration"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putBucketAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"]} }, S3ClientRequirement) +export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"],"AnalyticsConfiguration":["b","AnalyticsConfiguration"]} }, S3ClientRequirement) +export const putBucketCors = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"],"CORSConfiguration":["b","CORSConfiguration"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putBucketEncryption = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ServerSideEncryptionConfiguration":["b","ServerSideEncryptionConfiguration"]} }, S3ClientRequirement) +export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"],"IntelligentTieringConfiguration":["b","IntelligentTieringConfiguration"]} }, S3ClientRequirement) +export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"],"InventoryConfiguration":["b","InventoryConfiguration"]} }, S3ClientRequirement) +export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"LifecycleConfiguration":["b","LifecycleConfiguration"]} }, S3ClientRequirement) +export const putBucketLogging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"],"BucketLoggingStatus":["b","BucketLoggingStatus"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"],"MetricsConfiguration":["b","MetricsConfiguration"]} }, S3ClientRequirement) +export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"],"NotificationConfiguration":["b","NotificationConfiguration"]} }, S3ClientRequirement) +export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"OwnershipControls":["b","OwnershipControls"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putBucketPolicy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Policy":["b","Policy"]} }, S3ClientRequirement) +export const putBucketReplication = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ReplicationConfiguration":["b","ReplicationConfiguration"],"Token":["x-amz-bucket-object-lock-token"]} }, S3ClientRequirement) +export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"RequestPaymentConfiguration":["b","RequestPaymentConfiguration"]} }, S3ClientRequirement) +export const putBucketTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]} }, S3ClientRequirement) +export const putBucketVersioning = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MFA":["x-amz-mfa"],"VersioningConfiguration":["b","VersioningConfiguration"]} }, S3ClientRequirement) +export const putBucketWebsite = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"WebsiteConfiguration":["b","WebsiteConfiguration"]} }, S3ClientRequirement) +export const putObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":["x-amz-acl"],"Body":["b","Body"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ContentType":["Content-Type"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Expires":["Expires"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]} }, S3ClientRequirement) +export const putObjectAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"]} }, S3ClientRequirement) +export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"LegalHold":["b","LegalHold"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"],"ObjectLockConfiguration":["b","ObjectLockConfiguration"],"Token":["x-amz-bucket-object-lock-token"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putObjectRetention = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"Retention":["b","Retention"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const putObjectTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]} }, S3ClientRequirement) +export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"PublicAccessBlockConfiguration":["b","PublicAccessBlockConfiguration"]} }, S3ClientRequirement) +export const renameObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"DestinationIfMatch":["If-Match"],"DestinationIfNoneMatch":["If-None-Match"],"DestinationIfModifiedSince":["If-Modified-Since"],"DestinationIfUnmodifiedSince":["If-Unmodified-Since"],"SourceIfMatch":["x-amz-rename-source-if-match"],"SourceIfNoneMatch":["x-amz-rename-source-if-none-match"],"SourceIfModifiedSince":["x-amz-rename-source-if-modified-since"],"SourceIfUnmodifiedSince":["x-amz-rename-source-if-unmodified-since"]} }, S3ClientRequirement) +export const restoreObject = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"RestoreRequest":["b","RestoreRequest"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) +export const selectObjectContent = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"InventoryTableConfiguration":["b","InventoryTableConfiguration"]} }, S3ClientRequirement) +export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"JournalTableConfiguration":["b","JournalTableConfiguration"]} }, S3ClientRequirement) +export const uploadPart = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":["b","Body"],"Bucket":["p","Bucket"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) +export const uploadPartCopy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]} }, S3ClientRequirement) +export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":["b","Body"],"StatusCode":["x-amz-fwd-status"],"ErrorCode":["x-amz-fwd-error-code"],"ErrorMessage":["x-amz-fwd-error-message"],"AcceptRanges":["x-amz-fwd-header-accept-ranges"],"CacheControl":["x-amz-fwd-header-Cache-Control"],"ContentDisposition":["x-amz-fwd-header-Content-Disposition"],"ContentEncoding":["x-amz-fwd-header-Content-Encoding"],"ContentLanguage":["x-amz-fwd-header-Content-Language"],"ContentLength":["Content-Length"],"ContentRange":["x-amz-fwd-header-Content-Range"],"ContentType":["x-amz-fwd-header-Content-Type"],"ChecksumCRC32":["x-amz-fwd-header-x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-fwd-header-x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-fwd-header-x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-fwd-header-x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-fwd-header-x-amz-checksum-sha256"],"DeleteMarker":["x-amz-fwd-header-x-amz-delete-marker"],"ETag":["x-amz-fwd-header-ETag"],"Expires":["x-amz-fwd-header-Expires"],"Expiration":["x-amz-fwd-header-x-amz-expiration"],"LastModified":["x-amz-fwd-header-Last-Modified"],"MissingMeta":["x-amz-fwd-header-x-amz-missing-meta"],"ObjectLockMode":["x-amz-fwd-header-x-amz-object-lock-mode"],"ObjectLockLegalHoldStatus":["x-amz-fwd-header-x-amz-object-lock-legal-hold"],"ObjectLockRetainUntilDate":["x-amz-fwd-header-x-amz-object-lock-retain-until-date"],"PartsCount":["x-amz-fwd-header-x-amz-mp-parts-count"],"ReplicationStatus":["x-amz-fwd-header-x-amz-replication-status"],"RequestCharged":["x-amz-fwd-header-x-amz-request-charged"],"Restore":["x-amz-fwd-header-x-amz-restore"],"ServerSideEncryption":["x-amz-fwd-header-x-amz-server-side-encryption"],"SSECustomerAlgorithm":["x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"],"SSEKMSKeyId":["x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"],"SSECustomerKeyMD5":["x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"],"StorageClass":["x-amz-fwd-header-x-amz-storage-class"],"TagCount":["x-amz-fwd-header-x-amz-tagging-count"],"VersionId":["x-amz-fwd-header-x-amz-version-id"],"BucketKeyEnabled":["x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"]} }, S3ClientRequirement) //==== Aliased Types ==== type NoSuchUpload = {}; diff --git a/src/protocols/rest-xml.ts b/src/protocols/rest-xml.ts index 279d0458..21472a45 100644 --- a/src/protocols/rest-xml.ts +++ b/src/protocols/rest-xml.ts @@ -9,7 +9,8 @@ export type EndpointMetadata = { method: string; //todo(pear): narrower type uri: string; //* p: => path, b: => body, default string => header; missing => header x-amz- - body: Record; + // body: Record; + body: Record; }; export const restXmlProvider = Effect.fn(function* ( @@ -20,60 +21,35 @@ export const restXmlProvider = Effect.fn(function* ( return { call: (endpointMetadata: EndpointMetadata) => Effect.fn(function* (input: Record) { - const result = yield* Effect.reduce( - Object.entries(input), - { - url: endpointMetadata.uri, - body: {} as Record, - headers: {} as Record, - }, - (acc, [key, value]) => { - const mapping = endpointMetadata.body[key]; - if (!mapping) { - return Effect.succeed({ - ...acc, - headers: { - ...acc.headers, - ["x-amz-" + - key - .replace(/([A-Z])/g, "-$1") - .toLowerCase() - .slice(1)]: value, - }, - }); - } + let url = endpointMetadata.uri; + const body: Record = {}; + const headers: Record = {}; - return Match.value(mapping).pipe( - Match.when( - (m) => m.startsWith("p:"), - (m) => - Effect.succeed({ - ...acc, - url: acc.url.replace( - new RegExp(`\\{${key}\\+?\\}`, "g"), - String(value), - ), - }), - ), - Match.when( - (m) => m.startsWith("b:"), - (m) => - Effect.succeed({ - ...acc, - body: { ...acc.body, [m.slice(2)]: value }, - }), - ), - Match.orElse((m) => - Effect.succeed({ - ...acc, - headers: { ...acc.headers, [m]: value }, - }), - ), - ); - }, - ); + for (const key in input) { + const value = input[key]; + const meta = endpointMetadata.body[key]; - console.log(result); + if (!meta) { + headers[ + `x-amz-${key + .replace(/([A-Z])/g, "-$1") + .toLowerCase() + .slice(1)}` + ] = value; + } else if (meta[0] === "p") { + url = url + .replace(`{${key}}`, `${value}`) + .replace(`{${key}+}`, `${value}`); + } else if (meta[0] === "b") { + body[meta[1]!] = value; + } else { + headers[meta[0]] = value; + } + } + + console.log({ url, body, headers }); + + yield* Effect.void; }), } as { call: (metadata: any) => (input: any) => Effect.Effect; diff --git a/todo.md b/todo.md index f3895b27..e6c4b580 100644 --- a/todo.md +++ b/todo.md @@ -1,5 +1,4 @@ # todo - move effect deps to peer deps -- export each operation on its own rather than via metadata - generate a report on kb per bundle (see effect 4 / effect-smol?) @sam - warning for people who don't know how to bundle From 9668013deb4bce992e23ec696f1a6e4c718287bc Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Wed, 26 Nov 2025 15:28:34 -0500 Subject: [PATCH 3/8] sam pls help aws models are wrong pls man pls jusgt fix it aws pls --- bun.lock | 5 +- package.json | 3 +- playground-itty.ts | 15 ++- playground.ts | 13 ++- rsbuild.config.ts | 6 +- scripts/generate-clients.ts | 26 +++-- src/clients.gen/s3.ts | 212 ++++++++++++++++++------------------ src/protocols/rest-xml.ts | 131 ++++++++++++++++++---- src/region.ts | 39 +++++++ 9 files changed, 299 insertions(+), 151 deletions(-) create mode 100644 src/region.ts diff --git a/bun.lock b/bun.lock index 7250d2a2..9df81811 100644 --- a/bun.lock +++ b/bun.lock @@ -9,6 +9,7 @@ "@effect/platform-bun": "^0.83.0", "aws4fetch": "^1.0.20", "effect": "^3.19.4", + "fast-xml-parser": "^5.3.2", }, "devDependencies": { "@rsbuild/core": "^1.6.7", @@ -298,7 +299,7 @@ "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="], - "fast-xml-parser": ["fast-xml-parser@5.2.5", "", { "dependencies": { "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ=="], + "fast-xml-parser": ["fast-xml-parser@5.3.2", "", { "dependencies": { "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-n8v8b6p4Z1sMgqRmqLJm3awW4NX7NkaKPfb3uJIBTSH7Pdvufi3PQ3/lJLQrvxcMYl7JI2jnDO90siPEpD8JBA=="], "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], @@ -346,6 +347,8 @@ "@aws-crypto/util/@smithy/util-utf8": ["@smithy/util-utf8@2.3.0", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="], + "@aws-sdk/xml-builder/fast-xml-parser": ["fast-xml-parser@5.2.5", "", { "dependencies": { "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ=="], + "node-gyp-build-optional-packages/detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/util-buffer-from@2.2.0", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="], diff --git a/package.json b/package.json index 462b4407..9d76223b 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@effect/platform": "^0.93.3", "@effect/platform-bun": "^0.83.0", "aws4fetch": "^1.0.20", - "effect": "^3.19.4" + "effect": "^3.19.4", + "fast-xml-parser": "^5.3.2" } } diff --git a/playground-itty.ts b/playground-itty.ts index f32e2d3a..49284358 100644 --- a/playground-itty.ts +++ b/playground-itty.ts @@ -1,11 +1,13 @@ import { BunContext, BunRuntime } from "@effect/platform-bun"; -import * as Effect from "effect/Effect"; +import { Logger, LogLevel, Effect } from "effect"; import * as S3 from "./src/clients.gen/s3"; import { NodeProviderChainCredentialsLive } from "./src/credentials"; +import { Region } from "./src/region"; +import { FetchHttpClient } from "@effect/platform"; const program = Effect.gen(function* () { const result = yield* S3.createBucket({ - Bucket: "alchemy-7uzxjcR", + Bucket: "alchemy-7uzxjcr", ACL: "private", GrantWrite: "", CreateBucketConfiguration: { @@ -17,14 +19,17 @@ const program = Effect.gen(function* () { ], }, }); - console.log(result); -}).pipe(Effect.provide(S3.createClient({}))); + yield* Effect.logDebug(result); +}); BunRuntime.runMain( program.pipe( //todo(pear): make this not a function so we can replace with like S3.testClient or something - Effect.provide(S3.createClient({})), + Effect.provide(S3.clientLive), + Effect.provideService(Region, "us-east-1"), + Effect.provide(FetchHttpClient.layer), Effect.provide(NodeProviderChainCredentialsLive), Effect.provide(BunContext.layer), + Logger.withMinimumLogLevel(LogLevel.Debug), ), ); diff --git a/playground.ts b/playground.ts index 1d7bad30..85375fe5 100644 --- a/playground.ts +++ b/playground.ts @@ -1,9 +1,14 @@ -// import { BunContext, BunRuntime } from "@effect/platform-bun"; -import * as Effect from "effect/Effect"; +import { BunContext, BunRuntime } from "@effect/platform-bun"; +import { Logger, LogLevel, Effect } from "effect"; export const program = Effect.gen(function* () { const result = yield* Effect.succeed({ hello: "world" }); - console.log(result); + yield* Effect.logDebug(result); }); -// BunRuntime.runMain(program.pipe(Effect.provide(BunContext.layer))); +BunRuntime.runMain( + program.pipe( + Effect.provide(BunContext.layer), + Logger.withMinimumLogLevel(LogLevel.Debug), + ), +); diff --git a/rsbuild.config.ts b/rsbuild.config.ts index 95e8f44e..e5b2185d 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -14,6 +14,9 @@ export default defineConfig({ "effect", /^effect\/(.*)/, "@aws-sdk/credential-providers", + //todo(pear): these aren't really external + "fast-xml-parser", + "aws4fetch", ], minify: { js: true, @@ -36,9 +39,6 @@ export default defineConfig({ htmlPlugin: false, }, performance: { - // bundleAnalyze: { - // generateStatsFile: true, - // }, chunkSplit: { strategy: "all-in-one", }, diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts index a69c54aa..1fe2d682 100644 --- a/scripts/generate-clients.ts +++ b/scripts/generate-clients.ts @@ -307,10 +307,10 @@ const generateClient = Effect.fn(function* ( ), onTrue: () => { imports.push( - `import { restXmlProvider, type EndpointMetadata, type ClientConfig } from "../protocols/rest-xml";`, + `import { restXmlProvider, type EndpointMetadata } from "../protocols/rest-xml";`, ); return Effect.succeed( - `export const createClient = (config: ClientConfig) => Layer.effect(${serviceName}, restXmlProvider(config, metadata));`, + `export const clientLive = Layer.effect(${serviceName}, restXmlProvider(metadata));`, ); }, }, @@ -377,16 +377,22 @@ const generateClient = Effect.fn(function* ( if (value.traits?.["smithy.api#httpLabel"] != null) { return Effect.succeed({ ...acc, - [key]: [ - "p", - value.traits["smithy.rules#contextParam"]?.name ?? key, - ], + [key]: + value.traits["smithy.rules#contextParam"]?.name != null + ? [ + "p", + value.traits["smithy.rules#contextParam"]?.name, + ] + : ["p"], }); } if (value.traits?.["smithy.api#httpPayload"] != null) { return Effect.succeed({ ...acc, - [key]: ["b", value.traits["smithy.api#xmlName"] ?? key], + [key]: + value.traits["smithy.api#xmlName"] != null + ? ["b", value.traits["smithy.api#xmlName"]] + : ["b"], }); } return Effect.succeed(acc); @@ -409,11 +415,13 @@ const generateClient = Effect.fn(function* ( errors.push("CommonAwsError"); + const exportName = formatName(operationId, true); const traits = operationShape.traits["smithy.api#http"]; - const endpointMeta = `{ method: "${traits.method}", uri: "${traits.uri}", body: ${JSON.stringify(body)} }`; + //todo(pear): support streaming + inline output types + const endpointMeta = `{ name: "${exportName}", method: "${traits.method}", uri: "${traits.uri}", body: ${JSON.stringify(body)}}`; - return `export const ${formatName(operationId, true)} = /*@__PURE__*/ makeOperation<${inputType}, ${outputType}, ${errors.join(" | ")}, typeof ${serviceName}>(${endpointMeta}, ${serviceName})`; + return `export const ${exportName} = /*@__PURE__*/ makeOperation<${inputType}, ${outputType}, ${errors.join(" | ")}, typeof ${serviceName}>(${endpointMeta}, ${serviceName})`; // return `export const ${formatName(operationId)} = (inputs: ${inputShape}) => Effect.Effect<${outputShape}, ${errors.join(" | ")}>`; }), ); diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts index 5de38cf8..9e3d3b8a 100644 --- a/src/clients.gen/s3.ts +++ b/src/clients.gen/s3.ts @@ -1,118 +1,118 @@ import { type Effect, Layer, Context, Schema as S } from "effect"; import type { CommonAwsError } from "../aws-errors"; import { makeOperation } from "../client"; -import { restXmlProvider, type EndpointMetadata, type ClientConfig } from "../protocols/rest-xml"; +import { restXmlProvider, type EndpointMetadata } from "../protocols/rest-xml"; //==== Exports ==== export const metadata = {"protocol":"aws.protocols#restXml","sdkId":"S3","sigV4ServiceName":"s3","version":"2006-03-01"} export class S3ClientRequirement extends Context.Tag("S3ClientRequirement") (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {} -export const createClient = (config: ClientConfig) => Layer.effect(S3ClientRequirement, restXmlProvider(config, metadata)); +export const clientLive = Layer.effect(S3ClientRequirement, restXmlProvider(metadata)); -export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MultipartUpload":["b","CompleteMultipartUpload"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"MpuObjectSize":["x-amz-mp-object-size"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const copyObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]} }, S3ClientRequirement) -export const createBucket = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CreateBucketConfiguration":["b","CreateBucketConfiguration"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"ObjectLockEnabledForBucket":["x-amz-bucket-object-lock-enabled"]} }, S3ClientRequirement) -export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataConfiguration":["b","MetadataConfiguration"]} }, S3ClientRequirement) -export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataTableConfiguration":["b","MetadataTableConfiguration"]} }, S3ClientRequirement) -export const createMultipartUpload = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]} }, S3ClientRequirement) -export const createSession = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":["x-amz-create-session-mode"],"Bucket":["p","Bucket"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"]} }, S3ClientRequirement) -export const deleteBucket = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketCors = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const deleteObject = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MFA":["x-amz-mfa"],"IfMatch":["If-Match"]} }, S3ClientRequirement) -export const deleteObjects = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":["p","Bucket"],"Delete":["b","Delete"],"MFA":["x-amz-mfa"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketCors = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketEncryption = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketLocation = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?location", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketLogging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketPolicy = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketReplication = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketVersioning = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getBucketWebsite = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getObject = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const getObjectAcl = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const getObjectAttributes = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const getObjectRetention = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const getObjectTagging = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const getObjectTorrent = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]} }, S3ClientRequirement) -export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const headBucket = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const headObject = /*@__PURE__*/ makeOperation({ method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listBuckets = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/?x-id=ListBuckets", body: {} }, S3ClientRequirement) -export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {} }, S3ClientRequirement) -export const listMultipartUploads = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listObjects = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listObjectsV2 = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listObjectVersions = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":["p","Bucket"]} }, S3ClientRequirement) -export const listParts = /*@__PURE__*/ makeOperation({ method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"],"AccelerateConfiguration":["b","AccelerateConfiguration"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putBucketAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"]} }, S3ClientRequirement) -export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"],"AnalyticsConfiguration":["b","AnalyticsConfiguration"]} }, S3ClientRequirement) -export const putBucketCors = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"],"CORSConfiguration":["b","CORSConfiguration"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putBucketEncryption = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ServerSideEncryptionConfiguration":["b","ServerSideEncryptionConfiguration"]} }, S3ClientRequirement) -export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"],"IntelligentTieringConfiguration":["b","IntelligentTieringConfiguration"]} }, S3ClientRequirement) -export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"],"InventoryConfiguration":["b","InventoryConfiguration"]} }, S3ClientRequirement) -export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"LifecycleConfiguration":["b","LifecycleConfiguration"]} }, S3ClientRequirement) -export const putBucketLogging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"],"BucketLoggingStatus":["b","BucketLoggingStatus"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"],"MetricsConfiguration":["b","MetricsConfiguration"]} }, S3ClientRequirement) -export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"],"NotificationConfiguration":["b","NotificationConfiguration"]} }, S3ClientRequirement) -export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"OwnershipControls":["b","OwnershipControls"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putBucketPolicy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Policy":["b","Policy"]} }, S3ClientRequirement) -export const putBucketReplication = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ReplicationConfiguration":["b","ReplicationConfiguration"],"Token":["x-amz-bucket-object-lock-token"]} }, S3ClientRequirement) -export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"RequestPaymentConfiguration":["b","RequestPaymentConfiguration"]} }, S3ClientRequirement) -export const putBucketTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]} }, S3ClientRequirement) -export const putBucketVersioning = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MFA":["x-amz-mfa"],"VersioningConfiguration":["b","VersioningConfiguration"]} }, S3ClientRequirement) -export const putBucketWebsite = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"WebsiteConfiguration":["b","WebsiteConfiguration"]} }, S3ClientRequirement) -export const putObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":["x-amz-acl"],"Body":["b","Body"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ContentType":["Content-Type"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Expires":["Expires"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]} }, S3ClientRequirement) -export const putObjectAcl = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"]} }, S3ClientRequirement) -export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"LegalHold":["b","LegalHold"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"],"ObjectLockConfiguration":["b","ObjectLockConfiguration"],"Token":["x-amz-bucket-object-lock-token"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putObjectRetention = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"Retention":["b","Retention"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const putObjectTagging = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]} }, S3ClientRequirement) -export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"PublicAccessBlockConfiguration":["b","PublicAccessBlockConfiguration"]} }, S3ClientRequirement) -export const renameObject = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"DestinationIfMatch":["If-Match"],"DestinationIfNoneMatch":["If-None-Match"],"DestinationIfModifiedSince":["If-Modified-Since"],"DestinationIfUnmodifiedSince":["If-Unmodified-Since"],"SourceIfMatch":["x-amz-rename-source-if-match"],"SourceIfNoneMatch":["x-amz-rename-source-if-none-match"],"SourceIfModifiedSince":["x-amz-rename-source-if-modified-since"],"SourceIfUnmodifiedSince":["x-amz-rename-source-if-unmodified-since"]} }, S3ClientRequirement) -export const restoreObject = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"RestoreRequest":["b","RestoreRequest"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]} }, S3ClientRequirement) -export const selectObjectContent = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"InventoryTableConfiguration":["b","InventoryTableConfiguration"]} }, S3ClientRequirement) -export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"JournalTableConfiguration":["b","JournalTableConfiguration"]} }, S3ClientRequirement) -export const uploadPart = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":["b","Body"],"Bucket":["p","Bucket"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]} }, S3ClientRequirement) -export const uploadPartCopy = /*@__PURE__*/ makeOperation({ method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]} }, S3ClientRequirement) -export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":["b","Body"],"StatusCode":["x-amz-fwd-status"],"ErrorCode":["x-amz-fwd-error-code"],"ErrorMessage":["x-amz-fwd-error-message"],"AcceptRanges":["x-amz-fwd-header-accept-ranges"],"CacheControl":["x-amz-fwd-header-Cache-Control"],"ContentDisposition":["x-amz-fwd-header-Content-Disposition"],"ContentEncoding":["x-amz-fwd-header-Content-Encoding"],"ContentLanguage":["x-amz-fwd-header-Content-Language"],"ContentLength":["Content-Length"],"ContentRange":["x-amz-fwd-header-Content-Range"],"ContentType":["x-amz-fwd-header-Content-Type"],"ChecksumCRC32":["x-amz-fwd-header-x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-fwd-header-x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-fwd-header-x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-fwd-header-x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-fwd-header-x-amz-checksum-sha256"],"DeleteMarker":["x-amz-fwd-header-x-amz-delete-marker"],"ETag":["x-amz-fwd-header-ETag"],"Expires":["x-amz-fwd-header-Expires"],"Expiration":["x-amz-fwd-header-x-amz-expiration"],"LastModified":["x-amz-fwd-header-Last-Modified"],"MissingMeta":["x-amz-fwd-header-x-amz-missing-meta"],"ObjectLockMode":["x-amz-fwd-header-x-amz-object-lock-mode"],"ObjectLockLegalHoldStatus":["x-amz-fwd-header-x-amz-object-lock-legal-hold"],"ObjectLockRetainUntilDate":["x-amz-fwd-header-x-amz-object-lock-retain-until-date"],"PartsCount":["x-amz-fwd-header-x-amz-mp-parts-count"],"ReplicationStatus":["x-amz-fwd-header-x-amz-replication-status"],"RequestCharged":["x-amz-fwd-header-x-amz-request-charged"],"Restore":["x-amz-fwd-header-x-amz-restore"],"ServerSideEncryption":["x-amz-fwd-header-x-amz-server-side-encryption"],"SSECustomerAlgorithm":["x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"],"SSEKMSKeyId":["x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"],"SSECustomerKeyMD5":["x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"],"StorageClass":["x-amz-fwd-header-x-amz-storage-class"],"TagCount":["x-amz-fwd-header-x-amz-tagging-count"],"VersionId":["x-amz-fwd-header-x-amz-version-id"],"BucketKeyEnabled":["x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"]} }, S3ClientRequirement) +export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ name: "abortMultipartUpload", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}}, S3ClientRequirement) +export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ name: "completeMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MultipartUpload":["b","CompleteMultipartUpload"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"MpuObjectSize":["x-amz-mp-object-size"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const copyObject = /*@__PURE__*/ makeOperation({ name: "copyObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}}, S3ClientRequirement) +export const createBucket = /*@__PURE__*/ makeOperation({ name: "createBucket", method: "PUT", uri: "/{Bucket}", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CreateBucketConfiguration":["b","CreateBucketConfiguration"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"ObjectLockEnabledForBucket":["x-amz-bucket-object-lock-enabled"]}}, S3ClientRequirement) +export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataConfiguration", method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataConfiguration":["b","MetadataConfiguration"]}}, S3ClientRequirement) +export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataTableConfiguration", method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataTableConfiguration":["b","MetadataTableConfiguration"]}}, S3ClientRequirement) +export const createMultipartUpload = /*@__PURE__*/ makeOperation({ name: "createMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}}, S3ClientRequirement) +export const createSession = /*@__PURE__*/ makeOperation({ name: "createSession", method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":["x-amz-create-session-mode"],"Bucket":["p","Bucket"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"]}}, S3ClientRequirement) +export const deleteBucket = /*@__PURE__*/ makeOperation({ name: "deleteBucket", method: "DELETE", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketAnalyticsConfiguration", method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketCors = /*@__PURE__*/ makeOperation({ name: "deleteBucketCors", method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ name: "deleteBucketEncryption", method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketIntelligentTieringConfiguration", method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketInventoryConfiguration", method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ name: "deleteBucketLifecycle", method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataConfiguration", method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataTableConfiguration", method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetricsConfiguration", method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "deleteBucketOwnershipControls", method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ name: "deleteBucketPolicy", method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ name: "deleteBucketReplication", method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ name: "deleteBucketTagging", method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ name: "deleteBucketWebsite", method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const deleteObject = /*@__PURE__*/ makeOperation({ name: "deleteObject", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MFA":["x-amz-mfa"],"IfMatch":["If-Match"]}}, S3ClientRequirement) +export const deleteObjects = /*@__PURE__*/ makeOperation({ name: "deleteObjects", method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":["p","Bucket"],"Delete":["b","Delete"],"MFA":["x-amz-mfa"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ name: "deleteObjectTagging", method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) +export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "deletePublicAccessBlock", method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAccelerateConfiguration", method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketAcl = /*@__PURE__*/ makeOperation({ name: "getBucketAcl", method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAnalyticsConfiguration", method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketCors = /*@__PURE__*/ makeOperation({ name: "getBucketCors", method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketEncryption = /*@__PURE__*/ makeOperation({ name: "getBucketEncryption", method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketIntelligentTieringConfiguration", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketInventoryConfiguration", method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketLifecycleConfiguration", method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketLocation = /*@__PURE__*/ makeOperation({ name: "getBucketLocation", method: "GET", uri: "/{Bucket}?location", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketLogging = /*@__PURE__*/ makeOperation({ name: "getBucketLogging", method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataConfiguration", method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataTableConfiguration", method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetricsConfiguration", method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketNotificationConfiguration", method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "getBucketOwnershipControls", method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketPolicy = /*@__PURE__*/ makeOperation({ name: "getBucketPolicy", method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ name: "getBucketPolicyStatus", method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketReplication = /*@__PURE__*/ makeOperation({ name: "getBucketReplication", method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "getBucketRequestPayment", method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketTagging = /*@__PURE__*/ makeOperation({ name: "getBucketTagging", method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketVersioning = /*@__PURE__*/ makeOperation({ name: "getBucketVersioning", method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getBucketWebsite = /*@__PURE__*/ makeOperation({ name: "getBucketWebsite", method: "GET", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getObject = /*@__PURE__*/ makeOperation({ name: "getObject", method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const getObjectAcl = /*@__PURE__*/ makeOperation({ name: "getObjectAcl", method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}}, S3ClientRequirement) +export const getObjectAttributes = /*@__PURE__*/ makeOperation({ name: "getObjectAttributes", method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "getObjectLegalHold", method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) +export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "getObjectLockConfiguration", method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const getObjectRetention = /*@__PURE__*/ makeOperation({ name: "getObjectRetention", method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) +export const getObjectTagging = /*@__PURE__*/ makeOperation({ name: "getObjectTagging", method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) +export const getObjectTorrent = /*@__PURE__*/ makeOperation({ name: "getObjectTorrent", method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) +export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "getPublicAccessBlock", method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const headBucket = /*@__PURE__*/ makeOperation({ name: "headBucket", method: "HEAD", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const headObject = /*@__PURE__*/ makeOperation({ name: "headObject", method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketAnalyticsConfigurations", method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketIntelligentTieringConfigurations", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketInventoryConfigurations", method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketMetricsConfigurations", method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listBuckets = /*@__PURE__*/ makeOperation({ name: "listBuckets", method: "GET", uri: "/?x-id=ListBuckets", body: {}}, S3ClientRequirement) +export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ name: "listDirectoryBuckets", method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {}}, S3ClientRequirement) +export const listMultipartUploads = /*@__PURE__*/ makeOperation({ name: "listMultipartUploads", method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listObjects = /*@__PURE__*/ makeOperation({ name: "listObjects", method: "GET", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listObjectsV2 = /*@__PURE__*/ makeOperation({ name: "listObjectsV2", method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listObjectVersions = /*@__PURE__*/ makeOperation({ name: "listObjectVersions", method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) +export const listParts = /*@__PURE__*/ makeOperation({ name: "listParts", method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAccelerateConfiguration", method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"],"AccelerateConfiguration":["b","AccelerateConfiguration"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putBucketAcl = /*@__PURE__*/ makeOperation({ name: "putBucketAcl", method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"]}}, S3ClientRequirement) +export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAnalyticsConfiguration", method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"],"AnalyticsConfiguration":["b","AnalyticsConfiguration"]}}, S3ClientRequirement) +export const putBucketCors = /*@__PURE__*/ makeOperation({ name: "putBucketCors", method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"],"CORSConfiguration":["b","CORSConfiguration"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putBucketEncryption = /*@__PURE__*/ makeOperation({ name: "putBucketEncryption", method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ServerSideEncryptionConfiguration":["b","ServerSideEncryptionConfiguration"]}}, S3ClientRequirement) +export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketIntelligentTieringConfiguration", method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"],"IntelligentTieringConfiguration":["b","IntelligentTieringConfiguration"]}}, S3ClientRequirement) +export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketInventoryConfiguration", method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"],"InventoryConfiguration":["b","InventoryConfiguration"]}}, S3ClientRequirement) +export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketLifecycleConfiguration", method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"LifecycleConfiguration":["b","LifecycleConfiguration"]}}, S3ClientRequirement) +export const putBucketLogging = /*@__PURE__*/ makeOperation({ name: "putBucketLogging", method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"],"BucketLoggingStatus":["b","BucketLoggingStatus"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketMetricsConfiguration", method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"],"MetricsConfiguration":["b","MetricsConfiguration"]}}, S3ClientRequirement) +export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketNotificationConfiguration", method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"],"NotificationConfiguration":["b","NotificationConfiguration"]}}, S3ClientRequirement) +export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "putBucketOwnershipControls", method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"OwnershipControls":["b","OwnershipControls"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putBucketPolicy = /*@__PURE__*/ makeOperation({ name: "putBucketPolicy", method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Policy":["b"]}}, S3ClientRequirement) +export const putBucketReplication = /*@__PURE__*/ makeOperation({ name: "putBucketReplication", method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ReplicationConfiguration":["b","ReplicationConfiguration"],"Token":["x-amz-bucket-object-lock-token"]}}, S3ClientRequirement) +export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "putBucketRequestPayment", method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"RequestPaymentConfiguration":["b","RequestPaymentConfiguration"]}}, S3ClientRequirement) +export const putBucketTagging = /*@__PURE__*/ makeOperation({ name: "putBucketTagging", method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}}, S3ClientRequirement) +export const putBucketVersioning = /*@__PURE__*/ makeOperation({ name: "putBucketVersioning", method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MFA":["x-amz-mfa"],"VersioningConfiguration":["b","VersioningConfiguration"]}}, S3ClientRequirement) +export const putBucketWebsite = /*@__PURE__*/ makeOperation({ name: "putBucketWebsite", method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"WebsiteConfiguration":["b","WebsiteConfiguration"]}}, S3ClientRequirement) +export const putObject = /*@__PURE__*/ makeOperation({ name: "putObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":["x-amz-acl"],"Body":["b"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ContentType":["Content-Type"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Expires":["Expires"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}}, S3ClientRequirement) +export const putObjectAcl = /*@__PURE__*/ makeOperation({ name: "putObjectAcl", method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"]}}, S3ClientRequirement) +export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "putObjectLegalHold", method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"],"LegalHold":["b","LegalHold"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "putObjectLockConfiguration", method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"],"ObjectLockConfiguration":["b","ObjectLockConfiguration"],"Token":["x-amz-bucket-object-lock-token"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putObjectRetention = /*@__PURE__*/ makeOperation({ name: "putObjectRetention", method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"],"Retention":["b","Retention"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const putObjectTagging = /*@__PURE__*/ makeOperation({ name: "putObjectTagging", method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}}, S3ClientRequirement) +export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "putPublicAccessBlock", method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"PublicAccessBlockConfiguration":["b","PublicAccessBlockConfiguration"]}}, S3ClientRequirement) +export const renameObject = /*@__PURE__*/ makeOperation({ name: "renameObject", method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"DestinationIfMatch":["If-Match"],"DestinationIfNoneMatch":["If-None-Match"],"DestinationIfModifiedSince":["If-Modified-Since"],"DestinationIfUnmodifiedSince":["If-Unmodified-Since"],"SourceIfMatch":["x-amz-rename-source-if-match"],"SourceIfNoneMatch":["x-amz-rename-source-if-none-match"],"SourceIfModifiedSince":["x-amz-rename-source-if-modified-since"],"SourceIfUnmodifiedSince":["x-amz-rename-source-if-unmodified-since"]}}, S3ClientRequirement) +export const restoreObject = /*@__PURE__*/ makeOperation({ name: "restoreObject", method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":["p","Bucket"],"Key":["p"],"RestoreRequest":["b","RestoreRequest"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) +export const selectObjectContent = /*@__PURE__*/ makeOperation({ name: "selectObjectContent", method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataInventoryTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"InventoryTableConfiguration":["b","InventoryTableConfiguration"]}}, S3ClientRequirement) +export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataJournalTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"JournalTableConfiguration":["b","JournalTableConfiguration"]}}, S3ClientRequirement) +export const uploadPart = /*@__PURE__*/ makeOperation({ name: "uploadPart", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":["b"],"Bucket":["p","Bucket"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) +export const uploadPartCopy = /*@__PURE__*/ makeOperation({ name: "uploadPartCopy", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}}, S3ClientRequirement) +export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ name: "writeGetObjectResponse", method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":["b"],"StatusCode":["x-amz-fwd-status"],"ErrorCode":["x-amz-fwd-error-code"],"ErrorMessage":["x-amz-fwd-error-message"],"AcceptRanges":["x-amz-fwd-header-accept-ranges"],"CacheControl":["x-amz-fwd-header-Cache-Control"],"ContentDisposition":["x-amz-fwd-header-Content-Disposition"],"ContentEncoding":["x-amz-fwd-header-Content-Encoding"],"ContentLanguage":["x-amz-fwd-header-Content-Language"],"ContentLength":["Content-Length"],"ContentRange":["x-amz-fwd-header-Content-Range"],"ContentType":["x-amz-fwd-header-Content-Type"],"ChecksumCRC32":["x-amz-fwd-header-x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-fwd-header-x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-fwd-header-x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-fwd-header-x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-fwd-header-x-amz-checksum-sha256"],"DeleteMarker":["x-amz-fwd-header-x-amz-delete-marker"],"ETag":["x-amz-fwd-header-ETag"],"Expires":["x-amz-fwd-header-Expires"],"Expiration":["x-amz-fwd-header-x-amz-expiration"],"LastModified":["x-amz-fwd-header-Last-Modified"],"MissingMeta":["x-amz-fwd-header-x-amz-missing-meta"],"ObjectLockMode":["x-amz-fwd-header-x-amz-object-lock-mode"],"ObjectLockLegalHoldStatus":["x-amz-fwd-header-x-amz-object-lock-legal-hold"],"ObjectLockRetainUntilDate":["x-amz-fwd-header-x-amz-object-lock-retain-until-date"],"PartsCount":["x-amz-fwd-header-x-amz-mp-parts-count"],"ReplicationStatus":["x-amz-fwd-header-x-amz-replication-status"],"RequestCharged":["x-amz-fwd-header-x-amz-request-charged"],"Restore":["x-amz-fwd-header-x-amz-restore"],"ServerSideEncryption":["x-amz-fwd-header-x-amz-server-side-encryption"],"SSECustomerAlgorithm":["x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"],"SSEKMSKeyId":["x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"],"SSECustomerKeyMD5":["x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"],"StorageClass":["x-amz-fwd-header-x-amz-storage-class"],"TagCount":["x-amz-fwd-header-x-amz-tagging-count"],"VersionId":["x-amz-fwd-header-x-amz-version-id"],"BucketKeyEnabled":["x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"]}}, S3ClientRequirement) //==== Aliased Types ==== type NoSuchUpload = {}; diff --git a/src/protocols/rest-xml.ts b/src/protocols/rest-xml.ts index 21472a45..90b492cb 100644 --- a/src/protocols/rest-xml.ts +++ b/src/protocols/rest-xml.ts @@ -1,53 +1,140 @@ -import { Effect, Match } from "effect"; +import { Effect } from "effect"; +import { HttpClient } from "@effect/platform"; import type { ServiceMetadata } from "../service-metadata"; import { Credentials } from "../credentials"; - -export type ClientConfig = {}; +import { Region } from "../region"; +//todo(pear): this is a massive 7kb +import { XMLBuilder, XMLParser } from "fast-xml-parser"; +//todo(pear): this is a massive 7kb +import { AwsV4Signer } from "aws4fetch"; //todo(pear): make these single letter variables export type EndpointMetadata = { - method: string; //todo(pear): narrower type - uri: string; - //* p: => path, b: => body, default string => header; missing => header x-amz- - // body: Record; - body: Record; + name: string; + method: string; //* method => //todo(pear): narrower type + uri: string; //* uri + body: Record; //* body + isStream?: boolean; }; -export const restXmlProvider = Effect.fn(function* ( - clientConfig: ClientConfig, - metadata: ServiceMetadata, -) { +//todo(pear): there is stuff here that could be shared across protocols +export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { const credentials = yield* Credentials; + const region = yield* Region; + const builder = new XMLBuilder(); + const parser = new XMLParser(); + const httpClient = yield* HttpClient.HttpClient; + return { call: (endpointMetadata: EndpointMetadata) => Effect.fn(function* (input: Record) { - let url = endpointMetadata.uri; - const body: Record = {}; - const headers: Record = {}; + let uri = endpointMetadata.uri; + const rawBody: Record = {}; + const unsignedHeaders: Record = { + "User-Agent": "itty-aws", + }; for (const key in input) { const value = input[key]; const meta = endpointMetadata.body[key]; if (!meta) { - headers[ + unsignedHeaders[ `x-amz-${key .replace(/([A-Z])/g, "-$1") .toLowerCase() .slice(1)}` ] = value; } else if (meta[0] === "p") { - url = url - .replace(`{${key}}`, `${value}`) - .replace(`{${key}+}`, `${value}`); + uri = uri.replace( + new RegExp(`{${meta[1] ?? key}\\+?}`), + `${value}`, + ); } else if (meta[0] === "b") { - body[meta[1]!] = value; + rawBody[meta[1] ?? key] = value; } else { - headers[meta[0]] = value; + unsignedHeaders[meta[0]] = value; } } - console.log({ url, body, headers }); + const unsignedBody = builder.build(rawBody); + + //todo(pear): more url options? + const baseUrl = `https://${metadata.sdkId.toLowerCase()}.${region}.amazonaws.com`; + let unsignedUrl = `${baseUrl}${uri}`; + + const creds = yield* credentials.getCredentials(); + const signer = new AwsV4Signer({ + method: endpointMetadata.method, + url: unsignedUrl, + headers: unsignedHeaders, + body: + endpointMetadata.method === "GET" || + endpointMetadata.method === "DELETE" + ? undefined + : unsignedBody, + accessKeyId: creds.accessKeyId, + secretAccessKey: creds.secretAccessKey, + sessionToken: creds.sessionToken, + service: metadata.sigV4ServiceName, + region, + }); + + //todo(pear): better error + const signedRequest = yield* Effect.promise(() => signer.sign()); + + yield* Effect.logDebug( + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - request info:`, + { + method: signedRequest.method, + url: signedRequest.url.toString(), + headers: signedRequest.headers, + body: signedRequest.body, + }, + ); + + //todo(pear): better error + const response = yield* httpClient[ + (signedRequest.method === "DELETE" + ? "del" + : signedRequest.method.toLowerCase()) as + | "get" + | "post" + | "put" + | "del" + | "patch" + | "head" + | "options" + ](signedRequest.url, { + headers: signedRequest.headers, + body: signedRequest.body, + }); + + yield* Effect.logDebug( + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - response code: ${response.status}`, + ); + + if (response.status >= 200 && response.status < 300) { + //convert to response type + yield* Effect.logDebug( + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - response headers: ${JSON.stringify(response.headers)}`, + ); + return yield* response.text; + } else { + const text = yield* response.text; + + yield* Effect.logDebug( + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - error:`, + text, + ); + + const parsedResponse = parser.parse(text); + + yield* Effect.logDebug( + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - error:`, + parsedResponse, + ); + } yield* Effect.void; }), diff --git a/src/region.ts b/src/region.ts new file mode 100644 index 00000000..28cb0aaa --- /dev/null +++ b/src/region.ts @@ -0,0 +1,39 @@ +import { Context } from "effect"; + +export type AWSRegion = + | "us-east-1" + | "us-east-2" + | "us-west-1" + | "us-west-2" + | "af-south-1" + | "ap-east-1" + | "ap-south-2" + | "ap-southeast-3" + | "ap-southeast-5" + | "ap-southeast-4" + | "ap-south-1" + | "ap-southeast-6" + | "ap-northeast-3" + | "ap-northeast-2" + | "ap-southeast-1" + | "ap-southeast-2" + | "ap-east-2" + | "ap-southeast-7" + | "ap-northeast-1" + | "ca-central-1" + | "ca-west-1" + | "eu-central-1" + | "eu-west-1" + | "eu-west-2" + | "eu-south-1" + | "eu-west-3" + | "eu-south-2" + | "eu-north-1" + | "eu-central-2" + | "il-central-1" + | "mx-central-1" + | "me-south-1" + | "me-central-1" + | "sa-east-1"; + +export class Region extends Context.Tag("Region")() {} From 0f87789d4e4720e91d477a3b78dacb8348991a3d Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:30:04 -0500 Subject: [PATCH 4/8] feat: error parsing --- playground-itty.ts | 30 +++-- scripts/generate-clients.ts | 36 ++++-- src/aws-errors.ts | 83 ++++++++++--- src/clients.gen/s3.ts | 238 ++++++++++++++++++------------------ src/protocols/rest-xml.ts | 54 +++++++- todo.md | 8 ++ 6 files changed, 286 insertions(+), 163 deletions(-) diff --git a/playground-itty.ts b/playground-itty.ts index 49284358..96182e83 100644 --- a/playground-itty.ts +++ b/playground-itty.ts @@ -5,20 +5,24 @@ import { NodeProviderChainCredentialsLive } from "./src/credentials"; import { Region } from "./src/region"; import { FetchHttpClient } from "@effect/platform"; +const BUCKET_NAME = "alchemy-7uzxjcr"; + const program = Effect.gen(function* () { - const result = yield* S3.createBucket({ - Bucket: "alchemy-7uzxjcr", - ACL: "private", - GrantWrite: "", - CreateBucketConfiguration: { - Tags: [ - { - Key: "Name", - Value: "Alchemy", - }, - ], - }, - }); + // const result = yield* S3.createBucket({ + // Bucket: "alchemy-7uzxjcr", + // }); + const result = yield* S3.getObject({ + Bucket: BUCKET_NAME, + Key: "test.txt", + }).pipe( + Effect.catchTag( + "InvalidObjectStateError", + Effect.fn(function* (e) { + yield* Effect.logError(e.StorageClass); + yield* Effect.logError(e); + }), + ), + ); yield* Effect.logDebug(result); }); diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts index 1fe2d682..21181bc7 100644 --- a/scripts/generate-clients.ts +++ b/scripts/generate-clients.ts @@ -9,7 +9,6 @@ import { Context, Match, Ref, - Equivalence, } from "effect"; import { SmithyModel, @@ -324,13 +323,20 @@ const generateClient = Effect.fn(function* ( "operation", ); - const errors = yield* Effect.all( - (operationShape.errors ?? []).map(({ target: errorShapeId }) => - findShape(errorShapeId).pipe( - Effect.flatMap(convertShapeToTypescript), - //todo(pear): error categories - Effect.flatMap(createTsError(errorShapeId)), - ), + const errorObject = yield* Effect.all( + (operationShape.errors ?? []).map( + Effect.fn(function* ({ target: errorShapeId }) { + const shape = yield* findShape(errorShapeId, "structure"); + const ts = yield* convertShapeToTypescript(shape); + const tsError = yield* createTsError(errorShapeId)(ts); + const tag = formatName(shape[0]); + return { + tsError, + errorFormat: { + [tag]: Object.keys(shape[1].members), + }, + }; + }), ), ); @@ -413,15 +419,18 @@ const generateClient = Effect.fn(function* ( }, ); - errors.push("CommonAwsError"); - const exportName = formatName(operationId, true); const traits = operationShape.traits["smithy.api#http"]; //todo(pear): support streaming + inline output types - const endpointMeta = `{ name: "${exportName}", method: "${traits.method}", uri: "${traits.uri}", body: ${JSON.stringify(body)}}`; + const endpointMeta = `{ name: "${exportName}", method: "${traits.method}", uri: "${traits.uri}", body: ${JSON.stringify(body)}, errors: ${JSON.stringify( + errorObject.reduce( + (acc, error) => ({ ...acc, ...error.errorFormat }), + {}, + ), + )}}`; - return `export const ${exportName} = /*@__PURE__*/ makeOperation<${inputType}, ${outputType}, ${errors.join(" | ")}, typeof ${serviceName}>(${endpointMeta}, ${serviceName})`; + return `export const ${exportName} = /*@__PURE__*/ makeOperation<${inputType}, ${outputType}, ${errorObject.map((e) => e.tsError).join(" | ")}${errorObject.length > 0 ? " | " : ""}CommonAwsError, typeof ${serviceName}>(${endpointMeta}, ${serviceName})`; // return `export const ${formatName(operationId)} = (inputs: ${inputShape}) => Effect.Effect<${outputShape}, ${errors.join(" | ")}>`; }), ); @@ -439,7 +448,8 @@ const generateClient = Effect.fn(function* ( Array.from(t.entries()) .map( ([errorName, type]) => - `export declare class ${errorName} extends S.TaggedError<${type}>()(("${errorName}"), {}).pipe() {}`, + // `export declare class ${errorName} extends S.TaggedError<${type}>()(("${errorName}"), {}).pipe() {}`, + `export declare class ${errorName} extends Data.TaggedError("${errorName}")<${type}> {}`, ) .join("\n"), ), diff --git a/src/aws-errors.ts b/src/aws-errors.ts index 0bc0a48d..2257ed5d 100644 --- a/src/aws-errors.ts +++ b/src/aws-errors.ts @@ -20,122 +20,171 @@ export type CommonAwsError = | ValidationError | ValidationException; +const COMMON_ERRORS = [ + "AccessDeniedException", + "ExpiredTokenException", + "IncompleteSignature", + "InternalFailure", + "MalformedHttpRequestException", + "NotAuthorized", + "OptInRequired", + "RequestAbortedException", + "RequestEntityTooLargeException", + "RequestExpired", + "RequestTimeoutException", + "ServiceUnavailable", + "ThrottlingException", + "UnrecognizedClientException", + "UnknownOperationException", + "ValidationError", + "ValidationException", +]; + //==== Common AWS Errors ==== -export class AccessDeniedException extends S.TaggedError()( +export declare class AccessDeniedException extends S.TaggedError()( "AccessDeniedException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class ExpiredTokenException extends S.TaggedError()( +export declare class ExpiredTokenException extends S.TaggedError()( "ExpiredTokenException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class IncompleteSignature extends S.TaggedError()( +export declare class IncompleteSignature extends S.TaggedError()( "IncompleteSignature", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class InternalFailure extends S.TaggedError()( +export declare class InternalFailure extends S.TaggedError()( "InternalFailure", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class MalformedHttpRequestException extends S.TaggedError()( +export declare class MalformedHttpRequestException extends S.TaggedError()( "MalformedHttpRequestException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class NotAuthorized extends S.TaggedError()( +export declare class NotAuthorized extends S.TaggedError()( "NotAuthorized", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class OptInRequired extends S.TaggedError()( +export declare class OptInRequired extends S.TaggedError()( "OptInRequired", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class RequestAbortedException extends S.TaggedError()( +export declare class RequestAbortedException extends S.TaggedError()( "RequestAbortedException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class RequestEntityTooLargeException extends S.TaggedError()( +export declare class RequestEntityTooLargeException extends S.TaggedError()( "RequestEntityTooLargeException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class RequestExpired extends S.TaggedError()( +export declare class RequestExpired extends S.TaggedError()( "RequestExpired", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class RequestTimeoutException extends S.TaggedError()( +export declare class RequestTimeoutException extends S.TaggedError()( "RequestTimeoutException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class ServiceUnavailable extends S.TaggedError()( +export declare class ServiceUnavailable extends S.TaggedError()( "ServiceUnavailable", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class ThrottlingException extends S.TaggedError()( +export declare class ThrottlingException extends S.TaggedError()( "ThrottlingException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class UnrecognizedClientException extends S.TaggedError()( +export declare class UnrecognizedClientException extends S.TaggedError()( "UnrecognizedClientException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class UnknownOperationException extends S.TaggedError()( +export declare class UnknownOperationException extends S.TaggedError()( "UnknownOperationException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class ValidationError extends S.TaggedError()( +export declare class ValidationError extends S.TaggedError()( "ValidationError", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} -export class ValidationException extends S.TaggedError()( +export declare class ValidationException extends S.TaggedError()( "ValidationException", {}, ).pipe( withCategory(ERROR_CATEGORIES.AWS_ERROR, ERROR_CATEGORIES.COMMON_ERROR), ) {} + +//===================== + +export class UnknownAwsError extends S.TaggedError()( + "UnknownAwsError", + { + key: S.String, + data: S.Unknown, + }, +).pipe(withCategory(ERROR_CATEGORIES.AWS_ERROR)) {} + +//===================== + +export function createDynamicTaggedError( + tag: string, + errorData: Record, +) { + const categories: Array = [ERROR_CATEGORIES.AWS_ERROR]; + + if (COMMON_ERRORS.includes(tag)) { + categories.push(ERROR_CATEGORIES.COMMON_ERROR); + } + + return new (S.TaggedError()( + `${tag}Error`, + Object.fromEntries(Object.keys(errorData).map((k) => [k, S.Unknown])), + //@ts-expect-error + ).pipe(withCategory(...categories)))(errorData); +} diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts index 9e3d3b8a..0479f715 100644 --- a/src/clients.gen/s3.ts +++ b/src/clients.gen/s3.ts @@ -1,4 +1,4 @@ -import { type Effect, Layer, Context, Schema as S } from "effect"; +import { type Effect, Layer, Context, Data } from "effect"; import type { CommonAwsError } from "../aws-errors"; import { makeOperation } from "../client"; import { restXmlProvider, type EndpointMetadata } from "../protocols/rest-xml"; @@ -9,110 +9,110 @@ export const metadata = {"protocol":"aws.protocols#restXml","sdkId":"S3","sigV4S export class S3ClientRequirement extends Context.Tag("S3ClientRequirement") (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {} export const clientLive = Layer.effect(S3ClientRequirement, restXmlProvider(metadata)); -export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ name: "abortMultipartUpload", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}}, S3ClientRequirement) -export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ name: "completeMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MultipartUpload":["b","CompleteMultipartUpload"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"MpuObjectSize":["x-amz-mp-object-size"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const copyObject = /*@__PURE__*/ makeOperation({ name: "copyObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}}, S3ClientRequirement) -export const createBucket = /*@__PURE__*/ makeOperation({ name: "createBucket", method: "PUT", uri: "/{Bucket}", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CreateBucketConfiguration":["b","CreateBucketConfiguration"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"ObjectLockEnabledForBucket":["x-amz-bucket-object-lock-enabled"]}}, S3ClientRequirement) -export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataConfiguration", method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataConfiguration":["b","MetadataConfiguration"]}}, S3ClientRequirement) -export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataTableConfiguration", method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataTableConfiguration":["b","MetadataTableConfiguration"]}}, S3ClientRequirement) -export const createMultipartUpload = /*@__PURE__*/ makeOperation({ name: "createMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}}, S3ClientRequirement) -export const createSession = /*@__PURE__*/ makeOperation({ name: "createSession", method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":["x-amz-create-session-mode"],"Bucket":["p","Bucket"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"]}}, S3ClientRequirement) -export const deleteBucket = /*@__PURE__*/ makeOperation({ name: "deleteBucket", method: "DELETE", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketAnalyticsConfiguration", method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketCors = /*@__PURE__*/ makeOperation({ name: "deleteBucketCors", method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ name: "deleteBucketEncryption", method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketIntelligentTieringConfiguration", method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketInventoryConfiguration", method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ name: "deleteBucketLifecycle", method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataConfiguration", method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataTableConfiguration", method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetricsConfiguration", method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "deleteBucketOwnershipControls", method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ name: "deleteBucketPolicy", method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ name: "deleteBucketReplication", method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ name: "deleteBucketTagging", method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ name: "deleteBucketWebsite", method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const deleteObject = /*@__PURE__*/ makeOperation({ name: "deleteObject", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MFA":["x-amz-mfa"],"IfMatch":["If-Match"]}}, S3ClientRequirement) -export const deleteObjects = /*@__PURE__*/ makeOperation({ name: "deleteObjects", method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":["p","Bucket"],"Delete":["b","Delete"],"MFA":["x-amz-mfa"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ name: "deleteObjectTagging", method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) -export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "deletePublicAccessBlock", method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAccelerateConfiguration", method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketAcl = /*@__PURE__*/ makeOperation({ name: "getBucketAcl", method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAnalyticsConfiguration", method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketCors = /*@__PURE__*/ makeOperation({ name: "getBucketCors", method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketEncryption = /*@__PURE__*/ makeOperation({ name: "getBucketEncryption", method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketIntelligentTieringConfiguration", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketInventoryConfiguration", method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketLifecycleConfiguration", method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketLocation = /*@__PURE__*/ makeOperation({ name: "getBucketLocation", method: "GET", uri: "/{Bucket}?location", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketLogging = /*@__PURE__*/ makeOperation({ name: "getBucketLogging", method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataConfiguration", method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataTableConfiguration", method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetricsConfiguration", method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketNotificationConfiguration", method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "getBucketOwnershipControls", method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketPolicy = /*@__PURE__*/ makeOperation({ name: "getBucketPolicy", method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ name: "getBucketPolicyStatus", method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketReplication = /*@__PURE__*/ makeOperation({ name: "getBucketReplication", method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "getBucketRequestPayment", method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketTagging = /*@__PURE__*/ makeOperation({ name: "getBucketTagging", method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketVersioning = /*@__PURE__*/ makeOperation({ name: "getBucketVersioning", method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getBucketWebsite = /*@__PURE__*/ makeOperation({ name: "getBucketWebsite", method: "GET", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getObject = /*@__PURE__*/ makeOperation({ name: "getObject", method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const getObjectAcl = /*@__PURE__*/ makeOperation({ name: "getObjectAcl", method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}}, S3ClientRequirement) -export const getObjectAttributes = /*@__PURE__*/ makeOperation({ name: "getObjectAttributes", method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "getObjectLegalHold", method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) -export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "getObjectLockConfiguration", method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const getObjectRetention = /*@__PURE__*/ makeOperation({ name: "getObjectRetention", method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) -export const getObjectTagging = /*@__PURE__*/ makeOperation({ name: "getObjectTagging", method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) -export const getObjectTorrent = /*@__PURE__*/ makeOperation({ name: "getObjectTorrent", method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":["p","Bucket"],"Key":["p"]}}, S3ClientRequirement) -export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "getPublicAccessBlock", method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const headBucket = /*@__PURE__*/ makeOperation({ name: "headBucket", method: "HEAD", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const headObject = /*@__PURE__*/ makeOperation({ name: "headObject", method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketAnalyticsConfigurations", method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketIntelligentTieringConfigurations", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketInventoryConfigurations", method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketMetricsConfigurations", method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listBuckets = /*@__PURE__*/ makeOperation({ name: "listBuckets", method: "GET", uri: "/?x-id=ListBuckets", body: {}}, S3ClientRequirement) -export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ name: "listDirectoryBuckets", method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {}}, S3ClientRequirement) -export const listMultipartUploads = /*@__PURE__*/ makeOperation({ name: "listMultipartUploads", method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listObjects = /*@__PURE__*/ makeOperation({ name: "listObjects", method: "GET", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listObjectsV2 = /*@__PURE__*/ makeOperation({ name: "listObjectsV2", method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listObjectVersions = /*@__PURE__*/ makeOperation({ name: "listObjectVersions", method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":["p","Bucket"]}}, S3ClientRequirement) -export const listParts = /*@__PURE__*/ makeOperation({ name: "listParts", method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAccelerateConfiguration", method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"],"AccelerateConfiguration":["b","AccelerateConfiguration"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putBucketAcl = /*@__PURE__*/ makeOperation({ name: "putBucketAcl", method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"]}}, S3ClientRequirement) -export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAnalyticsConfiguration", method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"],"AnalyticsConfiguration":["b","AnalyticsConfiguration"]}}, S3ClientRequirement) -export const putBucketCors = /*@__PURE__*/ makeOperation({ name: "putBucketCors", method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"],"CORSConfiguration":["b","CORSConfiguration"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putBucketEncryption = /*@__PURE__*/ makeOperation({ name: "putBucketEncryption", method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ServerSideEncryptionConfiguration":["b","ServerSideEncryptionConfiguration"]}}, S3ClientRequirement) -export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketIntelligentTieringConfiguration", method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"],"IntelligentTieringConfiguration":["b","IntelligentTieringConfiguration"]}}, S3ClientRequirement) -export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketInventoryConfiguration", method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"],"InventoryConfiguration":["b","InventoryConfiguration"]}}, S3ClientRequirement) -export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketLifecycleConfiguration", method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"LifecycleConfiguration":["b","LifecycleConfiguration"]}}, S3ClientRequirement) -export const putBucketLogging = /*@__PURE__*/ makeOperation({ name: "putBucketLogging", method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"],"BucketLoggingStatus":["b","BucketLoggingStatus"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketMetricsConfiguration", method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"],"MetricsConfiguration":["b","MetricsConfiguration"]}}, S3ClientRequirement) -export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketNotificationConfiguration", method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"],"NotificationConfiguration":["b","NotificationConfiguration"]}}, S3ClientRequirement) -export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "putBucketOwnershipControls", method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"OwnershipControls":["b","OwnershipControls"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putBucketPolicy = /*@__PURE__*/ makeOperation({ name: "putBucketPolicy", method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Policy":["b"]}}, S3ClientRequirement) -export const putBucketReplication = /*@__PURE__*/ makeOperation({ name: "putBucketReplication", method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ReplicationConfiguration":["b","ReplicationConfiguration"],"Token":["x-amz-bucket-object-lock-token"]}}, S3ClientRequirement) -export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "putBucketRequestPayment", method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"RequestPaymentConfiguration":["b","RequestPaymentConfiguration"]}}, S3ClientRequirement) -export const putBucketTagging = /*@__PURE__*/ makeOperation({ name: "putBucketTagging", method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}}, S3ClientRequirement) -export const putBucketVersioning = /*@__PURE__*/ makeOperation({ name: "putBucketVersioning", method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MFA":["x-amz-mfa"],"VersioningConfiguration":["b","VersioningConfiguration"]}}, S3ClientRequirement) -export const putBucketWebsite = /*@__PURE__*/ makeOperation({ name: "putBucketWebsite", method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"WebsiteConfiguration":["b","WebsiteConfiguration"]}}, S3ClientRequirement) -export const putObject = /*@__PURE__*/ makeOperation({ name: "putObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":["x-amz-acl"],"Body":["b"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ContentType":["Content-Type"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Expires":["Expires"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}}, S3ClientRequirement) -export const putObjectAcl = /*@__PURE__*/ makeOperation({ name: "putObjectAcl", method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"]}}, S3ClientRequirement) -export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "putObjectLegalHold", method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"],"LegalHold":["b","LegalHold"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "putObjectLockConfiguration", method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"],"ObjectLockConfiguration":["b","ObjectLockConfiguration"],"Token":["x-amz-bucket-object-lock-token"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putObjectRetention = /*@__PURE__*/ makeOperation({ name: "putObjectRetention", method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"],"Retention":["b","Retention"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const putObjectTagging = /*@__PURE__*/ makeOperation({ name: "putObjectTagging", method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}}, S3ClientRequirement) -export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "putPublicAccessBlock", method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"PublicAccessBlockConfiguration":["b","PublicAccessBlockConfiguration"]}}, S3ClientRequirement) -export const renameObject = /*@__PURE__*/ makeOperation({ name: "renameObject", method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"DestinationIfMatch":["If-Match"],"DestinationIfNoneMatch":["If-None-Match"],"DestinationIfModifiedSince":["If-Modified-Since"],"DestinationIfUnmodifiedSince":["If-Unmodified-Since"],"SourceIfMatch":["x-amz-rename-source-if-match"],"SourceIfNoneMatch":["x-amz-rename-source-if-none-match"],"SourceIfModifiedSince":["x-amz-rename-source-if-modified-since"],"SourceIfUnmodifiedSince":["x-amz-rename-source-if-unmodified-since"]}}, S3ClientRequirement) -export const restoreObject = /*@__PURE__*/ makeOperation({ name: "restoreObject", method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":["p","Bucket"],"Key":["p"],"RestoreRequest":["b","RestoreRequest"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}}, S3ClientRequirement) -export const selectObjectContent = /*@__PURE__*/ makeOperation({ name: "selectObjectContent", method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataInventoryTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"InventoryTableConfiguration":["b","InventoryTableConfiguration"]}}, S3ClientRequirement) -export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataJournalTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"JournalTableConfiguration":["b","JournalTableConfiguration"]}}, S3ClientRequirement) -export const uploadPart = /*@__PURE__*/ makeOperation({ name: "uploadPart", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":["b"],"Bucket":["p","Bucket"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}}, S3ClientRequirement) -export const uploadPartCopy = /*@__PURE__*/ makeOperation({ name: "uploadPartCopy", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}}, S3ClientRequirement) -export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ name: "writeGetObjectResponse", method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":["b"],"StatusCode":["x-amz-fwd-status"],"ErrorCode":["x-amz-fwd-error-code"],"ErrorMessage":["x-amz-fwd-error-message"],"AcceptRanges":["x-amz-fwd-header-accept-ranges"],"CacheControl":["x-amz-fwd-header-Cache-Control"],"ContentDisposition":["x-amz-fwd-header-Content-Disposition"],"ContentEncoding":["x-amz-fwd-header-Content-Encoding"],"ContentLanguage":["x-amz-fwd-header-Content-Language"],"ContentLength":["Content-Length"],"ContentRange":["x-amz-fwd-header-Content-Range"],"ContentType":["x-amz-fwd-header-Content-Type"],"ChecksumCRC32":["x-amz-fwd-header-x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-fwd-header-x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-fwd-header-x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-fwd-header-x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-fwd-header-x-amz-checksum-sha256"],"DeleteMarker":["x-amz-fwd-header-x-amz-delete-marker"],"ETag":["x-amz-fwd-header-ETag"],"Expires":["x-amz-fwd-header-Expires"],"Expiration":["x-amz-fwd-header-x-amz-expiration"],"LastModified":["x-amz-fwd-header-Last-Modified"],"MissingMeta":["x-amz-fwd-header-x-amz-missing-meta"],"ObjectLockMode":["x-amz-fwd-header-x-amz-object-lock-mode"],"ObjectLockLegalHoldStatus":["x-amz-fwd-header-x-amz-object-lock-legal-hold"],"ObjectLockRetainUntilDate":["x-amz-fwd-header-x-amz-object-lock-retain-until-date"],"PartsCount":["x-amz-fwd-header-x-amz-mp-parts-count"],"ReplicationStatus":["x-amz-fwd-header-x-amz-replication-status"],"RequestCharged":["x-amz-fwd-header-x-amz-request-charged"],"Restore":["x-amz-fwd-header-x-amz-restore"],"ServerSideEncryption":["x-amz-fwd-header-x-amz-server-side-encryption"],"SSECustomerAlgorithm":["x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"],"SSEKMSKeyId":["x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"],"SSECustomerKeyMD5":["x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"],"StorageClass":["x-amz-fwd-header-x-amz-storage-class"],"TagCount":["x-amz-fwd-header-x-amz-tagging-count"],"VersionId":["x-amz-fwd-header-x-amz-version-id"],"BucketKeyEnabled":["x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"]}}, S3ClientRequirement) +export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ name: "abortMultipartUpload", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}, errors: {"NoSuchUpload":[]}}, S3ClientRequirement) +export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ name: "completeMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MultipartUpload":["b","CompleteMultipartUpload"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"MpuObjectSize":["x-amz-mp-object-size"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) +export const copyObject = /*@__PURE__*/ makeOperation({ name: "copyObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}, errors: {"ObjectNotInActiveTierError":[]}}, S3ClientRequirement) +export const createBucket = /*@__PURE__*/ makeOperation({ name: "createBucket", method: "PUT", uri: "/{Bucket}", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CreateBucketConfiguration":["b","CreateBucketConfiguration"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"ObjectLockEnabledForBucket":["x-amz-bucket-object-lock-enabled"]}, errors: {"BucketAlreadyExists":[],"BucketAlreadyOwnedByYou":[]}}, S3ClientRequirement) +export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataConfiguration", method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataConfiguration":["b","MetadataConfiguration"]}, errors: {}}, S3ClientRequirement) +export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataTableConfiguration", method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataTableConfiguration":["b","MetadataTableConfiguration"]}, errors: {}}, S3ClientRequirement) +export const createMultipartUpload = /*@__PURE__*/ makeOperation({ name: "createMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}, errors: {}}, S3ClientRequirement) +export const createSession = /*@__PURE__*/ makeOperation({ name: "createSession", method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":["x-amz-create-session-mode"],"Bucket":["p","Bucket"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"]}, errors: {"NoSuchBucket":[]}}, S3ClientRequirement) +export const deleteBucket = /*@__PURE__*/ makeOperation({ name: "deleteBucket", method: "DELETE", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketAnalyticsConfiguration", method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketCors = /*@__PURE__*/ makeOperation({ name: "deleteBucketCors", method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ name: "deleteBucketEncryption", method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketIntelligentTieringConfiguration", method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketInventoryConfiguration", method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ name: "deleteBucketLifecycle", method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataConfiguration", method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataTableConfiguration", method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetricsConfiguration", method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "deleteBucketOwnershipControls", method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ name: "deleteBucketPolicy", method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ name: "deleteBucketReplication", method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ name: "deleteBucketTagging", method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ name: "deleteBucketWebsite", method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const deleteObject = /*@__PURE__*/ makeOperation({ name: "deleteObject", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MFA":["x-amz-mfa"],"IfMatch":["If-Match"]}, errors: {}}, S3ClientRequirement) +export const deleteObjects = /*@__PURE__*/ makeOperation({ name: "deleteObjects", method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":["p","Bucket"],"Delete":["b","Delete"],"MFA":["x-amz-mfa"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ name: "deleteObjectTagging", method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) +export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "deletePublicAccessBlock", method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAccelerateConfiguration", method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketAcl = /*@__PURE__*/ makeOperation({ name: "getBucketAcl", method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAnalyticsConfiguration", method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketCors = /*@__PURE__*/ makeOperation({ name: "getBucketCors", method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketEncryption = /*@__PURE__*/ makeOperation({ name: "getBucketEncryption", method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketIntelligentTieringConfiguration", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketInventoryConfiguration", method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketLifecycleConfiguration", method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketLocation = /*@__PURE__*/ makeOperation({ name: "getBucketLocation", method: "GET", uri: "/{Bucket}?location", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketLogging = /*@__PURE__*/ makeOperation({ name: "getBucketLogging", method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataConfiguration", method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataTableConfiguration", method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetricsConfiguration", method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketNotificationConfiguration", method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "getBucketOwnershipControls", method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketPolicy = /*@__PURE__*/ makeOperation({ name: "getBucketPolicy", method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ name: "getBucketPolicyStatus", method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketReplication = /*@__PURE__*/ makeOperation({ name: "getBucketReplication", method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "getBucketRequestPayment", method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketTagging = /*@__PURE__*/ makeOperation({ name: "getBucketTagging", method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketVersioning = /*@__PURE__*/ makeOperation({ name: "getBucketVersioning", method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getBucketWebsite = /*@__PURE__*/ makeOperation({ name: "getBucketWebsite", method: "GET", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getObject = /*@__PURE__*/ makeOperation({ name: "getObject", method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {"InvalidObjectState":["StorageClass","AccessTier"],"NoSuchKey":[]}}, S3ClientRequirement) +export const getObjectAcl = /*@__PURE__*/ makeOperation({ name: "getObjectAcl", method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}, errors: {"NoSuchKey":[]}}, S3ClientRequirement) +export const getObjectAttributes = /*@__PURE__*/ makeOperation({ name: "getObjectAttributes", method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {"NoSuchKey":[]}}, S3ClientRequirement) +export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "getObjectLegalHold", method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) +export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "getObjectLockConfiguration", method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const getObjectRetention = /*@__PURE__*/ makeOperation({ name: "getObjectRetention", method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) +export const getObjectTagging = /*@__PURE__*/ makeOperation({ name: "getObjectTagging", method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) +export const getObjectTorrent = /*@__PURE__*/ makeOperation({ name: "getObjectTorrent", method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) +export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "getPublicAccessBlock", method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const headBucket = /*@__PURE__*/ makeOperation({ name: "headBucket", method: "HEAD", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}, errors: {"NotFound":[]}}, S3ClientRequirement) +export const headObject = /*@__PURE__*/ makeOperation({ name: "headObject", method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {"NotFound":[]}}, S3ClientRequirement) +export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketAnalyticsConfigurations", method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketIntelligentTieringConfigurations", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketInventoryConfigurations", method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketMetricsConfigurations", method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const listBuckets = /*@__PURE__*/ makeOperation({ name: "listBuckets", method: "GET", uri: "/?x-id=ListBuckets", body: {}, errors: {}}, S3ClientRequirement) +export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ name: "listDirectoryBuckets", method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {}, errors: {}}, S3ClientRequirement) +export const listMultipartUploads = /*@__PURE__*/ makeOperation({ name: "listMultipartUploads", method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const listObjects = /*@__PURE__*/ makeOperation({ name: "listObjects", method: "GET", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}, errors: {"NoSuchBucket":[]}}, S3ClientRequirement) +export const listObjectsV2 = /*@__PURE__*/ makeOperation({ name: "listObjectsV2", method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":["p","Bucket"]}, errors: {"NoSuchBucket":[]}}, S3ClientRequirement) +export const listObjectVersions = /*@__PURE__*/ makeOperation({ name: "listObjectVersions", method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) +export const listParts = /*@__PURE__*/ makeOperation({ name: "listParts", method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) +export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAccelerateConfiguration", method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"],"AccelerateConfiguration":["b","AccelerateConfiguration"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putBucketAcl = /*@__PURE__*/ makeOperation({ name: "putBucketAcl", method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"]}, errors: {}}, S3ClientRequirement) +export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAnalyticsConfiguration", method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"],"AnalyticsConfiguration":["b","AnalyticsConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketCors = /*@__PURE__*/ makeOperation({ name: "putBucketCors", method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"],"CORSConfiguration":["b","CORSConfiguration"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putBucketEncryption = /*@__PURE__*/ makeOperation({ name: "putBucketEncryption", method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ServerSideEncryptionConfiguration":["b","ServerSideEncryptionConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketIntelligentTieringConfiguration", method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"],"IntelligentTieringConfiguration":["b","IntelligentTieringConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketInventoryConfiguration", method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"],"InventoryConfiguration":["b","InventoryConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketLifecycleConfiguration", method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"LifecycleConfiguration":["b","LifecycleConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketLogging = /*@__PURE__*/ makeOperation({ name: "putBucketLogging", method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"],"BucketLoggingStatus":["b","BucketLoggingStatus"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketMetricsConfiguration", method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"],"MetricsConfiguration":["b","MetricsConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketNotificationConfiguration", method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"],"NotificationConfiguration":["b","NotificationConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "putBucketOwnershipControls", method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"OwnershipControls":["b","OwnershipControls"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putBucketPolicy = /*@__PURE__*/ makeOperation({ name: "putBucketPolicy", method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Policy":["b"]}, errors: {}}, S3ClientRequirement) +export const putBucketReplication = /*@__PURE__*/ makeOperation({ name: "putBucketReplication", method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ReplicationConfiguration":["b","ReplicationConfiguration"],"Token":["x-amz-bucket-object-lock-token"]}, errors: {}}, S3ClientRequirement) +export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "putBucketRequestPayment", method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"RequestPaymentConfiguration":["b","RequestPaymentConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketTagging = /*@__PURE__*/ makeOperation({ name: "putBucketTagging", method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}, errors: {}}, S3ClientRequirement) +export const putBucketVersioning = /*@__PURE__*/ makeOperation({ name: "putBucketVersioning", method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MFA":["x-amz-mfa"],"VersioningConfiguration":["b","VersioningConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putBucketWebsite = /*@__PURE__*/ makeOperation({ name: "putBucketWebsite", method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"WebsiteConfiguration":["b","WebsiteConfiguration"]}, errors: {}}, S3ClientRequirement) +export const putObject = /*@__PURE__*/ makeOperation({ name: "putObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":["x-amz-acl"],"Body":["b"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ContentType":["Content-Type"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Expires":["Expires"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}, errors: {"EncryptionTypeMismatch":[],"InvalidRequest":[],"InvalidWriteOffset":[],"TooManyParts":[]}}, S3ClientRequirement) +export const putObjectAcl = /*@__PURE__*/ makeOperation({ name: "putObjectAcl", method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"]}, errors: {"NoSuchKey":[]}}, S3ClientRequirement) +export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "putObjectLegalHold", method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"],"LegalHold":["b","LegalHold"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "putObjectLockConfiguration", method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"],"ObjectLockConfiguration":["b","ObjectLockConfiguration"],"Token":["x-amz-bucket-object-lock-token"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putObjectRetention = /*@__PURE__*/ makeOperation({ name: "putObjectRetention", method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"],"Retention":["b","Retention"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) +export const putObjectTagging = /*@__PURE__*/ makeOperation({ name: "putObjectTagging", method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}, errors: {}}, S3ClientRequirement) +export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "putPublicAccessBlock", method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"PublicAccessBlockConfiguration":["b","PublicAccessBlockConfiguration"]}, errors: {}}, S3ClientRequirement) +export const renameObject = /*@__PURE__*/ makeOperation({ name: "renameObject", method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"DestinationIfMatch":["If-Match"],"DestinationIfNoneMatch":["If-None-Match"],"DestinationIfModifiedSince":["If-Modified-Since"],"DestinationIfUnmodifiedSince":["If-Unmodified-Since"],"SourceIfMatch":["x-amz-rename-source-if-match"],"SourceIfNoneMatch":["x-amz-rename-source-if-none-match"],"SourceIfModifiedSince":["x-amz-rename-source-if-modified-since"],"SourceIfUnmodifiedSince":["x-amz-rename-source-if-unmodified-since"]}, errors: {"IdempotencyParameterMismatch":[]}}, S3ClientRequirement) +export const restoreObject = /*@__PURE__*/ makeOperation({ name: "restoreObject", method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":["p","Bucket"],"Key":["p"],"RestoreRequest":["b","RestoreRequest"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {"ObjectAlreadyInActiveTierError":[]}}, S3ClientRequirement) +export const selectObjectContent = /*@__PURE__*/ makeOperation({ name: "selectObjectContent", method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) +export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataInventoryTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"InventoryTableConfiguration":["b","InventoryTableConfiguration"]}, errors: {}}, S3ClientRequirement) +export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataJournalTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"JournalTableConfiguration":["b","JournalTableConfiguration"]}, errors: {}}, S3ClientRequirement) +export const uploadPart = /*@__PURE__*/ makeOperation({ name: "uploadPart", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":["b"],"Bucket":["p","Bucket"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) +export const uploadPartCopy = /*@__PURE__*/ makeOperation({ name: "uploadPartCopy", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}, errors: {}}, S3ClientRequirement) +export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ name: "writeGetObjectResponse", method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":["b"],"StatusCode":["x-amz-fwd-status"],"ErrorCode":["x-amz-fwd-error-code"],"ErrorMessage":["x-amz-fwd-error-message"],"AcceptRanges":["x-amz-fwd-header-accept-ranges"],"CacheControl":["x-amz-fwd-header-Cache-Control"],"ContentDisposition":["x-amz-fwd-header-Content-Disposition"],"ContentEncoding":["x-amz-fwd-header-Content-Encoding"],"ContentLanguage":["x-amz-fwd-header-Content-Language"],"ContentLength":["Content-Length"],"ContentRange":["x-amz-fwd-header-Content-Range"],"ContentType":["x-amz-fwd-header-Content-Type"],"ChecksumCRC32":["x-amz-fwd-header-x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-fwd-header-x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-fwd-header-x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-fwd-header-x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-fwd-header-x-amz-checksum-sha256"],"DeleteMarker":["x-amz-fwd-header-x-amz-delete-marker"],"ETag":["x-amz-fwd-header-ETag"],"Expires":["x-amz-fwd-header-Expires"],"Expiration":["x-amz-fwd-header-x-amz-expiration"],"LastModified":["x-amz-fwd-header-Last-Modified"],"MissingMeta":["x-amz-fwd-header-x-amz-missing-meta"],"ObjectLockMode":["x-amz-fwd-header-x-amz-object-lock-mode"],"ObjectLockLegalHoldStatus":["x-amz-fwd-header-x-amz-object-lock-legal-hold"],"ObjectLockRetainUntilDate":["x-amz-fwd-header-x-amz-object-lock-retain-until-date"],"PartsCount":["x-amz-fwd-header-x-amz-mp-parts-count"],"ReplicationStatus":["x-amz-fwd-header-x-amz-replication-status"],"RequestCharged":["x-amz-fwd-header-x-amz-request-charged"],"Restore":["x-amz-fwd-header-x-amz-restore"],"ServerSideEncryption":["x-amz-fwd-header-x-amz-server-side-encryption"],"SSECustomerAlgorithm":["x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"],"SSEKMSKeyId":["x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"],"SSECustomerKeyMD5":["x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"],"StorageClass":["x-amz-fwd-header-x-amz-storage-class"],"TagCount":["x-amz-fwd-header-x-amz-tagging-count"],"VersionId":["x-amz-fwd-header-x-amz-version-id"],"BucketKeyEnabled":["x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"]}, errors: {}}, S3ClientRequirement) //==== Aliased Types ==== type NoSuchUpload = {}; @@ -471,17 +471,17 @@ type UploadPartCopyOutput = {CopySourceVersionId?: string, CopyPartResult?: Copy type UploadPartCopyRequest = {Bucket: string, CopySource: string, CopySourceIfMatch?: string, CopySourceIfModifiedSince?: Date | string, CopySourceIfNoneMatch?: string, CopySourceIfUnmodifiedSince?: Date | string, CopySourceRange?: string, Key: string, PartNumber: number, UploadId: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, CopySourceSSECustomerAlgorithm?: string, CopySourceSSECustomerKey?: string, CopySourceSSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, ExpectedSourceBucketOwner?: string}; //==== Error Types ==== -export declare class NoSuchUploadError extends S.TaggedError()(("NoSuchUploadError"), {}).pipe() {} -export declare class ObjectNotInActiveTierErrorError extends S.TaggedError()(("ObjectNotInActiveTierErrorError"), {}).pipe() {} -export declare class BucketAlreadyExistsError extends S.TaggedError()(("BucketAlreadyExistsError"), {}).pipe() {} -export declare class BucketAlreadyOwnedByYouError extends S.TaggedError()(("BucketAlreadyOwnedByYouError"), {}).pipe() {} -export declare class NoSuchBucketError extends S.TaggedError()(("NoSuchBucketError"), {}).pipe() {} -export declare class InvalidObjectStateError extends S.TaggedError()(("InvalidObjectStateError"), {}).pipe() {} -export declare class NoSuchKeyError extends S.TaggedError()(("NoSuchKeyError"), {}).pipe() {} -export declare class NotFoundError extends S.TaggedError()(("NotFoundError"), {}).pipe() {} -export declare class EncryptionTypeMismatchError extends S.TaggedError()(("EncryptionTypeMismatchError"), {}).pipe() {} -export declare class InvalidRequestError extends S.TaggedError()(("InvalidRequestError"), {}).pipe() {} -export declare class InvalidWriteOffsetError extends S.TaggedError()(("InvalidWriteOffsetError"), {}).pipe() {} -export declare class TooManyPartsError extends S.TaggedError()(("TooManyPartsError"), {}).pipe() {} -export declare class IdempotencyParameterMismatchError extends S.TaggedError()(("IdempotencyParameterMismatchError"), {}).pipe() {} -export declare class ObjectAlreadyInActiveTierErrorError extends S.TaggedError()(("ObjectAlreadyInActiveTierErrorError"), {}).pipe() {} +export declare class NoSuchUploadError extends Data.TaggedError("NoSuchUploadError") {} +export declare class ObjectNotInActiveTierErrorError extends Data.TaggedError("ObjectNotInActiveTierErrorError") {} +export declare class BucketAlreadyExistsError extends Data.TaggedError("BucketAlreadyExistsError") {} +export declare class BucketAlreadyOwnedByYouError extends Data.TaggedError("BucketAlreadyOwnedByYouError") {} +export declare class NoSuchBucketError extends Data.TaggedError("NoSuchBucketError") {} +export declare class InvalidObjectStateError extends Data.TaggedError("InvalidObjectStateError") {} +export declare class NoSuchKeyError extends Data.TaggedError("NoSuchKeyError") {} +export declare class NotFoundError extends Data.TaggedError("NotFoundError") {} +export declare class EncryptionTypeMismatchError extends Data.TaggedError("EncryptionTypeMismatchError") {} +export declare class InvalidRequestError extends Data.TaggedError("InvalidRequestError") {} +export declare class InvalidWriteOffsetError extends Data.TaggedError("InvalidWriteOffsetError") {} +export declare class TooManyPartsError extends Data.TaggedError("TooManyPartsError") {} +export declare class IdempotencyParameterMismatchError extends Data.TaggedError("IdempotencyParameterMismatchError") {} +export declare class ObjectAlreadyInActiveTierErrorError extends Data.TaggedError("ObjectAlreadyInActiveTierErrorError") {} diff --git a/src/protocols/rest-xml.ts b/src/protocols/rest-xml.ts index 90b492cb..67467320 100644 --- a/src/protocols/rest-xml.ts +++ b/src/protocols/rest-xml.ts @@ -7,6 +7,27 @@ import { Region } from "../region"; import { XMLBuilder, XMLParser } from "fast-xml-parser"; //todo(pear): this is a massive 7kb import { AwsV4Signer } from "aws4fetch"; +import { createDynamicTaggedError, UnknownAwsError } from "../aws-errors"; + +const commonErrorDetails = { + AccessDeniedException: [], + ExpiredTokenException: [], + IncompleteSignature: [], + InternalFailure: [], + MalformedHttpRequestException: [], + NotAuthorized: [], + OptInRequired: [], + RequestAbortedException: [], + RequestEntityTooLargeException: [], + RequestExpired: [], + RequestTimeoutException: [], + ServiceUnavailable: [], + ThrottlingException: [], + UnrecognizedClientException: [], + UnknownOperationException: [], + ValidationError: [], + ValidationException: [], +}; //todo(pear): make these single letter variables export type EndpointMetadata = { @@ -14,6 +35,8 @@ export type EndpointMetadata = { method: string; //* method => //todo(pear): narrower type uri: string; //* uri body: Record; //* body + //todo(pear): these seem to always be in the body? + errors: Record>; isStream?: boolean; }; @@ -114,6 +137,7 @@ export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - response code: ${response.status}`, ); + //todo(pear): is this a good error distinguisher if (response.status >= 200 && response.status < 300) { //convert to response type yield* Effect.logDebug( @@ -124,7 +148,7 @@ export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { const text = yield* response.text; yield* Effect.logDebug( - `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - error:`, + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - raw error:`, text, ); @@ -134,6 +158,34 @@ export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - error:`, parsedResponse, ); + + const errorFmt: Array | undefined = + endpointMetadata.errors[parsedResponse.Error.Code] ?? + //@ts-expect-error + commonErrorDetails[parsedResponse.Error.Code]; + + return yield* Effect.if(errorFmt != null, { + onFalse: () => + Effect.fail( + new UnknownAwsError({ + key: parsedResponse.Error.Code, + data: parsedResponse, + }), + ), + onTrue: () => + Effect.fail( + createDynamicTaggedError( + parsedResponse.Error.Code, + errorFmt!.reduce((acc, curr) => { + const value = parsedResponse.Error[curr]; + if (value != null) { + return { ...acc, [curr]: parsedResponse.Error[curr] }; + } + return acc; + }, {}), + ), + ), + }); } yield* Effect.void; diff --git a/todo.md b/todo.md index e6c4b580..af14ea8f 100644 --- a/todo.md +++ b/todo.md @@ -2,3 +2,11 @@ - move effect deps to peer deps - generate a report on kb per bundle (see effect 4 / effect-smol?) @sam - warning for people who don't know how to bundle +- better error on credentials missing + - ``` + [08:58:06.504] ERROR (#1): + AwsCredentialProviderError: An error has occurred + at catch (D:\code\OSS\alchemy\itty-aws-2\src\credentials.ts:31:20) + at (D:\code\OSS\alchemy\itty-aws-2\src\client.ts:25:28) + at (D:\code\OSS\alchemy\itty-aws-2\src\client.ts:25:41) + ``` From 1d633dde2cef8de757024abd5a35ca0aeca00dee Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Tue, 16 Dec 2025 13:07:58 -0500 Subject: [PATCH 5/8] union errors --- package.json | 1 + playground-itty.ts | 98 +- playground.ts | 27 +- scripts/generate-clients.ts | 319 +- src/aws-errors.ts | 10 - src/client.ts | 525 ++- src/clients.gen/s3.ts | 6117 ++++++++++++++++++++++++++++++++--- src/protocols/rest-xml.ts | 12 +- src/schema-helpers.ts | 64 + src/service-metadata.ts | 10 - todo.md | 2 + 11 files changed, 6381 insertions(+), 804 deletions(-) create mode 100644 src/schema-helpers.ts delete mode 100644 src/service-metadata.ts diff --git a/package.json b/package.json index 9d76223b..1c31051a 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "module": "index.ts", "type": "module", "private": true, + "sideEffects": false, "devDependencies": { "@rsbuild/core": "^1.6.7", "@types/bun": "latest", diff --git a/playground-itty.ts b/playground-itty.ts index 96182e83..1c1d877e 100644 --- a/playground-itty.ts +++ b/playground-itty.ts @@ -1,35 +1,93 @@ +import { Schema, Effect } from "effect"; +import { Region } from "./src/region"; +import { + Operation, + Path, + Header, + StreamBody, + Body, + Error, +} from "./src/schema-helpers"; +import { + FormatXMLResponse, + makeOperation, + NoopRequest, + NoopResponse, +} from "./src/client"; + +const input = () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=PutObject", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObject", + }, + Schema.Struct({ + ACL: Schema.optional( + Header( + "x-amz-acl", + Schema.Literal( + "private", + "public-read", + "public-read-write", + "authenticated-read", + ), + ), + ), + Body: StreamBody(), + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + }), + Schema.Struct({ + ETag: Header("etag", Schema.String), + }), + //todo(pear): make empty struct the default + Schema.Union( + Error( + "NoSuchBucket", + Schema.Struct({ + Code: Body("Error.Code", Schema.Literal("NoSuchBucket")), + Message: Body("Error.Message", Schema.String), + BucketName: Body("Error.BucketName", Schema.String), + }), + ), + Error( + "NoSuchBucket", + Schema.Struct({ + Code: Body("Error.Code", Schema.Literal("NoSuchBucket")), + Message: Body("Error.Message", Schema.String), + BucketName: Body("Error.BucketName", Schema.String), + }), + ), + ), + ); + import { BunContext, BunRuntime } from "@effect/platform-bun"; -import { Logger, LogLevel, Effect } from "effect"; -import * as S3 from "./src/clients.gen/s3"; +import { Logger, LogLevel } from "effect"; import { NodeProviderChainCredentialsLive } from "./src/credentials"; -import { Region } from "./src/region"; import { FetchHttpClient } from "@effect/platform"; -const BUCKET_NAME = "alchemy-7uzxjcr"; - const program = Effect.gen(function* () { - // const result = yield* S3.createBucket({ - // Bucket: "alchemy-7uzxjcr", - // }); - const result = yield* S3.getObject({ - Bucket: BUCKET_NAME, - Key: "test.txt", - }).pipe( - Effect.catchTag( - "InvalidObjectStateError", - Effect.fn(function* (e) { - yield* Effect.logError(e.StorageClass); - yield* Effect.logError(e); - }), - ), + const PutObject = makeOperation( + input(), + NoopRequest, + NoopResponse, + FormatXMLResponse, ); + const result = yield* PutObject({ + Bucket: "alchemy-7uzxjcr-test", + Key: "test-2.txt", + Body: "this is some text2", + }); yield* Effect.logDebug(result); }); BunRuntime.runMain( program.pipe( //todo(pear): make this not a function so we can replace with like S3.testClient or something - Effect.provide(S3.clientLive), + // Effect.provide(S3.clientLive), Effect.provideService(Region, "us-east-1"), Effect.provide(FetchHttpClient.layer), Effect.provide(NodeProviderChainCredentialsLive), diff --git a/playground.ts b/playground.ts index 85375fe5..0303e2f1 100644 --- a/playground.ts +++ b/playground.ts @@ -1,13 +1,34 @@ +import { Effect } from "effect"; +import { Region } from "./src/region"; +import { CreateBucket, PutObject, GetObject } from "./src/clients.gen/s3"; + import { BunContext, BunRuntime } from "@effect/platform-bun"; -import { Logger, LogLevel, Effect } from "effect"; +import { Logger, LogLevel } from "effect"; +import { NodeProviderChainCredentialsLive } from "./src/credentials"; +import { FetchHttpClient } from "@effect/platform"; -export const program = Effect.gen(function* () { - const result = yield* Effect.succeed({ hello: "world" }); +const program = Effect.gen(function* () { + const result = yield* CreateBucket({ + Bucket: "alchemy-7uzxjcl", + }); + // const result2 = yield* PutObject({ + // Bucket: "alchemy-7uzxjcl", + // }); + // const result3 = yield* GetObject({ + // Bucket: "alchemy-7uzxjcl", + // }); yield* Effect.logDebug(result); + // yield* Effect.logDebug(result2); + // yield* Effect.logDebug(result3); }); BunRuntime.runMain( program.pipe( + //todo(pear): make this not a function so we can replace with like S3.testClient or something + // Effect.provide(S3.clientLive), + Effect.provideService(Region, "us-east-1"), + Effect.provide(FetchHttpClient.layer), + Effect.provide(NodeProviderChainCredentialsLive), Effect.provide(BunContext.layer), Logger.withMinimumLogLevel(LogLevel.Debug), ), diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts index 21181bc7..1a2fdca8 100644 --- a/scripts/generate-clients.ts +++ b/scripts/generate-clients.ts @@ -16,7 +16,6 @@ import { GenericShape, ShapeTypeMap, } from "./model-schema"; -import { ServiceMetadata } from "../src/service-metadata"; import dedent from "dedent"; class ModelService extends Context.Tag("ModelService")< @@ -106,83 +105,51 @@ function formatName(shapeId: string, lowercase = false) { return name; } -const createTsAlias = (shapeId: string) => - Effect.fn(function* (type: string) { - const { aliases } = yield* TypeStore; - const alias = formatName(shapeId); - - const existing = yield* Ref.get(aliases); - if (existing.has(alias)) { - return alias; - } - - yield* Ref.update(aliases, (map) => map.set(alias, type)); - return alias; - }); - -const createTsError = (shapeId: string) => - Effect.fn(function* (type: string) { - const { errors } = yield* TypeStore; - const errorName = `${formatName(shapeId)}Error`; - - const existing = yield* Ref.get(errors); - if (existing.has(errorName)) { - return errorName; - } - - yield* Ref.update(errors, (map) => map.set(errorName, type)); - return errorName; - }); - -//todo(pear): cache this -const convertShapeToTypescript: ( +const convertShapeToSchema: ( args_0: [string, GenericShape], ) => Effect.Effect< string, - ShapeNotFound | UnableToTransformShapeToType, - ModelService | TypeStore + UnableToTransformShapeToType | ShapeNotFound, + ModelService > = Effect.fn(function* ([targetShapeId, targetShape]: [string, GenericShape]) { - const typescriptType = yield* Match.value(targetShape).pipe( + const schema = yield* Match.value(targetShape).pipe( Match.when( - (s) => - // shape.type === "bigDecimal" || - // shape.type === "bigInteger" || - // shape.type === "double" || - // shape.type === "float" || - s.type === "integer" || s.type === "long", - () => Effect.succeed("number"), + (s) => s.type === "integer" || s.type === "long", + () => Effect.succeed("Schema.Number"), ), Match.when( (s) => s.type === "string", - () => Effect.succeed("string"), + () => Effect.succeed("Schema.String"), ), Match.when( (s) => s.type === "blob", - () => Effect.succeed("Uint8Array"), + () => Effect.succeed("StreamBody()"), ), Match.when( (s) => s.type === "boolean", - () => Effect.succeed("boolean"), + () => Effect.succeed("Schema.Boolean"), ), Match.when( (s) => s.type === "timestamp", - () => Effect.succeed("Date | string"), + () => Effect.succeed("Schema.Date"), ), Match.when( (s) => s.type === "enum", (s) => Effect.succeed( - Object.values(s.members) - .map(({ traits }) => `"${traits["smithy.api#enumValue"]}"`) - .join(" | "), - ).pipe(Effect.flatMap(createTsAlias(targetShapeId))), + Object.values(s.members).map( + ({ traits }) => + `Schema.Literal("${traits["smithy.api#enumValue"]}")`, + ), + // ).pipe(Effect.map((members) => `Schema.Union(${members.join(", ")})`)), + ).pipe(Effect.map((members) => `Schema.String`)), ), Match.when( (s) => s.type === "list", (s) => findShape(s.member.target).pipe( - Effect.flatMap(convertShapeToTypescript), - Effect.map((type) => `Array<${type}>`), + Effect.flatMap(convertShapeToSchema), + Effect.map((type) => `Schema.Array(${type})`), ), ), Match.when( @@ -191,17 +158,38 @@ const convertShapeToTypescript: ( Effect.all( Object.entries(s.members).map(([memberName, member]) => findShape(member.target).pipe( - Effect.flatMap(convertShapeToTypescript), - Effect.map( - (type) => - `${memberName}${member.traits?.["smithy.api#required"] != null ? "" : "?"}: ${type}`, - ), + Effect.flatMap(convertShapeToSchema), + Effect.map((baseSchema) => { + let schema = baseSchema; + + if (member.traits?.["smithy.api#httpHeader"] != null) { + if (schema === "Schema.String") { + schema = `Header("${member.traits?.["smithy.api#httpHeader"]}")`; + } else { + schema = `Header("${member.traits?.["smithy.api#httpHeader"]}", ${schema})`; + } + } + if (member.traits?.["smithy.api#httpPayload"] != null) { + schema = `Body("${member.traits?.["smithy.api#xmlName"]}", ${schema})`; + } + if ( + member.traits?.["smithy.api#httpLabel"] != null && + member.traits?.["smithy.rules#contextParam"] != null + ) { + schema = `Path("${(member.traits?.["smithy.rules#contextParam"] as { name: string })?.name}", ${schema})`; + } + + if (member.traits?.["smithy.api#required"] == null) { + schema = `Schema.optional(${schema})`; + } + + return `${memberName}: ${schema}`; + }), ), ), { concurrency: "unbounded" }, ).pipe( - Effect.map((members) => `{${members.join(", ")}}`), - Effect.flatMap(createTsAlias(targetShapeId)), + Effect.map((members) => `Schema.Struct({${members.join(", ")}})`), ), ), Match.when( @@ -209,34 +197,27 @@ const convertShapeToTypescript: ( (s) => Effect.all( Object.entries(s.members).map(([_memberName, member]) => - findShape(member.target).pipe( - Effect.flatMap(convertShapeToTypescript), - ), + findShape(member.target).pipe(Effect.flatMap(convertShapeToSchema)), ), { concurrency: "unbounded" }, - ).pipe( - Effect.map((members) => members.join(" | ")), - Effect.flatMap(createTsAlias(targetShapeId)), - ), + ).pipe(Effect.map((members) => `Schema.Union(${members.join(", ")})`)), ), Match.when( (s) => s.type === "map", (s) => Effect.all( [ - findShape(s.key.target).pipe( - Effect.flatMap(convertShapeToTypescript), - ), + findShape(s.key.target).pipe(Effect.flatMap(convertShapeToSchema)), findShape(s.value.target).pipe( - Effect.flatMap(convertShapeToTypescript), + Effect.flatMap(convertShapeToSchema), ), ], { concurrency: "unbounded" }, ).pipe( Effect.map( - ([keyType, valueType]) => `Record<${keyType}, ${valueType}>`, + ([keySchema, valueSchema]) => + `Schema.Record({key: ${keySchema}, value: ${valueSchema}})`, ), - Effect.flatMap(createTsAlias(targetShapeId)), ), ), Match.orElse((s) => @@ -246,10 +227,11 @@ const convertShapeToTypescript: ( }), ), ), + // Match.orElse(() => Effect.succeed("$$TEMP_SCHEMA")), // Match.exhaustive, ); - return typescriptType; + return schema; }); const generateClient = Effect.fn(function* ( @@ -278,43 +260,6 @@ const generateClient = Effect.fn(function* ( return yield* Effect.fail(new ProtocolNotFound()); } - const metadata = { - protocol, - sdkId: serviceShape.traits["aws.api#service"].sdkId, - sigV4ServiceName: serviceShape.traits["aws.auth#sigv4"].name, - version: serviceShape.version, - } satisfies ServiceMetadata; - - // const imports = `import { type Effect, Layer, Context, Schema as S } from "effect";\nimport type { CommonAwsError } from "../aws-errors";\nimport { makeOperation } from "../client";` - const imports = [ - `import { type Effect, Layer, Context, Schema as S } from "effect";`, - `import type { CommonAwsError } from "../aws-errors";`, - `import { makeOperation } from "../client";`, - ]; - - const serviceName = `${metadata.sdkId}ClientRequirement`; - - const clientServiceTag = dedent`export class ${serviceName} extends Context.Tag("${serviceName}")<${serviceName}, { call: (metadata: any) => (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {}`; - - //todo(pear): move to match - const createClient = yield* Effect.if( - protocol === "aws.protocols#restXml", - { - onFalse: () => - Effect.succeed( - `import { loggerProvider } from "../protocols/logger";\nexport const createClient = (config: any) => Layer.succeed(${serviceName}, loggerProvider(config, metadata));`, - ), - onTrue: () => { - imports.push( - `import { restXmlProvider, type EndpointMetadata } from "../protocols/rest-xml";`, - ); - return Effect.succeed( - `export const clientLive = Layer.effect(${serviceName}, restXmlProvider(metadata));`, - ); - }, - }, - ); - const operations = yield* Effect.forEach( serviceShape.operations, Effect.fn(function* ({ target: operationId }: { target: string }) { @@ -323,154 +268,32 @@ const generateClient = Effect.fn(function* ( "operation", ); - const errorObject = yield* Effect.all( - (operationShape.errors ?? []).map( - Effect.fn(function* ({ target: errorShapeId }) { - const shape = yield* findShape(errorShapeId, "structure"); - const ts = yield* convertShapeToTypescript(shape); - const tsError = yield* createTsError(errorShapeId)(ts); - const tag = formatName(shape[0]); - return { - tsError, - errorFormat: { - [tag]: Object.keys(shape[1].members), - }, - }; - }), - ), - ); - - const outputType = yield* Effect.if( - operationShape.output.target === "smithy.api#Unit", - { - onTrue: () => Effect.succeed("void"), - onFalse: () => - findShape(operationShape.output.target, "structure").pipe( - Effect.flatMap(convertShapeToTypescript), - ), - }, - ); - - const body = yield* Effect.if( - operationShape.input.target === "smithy.api#Unit", - { - onTrue: () => Effect.succeed("void"), - onFalse: Effect.fn(function* () { - const [_structureId, structure] = yield* findShape( - operationShape.input.target, - "structure", + const input = + operationShape.input.target === "smithy.api#Unit" + ? "Schema.Struct({})" //todo(pear): should this be Schema.Never? + : yield* findShape(operationShape.input.target).pipe( + Effect.flatMap(convertShapeToSchema), ); - return yield* Effect.reduce( - Object.entries(structure.members), - {} as Record, - (acc, [key, value]) => { - if (value.traits?.["smithy.api#httpHeader"] != null) { - if ( - "x-amz-" + - key - .replace(/([A-Z])/g, "-$1") - .toLowerCase() - .slice(1) === - value.traits["smithy.api#httpHeader"] - ) { - return Effect.succeed(acc); - } - return Effect.succeed({ - ...acc, - [key]: [value.traits["smithy.api#httpHeader"]], - }); - } - if (value.traits?.["smithy.api#httpLabel"] != null) { - return Effect.succeed({ - ...acc, - [key]: - value.traits["smithy.rules#contextParam"]?.name != null - ? [ - "p", - value.traits["smithy.rules#contextParam"]?.name, - ] - : ["p"], - }); - } - if (value.traits?.["smithy.api#httpPayload"] != null) { - return Effect.succeed({ - ...acc, - [key]: - value.traits["smithy.api#xmlName"] != null - ? ["b", value.traits["smithy.api#xmlName"]] - : ["b"], - }); - } - return Effect.succeed(acc); - }, + const output = + operationShape.output.target === "smithy.api#Unit" + ? "Schema.Struct({})" //todo(pear): should this be Schema.Never? + : yield* findShape(operationShape.output.target).pipe( + Effect.flatMap(convertShapeToSchema), ); - }), - }, - ); - - const inputType = yield* Effect.if( - operationShape.output.target === "smithy.api#Unit", - { - onTrue: () => Effect.succeed("void"), - onFalse: () => - findShape(operationShape.input.target, "structure").pipe( - Effect.flatMap(convertShapeToTypescript), - ), - }, - ); - const exportName = formatName(operationId, true); - const traits = operationShape.traits["smithy.api#http"]; - - //todo(pear): support streaming + inline output types - const endpointMeta = `{ name: "${exportName}", method: "${traits.method}", uri: "${traits.uri}", body: ${JSON.stringify(body)}, errors: ${JSON.stringify( - errorObject.reduce( - (acc, error) => ({ ...acc, ...error.errorFormat }), - {}, - ), - )}}`; - - return `export const ${exportName} = /*@__PURE__*/ makeOperation<${inputType}, ${outputType}, ${errorObject.map((e) => e.tsError).join(" | ")}${errorObject.length > 0 ? " | " : ""}CommonAwsError, typeof ${serviceName}>(${endpointMeta}, ${serviceName})`; - // return `export const ${formatName(operationId)} = (inputs: ${inputShape}) => Effect.Effect<${outputShape}, ${errors.join(" | ")}>`; + //todo(pear): errors + //todo(pear): correct middleware (stream bodies should be noop?) + return `export const ${formatName(_id)} = /*#__PURE__*/ makeOperation(() => Operation({ uri: "${operationShape["traits"]["smithy.api#http"]["uri"]}", method: "${operationShape["traits"]["smithy.api#http"]["method"]}", sdkId: "${serviceShape.traits["aws.api#service"].sdkId}", sigV4ServiceName: "${serviceShape.traits["aws.auth#sigv4"].name}", name: "${formatName(_id)}" }, ${input}, ${output}, Schema.Union(Schema.Struct({}))), FormatXMLRequest, FormatXMLResponse, FormatXMLResponse);`; }), ); - const aliasedTypes = yield* Ref.get(typeAliasStore).pipe( - Effect.map((t) => - Array.from(t.entries()) - .map(([alias, type]) => `type ${alias} = ${type};`) - .join("\n"), - ), - ); - - const errorTypes = yield* Ref.get(typeErrorStore).pipe( - Effect.map((t) => - Array.from(t.entries()) - .map( - ([errorName, type]) => - // `export declare class ${errorName} extends S.TaggedError<${type}>()(("${errorName}"), {}).pipe() {}`, - `export declare class ${errorName} extends Data.TaggedError("${errorName}")<${type}> {}`, - ) - .join("\n"), - ), - ); - const content = dedent` - ${imports.join("\n")} - - //==== Exports ==== - export const metadata = ${JSON.stringify(metadata)} - - ${clientServiceTag} - ${createClient} + import { Schema} from "effect" + import { FormatXMLRequest, FormatXMLResponse, makeOperation, NoopRequest, NoopResponse } from "../client"; + import { Operation, Path, Header, StreamBody, Body, Error } from "../schema-helpers"; ${operations.join("\n")} - - //==== Aliased Types ==== - ${aliasedTypes} - - //==== Error Types ==== - ${errorTypes}\n`; + `; yield* fs.makeDirectory( path.dirname(path.join(process.cwd(), outputPath)), diff --git a/src/aws-errors.ts b/src/aws-errors.ts index 2257ed5d..318d5ad4 100644 --- a/src/aws-errors.ts +++ b/src/aws-errors.ts @@ -162,16 +162,6 @@ export declare class ValidationException extends S.TaggedError()( - "UnknownAwsError", - { - key: S.String, - data: S.Unknown, - }, -).pipe(withCategory(ERROR_CATEGORIES.AWS_ERROR)) {} - -//===================== - export function createDynamicTaggedError( tag: string, errorData: Record, diff --git a/src/client.ts b/src/client.ts index 11c86b89..5a887b32 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,27 +1,502 @@ -import * as Effect from "effect/Effect"; -import * as Context from "effect/Context"; - -export function makeOperation< - Input, - Ouput, - Error, - ClientTag extends Context.Tag< - any, - { - call: (metadata: any) => (input: any) => Effect.Effect; - _endpointMetadataType: any; - } +// ============ NEW +import { + Schema, + SchemaAST as AST, + ParseResult, + Option, + Record, + Effect, +} from "effect"; +import { XMLBuilder, XMLParser } from "fast-xml-parser"; +import { Credentials } from "./credentials"; +import { Region } from "./region"; +import { AwsV4Signer } from "aws4fetch"; +import { + Operation, + requestBodyStreamSymbol, + requestBodySymbol, + requestError, + requestHeaderSymbol, + requestMetaSymbol, + requestPathSymbol, + type OperationMeta, +} from "./schema-helpers"; +import { HttpBody, HttpClient } from "@effect/platform"; +import type { HttpClientError } from "@effect/platform/HttpClientError"; +import { createDynamicTaggedError } from "./aws-errors"; + +const builder = new XMLBuilder(); +const parser = new XMLParser(); + +const rawRequest = Schema.Struct({ + unsignedUri: Schema.String, + unsignedHeaders: Schema.Record({ + key: Schema.String, + value: Schema.String, + }), + unsignedBody: Schema.UndefinedOr( + Schema.Union( + Schema.Record({ + key: Schema.String, + value: Schema.Any, + }), + Schema.String, + Schema.instanceOf(Uint8Array), + Schema.instanceOf(ReadableStream), + ), + ), +}); +const unsignedRequest = Schema.Struct({ + unsignedUri: Schema.String, + unsignedHeaders: Schema.Record({ + key: Schema.String, + value: Schema.String, + }), + unsignedBody: Schema.UndefinedOr( + Schema.Union( + Schema.String, + Schema.instanceOf(Uint8Array), + Schema.instanceOf(ReadableStream), + ), + ), +}); +const rawResponse = Schema.Struct({ + headers: Schema.Record({ + key: Schema.String, + value: Schema.Unknown, + }), + //todo(pear): handle streams somehow + body: Schema.String, +}); +const response = Schema.Struct({ + headers: Schema.Record({ + key: Schema.String, + value: Schema.Unknown, + }), + //todo(pear): handle streams somehow + body: Schema.Record({ + key: Schema.String, + value: Schema.Unknown, + }), +}); + +export const FormatXMLRequest = Schema.asSchema( + Schema.transformOrFail(rawRequest, unsignedRequest, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode XML"), + ), + decode: (value) => + Effect.succeed({ + ...value, + unsignedBody: value.unsignedBody + ? builder.build(value.unsignedBody) + : undefined, + }), + }), +); + +export const FormatXMLResponse = Schema.asSchema( + Schema.transformOrFail(rawResponse, response, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode XML"), + ), + decode: (value) => + Effect.succeed({ + headers: value.headers, + body: parser.parse(value.body), + }), + }), +); + +export const NoopRequest = Schema.asSchema( + Schema.transformOrFail(rawRequest, unsignedRequest, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode Noop"), + ), + decode: (value) => + Effect.succeed(value as Schema.Schema.Type), + }), +); + +export const NoopResponse = Schema.asSchema( + Schema.transformOrFail(rawResponse, response, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode Noop"), + ), + decode: (value) => + Effect.succeed({ + headers: value.headers, + body: {}, + }), + }), +); + +export const makeFormatRequestSchema = ( + operationSchema: Schema.Struct<{ + input: A; + output: Schema.Schema.AnyNoContext; + error: Schema.Schema.AnyNoContext; + }>, + MiddlewareSchema: Schema.Schema< + Schema.Schema.Type, + Schema.Schema.Type, + never + >, +) => { + const inputSchema = operationSchema.fields.input; + const inputAst = inputSchema.ast; + + const RequestFromInput = Schema.asSchema( + Schema.transformOrFail(inputSchema, rawRequest, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode Input"), + ), + decode: (value, _, ast) => + Effect.gen(function* () { + const structAst = AST.isTransformation(inputAst) + ? inputAst.from + : inputAst; + const props = AST.isTypeLiteral(structAst) + ? structAst.propertySignatures + : []; + const meta = yield* AST.getAnnotation( + operationSchema.ast, + requestMetaSymbol, + ); + + const headers: Record = { + "User-Agent": "itty-aws", + }; + let uri = meta.uri; + let body: + | Record + | undefined + | string + | Uint8Array + | ReadableStream; + + for (const prop of props) { + const name = prop.name as keyof typeof value; + + const headerAannotations = AST.getAnnotation( + prop.type, + requestHeaderSymbol, + ); + const bodyAnnotation = AST.getAnnotation( + prop.type, + requestBodySymbol, + ); + const streamBodyAnnotation = AST.getAnnotation( + prop.type, + requestBodyStreamSymbol, + ); + const pathAnnotation = AST.getAnnotation( + prop.type, + requestPathSymbol, + ); + + if (Option.isSome(headerAannotations)) { + headers[headerAannotations.value] = value[name] as string; + } else if (Option.isSome(pathAnnotation)) { + uri = uri.replace( + new RegExp(`{${pathAnnotation.value}\\+?}`), + `${value[name]}`, + ); + // uri = `https://s3.us-east-1.amazonaws.com/${value[name]}`; + } else if (Option.isSome(bodyAnnotation)) { + body = { [bodyAnnotation.value]: value[name] }; + } else if (Option.isSome(streamBodyAnnotation)) { + body = value[name] as string | Uint8Array | ReadableStream; + } + } + + return { + unsignedUri: uri, + unsignedHeaders: headers, + unsignedBody: body, + }; + }).pipe( + Effect.mapError((e) => new ParseResult.Type(ast, value, e.message)), + ), + }), + ); + + return Schema.asSchema(Schema.compose(RequestFromInput, MiddlewareSchema)); +}; + +export const makeFormatResponseSchema = ( + operationSchema: Schema.Struct<{ + output: A; + input: Schema.Schema.AnyNoContext; + error: Schema.Schema.AnyNoContext; + }>, + MiddlewareSchema: Schema.Schema< + Schema.Schema.Type, + Schema.Schema.Type, + never + >, +) => { + const outputSchema = operationSchema.fields.output; + const outputAst = outputSchema.ast; + + const OutputFromResponse = Schema.asSchema( + Schema.transformOrFail(response, outputSchema, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode output"), + ), + decode: (value, _, ast) => + Effect.gen(function* () { + const structAst = AST.isTransformation(outputAst) + ? outputAst.from + : outputAst; + const props = AST.isTypeLiteral(structAst) + ? structAst.propertySignatures + : []; + + const payload: Record = {}; + + for (const prop of props) { + const name = prop.name as keyof typeof value; + + const headerAannotations = AST.getAnnotation( + prop.type, + requestHeaderSymbol, + ); + const bodyAnnotation = AST.getAnnotation( + prop.type, + requestBodySymbol, + ); + + if (Option.isSome(headerAannotations)) { + payload[name] = value.headers[headerAannotations.value]; + } else if (Option.isSome(bodyAnnotation)) { + payload[name] = getNested(value.body, bodyAnnotation.value); + } + } + + const result = yield* Schema.decodeUnknown(outputSchema)(payload); + return result; + }).pipe( + Effect.mapError((e) => new ParseResult.Type(ast, value, e.message)), + ), + }), + ); + + return Schema.asSchema(Schema.compose(MiddlewareSchema, OutputFromResponse)); +}; + +const getNested = (obj: object, path: string) => + //@ts-expect-error + path.split(".").reduce((acc, key) => acc?.[key], obj); + +export const makeFormatErrorSchema = ( + operationSchema: Schema.Struct<{ + output: Schema.Schema.AnyNoContext; + input: Schema.Schema.AnyNoContext; + error: A; + }>, + MiddlewareSchema: Schema.Schema< + Schema.Schema.Type, + Schema.Schema.Type, + never >, ->( - metadata: Context.Tag.Service["_endpointMetadataType"], - clientTag: ClientTag, -): ( - input: Input, -) => Effect.Effect> { - //todo(pear): remove to pipes - return (input: any) => - Effect.gen(function* () { - const client = yield* clientTag; - return yield* client.call(metadata)(input); +) => { + const errorSchema = operationSchema.fields.error; + const errorAst = errorSchema.ast; + + const OutputFromResponse = Schema.asSchema( + Schema.transformOrFail(response, errorSchema, { + strict: true, + encode: (actual, _, ast) => + ParseResult.fail( + new ParseResult.Forbidden(ast, actual, "cannot encode output"), + ), + decode: (value, _, ast) => + Effect.gen(function* () { + const unsafeStructAst = AST.isTransformation(errorAst) + ? errorAst.from + : errorAst; + + const safeStructAsts = AST.isUnion(unsafeStructAst) + ? unsafeStructAst.types + : [unsafeStructAst]; + + for (const structAst of safeStructAsts) { + const props = AST.isTypeLiteral(structAst) + ? structAst.propertySignatures + : []; + + const payload: Record = { + _tag: structAst.annotations[requestError], + }; + + for (const prop of props) { + const name = prop.name as keyof typeof value; + + const headerAannotations = AST.getAnnotation( + prop.type, + requestHeaderSymbol, + ); + const bodyAnnotation = AST.getAnnotation( + prop.type, + requestBodySymbol, + ); + + if (Option.isSome(headerAannotations)) { + payload[name] = value.headers[headerAannotations.value]; + } else if (Option.isSome(bodyAnnotation)) { + payload[name] = getNested(value.body, bodyAnnotation.value); + } + } + + const result = yield* Schema.decodeUnknown(errorSchema)(payload); + return result; + } + + yield* Effect.fail(new ParseResult.Type(ast, value, "Unknown Error")); + }).pipe( + Effect.mapError((e) => new ParseResult.Type(ast, value, e.message)), + ), + }), + ); + + return Schema.asSchema(Schema.compose(MiddlewareSchema, OutputFromResponse)); +}; + +export const makeOperation = >( + operationSchema: A, + RequestMiddleware: Schema.Schema< + Schema.Schema.Type, + Schema.Schema.Type, + never + > = NoopRequest, + ResponseMiddleware: Schema.Schema< + Schema.Schema.Type, + Schema.Schema.Type, + never + > = NoopResponse, + ErrorMiddleware: Schema.Schema< + Schema.Schema.Type, + Schema.Schema.Type, + never + > = NoopResponse, +): (( + payload: Schema.Schema.Type, +) => Effect.Effect< + Schema.Schema.Type, + Error | ParseResult.ParseError | HttpClientError, + Region | Credentials | HttpClient.HttpClient +>) => { + const FormatRequest = makeFormatRequestSchema( + operationSchema, + RequestMiddleware, + ); + const FormatResponse = makeFormatResponseSchema( + operationSchema, + ResponseMiddleware, + ); + const FormatError = makeFormatErrorSchema(operationSchema, ErrorMiddleware); + return Effect.fn(function* ( + payload: Schema.Schema.Type, + ) { + const httpClient = yield* HttpClient.HttpClient; + + const meta = yield* AST.getAnnotation( + operationSchema.ast, + requestMetaSymbol, + ); + + yield* Effect.logDebug( + `AWS Request - ${meta.sdkId}:${meta.name} - payload: ${JSON.stringify(payload)}`, + ); + + const unsignedRequest = yield* Schema.decode(FormatRequest)(payload); + + yield* Effect.logDebug( + `AWS Request - ${meta.sdkId}:${meta.name} - formatted request: ${JSON.stringify(unsignedRequest)}`, + ); + + const credentials = yield* Credentials; + const region = yield* Region; + const creds = yield* credentials.getCredentials(); + + const signer = new AwsV4Signer({ + method: meta.method, + url: `https://${meta.sdkId.toLowerCase()}.${region}.amazonaws.com${unsignedRequest.unsignedUri}`, + headers: unsignedRequest.unsignedHeaders, + body: unsignedRequest.unsignedBody, + accessKeyId: creds.accessKeyId, + secretAccessKey: creds.secretAccessKey, + sessionToken: creds.sessionToken, + service: meta.sigV4ServiceName, + region, }); -} + const signedRequest = yield* Effect.promise(() => signer.sign()); + + yield* Effect.logDebug( + `AWS Request - ${meta.sdkId}:${meta.name} - signed request: ${JSON.stringify(signedRequest)}`, + ); + + const effectHttpMethod = EFFECT_HTTP_MAP[ + signedRequest.method as keyof typeof EFFECT_HTTP_MAP + ] as (typeof EFFECT_HTTP_MAP)[keyof typeof EFFECT_HTTP_MAP] | undefined; + if (effectHttpMethod == null) { + //todo(pear): better error + return yield* Effect.fail( + new Error(`Unsupported HTTP method: ${signedRequest.method}`), + ); + } + + const rawResponse = yield* httpClient[effectHttpMethod](signedRequest.url, { + headers: signedRequest.headers, + body: signedRequest.body + ? typeof signedRequest.body === "string" + ? HttpBody.text(signedRequest.body) + : HttpBody.stream(signedRequest.body) + : undefined, + }); + + const responsePayload = { + body: yield* rawResponse.text, + headers: rawResponse.headers, + }; + yield* Effect.logDebug( + `AWS Request - ${meta.sdkId}:${meta.name} - raw response: ${JSON.stringify(responsePayload)}`, + ); + if (rawResponse.status >= 200 && rawResponse.status < 300) { + const response = yield* Schema.decode(FormatResponse)(responsePayload); + yield* Effect.logDebug( + `AWS Request - ${meta.sdkId}:${meta.name} - parsed response: ${JSON.stringify(response)}`, + ); + return response; + } else { + const { _tag: errorTag, ...error } = + yield* Schema.decode(FormatError)(responsePayload); + yield* Effect.logDebug( + `AWS Request - ${meta.sdkId}:${meta.name} - parsed error: ${JSON.stringify(error)}`, + ); + return yield* Effect.fail(createDynamicTaggedError(errorTag, error)); + } + }) as any; +}; + +const EFFECT_HTTP_MAP = { + PUT: "put", + POST: "post", + DELETE: "del", + PATCH: "patch", + HEAD: "head", + OPTIONS: "options", +} as const; diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts index 0479f715..8844d4fb 100644 --- a/src/clients.gen/s3.ts +++ b/src/clients.gen/s3.ts @@ -1,487 +1,5632 @@ -import { type Effect, Layer, Context, Data } from "effect"; -import type { CommonAwsError } from "../aws-errors"; -import { makeOperation } from "../client"; -import { restXmlProvider, type EndpointMetadata } from "../protocols/rest-xml"; +import { Schema } from "effect"; +import { + FormatXMLRequest, + FormatXMLResponse, + makeOperation, + NoopRequest, + NoopResponse, +} from "../client"; +import { + Operation, + Path, + Header, + StreamBody, + Body, + Error, +} from "../schema-helpers"; -//==== Exports ==== -export const metadata = {"protocol":"aws.protocols#restXml","sdkId":"S3","sigV4ServiceName":"s3","version":"2006-03-01"} - -export class S3ClientRequirement extends Context.Tag("S3ClientRequirement") (input: any) => Effect.Effect, _endpointMetadataType: EndpointMetadata }>() {} -export const clientLive = Layer.effect(S3ClientRequirement, restXmlProvider(metadata)); - -export const abortMultipartUpload = /*@__PURE__*/ makeOperation({ name: "abortMultipartUpload", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}, errors: {"NoSuchUpload":[]}}, S3ClientRequirement) -export const completeMultipartUpload = /*@__PURE__*/ makeOperation({ name: "completeMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MultipartUpload":["b","CompleteMultipartUpload"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"MpuObjectSize":["x-amz-mp-object-size"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) -export const copyObject = /*@__PURE__*/ makeOperation({ name: "copyObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=CopyObject", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}, errors: {"ObjectNotInActiveTierError":[]}}, S3ClientRequirement) -export const createBucket = /*@__PURE__*/ makeOperation({ name: "createBucket", method: "PUT", uri: "/{Bucket}", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CreateBucketConfiguration":["b","CreateBucketConfiguration"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"ObjectLockEnabledForBucket":["x-amz-bucket-object-lock-enabled"]}, errors: {"BucketAlreadyExists":[],"BucketAlreadyOwnedByYou":[]}}, S3ClientRequirement) -export const createBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataConfiguration", method: "POST", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataConfiguration":["b","MetadataConfiguration"]}, errors: {}}, S3ClientRequirement) -export const createBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "createBucketMetadataTableConfiguration", method: "POST", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MetadataTableConfiguration":["b","MetadataTableConfiguration"]}, errors: {}}, S3ClientRequirement) -export const createMultipartUpload = /*@__PURE__*/ makeOperation({ name: "createMultipartUpload", method: "POST", uri: "/{Bucket}/{Key+}?uploads", body: {"ACL":["x-amz-acl"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentType":["Content-Type"],"Expires":["Expires"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}, errors: {}}, S3ClientRequirement) -export const createSession = /*@__PURE__*/ makeOperation({ name: "createSession", method: "GET", uri: "/{Bucket}?session", body: {"SessionMode":["x-amz-create-session-mode"],"Bucket":["p","Bucket"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"]}, errors: {"NoSuchBucket":[]}}, S3ClientRequirement) -export const deleteBucket = /*@__PURE__*/ makeOperation({ name: "deleteBucket", method: "DELETE", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketAnalyticsConfiguration", method: "DELETE", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketCors = /*@__PURE__*/ makeOperation({ name: "deleteBucketCors", method: "DELETE", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketEncryption = /*@__PURE__*/ makeOperation({ name: "deleteBucketEncryption", method: "DELETE", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketIntelligentTieringConfiguration", method: "DELETE", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketInventoryConfiguration", method: "DELETE", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketLifecycle = /*@__PURE__*/ makeOperation({ name: "deleteBucketLifecycle", method: "DELETE", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataConfiguration", method: "DELETE", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetadataTableConfiguration", method: "DELETE", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "deleteBucketMetricsConfiguration", method: "DELETE", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "deleteBucketOwnershipControls", method: "DELETE", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketPolicy = /*@__PURE__*/ makeOperation({ name: "deleteBucketPolicy", method: "DELETE", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketReplication = /*@__PURE__*/ makeOperation({ name: "deleteBucketReplication", method: "DELETE", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketTagging = /*@__PURE__*/ makeOperation({ name: "deleteBucketTagging", method: "DELETE", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteBucketWebsite = /*@__PURE__*/ makeOperation({ name: "deleteBucketWebsite", method: "DELETE", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const deleteObject = /*@__PURE__*/ makeOperation({ name: "deleteObject", method: "DELETE", uri: "/{Bucket}/{Key+}?x-id=DeleteObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"MFA":["x-amz-mfa"],"IfMatch":["If-Match"]}, errors: {}}, S3ClientRequirement) -export const deleteObjects = /*@__PURE__*/ makeOperation({ name: "deleteObjects", method: "POST", uri: "/{Bucket}?delete", body: {"Bucket":["p","Bucket"],"Delete":["b","Delete"],"MFA":["x-amz-mfa"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const deleteObjectTagging = /*@__PURE__*/ makeOperation({ name: "deleteObjectTagging", method: "DELETE", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) -export const deletePublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "deletePublicAccessBlock", method: "DELETE", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAccelerateConfiguration", method: "GET", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketAcl = /*@__PURE__*/ makeOperation({ name: "getBucketAcl", method: "GET", uri: "/{Bucket}?acl", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketAnalyticsConfiguration", method: "GET", uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketCors = /*@__PURE__*/ makeOperation({ name: "getBucketCors", method: "GET", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketEncryption = /*@__PURE__*/ makeOperation({ name: "getBucketEncryption", method: "GET", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketIntelligentTieringConfiguration", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketInventoryConfiguration", method: "GET", uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketLifecycleConfiguration", method: "GET", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketLocation = /*@__PURE__*/ makeOperation({ name: "getBucketLocation", method: "GET", uri: "/{Bucket}?location", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketLogging = /*@__PURE__*/ makeOperation({ name: "getBucketLogging", method: "GET", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketMetadataConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataConfiguration", method: "GET", uri: "/{Bucket}?metadataConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketMetadataTableConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetadataTableConfiguration", method: "GET", uri: "/{Bucket}?metadataTable", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketMetricsConfiguration", method: "GET", uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "getBucketNotificationConfiguration", method: "GET", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "getBucketOwnershipControls", method: "GET", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketPolicy = /*@__PURE__*/ makeOperation({ name: "getBucketPolicy", method: "GET", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketPolicyStatus = /*@__PURE__*/ makeOperation({ name: "getBucketPolicyStatus", method: "GET", uri: "/{Bucket}?policyStatus", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketReplication = /*@__PURE__*/ makeOperation({ name: "getBucketReplication", method: "GET", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "getBucketRequestPayment", method: "GET", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketTagging = /*@__PURE__*/ makeOperation({ name: "getBucketTagging", method: "GET", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketVersioning = /*@__PURE__*/ makeOperation({ name: "getBucketVersioning", method: "GET", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getBucketWebsite = /*@__PURE__*/ makeOperation({ name: "getBucketWebsite", method: "GET", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getObject = /*@__PURE__*/ makeOperation({ name: "getObject", method: "GET", uri: "/{Bucket}/{Key+}?x-id=GetObject", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {"InvalidObjectState":["StorageClass","AccessTier"],"NoSuchKey":[]}}, S3ClientRequirement) -export const getObjectAcl = /*@__PURE__*/ makeOperation({ name: "getObjectAcl", method: "GET", uri: "/{Bucket}/{Key+}?acl", body: {"Bucket":["p","Bucket"],"Key":["p","Key"]}, errors: {"NoSuchKey":[]}}, S3ClientRequirement) -export const getObjectAttributes = /*@__PURE__*/ makeOperation({ name: "getObjectAttributes", method: "GET", uri: "/{Bucket}/{Key+}?attributes", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {"NoSuchKey":[]}}, S3ClientRequirement) -export const getObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "getObjectLegalHold", method: "GET", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) -export const getObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "getObjectLockConfiguration", method: "GET", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const getObjectRetention = /*@__PURE__*/ makeOperation({ name: "getObjectRetention", method: "GET", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) -export const getObjectTagging = /*@__PURE__*/ makeOperation({ name: "getObjectTagging", method: "GET", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) -export const getObjectTorrent = /*@__PURE__*/ makeOperation({ name: "getObjectTorrent", method: "GET", uri: "/{Bucket}/{Key+}?torrent", body: {"Bucket":["p","Bucket"],"Key":["p"]}, errors: {}}, S3ClientRequirement) -export const getPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "getPublicAccessBlock", method: "GET", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const headBucket = /*@__PURE__*/ makeOperation({ name: "headBucket", method: "HEAD", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}, errors: {"NotFound":[]}}, S3ClientRequirement) -export const headObject = /*@__PURE__*/ makeOperation({ name: "headObject", method: "HEAD", uri: "/{Bucket}/{Key+}", body: {"Bucket":["p","Bucket"],"IfMatch":["If-Match"],"IfModifiedSince":["If-Modified-Since"],"IfNoneMatch":["If-None-Match"],"IfUnmodifiedSince":["If-Unmodified-Since"],"Key":["p","Key"],"Range":["Range"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {"NotFound":[]}}, S3ClientRequirement) -export const listBucketAnalyticsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketAnalyticsConfigurations", method: "GET", uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const listBucketIntelligentTieringConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketIntelligentTieringConfigurations", method: "GET", uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const listBucketInventoryConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketInventoryConfigurations", method: "GET", uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const listBucketMetricsConfigurations = /*@__PURE__*/ makeOperation({ name: "listBucketMetricsConfigurations", method: "GET", uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const listBuckets = /*@__PURE__*/ makeOperation({ name: "listBuckets", method: "GET", uri: "/?x-id=ListBuckets", body: {}, errors: {}}, S3ClientRequirement) -export const listDirectoryBuckets = /*@__PURE__*/ makeOperation({ name: "listDirectoryBuckets", method: "GET", uri: "/?x-id=ListDirectoryBuckets", body: {}, errors: {}}, S3ClientRequirement) -export const listMultipartUploads = /*@__PURE__*/ makeOperation({ name: "listMultipartUploads", method: "GET", uri: "/{Bucket}?uploads", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const listObjects = /*@__PURE__*/ makeOperation({ name: "listObjects", method: "GET", uri: "/{Bucket}", body: {"Bucket":["p","Bucket"]}, errors: {"NoSuchBucket":[]}}, S3ClientRequirement) -export const listObjectsV2 = /*@__PURE__*/ makeOperation({ name: "listObjectsV2", method: "GET", uri: "/{Bucket}?list-type=2", body: {"Bucket":["p","Bucket"]}, errors: {"NoSuchBucket":[]}}, S3ClientRequirement) -export const listObjectVersions = /*@__PURE__*/ makeOperation({ name: "listObjectVersions", method: "GET", uri: "/{Bucket}?versions", body: {"Bucket":["p","Bucket"]}, errors: {}}, S3ClientRequirement) -export const listParts = /*@__PURE__*/ makeOperation({ name: "listParts", method: "GET", uri: "/{Bucket}/{Key+}?x-id=ListParts", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) -export const putBucketAccelerateConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAccelerateConfiguration", method: "PUT", uri: "/{Bucket}?accelerate", body: {"Bucket":["p","Bucket"],"AccelerateConfiguration":["b","AccelerateConfiguration"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putBucketAcl = /*@__PURE__*/ makeOperation({ name: "putBucketAcl", method: "PUT", uri: "/{Bucket}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"]}, errors: {}}, S3ClientRequirement) -export const putBucketAnalyticsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketAnalyticsConfiguration", method: "PUT", uri: "/{Bucket}?analytics", body: {"Bucket":["p","Bucket"],"AnalyticsConfiguration":["b","AnalyticsConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketCors = /*@__PURE__*/ makeOperation({ name: "putBucketCors", method: "PUT", uri: "/{Bucket}?cors", body: {"Bucket":["p","Bucket"],"CORSConfiguration":["b","CORSConfiguration"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putBucketEncryption = /*@__PURE__*/ makeOperation({ name: "putBucketEncryption", method: "PUT", uri: "/{Bucket}?encryption", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ServerSideEncryptionConfiguration":["b","ServerSideEncryptionConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketIntelligentTieringConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketIntelligentTieringConfiguration", method: "PUT", uri: "/{Bucket}?intelligent-tiering", body: {"Bucket":["p","Bucket"],"IntelligentTieringConfiguration":["b","IntelligentTieringConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketInventoryConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketInventoryConfiguration", method: "PUT", uri: "/{Bucket}?inventory", body: {"Bucket":["p","Bucket"],"InventoryConfiguration":["b","InventoryConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketLifecycleConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketLifecycleConfiguration", method: "PUT", uri: "/{Bucket}?lifecycle", body: {"Bucket":["p","Bucket"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"LifecycleConfiguration":["b","LifecycleConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketLogging = /*@__PURE__*/ makeOperation({ name: "putBucketLogging", method: "PUT", uri: "/{Bucket}?logging", body: {"Bucket":["p","Bucket"],"BucketLoggingStatus":["b","BucketLoggingStatus"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putBucketMetricsConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketMetricsConfiguration", method: "PUT", uri: "/{Bucket}?metrics", body: {"Bucket":["p","Bucket"],"MetricsConfiguration":["b","MetricsConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketNotificationConfiguration = /*@__PURE__*/ makeOperation({ name: "putBucketNotificationConfiguration", method: "PUT", uri: "/{Bucket}?notification", body: {"Bucket":["p","Bucket"],"NotificationConfiguration":["b","NotificationConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketOwnershipControls = /*@__PURE__*/ makeOperation({ name: "putBucketOwnershipControls", method: "PUT", uri: "/{Bucket}?ownershipControls", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"OwnershipControls":["b","OwnershipControls"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putBucketPolicy = /*@__PURE__*/ makeOperation({ name: "putBucketPolicy", method: "PUT", uri: "/{Bucket}?policy", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Policy":["b"]}, errors: {}}, S3ClientRequirement) -export const putBucketReplication = /*@__PURE__*/ makeOperation({ name: "putBucketReplication", method: "PUT", uri: "/{Bucket}?replication", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ReplicationConfiguration":["b","ReplicationConfiguration"],"Token":["x-amz-bucket-object-lock-token"]}, errors: {}}, S3ClientRequirement) -export const putBucketRequestPayment = /*@__PURE__*/ makeOperation({ name: "putBucketRequestPayment", method: "PUT", uri: "/{Bucket}?requestPayment", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"RequestPaymentConfiguration":["b","RequestPaymentConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketTagging = /*@__PURE__*/ makeOperation({ name: "putBucketTagging", method: "PUT", uri: "/{Bucket}?tagging", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}, errors: {}}, S3ClientRequirement) -export const putBucketVersioning = /*@__PURE__*/ makeOperation({ name: "putBucketVersioning", method: "PUT", uri: "/{Bucket}?versioning", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"MFA":["x-amz-mfa"],"VersioningConfiguration":["b","VersioningConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putBucketWebsite = /*@__PURE__*/ makeOperation({ name: "putBucketWebsite", method: "PUT", uri: "/{Bucket}?website", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"WebsiteConfiguration":["b","WebsiteConfiguration"]}, errors: {}}, S3ClientRequirement) -export const putObject = /*@__PURE__*/ makeOperation({ name: "putObject", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=PutObject", body: {"ACL":["x-amz-acl"],"Body":["b"],"Bucket":["p","Bucket"],"CacheControl":["Cache-Control"],"ContentDisposition":["Content-Disposition"],"ContentEncoding":["Content-Encoding"],"ContentLanguage":["Content-Language"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ContentType":["Content-Type"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Expires":["Expires"],"IfMatch":["If-Match"],"IfNoneMatch":["If-None-Match"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"SSEKMSKeyId":["x-amz-server-side-encryption-aws-kms-key-id"],"SSEKMSEncryptionContext":["x-amz-server-side-encryption-context"],"BucketKeyEnabled":["x-amz-server-side-encryption-bucket-key-enabled"],"ObjectLockLegalHoldStatus":["x-amz-object-lock-legal-hold"]}, errors: {"EncryptionTypeMismatch":[],"InvalidRequest":[],"InvalidWriteOffset":[],"TooManyParts":[]}}, S3ClientRequirement) -export const putObjectAcl = /*@__PURE__*/ makeOperation({ name: "putObjectAcl", method: "PUT", uri: "/{Bucket}/{Key+}?acl", body: {"ACL":["x-amz-acl"],"AccessControlPolicy":["b","AccessControlPolicy"],"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"GrantReadACP":["x-amz-grant-read-acp"],"GrantWriteACP":["x-amz-grant-write-acp"],"Key":["p","Key"]}, errors: {"NoSuchKey":[]}}, S3ClientRequirement) -export const putObjectLegalHold = /*@__PURE__*/ makeOperation({ name: "putObjectLegalHold", method: "PUT", uri: "/{Bucket}/{Key+}?legal-hold", body: {"Bucket":["p","Bucket"],"Key":["p"],"LegalHold":["b","LegalHold"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putObjectLockConfiguration = /*@__PURE__*/ makeOperation({ name: "putObjectLockConfiguration", method: "PUT", uri: "/{Bucket}?object-lock", body: {"Bucket":["p","Bucket"],"ObjectLockConfiguration":["b","ObjectLockConfiguration"],"Token":["x-amz-bucket-object-lock-token"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putObjectRetention = /*@__PURE__*/ makeOperation({ name: "putObjectRetention", method: "PUT", uri: "/{Bucket}/{Key+}?retention", body: {"Bucket":["p","Bucket"],"Key":["p"],"Retention":["b","Retention"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {}}, S3ClientRequirement) -export const putObjectTagging = /*@__PURE__*/ makeOperation({ name: "putObjectTagging", method: "PUT", uri: "/{Bucket}/{Key+}?tagging", body: {"Bucket":["p","Bucket"],"Key":["p"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"Tagging":["b","Tagging"]}, errors: {}}, S3ClientRequirement) -export const putPublicAccessBlock = /*@__PURE__*/ makeOperation({ name: "putPublicAccessBlock", method: "PUT", uri: "/{Bucket}?publicAccessBlock", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"PublicAccessBlockConfiguration":["b","PublicAccessBlockConfiguration"]}, errors: {}}, S3ClientRequirement) -export const renameObject = /*@__PURE__*/ makeOperation({ name: "renameObject", method: "PUT", uri: "/{Bucket}/{Key+}?renameObject", body: {"Bucket":["p","Bucket"],"Key":["p","Key"],"DestinationIfMatch":["If-Match"],"DestinationIfNoneMatch":["If-None-Match"],"DestinationIfModifiedSince":["If-Modified-Since"],"DestinationIfUnmodifiedSince":["If-Unmodified-Since"],"SourceIfMatch":["x-amz-rename-source-if-match"],"SourceIfNoneMatch":["x-amz-rename-source-if-none-match"],"SourceIfModifiedSince":["x-amz-rename-source-if-modified-since"],"SourceIfUnmodifiedSince":["x-amz-rename-source-if-unmodified-since"]}, errors: {"IdempotencyParameterMismatch":[]}}, S3ClientRequirement) -export const restoreObject = /*@__PURE__*/ makeOperation({ name: "restoreObject", method: "POST", uri: "/{Bucket}/{Key+}?restore", body: {"Bucket":["p","Bucket"],"Key":["p"],"RestoreRequest":["b","RestoreRequest"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"]}, errors: {"ObjectAlreadyInActiveTierError":[]}}, S3ClientRequirement) -export const selectObjectContent = /*@__PURE__*/ makeOperation({ name: "selectObjectContent", method: "POST", uri: "/{Bucket}/{Key+}?select&select-type=2", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) -export const updateBucketMetadataInventoryTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataInventoryTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataInventoryTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"InventoryTableConfiguration":["b","InventoryTableConfiguration"]}, errors: {}}, S3ClientRequirement) -export const updateBucketMetadataJournalTableConfiguration = /*@__PURE__*/ makeOperation({ name: "updateBucketMetadataJournalTableConfiguration", method: "PUT", uri: "/{Bucket}?metadataJournalTable", body: {"Bucket":["p","Bucket"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"JournalTableConfiguration":["b","JournalTableConfiguration"]}, errors: {}}, S3ClientRequirement) -export const uploadPart = /*@__PURE__*/ makeOperation({ name: "uploadPart", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPart", body: {"Body":["b"],"Bucket":["p","Bucket"],"ContentLength":["Content-Length"],"ContentMD5":["Content-MD5"],"ChecksumAlgorithm":["x-amz-sdk-checksum-algorithm"],"ChecksumCRC32":["x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-checksum-sha256"],"Key":["p","Key"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"]}, errors: {}}, S3ClientRequirement) -export const uploadPartCopy = /*@__PURE__*/ makeOperation({ name: "uploadPartCopy", method: "PUT", uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", body: {"Bucket":["p","Bucket"],"Key":["p"],"SSECustomerAlgorithm":["x-amz-server-side-encryption-customer-algorithm"],"SSECustomerKey":["x-amz-server-side-encryption-customer-key"],"SSECustomerKeyMD5":["x-amz-server-side-encryption-customer-key-MD5"],"CopySourceSSECustomerAlgorithm":["x-amz-copy-source-server-side-encryption-customer-algorithm"],"CopySourceSSECustomerKey":["x-amz-copy-source-server-side-encryption-customer-key"],"CopySourceSSECustomerKeyMD5":["x-amz-copy-source-server-side-encryption-customer-key-MD5"],"ExpectedSourceBucketOwner":["x-amz-source-expected-bucket-owner"]}, errors: {}}, S3ClientRequirement) -export const writeGetObjectResponse = /*@__PURE__*/ makeOperation({ name: "writeGetObjectResponse", method: "POST", uri: "/WriteGetObjectResponse", body: {"Body":["b"],"StatusCode":["x-amz-fwd-status"],"ErrorCode":["x-amz-fwd-error-code"],"ErrorMessage":["x-amz-fwd-error-message"],"AcceptRanges":["x-amz-fwd-header-accept-ranges"],"CacheControl":["x-amz-fwd-header-Cache-Control"],"ContentDisposition":["x-amz-fwd-header-Content-Disposition"],"ContentEncoding":["x-amz-fwd-header-Content-Encoding"],"ContentLanguage":["x-amz-fwd-header-Content-Language"],"ContentLength":["Content-Length"],"ContentRange":["x-amz-fwd-header-Content-Range"],"ContentType":["x-amz-fwd-header-Content-Type"],"ChecksumCRC32":["x-amz-fwd-header-x-amz-checksum-crc32"],"ChecksumCRC32C":["x-amz-fwd-header-x-amz-checksum-crc32c"],"ChecksumCRC64NVME":["x-amz-fwd-header-x-amz-checksum-crc64nvme"],"ChecksumSHA1":["x-amz-fwd-header-x-amz-checksum-sha1"],"ChecksumSHA256":["x-amz-fwd-header-x-amz-checksum-sha256"],"DeleteMarker":["x-amz-fwd-header-x-amz-delete-marker"],"ETag":["x-amz-fwd-header-ETag"],"Expires":["x-amz-fwd-header-Expires"],"Expiration":["x-amz-fwd-header-x-amz-expiration"],"LastModified":["x-amz-fwd-header-Last-Modified"],"MissingMeta":["x-amz-fwd-header-x-amz-missing-meta"],"ObjectLockMode":["x-amz-fwd-header-x-amz-object-lock-mode"],"ObjectLockLegalHoldStatus":["x-amz-fwd-header-x-amz-object-lock-legal-hold"],"ObjectLockRetainUntilDate":["x-amz-fwd-header-x-amz-object-lock-retain-until-date"],"PartsCount":["x-amz-fwd-header-x-amz-mp-parts-count"],"ReplicationStatus":["x-amz-fwd-header-x-amz-replication-status"],"RequestCharged":["x-amz-fwd-header-x-amz-request-charged"],"Restore":["x-amz-fwd-header-x-amz-restore"],"ServerSideEncryption":["x-amz-fwd-header-x-amz-server-side-encryption"],"SSECustomerAlgorithm":["x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"],"SSEKMSKeyId":["x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"],"SSECustomerKeyMD5":["x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"],"StorageClass":["x-amz-fwd-header-x-amz-storage-class"],"TagCount":["x-amz-fwd-header-x-amz-tagging-count"],"VersionId":["x-amz-fwd-header-x-amz-version-id"],"BucketKeyEnabled":["x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"]}, errors: {}}, S3ClientRequirement) - -//==== Aliased Types ==== -type NoSuchUpload = {}; -type RequestCharged = "requester"; -type AbortMultipartUploadOutput = {RequestCharged?: RequestCharged}; -type RequestPayer = "requester"; -type AbortMultipartUploadRequest = {Bucket: string, Key: string, UploadId: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, IfMatchInitiatedTime?: Date | string}; -type ChecksumType = "COMPOSITE" | "FULL_OBJECT"; -type ServerSideEncryption = "AES256" | "aws:fsx" | "aws:kms" | "aws:kms:dsse"; -type CompleteMultipartUploadOutput = {Location?: string, Bucket?: string, Key?: string, Expiration?: string, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, ServerSideEncryption?: ServerSideEncryption, VersionId?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; -type CompletedPart = {ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, PartNumber?: number}; -type CompletedMultipartUpload = {Parts?: Array}; -type CompleteMultipartUploadRequest = {Bucket: string, Key: string, MultipartUpload?: CompletedMultipartUpload, UploadId: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, MpuObjectSize?: number, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, IfMatch?: string, IfNoneMatch?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string}; -type ObjectNotInActiveTierError = {}; -type CopyObjectResult = {ETag?: string, LastModified?: Date | string, ChecksumType?: ChecksumType, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; -type CopyObjectOutput = {CopyObjectResult?: CopyObjectResult, Expiration?: string, CopySourceVersionId?: string, VersionId?: string, ServerSideEncryption?: ServerSideEncryption, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; -type ObjectCannedACL = "private" | "public-read" | "public-read-write" | "authenticated-read" | "aws-exec-read" | "bucket-owner-read" | "bucket-owner-full-control"; -type ChecksumAlgorithm = "CRC32" | "CRC32C" | "SHA1" | "SHA256" | "CRC64NVME"; -type MetadataDirective = "COPY" | "REPLACE"; -type TaggingDirective = "COPY" | "REPLACE"; -type StorageClass = "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "GLACIER" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR" | "SNOW" | "EXPRESS_ONEZONE" | "FSX_OPENZFS"; -type ObjectLockMode = "GOVERNANCE" | "COMPLIANCE"; -type ObjectLockLegalHoldStatus = "ON" | "OFF"; -type Metadata = Record; -type CopyObjectRequest = {ACL?: ObjectCannedACL, Bucket: string, CacheControl?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentType?: string, CopySource: string, CopySourceIfMatch?: string, CopySourceIfModifiedSince?: Date | string, CopySourceIfNoneMatch?: string, CopySourceIfUnmodifiedSince?: Date | string, Expires?: string, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWriteACP?: string, IfMatch?: string, IfNoneMatch?: string, Key: string, Metadata?: Metadata, MetadataDirective?: MetadataDirective, TaggingDirective?: TaggingDirective, ServerSideEncryption?: ServerSideEncryption, StorageClass?: StorageClass, WebsiteRedirectLocation?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, CopySourceSSECustomerAlgorithm?: string, CopySourceSSECustomerKey?: string, CopySourceSSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, Tagging?: string, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus, ExpectedBucketOwner?: string, ExpectedSourceBucketOwner?: string}; -type BucketAlreadyExists = {}; -type BucketAlreadyOwnedByYou = {}; -type CreateBucketOutput = {Location?: string, BucketArn?: string}; -type BucketCannedACL = "private" | "public-read" | "public-read-write" | "authenticated-read"; -type ObjectOwnership = "BucketOwnerPreferred" | "ObjectWriter" | "BucketOwnerEnforced"; -type BucketLocationConstraint = "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ap-south-1" | "ap-south-2" | "ap-southeast-1" | "ap-southeast-2" | "ap-southeast-3" | "ap-southeast-4" | "ap-southeast-5" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "EU" | "eu-central-1" | "eu-central-2" | "eu-north-1" | "eu-south-1" | "eu-south-2" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "il-central-1" | "me-central-1" | "me-south-1" | "sa-east-1" | "us-east-2" | "us-gov-east-1" | "us-gov-west-1" | "us-west-1" | "us-west-2"; -type LocationType = "AvailabilityZone" | "LocalZone"; -type DataRedundancy = "SingleAvailabilityZone" | "SingleLocalZone"; -type BucketType = "Directory"; -type LocationInfo = {Type?: LocationType, Name?: string}; -type BucketInfo = {DataRedundancy?: DataRedundancy, Type?: BucketType}; -type Tag = {Key: string, Value: string}; -type CreateBucketConfiguration = {LocationConstraint?: BucketLocationConstraint, Location?: LocationInfo, Bucket?: BucketInfo, Tags?: Array}; -type CreateBucketRequest = {ACL?: BucketCannedACL, Bucket: string, CreateBucketConfiguration?: CreateBucketConfiguration, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWrite?: string, GrantWriteACP?: string, ObjectLockEnabledForBucket?: boolean, ObjectOwnership?: ObjectOwnership}; -type CreateMultipartUploadOutput = {AbortDate?: Date | string, AbortRuleId?: string, Bucket?: string, Key?: string, UploadId?: string, ServerSideEncryption?: ServerSideEncryption, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; -type CreateMultipartUploadRequest = {ACL?: ObjectCannedACL, Bucket: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentType?: string, Expires?: string, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWriteACP?: string, Key: string, Metadata?: Metadata, ServerSideEncryption?: ServerSideEncryption, StorageClass?: StorageClass, WebsiteRedirectLocation?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestPayer?: RequestPayer, Tagging?: string, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus, ExpectedBucketOwner?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; -type NoSuchBucket = {}; -type SessionCredentials = {AccessKeyId: string, SecretAccessKey: string, SessionToken: string, Expiration: Date | string}; -type CreateSessionOutput = {ServerSideEncryption?: ServerSideEncryption, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, Credentials: SessionCredentials}; -type SessionMode = "ReadOnly" | "ReadWrite"; -type CreateSessionRequest = {SessionMode?: SessionMode, Bucket: string, ServerSideEncryption?: ServerSideEncryption, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean}; -type DeleteObjectOutput = {DeleteMarker?: boolean, VersionId?: string, RequestCharged?: RequestCharged}; -type DeleteObjectRequest = {Bucket: string, Key: string, MFA?: string, VersionId?: string, RequestPayer?: RequestPayer, BypassGovernanceRetention?: boolean, ExpectedBucketOwner?: string, IfMatch?: string, IfMatchLastModifiedTime?: Date | string, IfMatchSize?: number}; -type DeletedObject = {Key?: string, VersionId?: string, DeleteMarker?: boolean, DeleteMarkerVersionId?: string}; -type Error = {Key?: string, VersionId?: string, Code?: string, Message?: string}; -type DeleteObjectsOutput = {Deleted?: Array, RequestCharged?: RequestCharged, Errors?: Array}; -type ObjectIdentifier = {Key: string, VersionId?: string, ETag?: string, LastModifiedTime?: Date | string, Size?: number}; -type Delete = {Objects: Array, Quiet?: boolean}; -type DeleteObjectsRequest = {Bucket: string, Delete: Delete, MFA?: string, RequestPayer?: RequestPayer, BypassGovernanceRetention?: boolean, ExpectedBucketOwner?: string, ChecksumAlgorithm?: ChecksumAlgorithm}; -type DeleteObjectTaggingOutput = {VersionId?: string}; -type DeleteObjectTaggingRequest = {Bucket: string, Key: string, VersionId?: string, ExpectedBucketOwner?: string}; -type BucketAccelerateStatus = "Enabled" | "Suspended"; -type GetBucketAccelerateConfigurationOutput = {Status?: BucketAccelerateStatus, RequestCharged?: RequestCharged}; -type GetBucketAccelerateConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; -type Permission = "FULL_CONTROL" | "WRITE" | "WRITE_ACP" | "READ" | "READ_ACP"; -type Owner = {DisplayName?: string, ID?: string}; -type Type = "CanonicalUser" | "AmazonCustomerByEmail" | "Group"; -type Grantee = {DisplayName?: string, EmailAddress?: string, ID?: string, URI?: string, Type: Type}; -type Grant = {Grantee?: Grantee, Permission?: Permission}; -type GetBucketAclOutput = {Owner?: Owner, Grants?: Array}; -type GetBucketAclRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type StorageClassAnalysisSchemaVersion = "V_1"; -type AnalyticsS3ExportFileFormat = "CSV"; -type AnalyticsAndOperator = {Prefix?: string, Tags?: Array}; -type AnalyticsS3BucketDestination = {Format: AnalyticsS3ExportFileFormat, BucketAccountId?: string, Bucket: string, Prefix?: string}; -type AnalyticsFilter = string | Tag | AnalyticsAndOperator; -type AnalyticsExportDestination = {S3BucketDestination: AnalyticsS3BucketDestination}; -type StorageClassAnalysisDataExport = {OutputSchemaVersion: StorageClassAnalysisSchemaVersion, Destination: AnalyticsExportDestination}; -type StorageClassAnalysis = {DataExport?: StorageClassAnalysisDataExport}; -type AnalyticsConfiguration = {Id: string, Filter?: AnalyticsFilter, StorageClassAnalysis: StorageClassAnalysis}; -type GetBucketAnalyticsConfigurationOutput = {AnalyticsConfiguration?: AnalyticsConfiguration}; -type GetBucketAnalyticsConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; -type CORSRule = {ID?: string, AllowedHeaders?: Array, AllowedMethods: Array, AllowedOrigins: Array, ExposeHeaders?: Array, MaxAgeSeconds?: number}; -type GetBucketCorsOutput = {CORSRules?: Array}; -type GetBucketCorsRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type ServerSideEncryptionByDefault = {SSEAlgorithm: ServerSideEncryption, KMSMasterKeyID?: string}; -type ServerSideEncryptionRule = {ApplyServerSideEncryptionByDefault?: ServerSideEncryptionByDefault, BucketKeyEnabled?: boolean}; -type ServerSideEncryptionConfiguration = {Rules: Array}; -type GetBucketEncryptionOutput = {ServerSideEncryptionConfiguration?: ServerSideEncryptionConfiguration}; -type GetBucketEncryptionRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type IntelligentTieringStatus = "Enabled" | "Disabled"; -type IntelligentTieringAccessTier = "ARCHIVE_ACCESS" | "DEEP_ARCHIVE_ACCESS"; -type Tiering = {Days: number, AccessTier: IntelligentTieringAccessTier}; -type IntelligentTieringAndOperator = {Prefix?: string, Tags?: Array}; -type IntelligentTieringFilter = {Prefix?: string, Tag?: Tag, And?: IntelligentTieringAndOperator}; -type IntelligentTieringConfiguration = {Id: string, Filter?: IntelligentTieringFilter, Status: IntelligentTieringStatus, Tierings: Array}; -type GetBucketIntelligentTieringConfigurationOutput = {IntelligentTieringConfiguration?: IntelligentTieringConfiguration}; -type GetBucketIntelligentTieringConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; -type InventoryIncludedObjectVersions = "All" | "Current"; -type InventoryOptionalField = "Size" | "LastModifiedDate" | "StorageClass" | "ETag" | "IsMultipartUploaded" | "ReplicationStatus" | "EncryptionStatus" | "ObjectLockRetainUntilDate" | "ObjectLockMode" | "ObjectLockLegalHoldStatus" | "IntelligentTieringAccessTier" | "BucketKeyStatus" | "ChecksumAlgorithm" | "ObjectAccessControlList" | "ObjectOwner"; -type InventoryFrequency = "Daily" | "Weekly"; -type InventoryFilter = {Prefix: string}; -type InventorySchedule = {Frequency: InventoryFrequency}; -type InventoryFormat = "CSV" | "ORC" | "Parquet"; -type SSES3 = {}; -type SSEKMS = {KeyId: string}; -type InventoryEncryption = {SSES3?: SSES3, SSEKMS?: SSEKMS}; -type InventoryS3BucketDestination = {AccountId?: string, Bucket: string, Format: InventoryFormat, Prefix?: string, Encryption?: InventoryEncryption}; -type InventoryDestination = {S3BucketDestination: InventoryS3BucketDestination}; -type InventoryConfiguration = {Destination: InventoryDestination, IsEnabled: boolean, Filter?: InventoryFilter, Id: string, IncludedObjectVersions: InventoryIncludedObjectVersions, OptionalFields?: Array, Schedule: InventorySchedule}; -type GetBucketInventoryConfigurationOutput = {InventoryConfiguration?: InventoryConfiguration}; -type GetBucketInventoryConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; -type TransitionDefaultMinimumObjectSize = "varies_by_storage_class" | "all_storage_classes_128K"; -type ExpirationStatus = "Enabled" | "Disabled"; -type TransitionStorageClass = "GLACIER" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "DEEP_ARCHIVE" | "GLACIER_IR"; -type LifecycleExpiration = {Date?: Date | string, Days?: number, ExpiredObjectDeleteMarker?: boolean}; -type Transition = {Date?: Date | string, Days?: number, StorageClass?: TransitionStorageClass}; -type NoncurrentVersionTransition = {NoncurrentDays?: number, StorageClass?: TransitionStorageClass, NewerNoncurrentVersions?: number}; -type NoncurrentVersionExpiration = {NoncurrentDays?: number, NewerNoncurrentVersions?: number}; -type AbortIncompleteMultipartUpload = {DaysAfterInitiation?: number}; -type LifecycleRuleAndOperator = {Prefix?: string, Tags?: Array, ObjectSizeGreaterThan?: number, ObjectSizeLessThan?: number}; -type LifecycleRuleFilter = {Prefix?: string, Tag?: Tag, ObjectSizeGreaterThan?: number, ObjectSizeLessThan?: number, And?: LifecycleRuleAndOperator}; -type LifecycleRule = {Expiration?: LifecycleExpiration, ID?: string, Prefix?: string, Filter?: LifecycleRuleFilter, Status: ExpirationStatus, Transitions?: Array, NoncurrentVersionTransitions?: Array, NoncurrentVersionExpiration?: NoncurrentVersionExpiration, AbortIncompleteMultipartUpload?: AbortIncompleteMultipartUpload}; -type GetBucketLifecycleConfigurationOutput = {Rules?: Array, TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize}; -type GetBucketLifecycleConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type GetBucketLocationOutput = {LocationConstraint?: BucketLocationConstraint}; -type GetBucketLocationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type BucketLogsPermission = "FULL_CONTROL" | "READ" | "WRITE"; -type SimplePrefix = {}; -type PartitionDateSource = "EventTime" | "DeliveryTime"; -type PartitionedPrefix = {PartitionDateSource?: PartitionDateSource}; -type TargetGrant = {Grantee?: Grantee, Permission?: BucketLogsPermission}; -type TargetObjectKeyFormat = {SimplePrefix?: SimplePrefix, PartitionedPrefix?: PartitionedPrefix}; -type LoggingEnabled = {TargetBucket: string, TargetGrants?: Array, TargetPrefix: string, TargetObjectKeyFormat?: TargetObjectKeyFormat}; -type GetBucketLoggingOutput = {LoggingEnabled?: LoggingEnabled}; -type GetBucketLoggingRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type S3TablesBucketType = "aws" | "customer"; -type InventoryConfigurationState = "ENABLED" | "DISABLED"; -type DestinationResult = {TableBucketType?: S3TablesBucketType, TableBucketArn?: string, TableNamespace?: string}; -type ExpirationState = "ENABLED" | "DISABLED"; -type ErrorDetails = {ErrorCode?: string, ErrorMessage?: string}; -type RecordExpiration = {Expiration: ExpirationState, Days?: number}; -type JournalTableConfigurationResult = {TableStatus: string, Error?: ErrorDetails, TableName: string, TableArn?: string, RecordExpiration: RecordExpiration}; -type InventoryTableConfigurationResult = {ConfigurationState: InventoryConfigurationState, TableStatus?: string, Error?: ErrorDetails, TableName?: string, TableArn?: string}; -type MetadataConfigurationResult = {DestinationResult: DestinationResult, JournalTableConfigurationResult?: JournalTableConfigurationResult, InventoryTableConfigurationResult?: InventoryTableConfigurationResult}; -type GetBucketMetadataConfigurationResult = {MetadataConfigurationResult: MetadataConfigurationResult}; -type GetBucketMetadataConfigurationOutput = {GetBucketMetadataConfigurationResult?: GetBucketMetadataConfigurationResult}; -type GetBucketMetadataConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type S3TablesDestinationResult = {TableBucketArn: string, TableName: string, TableArn: string, TableNamespace: string}; -type MetadataTableConfigurationResult = {S3TablesDestinationResult: S3TablesDestinationResult}; -type GetBucketMetadataTableConfigurationResult = {MetadataTableConfigurationResult: MetadataTableConfigurationResult, Status: string, Error?: ErrorDetails}; -type GetBucketMetadataTableConfigurationOutput = {GetBucketMetadataTableConfigurationResult?: GetBucketMetadataTableConfigurationResult}; -type GetBucketMetadataTableConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type MetricsAndOperator = {Prefix?: string, Tags?: Array, AccessPointArn?: string}; -type MetricsFilter = string | Tag | string | MetricsAndOperator; -type MetricsConfiguration = {Id: string, Filter?: MetricsFilter}; -type GetBucketMetricsConfigurationOutput = {MetricsConfiguration?: MetricsConfiguration}; -type GetBucketMetricsConfigurationRequest = {Bucket: string, Id: string, ExpectedBucketOwner?: string}; -type EventBridgeConfiguration = {}; -type Event = "s3:ReducedRedundancyLostObject" | "s3:ObjectCreated:*" | "s3:ObjectCreated:Put" | "s3:ObjectCreated:Post" | "s3:ObjectCreated:Copy" | "s3:ObjectCreated:CompleteMultipartUpload" | "s3:ObjectRemoved:*" | "s3:ObjectRemoved:Delete" | "s3:ObjectRemoved:DeleteMarkerCreated" | "s3:ObjectRestore:*" | "s3:ObjectRestore:Post" | "s3:ObjectRestore:Completed" | "s3:Replication:*" | "s3:Replication:OperationFailedReplication" | "s3:Replication:OperationNotTracked" | "s3:Replication:OperationMissedThreshold" | "s3:Replication:OperationReplicatedAfterThreshold" | "s3:ObjectRestore:Delete" | "s3:LifecycleTransition" | "s3:IntelligentTiering" | "s3:ObjectAcl:Put" | "s3:LifecycleExpiration:*" | "s3:LifecycleExpiration:Delete" | "s3:LifecycleExpiration:DeleteMarkerCreated" | "s3:ObjectTagging:*" | "s3:ObjectTagging:Put" | "s3:ObjectTagging:Delete"; -type FilterRuleName = "prefix" | "suffix"; -type FilterRule = {Name?: FilterRuleName, Value?: string}; -type S3KeyFilter = {FilterRules?: Array}; -type NotificationConfigurationFilter = {Key?: S3KeyFilter}; -type TopicConfiguration = {Id?: string, TopicArn: string, Events: Array, Filter?: NotificationConfigurationFilter}; -type QueueConfiguration = {Id?: string, QueueArn: string, Events: Array, Filter?: NotificationConfigurationFilter}; -type LambdaFunctionConfiguration = {Id?: string, LambdaFunctionArn: string, Events: Array, Filter?: NotificationConfigurationFilter}; -type NotificationConfiguration = {TopicConfigurations?: Array, QueueConfigurations?: Array, LambdaFunctionConfigurations?: Array, EventBridgeConfiguration?: EventBridgeConfiguration}; -type GetBucketNotificationConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type OwnershipControlsRule = {ObjectOwnership: ObjectOwnership}; -type OwnershipControls = {Rules: Array}; -type GetBucketOwnershipControlsOutput = {OwnershipControls?: OwnershipControls}; -type GetBucketOwnershipControlsRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type GetBucketPolicyOutput = {Policy?: string}; -type GetBucketPolicyRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type PolicyStatus = {IsPublic?: boolean}; -type GetBucketPolicyStatusOutput = {PolicyStatus?: PolicyStatus}; -type GetBucketPolicyStatusRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type ReplicationRuleStatus = "Enabled" | "Disabled"; -type ExistingObjectReplicationStatus = "Enabled" | "Disabled"; -type DeleteMarkerReplicationStatus = "Enabled" | "Disabled"; -type ExistingObjectReplication = {Status: ExistingObjectReplicationStatus}; -type DeleteMarkerReplication = {Status?: DeleteMarkerReplicationStatus}; -type SseKmsEncryptedObjectsStatus = "Enabled" | "Disabled"; -type ReplicaModificationsStatus = "Enabled" | "Disabled"; -type OwnerOverride = "Destination"; -type ReplicationTimeStatus = "Enabled" | "Disabled"; -type MetricsStatus = "Enabled" | "Disabled"; -type SseKmsEncryptedObjects = {Status: SseKmsEncryptedObjectsStatus}; -type ReplicaModifications = {Status: ReplicaModificationsStatus}; -type AccessControlTranslation = {Owner: OwnerOverride}; -type EncryptionConfiguration = {ReplicaKmsKeyID?: string}; -type SourceSelectionCriteria = {SseKmsEncryptedObjects?: SseKmsEncryptedObjects, ReplicaModifications?: ReplicaModifications}; -type ReplicationTimeValue = {Minutes?: number}; -type ReplicationRuleAndOperator = {Prefix?: string, Tags?: Array}; -type ReplicationTime = {Status: ReplicationTimeStatus, Time: ReplicationTimeValue}; -type Metrics = {Status: MetricsStatus, EventThreshold?: ReplicationTimeValue}; -type ReplicationRuleFilter = {Prefix?: string, Tag?: Tag, And?: ReplicationRuleAndOperator}; -type Destination = {Bucket: string, Account?: string, StorageClass?: StorageClass, AccessControlTranslation?: AccessControlTranslation, EncryptionConfiguration?: EncryptionConfiguration, ReplicationTime?: ReplicationTime, Metrics?: Metrics}; -type ReplicationRule = {ID?: string, Priority?: number, Prefix?: string, Filter?: ReplicationRuleFilter, Status: ReplicationRuleStatus, SourceSelectionCriteria?: SourceSelectionCriteria, ExistingObjectReplication?: ExistingObjectReplication, Destination: Destination, DeleteMarkerReplication?: DeleteMarkerReplication}; -type ReplicationConfiguration = {Role: string, Rules: Array}; -type GetBucketReplicationOutput = {ReplicationConfiguration?: ReplicationConfiguration}; -type GetBucketReplicationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type Payer = "Requester" | "BucketOwner"; -type GetBucketRequestPaymentOutput = {Payer?: Payer}; -type GetBucketRequestPaymentRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type GetBucketTaggingOutput = {TagSet: Array}; -type GetBucketTaggingRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type BucketVersioningStatus = "Enabled" | "Suspended"; -type MFADeleteStatus = "Enabled" | "Disabled"; -type GetBucketVersioningOutput = {Status?: BucketVersioningStatus, MFADelete?: MFADeleteStatus}; -type GetBucketVersioningRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type Protocol = "http" | "https"; -type RedirectAllRequestsTo = {HostName: string, Protocol?: Protocol}; -type IndexDocument = {Suffix: string}; -type ErrorDocument = {Key: string}; -type Condition = {HttpErrorCodeReturnedEquals?: string, KeyPrefixEquals?: string}; -type Redirect = {HostName?: string, HttpRedirectCode?: string, Protocol?: Protocol, ReplaceKeyPrefixWith?: string, ReplaceKeyWith?: string}; -type RoutingRule = {Condition?: Condition, Redirect: Redirect}; -type GetBucketWebsiteOutput = {RedirectAllRequestsTo?: RedirectAllRequestsTo, IndexDocument?: IndexDocument, ErrorDocument?: ErrorDocument, RoutingRules?: Array}; -type GetBucketWebsiteRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type InvalidObjectState = {StorageClass?: StorageClass, AccessTier?: IntelligentTieringAccessTier}; -type NoSuchKey = {}; -type ReplicationStatus = "COMPLETE" | "PENDING" | "FAILED" | "REPLICA" | "COMPLETED"; -type GetObjectOutput = {Body?: Uint8Array, DeleteMarker?: boolean, AcceptRanges?: string, Expiration?: string, Restore?: string, LastModified?: Date | string, ContentLength?: number, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, MissingMeta?: number, VersionId?: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentRange?: string, ContentType?: string, Expires?: string, WebsiteRedirectLocation?: string, ServerSideEncryption?: ServerSideEncryption, Metadata?: Metadata, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, StorageClass?: StorageClass, RequestCharged?: RequestCharged, ReplicationStatus?: ReplicationStatus, PartsCount?: number, TagCount?: number, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus}; -type ChecksumMode = "ENABLED"; -type GetObjectRequest = {Bucket: string, IfMatch?: string, IfModifiedSince?: Date | string, IfNoneMatch?: string, IfUnmodifiedSince?: Date | string, Key: string, Range?: string, ResponseCacheControl?: string, ResponseContentDisposition?: string, ResponseContentEncoding?: string, ResponseContentLanguage?: string, ResponseContentType?: string, ResponseExpires?: Date | string, VersionId?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, PartNumber?: number, ExpectedBucketOwner?: string, ChecksumMode?: ChecksumMode}; -type GetObjectAclOutput = {Owner?: Owner, Grants?: Array, RequestCharged?: RequestCharged}; -type GetObjectAclRequest = {Bucket: string, Key: string, VersionId?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; -type Checksum = {ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType}; -type ObjectPart = {PartNumber?: number, Size?: number, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; -type GetObjectAttributesParts = {TotalPartsCount?: number, PartNumberMarker?: string, NextPartNumberMarker?: string, MaxParts?: number, IsTruncated?: boolean, Parts?: Array}; -type GetObjectAttributesOutput = {DeleteMarker?: boolean, LastModified?: Date | string, VersionId?: string, RequestCharged?: RequestCharged, ETag?: string, Checksum?: Checksum, ObjectParts?: GetObjectAttributesParts, StorageClass?: StorageClass, ObjectSize?: number}; -type ObjectAttributes = "ETag" | "Checksum" | "ObjectParts" | "StorageClass" | "ObjectSize"; -type GetObjectAttributesRequest = {Bucket: string, Key: string, VersionId?: string, MaxParts?: number, PartNumberMarker?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, ObjectAttributes: Array}; -type ObjectLockLegalHold = {Status?: ObjectLockLegalHoldStatus}; -type GetObjectLegalHoldOutput = {LegalHold?: ObjectLockLegalHold}; -type GetObjectLegalHoldRequest = {Bucket: string, Key: string, VersionId?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; -type ObjectLockEnabled = "Enabled"; -type ObjectLockRetentionMode = "GOVERNANCE" | "COMPLIANCE"; -type DefaultRetention = {Mode?: ObjectLockRetentionMode, Days?: number, Years?: number}; -type ObjectLockRule = {DefaultRetention?: DefaultRetention}; -type ObjectLockConfiguration = {ObjectLockEnabled?: ObjectLockEnabled, Rule?: ObjectLockRule}; -type GetObjectLockConfigurationOutput = {ObjectLockConfiguration?: ObjectLockConfiguration}; -type GetObjectLockConfigurationRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type ObjectLockRetention = {Mode?: ObjectLockRetentionMode, RetainUntilDate?: Date | string}; -type GetObjectRetentionOutput = {Retention?: ObjectLockRetention}; -type GetObjectRetentionRequest = {Bucket: string, Key: string, VersionId?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; -type GetObjectTaggingOutput = {VersionId?: string, TagSet: Array}; -type GetObjectTaggingRequest = {Bucket: string, Key: string, VersionId?: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; -type GetObjectTorrentOutput = {Body?: Uint8Array, RequestCharged?: RequestCharged}; -type GetObjectTorrentRequest = {Bucket: string, Key: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; -type PublicAccessBlockConfiguration = {BlockPublicAcls?: boolean, IgnorePublicAcls?: boolean, BlockPublicPolicy?: boolean, RestrictPublicBuckets?: boolean}; -type GetPublicAccessBlockOutput = {PublicAccessBlockConfiguration?: PublicAccessBlockConfiguration}; -type GetPublicAccessBlockRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type NotFound = {}; -type HeadBucketOutput = {BucketArn?: string, BucketLocationType?: LocationType, BucketLocationName?: string, BucketRegion?: string, AccessPointAlias?: boolean}; -type HeadBucketRequest = {Bucket: string, ExpectedBucketOwner?: string}; -type ArchiveStatus = "ARCHIVE_ACCESS" | "DEEP_ARCHIVE_ACCESS"; -type HeadObjectOutput = {DeleteMarker?: boolean, AcceptRanges?: string, Expiration?: string, Restore?: string, ArchiveStatus?: ArchiveStatus, LastModified?: Date | string, ContentLength?: number, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, ETag?: string, MissingMeta?: number, VersionId?: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentType?: string, ContentRange?: string, Expires?: string, WebsiteRedirectLocation?: string, ServerSideEncryption?: ServerSideEncryption, Metadata?: Metadata, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, StorageClass?: StorageClass, RequestCharged?: RequestCharged, ReplicationStatus?: ReplicationStatus, PartsCount?: number, TagCount?: number, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus}; -type HeadObjectRequest = {Bucket: string, IfMatch?: string, IfModifiedSince?: Date | string, IfNoneMatch?: string, IfUnmodifiedSince?: Date | string, Key: string, Range?: string, ResponseCacheControl?: string, ResponseContentDisposition?: string, ResponseContentEncoding?: string, ResponseContentLanguage?: string, ResponseContentType?: string, ResponseExpires?: Date | string, VersionId?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, PartNumber?: number, ExpectedBucketOwner?: string, ChecksumMode?: ChecksumMode}; -type ListBucketAnalyticsConfigurationsOutput = {IsTruncated?: boolean, ContinuationToken?: string, NextContinuationToken?: string, AnalyticsConfigurationList?: Array}; -type ListBucketAnalyticsConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; -type ListBucketIntelligentTieringConfigurationsOutput = {IsTruncated?: boolean, ContinuationToken?: string, NextContinuationToken?: string, IntelligentTieringConfigurationList?: Array}; -type ListBucketIntelligentTieringConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; -type ListBucketInventoryConfigurationsOutput = {ContinuationToken?: string, InventoryConfigurationList?: Array, IsTruncated?: boolean, NextContinuationToken?: string}; -type ListBucketInventoryConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; -type ListBucketMetricsConfigurationsOutput = {IsTruncated?: boolean, ContinuationToken?: string, NextContinuationToken?: string, MetricsConfigurationList?: Array}; -type ListBucketMetricsConfigurationsRequest = {Bucket: string, ContinuationToken?: string, ExpectedBucketOwner?: string}; -type Bucket = {Name?: string, CreationDate?: Date | string, BucketRegion?: string, BucketArn?: string}; -type ListBucketsOutput = {Buckets?: Array, Owner?: Owner, ContinuationToken?: string, Prefix?: string}; -type ListBucketsRequest = {MaxBuckets?: number, ContinuationToken?: string, Prefix?: string, BucketRegion?: string}; -type ListDirectoryBucketsOutput = {Buckets?: Array, ContinuationToken?: string}; -type ListDirectoryBucketsRequest = {ContinuationToken?: string, MaxDirectoryBuckets?: number}; -type EncodingType = "url"; -type CommonPrefix = {Prefix?: string}; -type Initiator = {ID?: string, DisplayName?: string}; -type MultipartUpload = {UploadId?: string, Key?: string, Initiated?: Date | string, StorageClass?: StorageClass, Owner?: Owner, Initiator?: Initiator, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; -type ListMultipartUploadsOutput = {Bucket?: string, KeyMarker?: string, UploadIdMarker?: string, NextKeyMarker?: string, Prefix?: string, Delimiter?: string, NextUploadIdMarker?: string, MaxUploads?: number, IsTruncated?: boolean, Uploads?: Array, CommonPrefixes?: Array, EncodingType?: EncodingType, RequestCharged?: RequestCharged}; -type ListMultipartUploadsRequest = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, KeyMarker?: string, MaxUploads?: number, Prefix?: string, UploadIdMarker?: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; -type ObjectStorageClass = "STANDARD" | "REDUCED_REDUNDANCY" | "GLACIER" | "STANDARD_IA" | "ONEZONE_IA" | "INTELLIGENT_TIERING" | "DEEP_ARCHIVE" | "OUTPOSTS" | "GLACIER_IR" | "SNOW" | "EXPRESS_ONEZONE" | "FSX_OPENZFS"; -type RestoreStatus = {IsRestoreInProgress?: boolean, RestoreExpiryDate?: Date | string}; -type Object = {Key?: string, LastModified?: Date | string, ETag?: string, ChecksumAlgorithm?: Array, ChecksumType?: ChecksumType, Size?: number, StorageClass?: ObjectStorageClass, Owner?: Owner, RestoreStatus?: RestoreStatus}; -type ListObjectsOutput = {IsTruncated?: boolean, Marker?: string, NextMarker?: string, Contents?: Array, Name?: string, Prefix?: string, Delimiter?: string, MaxKeys?: number, CommonPrefixes?: Array, EncodingType?: EncodingType, RequestCharged?: RequestCharged}; -type OptionalObjectAttributes = "RestoreStatus"; -type ListObjectsRequest = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, Marker?: string, MaxKeys?: number, Prefix?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, OptionalObjectAttributes?: Array}; -type ListObjectsV2Output = {IsTruncated?: boolean, Contents?: Array, Name?: string, Prefix?: string, Delimiter?: string, MaxKeys?: number, CommonPrefixes?: Array, EncodingType?: EncodingType, KeyCount?: number, ContinuationToken?: string, NextContinuationToken?: string, StartAfter?: string, RequestCharged?: RequestCharged}; -type ListObjectsV2Request = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, MaxKeys?: number, Prefix?: string, ContinuationToken?: string, FetchOwner?: boolean, StartAfter?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, OptionalObjectAttributes?: Array}; -type ObjectVersionStorageClass = "STANDARD"; -type ObjectVersion = {ETag?: string, ChecksumAlgorithm?: Array, ChecksumType?: ChecksumType, Size?: number, StorageClass?: ObjectVersionStorageClass, Key?: string, VersionId?: string, IsLatest?: boolean, LastModified?: Date | string, Owner?: Owner, RestoreStatus?: RestoreStatus}; -type DeleteMarkerEntry = {Owner?: Owner, Key?: string, VersionId?: string, IsLatest?: boolean, LastModified?: Date | string}; -type ListObjectVersionsOutput = {IsTruncated?: boolean, KeyMarker?: string, VersionIdMarker?: string, NextKeyMarker?: string, NextVersionIdMarker?: string, Versions?: Array, DeleteMarkers?: Array, Name?: string, Prefix?: string, Delimiter?: string, MaxKeys?: number, CommonPrefixes?: Array, EncodingType?: EncodingType, RequestCharged?: RequestCharged}; -type ListObjectVersionsRequest = {Bucket: string, Delimiter?: string, EncodingType?: EncodingType, KeyMarker?: string, MaxKeys?: number, Prefix?: string, VersionIdMarker?: string, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer, OptionalObjectAttributes?: Array}; -type Part = {PartNumber?: number, LastModified?: Date | string, ETag?: string, Size?: number, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; -type ListPartsOutput = {AbortDate?: Date | string, AbortRuleId?: string, Bucket?: string, Key?: string, UploadId?: string, PartNumberMarker?: string, NextPartNumberMarker?: string, MaxParts?: number, IsTruncated?: boolean, Parts?: Array, Initiator?: Initiator, Owner?: Owner, StorageClass?: StorageClass, RequestCharged?: RequestCharged, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumType?: ChecksumType}; -type ListPartsRequest = {Bucket: string, Key: string, MaxParts?: number, PartNumberMarker?: string, UploadId: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string}; -type PutBucketLifecycleConfigurationOutput = {TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize}; -type BucketLifecycleConfiguration = {Rules: Array}; -type PutBucketLifecycleConfigurationRequest = {Bucket: string, ChecksumAlgorithm?: ChecksumAlgorithm, LifecycleConfiguration?: BucketLifecycleConfiguration, ExpectedBucketOwner?: string, TransitionDefaultMinimumObjectSize?: TransitionDefaultMinimumObjectSize}; -type EncryptionTypeMismatch = {}; -type InvalidRequest = {}; -type InvalidWriteOffset = {}; -type TooManyParts = {}; -type PutObjectOutput = {Expiration?: string, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, ChecksumType?: ChecksumType, ServerSideEncryption?: ServerSideEncryption, VersionId?: string, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, Size?: number, RequestCharged?: RequestCharged}; -type PutObjectRequest = {ACL?: ObjectCannedACL, Body?: Uint8Array, Bucket: string, CacheControl?: string, ContentDisposition?: string, ContentEncoding?: string, ContentLanguage?: string, ContentLength?: number, ContentMD5?: string, ContentType?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, Expires?: string, IfMatch?: string, IfNoneMatch?: string, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWriteACP?: string, Key: string, WriteOffsetBytes?: number, Metadata?: Metadata, ServerSideEncryption?: ServerSideEncryption, StorageClass?: StorageClass, WebsiteRedirectLocation?: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, SSEKMSEncryptionContext?: string, BucketKeyEnabled?: boolean, RequestPayer?: RequestPayer, Tagging?: string, ObjectLockMode?: ObjectLockMode, ObjectLockRetainUntilDate?: Date | string, ObjectLockLegalHoldStatus?: ObjectLockLegalHoldStatus, ExpectedBucketOwner?: string}; -type PutObjectAclOutput = {RequestCharged?: RequestCharged}; -type AccessControlPolicy = {Grants?: Array, Owner?: Owner}; -type PutObjectAclRequest = {ACL?: ObjectCannedACL, AccessControlPolicy?: AccessControlPolicy, Bucket: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, GrantFullControl?: string, GrantRead?: string, GrantReadACP?: string, GrantWrite?: string, GrantWriteACP?: string, Key: string, RequestPayer?: RequestPayer, VersionId?: string, ExpectedBucketOwner?: string}; -type PutObjectLegalHoldOutput = {RequestCharged?: RequestCharged}; -type PutObjectLegalHoldRequest = {Bucket: string, Key: string, LegalHold?: ObjectLockLegalHold, RequestPayer?: RequestPayer, VersionId?: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; -type PutObjectLockConfigurationOutput = {RequestCharged?: RequestCharged}; -type PutObjectLockConfigurationRequest = {Bucket: string, ObjectLockConfiguration?: ObjectLockConfiguration, RequestPayer?: RequestPayer, Token?: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; -type PutObjectRetentionOutput = {RequestCharged?: RequestCharged}; -type PutObjectRetentionRequest = {Bucket: string, Key: string, Retention?: ObjectLockRetention, RequestPayer?: RequestPayer, VersionId?: string, BypassGovernanceRetention?: boolean, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; -type PutObjectTaggingOutput = {VersionId?: string}; -type Tagging = {TagSet: Array}; -type PutObjectTaggingRequest = {Bucket: string, Key: string, VersionId?: string, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, Tagging: Tagging, ExpectedBucketOwner?: string, RequestPayer?: RequestPayer}; -type IdempotencyParameterMismatch = {}; -type RenameObjectOutput = {}; -type RenameObjectRequest = {Bucket: string, Key: string, RenameSource: string, DestinationIfMatch?: string, DestinationIfNoneMatch?: string, DestinationIfModifiedSince?: Date | string, DestinationIfUnmodifiedSince?: Date | string, SourceIfMatch?: string, SourceIfNoneMatch?: string, SourceIfModifiedSince?: Date | string, SourceIfUnmodifiedSince?: Date | string, ClientToken?: string}; -type ObjectAlreadyInActiveTierError = {}; -type RestoreObjectOutput = {RequestCharged?: RequestCharged, RestoreOutputPath?: string}; -type RestoreRequestType = "SELECT"; -type Tier = "Standard" | "Bulk" | "Expedited"; -type ExpressionType = "SQL"; -type GlacierJobParameters = {Tier: Tier}; -type CompressionType = "NONE" | "GZIP" | "BZIP2"; -type ParquetInput = {}; -type FileHeaderInfo = "USE" | "IGNORE" | "NONE"; -type JSONType = "DOCUMENT" | "LINES"; -type QuoteFields = "ALWAYS" | "ASNEEDED"; -type CSVInput = {FileHeaderInfo?: FileHeaderInfo, Comments?: string, QuoteEscapeCharacter?: string, RecordDelimiter?: string, FieldDelimiter?: string, QuoteCharacter?: string, AllowQuotedRecordDelimiter?: boolean}; -type JSONInput = {Type?: JSONType}; -type CSVOutput = {QuoteFields?: QuoteFields, QuoteEscapeCharacter?: string, RecordDelimiter?: string, FieldDelimiter?: string, QuoteCharacter?: string}; -type JSONOutput = {RecordDelimiter?: string}; -type Encryption = {EncryptionType: ServerSideEncryption, KMSKeyId?: string, KMSContext?: string}; -type MetadataEntry = {Name?: string, Value?: string}; -type InputSerialization = {CSV?: CSVInput, CompressionType?: CompressionType, JSON?: JSONInput, Parquet?: ParquetInput}; -type OutputSerialization = {CSV?: CSVOutput, JSON?: JSONOutput}; -type SelectParameters = {InputSerialization: InputSerialization, ExpressionType: ExpressionType, Expression: string, OutputSerialization: OutputSerialization}; -type S3Location = {BucketName: string, Prefix: string, Encryption?: Encryption, CannedACL?: ObjectCannedACL, AccessControlList?: Array, Tagging?: Tagging, UserMetadata?: Array, StorageClass?: StorageClass}; -type OutputLocation = {S3?: S3Location}; -type RestoreRequest = {Days?: number, GlacierJobParameters?: GlacierJobParameters, Type?: RestoreRequestType, Tier?: Tier, Description?: string, SelectParameters?: SelectParameters, OutputLocation?: OutputLocation}; -type RestoreObjectRequest = {Bucket: string, Key: string, VersionId?: string, RestoreRequest?: RestoreRequest, RequestPayer?: RequestPayer, ChecksumAlgorithm?: ChecksumAlgorithm, ExpectedBucketOwner?: string}; -type ContinuationEvent = {}; -type EndEvent = {}; -type RecordsEvent = {Payload?: Uint8Array}; -type Stats = {BytesScanned?: number, BytesProcessed?: number, BytesReturned?: number}; -type Progress = {BytesScanned?: number, BytesProcessed?: number, BytesReturned?: number}; -type StatsEvent = {Details?: Stats}; -type ProgressEvent = {Details?: Progress}; -type SelectObjectContentEventStream = RecordsEvent | StatsEvent | ProgressEvent | ContinuationEvent | EndEvent; -type SelectObjectContentOutput = {Payload?: SelectObjectContentEventStream}; -type RequestProgress = {Enabled?: boolean}; -type ScanRange = {Start?: number, End?: number}; -type SelectObjectContentRequest = {Bucket: string, Key: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, Expression: string, ExpressionType: ExpressionType, RequestProgress?: RequestProgress, InputSerialization: InputSerialization, OutputSerialization: OutputSerialization, ScanRange?: ScanRange, ExpectedBucketOwner?: string}; -type UploadPartOutput = {ServerSideEncryption?: ServerSideEncryption, ETag?: string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; -type UploadPartRequest = {Body?: Uint8Array, Bucket: string, ContentLength?: number, ContentMD5?: string, ChecksumAlgorithm?: ChecksumAlgorithm, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string, Key: string, PartNumber: number, UploadId: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string}; -type CopyPartResult = {ETag?: string, LastModified?: Date | string, ChecksumCRC32?: string, ChecksumCRC32C?: string, ChecksumCRC64NVME?: string, ChecksumSHA1?: string, ChecksumSHA256?: string}; -type UploadPartCopyOutput = {CopySourceVersionId?: string, CopyPartResult?: CopyPartResult, ServerSideEncryption?: ServerSideEncryption, SSECustomerAlgorithm?: string, SSECustomerKeyMD5?: string, SSEKMSKeyId?: string, BucketKeyEnabled?: boolean, RequestCharged?: RequestCharged}; -type UploadPartCopyRequest = {Bucket: string, CopySource: string, CopySourceIfMatch?: string, CopySourceIfModifiedSince?: Date | string, CopySourceIfNoneMatch?: string, CopySourceIfUnmodifiedSince?: Date | string, CopySourceRange?: string, Key: string, PartNumber: number, UploadId: string, SSECustomerAlgorithm?: string, SSECustomerKey?: string, SSECustomerKeyMD5?: string, CopySourceSSECustomerAlgorithm?: string, CopySourceSSECustomerKey?: string, CopySourceSSECustomerKeyMD5?: string, RequestPayer?: RequestPayer, ExpectedBucketOwner?: string, ExpectedSourceBucketOwner?: string}; - -//==== Error Types ==== -export declare class NoSuchUploadError extends Data.TaggedError("NoSuchUploadError") {} -export declare class ObjectNotInActiveTierErrorError extends Data.TaggedError("ObjectNotInActiveTierErrorError") {} -export declare class BucketAlreadyExistsError extends Data.TaggedError("BucketAlreadyExistsError") {} -export declare class BucketAlreadyOwnedByYouError extends Data.TaggedError("BucketAlreadyOwnedByYouError") {} -export declare class NoSuchBucketError extends Data.TaggedError("NoSuchBucketError") {} -export declare class InvalidObjectStateError extends Data.TaggedError("InvalidObjectStateError") {} -export declare class NoSuchKeyError extends Data.TaggedError("NoSuchKeyError") {} -export declare class NotFoundError extends Data.TaggedError("NotFoundError") {} -export declare class EncryptionTypeMismatchError extends Data.TaggedError("EncryptionTypeMismatchError") {} -export declare class InvalidRequestError extends Data.TaggedError("InvalidRequestError") {} -export declare class InvalidWriteOffsetError extends Data.TaggedError("InvalidWriteOffsetError") {} -export declare class TooManyPartsError extends Data.TaggedError("TooManyPartsError") {} -export declare class IdempotencyParameterMismatchError extends Data.TaggedError("IdempotencyParameterMismatchError") {} -export declare class ObjectAlreadyInActiveTierErrorError extends Data.TaggedError("ObjectAlreadyInActiveTierErrorError") {} +export const AbortMultipartUpload = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "AbortMultipartUpload", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + UploadId: Schema.String, + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + IfMatchInitiatedTime: Schema.optional( + Header("x-amz-if-match-initiated-time", Schema.Date), + ), + }), + Schema.Struct({ + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const CompleteMultipartUpload = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CompleteMultipartUpload", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + MultipartUpload: Schema.optional( + Body( + "CompleteMultipartUpload", + Schema.Struct({ + Parts: Schema.optional( + Schema.Array( + Schema.Struct({ + ETag: Schema.optional(Schema.String), + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + PartNumber: Schema.optional(Schema.Number), + }), + ), + ), + }), + ), + ), + UploadId: Schema.String, + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + ChecksumType: Schema.optional(Header("x-amz-checksum-type")), + MpuObjectSize: Schema.optional( + Header("x-amz-mp-object-size", Schema.Number), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + IfMatch: Schema.optional(Header("If-Match")), + IfNoneMatch: Schema.optional(Header("If-None-Match")), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + }), + Schema.Struct({ + Location: Schema.optional(Schema.String), + Bucket: Schema.optional(Schema.String), + Key: Schema.optional(Schema.String), + Expiration: Schema.optional(Header("x-amz-expiration")), + ETag: Schema.optional(Schema.String), + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + ChecksumType: Schema.optional(Schema.String), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + VersionId: Schema.optional(Header("x-amz-version-id")), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const CopyObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=CopyObject", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CopyObject", + }, + Schema.Struct({ + ACL: Schema.optional(Header("x-amz-acl")), + Bucket: Path("Bucket", Schema.String), + CacheControl: Schema.optional(Header("Cache-Control")), + ChecksumAlgorithm: Schema.optional(Header("x-amz-checksum-algorithm")), + ContentDisposition: Schema.optional(Header("Content-Disposition")), + ContentEncoding: Schema.optional(Header("Content-Encoding")), + ContentLanguage: Schema.optional(Header("Content-Language")), + ContentType: Schema.optional(Header("Content-Type")), + CopySource: Header("x-amz-copy-source"), + CopySourceIfMatch: Schema.optional( + Header("x-amz-copy-source-if-match"), + ), + CopySourceIfModifiedSince: Schema.optional( + Header("x-amz-copy-source-if-modified-since", Schema.Date), + ), + CopySourceIfNoneMatch: Schema.optional( + Header("x-amz-copy-source-if-none-match"), + ), + CopySourceIfUnmodifiedSince: Schema.optional( + Header("x-amz-copy-source-if-unmodified-since", Schema.Date), + ), + Expires: Schema.optional(Header("Expires")), + GrantFullControl: Schema.optional(Header("x-amz-grant-full-control")), + GrantRead: Schema.optional(Header("x-amz-grant-read")), + GrantReadACP: Schema.optional(Header("x-amz-grant-read-acp")), + GrantWriteACP: Schema.optional(Header("x-amz-grant-write-acp")), + IfMatch: Schema.optional(Header("If-Match")), + IfNoneMatch: Schema.optional(Header("If-None-Match")), + Key: Path("Key", Schema.String), + Metadata: Schema.optional( + Schema.Record({ key: Schema.String, value: Schema.String }), + ), + MetadataDirective: Schema.optional(Header("x-amz-metadata-directive")), + TaggingDirective: Schema.optional(Header("x-amz-tagging-directive")), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + StorageClass: Schema.optional(Header("x-amz-storage-class")), + WebsiteRedirectLocation: Schema.optional( + Header("x-amz-website-redirect-location"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + CopySourceSSECustomerAlgorithm: Schema.optional( + Header("x-amz-copy-source-server-side-encryption-customer-algorithm"), + ), + CopySourceSSECustomerKey: Schema.optional( + Header("x-amz-copy-source-server-side-encryption-customer-key"), + ), + CopySourceSSECustomerKeyMD5: Schema.optional( + Header("x-amz-copy-source-server-side-encryption-customer-key-MD5"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + Tagging: Schema.optional(Header("x-amz-tagging")), + ObjectLockMode: Schema.optional(Header("x-amz-object-lock-mode")), + ObjectLockRetainUntilDate: Schema.optional( + Header("x-amz-object-lock-retain-until-date", Schema.Date), + ), + ObjectLockLegalHoldStatus: Schema.optional( + Header("x-amz-object-lock-legal-hold"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ExpectedSourceBucketOwner: Schema.optional( + Header("x-amz-source-expected-bucket-owner"), + ), + }), + Schema.Struct({ + CopyObjectResult: Schema.optional( + Body( + "undefined", + Schema.Struct({ + ETag: Schema.optional(Schema.String), + LastModified: Schema.optional(Schema.Date), + ChecksumType: Schema.optional(Schema.String), + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + }), + ), + ), + Expiration: Schema.optional(Header("x-amz-expiration")), + CopySourceVersionId: Schema.optional( + Header("x-amz-copy-source-version-id"), + ), + VersionId: Schema.optional(Header("x-amz-version-id")), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const CreateBucket = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CreateBucket", + }, + Schema.Struct({ + ACL: Schema.optional(Header("x-amz-acl")), + Bucket: Path("Bucket", Schema.String), + CreateBucketConfiguration: Schema.optional( + Body( + "CreateBucketConfiguration", + Schema.Struct({ + LocationConstraint: Schema.optional(Schema.String), + Location: Schema.optional( + Schema.Struct({ + Type: Schema.optional(Schema.String), + Name: Schema.optional(Schema.String), + }), + ), + Bucket: Schema.optional( + Schema.Struct({ + DataRedundancy: Schema.optional(Schema.String), + Type: Schema.optional(Schema.String), + }), + ), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + ), + }), + ), + ), + GrantFullControl: Schema.optional(Header("x-amz-grant-full-control")), + GrantRead: Schema.optional(Header("x-amz-grant-read")), + GrantReadACP: Schema.optional(Header("x-amz-grant-read-acp")), + GrantWrite: Schema.optional(Header("x-amz-grant-write")), + GrantWriteACP: Schema.optional(Header("x-amz-grant-write-acp")), + ObjectLockEnabledForBucket: Schema.optional( + Header("x-amz-bucket-object-lock-enabled", Schema.Boolean), + ), + ObjectOwnership: Schema.optional(Header("x-amz-object-ownership")), + }), + Schema.Struct({ + Location: Schema.optional(Header("Location")), + BucketArn: Schema.optional(Header("x-amz-bucket-arn")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const CreateBucketMetadataConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataConfiguration", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CreateBucketMetadataConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + MetadataConfiguration: Body( + "MetadataConfiguration", + Schema.Struct({ + JournalTableConfiguration: Schema.Struct({ + RecordExpiration: Schema.Struct({ + Expiration: Schema.String, + Days: Schema.optional(Schema.Number), + }), + EncryptionConfiguration: Schema.optional( + Schema.Struct({ + SseAlgorithm: Schema.String, + KmsKeyArn: Schema.optional(Schema.String), + }), + ), + }), + InventoryTableConfiguration: Schema.optional( + Schema.Struct({ + ConfigurationState: Schema.String, + EncryptionConfiguration: Schema.optional( + Schema.Struct({ + SseAlgorithm: Schema.String, + KmsKeyArn: Schema.optional(Schema.String), + }), + ), + }), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const CreateBucketMetadataTableConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataTable", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CreateBucketMetadataTableConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + MetadataTableConfiguration: Body( + "MetadataTableConfiguration", + Schema.Struct({ + S3TablesDestination: Schema.Struct({ + TableBucketArn: Schema.String, + TableName: Schema.String, + }), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const CreateMultipartUpload = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?uploads", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CreateMultipartUpload", + }, + Schema.Struct({ + ACL: Schema.optional(Header("x-amz-acl")), + Bucket: Path("Bucket", Schema.String), + CacheControl: Schema.optional(Header("Cache-Control")), + ContentDisposition: Schema.optional(Header("Content-Disposition")), + ContentEncoding: Schema.optional(Header("Content-Encoding")), + ContentLanguage: Schema.optional(Header("Content-Language")), + ContentType: Schema.optional(Header("Content-Type")), + Expires: Schema.optional(Header("Expires")), + GrantFullControl: Schema.optional(Header("x-amz-grant-full-control")), + GrantRead: Schema.optional(Header("x-amz-grant-read")), + GrantReadACP: Schema.optional(Header("x-amz-grant-read-acp")), + GrantWriteACP: Schema.optional(Header("x-amz-grant-write-acp")), + Key: Path("Key", Schema.String), + Metadata: Schema.optional( + Schema.Record({ key: Schema.String, value: Schema.String }), + ), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + StorageClass: Schema.optional(Header("x-amz-storage-class")), + WebsiteRedirectLocation: Schema.optional( + Header("x-amz-website-redirect-location"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + Tagging: Schema.optional(Header("x-amz-tagging")), + ObjectLockMode: Schema.optional(Header("x-amz-object-lock-mode")), + ObjectLockRetainUntilDate: Schema.optional( + Header("x-amz-object-lock-retain-until-date", Schema.Date), + ), + ObjectLockLegalHoldStatus: Schema.optional( + Header("x-amz-object-lock-legal-hold"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ChecksumAlgorithm: Schema.optional(Header("x-amz-checksum-algorithm")), + ChecksumType: Schema.optional(Header("x-amz-checksum-type")), + }), + Schema.Struct({ + AbortDate: Schema.optional(Header("x-amz-abort-date", Schema.Date)), + AbortRuleId: Schema.optional(Header("x-amz-abort-rule-id")), + Bucket: Schema.optional(Schema.String), + Key: Schema.optional(Schema.String), + UploadId: Schema.optional(Schema.String), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + ChecksumAlgorithm: Schema.optional(Header("x-amz-checksum-algorithm")), + ChecksumType: Schema.optional(Header("x-amz-checksum-type")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const CreateSession = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?session", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "CreateSession", + }, + Schema.Struct({ + SessionMode: Schema.optional(Header("x-amz-create-session-mode")), + Bucket: Path("Bucket", Schema.String), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + }), + Schema.Struct({ + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + Credentials: Schema.Struct({ + AccessKeyId: Schema.String, + SecretAccessKey: Schema.String, + SessionToken: Schema.String, + Expiration: Schema.Date, + }), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucket = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucket", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketAnalyticsConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?analytics", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketAnalyticsConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketCors = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?cors", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketCors", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketEncryption = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?encryption", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketEncryption", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketIntelligentTieringConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?intelligent-tiering", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketIntelligentTieringConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const DeleteBucketInventoryConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?inventory", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketInventoryConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketLifecycle = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?lifecycle", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketLifecycle", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketMetadataConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataConfiguration", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketMetadataConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketMetadataTableConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataTable", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketMetadataTableConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const DeleteBucketMetricsConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metrics", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketMetricsConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketOwnershipControls = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?ownershipControls", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketOwnershipControls", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketPolicy = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?policy", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketPolicy", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketReplication = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?replication", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketReplication", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketTagging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?tagging", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketTagging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteBucketWebsite = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?website", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteBucketWebsite", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=DeleteObject", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteObject", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + MFA: Schema.optional(Header("x-amz-mfa")), + VersionId: Schema.optional(Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + BypassGovernanceRetention: Schema.optional( + Header("x-amz-bypass-governance-retention", Schema.Boolean), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + IfMatch: Schema.optional(Header("If-Match")), + IfMatchLastModifiedTime: Schema.optional( + Header("x-amz-if-match-last-modified-time", Schema.Date), + ), + IfMatchSize: Schema.optional( + Header("x-amz-if-match-size", Schema.Number), + ), + }), + Schema.Struct({ + DeleteMarker: Schema.optional( + Header("x-amz-delete-marker", Schema.Boolean), + ), + VersionId: Schema.optional(Header("x-amz-version-id")), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteObjects = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?delete", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteObjects", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Delete: Body( + "Delete", + Schema.Struct({ + Objects: Schema.Array( + Schema.Struct({ + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + ETag: Schema.optional(Schema.String), + LastModifiedTime: Schema.optional(Schema.Date), + Size: Schema.optional(Schema.Number), + }), + ), + Quiet: Schema.optional(Schema.Boolean), + }), + ), + MFA: Schema.optional(Header("x-amz-mfa")), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + BypassGovernanceRetention: Schema.optional( + Header("x-amz-bypass-governance-retention", Schema.Boolean), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + }), + Schema.Struct({ + Deleted: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.optional(Schema.String), + VersionId: Schema.optional(Schema.String), + DeleteMarker: Schema.optional(Schema.Boolean), + DeleteMarkerVersionId: Schema.optional(Schema.String), + }), + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + Errors: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.optional(Schema.String), + VersionId: Schema.optional(Schema.String), + Code: Schema.optional(Schema.String), + Message: Schema.optional(Schema.String), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeleteObjectTagging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?tagging", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeleteObjectTagging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ VersionId: Schema.optional(Header("x-amz-version-id")) }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const DeletePublicAccessBlock = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?publicAccessBlock", + method: "DELETE", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "DeletePublicAccessBlock", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketAccelerateConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?accelerate", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketAccelerateConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + }), + Schema.Struct({ + Status: Schema.optional(Schema.String), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketAcl = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?acl", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketAcl", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + Grants: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketAnalyticsConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketAnalyticsConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + AnalyticsConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Union( + Schema.String, + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + ), + StorageClassAnalysis: Schema.Struct({ + DataExport: Schema.optional( + Schema.Struct({ + OutputSchemaVersion: Schema.String, + Destination: Schema.Struct({ + S3BucketDestination: Schema.Struct({ + Format: Schema.String, + BucketAccountId: Schema.optional(Schema.String), + Bucket: Schema.String, + Prefix: Schema.optional(Schema.String), + }), + }), + }), + ), + }), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketCors = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?cors", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketCors", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + CORSRules: Schema.optional( + Schema.Array( + Schema.Struct({ + ID: Schema.optional(Schema.String), + AllowedHeaders: Schema.optional(Schema.Array(Schema.String)), + AllowedMethods: Schema.Array(Schema.String), + AllowedOrigins: Schema.Array(Schema.String), + ExposeHeaders: Schema.optional(Schema.Array(Schema.String)), + MaxAgeSeconds: Schema.optional(Schema.Number), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketEncryption = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?encryption", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketEncryption", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + ServerSideEncryptionConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Rules: Schema.Array( + Schema.Struct({ + ApplyServerSideEncryptionByDefault: Schema.optional( + Schema.Struct({ + SSEAlgorithm: Schema.String, + KMSMasterKeyID: Schema.optional(Schema.String), + }), + ), + BucketKeyEnabled: Schema.optional(Schema.Boolean), + }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketIntelligentTieringConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketIntelligentTieringConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + IntelligentTieringConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + }), + ), + Status: Schema.String, + Tierings: Schema.Array( + Schema.Struct({ + Days: Schema.Number, + AccessTier: Schema.String, + }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const GetBucketInventoryConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketInventoryConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + InventoryConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Destination: Schema.Struct({ + S3BucketDestination: Schema.Struct({ + AccountId: Schema.optional(Schema.String), + Bucket: Schema.String, + Format: Schema.String, + Prefix: Schema.optional(Schema.String), + Encryption: Schema.optional( + Schema.Struct({ + SSES3: Schema.optional(Schema.Struct({})), + SSEKMS: Schema.optional( + Schema.Struct({ KeyId: Schema.String }), + ), + }), + ), + }), + }), + IsEnabled: Schema.Boolean, + Filter: Schema.optional(Schema.Struct({ Prefix: Schema.String })), + Id: Schema.String, + IncludedObjectVersions: Schema.String, + OptionalFields: Schema.optional(Schema.Array(Schema.String)), + Schedule: Schema.Struct({ Frequency: Schema.String }), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketLifecycleConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?lifecycle", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketLifecycleConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Rules: Schema.optional( + Schema.Array( + Schema.Struct({ + Expiration: Schema.optional( + Schema.Struct({ + Date: Schema.optional(Schema.Date), + Days: Schema.optional(Schema.Number), + ExpiredObjectDeleteMarker: Schema.optional(Schema.Boolean), + }), + ), + ID: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + ObjectSizeGreaterThan: Schema.optional(Schema.Number), + ObjectSizeLessThan: Schema.optional(Schema.Number), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + ObjectSizeGreaterThan: Schema.optional(Schema.Number), + ObjectSizeLessThan: Schema.optional(Schema.Number), + }), + ), + }), + ), + Status: Schema.String, + Transitions: Schema.optional( + Schema.Array( + Schema.Struct({ + Date: Schema.optional(Schema.Date), + Days: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + }), + ), + ), + NoncurrentVersionTransitions: Schema.optional( + Schema.Array( + Schema.Struct({ + NoncurrentDays: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + NewerNoncurrentVersions: Schema.optional(Schema.Number), + }), + ), + ), + NoncurrentVersionExpiration: Schema.optional( + Schema.Struct({ + NoncurrentDays: Schema.optional(Schema.Number), + NewerNoncurrentVersions: Schema.optional(Schema.Number), + }), + ), + AbortIncompleteMultipartUpload: Schema.optional( + Schema.Struct({ + DaysAfterInitiation: Schema.optional(Schema.Number), + }), + ), + }), + ), + ), + TransitionDefaultMinimumObjectSize: Schema.optional( + Header("x-amz-transition-default-minimum-object-size"), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketLocation = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?location", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketLocation", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ LocationConstraint: Schema.optional(Schema.String) }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketLogging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?logging", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketLogging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + LoggingEnabled: Schema.optional( + Schema.Struct({ + TargetBucket: Schema.String, + TargetGrants: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + TargetPrefix: Schema.String, + TargetObjectKeyFormat: Schema.optional( + Schema.Struct({ + SimplePrefix: Schema.optional(Schema.Struct({})), + PartitionedPrefix: Schema.optional( + Schema.Struct({ + PartitionDateSource: Schema.optional(Schema.String), + }), + ), + }), + ), + }), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketMetadataConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataConfiguration", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketMetadataConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + GetBucketMetadataConfigurationResult: Schema.optional( + Body( + "undefined", + Schema.Struct({ + MetadataConfigurationResult: Schema.Struct({ + DestinationResult: Schema.Struct({ + TableBucketType: Schema.optional(Schema.String), + TableBucketArn: Schema.optional(Schema.String), + TableNamespace: Schema.optional(Schema.String), + }), + JournalTableConfigurationResult: Schema.optional( + Schema.Struct({ + TableStatus: Schema.String, + Error: Schema.optional( + Schema.Struct({ + ErrorCode: Schema.optional(Schema.String), + ErrorMessage: Schema.optional(Schema.String), + }), + ), + TableName: Schema.String, + TableArn: Schema.optional(Schema.String), + RecordExpiration: Schema.Struct({ + Expiration: Schema.String, + Days: Schema.optional(Schema.Number), + }), + }), + ), + InventoryTableConfigurationResult: Schema.optional( + Schema.Struct({ + ConfigurationState: Schema.String, + TableStatus: Schema.optional(Schema.String), + Error: Schema.optional( + Schema.Struct({ + ErrorCode: Schema.optional(Schema.String), + ErrorMessage: Schema.optional(Schema.String), + }), + ), + TableName: Schema.optional(Schema.String), + TableArn: Schema.optional(Schema.String), + }), + ), + }), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketMetadataTableConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataTable", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketMetadataTableConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + GetBucketMetadataTableConfigurationResult: Schema.optional( + Body( + "undefined", + Schema.Struct({ + MetadataTableConfigurationResult: Schema.Struct({ + S3TablesDestinationResult: Schema.Struct({ + TableBucketArn: Schema.String, + TableName: Schema.String, + TableArn: Schema.String, + TableNamespace: Schema.String, + }), + }), + Status: Schema.String, + Error: Schema.optional( + Schema.Struct({ + ErrorCode: Schema.optional(Schema.String), + ErrorMessage: Schema.optional(Schema.String), + }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketMetricsConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketMetricsConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + MetricsConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Union( + Schema.String, + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + Schema.String, + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + AccessPointArn: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketNotificationConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?notification", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketNotificationConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + TopicConfigurations: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.optional(Schema.String), + TopicArn: Schema.String, + Events: Schema.Array(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Key: Schema.optional( + Schema.Struct({ + FilterRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + }), + ), + }), + ), + ), + QueueConfigurations: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.optional(Schema.String), + QueueArn: Schema.String, + Events: Schema.Array(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Key: Schema.optional( + Schema.Struct({ + FilterRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + }), + ), + }), + ), + ), + LambdaFunctionConfigurations: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.optional(Schema.String), + LambdaFunctionArn: Schema.String, + Events: Schema.Array(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Key: Schema.optional( + Schema.Struct({ + FilterRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + }), + ), + }), + ), + ), + EventBridgeConfiguration: Schema.optional(Schema.Struct({})), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketOwnershipControls = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?ownershipControls", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketOwnershipControls", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + OwnershipControls: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Rules: Schema.Array( + Schema.Struct({ ObjectOwnership: Schema.String }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketPolicy = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?policy", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketPolicy", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Policy: Schema.optional(Body("undefined", Schema.String)), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketPolicyStatus = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?policyStatus", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketPolicyStatus", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + PolicyStatus: Schema.optional( + Body( + "undefined", + Schema.Struct({ IsPublic: Schema.optional(Schema.Boolean) }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketReplication = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?replication", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketReplication", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + ReplicationConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + Role: Schema.String, + Rules: Schema.Array( + Schema.Struct({ + ID: Schema.optional(Schema.String), + Priority: Schema.optional(Schema.Number), + Prefix: Schema.optional(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + }), + ), + Status: Schema.String, + SourceSelectionCriteria: Schema.optional( + Schema.Struct({ + SseKmsEncryptedObjects: Schema.optional( + Schema.Struct({ Status: Schema.String }), + ), + ReplicaModifications: Schema.optional( + Schema.Struct({ Status: Schema.String }), + ), + }), + ), + ExistingObjectReplication: Schema.optional( + Schema.Struct({ Status: Schema.String }), + ), + Destination: Schema.Struct({ + Bucket: Schema.String, + Account: Schema.optional(Schema.String), + StorageClass: Schema.optional(Schema.String), + AccessControlTranslation: Schema.optional( + Schema.Struct({ Owner: Schema.String }), + ), + EncryptionConfiguration: Schema.optional( + Schema.Struct({ + ReplicaKmsKeyID: Schema.optional(Schema.String), + }), + ), + ReplicationTime: Schema.optional( + Schema.Struct({ + Status: Schema.String, + Time: Schema.Struct({ + Minutes: Schema.optional(Schema.Number), + }), + }), + ), + Metrics: Schema.optional( + Schema.Struct({ + Status: Schema.String, + EventThreshold: Schema.optional( + Schema.Struct({ + Minutes: Schema.optional(Schema.Number), + }), + ), + }), + ), + }), + DeleteMarkerReplication: Schema.optional( + Schema.Struct({ Status: Schema.optional(Schema.String) }), + ), + }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketRequestPayment = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?requestPayment", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketRequestPayment", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ Payer: Schema.optional(Schema.String) }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketTagging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?tagging", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketTagging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + TagSet: Schema.Array( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketVersioning = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?versioning", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketVersioning", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Status: Schema.optional(Schema.String), + MFADelete: Schema.optional(Schema.String), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetBucketWebsite = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?website", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetBucketWebsite", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + RedirectAllRequestsTo: Schema.optional( + Schema.Struct({ + HostName: Schema.String, + Protocol: Schema.optional(Schema.String), + }), + ), + IndexDocument: Schema.optional( + Schema.Struct({ Suffix: Schema.String }), + ), + ErrorDocument: Schema.optional(Schema.Struct({ Key: Schema.String })), + RoutingRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Condition: Schema.optional( + Schema.Struct({ + HttpErrorCodeReturnedEquals: Schema.optional(Schema.String), + KeyPrefixEquals: Schema.optional(Schema.String), + }), + ), + Redirect: Schema.Struct({ + HostName: Schema.optional(Schema.String), + HttpRedirectCode: Schema.optional(Schema.String), + Protocol: Schema.optional(Schema.String), + ReplaceKeyPrefixWith: Schema.optional(Schema.String), + ReplaceKeyWith: Schema.optional(Schema.String), + }), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=GetObject", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObject", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + IfMatch: Schema.optional(Header("If-Match")), + IfModifiedSince: Schema.optional( + Header("If-Modified-Since", Schema.Date), + ), + IfNoneMatch: Schema.optional(Header("If-None-Match")), + IfUnmodifiedSince: Schema.optional( + Header("If-Unmodified-Since", Schema.Date), + ), + Key: Path("Key", Schema.String), + Range: Schema.optional(Header("Range")), + ResponseCacheControl: Schema.optional(Schema.String), + ResponseContentDisposition: Schema.optional(Schema.String), + ResponseContentEncoding: Schema.optional(Schema.String), + ResponseContentLanguage: Schema.optional(Schema.String), + ResponseContentType: Schema.optional(Schema.String), + ResponseExpires: Schema.optional(Schema.Date), + VersionId: Schema.optional(Schema.String), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + PartNumber: Schema.optional(Schema.Number), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ChecksumMode: Schema.optional(Header("x-amz-checksum-mode")), + }), + Schema.Struct({ + Body: Schema.optional(Body("undefined", StreamBody())), + DeleteMarker: Schema.optional( + Header("x-amz-delete-marker", Schema.Boolean), + ), + AcceptRanges: Schema.optional(Header("accept-ranges")), + Expiration: Schema.optional(Header("x-amz-expiration")), + Restore: Schema.optional(Header("x-amz-restore")), + LastModified: Schema.optional(Header("Last-Modified", Schema.Date)), + ContentLength: Schema.optional(Header("Content-Length", Schema.Number)), + ETag: Schema.optional(Header("ETag")), + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + ChecksumType: Schema.optional(Header("x-amz-checksum-type")), + MissingMeta: Schema.optional( + Header("x-amz-missing-meta", Schema.Number), + ), + VersionId: Schema.optional(Header("x-amz-version-id")), + CacheControl: Schema.optional(Header("Cache-Control")), + ContentDisposition: Schema.optional(Header("Content-Disposition")), + ContentEncoding: Schema.optional(Header("Content-Encoding")), + ContentLanguage: Schema.optional(Header("Content-Language")), + ContentRange: Schema.optional(Header("Content-Range")), + ContentType: Schema.optional(Header("Content-Type")), + Expires: Schema.optional(Header("Expires")), + WebsiteRedirectLocation: Schema.optional( + Header("x-amz-website-redirect-location"), + ), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + Metadata: Schema.optional( + Schema.Record({ key: Schema.String, value: Schema.String }), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + StorageClass: Schema.optional(Header("x-amz-storage-class")), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + ReplicationStatus: Schema.optional(Header("x-amz-replication-status")), + PartsCount: Schema.optional( + Header("x-amz-mp-parts-count", Schema.Number), + ), + TagCount: Schema.optional(Header("x-amz-tagging-count", Schema.Number)), + ObjectLockMode: Schema.optional(Header("x-amz-object-lock-mode")), + ObjectLockRetainUntilDate: Schema.optional( + Header("x-amz-object-lock-retain-until-date", Schema.Date), + ), + ObjectLockLegalHoldStatus: Schema.optional( + Header("x-amz-object-lock-legal-hold"), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectAcl = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?acl", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectAcl", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + VersionId: Schema.optional(Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + Grants: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectAttributes = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?attributes", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectAttributes", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + MaxParts: Schema.optional(Header("x-amz-max-parts", Schema.Number)), + PartNumberMarker: Schema.optional(Header("x-amz-part-number-marker")), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ObjectAttributes: Header( + "x-amz-object-attributes", + Schema.Array(Schema.String), + ), + }), + Schema.Struct({ + DeleteMarker: Schema.optional( + Header("x-amz-delete-marker", Schema.Boolean), + ), + LastModified: Schema.optional(Header("Last-Modified", Schema.Date)), + VersionId: Schema.optional(Header("x-amz-version-id")), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + ETag: Schema.optional(Schema.String), + Checksum: Schema.optional( + Schema.Struct({ + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + ChecksumType: Schema.optional(Schema.String), + }), + ), + ObjectParts: Schema.optional( + Schema.Struct({ + TotalPartsCount: Schema.optional(Schema.Number), + PartNumberMarker: Schema.optional(Schema.String), + NextPartNumberMarker: Schema.optional(Schema.String), + MaxParts: Schema.optional(Schema.Number), + IsTruncated: Schema.optional(Schema.Boolean), + Parts: Schema.optional( + Schema.Array( + Schema.Struct({ + PartNumber: Schema.optional(Schema.Number), + Size: Schema.optional(Schema.Number), + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + StorageClass: Schema.optional(Schema.String), + ObjectSize: Schema.optional(Schema.Number), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectLegalHold = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?legal-hold", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectLegalHold", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + LegalHold: Schema.optional( + Body( + "LegalHold", + Schema.Struct({ Status: Schema.optional(Schema.String) }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectLockConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?object-lock", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectLockConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + ObjectLockConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + ObjectLockEnabled: Schema.optional(Schema.String), + Rule: Schema.optional( + Schema.Struct({ + DefaultRetention: Schema.optional( + Schema.Struct({ + Mode: Schema.optional(Schema.String), + Days: Schema.optional(Schema.Number), + Years: Schema.optional(Schema.Number), + }), + ), + }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectRetention = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?retention", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectRetention", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Retention: Schema.optional( + Body( + "Retention", + Schema.Struct({ + Mode: Schema.optional(Schema.String), + RetainUntilDate: Schema.optional(Schema.Date), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectTagging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?tagging", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectTagging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + }), + Schema.Struct({ + VersionId: Schema.optional(Header("x-amz-version-id")), + TagSet: Schema.Array( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetObjectTorrent = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?torrent", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetObjectTorrent", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Body: Schema.optional(Body("undefined", StreamBody())), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const GetPublicAccessBlock = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?publicAccessBlock", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "GetPublicAccessBlock", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + PublicAccessBlockConfiguration: Schema.optional( + Body( + "undefined", + Schema.Struct({ + BlockPublicAcls: Schema.optional(Schema.Boolean), + IgnorePublicAcls: Schema.optional(Schema.Boolean), + BlockPublicPolicy: Schema.optional(Schema.Boolean), + RestrictPublicBuckets: Schema.optional(Schema.Boolean), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const HeadBucket = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}", + method: "HEAD", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "HeadBucket", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + BucketArn: Schema.optional(Header("x-amz-bucket-arn")), + BucketLocationType: Schema.optional( + Header("x-amz-bucket-location-type"), + ), + BucketLocationName: Schema.optional( + Header("x-amz-bucket-location-name"), + ), + BucketRegion: Schema.optional(Header("x-amz-bucket-region")), + AccessPointAlias: Schema.optional( + Header("x-amz-access-point-alias", Schema.Boolean), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const HeadObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}", + method: "HEAD", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "HeadObject", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + IfMatch: Schema.optional(Header("If-Match")), + IfModifiedSince: Schema.optional( + Header("If-Modified-Since", Schema.Date), + ), + IfNoneMatch: Schema.optional(Header("If-None-Match")), + IfUnmodifiedSince: Schema.optional( + Header("If-Unmodified-Since", Schema.Date), + ), + Key: Path("Key", Schema.String), + Range: Schema.optional(Header("Range")), + ResponseCacheControl: Schema.optional(Schema.String), + ResponseContentDisposition: Schema.optional(Schema.String), + ResponseContentEncoding: Schema.optional(Schema.String), + ResponseContentLanguage: Schema.optional(Schema.String), + ResponseContentType: Schema.optional(Schema.String), + ResponseExpires: Schema.optional(Schema.Date), + VersionId: Schema.optional(Schema.String), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + PartNumber: Schema.optional(Schema.Number), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ChecksumMode: Schema.optional(Header("x-amz-checksum-mode")), + }), + Schema.Struct({ + DeleteMarker: Schema.optional( + Header("x-amz-delete-marker", Schema.Boolean), + ), + AcceptRanges: Schema.optional(Header("accept-ranges")), + Expiration: Schema.optional(Header("x-amz-expiration")), + Restore: Schema.optional(Header("x-amz-restore")), + ArchiveStatus: Schema.optional(Header("x-amz-archive-status")), + LastModified: Schema.optional(Header("Last-Modified", Schema.Date)), + ContentLength: Schema.optional(Header("Content-Length", Schema.Number)), + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + ChecksumType: Schema.optional(Header("x-amz-checksum-type")), + ETag: Schema.optional(Header("ETag")), + MissingMeta: Schema.optional( + Header("x-amz-missing-meta", Schema.Number), + ), + VersionId: Schema.optional(Header("x-amz-version-id")), + CacheControl: Schema.optional(Header("Cache-Control")), + ContentDisposition: Schema.optional(Header("Content-Disposition")), + ContentEncoding: Schema.optional(Header("Content-Encoding")), + ContentLanguage: Schema.optional(Header("Content-Language")), + ContentType: Schema.optional(Header("Content-Type")), + ContentRange: Schema.optional(Header("Content-Range")), + Expires: Schema.optional(Header("Expires")), + WebsiteRedirectLocation: Schema.optional( + Header("x-amz-website-redirect-location"), + ), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + Metadata: Schema.optional( + Schema.Record({ key: Schema.String, value: Schema.String }), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + StorageClass: Schema.optional(Header("x-amz-storage-class")), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + ReplicationStatus: Schema.optional(Header("x-amz-replication-status")), + PartsCount: Schema.optional( + Header("x-amz-mp-parts-count", Schema.Number), + ), + TagCount: Schema.optional(Header("x-amz-tagging-count", Schema.Number)), + ObjectLockMode: Schema.optional(Header("x-amz-object-lock-mode")), + ObjectLockRetainUntilDate: Schema.optional( + Header("x-amz-object-lock-retain-until-date", Schema.Date), + ), + ObjectLockLegalHoldStatus: Schema.optional( + Header("x-amz-object-lock-legal-hold"), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListBucketAnalyticsConfigurations = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListBucketAnalyticsConfigurations", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContinuationToken: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + IsTruncated: Schema.optional(Schema.Boolean), + ContinuationToken: Schema.optional(Schema.String), + NextContinuationToken: Schema.optional(Schema.String), + AnalyticsConfigurationList: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Union( + Schema.String, + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + ), + StorageClassAnalysis: Schema.Struct({ + DataExport: Schema.optional( + Schema.Struct({ + OutputSchemaVersion: Schema.String, + Destination: Schema.Struct({ + S3BucketDestination: Schema.Struct({ + Format: Schema.String, + BucketAccountId: Schema.optional(Schema.String), + Bucket: Schema.String, + Prefix: Schema.optional(Schema.String), + }), + }), + }), + ), + }), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListBucketIntelligentTieringConfigurations = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListBucketIntelligentTieringConfigurations", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContinuationToken: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + IsTruncated: Schema.optional(Schema.Boolean), + ContinuationToken: Schema.optional(Schema.String), + NextContinuationToken: Schema.optional(Schema.String), + IntelligentTieringConfigurationList: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + }), + ), + Status: Schema.String, + Tierings: Schema.Array( + Schema.Struct({ + Days: Schema.Number, + AccessTier: Schema.String, + }), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const ListBucketInventoryConfigurations = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListBucketInventoryConfigurations", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContinuationToken: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + ContinuationToken: Schema.optional(Schema.String), + InventoryConfigurationList: Schema.optional( + Schema.Array( + Schema.Struct({ + Destination: Schema.Struct({ + S3BucketDestination: Schema.Struct({ + AccountId: Schema.optional(Schema.String), + Bucket: Schema.String, + Format: Schema.String, + Prefix: Schema.optional(Schema.String), + Encryption: Schema.optional( + Schema.Struct({ + SSES3: Schema.optional(Schema.Struct({})), + SSEKMS: Schema.optional( + Schema.Struct({ KeyId: Schema.String }), + ), + }), + ), + }), + }), + IsEnabled: Schema.Boolean, + Filter: Schema.optional(Schema.Struct({ Prefix: Schema.String })), + Id: Schema.String, + IncludedObjectVersions: Schema.String, + OptionalFields: Schema.optional(Schema.Array(Schema.String)), + Schedule: Schema.Struct({ Frequency: Schema.String }), + }), + ), + ), + IsTruncated: Schema.optional(Schema.Boolean), + NextContinuationToken: Schema.optional(Schema.String), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListBucketMetricsConfigurations = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListBucketMetricsConfigurations", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContinuationToken: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + IsTruncated: Schema.optional(Schema.Boolean), + ContinuationToken: Schema.optional(Schema.String), + NextContinuationToken: Schema.optional(Schema.String), + MetricsConfigurationList: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Union( + Schema.String, + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + Schema.String, + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + AccessPointArn: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListBuckets = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/?x-id=ListBuckets", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListBuckets", + }, + Schema.Struct({ + MaxBuckets: Schema.optional(Schema.Number), + ContinuationToken: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + BucketRegion: Schema.optional(Schema.String), + }), + Schema.Struct({ + Buckets: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + CreationDate: Schema.optional(Schema.Date), + BucketRegion: Schema.optional(Schema.String), + BucketArn: Schema.optional(Schema.String), + }), + ), + ), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + ContinuationToken: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListDirectoryBuckets = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/?x-id=ListDirectoryBuckets", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListDirectoryBuckets", + }, + Schema.Struct({ + ContinuationToken: Schema.optional(Schema.String), + MaxDirectoryBuckets: Schema.optional(Schema.Number), + }), + Schema.Struct({ + Buckets: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + CreationDate: Schema.optional(Schema.Date), + BucketRegion: Schema.optional(Schema.String), + BucketArn: Schema.optional(Schema.String), + }), + ), + ), + ContinuationToken: Schema.optional(Schema.String), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListMultipartUploads = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?uploads", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListMultipartUploads", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Delimiter: Schema.optional(Schema.String), + EncodingType: Schema.optional(Schema.String), + KeyMarker: Schema.optional(Schema.String), + MaxUploads: Schema.optional(Schema.Number), + Prefix: Schema.optional(Schema.String), + UploadIdMarker: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + }), + Schema.Struct({ + Bucket: Schema.optional(Schema.String), + KeyMarker: Schema.optional(Schema.String), + UploadIdMarker: Schema.optional(Schema.String), + NextKeyMarker: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + Delimiter: Schema.optional(Schema.String), + NextUploadIdMarker: Schema.optional(Schema.String), + MaxUploads: Schema.optional(Schema.Number), + IsTruncated: Schema.optional(Schema.Boolean), + Uploads: Schema.optional( + Schema.Array( + Schema.Struct({ + UploadId: Schema.optional(Schema.String), + Key: Schema.optional(Schema.String), + Initiated: Schema.optional(Schema.Date), + StorageClass: Schema.optional(Schema.String), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + Initiator: Schema.optional( + Schema.Struct({ + ID: Schema.optional(Schema.String), + DisplayName: Schema.optional(Schema.String), + }), + ), + ChecksumAlgorithm: Schema.optional(Schema.String), + ChecksumType: Schema.optional(Schema.String), + }), + ), + ), + CommonPrefixes: Schema.optional( + Schema.Array( + Schema.Struct({ Prefix: Schema.optional(Schema.String) }), + ), + ), + EncodingType: Schema.optional(Schema.String), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListObjects = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListObjects", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Delimiter: Schema.optional(Schema.String), + EncodingType: Schema.optional(Schema.String), + Marker: Schema.optional(Schema.String), + MaxKeys: Schema.optional(Schema.Number), + Prefix: Schema.optional(Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + OptionalObjectAttributes: Schema.optional( + Header( + "x-amz-optional-object-attributes", + Schema.Array(Schema.String), + ), + ), + }), + Schema.Struct({ + IsTruncated: Schema.optional(Schema.Boolean), + Marker: Schema.optional(Schema.String), + NextMarker: Schema.optional(Schema.String), + Contents: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.optional(Schema.String), + LastModified: Schema.optional(Schema.Date), + ETag: Schema.optional(Schema.String), + ChecksumAlgorithm: Schema.optional(Schema.Array(Schema.String)), + ChecksumType: Schema.optional(Schema.String), + Size: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + RestoreStatus: Schema.optional( + Schema.Struct({ + IsRestoreInProgress: Schema.optional(Schema.Boolean), + RestoreExpiryDate: Schema.optional(Schema.Date), + }), + ), + }), + ), + ), + Name: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + Delimiter: Schema.optional(Schema.String), + MaxKeys: Schema.optional(Schema.Number), + CommonPrefixes: Schema.optional( + Schema.Array( + Schema.Struct({ Prefix: Schema.optional(Schema.String) }), + ), + ), + EncodingType: Schema.optional(Schema.String), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListObjectsV2 = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?list-type=2", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListObjectsV2", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Delimiter: Schema.optional(Schema.String), + EncodingType: Schema.optional(Schema.String), + MaxKeys: Schema.optional(Schema.Number), + Prefix: Schema.optional(Schema.String), + ContinuationToken: Schema.optional(Schema.String), + FetchOwner: Schema.optional(Schema.Boolean), + StartAfter: Schema.optional(Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + OptionalObjectAttributes: Schema.optional( + Header( + "x-amz-optional-object-attributes", + Schema.Array(Schema.String), + ), + ), + }), + Schema.Struct({ + IsTruncated: Schema.optional(Schema.Boolean), + Contents: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.optional(Schema.String), + LastModified: Schema.optional(Schema.Date), + ETag: Schema.optional(Schema.String), + ChecksumAlgorithm: Schema.optional(Schema.Array(Schema.String)), + ChecksumType: Schema.optional(Schema.String), + Size: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + RestoreStatus: Schema.optional( + Schema.Struct({ + IsRestoreInProgress: Schema.optional(Schema.Boolean), + RestoreExpiryDate: Schema.optional(Schema.Date), + }), + ), + }), + ), + ), + Name: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + Delimiter: Schema.optional(Schema.String), + MaxKeys: Schema.optional(Schema.Number), + CommonPrefixes: Schema.optional( + Schema.Array( + Schema.Struct({ Prefix: Schema.optional(Schema.String) }), + ), + ), + EncodingType: Schema.optional(Schema.String), + KeyCount: Schema.optional(Schema.Number), + ContinuationToken: Schema.optional(Schema.String), + NextContinuationToken: Schema.optional(Schema.String), + StartAfter: Schema.optional(Schema.String), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListObjectVersions = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?versions", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListObjectVersions", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Delimiter: Schema.optional(Schema.String), + EncodingType: Schema.optional(Schema.String), + KeyMarker: Schema.optional(Schema.String), + MaxKeys: Schema.optional(Schema.Number), + Prefix: Schema.optional(Schema.String), + VersionIdMarker: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + OptionalObjectAttributes: Schema.optional( + Header( + "x-amz-optional-object-attributes", + Schema.Array(Schema.String), + ), + ), + }), + Schema.Struct({ + IsTruncated: Schema.optional(Schema.Boolean), + KeyMarker: Schema.optional(Schema.String), + VersionIdMarker: Schema.optional(Schema.String), + NextKeyMarker: Schema.optional(Schema.String), + NextVersionIdMarker: Schema.optional(Schema.String), + Versions: Schema.optional( + Schema.Array( + Schema.Struct({ + ETag: Schema.optional(Schema.String), + ChecksumAlgorithm: Schema.optional(Schema.Array(Schema.String)), + ChecksumType: Schema.optional(Schema.String), + Size: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + Key: Schema.optional(Schema.String), + VersionId: Schema.optional(Schema.String), + IsLatest: Schema.optional(Schema.Boolean), + LastModified: Schema.optional(Schema.Date), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + RestoreStatus: Schema.optional( + Schema.Struct({ + IsRestoreInProgress: Schema.optional(Schema.Boolean), + RestoreExpiryDate: Schema.optional(Schema.Date), + }), + ), + }), + ), + ), + DeleteMarkers: Schema.optional( + Schema.Array( + Schema.Struct({ + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + Key: Schema.optional(Schema.String), + VersionId: Schema.optional(Schema.String), + IsLatest: Schema.optional(Schema.Boolean), + LastModified: Schema.optional(Schema.Date), + }), + ), + ), + Name: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + Delimiter: Schema.optional(Schema.String), + MaxKeys: Schema.optional(Schema.Number), + CommonPrefixes: Schema.optional( + Schema.Array( + Schema.Struct({ Prefix: Schema.optional(Schema.String) }), + ), + ), + EncodingType: Schema.optional(Schema.String), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const ListParts = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=ListParts", + method: "GET", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "ListParts", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + MaxParts: Schema.optional(Schema.Number), + PartNumberMarker: Schema.optional(Schema.String), + UploadId: Schema.String, + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + }), + Schema.Struct({ + AbortDate: Schema.optional(Header("x-amz-abort-date", Schema.Date)), + AbortRuleId: Schema.optional(Header("x-amz-abort-rule-id")), + Bucket: Schema.optional(Schema.String), + Key: Schema.optional(Schema.String), + UploadId: Schema.optional(Schema.String), + PartNumberMarker: Schema.optional(Schema.String), + NextPartNumberMarker: Schema.optional(Schema.String), + MaxParts: Schema.optional(Schema.Number), + IsTruncated: Schema.optional(Schema.Boolean), + Parts: Schema.optional( + Schema.Array( + Schema.Struct({ + PartNumber: Schema.optional(Schema.Number), + LastModified: Schema.optional(Schema.Date), + ETag: Schema.optional(Schema.String), + Size: Schema.optional(Schema.Number), + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + }), + ), + ), + Initiator: Schema.optional( + Schema.Struct({ + ID: Schema.optional(Schema.String), + DisplayName: Schema.optional(Schema.String), + }), + ), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + StorageClass: Schema.optional(Schema.String), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + ChecksumAlgorithm: Schema.optional(Schema.String), + ChecksumType: Schema.optional(Schema.String), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketAccelerateConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?accelerate", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketAccelerateConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + AccelerateConfiguration: Body( + "AccelerateConfiguration", + Schema.Struct({ Status: Schema.optional(Schema.String) }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketAcl = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?acl", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketAcl", + }, + Schema.Struct({ + ACL: Schema.optional(Header("x-amz-acl")), + AccessControlPolicy: Schema.optional( + Body( + "AccessControlPolicy", + Schema.Struct({ + Grants: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + }), + ), + ), + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + GrantFullControl: Schema.optional(Header("x-amz-grant-full-control")), + GrantRead: Schema.optional(Header("x-amz-grant-read")), + GrantReadACP: Schema.optional(Header("x-amz-grant-read-acp")), + GrantWrite: Schema.optional(Header("x-amz-grant-write")), + GrantWriteACP: Schema.optional(Header("x-amz-grant-write-acp")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketAnalyticsConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?analytics", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketAnalyticsConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + AnalyticsConfiguration: Body( + "AnalyticsConfiguration", + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Union( + Schema.String, + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + ), + StorageClassAnalysis: Schema.Struct({ + DataExport: Schema.optional( + Schema.Struct({ + OutputSchemaVersion: Schema.String, + Destination: Schema.Struct({ + S3BucketDestination: Schema.Struct({ + Format: Schema.String, + BucketAccountId: Schema.optional(Schema.String), + Bucket: Schema.String, + Prefix: Schema.optional(Schema.String), + }), + }), + }), + ), + }), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketCors = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?cors", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketCors", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + CORSConfiguration: Body( + "CORSConfiguration", + Schema.Struct({ + CORSRules: Schema.Array( + Schema.Struct({ + ID: Schema.optional(Schema.String), + AllowedHeaders: Schema.optional(Schema.Array(Schema.String)), + AllowedMethods: Schema.Array(Schema.String), + AllowedOrigins: Schema.Array(Schema.String), + ExposeHeaders: Schema.optional(Schema.Array(Schema.String)), + MaxAgeSeconds: Schema.optional(Schema.Number), + }), + ), + }), + ), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketEncryption = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?encryption", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketEncryption", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ServerSideEncryptionConfiguration: Body( + "ServerSideEncryptionConfiguration", + Schema.Struct({ + Rules: Schema.Array( + Schema.Struct({ + ApplyServerSideEncryptionByDefault: Schema.optional( + Schema.Struct({ + SSEAlgorithm: Schema.String, + KMSMasterKeyID: Schema.optional(Schema.String), + }), + ), + BucketKeyEnabled: Schema.optional(Schema.Boolean), + }), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketIntelligentTieringConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?intelligent-tiering", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketIntelligentTieringConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + IntelligentTieringConfiguration: Body( + "IntelligentTieringConfiguration", + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + }), + ), + Status: Schema.String, + Tierings: Schema.Array( + Schema.Struct({ + Days: Schema.Number, + AccessTier: Schema.String, + }), + ), + }), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const PutBucketInventoryConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?inventory", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketInventoryConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + InventoryConfiguration: Body( + "InventoryConfiguration", + Schema.Struct({ + Destination: Schema.Struct({ + S3BucketDestination: Schema.Struct({ + AccountId: Schema.optional(Schema.String), + Bucket: Schema.String, + Format: Schema.String, + Prefix: Schema.optional(Schema.String), + Encryption: Schema.optional( + Schema.Struct({ + SSES3: Schema.optional(Schema.Struct({})), + SSEKMS: Schema.optional( + Schema.Struct({ KeyId: Schema.String }), + ), + }), + ), + }), + }), + IsEnabled: Schema.Boolean, + Filter: Schema.optional(Schema.Struct({ Prefix: Schema.String })), + Id: Schema.String, + IncludedObjectVersions: Schema.String, + OptionalFields: Schema.optional(Schema.Array(Schema.String)), + Schedule: Schema.Struct({ Frequency: Schema.String }), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketLifecycleConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?lifecycle", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketLifecycleConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + LifecycleConfiguration: Schema.optional( + Body( + "LifecycleConfiguration", + Schema.Struct({ + Rules: Schema.Array( + Schema.Struct({ + Expiration: Schema.optional( + Schema.Struct({ + Date: Schema.optional(Schema.Date), + Days: Schema.optional(Schema.Number), + ExpiredObjectDeleteMarker: Schema.optional( + Schema.Boolean, + ), + }), + ), + ID: Schema.optional(Schema.String), + Prefix: Schema.optional(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ObjectSizeGreaterThan: Schema.optional(Schema.Number), + ObjectSizeLessThan: Schema.optional(Schema.Number), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + ObjectSizeGreaterThan: Schema.optional(Schema.Number), + ObjectSizeLessThan: Schema.optional(Schema.Number), + }), + ), + }), + ), + Status: Schema.String, + Transitions: Schema.optional( + Schema.Array( + Schema.Struct({ + Date: Schema.optional(Schema.Date), + Days: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + }), + ), + ), + NoncurrentVersionTransitions: Schema.optional( + Schema.Array( + Schema.Struct({ + NoncurrentDays: Schema.optional(Schema.Number), + StorageClass: Schema.optional(Schema.String), + NewerNoncurrentVersions: Schema.optional(Schema.Number), + }), + ), + ), + NoncurrentVersionExpiration: Schema.optional( + Schema.Struct({ + NoncurrentDays: Schema.optional(Schema.Number), + NewerNoncurrentVersions: Schema.optional(Schema.Number), + }), + ), + AbortIncompleteMultipartUpload: Schema.optional( + Schema.Struct({ + DaysAfterInitiation: Schema.optional(Schema.Number), + }), + ), + }), + ), + }), + ), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + TransitionDefaultMinimumObjectSize: Schema.optional( + Header("x-amz-transition-default-minimum-object-size"), + ), + }), + Schema.Struct({ + TransitionDefaultMinimumObjectSize: Schema.optional( + Header("x-amz-transition-default-minimum-object-size"), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketLogging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?logging", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketLogging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + BucketLoggingStatus: Body( + "BucketLoggingStatus", + Schema.Struct({ + LoggingEnabled: Schema.optional( + Schema.Struct({ + TargetBucket: Schema.String, + TargetGrants: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + TargetPrefix: Schema.String, + TargetObjectKeyFormat: Schema.optional( + Schema.Struct({ + SimplePrefix: Schema.optional(Schema.Struct({})), + PartitionedPrefix: Schema.optional( + Schema.Struct({ + PartitionDateSource: Schema.optional(Schema.String), + }), + ), + }), + ), + }), + ), + }), + ), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketMetricsConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metrics", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketMetricsConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Id: Schema.String, + MetricsConfiguration: Body( + "MetricsConfiguration", + Schema.Struct({ + Id: Schema.String, + Filter: Schema.optional( + Schema.Union( + Schema.String, + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + Schema.String, + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + AccessPointArn: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketNotificationConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?notification", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketNotificationConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + NotificationConfiguration: Body( + "NotificationConfiguration", + Schema.Struct({ + TopicConfigurations: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.optional(Schema.String), + TopicArn: Schema.String, + Events: Schema.Array(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Key: Schema.optional( + Schema.Struct({ + FilterRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + }), + ), + }), + ), + ), + QueueConfigurations: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.optional(Schema.String), + QueueArn: Schema.String, + Events: Schema.Array(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Key: Schema.optional( + Schema.Struct({ + FilterRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + }), + ), + }), + ), + ), + LambdaFunctionConfigurations: Schema.optional( + Schema.Array( + Schema.Struct({ + Id: Schema.optional(Schema.String), + LambdaFunctionArn: Schema.String, + Events: Schema.Array(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Key: Schema.optional( + Schema.Struct({ + FilterRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + }), + ), + }), + ), + }), + ), + ), + EventBridgeConfiguration: Schema.optional(Schema.Struct({})), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + SkipDestinationValidation: Schema.optional( + Header("x-amz-skip-destination-validation", Schema.Boolean), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketOwnershipControls = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?ownershipControls", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketOwnershipControls", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + OwnershipControls: Body( + "OwnershipControls", + Schema.Struct({ + Rules: Schema.Array( + Schema.Struct({ ObjectOwnership: Schema.String }), + ), + }), + ), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketPolicy = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?policy", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketPolicy", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ConfirmRemoveSelfBucketAccess: Schema.optional( + Header("x-amz-confirm-remove-self-bucket-access", Schema.Boolean), + ), + Policy: Body("undefined", Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketReplication = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?replication", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketReplication", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ReplicationConfiguration: Body( + "ReplicationConfiguration", + Schema.Struct({ + Role: Schema.String, + Rules: Schema.Array( + Schema.Struct({ + ID: Schema.optional(Schema.String), + Priority: Schema.optional(Schema.Number), + Prefix: Schema.optional(Schema.String), + Filter: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tag: Schema.optional( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + And: Schema.optional( + Schema.Struct({ + Prefix: Schema.optional(Schema.String), + Tags: Schema.optional( + Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + ), + }), + ), + }), + ), + Status: Schema.String, + SourceSelectionCriteria: Schema.optional( + Schema.Struct({ + SseKmsEncryptedObjects: Schema.optional( + Schema.Struct({ Status: Schema.String }), + ), + ReplicaModifications: Schema.optional( + Schema.Struct({ Status: Schema.String }), + ), + }), + ), + ExistingObjectReplication: Schema.optional( + Schema.Struct({ Status: Schema.String }), + ), + Destination: Schema.Struct({ + Bucket: Schema.String, + Account: Schema.optional(Schema.String), + StorageClass: Schema.optional(Schema.String), + AccessControlTranslation: Schema.optional( + Schema.Struct({ Owner: Schema.String }), + ), + EncryptionConfiguration: Schema.optional( + Schema.Struct({ + ReplicaKmsKeyID: Schema.optional(Schema.String), + }), + ), + ReplicationTime: Schema.optional( + Schema.Struct({ + Status: Schema.String, + Time: Schema.Struct({ + Minutes: Schema.optional(Schema.Number), + }), + }), + ), + Metrics: Schema.optional( + Schema.Struct({ + Status: Schema.String, + EventThreshold: Schema.optional( + Schema.Struct({ + Minutes: Schema.optional(Schema.Number), + }), + ), + }), + ), + }), + DeleteMarkerReplication: Schema.optional( + Schema.Struct({ Status: Schema.optional(Schema.String) }), + ), + }), + ), + }), + ), + Token: Schema.optional(Header("x-amz-bucket-object-lock-token")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketRequestPayment = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?requestPayment", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketRequestPayment", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + RequestPaymentConfiguration: Body( + "RequestPaymentConfiguration", + Schema.Struct({ Payer: Schema.String }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketTagging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?tagging", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketTagging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + Tagging: Body( + "Tagging", + Schema.Struct({ + TagSet: Schema.Array( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketVersioning = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?versioning", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketVersioning", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + MFA: Schema.optional(Header("x-amz-mfa")), + VersioningConfiguration: Body( + "VersioningConfiguration", + Schema.Struct({ + MFADelete: Schema.optional(Schema.String), + Status: Schema.optional(Schema.String), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutBucketWebsite = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?website", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutBucketWebsite", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + WebsiteConfiguration: Body( + "WebsiteConfiguration", + Schema.Struct({ + ErrorDocument: Schema.optional( + Schema.Struct({ Key: Schema.String }), + ), + IndexDocument: Schema.optional( + Schema.Struct({ Suffix: Schema.String }), + ), + RedirectAllRequestsTo: Schema.optional( + Schema.Struct({ + HostName: Schema.String, + Protocol: Schema.optional(Schema.String), + }), + ), + RoutingRules: Schema.optional( + Schema.Array( + Schema.Struct({ + Condition: Schema.optional( + Schema.Struct({ + HttpErrorCodeReturnedEquals: Schema.optional( + Schema.String, + ), + KeyPrefixEquals: Schema.optional(Schema.String), + }), + ), + Redirect: Schema.Struct({ + HostName: Schema.optional(Schema.String), + HttpRedirectCode: Schema.optional(Schema.String), + Protocol: Schema.optional(Schema.String), + ReplaceKeyPrefixWith: Schema.optional(Schema.String), + ReplaceKeyWith: Schema.optional(Schema.String), + }), + }), + ), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=PutObject", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObject", + }, + Schema.Struct({ + ACL: Schema.optional(Header("x-amz-acl")), + Body: Schema.optional(Body("undefined", StreamBody())), + Bucket: Path("Bucket", Schema.String), + CacheControl: Schema.optional(Header("Cache-Control")), + ContentDisposition: Schema.optional(Header("Content-Disposition")), + ContentEncoding: Schema.optional(Header("Content-Encoding")), + ContentLanguage: Schema.optional(Header("Content-Language")), + ContentLength: Schema.optional(Header("Content-Length", Schema.Number)), + ContentMD5: Schema.optional(Header("Content-MD5")), + ContentType: Schema.optional(Header("Content-Type")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + Expires: Schema.optional(Header("Expires")), + IfMatch: Schema.optional(Header("If-Match")), + IfNoneMatch: Schema.optional(Header("If-None-Match")), + GrantFullControl: Schema.optional(Header("x-amz-grant-full-control")), + GrantRead: Schema.optional(Header("x-amz-grant-read")), + GrantReadACP: Schema.optional(Header("x-amz-grant-read-acp")), + GrantWriteACP: Schema.optional(Header("x-amz-grant-write-acp")), + Key: Path("Key", Schema.String), + WriteOffsetBytes: Schema.optional( + Header("x-amz-write-offset-bytes", Schema.Number), + ), + Metadata: Schema.optional( + Schema.Record({ key: Schema.String, value: Schema.String }), + ), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + StorageClass: Schema.optional(Header("x-amz-storage-class")), + WebsiteRedirectLocation: Schema.optional( + Header("x-amz-website-redirect-location"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + Tagging: Schema.optional(Header("x-amz-tagging")), + ObjectLockMode: Schema.optional(Header("x-amz-object-lock-mode")), + ObjectLockRetainUntilDate: Schema.optional( + Header("x-amz-object-lock-retain-until-date", Schema.Date), + ), + ObjectLockLegalHoldStatus: Schema.optional( + Header("x-amz-object-lock-legal-hold"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Expiration: Schema.optional(Header("x-amz-expiration")), + ETag: Schema.optional(Header("ETag")), + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + ChecksumType: Schema.optional(Header("x-amz-checksum-type")), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + VersionId: Schema.optional(Header("x-amz-version-id")), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + SSEKMSEncryptionContext: Schema.optional( + Header("x-amz-server-side-encryption-context"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + Size: Schema.optional(Header("x-amz-object-size", Schema.Number)), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutObjectAcl = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?acl", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObjectAcl", + }, + Schema.Struct({ + ACL: Schema.optional(Header("x-amz-acl")), + AccessControlPolicy: Schema.optional( + Body( + "AccessControlPolicy", + Schema.Struct({ + Grants: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + Owner: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + }), + ), + }), + ), + ), + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + GrantFullControl: Schema.optional(Header("x-amz-grant-full-control")), + GrantRead: Schema.optional(Header("x-amz-grant-read")), + GrantReadACP: Schema.optional(Header("x-amz-grant-read-acp")), + GrantWrite: Schema.optional(Header("x-amz-grant-write")), + GrantWriteACP: Schema.optional(Header("x-amz-grant-write-acp")), + Key: Path("Key", Schema.String), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + VersionId: Schema.optional(Schema.String), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutObjectLegalHold = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?legal-hold", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObjectLegalHold", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + LegalHold: Schema.optional( + Body( + "LegalHold", + Schema.Struct({ Status: Schema.optional(Schema.String) }), + ), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + VersionId: Schema.optional(Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutObjectLockConfiguration = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?object-lock", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObjectLockConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ObjectLockConfiguration: Schema.optional( + Body( + "ObjectLockConfiguration", + Schema.Struct({ + ObjectLockEnabled: Schema.optional(Schema.String), + Rule: Schema.optional( + Schema.Struct({ + DefaultRetention: Schema.optional( + Schema.Struct({ + Mode: Schema.optional(Schema.String), + Days: Schema.optional(Schema.Number), + Years: Schema.optional(Schema.Number), + }), + ), + }), + ), + }), + ), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + Token: Schema.optional(Header("x-amz-bucket-object-lock-token")), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutObjectRetention = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?retention", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObjectRetention", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + Retention: Schema.optional( + Body( + "Retention", + Schema.Struct({ + Mode: Schema.optional(Schema.String), + RetainUntilDate: Schema.optional(Schema.Date), + }), + ), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + VersionId: Schema.optional(Schema.String), + BypassGovernanceRetention: Schema.optional( + Header("x-amz-bypass-governance-retention", Schema.Boolean), + ), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutObjectTagging = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?tagging", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutObjectTagging", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + Tagging: Body( + "Tagging", + Schema.Struct({ + TagSet: Schema.Array( + Schema.Struct({ Key: Schema.String, Value: Schema.String }), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + }), + Schema.Struct({ VersionId: Schema.optional(Header("x-amz-version-id")) }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const PutPublicAccessBlock = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?publicAccessBlock", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "PutPublicAccessBlock", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + PublicAccessBlockConfiguration: Body( + "PublicAccessBlockConfiguration", + Schema.Struct({ + BlockPublicAcls: Schema.optional(Schema.Boolean), + IgnorePublicAcls: Schema.optional(Schema.Boolean), + BlockPublicPolicy: Schema.optional(Schema.Boolean), + RestrictPublicBuckets: Schema.optional(Schema.Boolean), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const RenameObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?renameObject", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "RenameObject", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Path("Key", Schema.String), + RenameSource: Header("x-amz-rename-source"), + DestinationIfMatch: Schema.optional(Header("If-Match")), + DestinationIfNoneMatch: Schema.optional(Header("If-None-Match")), + DestinationIfModifiedSince: Schema.optional( + Header("If-Modified-Since", Schema.Date), + ), + DestinationIfUnmodifiedSince: Schema.optional( + Header("If-Unmodified-Since", Schema.Date), + ), + SourceIfMatch: Schema.optional(Header("x-amz-rename-source-if-match")), + SourceIfNoneMatch: Schema.optional( + Header("x-amz-rename-source-if-none-match"), + ), + SourceIfModifiedSince: Schema.optional( + Header("x-amz-rename-source-if-modified-since", Schema.Date), + ), + SourceIfUnmodifiedSince: Schema.optional( + Header("x-amz-rename-source-if-unmodified-since", Schema.Date), + ), + ClientToken: Schema.optional(Header("x-amz-client-token")), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const RestoreObject = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?restore", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "RestoreObject", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + VersionId: Schema.optional(Schema.String), + RestoreRequest: Schema.optional( + Body( + "RestoreRequest", + Schema.Struct({ + Days: Schema.optional(Schema.Number), + GlacierJobParameters: Schema.optional( + Schema.Struct({ Tier: Schema.String }), + ), + Type: Schema.optional(Schema.String), + Tier: Schema.optional(Schema.String), + Description: Schema.optional(Schema.String), + SelectParameters: Schema.optional( + Schema.Struct({ + InputSerialization: Schema.Struct({ + CSV: Schema.optional( + Schema.Struct({ + FileHeaderInfo: Schema.optional(Schema.String), + Comments: Schema.optional(Schema.String), + QuoteEscapeCharacter: Schema.optional(Schema.String), + RecordDelimiter: Schema.optional(Schema.String), + FieldDelimiter: Schema.optional(Schema.String), + QuoteCharacter: Schema.optional(Schema.String), + AllowQuotedRecordDelimiter: Schema.optional( + Schema.Boolean, + ), + }), + ), + CompressionType: Schema.optional(Schema.String), + JSON: Schema.optional( + Schema.Struct({ Type: Schema.optional(Schema.String) }), + ), + Parquet: Schema.optional(Schema.Struct({})), + }), + ExpressionType: Schema.String, + Expression: Schema.String, + OutputSerialization: Schema.Struct({ + CSV: Schema.optional( + Schema.Struct({ + QuoteFields: Schema.optional(Schema.String), + QuoteEscapeCharacter: Schema.optional(Schema.String), + RecordDelimiter: Schema.optional(Schema.String), + FieldDelimiter: Schema.optional(Schema.String), + QuoteCharacter: Schema.optional(Schema.String), + }), + ), + JSON: Schema.optional( + Schema.Struct({ + RecordDelimiter: Schema.optional(Schema.String), + }), + ), + }), + }), + ), + OutputLocation: Schema.optional( + Schema.Struct({ + S3: Schema.optional( + Schema.Struct({ + BucketName: Schema.String, + Prefix: Schema.String, + Encryption: Schema.optional( + Schema.Struct({ + EncryptionType: Schema.String, + KMSKeyId: Schema.optional(Schema.String), + KMSContext: Schema.optional(Schema.String), + }), + ), + CannedACL: Schema.optional(Schema.String), + AccessControlList: Schema.optional( + Schema.Array( + Schema.Struct({ + Grantee: Schema.optional( + Schema.Struct({ + DisplayName: Schema.optional(Schema.String), + EmailAddress: Schema.optional(Schema.String), + ID: Schema.optional(Schema.String), + URI: Schema.optional(Schema.String), + Type: Schema.String, + }), + ), + Permission: Schema.optional(Schema.String), + }), + ), + ), + Tagging: Schema.optional( + Schema.Struct({ + TagSet: Schema.Array( + Schema.Struct({ + Key: Schema.String, + Value: Schema.String, + }), + ), + }), + ), + UserMetadata: Schema.optional( + Schema.Array( + Schema.Struct({ + Name: Schema.optional(Schema.String), + Value: Schema.optional(Schema.String), + }), + ), + ), + StorageClass: Schema.optional(Schema.String), + }), + ), + }), + ), + }), + ), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + RestoreOutputPath: Schema.optional(Header("x-amz-restore-output-path")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const SelectObjectContent = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?select&select-type=2", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "SelectObjectContent", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + Key: Schema.String, + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + Expression: Schema.String, + ExpressionType: Schema.String, + RequestProgress: Schema.optional( + Schema.Struct({ Enabled: Schema.optional(Schema.Boolean) }), + ), + InputSerialization: Schema.Struct({ + CSV: Schema.optional( + Schema.Struct({ + FileHeaderInfo: Schema.optional(Schema.String), + Comments: Schema.optional(Schema.String), + QuoteEscapeCharacter: Schema.optional(Schema.String), + RecordDelimiter: Schema.optional(Schema.String), + FieldDelimiter: Schema.optional(Schema.String), + QuoteCharacter: Schema.optional(Schema.String), + AllowQuotedRecordDelimiter: Schema.optional(Schema.Boolean), + }), + ), + CompressionType: Schema.optional(Schema.String), + JSON: Schema.optional( + Schema.Struct({ Type: Schema.optional(Schema.String) }), + ), + Parquet: Schema.optional(Schema.Struct({})), + }), + OutputSerialization: Schema.Struct({ + CSV: Schema.optional( + Schema.Struct({ + QuoteFields: Schema.optional(Schema.String), + QuoteEscapeCharacter: Schema.optional(Schema.String), + RecordDelimiter: Schema.optional(Schema.String), + FieldDelimiter: Schema.optional(Schema.String), + QuoteCharacter: Schema.optional(Schema.String), + }), + ), + JSON: Schema.optional( + Schema.Struct({ RecordDelimiter: Schema.optional(Schema.String) }), + ), + }), + ScanRange: Schema.optional( + Schema.Struct({ + Start: Schema.optional(Schema.Number), + End: Schema.optional(Schema.Number), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + Payload: Schema.optional( + Body( + "undefined", + Schema.Union( + Schema.Struct({ Payload: Schema.optional(StreamBody()) }), + Schema.Struct({ + Details: Schema.optional( + Schema.Struct({ + BytesScanned: Schema.optional(Schema.Number), + BytesProcessed: Schema.optional(Schema.Number), + BytesReturned: Schema.optional(Schema.Number), + }), + ), + }), + Schema.Struct({ + Details: Schema.optional( + Schema.Struct({ + BytesScanned: Schema.optional(Schema.Number), + BytesProcessed: Schema.optional(Schema.Number), + BytesReturned: Schema.optional(Schema.Number), + }), + ), + }), + Schema.Struct({}), + Schema.Struct({}), + ), + ), + ), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const UpdateBucketMetadataInventoryTableConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataInventoryTable", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "UpdateBucketMetadataInventoryTableConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + InventoryTableConfiguration: Body( + "InventoryTableConfiguration", + Schema.Struct({ + ConfigurationState: Schema.String, + EncryptionConfiguration: Schema.optional( + Schema.Struct({ + SseAlgorithm: Schema.String, + KmsKeyArn: Schema.optional(Schema.String), + }), + ), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const UpdateBucketMetadataJournalTableConfiguration = + /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}?metadataJournalTable", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "UpdateBucketMetadataJournalTableConfiguration", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + JournalTableConfiguration: Body( + "JournalTableConfiguration", + Schema.Struct({ + RecordExpiration: Schema.Struct({ + Expiration: Schema.String, + Days: Schema.optional(Schema.Number), + }), + }), + ), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, + ); +export const UploadPart = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=UploadPart", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "UploadPart", + }, + Schema.Struct({ + Body: Schema.optional(Body("undefined", StreamBody())), + Bucket: Path("Bucket", Schema.String), + ContentLength: Schema.optional(Header("Content-Length", Schema.Number)), + ContentMD5: Schema.optional(Header("Content-MD5")), + ChecksumAlgorithm: Schema.optional( + Header("x-amz-sdk-checksum-algorithm"), + ), + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + Key: Path("Key", Schema.String), + PartNumber: Schema.Number, + UploadId: Schema.String, + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + }), + Schema.Struct({ + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + ETag: Schema.optional(Header("ETag")), + ChecksumCRC32: Schema.optional(Header("x-amz-checksum-crc32")), + ChecksumCRC32C: Schema.optional(Header("x-amz-checksum-crc32c")), + ChecksumCRC64NVME: Schema.optional(Header("x-amz-checksum-crc64nvme")), + ChecksumSHA1: Schema.optional(Header("x-amz-checksum-sha1")), + ChecksumSHA256: Schema.optional(Header("x-amz-checksum-sha256")), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const UploadPartCopy = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/{Bucket}/{Key+}?x-id=UploadPartCopy", + method: "PUT", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "UploadPartCopy", + }, + Schema.Struct({ + Bucket: Path("Bucket", Schema.String), + CopySource: Header("x-amz-copy-source"), + CopySourceIfMatch: Schema.optional( + Header("x-amz-copy-source-if-match"), + ), + CopySourceIfModifiedSince: Schema.optional( + Header("x-amz-copy-source-if-modified-since", Schema.Date), + ), + CopySourceIfNoneMatch: Schema.optional( + Header("x-amz-copy-source-if-none-match"), + ), + CopySourceIfUnmodifiedSince: Schema.optional( + Header("x-amz-copy-source-if-unmodified-since", Schema.Date), + ), + CopySourceRange: Schema.optional(Header("x-amz-copy-source-range")), + Key: Schema.String, + PartNumber: Schema.Number, + UploadId: Schema.String, + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKey: Schema.optional( + Header("x-amz-server-side-encryption-customer-key"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + CopySourceSSECustomerAlgorithm: Schema.optional( + Header("x-amz-copy-source-server-side-encryption-customer-algorithm"), + ), + CopySourceSSECustomerKey: Schema.optional( + Header("x-amz-copy-source-server-side-encryption-customer-key"), + ), + CopySourceSSECustomerKeyMD5: Schema.optional( + Header("x-amz-copy-source-server-side-encryption-customer-key-MD5"), + ), + RequestPayer: Schema.optional(Header("x-amz-request-payer")), + ExpectedBucketOwner: Schema.optional( + Header("x-amz-expected-bucket-owner"), + ), + ExpectedSourceBucketOwner: Schema.optional( + Header("x-amz-source-expected-bucket-owner"), + ), + }), + Schema.Struct({ + CopySourceVersionId: Schema.optional( + Header("x-amz-copy-source-version-id"), + ), + CopyPartResult: Schema.optional( + Body( + "undefined", + Schema.Struct({ + ETag: Schema.optional(Schema.String), + LastModified: Schema.optional(Schema.Date), + ChecksumCRC32: Schema.optional(Schema.String), + ChecksumCRC32C: Schema.optional(Schema.String), + ChecksumCRC64NVME: Schema.optional(Schema.String), + ChecksumSHA1: Schema.optional(Schema.String), + ChecksumSHA256: Schema.optional(Schema.String), + }), + ), + ), + ServerSideEncryption: Schema.optional( + Header("x-amz-server-side-encryption"), + ), + SSECustomerAlgorithm: Schema.optional( + Header("x-amz-server-side-encryption-customer-algorithm"), + ), + SSECustomerKeyMD5: Schema.optional( + Header("x-amz-server-side-encryption-customer-key-MD5"), + ), + SSEKMSKeyId: Schema.optional( + Header("x-amz-server-side-encryption-aws-kms-key-id"), + ), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + RequestCharged: Schema.optional(Header("x-amz-request-charged")), + }), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); +export const WriteGetObjectResponse = /*#__PURE__*/ makeOperation( + () => + Operation( + { + uri: "/WriteGetObjectResponse", + method: "POST", + sdkId: "S3", + sigV4ServiceName: "s3", + name: "WriteGetObjectResponse", + }, + Schema.Struct({ + RequestRoute: Header("x-amz-request-route"), + RequestToken: Header("x-amz-request-token"), + Body: Schema.optional(Body("undefined", StreamBody())), + StatusCode: Schema.optional(Header("x-amz-fwd-status", Schema.Number)), + ErrorCode: Schema.optional(Header("x-amz-fwd-error-code")), + ErrorMessage: Schema.optional(Header("x-amz-fwd-error-message")), + AcceptRanges: Schema.optional(Header("x-amz-fwd-header-accept-ranges")), + CacheControl: Schema.optional(Header("x-amz-fwd-header-Cache-Control")), + ContentDisposition: Schema.optional( + Header("x-amz-fwd-header-Content-Disposition"), + ), + ContentEncoding: Schema.optional( + Header("x-amz-fwd-header-Content-Encoding"), + ), + ContentLanguage: Schema.optional( + Header("x-amz-fwd-header-Content-Language"), + ), + ContentLength: Schema.optional(Header("Content-Length", Schema.Number)), + ContentRange: Schema.optional(Header("x-amz-fwd-header-Content-Range")), + ContentType: Schema.optional(Header("x-amz-fwd-header-Content-Type")), + ChecksumCRC32: Schema.optional( + Header("x-amz-fwd-header-x-amz-checksum-crc32"), + ), + ChecksumCRC32C: Schema.optional( + Header("x-amz-fwd-header-x-amz-checksum-crc32c"), + ), + ChecksumCRC64NVME: Schema.optional( + Header("x-amz-fwd-header-x-amz-checksum-crc64nvme"), + ), + ChecksumSHA1: Schema.optional( + Header("x-amz-fwd-header-x-amz-checksum-sha1"), + ), + ChecksumSHA256: Schema.optional( + Header("x-amz-fwd-header-x-amz-checksum-sha256"), + ), + DeleteMarker: Schema.optional( + Header("x-amz-fwd-header-x-amz-delete-marker", Schema.Boolean), + ), + ETag: Schema.optional(Header("x-amz-fwd-header-ETag")), + Expires: Schema.optional(Header("x-amz-fwd-header-Expires")), + Expiration: Schema.optional( + Header("x-amz-fwd-header-x-amz-expiration"), + ), + LastModified: Schema.optional( + Header("x-amz-fwd-header-Last-Modified", Schema.Date), + ), + MissingMeta: Schema.optional( + Header("x-amz-fwd-header-x-amz-missing-meta", Schema.Number), + ), + Metadata: Schema.optional( + Schema.Record({ key: Schema.String, value: Schema.String }), + ), + ObjectLockMode: Schema.optional( + Header("x-amz-fwd-header-x-amz-object-lock-mode"), + ), + ObjectLockLegalHoldStatus: Schema.optional( + Header("x-amz-fwd-header-x-amz-object-lock-legal-hold"), + ), + ObjectLockRetainUntilDate: Schema.optional( + Header( + "x-amz-fwd-header-x-amz-object-lock-retain-until-date", + Schema.Date, + ), + ), + PartsCount: Schema.optional( + Header("x-amz-fwd-header-x-amz-mp-parts-count", Schema.Number), + ), + ReplicationStatus: Schema.optional( + Header("x-amz-fwd-header-x-amz-replication-status"), + ), + RequestCharged: Schema.optional( + Header("x-amz-fwd-header-x-amz-request-charged"), + ), + Restore: Schema.optional(Header("x-amz-fwd-header-x-amz-restore")), + ServerSideEncryption: Schema.optional( + Header("x-amz-fwd-header-x-amz-server-side-encryption"), + ), + SSECustomerAlgorithm: Schema.optional( + Header( + "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm", + ), + ), + SSEKMSKeyId: Schema.optional( + Header( + "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id", + ), + ), + SSECustomerKeyMD5: Schema.optional( + Header( + "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5", + ), + ), + StorageClass: Schema.optional( + Header("x-amz-fwd-header-x-amz-storage-class"), + ), + TagCount: Schema.optional( + Header("x-amz-fwd-header-x-amz-tagging-count", Schema.Number), + ), + VersionId: Schema.optional(Header("x-amz-fwd-header-x-amz-version-id")), + BucketKeyEnabled: Schema.optional( + Header( + "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled", + Schema.Boolean, + ), + ), + }), + Schema.Struct({}), + Schema.Union(Schema.Struct({})), + ), + FormatXMLRequest, + FormatXMLResponse, + FormatXMLResponse, +); diff --git a/src/protocols/rest-xml.ts b/src/protocols/rest-xml.ts index 67467320..8c7cfb94 100644 --- a/src/protocols/rest-xml.ts +++ b/src/protocols/rest-xml.ts @@ -86,6 +86,15 @@ export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { const baseUrl = `https://${metadata.sdkId.toLowerCase()}.${region}.amazonaws.com`; let unsignedUrl = `${baseUrl}${uri}`; + yield* Effect.logDebug( + `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - data:`, + { + unsignedUrl, + unsignedHeaders, + unsignedBody, + }, + ); + const creds = yield* credentials.getCredentials(); const signer = new AwsV4Signer({ method: endpointMetadata.method, @@ -143,6 +152,7 @@ export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { yield* Effect.logDebug( `AWS Request - ${metadata.sdkId}:${endpointMetadata.name} - response headers: ${JSON.stringify(response.headers)}`, ); + yield* Effect.logDebug("test", endpointMetadata); return yield* response.text; } else { const text = yield* response.text; @@ -187,8 +197,6 @@ export const restXmlProvider = Effect.fn(function* (metadata: ServiceMetadata) { ), }); } - - yield* Effect.void; }), } as { call: (metadata: any) => (input: any) => Effect.Effect; diff --git a/src/schema-helpers.ts b/src/schema-helpers.ts new file mode 100644 index 00000000..201b2316 --- /dev/null +++ b/src/schema-helpers.ts @@ -0,0 +1,64 @@ +import { Schema } from "effect"; + +export const requestHeaderSymbol = Symbol.for("itty-aws/request-header"); +export const requestBodySymbol = Symbol.for("itty-aws/request-body"); +export const requestBodyStreamSymbol = Symbol.for( + "itty-aws/request-body-stream", +); +export const requestPathSymbol = Symbol.for("itty-aws/request-path"); +export const requestMetaSymbol = Symbol.for("itty-aws/request-meta"); +export const requestError = Symbol.for("itty-aws/error"); + +export const Header = < + S extends Schema.Schema.AnyNoContext = typeof Schema.String, +>( + headerName: string, + schema: S = Schema.String, +) => schema.pipe(Schema.annotations({ [requestHeaderSymbol]: headerName })); +export const Body = ( + bodyName: string, + schema: S, +) => schema.pipe(Schema.annotations({ [requestBodySymbol]: bodyName })); +export const StreamBody = () => + Schema.Union( + Schema.String, + Schema.instanceOf(Uint8Array), + Schema.instanceOf(ReadableStream), + ).pipe(Schema.annotations({ [requestBodyStreamSymbol]: true })); +export const Path = ( + pathName: string, + schema: S, +) => schema.pipe(Schema.annotations({ [requestPathSymbol]: pathName })); +export const Error = ( + errorName: string, + schema: Schema.Struct, +) => + Schema.Struct({ + ...schema.fields, + _tag: Schema.Literal(errorName), + }).pipe(Schema.annotations({ [requestError]: errorName })); + +export type OperationMeta = { + uri: string; + method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS"; + sdkId: string; + sigV4ServiceName: string; + name: string; +}; + +export const Operation = < + Input extends Schema.Schema.AnyNoContext, + Output extends Schema.Schema.AnyNoContext, + //todo(pear): this should extend schema so we ensure errors are tagged + Error extends Schema.Schema.AnyNoContext, +>( + meta: OperationMeta, + inputSchema: Input, + outputSchema: Output, + errorSchema: Error, +) => + Schema.Struct({ + input: inputSchema, + output: outputSchema, + error: errorSchema, + }).pipe(Schema.annotations({ [requestMetaSymbol]: meta })); diff --git a/src/service-metadata.ts b/src/service-metadata.ts deleted file mode 100644 index 1b948fec..00000000 --- a/src/service-metadata.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Schema as S } from "effect"; - -export const ServiceMetadata = S.Struct({ - sdkId: S.String, - version: S.String, - protocol: S.String, - sigV4ServiceName: S.String, -}); - -export type ServiceMetadata = typeof ServiceMetadata.Type; diff --git a/todo.md b/todo.md index af14ea8f..a2abab8d 100644 --- a/todo.md +++ b/todo.md @@ -10,3 +10,5 @@ at (D:\code\OSS\alchemy\itty-aws-2\src\client.ts:25:28) at (D:\code\OSS\alchemy\itty-aws-2\src\client.ts:25:41) ``` +- make everything into thunks +- memory impact From 077bf5ba48adeebccaf4d20a03f0c63ed09961fd Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Tue, 16 Dec 2025 14:29:18 -0500 Subject: [PATCH 6/8] typed errors --- playground-itty.ts | 7 ++++--- src/aws-errors.ts | 18 ++++++++++++++++++ src/client.ts | 25 +++++++++++++++++++------ src/schema-helpers.ts | 10 ++++++---- 4 files changed, 47 insertions(+), 13 deletions(-) diff --git a/playground-itty.ts b/playground-itty.ts index 1c1d877e..456895a8 100644 --- a/playground-itty.ts +++ b/playground-itty.ts @@ -54,9 +54,9 @@ const input = () => }), ), Error( - "NoSuchBucket", + "Test", Schema.Struct({ - Code: Body("Error.Code", Schema.Literal("NoSuchBucket")), + Code: Body("Error.Code", Schema.Literal("Test")), Message: Body("Error.Message", Schema.String), BucketName: Body("Error.BucketName", Schema.String), }), @@ -76,7 +76,8 @@ const program = Effect.gen(function* () { NoopResponse, FormatXMLResponse, ); - const result = yield* PutObject({ + //todo(pear): make the errors more readable (probably just export from somewhere, idk) + const result = PutObject({ Bucket: "alchemy-7uzxjcr-test", Key: "test-2.txt", Body: "this is some text2", diff --git a/src/aws-errors.ts b/src/aws-errors.ts index 318d5ad4..bf9f031b 100644 --- a/src/aws-errors.ts +++ b/src/aws-errors.ts @@ -178,3 +178,21 @@ export function createDynamicTaggedError( //@ts-expect-error ).pipe(withCategory(...categories)))(errorData); } + +export type DynamicError< + Err extends S.Schema.Any & { fields: { _tag: S.Schema.Any } }, +> = S.TaggedErrorClass< + never, + S.Schema.Type, + Err["fields"] +>; + +export type DynamicErrorUnion> = + U extends S.Union + ? Members[number] extends infer E + ? E extends { fields: { _tag: S.Schema.Any } } + ? //@ts-expect-error shhhh be quiet typescript + DynamicError + : never + : never + : never; diff --git a/src/client.ts b/src/client.ts index 5a887b32..e780108c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,4 +1,3 @@ -// ============ NEW import { Schema, SchemaAST as AST, @@ -23,7 +22,11 @@ import { } from "./schema-helpers"; import { HttpBody, HttpClient } from "@effect/platform"; import type { HttpClientError } from "@effect/platform/HttpClientError"; -import { createDynamicTaggedError } from "./aws-errors"; +import { + createDynamicTaggedError, + type DynamicError, + type DynamicErrorUnion, +} from "./aws-errors"; const builder = new XMLBuilder(); const parser = new XMLParser(); @@ -143,7 +146,9 @@ export const makeFormatRequestSchema = ( operationSchema: Schema.Struct<{ input: A; output: Schema.Schema.AnyNoContext; - error: Schema.Schema.AnyNoContext; + error: Schema.Union< + Array + >; }>, MiddlewareSchema: Schema.Schema< Schema.Schema.Type, @@ -238,7 +243,9 @@ export const makeFormatResponseSchema = ( operationSchema: Schema.Struct<{ output: A; input: Schema.Schema.AnyNoContext; - error: Schema.Schema.AnyNoContext; + error: Schema.Union< + Array + >; }>, MiddlewareSchema: Schema.Schema< Schema.Schema.Type, @@ -301,7 +308,11 @@ const getNested = (obj: object, path: string) => //@ts-expect-error path.split(".").reduce((acc, key) => acc?.[key], obj); -export const makeFormatErrorSchema = ( +export const makeFormatErrorSchema = < + A extends Schema.Union< + Array + >, +>( operationSchema: Schema.Struct<{ output: Schema.Schema.AnyNoContext; input: Schema.Schema.AnyNoContext; @@ -396,7 +407,9 @@ export const makeOperation = >( payload: Schema.Schema.Type, ) => Effect.Effect< Schema.Schema.Type, - Error | ParseResult.ParseError | HttpClientError, + | DynamicErrorUnion + | ParseResult.ParseError + | HttpClientError, Region | Credentials | HttpClient.HttpClient >) => { const FormatRequest = makeFormatRequestSchema( diff --git a/src/schema-helpers.ts b/src/schema-helpers.ts index 201b2316..3937fc21 100644 --- a/src/schema-helpers.ts +++ b/src/schema-helpers.ts @@ -13,7 +13,7 @@ export const Header = < S extends Schema.Schema.AnyNoContext = typeof Schema.String, >( headerName: string, - schema: S = Schema.String, + schema: S, ) => schema.pipe(Schema.annotations({ [requestHeaderSymbol]: headerName })); export const Body = ( bodyName: string, @@ -29,8 +29,8 @@ export const Path = ( pathName: string, schema: S, ) => schema.pipe(Schema.annotations({ [requestPathSymbol]: pathName })); -export const Error = ( - errorName: string, +export const Error = ( + errorName: Tag, schema: Schema.Struct, ) => Schema.Struct({ @@ -50,7 +50,9 @@ export const Operation = < Input extends Schema.Schema.AnyNoContext, Output extends Schema.Schema.AnyNoContext, //todo(pear): this should extend schema so we ensure errors are tagged - Error extends Schema.Schema.AnyNoContext, + Error extends Schema.Union< + readonly (Schema.Schema.Any & { fields: { _tag: Schema.Schema.Any } })[] + >, >( meta: OperationMeta, inputSchema: Input, From 3f9d25fbd12c8563bfacc96205b10c1d5fe9cad5 Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Wed, 17 Dec 2025 07:54:08 -0500 Subject: [PATCH 7/8] error gen --- playground-itty.ts | 37 +++--- rsbuild.config.ts | 4 +- scripts/generate-clients.ts | 21 +++- src/aws-errors.ts | 7 +- src/client.ts | 33 +++--- src/clients.gen/s3.ts | 225 +++++++++++++++++++----------------- src/schema-helpers.ts | 23 ++-- 7 files changed, 200 insertions(+), 150 deletions(-) diff --git a/playground-itty.ts b/playground-itty.ts index 456895a8..c50393d6 100644 --- a/playground-itty.ts +++ b/playground-itty.ts @@ -43,25 +43,26 @@ const input = () => Schema.Struct({ ETag: Header("etag", Schema.String), }), + Schema.Void, //todo(pear): make empty struct the default - Schema.Union( - Error( - "NoSuchBucket", - Schema.Struct({ - Code: Body("Error.Code", Schema.Literal("NoSuchBucket")), - Message: Body("Error.Message", Schema.String), - BucketName: Body("Error.BucketName", Schema.String), - }), - ), - Error( - "Test", - Schema.Struct({ - Code: Body("Error.Code", Schema.Literal("Test")), - Message: Body("Error.Message", Schema.String), - BucketName: Body("Error.BucketName", Schema.String), - }), - ), - ), + // Schema.Union( + // Error( + // "NoSuchBucket", + // Schema.Struct({ + // Code: Body("Error.Code", Schema.Literal("NoSuchBucket")), + // Message: Body("Error.Message", Schema.String), + // BucketName: Body("Error.BucketName", Schema.String), + // }), + // ), + // Error( + // "Test", + // Schema.Struct({ + // Code: Body("Error.Code", Schema.Literal("Test")), + // Message: Body("Error.Message", Schema.String), + // BucketName: Body("Error.BucketName", Schema.String), + // }), + // ), + // ), ); import { BunContext, BunRuntime } from "@effect/platform-bun"; diff --git a/rsbuild.config.ts b/rsbuild.config.ts index e5b2185d..5c66555c 100644 --- a/rsbuild.config.ts +++ b/rsbuild.config.ts @@ -22,8 +22,8 @@ export default defineConfig({ js: true, jsOptions: { minimizerOptions: { - // minify: false, - // mangle: false, + minify: false, + mangle: false, }, }, }, diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts index 1a2fdca8..3adf9fd0 100644 --- a/scripts/generate-clients.ts +++ b/scripts/generate-clients.ts @@ -141,6 +141,7 @@ const convertShapeToSchema: ( ({ traits }) => `Schema.Literal("${traits["smithy.api#enumValue"]}")`, ), + //todo(pear): figure our a more typesafe way of doing this // ).pipe(Effect.map((members) => `Schema.Union(${members.join(", ")})`)), ).pipe(Effect.map((members) => `Schema.String`)), ), @@ -281,9 +282,25 @@ const generateClient = Effect.fn(function* ( Effect.flatMap(convertShapeToSchema), ); - //todo(pear): errors + const errors = + operationShape.errors == null || operationShape.errors.length === 0 + ? "Schema.Void" + : yield* Effect.forEach( + operationShape.errors, + ({ target: errorShapeReference }) => + findShape(errorShapeReference).pipe( + Effect.flatMap(convertShapeToSchema), + Effect.map( + (s) => + `Error("${formatName(errorShapeReference)}", ${s})`, + ), + ), + ).pipe( + Effect.map((schemas) => `Schema.Union(${schemas.join(", ")})`), + ); + //todo(pear): correct middleware (stream bodies should be noop?) - return `export const ${formatName(_id)} = /*#__PURE__*/ makeOperation(() => Operation({ uri: "${operationShape["traits"]["smithy.api#http"]["uri"]}", method: "${operationShape["traits"]["smithy.api#http"]["method"]}", sdkId: "${serviceShape.traits["aws.api#service"].sdkId}", sigV4ServiceName: "${serviceShape.traits["aws.auth#sigv4"].name}", name: "${formatName(_id)}" }, ${input}, ${output}, Schema.Union(Schema.Struct({}))), FormatXMLRequest, FormatXMLResponse, FormatXMLResponse);`; + return `export const ${formatName(_id)} = /*#__PURE__*/ makeOperation(() => Operation({ uri: "${operationShape["traits"]["smithy.api#http"]["uri"]}", method: "${operationShape["traits"]["smithy.api#http"]["method"]}", sdkId: "${serviceShape.traits["aws.api#service"].sdkId}", sigV4ServiceName: "${serviceShape.traits["aws.auth#sigv4"].name}", name: "${formatName(_id)}" }, ${input}, ${output}, ${errors}), FormatXMLRequest, FormatXMLResponse, FormatXMLResponse);`; }), ); diff --git a/src/aws-errors.ts b/src/aws-errors.ts index bf9f031b..2b49b231 100644 --- a/src/aws-errors.ts +++ b/src/aws-errors.ts @@ -187,8 +187,11 @@ export type DynamicError< Err["fields"] >; -export type DynamicErrorUnion> = - U extends S.Union +export type DynamicErrorUnion< + U extends S.Union | typeof S.Void, +> = U extends typeof S.Void + ? typeof S.Void + : U extends S.Union ? Members[number] extends infer E ? E extends { fields: { _tag: S.Schema.Any } } ? //@ts-expect-error shhhh be quiet typescript diff --git a/src/client.ts b/src/client.ts index e780108c..11d11652 100644 --- a/src/client.ts +++ b/src/client.ts @@ -22,11 +22,7 @@ import { } from "./schema-helpers"; import { HttpBody, HttpClient } from "@effect/platform"; import type { HttpClientError } from "@effect/platform/HttpClientError"; -import { - createDynamicTaggedError, - type DynamicError, - type DynamicErrorUnion, -} from "./aws-errors"; +import { createDynamicTaggedError, type DynamicErrorUnion } from "./aws-errors"; const builder = new XMLBuilder(); const parser = new XMLParser(); @@ -146,9 +142,11 @@ export const makeFormatRequestSchema = ( operationSchema: Schema.Struct<{ input: A; output: Schema.Schema.AnyNoContext; - error: Schema.Union< - Array - >; + error: + | Schema.Union< + Array + > + | typeof Schema.Void; }>, MiddlewareSchema: Schema.Schema< Schema.Schema.Type, @@ -243,9 +241,11 @@ export const makeFormatResponseSchema = ( operationSchema: Schema.Struct<{ output: A; input: Schema.Schema.AnyNoContext; - error: Schema.Union< - Array - >; + error: + | Schema.Union< + Array + > + | typeof Schema.Void; }>, MiddlewareSchema: Schema.Schema< Schema.Schema.Type, @@ -309,9 +309,11 @@ const getNested = (obj: object, path: string) => path.split(".").reduce((acc, key) => acc?.[key], obj); export const makeFormatErrorSchema = < - A extends Schema.Union< - Array - >, + A extends + | Schema.Union< + Array + > + | typeof Schema.Void, >( operationSchema: Schema.Struct<{ output: Schema.Schema.AnyNoContext; @@ -387,7 +389,7 @@ export const makeFormatErrorSchema = < }; export const makeOperation = >( - operationSchema: A, + operationSchemaGenerator: () => A, RequestMiddleware: Schema.Schema< Schema.Schema.Type, Schema.Schema.Type, @@ -412,6 +414,7 @@ export const makeOperation = >( | HttpClientError, Region | Credentials | HttpClient.HttpClient >) => { + const operationSchema = operationSchemaGenerator(); const FormatRequest = makeFormatRequestSchema( operationSchema, RequestMiddleware, diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts index 8844d4fb..f21706bc 100644 --- a/src/clients.gen/s3.ts +++ b/src/clients.gen/s3.ts @@ -40,7 +40,7 @@ export const AbortMultipartUpload = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchUpload", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -132,7 +132,7 @@ export const CompleteMultipartUpload = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -280,7 +280,7 @@ export const CopyObject = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("ObjectNotInActiveTierError", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -338,7 +338,10 @@ export const CreateBucket = /*#__PURE__*/ makeOperation( Location: Schema.optional(Header("Location")), BucketArn: Schema.optional(Header("x-amz-bucket-arn")), }), - Schema.Union(Schema.Struct({})), + Schema.Union( + Error("BucketAlreadyExists", Schema.Struct({})), + Error("BucketAlreadyOwnedByYou", Schema.Struct({})), + ), ), FormatXMLRequest, FormatXMLResponse, @@ -393,7 +396,7 @@ export const CreateBucketMetadataConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -430,7 +433,7 @@ export const CreateBucketMetadataTableConfiguration = ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -537,7 +540,7 @@ export const CreateMultipartUpload = /*#__PURE__*/ makeOperation( ChecksumAlgorithm: Schema.optional(Header("x-amz-checksum-algorithm")), ChecksumType: Schema.optional(Header("x-amz-checksum-type")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -595,7 +598,7 @@ export const CreateSession = /*#__PURE__*/ makeOperation( Expiration: Schema.Date, }), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchBucket", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -618,7 +621,7 @@ export const DeleteBucket = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -642,7 +645,7 @@ export const DeleteBucketAnalyticsConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -665,7 +668,7 @@ export const DeleteBucketCors = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -688,7 +691,7 @@ export const DeleteBucketEncryption = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -713,7 +716,7 @@ export const DeleteBucketIntelligentTieringConfiguration = ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -737,7 +740,7 @@ export const DeleteBucketInventoryConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -760,7 +763,7 @@ export const DeleteBucketLifecycle = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -783,7 +786,7 @@ export const DeleteBucketMetadataConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -807,7 +810,7 @@ export const DeleteBucketMetadataTableConfiguration = ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -831,7 +834,7 @@ export const DeleteBucketMetricsConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -854,7 +857,7 @@ export const DeleteBucketOwnershipControls = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -877,7 +880,7 @@ export const DeleteBucketPolicy = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -900,7 +903,7 @@ export const DeleteBucketReplication = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -923,7 +926,7 @@ export const DeleteBucketTagging = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -946,7 +949,7 @@ export const DeleteBucketWebsite = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -989,7 +992,7 @@ export const DeleteObject = /*#__PURE__*/ makeOperation( VersionId: Schema.optional(Header("x-amz-version-id")), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1057,7 +1060,7 @@ export const DeleteObjects = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1082,7 +1085,7 @@ export const DeleteObjectTagging = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({ VersionId: Schema.optional(Header("x-amz-version-id")) }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1105,7 +1108,7 @@ export const DeletePublicAccessBlock = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1132,7 +1135,7 @@ export const GetBucketAccelerateConfiguration = /*#__PURE__*/ makeOperation( Status: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1178,7 +1181,7 @@ export const GetBucketAcl = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1243,7 +1246,7 @@ export const GetBucketAnalyticsConfiguration = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1279,7 +1282,7 @@ export const GetBucketCors = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1321,7 +1324,7 @@ export const GetBucketEncryption = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1386,7 +1389,7 @@ export const GetBucketIntelligentTieringConfiguration = ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1440,7 +1443,7 @@ export const GetBucketInventoryConfiguration = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1537,7 +1540,7 @@ export const GetBucketLifecycleConfiguration = /*#__PURE__*/ makeOperation( Header("x-amz-transition-default-minimum-object-size"), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1560,7 +1563,7 @@ export const GetBucketLocation = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({ LocationConstraint: Schema.optional(Schema.String) }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1616,7 +1619,7 @@ export const GetBucketLogging = /*#__PURE__*/ makeOperation( }), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1685,7 +1688,7 @@ export const GetBucketMetadataConfiguration = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1731,7 +1734,7 @@ export const GetBucketMetadataTableConfiguration = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1783,7 +1786,7 @@ export const GetBucketMetricsConfiguration = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1883,7 +1886,7 @@ export const GetBucketNotificationConfiguration = /*#__PURE__*/ makeOperation( ), EventBridgeConfiguration: Schema.optional(Schema.Struct({})), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1917,7 +1920,7 @@ export const GetBucketOwnershipControls = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1942,7 +1945,7 @@ export const GetBucketPolicy = /*#__PURE__*/ makeOperation( Schema.Struct({ Policy: Schema.optional(Body("undefined", Schema.String)), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -1972,7 +1975,7 @@ export const GetBucketPolicyStatus = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2083,7 +2086,7 @@ export const GetBucketReplication = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2106,7 +2109,7 @@ export const GetBucketRequestPayment = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({ Payer: Schema.optional(Schema.String) }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2133,7 +2136,7 @@ export const GetBucketTagging = /*#__PURE__*/ makeOperation( Schema.Struct({ Key: Schema.String, Value: Schema.String }), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2159,7 +2162,7 @@ export const GetBucketVersioning = /*#__PURE__*/ makeOperation( Status: Schema.optional(Schema.String), MFADelete: Schema.optional(Schema.String), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2212,7 +2215,7 @@ export const GetBucketWebsite = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2330,7 +2333,16 @@ export const GetObject = /*#__PURE__*/ makeOperation( Header("x-amz-object-lock-legal-hold"), ), }), - Schema.Union(Schema.Struct({})), + Schema.Union( + Error( + "InvalidObjectState", + Schema.Struct({ + StorageClass: Schema.optional(Schema.String), + AccessTier: Schema.optional(Schema.String), + }), + ), + Error("NoSuchKey", Schema.Struct({})), + ), ), FormatXMLRequest, FormatXMLResponse, @@ -2380,7 +2392,7 @@ export const GetObjectAcl = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchKey", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -2463,7 +2475,7 @@ export const GetObjectAttributes = /*#__PURE__*/ makeOperation( StorageClass: Schema.optional(Schema.String), ObjectSize: Schema.optional(Schema.Number), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchKey", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -2496,7 +2508,7 @@ export const GetObjectLegalHold = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2539,7 +2551,7 @@ export const GetObjectLockConfiguration = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2575,7 +2587,7 @@ export const GetObjectRetention = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2606,7 +2618,7 @@ export const GetObjectTagging = /*#__PURE__*/ makeOperation( Schema.Struct({ Key: Schema.String, Value: Schema.String }), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2634,7 +2646,7 @@ export const GetObjectTorrent = /*#__PURE__*/ makeOperation( Body: Schema.optional(Body("undefined", StreamBody())), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2669,7 +2681,7 @@ export const GetPublicAccessBlock = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2704,7 +2716,7 @@ export const HeadBucket = /*#__PURE__*/ makeOperation( Header("x-amz-access-point-alias", Schema.Boolean), ), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NotFound", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -2822,7 +2834,7 @@ export const HeadObject = /*#__PURE__*/ makeOperation( Header("x-amz-object-lock-legal-hold"), ), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NotFound", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -2889,7 +2901,7 @@ export const ListBucketAnalyticsConfigurations = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -2956,7 +2968,7 @@ export const ListBucketIntelligentTieringConfigurations = ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3012,7 +3024,7 @@ export const ListBucketInventoryConfigurations = /*#__PURE__*/ makeOperation( IsTruncated: Schema.optional(Schema.Boolean), NextContinuationToken: Schema.optional(Schema.String), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3066,7 +3078,7 @@ export const ListBucketMetricsConfigurations = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3108,7 +3120,7 @@ export const ListBuckets = /*#__PURE__*/ makeOperation( ContinuationToken: Schema.optional(Schema.String), Prefix: Schema.optional(Schema.String), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3141,7 +3153,7 @@ export const ListDirectoryBuckets = /*#__PURE__*/ makeOperation( ), ContinuationToken: Schema.optional(Schema.String), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3212,7 +3224,7 @@ export const ListMultipartUploads = /*#__PURE__*/ makeOperation( EncodingType: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3287,7 +3299,7 @@ export const ListObjects = /*#__PURE__*/ makeOperation( EncodingType: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchBucket", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -3366,7 +3378,7 @@ export const ListObjectsV2 = /*#__PURE__*/ makeOperation( StartAfter: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchBucket", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -3462,7 +3474,7 @@ export const ListObjectVersions = /*#__PURE__*/ makeOperation( EncodingType: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3540,7 +3552,7 @@ export const ListParts = /*#__PURE__*/ makeOperation( ChecksumAlgorithm: Schema.optional(Schema.String), ChecksumType: Schema.optional(Schema.String), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3570,7 +3582,7 @@ export const PutBucketAccelerateConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3632,7 +3644,7 @@ export const PutBucketAcl = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3694,7 +3706,7 @@ export const PutBucketAnalyticsConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3736,7 +3748,7 @@ export const PutBucketCors = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3779,7 +3791,7 @@ export const PutBucketEncryption = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3838,7 +3850,7 @@ export const PutBucketIntelligentTieringConfiguration = ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -3889,7 +3901,7 @@ export const PutBucketInventoryConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4002,7 +4014,7 @@ export const PutBucketLifecycleConfiguration = /*#__PURE__*/ makeOperation( Header("x-amz-transition-default-minimum-object-size"), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4066,7 +4078,7 @@ export const PutBucketLogging = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4115,7 +4127,7 @@ export const PutBucketMetricsConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4222,7 +4234,7 @@ export const PutBucketNotificationConfiguration = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4257,7 +4269,7 @@ export const PutBucketOwnershipControls = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4288,7 +4300,7 @@ export const PutBucketPolicy = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4401,7 +4413,7 @@ export const PutBucketReplication = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4432,7 +4444,7 @@ export const PutBucketRequestPayment = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4467,7 +4479,7 @@ export const PutBucketTagging = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4502,7 +4514,7 @@ export const PutBucketVersioning = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4567,7 +4579,7 @@ export const PutBucketWebsite = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4691,7 +4703,12 @@ export const PutObject = /*#__PURE__*/ makeOperation( Size: Schema.optional(Header("x-amz-object-size", Schema.Number)), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union( + Error("EncryptionTypeMismatch", Schema.Struct({})), + Error("InvalidRequest", Schema.Struct({})), + Error("InvalidWriteOffset", Schema.Struct({})), + Error("TooManyParts", Schema.Struct({})), + ), ), FormatXMLRequest, FormatXMLResponse, @@ -4758,7 +4775,7 @@ export const PutObjectAcl = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("NoSuchKey", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -4796,7 +4813,7 @@ export const PutObjectLegalHold = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4846,7 +4863,7 @@ export const PutObjectLockConfiguration = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4890,7 +4907,7 @@ export const PutObjectRetention = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4928,7 +4945,7 @@ export const PutObjectTagging = /*#__PURE__*/ makeOperation( RequestPayer: Schema.optional(Header("x-amz-request-payer")), }), Schema.Struct({ VersionId: Schema.optional(Header("x-amz-version-id")) }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -4964,7 +4981,7 @@ export const PutPublicAccessBlock = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -5005,7 +5022,7 @@ export const RenameObject = /*#__PURE__*/ makeOperation( ClientToken: Schema.optional(Header("x-amz-client-token")), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("IdempotencyParameterMismatch", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -5146,7 +5163,7 @@ export const RestoreObject = /*#__PURE__*/ makeOperation( RequestCharged: Schema.optional(Header("x-amz-request-charged")), RestoreOutputPath: Schema.optional(Header("x-amz-restore-output-path")), }), - Schema.Union(Schema.Struct({})), + Schema.Union(Error("ObjectAlreadyInActiveTierError", Schema.Struct({}))), ), FormatXMLRequest, FormatXMLResponse, @@ -5251,7 +5268,7 @@ export const SelectObjectContent = /*#__PURE__*/ makeOperation( ), ), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -5291,7 +5308,7 @@ export const UpdateBucketMetadataInventoryTableConfiguration = ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -5328,7 +5345,7 @@ export const UpdateBucketMetadataJournalTableConfiguration = ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -5401,7 +5418,7 @@ export const UploadPart = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -5500,7 +5517,7 @@ export const UploadPartCopy = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, @@ -5624,7 +5641,7 @@ export const WriteGetObjectResponse = /*#__PURE__*/ makeOperation( ), }), Schema.Struct({}), - Schema.Union(Schema.Struct({})), + Schema.Void, ), FormatXMLRequest, FormatXMLResponse, diff --git a/src/schema-helpers.ts b/src/schema-helpers.ts index 3937fc21..b7a4b822 100644 --- a/src/schema-helpers.ts +++ b/src/schema-helpers.ts @@ -9,12 +9,19 @@ export const requestPathSymbol = Symbol.for("itty-aws/request-path"); export const requestMetaSymbol = Symbol.for("itty-aws/request-meta"); export const requestError = Symbol.for("itty-aws/error"); -export const Header = < - S extends Schema.Schema.AnyNoContext = typeof Schema.String, ->( +export function Header( + headerName: string, +): ReturnType<(typeof Schema.String)["annotations"]>; +export function Header( headerName: string, schema: S, -) => schema.pipe(Schema.annotations({ [requestHeaderSymbol]: headerName })); +): ReturnType; +export function Header( + headerName: string, + schema: Schema.Schema.AnyNoContext = Schema.String, +) { + return schema.pipe(Schema.annotations({ [requestHeaderSymbol]: headerName })); +} export const Body = ( bodyName: string, schema: S, @@ -50,9 +57,11 @@ export const Operation = < Input extends Schema.Schema.AnyNoContext, Output extends Schema.Schema.AnyNoContext, //todo(pear): this should extend schema so we ensure errors are tagged - Error extends Schema.Union< - readonly (Schema.Schema.Any & { fields: { _tag: Schema.Schema.Any } })[] - >, + Error extends + | Schema.Union< + readonly (Schema.Schema.Any & { fields: { _tag: Schema.Schema.Any } })[] + > + | typeof Schema.Void, >( meta: OperationMeta, inputSchema: Input, From 9148f7bf593c9568f5bcc5f41f95c56a6d031882 Mon Sep 17 00:00:00 2001 From: Michael K <35264484+Mkassabov@users.noreply.github.com> Date: Wed, 17 Dec 2025 08:00:41 -0500 Subject: [PATCH 8/8] cleanup --- playground-itty.ts | 2 +- scripts/generate-clients.ts | 6 +++++- src/aws-errors.ts | 21 ++++++++++++--------- src/client.ts | 19 ++++--------------- src/clients.gen/s3.ts | 24 ++++++++++++------------ src/schema-helpers.ts | 8 +++++--- 6 files changed, 39 insertions(+), 41 deletions(-) diff --git a/playground-itty.ts b/playground-itty.ts index c50393d6..d70dbb24 100644 --- a/playground-itty.ts +++ b/playground-itty.ts @@ -43,7 +43,7 @@ const input = () => Schema.Struct({ ETag: Header("etag", Schema.String), }), - Schema.Void, + Error("NoSuchKey", Schema.Struct({})), //todo(pear): make empty struct the default // Schema.Union( // Error( diff --git a/scripts/generate-clients.ts b/scripts/generate-clients.ts index 3adf9fd0..63f51a59 100644 --- a/scripts/generate-clients.ts +++ b/scripts/generate-clients.ts @@ -296,7 +296,11 @@ const generateClient = Effect.fn(function* ( ), ), ).pipe( - Effect.map((schemas) => `Schema.Union(${schemas.join(", ")})`), + Effect.map((schemas) => + schemas.length === 1 + ? schemas[0] + : `Schema.Union(${schemas.join(", ")})`, + ), ); //todo(pear): correct middleware (stream bodies should be noop?) diff --git a/src/aws-errors.ts b/src/aws-errors.ts index 2b49b231..1295acc2 100644 --- a/src/aws-errors.ts +++ b/src/aws-errors.ts @@ -1,5 +1,6 @@ import * as S from "effect/Schema"; import { withCategory, ERROR_CATEGORIES } from "./errors"; +import type { ErrorSchema } from "./schema-helpers"; export type CommonAwsError = | AccessDeniedException @@ -188,14 +189,16 @@ export type DynamicError< >; export type DynamicErrorUnion< - U extends S.Union | typeof S.Void, -> = U extends typeof S.Void + ErrorInput extends S.Union> | ErrorSchema | typeof S.Void, +> = ErrorInput extends typeof S.Void ? typeof S.Void - : U extends S.Union - ? Members[number] extends infer E - ? E extends { fields: { _tag: S.Schema.Any } } - ? //@ts-expect-error shhhh be quiet typescript - DynamicError + : ErrorInput extends ErrorSchema + ? DynamicError + : ErrorInput extends S.Union + ? Errors[number] extends infer Error + ? Error extends { fields: { _tag: S.Schema.Any } } + ? //@ts-expect-error shhhh be quiet typescript + DynamicError + : never : never - : never - : never; + : never; diff --git a/src/client.ts b/src/client.ts index 11d11652..84198fd9 100644 --- a/src/client.ts +++ b/src/client.ts @@ -18,6 +18,7 @@ import { requestHeaderSymbol, requestMetaSymbol, requestPathSymbol, + type ErrorSchema, type OperationMeta, } from "./schema-helpers"; import { HttpBody, HttpClient } from "@effect/platform"; @@ -142,11 +143,7 @@ export const makeFormatRequestSchema = ( operationSchema: Schema.Struct<{ input: A; output: Schema.Schema.AnyNoContext; - error: - | Schema.Union< - Array - > - | typeof Schema.Void; + error: Schema.Union> | ErrorSchema | typeof Schema.Void; }>, MiddlewareSchema: Schema.Schema< Schema.Schema.Type, @@ -241,11 +238,7 @@ export const makeFormatResponseSchema = ( operationSchema: Schema.Struct<{ output: A; input: Schema.Schema.AnyNoContext; - error: - | Schema.Union< - Array - > - | typeof Schema.Void; + error: Schema.Union> | ErrorSchema | typeof Schema.Void; }>, MiddlewareSchema: Schema.Schema< Schema.Schema.Type, @@ -309,11 +302,7 @@ const getNested = (obj: object, path: string) => path.split(".").reduce((acc, key) => acc?.[key], obj); export const makeFormatErrorSchema = < - A extends - | Schema.Union< - Array - > - | typeof Schema.Void, + A extends Schema.Union> | ErrorSchema | typeof Schema.Void, >( operationSchema: Schema.Struct<{ output: Schema.Schema.AnyNoContext; diff --git a/src/clients.gen/s3.ts b/src/clients.gen/s3.ts index f21706bc..86abf3fd 100644 --- a/src/clients.gen/s3.ts +++ b/src/clients.gen/s3.ts @@ -40,7 +40,7 @@ export const AbortMultipartUpload = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Error("NoSuchUpload", Schema.Struct({}))), + Error("NoSuchUpload", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -280,7 +280,7 @@ export const CopyObject = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Error("ObjectNotInActiveTierError", Schema.Struct({}))), + Error("ObjectNotInActiveTierError", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -598,7 +598,7 @@ export const CreateSession = /*#__PURE__*/ makeOperation( Expiration: Schema.Date, }), }), - Schema.Union(Error("NoSuchBucket", Schema.Struct({}))), + Error("NoSuchBucket", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -2392,7 +2392,7 @@ export const GetObjectAcl = /*#__PURE__*/ makeOperation( ), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Error("NoSuchKey", Schema.Struct({}))), + Error("NoSuchKey", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -2475,7 +2475,7 @@ export const GetObjectAttributes = /*#__PURE__*/ makeOperation( StorageClass: Schema.optional(Schema.String), ObjectSize: Schema.optional(Schema.Number), }), - Schema.Union(Error("NoSuchKey", Schema.Struct({}))), + Error("NoSuchKey", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -2716,7 +2716,7 @@ export const HeadBucket = /*#__PURE__*/ makeOperation( Header("x-amz-access-point-alias", Schema.Boolean), ), }), - Schema.Union(Error("NotFound", Schema.Struct({}))), + Error("NotFound", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -2834,7 +2834,7 @@ export const HeadObject = /*#__PURE__*/ makeOperation( Header("x-amz-object-lock-legal-hold"), ), }), - Schema.Union(Error("NotFound", Schema.Struct({}))), + Error("NotFound", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -3299,7 +3299,7 @@ export const ListObjects = /*#__PURE__*/ makeOperation( EncodingType: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Error("NoSuchBucket", Schema.Struct({}))), + Error("NoSuchBucket", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -3378,7 +3378,7 @@ export const ListObjectsV2 = /*#__PURE__*/ makeOperation( StartAfter: Schema.optional(Schema.String), RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Error("NoSuchBucket", Schema.Struct({}))), + Error("NoSuchBucket", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -4775,7 +4775,7 @@ export const PutObjectAcl = /*#__PURE__*/ makeOperation( Schema.Struct({ RequestCharged: Schema.optional(Header("x-amz-request-charged")), }), - Schema.Union(Error("NoSuchKey", Schema.Struct({}))), + Error("NoSuchKey", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -5022,7 +5022,7 @@ export const RenameObject = /*#__PURE__*/ makeOperation( ClientToken: Schema.optional(Header("x-amz-client-token")), }), Schema.Struct({}), - Schema.Union(Error("IdempotencyParameterMismatch", Schema.Struct({}))), + Error("IdempotencyParameterMismatch", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, @@ -5163,7 +5163,7 @@ export const RestoreObject = /*#__PURE__*/ makeOperation( RequestCharged: Schema.optional(Header("x-amz-request-charged")), RestoreOutputPath: Schema.optional(Header("x-amz-restore-output-path")), }), - Schema.Union(Error("ObjectAlreadyInActiveTierError", Schema.Struct({}))), + Error("ObjectAlreadyInActiveTierError", Schema.Struct({})), ), FormatXMLRequest, FormatXMLResponse, diff --git a/src/schema-helpers.ts b/src/schema-helpers.ts index b7a4b822..ba054871 100644 --- a/src/schema-helpers.ts +++ b/src/schema-helpers.ts @@ -44,6 +44,9 @@ export const Error = ( ...schema.fields, _tag: Schema.Literal(errorName), }).pipe(Schema.annotations({ [requestError]: errorName })); +export type ErrorSchema = Schema.Schema.Any & { + fields: { _tag: Schema.Schema.Any }; +}; export type OperationMeta = { uri: string; @@ -58,9 +61,8 @@ export const Operation = < Output extends Schema.Schema.AnyNoContext, //todo(pear): this should extend schema so we ensure errors are tagged Error extends - | Schema.Union< - readonly (Schema.Schema.Any & { fields: { _tag: Schema.Schema.Any } })[] - > + | Schema.Union> + | ErrorSchema | typeof Schema.Void, >( meta: OperationMeta,