@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 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
  }
@@ -121,3 +121,7 @@ export type WalletTransactionHistory = {
121
121
  total: number;
122
122
  transactions: WalletTransaction[];
123
123
  };
124
+ export type CarrierZone = {
125
+ apiCode: string;
126
+ name: string;
127
+ };
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.32.1",
3
+ "version": "0.33.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {