@bizon/amazon-ids 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/e(require("mem")),n={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},o=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],m=a.default(function(e){return o.find(function(a){return a.id===e})}),r=a.default(function(e){return e=e.toLowerCase(),o.find(function(a){return a.code===e})}),i=a.default(function(e){return(e=e.toLowerCase()).startsWith("www.")&&(e=e.slice(4)),o.find(function(a){return a.domain===e})}),s=a.default(function(e){return o.filter(function(a){return a.mwsDomain===e})}),c=a.default(function(e){var a=n[e];return a?s(a):[]});exports.getMarketplaceByCode=r,exports.getMarketplaceByDomain=i,exports.getMarketplaceById=m,exports.getMarketplacesByMwsDomain=s,exports.getMarketplacesByMwsRegion=c,exports.marketplaces=o;
1
+ function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/e(require("mem")),n={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},o=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be",vendorId:"A3Q3FYJVX702M2"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],m=a.default(function(e){return o.find(function(a){return a.id===e})}),r=a.default(function(e){return e=e.toLowerCase(),o.find(function(a){return a.code===e})}),i=a.default(function(e){return(e=e.toLowerCase()).startsWith("www.")&&(e=e.slice(4)),o.find(function(a){return a.domain===e})}),s=a.default(function(e){return o.filter(function(a){return a.mwsDomain===e})}),c=a.default(function(e){var a=n[e];return a?s(a):[]});exports.getMarketplaceByCode=r,exports.getMarketplaceByDomain=i,exports.getMarketplaceById=m,exports.getMarketplacesByMwsDomain=s,exports.getMarketplacesByMwsRegion=c,exports.marketplaces=o;
2
2
  //# sourceMappingURL=amazon-ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"amazon-ids.js","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"6GAmBMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,ylPAOAC,EAAqBC,UAAI,SAACC,UACrCH,EAAaI,KAAK,SAACC,UAAgBA,EAAYF,KAAOA,CAApC,EADkB,GASzBG,EAAuBJ,UAAI,SAACK,GAGvC,OAFAA,EAAOA,EAAKC,cAELR,EAAaI,KAAK,SAACC,UAAgBA,EAAYE,OAASA,CAAtC,EAC1B,GAOYE,EAAyBP,UAAI,SAACQ,GAOzC,OANAA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAK,SAACC,UAAgBA,EAAYK,SAAWA,CAAxC,EAC1B,GAOYG,EAA6BX,UAAI,SAACQ,UAC7CV,EAAac,OAAO,SAACT,UAAgBA,EAAYU,YAAcL,CAA3C,EADwB,GASjCM,EAA6Bd,UAAI,SAACe,GAC7C,IAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAIV"}
1
+ {"version":3,"file":"amazon-ids.js","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"6GAmBMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,mnPAOAC,EAAqBC,UAAI,SAACC,UACrCH,EAAaI,KAAK,SAACC,UAAgBA,EAAYF,KAAOA,CAApC,EADkB,GASzBG,EAAuBJ,UAAI,SAACK,GAGvC,OAFAA,EAAOA,EAAKC,cAELR,EAAaI,KAAK,SAACC,UAAgBA,EAAYE,OAASA,CAAtC,EAC1B,GAOYE,EAAyBP,UAAI,SAACQ,GAOzC,OANAA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAK,SAACC,UAAgBA,EAAYK,SAAWA,CAAxC,EAC1B,GAOYG,EAA6BX,UAAI,SAACQ,UAC7CV,EAAac,OAAO,SAACT,UAAgBA,EAAYU,YAAcL,CAA3C,EADwB,GASjCM,EAA6Bd,UAAI,SAACe,GAC7C,IAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAIV"}
@@ -1,2 +1,2 @@
1
- import a from"mem";var e={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},n=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],o=a(function(a){return n.find(function(e){return e.id===a})}),m=a(function(a){return a=a.toLowerCase(),n.find(function(e){return e.code===a})}),i=a(function(a){return(a=a.toLowerCase()).startsWith("www.")&&(a=a.slice(4)),n.find(function(e){return e.domain===a})}),r=a(function(a){return n.filter(function(e){return e.mwsDomain===a})}),s=a(function(a){var n=e[a];return n?r(n):[]});export{m as getMarketplaceByCode,i as getMarketplaceByDomain,o as getMarketplaceById,r as getMarketplacesByMwsDomain,s as getMarketplacesByMwsRegion,n as marketplaces};
1
+ import a from"mem";var e={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},n=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be",vendorId:"A3Q3FYJVX702M2"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],o=a(function(a){return n.find(function(e){return e.id===a})}),m=a(function(a){return a=a.toLowerCase(),n.find(function(e){return e.code===a})}),i=a(function(a){return(a=a.toLowerCase()).startsWith("www.")&&(a=a.slice(4)),n.find(function(e){return e.domain===a})}),r=a(function(a){return n.filter(function(e){return e.mwsDomain===a})}),s=a(function(a){var n=e[a];return n?r(n):[]});export{m as getMarketplaceByCode,i as getMarketplaceByDomain,o as getMarketplaceById,r as getMarketplacesByMwsDomain,s as getMarketplacesByMwsRegion,n as marketplaces};
2
2
  //# sourceMappingURL=amazon-ids.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"amazon-ids.mjs","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"uBAmBMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,ylPAOAC,EAAqBC,EAAI,SAACC,UACrCH,EAAaI,KAAK,SAACC,UAAgBA,EAAYF,KAAOA,CAApC,EADkB,GASzBG,EAAuBJ,EAAI,SAACK,GAGvC,OAFAA,EAAOA,EAAKC,cAELR,EAAaI,KAAK,SAACC,UAAgBA,EAAYE,OAASA,CAAtC,EAC1B,GAOYE,EAAyBP,EAAI,SAACQ,GAOzC,OANAA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAK,SAACC,UAAgBA,EAAYK,SAAWA,CAAxC,EAC1B,GAOYG,EAA6BX,EAAI,SAACQ,UAC7CV,EAAac,OAAO,SAACT,UAAgBA,EAAYU,YAAcL,CAA3C,EADwB,GASjCM,EAA6Bd,EAAI,SAACe,GAC7C,IAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAIV"}
1
+ {"version":3,"file":"amazon-ids.mjs","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"uBAmBMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,mnPAOAC,EAAqBC,EAAI,SAACC,UACrCH,EAAaI,KAAK,SAACC,UAAgBA,EAAYF,KAAOA,CAApC,EADkB,GASzBG,EAAuBJ,EAAI,SAACK,GAGvC,OAFAA,EAAOA,EAAKC,cAELR,EAAaI,KAAK,SAACC,UAAgBA,EAAYE,OAASA,CAAtC,EAC1B,GAOYE,EAAyBP,EAAI,SAACQ,GAOzC,OANAA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAK,SAACC,UAAgBA,EAAYK,SAAWA,CAAxC,EAC1B,GAOYG,EAA6BX,EAAI,SAACQ,UAC7CV,EAAac,OAAO,SAACT,UAAgBA,EAAYU,YAAcL,CAA3C,EADwB,GASjCM,EAA6Bd,EAAI,SAACe,GAC7C,IAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAIV"}
@@ -1,2 +1,2 @@
1
- import a from"mem";const e={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},n=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],o=a(a=>n.find(e=>e.id===a)),m=a(a=>(a=a.toLowerCase(),n.find(e=>e.code===a))),i=a(a=>((a=a.toLowerCase()).startsWith("www.")&&(a=a.slice(4)),n.find(e=>e.domain===a))),r=a(a=>n.filter(e=>e.mwsDomain===a)),s=a(a=>{const n=e[a];return n?r(n):[]});export{m as getMarketplaceByCode,i as getMarketplaceByDomain,o as getMarketplaceById,r as getMarketplacesByMwsDomain,s as getMarketplacesByMwsRegion,n as marketplaces};
1
+ import a from"mem";const e={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},n=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be",vendorId:"A3Q3FYJVX702M2"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],o=a(a=>n.find(e=>e.id===a)),m=a(a=>(a=a.toLowerCase(),n.find(e=>e.code===a))),i=a(a=>((a=a.toLowerCase()).startsWith("www.")&&(a=a.slice(4)),n.find(e=>e.domain===a))),r=a(a=>n.filter(e=>e.mwsDomain===a)),s=a(a=>{const n=e[a];return n?r(n):[]});export{m as getMarketplaceByCode,i as getMarketplaceByDomain,o as getMarketplaceById,r as getMarketplacesByMwsDomain,s as getMarketplacesByMwsRegion,n as marketplaces};
2
2
  //# sourceMappingURL=amazon-ids.modern.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"amazon-ids.modern.mjs","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"mBAmBA,MAAMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,ylPAOAC,EAAqBC,EAAKC,GACrCH,EAAaI,KAAMC,GAAgBA,EAAYF,KAAOA,IAQ3CG,EAAuBJ,EAAKK,IACvCA,EAAOA,EAAKC,cAELR,EAAaI,KAAMC,GAAgBA,EAAYE,OAASA,KAQpDE,EAAyBP,EAAKQ,KACzCA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAMC,GAAgBA,EAAYK,SAAWA,KAQtDG,EAA6BX,EAAKQ,GAC7CV,EAAac,OAAQT,GAAgBA,EAAYU,YAAcL,IAQpDM,EAA6Bd,EAAKe,IAC7C,MAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAGwB"}
1
+ {"version":3,"file":"amazon-ids.modern.mjs","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"mBAmBA,MAAMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,mnPAOAC,EAAqBC,EAAKC,GACrCH,EAAaI,KAAMC,GAAgBA,EAAYF,KAAOA,IAQ3CG,EAAuBJ,EAAKK,IACvCA,EAAOA,EAAKC,cAELR,EAAaI,KAAMC,GAAgBA,EAAYE,OAASA,KAQpDE,EAAyBP,EAAKQ,KACzCA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAMC,GAAgBA,EAAYK,SAAWA,KAQtDG,EAA6BX,EAAKQ,GAC7CV,EAAac,OAAQT,GAAgBA,EAAYU,YAAcL,IAQpDM,EAA6Bd,EAAKe,IAC7C,MAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAGwB"}
@@ -1,2 +1,2 @@
1
- !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("mem")):"function"==typeof define&&define.amd?define(["exports","mem"],a):a((e||self).amazonIds={},e.mem)}(this,function(e,a){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/n(a),m={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},i=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],r=o.default(function(e){return i.find(function(a){return a.id===e})}),s=o.default(function(e){return e=e.toLowerCase(),i.find(function(a){return a.code===e})}),c=o.default(function(e){return(e=e.toLowerCase()).startsWith("www.")&&(e=e.slice(4)),i.find(function(a){return a.domain===e})}),d=o.default(function(e){return i.filter(function(a){return a.mwsDomain===e})}),l=o.default(function(e){var a=m[e];return a?d(a):[]});e.getMarketplaceByCode=s,e.getMarketplaceByDomain=c,e.getMarketplaceById=r,e.getMarketplacesByMwsDomain=d,e.getMarketplacesByMwsRegion=l,e.marketplaces=i});
1
+ !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports,require("mem")):"function"==typeof define&&define.amd?define(["exports","mem"],a):a((e||self).amazonIds={},e.mem)}(this,function(e,a){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/n(a),m={na:"mws.amazonservices.com",eu:"mws-eu.amazonservices.com",fe:"mws-fe.amazonservices.com",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"},i=[{code:"be",currencyCode:"EUR",domain:"amazon.com.be",id:"AMEN7PMS3EDWL",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Belgium",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.be",vendorCentralDomain:"vendorcentral.amazon.com.be",vendorId:"A3Q3FYJVX702M2"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"de",currencyCode:"EUR",domain:"amazon.de",id:"A1PA6795UKMFR9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Germany",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.de",vendorId:"A3JWKAKR8XB7XF"},{code:"de-non-amazon",currencyCode:"EUR",id:"A38D8NSA03LJTC",name:"Germany - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"es",currencyCode:"EUR",domain:"amazon.es",id:"A1RKKUPIHCS9HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Spain",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.es",vendorId:"A1AT7YVPFBWXBL"},{code:"es-non-amazon",currencyCode:"EUR",id:"AFQLKURYRPEL8",name:"Spain - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"fr",currencyCode:"EUR",domain:"amazon.fr",id:"A13V1IB3VIYZZH",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"France",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.fr",vendorId:"A1X6FK5RDHNB96"},{code:"fr-non-amazon",currencyCode:"EUR",id:"A1ZFFQZ3HTUKT9",name:"France - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"it",currencyCode:"EUR",domain:"amazon.it",id:"APJ6JRA9NG5V4",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Italy",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.it",vendorId:"A11IL2PNWYJU7H"},{code:"it-non-amazon",currencyCode:"EUR",id:"A62U237T8HV6N",name:"Italy - Non-Amazon",region:"eu"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"uk",currencyCode:"GBP",domain:"amazon.co.uk",id:"A1F83G8C2ARO7P",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"United Kingdom",region:"eu",sellerCentralDomain:"sellercentral-europe.amazon.com",vendorCentralDomain:"vendorcentral.amazon.co.uk",vendorId:"A3P5ROKL5A1OLE"},{code:"uk-non-amazon",currencyCode:"GBP",id:"AZMDEXL2RVFNN",name:"United Kingdom - Non-Amazon",region:"eu"},{code:"tr",currencyCode:"TRY",domain:"amazon.com.tr",id:"A33AVAJ2PDY3EV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Turkey",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.tr",vendorCentralDomain:"vendorcentral.amazon.com.tr",vendorId:"A1UNQM1SR2CHM"},{code:"eg",currencyCode:"EGP",domain:"amazon.eg",id:"ARBP9OOSHTCHU",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Egypt",region:"eu",sellerCentralDomain:"sellercentral.amazon.eg",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A1ZVRGNO5AYLOV"},{code:"sa",currencyCode:"SAR",domain:"amazon.sa",id:"A17E79C6D8DWNP",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Saudi Arabia",region:"eu",sellerCentralDomain:"sellercentral.amazon.com.sa",vendorId:"A2XPWB6MYN7ZDK"},{code:"nl",currencyCode:"EUR",domain:"amazon.nl",id:"A1805IZSGTT6HS",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Netherlands",region:"eu",sellerCentralDomain:"sellercentral.amazon.nl",vendorCentralDomain:"vendorcentral.amazon.nl",vendorId:"A17D2BRD4YMT0X"},{code:"se",currencyCode:"SEK",domain:"amazon.se",id:"A2NODRKZP88ZB9",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Sweden",region:"eu",sellerCentralDomain:"sellercentral.amazon.se",vendorCentralDomain:"vendorcentral.amazon.se",vendorId:"ANU9KP01APNAG"},{code:"pl",currencyCode:"PLN",domain:"amazon.pl",id:"A1C3SOZRARQ6R3",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws-eu.amazonservices.com",name:"Poland",region:"eu",sellerCentralDomain:"sellercentral.amazon.pl",vendorCentralDomain:"vendorcentral.amazon.pl",vendorId:"A2R2221NX79QZP"},{advertisingApiDomain:"advertising-api.amazon.com",code:"ca",currencyCode:"CAD",domain:"amazon.ca",id:"A2EUQ1WTGCTBG2",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ca",name:"Canada",region:"na",sellerCentralDomain:"sellercentral.amazon.ca",vendorCentralDomain:"vendorcentral.amazon.ca",vendorId:"A3DWYIK6Y9EEQB"},{code:"ca-non-amazon",currencyCode:"CAD",id:"A1MQXOICRS2Z7M",name:"Canada - Non-Amazon",region:"na"},{code:"mx",currencyCode:"MXN",domain:"amazon.com.mx",id:"A1AM78C64UM0Y8",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.mx",name:"Mexico",region:"na",sellerCentralDomain:"sellercentral.amazon.com.mx",vendorCentralDomain:"vendorcentral.amazon.com.mx",vendorId:"AVDBXBAVVSXLQ"},{code:"mx-non-amazon",currencyCode:"MXN",id:"A3H6HPSLHAK3XG",name:"Mexico - Non-Amazon",region:"na"},{advertisingApiDomain:"advertising-api.amazon.com",code:"us",currencyCode:"USD",domain:"amazon.com",id:"ATVPDKIKX0DER",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"United States",region:"na",sellerCentralDomain:"sellercentral.amazon.com",vendorCentralDomain:"vendorcentral.amazon.com",vendorId:"ATVPDKIKX0DER"},{code:"us-non-amazon",currencyCode:"USD",id:"A2ZV50J4W1RKNI",name:"United States - Non-Amazon",region:"na"},{code:"us-invoicing-shadow",currencyCode:"USD",id:"AHRY1CZE9ZY4H",name:"United States - Invoicing Shadow Marketplace",region:"na"},{code:"br",currencyCode:"BRL",domain:"amazon.com.br",id:"A2Q3Y263D00KWC",imagesDomain:"images-na.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com",name:"Brazil",region:"na",sellerCentralDomain:"sellercentral.amazon.com.br",vendorCentralDomain:"vendorcentral.amazon.com.br",vendorId:"A1ZZFT5FULY4LN"},{advertisingApiDomain:"advertising-api-eu.amazon.com",code:"ae",currencyCode:"AED",domain:"amazon.ae",id:"A2VIGQ35RCS4UG",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.ae",name:"United Arab Emirates",region:"eu",sellerCentralDomain:"sellercentral.amazon.ae",vendorCentralDomain:"vendorcentral.amazon.me",vendorId:"A2KKU8J8O8784X"},{code:"in",currencyCode:"INR",domain:"amazon.in",id:"A21TJRUUN4KGV",imagesDomain:"images-eu.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.in",name:"India",region:"eu",sellerCentralDomain:"sellercentral.amazon.in",vendorCentralDomain:"vendorcentral.amazon.in"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"au",currencyCode:"AUD",domain:"amazon.com.au",id:"A39IBJ37TRP1C6",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.com.au",name:"Australia",region:"fe",sellerCentralDomain:"sellercentral.amazon.com.au",vendorCentralDomain:"vendorcentral.amazon.com.au",vendorId:"ANEGB3WVEVKZB"},{advertisingApiDomain:"advertising-api-fe.amazon.com",code:"jp",currencyCode:"JPY",domain:"amazon.co.jp",id:"A1VC38T7YXB528",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws.amazonservices.jp",name:"Japan",region:"fe",sellerCentralDomain:"sellercentral.amazon.co.jp",vendorCentralDomain:"vendorcentral.amazon.co.jp",vendorId:"AN1VRQENFRJN5"},{code:"sg",currencyCode:"SGD",domain:"amazon.sg",id:"A19VAU5U5O7RUS",imagesDomain:"images-fe.ssl-images-amazon.com",mwsDomain:"mws-fe.amazonservices.com",name:"Singapore",region:"fe",sellerCentralDomain:"sellercentral.amazon.sg",vendorCentralDomain:"vendorcentral.amazon.com.sg"}],r=o.default(function(e){return i.find(function(a){return a.id===e})}),s=o.default(function(e){return e=e.toLowerCase(),i.find(function(a){return a.code===e})}),c=o.default(function(e){return(e=e.toLowerCase()).startsWith("www.")&&(e=e.slice(4)),i.find(function(a){return a.domain===e})}),d=o.default(function(e){return i.filter(function(a){return a.mwsDomain===e})}),l=o.default(function(e){var a=m[e];return a?d(a):[]});e.getMarketplaceByCode=s,e.getMarketplaceByDomain=c,e.getMarketplaceById=r,e.getMarketplacesByMwsDomain=d,e.getMarketplacesByMwsRegion=l,e.marketplaces=i});
2
2
  //# sourceMappingURL=amazon-ids.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"amazon-ids.umd.js","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"gWAmBMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,ylPAOAC,EAAqBC,UAAI,SAACC,UACrCH,EAAaI,KAAK,SAACC,UAAgBA,EAAYF,KAAOA,CAApC,EADkB,GASzBG,EAAuBJ,UAAI,SAACK,GAGvC,OAFAA,EAAOA,EAAKC,cAELR,EAAaI,KAAK,SAACC,UAAgBA,EAAYE,OAASA,CAAtC,EAC1B,GAOYE,EAAyBP,UAAI,SAACQ,GAOzC,OANAA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAK,SAACC,UAAgBA,EAAYK,SAAWA,CAAxC,EAC1B,GAOYG,EAA6BX,UAAI,SAACQ,UAC7CV,EAAac,OAAO,SAACT,UAAgBA,EAAYU,YAAcL,CAA3C,EADwB,GASjCM,EAA6Bd,UAAI,SAACe,GAC7C,IAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAIV"}
1
+ {"version":3,"file":"amazon-ids.umd.js","sources":["../src/index.ts"],"sourcesContent":["import mem from 'mem'\n\nimport _marketplaces from './marketplaces.json'\n\nexport interface Marketplace {\n code: string\n id: string\n name: string\n region: string\n domain?: string\n mwsDomain?: string\n advertisingApiDomain?: string\n imagesDomain?: string\n vendorId?: string\n sellerCentralDomain?: string\n vendorCentralDomain?: string\n currencyCode: string\n}\n\nconst mwsRegionDomains = {\n // Generic MWS regions:\n na: 'mws.amazonservices.com',\n eu: 'mws-eu.amazonservices.com',\n fe: 'mws-fe.amazonservices.com',\n\n // Country specific MWS regions:\n ca: 'mws.amazonservices.ca',\n mx: 'mws.amazonservices.com.mx',\n ae: 'mws.amazonservices.ae',\n in: 'mws.amazonservices.in',\n jp: 'mws.amazonservices.jp',\n au: 'mws.amazonservices.com.au',\n}\n\ntype MwsRegion = keyof typeof mwsRegionDomains\n\n/**\n * All the available marketplaces\n */\nexport const marketplaces: Marketplace[] = _marketplaces\n\n/**\n * Get a marketplace by its id\n * @param id The marketplace's id\n * @returns The marketplace\n */\nexport const getMarketplaceById = mem((id: string) =>\n marketplaces.find((marketplace) => marketplace.id === id),\n)\n\n/**\n * Get a marketplace by its code\n * @param code The marketplace's code\n * @returns The markerplace\n */\nexport const getMarketplaceByCode = mem((code: string) => {\n code = code.toLowerCase()\n\n return marketplaces.find((marketplace) => marketplace.code === code)\n})\n\n/**\n * Get a marketplace by its domain\n * @param domain The marketplace's domain\n * @returns The marketplace\n */\nexport const getMarketplaceByDomain = mem((domain: string) => {\n domain = domain.toLowerCase()\n\n if (domain.startsWith('www.')) {\n domain = domain.slice(4)\n }\n\n return marketplaces.find((marketplace) => marketplace.domain === domain)\n})\n\n/**\n * Get marketplaces by an MWS domain\n * @param domain The MWS domain\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsDomain = mem((domain: string) =>\n marketplaces.filter((marketplace) => marketplace.mwsDomain === domain),\n)\n\n/**\n * Get marketplaces by an MWS region\n * @param mwsRegion The MWS region\n * @returns The marketplaces\n */\nexport const getMarketplacesByMwsRegion = mem((mwsRegion: MwsRegion) => {\n const mwsDomain = mwsRegionDomains[mwsRegion]\n\n if (!mwsDomain) {\n return []\n }\n\n return getMarketplacesByMwsDomain(mwsDomain)\n})\n"],"names":["mwsRegionDomains","na","eu","fe","ca","mx","ae","in","jp","au","marketplaces","getMarketplaceById","mem","id","find","marketplace","getMarketplaceByCode","code","toLowerCase","getMarketplaceByDomain","domain","startsWith","slice","getMarketplacesByMwsDomain","filter","mwsDomain","getMarketplacesByMwsRegion","mwsRegion"],"mappings":"gWAmBMA,EAAmB,CAEvBC,GAAI,yBACJC,GAAI,4BACJC,GAAI,4BAGJC,GAAI,wBACJC,GAAI,4BACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,wBACJC,GAAI,6BAQOC,mnPAOAC,EAAqBC,UAAI,SAACC,UACrCH,EAAaI,KAAK,SAACC,UAAgBA,EAAYF,KAAOA,CAApC,EADkB,GASzBG,EAAuBJ,UAAI,SAACK,GAGvC,OAFAA,EAAOA,EAAKC,cAELR,EAAaI,KAAK,SAACC,UAAgBA,EAAYE,OAASA,CAAtC,EAC1B,GAOYE,EAAyBP,UAAI,SAACQ,GAOzC,OANAA,EAASA,EAAOF,eAELG,WAAW,UACpBD,EAASA,EAAOE,MAAM,IAGjBZ,EAAaI,KAAK,SAACC,UAAgBA,EAAYK,SAAWA,CAAxC,EAC1B,GAOYG,EAA6BX,UAAI,SAACQ,UAC7CV,EAAac,OAAO,SAACT,UAAgBA,EAAYU,YAAcL,CAA3C,EADwB,GASjCM,EAA6Bd,UAAI,SAACe,GAC7C,IAAMF,EAAYzB,EAAiB2B,GAEnC,OAAKF,EAIEF,EAA2BE,GAHzB,EAIV"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizon/amazon-ids",
3
- "version": "2.13.0",
3
+ "version": "2.14.0",
4
4
  "description": "Collection of Amazon identifiers",
5
5
  "repository": "https://github.com/bizon/amazon-ids",
6
6
  "author": "Bertrand Marron <bertrand.marron@gmail.com>",
@@ -30,15 +30,15 @@
30
30
  "devDependencies": {
31
31
  "@bizon/semantic-release-config": "^1.2.0",
32
32
  "@tsconfig/node16": "^1.0.3",
33
- "@types/jest": "^29.1.0",
33
+ "@types/jest": "^29.2.0",
34
34
  "eslint-config-xo-bizon": "^1.1.1",
35
- "jest": "^29.1.1",
35
+ "jest": "^29.2.0",
36
36
  "microbundle": "^0.15.1",
37
37
  "semantic-release": "^19.0.5",
38
38
  "ts-jest": "^29.0.3",
39
39
  "ts-node": "^10.9.1",
40
40
  "typescript": "^4.8.4",
41
- "xo": "^0.52.3"
41
+ "xo": "^0.52.4"
42
42
  },
43
43
  "keywords": [
44
44
  "amazon",