@shipengine/js-api 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +16 -0
- package/index.mjs +16 -1
- package/package.json +1 -1
- package/rate-cards/api.d.ts +9 -0
- package/rate-cards/index.d.ts +2 -0
- package/rate-cards/types.d.ts +21 -0
- package/types.d.ts +1 -0
package/client.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { FundingSourcesAPI } from "./funding-sources";
|
|
|
7
7
|
import { InsuranceAPI } from "./insurance";
|
|
8
8
|
import { LabelsAPI } from "./labels";
|
|
9
9
|
import { OrderSourcesAPI } from "./order-sources";
|
|
10
|
+
import { RateCardsAPI } from "./rate-cards";
|
|
10
11
|
import { RatesAPI } from "./rates";
|
|
11
12
|
import { SalesOrderShipmentsAPI } from "./sales-order-shipments";
|
|
12
13
|
import { SalesOrdersAPI } from "./sales-orders";
|
|
@@ -30,6 +31,7 @@ export declare class ShipEngineAPI {
|
|
|
30
31
|
get insurance(): InsuranceAPI;
|
|
31
32
|
get labels(): LabelsAPI;
|
|
32
33
|
get orderSources(): OrderSourcesAPI;
|
|
34
|
+
get rateCards(): RateCardsAPI;
|
|
33
35
|
get rates(): RatesAPI;
|
|
34
36
|
get salesOrderShipments(): SalesOrderShipmentsAPI;
|
|
35
37
|
get salesOrders(): SalesOrdersAPI;
|
package/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./labels";
|
|
|
12
12
|
export * from "./order-sources";
|
|
13
13
|
export * from "./payments";
|
|
14
14
|
export * from "./rates";
|
|
15
|
+
export * from "./rate-cards";
|
|
15
16
|
export * from "./relay-points";
|
|
16
17
|
export * from "./resources";
|
|
17
18
|
export * from "./sales-order-shipments";
|
package/index.js
CHANGED
|
@@ -5224,6 +5224,18 @@ class OrderSourcesAPI {
|
|
|
5224
5224
|
}
|
|
5225
5225
|
}
|
|
5226
5226
|
|
|
5227
|
+
class RateCardsAPI {
|
|
5228
|
+
constructor(client) {
|
|
5229
|
+
this.client = client;
|
|
5230
|
+
this.list = (carrierIds) => {
|
|
5231
|
+
return this.client.get(
|
|
5232
|
+
`/v1/rate-cards?carrier_ids=${carrierIds.toString()}`
|
|
5233
|
+
);
|
|
5234
|
+
};
|
|
5235
|
+
this.client = client;
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
|
|
5227
5239
|
class RatesAPI {
|
|
5228
5240
|
constructor(client) {
|
|
5229
5241
|
this.client = client;
|
|
@@ -5494,6 +5506,9 @@ class ShipEngineAPI {
|
|
|
5494
5506
|
get orderSources() {
|
|
5495
5507
|
return new OrderSourcesAPI(this.client);
|
|
5496
5508
|
}
|
|
5509
|
+
get rateCards() {
|
|
5510
|
+
return new RateCardsAPI(this.client);
|
|
5511
|
+
}
|
|
5497
5512
|
get rates() {
|
|
5498
5513
|
return new RatesAPI(this.client);
|
|
5499
5514
|
}
|
|
@@ -5526,6 +5541,7 @@ exports.InsuranceAPI = InsuranceAPI;
|
|
|
5526
5541
|
exports.InsuranceProviderType = InsuranceProviderType;
|
|
5527
5542
|
exports.LabelsAPI = LabelsAPI;
|
|
5528
5543
|
exports.OrderSourcesAPI = OrderSourcesAPI;
|
|
5544
|
+
exports.RateCardsAPI = RateCardsAPI;
|
|
5529
5545
|
exports.RatesAPI = RatesAPI;
|
|
5530
5546
|
exports.SE = types;
|
|
5531
5547
|
exports.SalesOrderShipmentsAPI = SalesOrderShipmentsAPI;
|
package/index.mjs
CHANGED
|
@@ -5220,6 +5220,18 @@ class OrderSourcesAPI {
|
|
|
5220
5220
|
}
|
|
5221
5221
|
}
|
|
5222
5222
|
|
|
5223
|
+
class RateCardsAPI {
|
|
5224
|
+
constructor(client) {
|
|
5225
|
+
this.client = client;
|
|
5226
|
+
this.list = (carrierIds) => {
|
|
5227
|
+
return this.client.get(
|
|
5228
|
+
`/v1/rate-cards?carrier_ids=${carrierIds.toString()}`
|
|
5229
|
+
);
|
|
5230
|
+
};
|
|
5231
|
+
this.client = client;
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5234
|
+
|
|
5223
5235
|
class RatesAPI {
|
|
5224
5236
|
constructor(client) {
|
|
5225
5237
|
this.client = client;
|
|
@@ -5490,6 +5502,9 @@ class ShipEngineAPI {
|
|
|
5490
5502
|
get orderSources() {
|
|
5491
5503
|
return new OrderSourcesAPI(this.client);
|
|
5492
5504
|
}
|
|
5505
|
+
get rateCards() {
|
|
5506
|
+
return new RateCardsAPI(this.client);
|
|
5507
|
+
}
|
|
5493
5508
|
get rates() {
|
|
5494
5509
|
return new RatesAPI(this.client);
|
|
5495
5510
|
}
|
|
@@ -5507,4 +5522,4 @@ class ShipEngineAPI {
|
|
|
5507
5522
|
}
|
|
5508
5523
|
}
|
|
5509
5524
|
|
|
5510
|
-
export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngineAPI, ShipmentsAPI, WarehousesAPI, getEndUserIpAddress, isCodedError, isCodedErrors };
|
|
5525
|
+
export { AccountSettingsAPI, AddressesAPI, CarriersAPI, CodedError, ConfirmationType, CreditCardVendor, Currency, CustomPackagesAPI, CustomsContentsType, CustomsNonDeliveryType, FundingSourcesAPI, InsuranceAPI, InsuranceProviderType, LabelsAPI, OrderSourcesAPI, RateCardsAPI, RatesAPI, types as SE, SalesOrderShipmentsAPI, SalesOrdersAPI, ShipEngineAPI, ShipmentsAPI, WarehousesAPI, getEndUserIpAddress, isCodedError, isCodedErrors };
|
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { RateCard } from "./types";
|
|
3
|
+
export declare class RateCardsAPI {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(client: AxiosInstance);
|
|
6
|
+
list: (carrierIds: string[]) => Promise<import("axios").AxiosResponse<{
|
|
7
|
+
rateCards: RateCard[];
|
|
8
|
+
}, any>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Currency } from "../payments";
|
|
2
|
+
/**
|
|
3
|
+
* @category Entities
|
|
4
|
+
*/
|
|
5
|
+
export interface ShipFromLocation {
|
|
6
|
+
countryCode: string;
|
|
7
|
+
postalCode?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @category Entities
|
|
11
|
+
*/
|
|
12
|
+
export interface RateCard {
|
|
13
|
+
carrierId: string;
|
|
14
|
+
currency: Currency;
|
|
15
|
+
endDate?: string;
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
shipFrom: ShipFromLocation;
|
|
19
|
+
startDate: string;
|
|
20
|
+
status: string;
|
|
21
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./labels/types";
|
|
|
10
10
|
export * from "./order-sources/types";
|
|
11
11
|
export * from "./payments/types";
|
|
12
12
|
export * from "./rates/types";
|
|
13
|
+
export * from "./rate-cards/types";
|
|
13
14
|
export * from "./relay-points/types";
|
|
14
15
|
export * from "./resources/types";
|
|
15
16
|
export * from "./sales-order-shipments/types";
|