{"_id":"@dos-sdk/s3-request-presigner","_rev":"2-72c514d30a908e831639b826e5c929af","name":"@dos-sdk/s3-request-presigner","dist-tags":{"latest":"3.293.3"},"versions":{"3.293.0":{"name":"@dos-sdk/s3-request-presigner","version":"3.293.0","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"tsc -p tsconfig.cjs.json","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","test":"jest"},"main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-sdk/middleware-endpoint":"*","@aws-sdk/middleware-sdk-s3":"*","@aws-sdk/protocol-http":"*","@aws-sdk/signature-v4-multi-region":"*","@aws-sdk/smithy-client":"*","@aws-sdk/types":"*","@aws-sdk/util-create-request":"*","@aws-sdk/util-format-url":"*","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/client-s3":"*","@aws-sdk/hash-node":"*","@tsconfig/recommended":"1.0.1","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.23.23","typescript":"~4.6.2"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/s3-request-presigner","repository":{"type":"git","url":"git+https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/s3-request-presigner"},"typedoc":{"entryPoint":"src/index.ts"},"gitHead":"d5ed8a4f41de908649f8d03301362e4ab62a81d2","description":"[![NPM version](https://img.shields.io/npm/v/@aws-sdk/s3-request-presigner/latest.svg)](https://www.npmjs.com/package/@aws-sdk/s3-request-presigner) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/s3-request-presigner.svg)](https://www.npmjs.com/","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"_id":"@dos-sdk/s3-request-presigner@3.293.0","_nodeVersion":"18.16.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-gpiKZM1rxIrVEIqW/vmq2elezIEAA/ECheClhg29+LHSNBhpbII6b4n5HvqyjQzw56b+rwGEOU6u4/TEcHroYg==","shasum":"36971e0a92f2aad6114d252f612d63df62f02970","tarball":"https://registry.npmjs.org/@dos-sdk/s3-request-presigner/-/s3-request-presigner-3.293.0.tgz","fileCount":15,"unpackedSize":28706,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF1XPnvMeNHELz5vHnAGq3bbXTC+Z6g9o3yDz/Cz3sUCAiBQ+o9RPc9Dbv0zxmWkf/w9uhubL3/qCO2LI5HVWrh/sA=="}]},"_npmUser":{"name":"ooninoo","email":"yanliang.mei@gmail.com"},"directories":{},"maintainers":[{"name":"ooninoo","email":"yanliang.mei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s3-request-presigner_3.293.0_1693192378176_0.9910705574739038"},"_hasShrinkwrap":false},"3.293.2":{"name":"@dos-sdk/s3-request-presigner","version":"3.293.2","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"tsc -p tsconfig.cjs.json","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","test":"jest"},"main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-sdk/middleware-endpoint":"*","@aws-sdk/middleware-sdk-s3":"*","@aws-sdk/protocol-http":"*","@aws-sdk/signature-v4-multi-region":"*","@aws-sdk/smithy-client":"*","@aws-sdk/types":"*","@aws-sdk/util-create-request":"*","@aws-sdk/util-format-url":"*","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/client-s3":"*","@aws-sdk/hash-node":"*","@tsconfig/recommended":"1.0.1","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.23.23","typescript":"~4.6.2"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/s3-request-presigner","repository":{"type":"git","url":"git+https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/s3-request-presigner"},"typedoc":{"entryPoint":"src/index.ts"},"gitHead":"d5ed8a4f41de908649f8d03301362e4ab62a81d2","description":"[![NPM version](https://img.shields.io/npm/v/@aws-sdk/s3-request-presigner/latest.svg)](https://www.npmjs.com/package/@aws-sdk/s3-request-presigner) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/s3-request-presigner.svg)](https://www.npmjs.com/","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"_id":"@dos-sdk/s3-request-presigner@3.293.2","_nodeVersion":"18.16.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-4fADaxq2JgKdbfhUps1mDVWJg8SnEX3Tr9yucfFyHehdRD+cVGIeab5qdY1g5jCEiN+o13fXmy900YRTMPjHZA==","shasum":"3148ee5c24794290893f738031125712b2e68609","tarball":"https://registry.npmjs.org/@dos-sdk/s3-request-presigner/-/s3-request-presigner-3.293.2.tgz","fileCount":15,"unpackedSize":31989,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBj/42Yg7YyEfW6E7qaAQ6rKPhqB6kZlewuTAHAP8kZ2AiBW9Mmt/KmZ2XvOXXIMsnn2SaKltR5scRLAOBFoF/NYTA=="}]},"_npmUser":{"name":"ooninoo","email":"yanliang.mei@gmail.com"},"directories":{},"maintainers":[{"name":"ooninoo","email":"yanliang.mei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s3-request-presigner_3.293.2_1694512945488_0.49094035743070785"},"_hasShrinkwrap":false},"3.293.3":{"name":"@dos-sdk/s3-request-presigner","version":"3.293.3","scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"tsc -p tsconfig.cjs.json","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","test":"jest"},"main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-sdk/middleware-endpoint":"*","@aws-sdk/middleware-sdk-s3":"*","@aws-sdk/protocol-http":"*","@aws-sdk/signature-v4-multi-region":"*","@aws-sdk/smithy-client":"*","@aws-sdk/types":"*","@aws-sdk/util-create-request":"*","@aws-sdk/util-format-url":"*","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/client-s3":"*","@aws-sdk/hash-node":"*","@tsconfig/recommended":"1.0.1","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typedoc":"0.23.23","typescript":"~4.6.2"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/s3-request-presigner","repository":{"type":"git","url":"git+https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/s3-request-presigner"},"typedoc":{"entryPoint":"src/index.ts"},"gitHead":"d5ed8a4f41de908649f8d03301362e4ab62a81d2","description":"[![NPM version](https://img.shields.io/npm/v/@aws-sdk/s3-request-presigner/latest.svg)](https://www.npmjs.com/package/@aws-sdk/s3-request-presigner) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/s3-request-presigner.svg)](https://www.npmjs.com/","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"_id":"@dos-sdk/s3-request-presigner@3.293.3","_nodeVersion":"18.16.0","_npmVersion":"8.6.0","dist":{"integrity":"sha512-NzdIRr6BcLYegwPDI2jOADgoBZuKDWT+PO/H0KWe8rvbk+8BQNbY7TdwIk4OYltoVGJmka03scy9uYP/7vYJ0w==","shasum":"6321ab0df21747c75629874acfc43acf79cd259e","tarball":"https://registry.npmjs.org/@dos-sdk/s3-request-presigner/-/s3-request-presigner-3.293.3.tgz","fileCount":15,"unpackedSize":32031,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuTM2nW1qiNUGAw9+uko/gm4CwDT+wuJoUFeSCgs3quwIhAIWJReSMtu51fOD4beipkZH8vCCl3ZxZ0TEORQa6Y9ta"}]},"_npmUser":{"name":"ooninoo","email":"yanliang.mei@gmail.com"},"directories":{},"maintainers":[{"name":"ooninoo","email":"yanliang.mei@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/s3-request-presigner_3.293.3_1694573162750_0.012507438088830591"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-28T03:12:58.101Z","3.293.0":"2023-08-28T03:12:58.375Z","modified":"2023-09-13T02:46:03.187Z","3.293.2":"2023-09-12T10:02:25.665Z","3.293.3":"2023-09-13T02:46:02.902Z"},"maintainers":[{"name":"ooninoo","email":"yanliang.mei@gmail.com"}],"description":"[![NPM version](https://img.shields.io/npm/v/@aws-sdk/s3-request-presigner/latest.svg)](https://www.npmjs.com/package/@aws-sdk/s3-request-presigner) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/s3-request-presigner.svg)](https://www.npmjs.com/","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/s3-request-presigner","repository":{"type":"git","url":"git+https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/s3-request-presigner"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"license":"Apache-2.0","readme":"# @aws-sdk/s3-request-presigner\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/s3-request-presigner/latest.svg)](https://www.npmjs.com/package/@aws-sdk/s3-request-presigner)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/s3-request-presigner.svg)](https://www.npmjs.com/package/@aws-sdk/s3-request-presigner)\n\nThis package provides a presigner based on signature V4 that will attempt to\ngenerate signed url for S3.\n\n### Get Presigned URL with Client and Command\n\nYou can generated presigned url from S3 client and command. Here's the example:\n\nJavaScript Example:\n\n```javascript\nconst { getSignedUrl } = require(\"@aws-sdk/s3-request-presigner\");\nconst { S3Client, GetObjectCommand } = require(\"@aws-sdk/client-s3\");\nconst client = new S3Client(clientParams);\nconst command = new GetObjectCommand(getObjectParams);\nconst url = await getSignedUrl(client, command, { expiresIn: 3600 });\n```\n\nES6 Example\n\n```javascript\nimport { getSignedUrl } from \"@aws-sdk/s3-request-presigner\";\nimport { S3Client, GetObjectCommand } from \"@aws-sdk/client-s3\";\nconst client = new S3Client(clientParams);\nconst command = new GetObjectCommand(getObjectParams);\nconst url = await getSignedUrl(client, command, { expiresIn: 3600 });\n```\n\nYou can get signed URL for other S3 operations too, like `PutObjectCommand`.\n`expiresIn` config from the examples above is optional. If not set, it's default\nat `900`.\n\nIf your request contains server-side encryption(`SSE*`) configurations, because\nof S3 limitation, you need to send corresponding headers along with the\npresigned url. For more information, please go to [S3 SSE reference](https://docs.aws.amazon.com/AmazonS3/latest/dev/KMSUsingRESTAPI.html)\n\nIf you already have a request, you can pre-sign the request following the\nsection bellow.\n\n### Get Presigned URL from an Existing Request\n\nJavaScript Example:\n\n```javascript\nconst { S3RequestPresigner } = require(\"@aws-sdk/s3-request-presigner\");\nconst { Sha256 } = require(\"@aws-crypto/sha256-browser\");\nconst { Hash } = require(\"@aws-sdk/hash-node\");\nconst signer = new S3RequestPresigner({\n  region: regionProvider,\n  credentials: credentialsProvider,\n  sha256: Hash.bind(null, \"sha256\"), // In Node.js\n  //sha256: Sha256 // In browsers\n});\nconst presigned = await signer.presign(request);\n```\n\nES6 Example:\n\n```javascript\nimport { S3RequestPresigner } from \"@aws-sdk/s3-request-presigner\";\nimport { Sha256 } from \"@aws-crypto/sha256-browser\";\nimport { Hash } from \"@aws-sdk/hash-node\";\nconst signer = new S3RequestPresigner({\n  region: regionProvider,\n  credentials: credentialsProvider,\n  sha256: Hash.bind(null, \"sha256\"), // In Node.js\n  //sha256: Sha256 // In browsers\n});\nconst presigned = await signer.presign(request);\n```\n\nTo avoid redundant construction parameters when instantiating the s3 presigner,\nyou can simply spread the configuration of an existing s3 client and supply it to\nthe presigner's constructor.\n\n```javascript\n//s3 is instantiated from S3Client from @aws-sdk/client-s3-* packages\nconst signer = new S3RequestPresigner({\n  ...s3.config,\n});\n```\n\nIf your request contains server-side encryption(`x-amz-server-side-encryption*`)\nheaders, because of S3 limitation, you need to send these headers along\nwith the presigned url. That is to say, the url only from calling `formatUrl()`\nto `presigned` is not sufficient to make a request. You need to send the\nserver-side encryption headers along with the url. These headers remain in the\n`presigned.headers`\n\nFor more information, please go to [S3 SSE reference](https://docs.aws.amazon.com/AmazonS3/latest/dev/KMSUsingRESTAPI.html)\n","readmeFilename":"README.md"}