{"_id":"@aws-sdk/client-sns-browser","_rev":"19-e4b98cd303652b162f690a921a8f7609","name":"@aws-sdk/client-sns-browser","dist-tags":{"latest":"0.1.0-preview.2","preview":"0.1.0-preview.6"},"versions":{"0.1.0-preview.2":{"name":"@aws-sdk/client-sns-browser","version":"0.1.0-preview.2","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sns-browser@0.1.0-preview.2","maintainers":[{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"},{"name":"amzn-oss","email":"osa-3p@amazon.com"}],"dist":{"shasum":"a75fa69868299e30795e6891ccaf59f3d75a9da5","tarball":"https://registry.npmjs.org/@aws-sdk/client-sns-browser/-/client-sns-browser-0.1.0-preview.2.tgz","fileCount":939,"integrity":"sha512-7j/vucKDtqFg+utn73vj5b92mqpXuRsxrcl+3Mae3Em66i49JEibutkkLXKP/A+PuzO1rJtZLAxz+0GbN5yp1g==","signatures":[{"sig":"MEUCIFTq38HLHfBZD2aOpt8Z2mkvt1C0bKZxRZaUBs9xpsPJAiEAuNsMDRK/2pX+KEtOjXzixNhd98DKbg/KGyB20kWasFs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddpR7CRA9TVsSAnZWagAAcU4P/RVx0iBmaE/IcdQBz0pM\nmo3xVBaMRy0MUq47mnHlIyP0yol8MKVoobcZA5AnY4/imCITc5KKqbgKfwYZ\neMclLxNCAoRKv63jmHBG0l0qmjdeJrS7WvLFLVsI1SPMbhzov944XWdIfHFg\n5OIROg8ziKzM9/0Haf4pXYlS9dAFBWfRasGxB9tpWwUxm85CjQQPaA4/TZsb\n/9yr6oBdTCljbwfnk501yoTOluSvrdsLFSaEx5HBYcgHzXtkgI88cSDSswbP\ngT+b057ShgQt52LERitNngyBK14WhY50fiJp93nmfrLaeL1mDSRiyAsLEan1\nEzZx3V6sjdFxMUQZWEfO0zTBokg5Gshh+CD/45hOEnu8UdQVhwzjmjRrPSb9\nOAJ833Pc48s+4vXHr9+9zaXbs3paWDbK67oEclzqOBV/lydjnonz9AfJAddG\n3VWUA9v/EVvK7M8CaUttYA8WL2orHbgOYT80qzUmMv0SM20YUcLS6XRAN4Cj\nLUU3ZbvEOJPEDl/XnUgsnTfq7qUTzww/wGwAHxmHp3JR9tzI33knx/WZbgm8\nuL27Nv74yZ+nQbJgm0lKGQ0yK9J1vI9Nuxsj2tq+pqUAcms5g+ZRrAUTvfoU\nrJrqZgJGlF+KGjgqY61e78pTU+YqHdiOhfJ4wYswfDvbLdEYfpMxR9NtIdSG\nZ8Dh\r\n=kggX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","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-sns-browser has been renamed to @aws-sdk/client-sns. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon Simple Notification Service","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^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/query-builder":"^0.1.0-preview.5","@aws-sdk/protocol-query":"^0.1.0-preview.6","@aws-sdk/config-resolver":"^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-crypto/sha256-browser":"^0.1.0-preview.1","@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/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"},"_hasShrinkwrap":false,"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-sns-browser_0.1.0-preview.2_1568052347106_0.5693940697699162","host":"s3://npm-registry-packages"}},"0.1.0-preview.3":{"name":"@aws-sdk/client-sns-browser","version":"0.1.0-preview.3","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sns-browser@0.1.0-preview.3","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"}],"dist":{"shasum":"18bc09e0d2d3ba4c335521ad1cc2ae1959585eae","tarball":"https://registry.npmjs.org/@aws-sdk/client-sns-browser/-/client-sns-browser-0.1.0-preview.3.tgz","fileCount":939,"integrity":"sha512-r33etuNIvYk3pssN7joSQ25uNwif37VGaYsBXkIFWDT0hQGKdczR3GB9cVmtiPw7ymqdYBpVMkJR1x2V64bBhA==","signatures":[{"sig":"MEYCIQDceUwXXvx7GlY0gF4Xo+czGbwSGaZOYIeir9JxmtGASAIhALgKFU2/+Okb2ReoKknlT1o3XudBm4Slb1VYSZFnYYFK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg6WWCRA9TVsSAnZWagAAwd4P/Rx2P6mH9tlA2zAHin7U\n1esSROI+ATzNkKrggecolOoQ9ol5YsJaB6gMUhej8usHRnexKaUmdcAjdsOw\ntCv4foZUGQtSUe/uSzyeOhdEIjnuTyPX//+rmLDdPrHiwRbsjq5JODfA3/sS\nG657eQNrGR2roU3HmO1abXfdvNdSWgw0lre7fdUlj2D55lZ5a+MdRRVmrwqi\ngxgRBCNaV+JMbpDcKM12lbB93JSxI3R0RWLOBGelkhjVdNq3tP9m50L7EbMJ\nOLiG8sme9yma6Ez1UNurIPHybeJgk+V/DlJaPoiZ/qSw+1XL9JMreXqnbuxv\n1V/iiYIQn6uiSlBglwKZNWG75Fy7l8r8vapuR7utHgBqsnZNAraiojWKQswn\nQ/peL73vR3dXiuU+qYJztq81keMpkSPqbMCx9T9iuD52WeaS0OJVBkmIhj4U\nPNZALS3huZRvJZZOL6PTrzLfvpG459UQR49YrzPeryPWOVz/IBkgihrT65/5\nKzwwT9dL4wEeLoKPRf9+ZBCzawgqqi99PjMaNeD16qP/F5ocW5Dkq6w8h1lq\nIIjZvjDlnJhTATgK4/xW4II0Nv0OSxBxqoKMhIjiawCfn0+EFGijdf110t3C\nflYXcr0K4fzMWilBx0wSrWt+lwr0C3x+4n0nU7DBrxy+O8hyrmT5LwBKaFzy\nMSBo\r\n=XANi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-sns-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-sns-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-sns-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n\n## Description\n\n<fullname>Amazon Simple Notification Service</fullname> <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <a href=\"http://aws.amazon.com/sns/\">https://aws.amazon.com/sns</a>. For detailed information about Amazon SNS features and their associated API calls, see the <a href=\"https://docs.aws.amazon.com/sns/latest/dg/\">Amazon SNS Developer Guide</a>. </p> <p>We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <a href=\"http://aws.amazon.com/tools/\">Tools for Amazon Web Services</a>. </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-sns-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(`SNSClient`) and the commands you need, for example `AddPermissionCommand`:\n\n```javascript\n//JavaScript\nconst { SNSClient } = require(\"@aws-sdk/client-sns-browser/SNSClient\");\nconst {\n  AddPermissionCommand\n} = require(\"@aws-sdk/client-sns-browser/commands/AddPermissionCommand\");\n```\n\n```javascript\n//TypeScript\nimport { SNSClient } from \"@aws-sdk/client-sns-browser/SNSClient\";\nimport { AddPermissionCommand } from \"@aws-sdk/client-sns-browser/commands/AddPermissionCommand\";\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 sNS = new SNSClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  TopicArn: /**a string value*/,\n  Label: /**a string value*/,\n  AWSAccountId: [ /**a list of string*/ ],\n  ActionName: [ /**a list of string*/ ],\n};\nconst addPermissionCommand = new AddPermissionCommand(params);\nsNS.send(addPermissionCommand).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 sNS.send(addPermissionCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nsNS.send(addPermissionCommand, (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-sns-browser/SNS\";\nconst sNS = new AWS.SNS({ region: \"region\" });\nsNS.addPermission(params, (err, data) => {\n  //do something\n});\n```\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 sNS.send(addPermissionCommand);\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-sns-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","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-sns-browser has been renamed to @aws-sdk/client-sns. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon Simple Notification Service","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.5","@aws-sdk/core-handler":"^0.1.0-preview.5","@aws-sdk/signature-v4":"^0.1.0-preview.7","@aws-sdk/query-builder":"^0.1.0-preview.5","@aws-sdk/protocol-query":"^0.1.0-preview.6","@aws-sdk/config-resolver":"^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-crypto/sha256-browser":"^0.1.0-preview.1","@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.7","@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/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"},"_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.7","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-sns-browser_0.1.0-preview.3_1568908693940_0.669693254291112","host":"s3://npm-registry-packages"}},"0.1.0-preview.4":{"name":"@aws-sdk/client-sns-browser","version":"0.1.0-preview.4","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sns-browser@0.1.0-preview.4","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"}],"dist":{"shasum":"41e73b2a8f15934f20206e7a6c4da5fd3398a39e","tarball":"https://registry.npmjs.org/@aws-sdk/client-sns-browser/-/client-sns-browser-0.1.0-preview.4.tgz","fileCount":939,"integrity":"sha512-pFB4Alv+C0KL+WaXGJGGWxGrt5cvZejWyV8taPtR6e0bu02WE9gFZJTIHQhRJKLObgvlojlI/zdn/RI+pycDSg==","signatures":[{"sig":"MEUCIQCwDklsUpoh7oFKHtiMGfAznjTSikdY57nQ1GUY8SVUMQIgDhOGhYKPKd6fW3Fogh00Qf/yaX5kDuuRhTq3ZCMp4SA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556688,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduNOiCRA9TVsSAnZWagAAI28QAJGXJJg/QhB0YMfxc3lp\nRL91rDOHpG2UFY3Ij9KZ/0WmfMAd3vjedJkbVf3qJKUeacvc4pyab2M7T75I\nTxt3Bgh/a48BIKXzca3xvU4mOJdNImxedbCkoWtK6u0aRKglY1ZPCkQmeEyc\n5GwpOAjASKNC0fEdBvxCCPk/2G45fj5kkbZ0rLZNb8g5LY3+ljqydF/C90+N\nCighamjBSdRYcmv0Ngf9yQcUB6IUMH4HHnWhnkST1yYekzt/mvb0naQW6Eau\nz+Iht6tlgftOTf/uk22DcPAjovLRz/I6hokyonjWtdysTqTQVY2PJg2vQ9Ym\nNl/mWEAgv/I0e+JjYs20Wpsp+GZ8Xml3din3OpXV+pykt+V+y6G+yqd9Kyal\nN1mgl0O4x16MAnuLbqFaMoMhWcWu/bGdQDjDqsKGGR+ITGsIm55CNjts//y0\ntbCryFD9Yo2H7pDOwymiD5WL/UqHZWSHozLpinyD2OVqE6JoYPL1/Ua+7ogL\natAD+2dfQW7EgUYtmJVKTcN5PwPXs+DhP7Wo/c341iyTygJBwfHBfoycU2Kh\nGtREupPTCu/MACymiuGtBCrxAoNFyUyQzSS1f5V2h0iVeXP2ZRLsyhgx7o+h\naR5YDKfagDAw8X29f0RJgTwHrJyCoSTmOFxpZhC0e8kOEVkrMpd2unrK4c/5\njJdG\r\n=xvI9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-sns-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-sns-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-sns-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n\n## Description\n\n<fullname>Amazon Simple Notification Service</fullname> <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <a href=\"http://aws.amazon.com/sns/\">https://aws.amazon.com/sns</a>. For detailed information about Amazon SNS features and their associated API calls, see the <a href=\"https://docs.aws.amazon.com/sns/latest/dg/\">Amazon SNS Developer Guide</a>. </p> <p>We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <a href=\"http://aws.amazon.com/tools/\">Tools for Amazon Web Services</a>. </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-sns-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(`SNSClient`) and the commands you need, for example `AddPermissionCommand`:\n\n```javascript\n//JavaScript\nconst {\n  SNSClient,\n  AddPermissionCommand\n} = require(\"@aws-sdk/client-sns-browser\");\n```\n\n```javascript\n//TypeScript\nimport { SNSClient, AddPermissionCommand } from \"@aws-sdk/client-sns-browser\";\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 sNS = new SNSClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  TopicArn: /**a string value*/,\n  Label: /**a string value*/,\n  AWSAccountId: [ /**a list of string*/ ],\n  ActionName: [ /**a list of string*/ ],\n};\nconst addPermissionCommand = new AddPermissionCommand(params);\nsNS.send(addPermissionCommand).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 sNS.send(addPermissionCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nsNS.send(addPermissionCommand, (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/client-sns-browser\";\nconst sNS = new AWS.SNS({ region: \"region\" });\nsNS.addPermission(params, (err, data) => {\n  //do something\n});\n```\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 sNS.send(addPermissionCommand);\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-sns-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","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-sns-browser has been renamed to @aws-sdk/client-sns. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon Simple Notification Service","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.6","@aws-sdk/core-handler":"^0.1.0-preview.6","@aws-sdk/signature-v4":"^0.1.0-preview.8","@aws-sdk/query-builder":"^0.1.0-preview.6","@aws-sdk/protocol-query":"^0.1.0-preview.7","@aws-sdk/config-resolver":"^0.1.0-preview.6","@aws-sdk/xml-body-parser":"^0.1.0-preview.7","@aws-sdk/middleware-stack":"^0.1.0-preview.7","@aws-sdk/retry-middleware":"^0.1.0-preview.6","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.6","@aws-sdk/signing-middleware":"^0.1.0-preview.8","@aws-sdk/url-parser-browser":"^0.1.0-preview.6","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.6","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.7","@aws-sdk/query-error-unmarshaller":"^0.1.0-preview.7","@aws-sdk/stream-collector-browser":"^0.1.0-preview.6","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@aws-sdk/middleware-content-length":"^0.1.0-preview.6","@aws-sdk/middleware-header-default":"^0.1.0-preview.6"},"_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.8","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-sns-browser_0.1.0-preview.4_1572393890089_0.8779434751614696","host":"s3://npm-registry-packages"}},"0.1.0-preview.5":{"name":"@aws-sdk/client-sns-browser","version":"0.1.0-preview.5","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sns-browser@0.1.0-preview.5","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"}],"dist":{"shasum":"592b5cac97a6ccfeaba1619d13b9a26bfb298e25","tarball":"https://registry.npmjs.org/@aws-sdk/client-sns-browser/-/client-sns-browser-0.1.0-preview.5.tgz","fileCount":939,"integrity":"sha512-fHQuFGu8n8okhYBnphFJxEUQVIHKxuKjGhKi8RSjuopsGMxa753juPhu4aQVFK66mu49ga/FyM+eyUIwAyubBA==","signatures":[{"sig":"MEQCIDzEdOOg0GLZ+BQO3tsql295B+cmGmUKK5azfXEV/XAIAiBFga/3sp6WXYn8TqqbmTyjkS8temNuSM4z78l67VpIrQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":556932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduedACRA9TVsSAnZWagAAf1kP/irIjLEgnSly0MHw83mg\nPe8sdh88UmoyNrP3kmYgJm1xaAFXOuV9u0zfUUSpZHAu9mJU/3HP1BLXmRLF\nYL8QAZEy/NgChEHbo6VnvB1u9slDAzk9aOZKpYobEaHpaLZ8gVq7tAcBIOjD\n2sEsbyymc38pTPlFPL/Ux7eQsxlqhCBp5SV2SZvstBRdeNIVrJIP4Yt0vQCA\nIxpNwnFo/bJLyYtRnI3eBFA+Q97QdZpNAPJagtSsUyCrbxNExZgrtcW2WboF\nxHNccwhG7DJjSz+Q34uCAigF9qsDZJgFp0GEaidW4GK/wgisotRfpFTpQljM\ngTasr4X+P/UkwyWKXPmoFN5n3GEalMLHw5WkG+TGg4RyWa8jmYbD2CC0au4o\nVJZ6Ys5Ik+hSRLPrj8wDFNkv/laTuHcMF6ugv46A5q1LWRh3dEMiYRUMqJrg\nzl7sC9fULPWMP4d9AdldpNGrspaDwEBuqCNC7IGjOh247LWxRghs3Uv6qZCu\nV4/7yPGLBILQhxJ0SdWtXw9YuwlUkZG6upel90UfBoxHWvWWA5tTkRj28QXm\nZDA4m7VzeSUxqPdQEJiFCmKz7bB+OM5dX5Gr3+fUlKQOAHbR3a10Jm4IIKtk\nhiz9GLFFaafEywUvM7NYx2j0lNbuYI8or5bMykJrZg8i+e4aTIPxJnDWD6L0\nrlaX\r\n=mfrB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-sns-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-sns-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-sns-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n\n## Description\n\n<fullname>Amazon Simple Notification Service</fullname> <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <a href=\"http://aws.amazon.com/sns/\">https://aws.amazon.com/sns</a>. For detailed information about Amazon SNS features and their associated API calls, see the <a href=\"https://docs.aws.amazon.com/sns/latest/dg/\">Amazon SNS Developer Guide</a>. </p> <p>We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <a href=\"http://aws.amazon.com/tools/\">Tools for Amazon Web Services</a>. </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-sns-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(`SNSClient`) and the commands you need, for example `AddPermissionCommand`:\n\n```javascript\n//JavaScript\nconst {\n  SNSClient,\n  AddPermissionCommand\n} = require(\"@aws-sdk/client-sns-browser\");\n```\n\n```javascript\n//TypeScript\nimport { SNSClient, AddPermissionCommand } from \"@aws-sdk/client-sns-browser\";\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 sNS = new SNSClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  TopicArn: /**a string value*/,\n  Label: /**a string value*/,\n  AWSAccountId: [ /**a list of string*/ ],\n  ActionName: [ /**a list of string*/ ],\n};\nconst addPermissionCommand = new AddPermissionCommand(params);\nsNS.send(addPermissionCommand).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 sNS.send(addPermissionCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nsNS.send(addPermissionCommand, (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/client-sns-browser\";\nconst sNS = new AWS.SNS({ region: \"region\" });\nsNS.addPermission(params, (err, data) => {\n  //do something\n});\n```\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 sNS.send(addPermissionCommand);\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-sns-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","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-sns-browser has been renamed to @aws-sdk/client-sns. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon Simple Notification Service","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@aws-sdk/core-handler":"^0.1.0-preview.7","@aws-sdk/signature-v4":"^0.1.0-preview.9","@aws-sdk/query-builder":"^0.1.0-preview.7","@aws-sdk/protocol-query":"^0.1.0-preview.8","@aws-sdk/config-resolver":"^0.1.0-preview.7","@aws-sdk/xml-body-parser":"^0.1.0-preview.8","@aws-sdk/middleware-stack":"^0.1.0-preview.8","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.7","@aws-sdk/signing-middleware":"^0.1.0-preview.9","@aws-sdk/url-parser-browser":"^0.1.0-preview.7","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.8","@aws-sdk/query-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/stream-collector-browser":"^0.1.0-preview.7","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@aws-sdk/middleware-content-length":"^0.1.0-preview.7","@aws-sdk/middleware-header-default":"^0.1.0-preview.7"},"_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.9","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-sns-browser_0.1.0-preview.5_1572464447987_0.1691686445635343","host":"s3://npm-registry-packages"}},"0.1.0-preview.6":{"name":"@aws-sdk/client-sns-browser","version":"0.1.0-preview.6","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sns-browser@0.1.0-preview.6","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"}],"dist":{"shasum":"81d54e802ac72c1a16c5e77d389b655459f87b2c","tarball":"https://registry.npmjs.org/@aws-sdk/client-sns-browser/-/client-sns-browser-0.1.0-preview.6.tgz","fileCount":939,"integrity":"sha512-1M9GU6tpLQkNkPVqWgatWRRrnfH8Xq85t6YfhbPRfSZUlnV0GT1f1IFIQrXMTbcjVaNQo+3zoKUOObksOTk5zg==","signatures":[{"sig":"MEYCIQC7fov2fJKpjitpXP+L15xdWPFmikjpX56+J+oPaGLPOwIhAMHvq5snaIgSGXGtNACnxAoCu9Wu+ktXEuaarJ/PN3gR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":557203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FWaCRA9TVsSAnZWagAAQggP/2WEDN3VzFa1CYAqH78x\nOhDvjFMoaFDKmEi52CKmnMGd4oyc+vwDvscCDLjyv30KWN0Ov9Y/cATcS+RD\na5djnE0D292jmuswlf9ENPw0IaQyLC7NxQ8vzBK5Sw3cpPp3D5LKCJwWVxDn\nRcuSmkPXAmVK5Ll1vfm05eYB9OqpWGbDVYdO4p1bB1dP6K0BhPZZFdPbZTH2\nNinp9mYeYpqUYfRqNA4AIMrmppwnTzsZRgr21TI2ddKt/N4AOr0YAQMQHwTK\n3ODIZCYa7tl9KRpzWSMDtSBAcYXOpEdCOgc2PFMLMsSbX1EfXnPDpoI9JrTT\nM/zaSOiofWtqDAsMZVK48Zu1yeDyiRuElubFoCwKDqe9L10+endPCE+5n4+k\nS0K+AfR+kSGMDGvSP79szSbI2jigMg/mQ8noCz+rT7YZKIRWDuHL60C1NiVD\ndH8PhJt9slIgrKGntFhjNd555YN3bQIRCVpqpu1+xmW2PJ4llOB/AYChfM4N\nucGOiN8vqMv0+l7xSKat1I5JoU2fiWWZhQLQdyfyaM+Bo+l+xvaruZ5GFnKE\nWJqNfslykOw1l+8OwNDri1gLN7/BWLUxnV06H194HrW6DsVR0gYI4MGzle2U\n8hPFS7yiKLZGDLxLlfgvH+f9hgns4tMUja7PSlINkc2Bils66c27CEEcIVA/\nGr6j\r\n=JB+0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-sns-browser\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-sns-browser/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-sns-browser.svg)](https://www.npmjs.com/package/@aws-sdk/client-sns-browser)\n\n## Description\n\n<fullname>Amazon Simple Notification Service</fullname> <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <a href=\"http://aws.amazon.com/sns/\">https://aws.amazon.com/sns</a>. For detailed information about Amazon SNS features and their associated API calls, see the <a href=\"https://docs.aws.amazon.com/sns/latest/dg/\">Amazon SNS Developer Guide</a>. </p> <p>We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <a href=\"http://aws.amazon.com/tools/\">Tools for Amazon Web Services</a>. </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-sns-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(`SNSClient`) and the commands you need, for example `AddPermissionCommand`:\n\n```javascript\n//JavaScript\nconst {\n  SNSClient,\n  AddPermissionCommand\n} = require(\"@aws-sdk/client-sns-browser\");\n```\n\n```javascript\n//TypeScript\nimport { SNSClient, AddPermissionCommand } from \"@aws-sdk/client-sns-browser\";\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 sNS = new SNSClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  TopicArn: /**a string value*/,\n  Label: /**a string value*/,\n  AWSAccountId: [ /**a list of string*/ ],\n  ActionName: [ /**a list of string*/ ],\n};\nconst addPermissionCommand = new AddPermissionCommand(params);\nsNS.send(addPermissionCommand).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 sNS.send(addPermissionCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\nsNS.send(addPermissionCommand, (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/client-sns-browser\";\nconst sNS = new AWS.SNS({ region: \"region\" });\nsNS.addPermission(params, (err, data) => {\n  //do something\n});\n```\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 sNS.send(addPermissionCommand);\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-sns-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","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-sns-browser has been renamed to @aws-sdk/client-sns. Please install the renamed package.","_npmVersion":"6.9.0","description":"Browser SDK for Amazon Simple Notification Service","directories":{},"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@aws-sdk/core-handler":"^0.1.0-preview.7","@aws-sdk/signature-v4":"^0.1.0-preview.10","@aws-sdk/query-builder":"^0.1.0-preview.7","@aws-sdk/protocol-query":"^0.1.0-preview.9","@aws-sdk/config-resolver":"^0.1.0-preview.7","@aws-sdk/xml-body-parser":"^0.1.0-preview.9","@aws-sdk/middleware-stack":"^0.1.0-preview.9","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/util-utf8-browser":"^0.1.0-preview.3","@aws-sdk/fetch-http-handler":"^0.1.0-preview.8","@aws-sdk/signing-middleware":"^0.1.0-preview.10","@aws-sdk/url-parser-browser":"^0.1.0-preview.7","@aws-sdk/util-base64-browser":"^0.1.0-preview.3","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.9","@aws-sdk/query-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/stream-collector-browser":"^0.1.0-preview.7","@aws-sdk/util-body-length-browser":"^0.1.0-preview.3","@aws-sdk/middleware-content-length":"^0.1.0-preview.7","@aws-sdk/middleware-header-default":"^0.1.0-preview.7"},"_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.10","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-sns-browser_0.1.0-preview.6_1574196633568_0.8423071564357762","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-09-09T18:05:46.915Z","modified":"2025-03-27T18:42:52.524Z","0.1.0-preview.2":"2019-09-09T18:05:47.224Z","0.1.0-preview.3":"2019-09-19T15:58:14.082Z","0.1.0-preview.4":"2019-10-30T00:04:50.288Z","0.1.0-preview.5":"2019-10-30T19:40:48.194Z","0.1.0-preview.6":"2019-11-19T20:50:33.782Z"},"author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","description":"Browser SDK for Amazon Simple Notification Service","maintainers":[{"email":"osa-3p@amazon.com","name":"amzn-oss"},{"email":"aws-sdk-js-automation@amazon.com","name":"aws-sdk-bot"}],"readme":"","readmeFilename":""}