@shipengine/js-api 2.5.1 → 2.6.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/funding-sources/types.d.ts +1 -0
- package/index.js +11 -0
- package/index.mjs +11 -0
- package/labels/types.d.ts +2 -0
- package/package.json +1 -1
- package/shipments/api.d.ts +9 -0
package/index.js
CHANGED
|
@@ -4132,6 +4132,17 @@ class ShipmentsAPI {
|
|
|
4132
4132
|
shipments
|
|
4133
4133
|
});
|
|
4134
4134
|
});
|
|
4135
|
+
/**
|
|
4136
|
+
* The `cancel` method by `shipmentId`
|
|
4137
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
4138
|
+
* Any label associated with the shipment needs to be voided first
|
|
4139
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
4140
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
4141
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
4142
|
+
*/
|
|
4143
|
+
this.cancel = (shipmentId) => {
|
|
4144
|
+
return this.client.put(`/v1/shipments/${shipmentId}/cancel`);
|
|
4145
|
+
};
|
|
4135
4146
|
this.client = client;
|
|
4136
4147
|
}
|
|
4137
4148
|
}
|
package/index.mjs
CHANGED
|
@@ -4128,6 +4128,17 @@ class ShipmentsAPI {
|
|
|
4128
4128
|
shipments
|
|
4129
4129
|
});
|
|
4130
4130
|
});
|
|
4131
|
+
/**
|
|
4132
|
+
* The `cancel` method by `shipmentId`
|
|
4133
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
4134
|
+
* Any label associated with the shipment needs to be voided first
|
|
4135
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
4136
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
4137
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
4138
|
+
*/
|
|
4139
|
+
this.cancel = (shipmentId) => {
|
|
4140
|
+
return this.client.put(`/v1/shipments/${shipmentId}/cancel`);
|
|
4141
|
+
};
|
|
4131
4142
|
this.client = client;
|
|
4132
4143
|
}
|
|
4133
4144
|
}
|
package/labels/types.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ export type Label = {
|
|
|
18
18
|
chargeEvent: LabelChargeEvent;
|
|
19
19
|
createdAt: string;
|
|
20
20
|
displayScheme: LabelDisplayScheme;
|
|
21
|
+
externalOrderId: string | null;
|
|
22
|
+
externalShipmentId: string | null;
|
|
21
23
|
formDownload: LinkedResource;
|
|
22
24
|
insuranceClaim: LinkedResource;
|
|
23
25
|
insuranceCost: Money;
|
package/package.json
CHANGED
package/shipments/api.d.ts
CHANGED
|
@@ -73,4 +73,13 @@ export declare class ShipmentsAPI {
|
|
|
73
73
|
* items passed into this method.
|
|
74
74
|
*/
|
|
75
75
|
create: (...shipments: Partial<Omit<Shipment, "items">>[]) => Promise<import("axios").AxiosResponse<CreateShipmentResult, any>>;
|
|
76
|
+
/**
|
|
77
|
+
* The `cancel` method by `shipmentId`
|
|
78
|
+
* Marks a shipment cancelled, if it is no longer needed or being used by your organization.
|
|
79
|
+
* Any label associated with the shipment needs to be voided first
|
|
80
|
+
* An example use case would be if a batch label creation job is going to run at a set time and only queries pending shipments.
|
|
81
|
+
* Marking a shipment as cancelled would remove it from this process
|
|
82
|
+
* https://shipengine.github.io/shipengine-openapi/#operation/cancel_shipments
|
|
83
|
+
*/
|
|
84
|
+
cancel: (shipmentId: string) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
76
85
|
}
|