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.6.0 to 1.6.1

8

CHANGELOG.md

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

## [1.6.1](https://github.com/ScaleLeap/amazon-mws-api-sdk/compare/v1.6.0...v1.6.1) (2020-07-29)
### Bug Fixes
* fix a misnamed nested array in FeeDetail ([c34d739](https://github.com/ScaleLeap/amazon-mws-api-sdk/commit/c34d7399384ee2a8a8c1d78bb7c8ccd2b8e74825))
* remove build changes ([cd39642](https://github.com/ScaleLeap/amazon-mws-api-sdk/commit/cd39642fbddaaad6d8b08c0b3d606413decaf2d7))
# [1.6.0](https://github.com/ScaleLeap/amazon-mws-api-sdk/compare/v1.5.1...v1.6.0) (2020-07-22)

@@ -8,0 +16,0 @@

20

lib/http.js

@@ -9,2 +9,3 @@ "use strict";

const fast_xml_parser_1 = __importDefault(require("fast-xml-parser"));
const html_entities_1 = require("html-entities");
const url_1 = require("url");

@@ -86,3 +87,20 @@ const error_1 = require("./error");

const parseResponse = (response, parseString = false) => {
const responseData = parseString ? response.data : fast_xml_parser_1.default.parse(response.data);
let responseData;
if (parseString) {
responseData = response.data;
}
else {
try {
responseData = fast_xml_parser_1.default.parse(response.data, {
attributeNamePrefix: '',
ignoreAttributes: false,
attrNodeName: 'attr',
textNodeName: 'text',
tagValueProcessor: (value) => html_entities_1.XmlEntities.decode(value),
}, true);
}
catch (error) {
throw new error_1.ParsingError(error.message);
}
}
return [

@@ -89,0 +107,0 @@ responseData,

84

lib/sections/fulfillment-inbound-shipment/codec.d.ts

@@ -557,86 +557,2 @@ import { Codec, GetInterface } from 'purify-ts';

}>;
export declare const TransportDetails: Codec<{
PartneredSmallParcelData: {
PackageList: {
Dimensions: {
Unit: DimensionsUnitEnum;
Length: number;
Width: number;
Height: number;
};
Weight: {
Unit: WeightUnitEnum;
Value: number;
};
TrackingId: string;
PackageStatus: PackageStatusEnum;
CarrierName: string;
}[];
PartneredEstimate: {
Amount: {
CurrencyCode: string;
Value: string;
} | undefined;
ConfirmDeadline: Date | undefined;
VoidDeadline: Date | undefined;
} | undefined;
} | undefined;
NonPartneredSmallParcelData: {
PackageList: {
CarrierName: string;
TrackingId: string;
PackageStatus: PackageStatusEnum;
}[];
} | undefined;
PartneredLtlData: {
Contact: {
Name: string;
Phone: string;
Email: string;
Fax: string;
};
BoxCount: number;
SellerFreightClass: string | undefined;
FreightReadyDate: string;
PalletList: {
Dimensions: {
Unit: DimensionsUnitEnum;
Length: number;
Width: number;
Height: number;
};
Weight: {
Unit: WeightUnitEnum;
Value: number;
} | undefined;
IsStacked: boolean;
}[];
SellerDeclaredValue: {
CurrencyCode: string;
Value: string;
} | undefined;
AmazonCalculatedValue: {
CurrencyCode: string;
Value: string;
} | undefined;
PreviewPickupDate: Date;
PreviewDeliveryDate: Date;
PreviewFreightClass: string;
AmazonReferenceId: string;
IsBillOfLadingAvailable: boolean;
PartneredEstimate: {
Amount: {
CurrencyCode: string;
Value: string;
} | undefined;
ConfirmDeadline: Date | undefined;
VoidDeadline: Date | undefined;
} | undefined;
CarrierName: string;
} | undefined;
NonPartneredLtlData: {
CarrierName: string;
ProNumber: string;
} | undefined;
}>;
export declare const TransportResult: Codec<{

@@ -643,0 +559,0 @@ TransportStatus: TransportStatusEnum;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListInboundShipmentItemsByNextTokenResponse = exports.ListInboundShipmentItemsResponse = exports.ListInboundShipmentItems = exports.ListInboundShipmentsByNextTokenResponse = exports.ListInboundShipmentsByNextToken = exports.ListInboundShipmentsResponse = exports.ListInboundShipments = exports.InboundShipmentInfo = exports.ShipmentStatusEnum = exports.LabelPrepType = exports.LabelPrepTypeEnum = exports.GetBillOfLadingResponse = exports.GetBillOfLading = exports.GetPalletLabelsResponse = exports.GetPalletLabels = exports.GetUniquePackageLabelsResponse = exports.GetUniquePackageLabels = exports.GetPackageLabelsResponse = exports.GetPackageLabels = exports.TransportDocument = exports.VoidTransportRequestResponse = exports.VoidTransportRequest = exports.ConfirmTransportRequestResponse = exports.ConfirmTransportRequest = exports.GetTransportContentResponse = exports.GetTransportContent = exports.TransportContent = exports.TransportResult = exports.TransportDetails = exports.NonPartneredLtlDataOutput = exports.PartneredLtlDataOutput = exports.PartneredSmallParcelDataOutput = exports.NonPartneredSmallParcelDataOutput = exports.PartneredSmallParcelPackageOutput = exports.PackageStatus = exports.PartneredEstimate = exports.TransportHeader = exports.EstimateTransportRequestResponse = exports.EstimateTransportRequest = exports.PutTransportContentResponse = exports.PutTransportContent = exports.TransportStatus = exports.TransportStatusEnum = exports.GetPrepInstructionsForASINResponse = exports.GetPrepInstructionsForASIN = exports.ASINPrepInstructions = exports.GetPrepInstructionsForSKUResponse = exports.GetPrepInstructionsForSKU = exports.SKUPrepInstructions = exports.AmazonPrepFeesDetails = exports.PrepGuidance = exports.PrepGuidanceEnum = exports.BarcodeInstruction = exports.BarcodeInstructionEnum = exports.ConfirmPreorderResponse = exports.ConfirmPreorder = exports.GetPreorderInfoResponse = exports.GetPreorderInfo = exports.CreateInboundShipmentPlanResponse = exports.CreateInboundShipmentPlan = exports.InboundShipmentPlan = exports.BoxContentsFeeDetails = exports.Amount = exports.InboundShipmentPlanItem = exports.FISAddress = exports.UpdateInboundShipmentResponse = exports.UpdateInboundShipment = exports.CreateInboundShipmentResponse = exports.CreateInboundShipment = exports.GetInboundGuidanceForASINResponse = exports.GetInboundGuidanceForASIN = exports.ASINInboundGuidance = exports.InvalidASIN = exports.GetInboundGuidanceForSKUResponse = exports.GetInboundGuidanceForSKU = exports.InvalidSKU = exports.SKUInboundGuidance = exports.InboundGuidance = exports.GuidanceReason = exports.InboundGuidanceEnum = exports.GuidanceReasonEnum = void 0;
exports.ListInboundShipmentItemsByNextTokenResponse = exports.ListInboundShipmentItemsResponse = exports.ListInboundShipmentItems = exports.ListInboundShipmentsByNextTokenResponse = exports.ListInboundShipmentsByNextToken = exports.ListInboundShipmentsResponse = exports.ListInboundShipments = exports.InboundShipmentInfo = exports.ShipmentStatusEnum = exports.LabelPrepType = exports.LabelPrepTypeEnum = exports.GetBillOfLadingResponse = exports.GetBillOfLading = exports.GetPalletLabelsResponse = exports.GetPalletLabels = exports.GetUniquePackageLabelsResponse = exports.GetUniquePackageLabels = exports.GetPackageLabelsResponse = exports.GetPackageLabels = exports.TransportDocument = exports.VoidTransportRequestResponse = exports.VoidTransportRequest = exports.ConfirmTransportRequestResponse = exports.ConfirmTransportRequest = exports.GetTransportContentResponse = exports.GetTransportContent = exports.TransportContent = exports.TransportResult = exports.NonPartneredLtlDataOutput = exports.PartneredLtlDataOutput = exports.PartneredSmallParcelDataOutput = exports.NonPartneredSmallParcelDataOutput = exports.PartneredSmallParcelPackageOutput = exports.PackageStatus = exports.PartneredEstimate = exports.TransportHeader = exports.EstimateTransportRequestResponse = exports.EstimateTransportRequest = exports.PutTransportContentResponse = exports.PutTransportContent = exports.TransportStatus = exports.TransportStatusEnum = exports.GetPrepInstructionsForASINResponse = exports.GetPrepInstructionsForASIN = exports.ASINPrepInstructions = exports.GetPrepInstructionsForSKUResponse = exports.GetPrepInstructionsForSKU = exports.SKUPrepInstructions = exports.AmazonPrepFeesDetails = exports.PrepGuidance = exports.PrepGuidanceEnum = exports.BarcodeInstruction = exports.BarcodeInstructionEnum = exports.ConfirmPreorderResponse = exports.ConfirmPreorder = exports.GetPreorderInfoResponse = exports.GetPreorderInfo = exports.CreateInboundShipmentPlanResponse = exports.CreateInboundShipmentPlan = exports.InboundShipmentPlan = exports.BoxContentsFeeDetails = exports.Amount = exports.InboundShipmentPlanItem = exports.FISAddress = exports.UpdateInboundShipmentResponse = exports.UpdateInboundShipment = exports.CreateInboundShipmentResponse = exports.CreateInboundShipment = exports.GetInboundGuidanceForASINResponse = exports.GetInboundGuidanceForASIN = exports.ASINInboundGuidance = exports.InvalidASIN = exports.GetInboundGuidanceForSKUResponse = exports.GetInboundGuidanceForSKU = exports.InvalidSKU = exports.SKUInboundGuidance = exports.InboundGuidance = exports.GuidanceReason = exports.InboundGuidanceEnum = exports.GuidanceReasonEnum = void 0;
const purify_ts_1 = require("purify-ts");

@@ -296,3 +296,3 @@ const parsing_1 = require("../../parsing");

});
exports.TransportDetails = purify_ts_1.Codec.interface({
const TransportDetails = purify_ts_1.Codec.interface({
PartneredSmallParcelData: purify_ts_1.optional(exports.PartneredSmallParcelDataOutput),

@@ -308,3 +308,3 @@ NonPartneredSmallParcelData: purify_ts_1.optional(exports.NonPartneredSmallParcelDataOutput),

TransportHeader: exports.TransportHeader,
TransportDetails: exports.TransportDetails,
TransportDetails,
TransportResult: exports.TransportResult,

@@ -311,0 +311,0 @@ });

@@ -1,2 +0,1 @@

import { Parameters } from '../../http';
import { DimensionsUnitEnum } from '../merchant-fulfillment/codec';

@@ -158,2 +157,3 @@ import { RequireOnlyOne } from '../types';

Value: string;
[key: string]: string;
}

@@ -175,2 +175,3 @@ export declare type FIBDimensionsUnit = keyof typeof DimensionsUnitEnum;

Value: number;
[key: string]: string | number;
}

@@ -205,2 +206,3 @@ export declare enum PackageStatusEnum {

Fax: string;
[key: string]: string;
}

@@ -236,6 +238,42 @@ export interface Pallet {

}
/**
* Maybe define the exact return more deeply if needed?
*/
export declare const canonicalizePutTransportContentParameters: (parameters: PutTransportContentParameters) => Parameters;
export interface PartneredSmallParcelData {
'PackageList.member': PartneredSmallParcelPackageInput[];
CarrierName: string;
[key: string]: string | PartneredSmallParcelPackageInput[];
}
export interface NonPartneredSmallParcelData {
CarrierName: string;
'PackageList.member': NonPartneredSmallParcelPackageOutput[];
[key: string]: string | NonPartneredSmallParcelPackageOutput[];
}
export interface PartneredLtlData {
Contact: Contact;
BoxCount: number;
SellerFreightClass?: string;
FreightReadyDate?: string;
'PalletList.member'?: Pallet[];
TotalWeight?: FIBWeight;
SellerDeclaredValue?: FIBAmount;
[key: string]: string | undefined | number | Pallet[] | FIBWeight | FIBAmount | Contact;
}
export interface NonPartneredLtlData {
CarrierName: string;
ProNumber: string;
[key: string]: string;
}
export interface TransportDetails {
PartneredSmallParcelData?: PartneredSmallParcelData;
NonPartneredSmallParcelData?: NonPartneredSmallParcelData;
PartneredLtlData?: PartneredLtlData;
NonPartneredLtlData?: NonPartneredLtlData;
[key: string]: undefined | PartneredSmallParcelData | NonPartneredSmallParcelData | PartneredLtlData | NonPartneredLtlData;
}
export interface CanonicalizedPutTransportContentParameters {
ShipmentId: string;
IsPartnered: boolean;
ShipmentType: string;
TransportDetails: TransportDetails;
[key: string]: string | boolean | TransportDetails;
}
export declare const canonicalizePutTransportContentParameters: (parameters: PutTransportContentParameters) => CanonicalizedPutTransportContentParameters;
export interface SingleShipmentIdParameters {

@@ -242,0 +280,0 @@ ShipmentId: string;

@@ -87,5 +87,2 @@ "use strict";

})(PackageStatusEnum = exports.PackageStatusEnum || (exports.PackageStatusEnum = {}));
/**
* Maybe define the exact return more deeply if needed?
*/
exports.canonicalizePutTransportContentParameters = (parameters) => {

@@ -92,0 +89,0 @@ const { TransportDetails } = parameters;

@@ -204,3 +204,9 @@ import { Codec, GetInterface } from 'purify-ts';

NumberOfOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -258,3 +264,9 @@ LowestPrices: {

BuyBoxEligibleOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -307,3 +319,9 @@ OffersAvailableTime: Date | undefined;

NumberOfOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -361,3 +379,9 @@ LowestPrices: {

BuyBoxEligibleOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -410,3 +434,9 @@ OffersAvailableTime: Date | undefined;

NumberOfOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -464,3 +494,9 @@ LowestPrices: {

BuyBoxEligibleOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -512,3 +548,9 @@ OffersAvailableTime: Date | undefined;

NumberOfOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -566,3 +608,9 @@ LowestPrices: {

BuyBoxEligibleOffers: {
OfferCount: number;
OfferCount: number | {
text: number;
attr: {
condition: string | undefined;
fulfillmentChannel: string | undefined;
};
};
} | undefined;

@@ -569,0 +617,0 @@ OffersAvailableTime: Date | undefined;

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

FinalFee: MoneyType,
IncludedFeeDetailList: purify_ts_1.optional(parsing_1.ensureArray('IncludedFeeDetail', purify_ts_1.lazy(() => FeeDetail))),
IncludedFeeDetailList: purify_ts_1.optional(parsing_1.ensureArray('FeeDetail', purify_ts_1.lazy(() => FeeDetail))),
});

@@ -143,3 +143,12 @@ const FeesEstimate = purify_ts_1.Codec.interface({

const OfferCountType = purify_ts_1.Codec.interface({
OfferCount: purify_ts_1.number,
OfferCount: purify_ts_1.oneOf([
purify_ts_1.number,
purify_ts_1.Codec.interface({
text: purify_ts_1.number,
attr: purify_ts_1.Codec.interface({
condition: purify_ts_1.optional(purify_ts_1.string),
fulfillmentChannel: purify_ts_1.optional(purify_ts_1.string),
}),
}),
]),
});

@@ -146,0 +155,0 @@ const LowestPrice = purify_ts_1.Codec.interface({

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

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

@@ -48,2 +48,3 @@ "files": [

"fast-xml-parser": "3.17.4",
"html-entities": "1.3.1",
"purify-ts": "0.16.0-beta.5",

@@ -54,3 +55,3 @@ "ts-error": "1.0.6"

"@microsoft/api-extractor": "7.8.1",
"@scaleleap/config": "2.0.2",
"@scaleleap/config": "2.0.3",
"@scaleleap/jest-polly": "1.5.2",

@@ -62,3 +63,3 @@ "@scaleleap/utils": "1.7.6",

"ajv": "6.12.3",
"danger": "10.2.1",
"danger": "10.3.0",
"global-agent": "2.1.12",

@@ -70,3 +71,2 @@ "is-ci": "2.0.0",

"ts-node": "8.10.2",
"ts-node-dev": "1.0.0-pre.52",
"tsconfigs": "4.0.2",

@@ -73,0 +73,0 @@ "typescript": "3.9.7"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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