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

amazon-sp-api

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon-sp-api - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

3

lib/resources/orders.js

@@ -12,3 +12,4 @@ module.exports = {

'getOrderItems',
'getOrderItemsBuyerInfo'
'getOrderItemsBuyerInfo',
'updateShipmentStatus'
],

@@ -15,0 +16,0 @@ ...require('./versions/orders/orders_v0')

@@ -81,4 +81,18 @@ const utils = require('../../../utils');

});
},
updateShipmentStatus:(req_params) => {
utils.checkParams(req_params, {
path:{
orderId:{
type:'string'
}
}
});
return Object.assign(req_params, {
method:'POST',
api_path:'/orders/v0/orders/' + req_params.path.orderId + '/shipment',
restore_rate:180 // TODO: No restore_rate in official docs yet, assuming same rate as other operations of orders endpoint
});
}
}
};

@@ -51,2 +51,13 @@ import {

CreateInboundShipmentRequestBody,
PutTransportDetailsPath,
PutTransportDetailsBody,
PutTransportDetailsResponse,
GetTransportDetailsPath,
GetTransportDetailsResponse,
VoidTransportPath,
VoidTransportResponse,
EstimateTransportPath,
EstimateTransportResponse,
ConfirmTransportPath,
ConfirmTransportResponse
} from "./operations/fulfillmentInbound";

@@ -188,2 +199,7 @@ import {

| "getOrderItemsBuyerInfo"
| "getTransportDetails"
| "putTransportDetails"
| "voidTransport"
| "estimateTransport"
| "confirmTransport"
| string;

@@ -261,2 +277,12 @@

? CreateInboundShipmentPlanResponse
: TOperation extends "putTransportDetails"
? PutTransportDetailsResponse
: TOperation extends "getTransportDetails"
? GetTransportDetailsResponse
: TOperation extends "voidTransport"
? VoidTransportResponse
: TOperation extends "estimateTransport"
? EstimateTransportResponse
: TOperation extends "confirmTransport"
? ConfirmTransportResponse
: any;

@@ -358,2 +384,12 @@

? GetOrderBuyerInfoPath
: TOperation extends "putTransportDetails"
? PutTransportDetailsPath
: TOperation extends "getTransportDetails"
? GetTransportDetailsPath
: TOperation extends "voidTransport"
? VoidTransportPath
: TOperation extends "estimateTransport"
? EstimateTransportPath
: TOperation extends "confirmTransport"
? ConfirmTransportPath
: any;

@@ -377,2 +413,4 @@

? CreateReportBody
: TOperation extends "putTransportDetails"
? PutTransportDetailsBody
: any;

@@ -379,0 +417,0 @@

@@ -31,3 +31,3 @@ import { BaseResponse } from "../baseTypes";

export interface UpdateInboundShipmentPath extends BasePath {}
export interface UpdateInboundShipmentPath extends BasePath { }

@@ -40,8 +40,8 @@ export interface UpdateInboundShipmentResponse extends BaseResponse {

export interface CreateInboundShipmentPath extends BasePath {}
export interface CreateInboundShipmentPath extends BasePath { }
export interface CreateInboundShipmentResponse
extends UpdateInboundShipmentResponse {}
extends UpdateInboundShipmentResponse { }
export interface GetPreorderInfoPath extends BasePath {}
export interface GetPreorderInfoPath extends BasePath { }

@@ -321,1 +321,217 @@ export interface GetPreorderInfoQuery {

}
export interface PutTransportDetailsPath extends BasePath { }
export interface PutTransportDetailsBody {
IsPartnered: boolean;
ShipmentType: ShipmentType;
TransportDetails: TransportDetailInput;
}
type ShipmentType = "SP" | "LTL";
interface TransportDetailInput {
PartneredSmallParcelData?: PartneredSmallParcelDataInput;
NonPartneredSmallParcelData?: NonPartneredSmallParcelDataInput;
PartneredLtlData?: PartneredLtlDataInput;
NonPartneredLtlData?: NonPartneredLtlDataInput;
}
interface PartneredSmallParcelDataInput {
PackageList?: PartneredSmallParcelPackageInput[];
CarrierName?: string;
}
interface PartneredSmallParcelPackageInput {
Dimensions: Dimensions;
Weight: Weight;
}
interface NonPartneredSmallParcelDataInput {
CarrierName: string;
PackageList: NonPartneredSmallParcelPackageInput[];
}
interface NonPartneredSmallParcelPackageInput {
TrackingId: string;
}
interface PartneredLtlDataInput {
Contact?: Contact;
BoxCount?: number;
SellerFreightClass?: SellerFreightClass;
FreightReadyDate?: string;
PalletList?: Pallet[];
TotalWeight?: Weight;
SellerDeclaredValue: Amount;
}
interface NonPartneredLtlDataInput {
CarrierName: string;
ProNumber: string;
}
interface Dimensions {
Length: number;
Width: number;
Height: number;
Unit: UnitOfMeasurement;
}
type UnitOfMeasurement = "inches" | "centimeters";
interface Weight {
Value: number;
Unit: UnitOfWeight;
}
type UnitOfWeight = "pounds" | "kilograms";
interface Contact {
Name: string;
Phone: string;
Email: string;
Fax?: string;
}
interface Pallet {
Dimensions: Dimensions;
Weight?: Weight;
IsStacked: boolean;
}
export interface PutTransportDetailsResponse extends BaseResponse {
payload?: CommonTransportResult;
}
interface CommonTransportResult {
TransportResult?: TransportResult;
}
interface TransportResult {
TransportStatus: TransportStatus;
ErrorCode?: string;
ErrorDescription?: string;
}
type TransportStatus =
| "WORKING"
| "ESTIMATING"
| "ESTIMATED"
| "ERROR_ON_ESTIMATING"
| "CONFIRMING"
| "CONFIRMED"
| "ERROR_ON_CONFIRMING"
| "VOIDING"
| "VOIDED"
| "ERROR_IN_VOIDING"
| "ERROR";
export interface GetTransportDetailsPath extends BasePath { }
export interface GetTransportDetailsResponse extends BaseResponse {
payload?: GetTransportDetailsResult;
}
interface GetTransportDetailsResult {
TransportContent?: TransportContent;
}
interface TransportContent {
TransportHeader: TransportHeader;
TransportDetails: TransportDetailOutput;
TransportResult: TransportResult;
}
interface TransportHeader {
SellerId: string;
ShipmentId: string;
IsPartnered: string;
ShipmentType: ShipmentType;
}
interface TransportDetailOutput {
PartneredSmallParcelData?: PartneredSmallParcelDataOutput;
NonPartneredSmallParcelData?: NonPartneredSmallParcelDataOutput;
PartneredLtlData?: PartneredLtlDataOutput;
NonPartneredLtlData?: NonPartneredLtlDataOutput;
}
interface PartneredSmallParcelDataOutput {
PackageList: PartneredSmallParcelPackageOutput[];
PartneredEstimate?: PartneredEstimate;
}
interface PartneredSmallParcelPackageOutput {
Dimensions: Dimensions;
Weight: Weight;
CarrierName: string;
TrackingId: string;
PackageStatus: PackageStatus;
}
interface PartneredEstimate {
Amount: Amount;
ConfirmDeadline?: string;
VoidDeadline?: string;
}
interface NonPartneredSmallParcelDataOutput {
PackageList: NonPartneredSmallParcelPackageOutput[];
}
interface NonPartneredSmallParcelPackageOutput {
CarrierName: string;
TrackingId: string;
PackageStatus: PackageStatus;
}
interface PartneredLtlDataOutput {
Contact: Contact;
BoxCount: number;
SellerFreightClass?: SellerFreightClass;
FreightReadyDate: string;
PalletList: Pallet[];
TotalWeight: Weight;
SellerDeclaredValue?: Amount;
AmazonCalculatedValue?: Amount;
PreviewPickupDate: string;
PreviewDeliveryDate: string;
PreviewFreightClass: SellerFreightClass;
AmazonReferenceId: string;
IsBillOfLadingAvailable: boolean;
PartneredEstimate?: PartneredEstimate;
CarrierName: string;
}
interface NonPartneredLtlDataOutput {
CarrierName: string;
ProNumber: string;
}
type PackageStatus =
| "SHIPPED"
| "IN_TRANSIT"
| "DELIVERED"
| "CHECKED_IN"
| "RECEIVING"
| "CLOSED"
| "DELETED";
export interface VoidTransportPath extends BasePath { }
export interface VoidTransportResponse extends BaseResponse {
payload?: CommonTransportResult;
}
export interface EstimateTransportPath extends BasePath { }
export interface EstimateTransportResponse extends BaseResponse {
payload?: CommonTransportResult;
}
export interface ConfirmTransportPath extends BasePath { }
export interface ConfirmTransportResponse extends BaseResponse {
payload?: CommonTransportResult;
}
{
"name": "amazon-sp-api",
"version": "0.6.4",
"version": "0.6.5",
"description": "Amazon Selling Partner API client",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,3 +16,3 @@ # amazon-sp-api (client for the Amazon Selling Partner API)

* [Exchange an authorization code for a refresh token](#exchange-an-authorization-code-for-a-refresh-token)
* [Request access token and role credentials manually](#request-access-token-and-role-credentials-manually)
* [Request access token and role credentials](#request-access-token-and-role-credentials)
* [Call the API](#call-the-api)

@@ -19,0 +19,0 @@ * [Examples](#examples)

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