@shipengine/js-api 0.32.1 → 0.33.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/carriers/api.d.ts +8 -1
- package/carriers/types.d.ts +4 -0
- package/index.js +7 -0
- package/index.mjs +7 -0
- package/package.json +1 -1
package/carriers/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
2
|
import { Currency, Money } from "../payments";
|
|
3
|
-
import { Carrier, CarrierAutoFundingSettings, CarrierAutoFundingSettingsResponse, CarrierConnection, CarrierService, PackageRatingType, WalletTransactionHistory } from "./types";
|
|
3
|
+
import { Carrier, CarrierAutoFundingSettings, CarrierAutoFundingSettingsResponse, CarrierConnection, CarrierService, CarrierZone, PackageRatingType, WalletTransactionHistory } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* # Carriers API module - /v1/carriers
|
|
6
6
|
*/
|
|
@@ -79,4 +79,11 @@ export declare class CarriersAPI {
|
|
|
79
79
|
getCurrencies: (carrierId: string) => Promise<import("axios").AxiosResponse<{
|
|
80
80
|
currencies: Currency[];
|
|
81
81
|
}, any>>;
|
|
82
|
+
/**
|
|
83
|
+
* The `getZones` method retrieves a list of zones for which the attached carrier
|
|
84
|
+
* provides support to.
|
|
85
|
+
*/
|
|
86
|
+
getZones: (carrierId: string) => Promise<import("axios").AxiosResponse<{
|
|
87
|
+
zones: CarrierZone[];
|
|
88
|
+
}, any>>;
|
|
82
89
|
}
|
package/carriers/types.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1038,6 +1038,13 @@ class CarriersAPI {
|
|
|
1038
1038
|
this.getCurrencies = (carrierId) => {
|
|
1039
1039
|
return this.client.get(`/v1/carriers/${carrierId}/currencies`);
|
|
1040
1040
|
};
|
|
1041
|
+
/**
|
|
1042
|
+
* The `getZones` method retrieves a list of zones for which the attached carrier
|
|
1043
|
+
* provides support to.
|
|
1044
|
+
*/
|
|
1045
|
+
this.getZones = (carrierId) => {
|
|
1046
|
+
return this.client.get(`/v1/carriers/${carrierId}/zones`);
|
|
1047
|
+
};
|
|
1041
1048
|
this.client = client;
|
|
1042
1049
|
}
|
|
1043
1050
|
}
|
package/index.mjs
CHANGED
|
@@ -1034,6 +1034,13 @@ class CarriersAPI {
|
|
|
1034
1034
|
this.getCurrencies = (carrierId) => {
|
|
1035
1035
|
return this.client.get(`/v1/carriers/${carrierId}/currencies`);
|
|
1036
1036
|
};
|
|
1037
|
+
/**
|
|
1038
|
+
* The `getZones` method retrieves a list of zones for which the attached carrier
|
|
1039
|
+
* provides support to.
|
|
1040
|
+
*/
|
|
1041
|
+
this.getZones = (carrierId) => {
|
|
1042
|
+
return this.client.get(`/v1/carriers/${carrierId}/zones`);
|
|
1043
|
+
};
|
|
1037
1044
|
this.client = client;
|
|
1038
1045
|
}
|
|
1039
1046
|
}
|