@shipengine/js-api
Advanced tools
| export * from "./types"; |
| import { WeightUnit } from "../weight"; | ||
| /** | ||
| * @category Entities | ||
| */ | ||
| export type WeightBandIncremental = { | ||
| increment: number; | ||
| minimum: number; | ||
| unit: WeightUnit; | ||
| }; | ||
| /** | ||
| * @category Entities | ||
| */ | ||
| export type WeightBandMinMax = { | ||
| maximum: number; | ||
| minimum: number; | ||
| unit: WeightUnit; | ||
| }; |
| import { AxiosInstance } from "axios"; | ||
| import { Currency, Money } from "../payments"; | ||
| import { Carrier, CarrierAutoFundingSettings, CarrierAutoFundingSettingsResponse, CarrierConnection, WalletTransactionHistory } from "./types"; | ||
| import { Carrier, CarrierAutoFundingSettings, CarrierAutoFundingSettingsResponse, CarrierConnection, CarrierRatePackageFormat, CarrierService, WalletTransactionHistory } from "./types"; | ||
| export declare class CarriersAPI { | ||
@@ -18,2 +18,8 @@ private client; | ||
| getWalletHistory: (startDate: Date, endDate: Date, page: number) => Promise<import("axios").AxiosResponse<WalletTransactionHistory, any>>; | ||
| getServices: (carrierId: string) => Promise<import("axios").AxiosResponse<{ | ||
| services: CarrierService[]; | ||
| }, any>>; | ||
| getRatePackageFormats: (carrierId: string) => Promise<import("axios").AxiosResponse<{ | ||
| ratePackageFormats: CarrierRatePackageFormat[]; | ||
| }, any>>; | ||
| getCountries: (carrierId: string) => Promise<import("axios").AxiosResponse<{ | ||
@@ -20,0 +26,0 @@ countries: string[]; |
+15
-0
| import { Address } from "../addresses"; | ||
| import { DimensionsWithUnit } from "../dimensions"; | ||
| import { CreditCard, Money } from "../payments"; | ||
| import { WeightWithUnit } from "../weight"; | ||
| /** | ||
@@ -53,2 +54,16 @@ * @category Entities | ||
| */ | ||
| export interface CarrierRatePackageFormat { | ||
| apiCode: string; | ||
| carrierPackageTypeCode: string; | ||
| description?: string; | ||
| dimensions?: DimensionsWithUnit; | ||
| id: string; | ||
| name: string; | ||
| packageTypeId?: string; | ||
| status: string; | ||
| weight: WeightWithUnit; | ||
| } | ||
| /** | ||
| * @category Entities | ||
| */ | ||
| export interface Carrier { | ||
@@ -55,0 +70,0 @@ accountNumber: string; |
@@ -9,4 +9,9 @@ /** | ||
| export interface Dimensions { | ||
| girth?: number; | ||
| height: number; | ||
| length: number; | ||
| lengthPlusGirth?: number; | ||
| noThreeSidesExceed?: number; | ||
| noTwoSidesExceed?: number; | ||
| volume?: number; | ||
| width: number; | ||
@@ -13,0 +18,0 @@ } |
+1
-1
| { | ||
| "name": "@shipengine/js-api", | ||
| "version": "0.17.0", | ||
| "version": "0.18.0", | ||
| "main": "./index.js", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
@@ -0,2 +1,4 @@ | ||
| import { CarrierRatePackageFormat, CarrierService } from "../carriers"; | ||
| import { Currency } from "../payments"; | ||
| import { WeightBandIncremental, WeightBandMinMax } from "../weight-band"; | ||
| /** | ||
@@ -12,2 +14,17 @@ * @category Entities | ||
| */ | ||
| export type RateService = Pick<CarrierService, "serviceCode"> & { | ||
| packageTypes: RatePackageType[]; | ||
| }; | ||
| /** | ||
| * @category Entities | ||
| */ | ||
| export type RatePackageType = CarrierRatePackageFormat & { | ||
| weightBands: { | ||
| incrementalBands: WeightBandIncremental[]; | ||
| minMaxBands: WeightBandMinMax[]; | ||
| }; | ||
| }; | ||
| /** | ||
| * @category Entities | ||
| */ | ||
| export interface RateCard { | ||
@@ -19,2 +36,3 @@ carrierId: string; | ||
| name: string; | ||
| services?: RateService[]; | ||
| shipFrom?: ShipFromLocation; | ||
@@ -24,2 +42,5 @@ startDate?: string; | ||
| } | ||
| /** | ||
| * @category Entities | ||
| */ | ||
| export type RateCardInput = Partial<RateCard> & Pick<RateCard, "carrierId" | "name">; |
+1
-0
@@ -21,1 +21,2 @@ export * from "./account-settings/types"; | ||
| export * from "./weight/types"; | ||
| export * from "./weight-band/types"; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
291941
0.79%66
3.13%7862
1.05%