New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

usps-webtools-promise

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usps-webtools-promise - npm Package Compare versions

Comparing version

to
3.0.0-beta.2

95

dist/lookups/pricing-rate-lookup.d.ts

@@ -53,50 +53,53 @@ import type USPSClass from "../usps";

}
interface RateV4Postage {
CLASSID?: string;
CommercialPlusRate?: string;
CommercialRate?: string;
DimensionalWeightCommercialPlusRate?: string;
DimensionalWeightRate?: string;
MailService?: string;
MaxDimensions?: string;
Rate?: string;
ServiceInformation?: string;
SpecialServices?: [
{
SpecialService?: {
Available?: string;
AvailableCPP?: string;
AvailableOnline?: string;
DeclaredValueRequired?: string;
DueSenderRequired?: string;
Price?: string;
PriceCPP?: string;
PriceOnline?: string;
ServiceID?: string;
ServiceName?: string;
};
}
];
}
interface RateV4Package {
Container?: string;
Error?: string;
FirstClassMailType?: string;
Girth?: string;
Height?: string;
Length?: string;
Machinable?: string;
Ounces: number;
Postage: RateV4Postage;
Pounds: number;
Restriction: {
Restrictions?: string;
};
Width?: string;
ZipDestination: string;
ZipOrigination: string;
Zone?: string;
}
export interface RateV4Response {
Error?: ErrorResponse;
Package?: {
Container?: string;
Error?: string;
FirstClassMailType?: string;
Girth?: string;
Height?: string;
Length?: string;
Machinable?: string;
Ounces: number;
Postage: {
CLASSID?: string;
CommercialPlusRate?: string;
CommercialRate?: string;
DimensionalWeightCommercialPlusRate?: string;
DimensionalWeightRate?: string;
MailService?: string;
MaxDimensions?: string;
Rate?: string;
ServiceInformation?: string;
SpecialServices?: [
{
SpecialService?: {
Available?: string;
AvailableCPP?: string;
AvailableOnline?: string;
DeclaredValueRequired?: string;
DueSenderRequired?: string;
Price?: string;
PriceCPP?: string;
PriceOnline?: string;
ServiceID?: string;
ServiceName?: string;
};
}
];
};
Pounds: number;
Restriction: {
Restrictions?: string;
};
Width?: string;
ZipDestination: string;
ZipOrigination: string;
Zone?: string;
};
Package?: RateV4Package;
}
export default function (this: USPSClass, pricingRate: PricingRateInput): Promise<RateV4Response["Package"]["Postage"] | Error>;
export default function (this: USPSClass, pricingRate: PricingRateInput): Promise<RateV4Postage | Error>;
export {};

@@ -27,4 +27,4 @@ "use strict";

response = (await request_1.default("RateV4", "RateV4", "Package", this.config, parameters));
if (response && response.Postage) {
return response.Postage;
if (response && response.Package) {
return response.Package.Postage;
}

@@ -31,0 +31,0 @@ throw new Error("Can't find result");

@@ -13,4 +13,4 @@ import verify from "./address-validate";

export interface Config {
properCase: boolean;
staging: boolean;
properCase?: boolean;
staging?: boolean;
userId: string;

@@ -17,0 +17,0 @@ }

@@ -5,3 +5,3 @@ {

"description": "API wrapper for the USPS Web-Tools, with Promises!",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"main": "./dist/usps.js",

@@ -8,0 +8,0 @@ "types": "./dist/usps.d.ts",