{"dist":{"shasum":"60754986049c2002193a530743286c69afb15092","tarball":"https://registry.npmjs.org/@aws-sdk/client-pinpoint-browser/-/client-pinpoint-browser-0.1.0-preview.3.tgz","fileCount":2307,"integrity":"sha512-weVX2eVhRYZ4+TzXKLlp5dGAKBzR2ye3J+7jTH89oYv1GXNOrLlbaplWV5oibtInZkj/kbdfj9Na7kPUDvu7Hg==","signatures":[{"sig":"MEYCIQDqE8iqmxaViRUQBFSbIafYHF+o6+pGIt71a1OJzodwuQIhAJKXy6WH7aIK7XlJpu6j3sMz57x+6czuoLFN/QVdpuhP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1324991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm8wQCRA9TVsSAnZWagAAM0YP/2ju8F1Lhd9j+/GBWYef\nkZd2FMMcVO5X64vunapjo7UObeHkEur41DwZlxzZPDtMPHRNUGt+4aW76Ru8\n07CmzpJkPEqug6hipZuiRiCs2/eHS+gdL+544ioM+lCsL7R/G51jzTIF/PuF\naVIpiiGTw6HPjahHii4kv1LJQtTrII1VabA2ej6xsFc9jCevfuGJsZPUp0Qx\nA7HnN4cZLahtd0IYZ8Q7hFdqPcjEFkpI5RR9yZcWRoBrv+y3F/AzMqIrHIGW\nzlrfDacF5CVn7z575tAMME1/YzVIQx//BZ8HX+VxcxEfLqXvvlqAohegOVek\nFvzZLTs6AvyFnkKWRCADH1Xmo5Sh0rU+gTay84NFgYD1PoZuwDWLuPl6NTQb\nxqcEwpWElaaz2EWg/WE/xYJG03TvPvV9IGLGbs8YucNuNlLunfspWUcL82VL\ntlkXll4vnfqkR0BYcR1dwkIUwpppU06hDIWl/p7rJNWNagVPeY7skYmE6WnU\nCai3XSuUkAFRcdvQXL1SAhytQacxkgdcV+qOGtaGgbplzV37CGb3Zt+ThC1k\nQwwPkz4wLenqEKMY7DgIAbtkZvAx6eFtHe7Ksc7asTJWWl0bt4DGETAg0dtc\nSKRs6jH7XHB7UFCKKR5gT4Yszf44qIbC1UeqZjUo9l+Dy4bC1xZaA9u8fiML\nHGXw\r\n=PRcr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","name":"@aws-sdk/client-pinpoint-browser","types":"./index.d.ts","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team","email":"aws-sdk-js@amazon.com"},"readme":"# @aws-sdk/client-pinpoint-browser\n\n## Description\n\nAmazon Pinpoint\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-pinpoint-browser\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commends in CommonJS modules. To send a request, you only need to import the client(`PinpointClient`) and the commands you need, for example `CreateAppCommand`:\n\n```javascript\n//javascript\nconst { PinpointClient } = require('@aws-sdk/client-pinpoint-browser/PinpointClient');\nconst { CreateAppCommand } = require('@aws-sdk/client-pinpoint-browser/commands/CreateAppCommand');\n```\n\n```javascript\n//typescript\nconst { PinpointClient } = import '@aws-sdk/client-pinpoint-browser/PinpointClient';\nconst { CreateAppCommand } = import '@aws-sdk/client-pinpoint-browser/commands/CreateAppCommand';\n```\n\n### Usage\n\nTo send a request, you:\n\n* Initiate client with configurations.(credentials, region). For more information you can refer to the [API reference][].\n* Initiate command with input parameters.\n* Call `send` operation of 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 pinpoint = new PinpointClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n    CreateApplicationRequest: { /**an object specifying CreateApplicationRequest*/ },\n};\nconst createAppCommand = new CreateAppCommand(params);\npinpoint.send(createAppCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nBesides using promise style, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n    const data = await pinpoint.send(createAppCommand);\n    // do something\n} catch(error) {\n    // error handling\n}\n```\n\n```javascript\n// callback\npinpoint.send(createAppCommand, (err, data) => {\n    //do something\n})\n```\n \nBesides using `send()`, the SDK can also send requests using the simplified callback style in version 2 of the SDK.\n\n```javascript\nimport * as AWS from '@aws-sdk/@aws-sdk/client-pinpoint-browser/Pinpoint';\nconst pinpoint = new AWS.Pinpoint({region: 'region'})\npinpoint.createApp(params, (err, data) => {\n    //do something\n})\n\n```\n\n### Troubleshooting \n\nWhen the service returns an exception, inpecting the exceptions is always helpful. You can not only access the exception information but also response metadata(i.e request id).\n\n```javascript\ntry {\n    const data = await pinpoint.send(createAppCommand);\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 like below:\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-pinpoint-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\n[API reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","gitHead":"3dd9e610b159cadf8db49740ee8b0732e0c966e2","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-pinpoint-browser has been renamed to @aws-sdk/client-pinpoint. Please install the renamed package.","_npmVersion":"lerna/3.13.1/node@v8.8.1+x64 (darwin)","description":"Browser SDK for Amazon Pinpoint","directories":{},"maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"cjradek","email":"cjradek@gmail.com"},{"name":"jpeddicord","email":"jacob@peddicord.net"},{"name":"zheallan","email":"zyp19930608@gmail.com"}],"_nodeVersion":"8.8.1","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.2","@aws-sdk/json-parser":"^0.1.0-preview.2","@aws-sdk/core-handler":"^0.1.0-preview.2","@aws-sdk/json-builder":"^0.1.0-preview.2","@aws-sdk/signature-v4":"^0.1.0-preview.3","@aws-sdk/protocol-rest":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.2","@aws-sdk/middleware-stack":"^0.1.0-preview.3","@aws-sdk/retry-middleware":"^0.1.0-preview.2","@aws-crypto/sha256-browser":"^0.1.0-preview.1","@aws-sdk/util-utf8-browser":"^0.1.0-preview.1","@aws-sdk/fetch-http-handler":"^0.1.0-preview.2","@aws-sdk/signing-middleware":"^0.1.0-preview.3","@aws-sdk/url-parser-browser":"^0.1.0-preview.2","@aws-sdk/util-base64-browser":"^0.1.0-preview.1","@aws-sdk/middleware-serializer":"^0.1.0-preview.2","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.3","@aws-sdk/util-user-agent-browser":"^0.1.0-preview.3","@aws-sdk/stream-collector-browser":"^0.1.0-preview.2","@aws-sdk/util-body-length-browser":"^0.1.0-preview.1","@aws-sdk/middleware-content-length":"^0.1.0-preview.2","@aws-sdk/middleware-header-default":"^0.1.0-preview.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^20.0.4","karma":"^2.0.0","rimraf":"^2.6.2","typedoc":"^0.10.0","puppeteer":"^1.0.0","typescript":"^3.0.0","@types/jest":"^20.0.2","jasmine-core":"^2.8.0","karma-jasmine":"^1.1.1","karma-coverage":"^1.1.1","karma-typescript":"^3.0.12","karma-chrome-launcher":"^2.2.0","@aws-sdk/karma-credential-loader":"^0.1.0-preview.3","@aws-sdk/client-documentation-generator":"^0.1.0-preview.1"},"_npmOperationalInternal":{"tmp":"tmp/client-pinpoint-browser_0.1.0-preview.3_1553714192140_0.4365334044447169","host":"s3://npm-registry-packages"},"_id":"@aws-sdk/client-pinpoint-browser@0.1.0-preview.3","version":"0.1.0-preview.3"}