@shipengine/js-api 3.15.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.
package/index.js CHANGED
@@ -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
@@ -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.15.0",
3
+ "version": "4.0.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {