@shipengine/js-api 4.16.2 → 4.17.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.
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { Addon } from "./types";
2
+ import { Addon, AddonTypes } from "./types";
3
3
  /**
4
4
  * # Account Addons API module - /v1/account/addons
5
5
  * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6364332064/Add-ons+New+endpoints+definition
@@ -14,4 +14,8 @@ export declare class AccountAddonsAPI {
14
14
  list: () => Promise<import("axios").AxiosResponse<{
15
15
  addons: Addon[];
16
16
  }, any>>;
17
+ /**
18
+ * The `enable` method allows to enable an AddOn for the current user
19
+ */
20
+ enable: (addonCode: AddonTypes) => Promise<import("axios").AxiosResponse<void, any>>;
17
21
  }
package/index.js CHANGED
@@ -226,6 +226,12 @@ class AccountAddonsAPI {
226
226
  this.list = () => {
227
227
  return this.client.get("/v1/account/addons");
228
228
  };
229
+ /**
230
+ * The `enable` method allows to enable an AddOn for the current user
231
+ */
232
+ this.enable = (addonCode) => {
233
+ return this.client.post(`/v1/account/addons/${addonCode}/enable`);
234
+ };
229
235
  this.client = client;
230
236
  }
231
237
  }
package/index.mjs CHANGED
@@ -222,6 +222,12 @@ class AccountAddonsAPI {
222
222
  this.list = () => {
223
223
  return this.client.get("/v1/account/addons");
224
224
  };
225
+ /**
226
+ * The `enable` method allows to enable an AddOn for the current user
227
+ */
228
+ this.enable = (addonCode) => {
229
+ return this.client.post(`/v1/account/addons/${addonCode}/enable`);
230
+ };
225
231
  this.client = client;
226
232
  }
227
233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "4.16.2",
3
+ "version": "4.17.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {