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

@scaleleap/amazon-mws-api-sdk

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scaleleap/amazon-mws-api-sdk - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # Changelog

# [1.8.0](https://github.com/ScaleLeap/amazon-mws-api-sdk/compare/v1.7.0...v1.8.0) (2020-08-08)
### Features
* complete products remaining sub attributes ([b2b5361](https://github.com/ScaleLeap/amazon-mws-api-sdk/commit/b2b536136e51d958e6e73f713675b724f257d991))
# [1.7.0](https://github.com/ScaleLeap/amazon-mws-api-sdk/compare/v1.6.2...v1.7.0) (2020-07-29)

@@ -8,0 +15,0 @@

1

lib/http.d.ts

@@ -71,2 +71,3 @@ import { AmazonMarketplace } from '@scaleleap/amazon-marketplaces';

export declare const cleanParameters: (parameters: Parameters, baseObject?: Record<string, string>, outerKey?: string | undefined) => CleanParameters;
export declare const parseResponse: <T>(response: RequestResponse, parseString?: boolean) => [string | T, RequestMeta];
export declare class HttpClient {

@@ -73,0 +74,0 @@ private options;

9

lib/http.js

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClient = exports.cleanParameters = exports.Resource = void 0;
exports.HttpClient = exports.parseResponse = exports.cleanParameters = exports.Resource = void 0;
const axios_1 = __importDefault(require("axios"));

@@ -87,3 +87,3 @@ const fast_xml_parser_1 = __importDefault(require("fast-xml-parser"));

});
const parseResponse = (response, parseString = false) => {
exports.parseResponse = (response, parseString = false) => {
let responseData;

@@ -98,2 +98,3 @@ if (parseString) {

ignoreAttributes: false,
parseAttributeValue: true,
attrNodeName: 'attr',

@@ -188,5 +189,5 @@ textNodeName: 'text',

if (info.action === 'GetReport' || info.action === 'GetFeedSubmissionResult') {
return parseResponse(response, true);
return exports.parseResponse(response, true);
}
return parseResponse(response);
return exports.parseResponse(response);
}

@@ -193,0 +194,0 @@ catch (error) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetProductCategoriesForASINResponse = exports.GetProductCategoriesForASIN = exports.GetProductCategoriesForSKUResponse = exports.GetProductCategoriesForSKU = exports.GetMyPriceForASINResponse = exports.GetMyPriceForASINResult = exports.GetMyPriceForSKUResponse = exports.GetMyPriceForSKUResult = exports.GetLowestPricedOffersForASINResponse = exports.GetLowestPricedOffersForASIN = exports.GetLowestPricedOffersForSKUResponse = exports.GetLowestPricedOffersForSKU = exports.GetLowestOfferListingsForASINResponse = exports.GetLowestOfferListingsForASINResult = exports.GetLowestOfferListingsForSKUResponse = exports.GetLowestOfferListingsForSKUResult = exports.GetCompetitivePricingForASINResponse = exports.GetCompetitivePricingForASINResult = exports.GetCompetitivePricingForSKUResponse = exports.GetCompetitivePricingForSKUResult = exports.GetMatchingProductForIdResponseCodec = exports.GetMatchingProductForIdResponse = exports.GetMatchingProductResponse = exports.GetMatchingProductResult = exports.ListMatchingProductsResponse = exports.ListMatchingProducts = exports.GetMyFeesEstimateResponse = exports.GetMyFeesEstimate = exports.PointsCodec = exports.IdTypeEnum = exports.StatusEnum = exports.ItemConditionEnum = void 0;
exports.GetProductCategoriesForASINResponse = exports.GetProductCategoriesForASIN = exports.GetProductCategoriesForSKUResponse = exports.GetProductCategoriesForSKU = exports.GetMyPriceForASINResponse = exports.GetMyPriceForASINResult = exports.GetMyPriceForSKUResponse = exports.GetMyPriceForSKUResult = exports.GetLowestPricedOffersForASINResponse = exports.GetLowestPricedOffersForASIN = exports.GetLowestPricedOffersForSKUResponse = exports.GetLowestPricedOffersForSKU = exports.GetLowestOfferListingsForASINResponse = exports.GetLowestOfferListingsForASINResult = exports.GetLowestOfferListingsForSKUResponse = exports.GetLowestOfferListingsForSKUResult = exports.GetCompetitivePricingForASINResponse = exports.GetCompetitivePricingForASINResult = exports.GetCompetitivePricingForSKUResponse = exports.GetCompetitivePricingForSKUResult = exports.GetMatchingProductForIdResponseCodec = exports.GetMatchingProductForIdResponse = exports.GetMatchingProductResponse = exports.GetMatchingProductResult = exports.ListMatchingProductsResponse = exports.ListMatchingProducts = exports.Product = exports.GetMyFeesEstimateResponse = exports.GetMyFeesEstimate = exports.PointsCodec = exports.IdTypeEnum = exports.StatusEnum = exports.ItemConditionEnum = void 0;
const purify_ts_1 = require("purify-ts");

@@ -88,8 +88,96 @@ const error_codec_1 = require("../../error-codec");

});
const Product = purify_ts_1.record(purify_ts_1.string, purify_ts_1.unknown);
// Amazon C# library has properties that are a type "any" they call an "abstract object"
const AbstractObject = purify_ts_1.unknown;
const AttributeSetList = AbstractObject;
const ASINIdentifier = purify_ts_1.Codec.interface({
MarketplaceId: purify_ts_1.string,
ASIN: parsing_1.ensureString,
});
const SellerSKUIdentifier = purify_ts_1.Codec.interface({
MarketplaceId: purify_ts_1.string,
SellerId: parsing_1.ensureString,
SellerSKU: parsing_1.ensureString,
});
const IdentifierType = purify_ts_1.Codec.interface({
MarketplaceASIN: purify_ts_1.optional(ASINIdentifier),
SKUIdentifier: purify_ts_1.optional(SellerSKUIdentifier),
});
const RelationshipList = AbstractObject;
const PriceType = purify_ts_1.Codec.interface({
LandedPrice: purify_ts_1.optional(MoneyType),
ListingPrice: purify_ts_1.optional(MoneyType),
Shipping: purify_ts_1.optional(MoneyType),
Points: purify_ts_1.optional(exports.PointsCodec),
});
const CompetitivePriceType = purify_ts_1.Codec.interface({
attr: purify_ts_1.Codec.interface({
condition: purify_ts_1.string,
subcondition: purify_ts_1.string,
belongsToRequester: purify_ts_1.optional(purify_ts_1.boolean),
}),
CompetitivePriceId: parsing_1.ensureString,
Price: PriceType,
});
const CompetitivePriceList = parsing_1.ensureArray('CompetitivePrice', CompetitivePriceType);
const OfferListingCountType = purify_ts_1.Codec.interface({
attr: purify_ts_1.Codec.interface({
condition: purify_ts_1.string,
}),
text: purify_ts_1.number,
});
const NumberOfOfferListingsList = parsing_1.ensureArray('OfferListingCount', OfferListingCountType);
const CompetitivePricingType = purify_ts_1.Codec.interface({
CompetitivePrices: purify_ts_1.optional(CompetitivePriceList),
NumberOfOfferListings: purify_ts_1.optional(NumberOfOfferListingsList),
TradeInValue: purify_ts_1.optional(MoneyType),
});
const SalesRankType = purify_ts_1.Codec.interface({
ProductCategoryId: purify_ts_1.optional(parsing_1.ensureString),
Rank: purify_ts_1.optional(purify_ts_1.number),
});
const SalesRankList = parsing_1.ensureArray('SalesRank', SalesRankType);
const ShippingTimeType = purify_ts_1.Codec.interface({
Max: purify_ts_1.string,
});
const QualifiersType = purify_ts_1.Codec.interface({
ItemCondition: purify_ts_1.optional(parsing_1.ensureString),
ItemSubcondition: purify_ts_1.optional(parsing_1.ensureString),
FulfillmentChannel: purify_ts_1.optional(parsing_1.ensureString),
ShipsDomestically: purify_ts_1.optional(parsing_1.ensureString),
ShippingTime: purify_ts_1.optional(ShippingTimeType),
SellerPositiveFeedbackRating: purify_ts_1.optional(parsing_1.ensureString),
});
const LowestOfferListingType = purify_ts_1.Codec.interface({
Qualifiers: purify_ts_1.optional(QualifiersType),
NumberOfOfferListingsConsidered: purify_ts_1.optional(purify_ts_1.number),
SellerFeedbackCount: purify_ts_1.optional(purify_ts_1.number),
Price: purify_ts_1.optional(PriceType),
MultipleOffersAtLowestPrice: purify_ts_1.optional(purify_ts_1.string),
});
const LowestOfferListingList = parsing_1.ensureArray('LowestOfferListing', LowestOfferListingType);
const OfferType = purify_ts_1.Codec.interface({
BuyingPrice: purify_ts_1.optional(PriceType),
RegularPrice: purify_ts_1.optional(MoneyType),
FulfillmentChannel: purify_ts_1.optional(purify_ts_1.string),
ItemCondition: purify_ts_1.optional(purify_ts_1.string),
ItemSubCondition: purify_ts_1.optional(purify_ts_1.string),
SellerId: purify_ts_1.optional(purify_ts_1.string),
SellerSKU: purify_ts_1.optional(purify_ts_1.string),
});
const OffersList = parsing_1.ensureArray('Offer', OfferType);
const Offers = OffersList;
exports.Product = purify_ts_1.Codec.interface({
Identifiers: purify_ts_1.optional(IdentifierType),
AttributeSets: purify_ts_1.optional(AttributeSetList),
Relationships: purify_ts_1.optional(RelationshipList),
CompetitivePricing: purify_ts_1.optional(CompetitivePricingType),
SalesRankings: purify_ts_1.optional(SalesRankList),
LowestOfferListings: purify_ts_1.optional(LowestOfferListingList),
Offers: purify_ts_1.optional(Offers),
});
const SingleProductInterface = purify_ts_1.Codec.interface({
Product,
Product: exports.Product,
});
exports.ListMatchingProducts = purify_ts_1.Codec.interface({
Products: parsing_1.ensureArray('Product', Product),
Products: parsing_1.ensureArray('Product', exports.Product),
});

@@ -106,3 +194,3 @@ exports.ListMatchingProductsResponse = purify_ts_1.Codec.interface({

const ProductsCodec = purify_ts_1.Codec.interface({
Products: parsing_1.ensureArray('Product', Product),
Products: parsing_1.ensureArray('Product', exports.Product),
});

@@ -127,3 +215,3 @@ const ErrorCodec = purify_ts_1.Codec.interface({

AllOfferListingsConsidered: purify_ts_1.boolean,
Product,
Product: exports.Product,
}));

@@ -135,3 +223,3 @@ exports.GetLowestOfferListingsForSKUResponse = purify_ts_1.Codec.interface({

AllOfferListingsConsidered: purify_ts_1.boolean,
Product,
Product: exports.Product,
}));

@@ -138,0 +226,0 @@ exports.GetLowestOfferListingsForASINResponse = purify_ts_1.Codec.interface({

@@ -22,3 +22,3 @@ {

"homepage": "https://github.com/ScaleLeap/amazon-mws-api-sdk/#readme",
"version": "1.7.0",
"version": "1.8.0",
"main": "lib/index.js",

@@ -56,5 +56,5 @@ "files": [

"@scaleleap/jest-polly": "1.5.2",
"@scaleleap/utils": "1.7.6",
"@scaleleap/utils": "1.7.10",
"@types/is-ci": "2.0.0",
"@types/jest": "26.0.3",
"@types/jest": "26.0.8",
"@types/node": "13.13.4",

@@ -65,5 +65,5 @@ "ajv": "6.12.3",

"is-ci": "2.0.0",
"jest": "26.1.0",
"jest": "26.2.2",
"rimraf": "3.0.2",
"ts-jest": "26.1.1",
"ts-jest": "26.1.4",
"ts-node": "8.10.2",

@@ -70,0 +70,0 @@ "tsconfigs": "4.0.2",

@@ -97,2 +97,4 @@ ![](https://raw.githubusercontent.com/ScaleLeap/amazon-mws-api-sdk/master/docs/assets/header.png)

## [Contributing](/CONTRIBUTING.md)
## Authors or Acknowledgments

@@ -99,0 +101,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc