Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bizon/amazon-ids

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bizon/amazon-ids - npm Package Compare versions

Comparing version 1.9.0 to 2.0.0

21

index.js

@@ -5,2 +5,17 @@ const memoize = require('memoizee')

const mwsRegionDomains = {
// Generic MWS regions:
na: 'mws.amazonservices.com',
eu: 'mws-eu.amazonservices.com',
fe: 'mws-fe.amazonservices.com',
// Country specific MWS regions:
ca: 'mws.amazonservices.ca',
mx: 'mws.amazonservices.com.mx',
ae: 'mws.amazonservices.ae',
in: 'mws.amazonservices.in',
jp: 'mws.amazonservices.jp',
au: 'mws.amazonservices.com.au'
}
exports.marketplaces = marketplaces

@@ -23,1 +38,7 @@

})
exports.getMarketplacesByMwsRegion = memoize(mwsRegion => {
return this.getMarketplacesByMwsDomain(
mwsRegionDomains[String(mwsRegion).toLowerCase()]
)
})

4

package.json
{
"name": "@bizon/amazon-ids",
"version": "1.9.0",
"version": "2.0.0",
"description": "Collection of Amazon identifiers",

@@ -17,3 +17,3 @@ "main": "index.js",

"devDependencies": {
"xo": "^0.28.0"
"xo": "^0.32.0"
},

@@ -20,0 +20,0 @@ "xo": {

@@ -106,2 +106,4 @@ # amazon-ids [![CircleCI](https://circleci.com/gh/bizon/amazon-ids.svg?style=svg)](https://circleci.com/gh/bizon/amazon-ids)

### `getMarketplacesByMwsDomain(domain)`
```js

@@ -139,2 +141,38 @@ const {getMarketplacesByMwsDomain} = require('@bizon/amazon-ids')

### `getMarketplacesByMwsRegion(mwsRegion)`
MWS Regions is a concept introduced in [@bizon/mws-sdk](https://github.com/bizon/mws-sdk) – see [its readme](https://github.com/bizon/mws-sdk#region-and-marketplaces) to learn more about it.
```js
const {getMarketplacesByMwsRegion} = require('@bizon/amazon-ids')
getMarketplacesByMwsRegion('na')
/*
[
{
code: 'us',
id: 'ATVPDKIKX0DER',
name: 'United States',
region: 'na',
domain: 'amazon.com',
mwsDomain: 'mws.amazonservices.com',
advertisingApiDomain: 'advertising-api.amazon.com',
imagesDomain: 'images-na.ssl-images-amazon.com',
vendorId: 'ATVPDKIKX0DER'
},
{
code: 'br',
id: 'A2Q3Y263D00KWC',
name: 'Brazil',
region: 'na',
domain: 'amazon.com.br',
mwsDomain: 'mws.amazonservices.com',
imagesDomain: 'images-na.ssl-images-amazon.com',
vendorId: 'A1ZZFT5FULY4LN'
}
]
*/
```
## License

@@ -141,0 +179,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc