@shipengine/js-api 3.14.0 → 4.0.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,7 +1,7 @@
1
1
  import { AxiosInstance } from "axios";
2
2
  import { ConfigResponse, CreateSessionRequest, CreateSessionResponse } from "./types";
3
3
  /**
4
- * # Auctane Pay API module - /internal/auctane_pay
4
+ * # Auctane Pay API module - /v1/payments
5
5
  *
6
6
  * This module provides access to the Auctane Pay endpoints in ShipEngine API.
7
7
  */
package/index.js CHANGED
@@ -250,7 +250,7 @@ class AuctanePayAPI {
250
250
  * @returns a promise that resolves to the created session
251
251
  */
252
252
  this.createSession = (request) => {
253
- return this.client.post("/internal/auctane_pay/sessions", request);
253
+ return this.client.post("/v1/payments/sessions", request);
254
254
  };
255
255
  /**
256
256
  * The `getConfig` method get the AuctanePay config, such as the "adyenClientKey"
@@ -258,7 +258,7 @@ class AuctanePayAPI {
258
258
  * @returns a promise that returns the AuctanePay config
259
259
  */
260
260
  this.getConfig = () => {
261
- return this.client.get("/internal/auctane_pay/config");
261
+ return this.client.get("/v1/payments/config");
262
262
  };
263
263
  this.client = client;
264
264
  }
@@ -3709,6 +3709,14 @@ class LabelsAPI {
3709
3709
  this.createByRateId = (rateId, options) => {
3710
3710
  return this.client.post(`/v1/labels/rates/${rateId}`, options);
3711
3711
  };
3712
+ /**
3713
+ * The `createByShipmentId` allows you to create a shipping label by using a `shipmentId`
3714
+ * which is a unique identifier tied to a specific shipment that has already been created
3715
+ * with the desired address and package info.
3716
+ */
3717
+ this.createByShipmentId = (shipmentId, options) => {
3718
+ return this.client.post(`/v1/labels/shipment/${shipmentId}`, options);
3719
+ };
3712
3720
  /**
3713
3721
  * The `void` method allows a user to void a label by `labelId`.
3714
3722
  */
package/index.mjs CHANGED
@@ -246,7 +246,7 @@ class AuctanePayAPI {
246
246
  * @returns a promise that resolves to the created session
247
247
  */
248
248
  this.createSession = (request) => {
249
- return this.client.post("/internal/auctane_pay/sessions", request);
249
+ return this.client.post("/v1/payments/sessions", request);
250
250
  };
251
251
  /**
252
252
  * The `getConfig` method get the AuctanePay config, such as the "adyenClientKey"
@@ -254,7 +254,7 @@ class AuctanePayAPI {
254
254
  * @returns a promise that returns the AuctanePay config
255
255
  */
256
256
  this.getConfig = () => {
257
- return this.client.get("/internal/auctane_pay/config");
257
+ return this.client.get("/v1/payments/config");
258
258
  };
259
259
  this.client = client;
260
260
  }
@@ -3705,6 +3705,14 @@ class LabelsAPI {
3705
3705
  this.createByRateId = (rateId, options) => {
3706
3706
  return this.client.post(`/v1/labels/rates/${rateId}`, options);
3707
3707
  };
3708
+ /**
3709
+ * The `createByShipmentId` allows you to create a shipping label by using a `shipmentId`
3710
+ * which is a unique identifier tied to a specific shipment that has already been created
3711
+ * with the desired address and package info.
3712
+ */
3713
+ this.createByShipmentId = (shipmentId, options) => {
3714
+ return this.client.post(`/v1/labels/shipment/${shipmentId}`, options);
3715
+ };
3708
3716
  /**
3709
3717
  * The `void` method allows a user to void a label by `labelId`.
3710
3718
  */
package/labels/api.d.ts CHANGED
@@ -22,6 +22,12 @@ export declare class LabelsAPI {
22
22
  * label for the price they were initially rated.
23
23
  */
24
24
  createByRateId: (rateId: string, options: CreateLabelOptions) => Promise<import("axios").AxiosResponse<Label, any>>;
25
+ /**
26
+ * The `createByShipmentId` allows you to create a shipping label by using a `shipmentId`
27
+ * which is a unique identifier tied to a specific shipment that has already been created
28
+ * with the desired address and package info.
29
+ */
30
+ createByShipmentId: (shipmentId: string, options: CreateLabelOptions) => Promise<import("axios").AxiosResponse<Label, any>>;
25
31
  /**
26
32
  * The `void` method allows a user to void a label by `labelId`.
27
33
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "3.14.0",
3
+ "version": "4.0.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {