{"dist":{"shasum":"0b1af85e2578f9e1a8ed7461bae0156832496413","tarball":"https://registry.npmjs.org/@aws-sdk/client-s3-browser/-/client-s3-browser-0.1.0-preview.3.tgz","fileCount":2757,"integrity":"sha512-g5nUfLN1YAoMRsPiGbz1/H7VSwpS0rgyYcLgySiTzpzk02J3WjY72+8n0jKhMrtDSbXcGPW+ogs716YYTxAj7Q==","signatures":[{"sig":"MEQCIA9m+ndR9FhExGxOHRQ5OuWCfjUzSKrJafLHFh5qIUoUAiBmWlXWaX0VA7wNqpMOXAmRkZulaZIh3uF8UKyIZbSeQw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1707864,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddpRmCRA9TVsSAnZWagAAdNUP/izAhHPZxE/dPQP+SfLj\nYMyAiSYaB2QwWcLHdDX1dSI09B16/hfxn5DuDD8xmltr73jAM2Xp44rzI+ND\nNu080UI9hH0j4UBSLPoJsomJwPpcP2fim29UJgqBG8OFoeLxJD+9XZjFXM85\nSGyX1G3vk2UUuHR+1Kh0v7ZLRdTn7IQySnJv9wNSug+CDG71Gky5o9aUNYn0\n8yJwPiosa4vGO3IAJnI5o/ceNBLmKPTrPWXPzI9HZdyyDT6CYYz7x/RoE4gS\nZfrWoV2eThq4UrJWCNSl08eKcAnUEmTHH4WhGfwIglWjWj0DagnhCPAKZ+Fi\nzCpaepr6FmPTNVo/YwshzDtbGKYsqf+iAEKdzs35qH3YnZp+Q2mnsUa/ocuH\nP21By7jYfl0uy5rcNEhBjQC467FQWTCgUetz/dGuhOIc4v65Gawzr3GOS0F4\nDmBW53TGxsQa5tHNnxG37Ckca1riBcaKv6O+ImolJ0cyg6j+SL7utMep/ZMX\nLYJcT4/8EK6TtVdPEb1ZZILMxlMb+1EdyKNqRosdDWODy0gUOPz84o25jS61\nuVTTgmkKLibNsnik6+6yL9aeHKiaWaRyWGUJheRZ1n2bHQJ1R8XoHFrp/LLE\n0MUyHd5KvzbLpxWVUSrLk0Ggk58j+okm2UuG1ag+TEJMZpZYV2ZciqX5RZWi\nuHBk\r\n=8eDh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","name":"@aws-sdk/client-s3-browser","types":"./index.d.ts","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"readme":"# @aws-sdk/client-s3-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-s3-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-s3-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-s3-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-s3-browser)\n\n## Description\n\n<p/>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-s3-browser\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`S3Client`) and the commands you need, for example `PutObjectCommand`:\n\n```javascript\n//JavaScript\nconst { S3Client } = require(\"@aws-sdk/client-s3-browser/S3Client\");\nconst {\n  PutObjectCommand\n} = require(\"@aws-sdk/client-s3-browser/commands/PutObjectCommand\");\n```\n\n```javascript\n//TypeScript\nimport { S3Client } from \"@aws-sdk/client-s3-browser/S3Client\";\nimport { PutObjectCommand } from \"@aws-sdk/client-s3-browser/commands/PutObjectCommand\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\n- Initiate command with input parameters.\n- Call `send` operation on client with command object as input.\n- If you are using a custom http handler, you may call `destroy()` to close open connections.\n\n```javascript\nconst s3 = new S3Client({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  Body: /**a blob value*/\n  /**You can supply readable stream to streaming input. e.g. (await fetch(input)).body */,\n  Bucket: /**a string value*/,\n  Key: /**a string value*/,\n};\nconst putObjectCommand = new PutObjectCommand(params);\ns3.send(putObjectCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await s3.send(putObjectCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ns3.send(putObjectCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/@aws-sdk/client-s3-browser/S3\";\nconst s3 = new AWS.S3({ region: \"region\" });\ns3.putObject(params, (err, data) => {\n  //do something\n});\n```\n\nFor operations containing stream response like `GetObject()`, you can get response stream by accessing to streaming member. e.g. data.Body.getReader().read().then(/_ do something and continue reading _/).(`data` is the resolved response object)\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await s3.send(putObjectCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. You can access them by specifying exception names:\n    if(error.name === 'SomeServiceException') {\n        const value = error.specialKeyInException;\n    }\n*/\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3)\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-s3-browser' package is updated. To contribute to SDK you can checkout our [code generator package][].\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","license":"Apache-2.0","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"karma start karma.conf","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-s3-browser has been renamed to @aws-sdk/client-s3. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon Simple Storage Service","directories":{},"maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.5","@aws-sdk/md5-js":"^0.1.0-preview.5","@aws-sdk/core-handler":"^0.1.0-preview.5","@aws-sdk/signature-v4":"^0.1.0-preview.6","@aws-sdk/protocol-rest":"^0.1.0-preview.7","@aws-sdk/config-resolver":"^0.1.0-preview.5","@aws-sdk/ssec-middleware":"^0.1.0-preview.5","@aws-sdk/xml-body-parser":"^0.1.0-preview.6","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-sdk/xml-body-builder":"^0.1.0-preview.5","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/hash-blob-browser":"^0.1.0-preview.6","@aws-sdk/middleware-sdk-s3":"^0.1.0-preview.2","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.5","@aws-sdk/signing-middleware":"^0.1.0-preview.6","@aws-sdk/url-parser-browser":"^0.1.0-preview.5","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/s3-error-unmarshaller":"^0.1.0-preview.3","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.6","@aws-sdk/query-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/stream-collector-browser":"^0.1.0-preview.5","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@aws-sdk/middleware-content-length":"^0.1.0-preview.5","@aws-sdk/middleware-header-default":"^0.1.0-preview.5","@aws-sdk/bucket-endpoint-middleware":"^0.1.0-preview.5","@aws-sdk/apply-body-checksum-middleware":"^0.1.0-preview.5","@aws-sdk/location-constraint-middleware":"^0.1.0-preview.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^24.7.1","karma":"^4.1.0","rimraf":"^2.6.2","typedoc":"^0.14.2","puppeteer":"^1.0.0","typescript":"~3.4.0","@types/jest":"^24.0.12","jasmine-core":"^3.4.0","karma-jasmine":"^2.0.1","karma-coverage":"^1.1.1","karma-typescript":"^4.0.0","karma-chrome-launcher":"^3.0.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.6","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-s3-browser_0.1.0-preview.3_1568052325890_0.47407794379773605","host":"s3://npm-registry-packages"},"_id":"@aws-sdk/client-s3-browser@0.1.0-preview.3","version":"0.1.0-preview.3"}