@shipengine/js-api 1.28.0 → 1.29.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 +6 -0
- package/index.mjs +6 -0
- package/package.json +1 -1
- package/shipments/api.d.ts +4 -0
package/index.js
CHANGED
|
@@ -3963,6 +3963,12 @@ class ShipmentsAPI {
|
|
|
3963
3963
|
this.list = (options) => {
|
|
3964
3964
|
return this.client.get("/v1/shipments", { params: options });
|
|
3965
3965
|
};
|
|
3966
|
+
/**
|
|
3967
|
+
* Retrieve a shipment using an external shipment Id
|
|
3968
|
+
*/
|
|
3969
|
+
this.getByExternalId = (externalId) => {
|
|
3970
|
+
return this.client.get(`/v1/shipments/external_shipment_id/${externalId}`);
|
|
3971
|
+
};
|
|
3966
3972
|
/**
|
|
3967
3973
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
3968
3974
|
* items passed into this method.
|
package/index.mjs
CHANGED
|
@@ -3959,6 +3959,12 @@ class ShipmentsAPI {
|
|
|
3959
3959
|
this.list = (options) => {
|
|
3960
3960
|
return this.client.get("/v1/shipments", { params: options });
|
|
3961
3961
|
};
|
|
3962
|
+
/**
|
|
3963
|
+
* Retrieve a shipment using an external shipment Id
|
|
3964
|
+
*/
|
|
3965
|
+
this.getByExternalId = (externalId) => {
|
|
3966
|
+
return this.client.get(`/v1/shipments/external_shipment_id/${externalId}`);
|
|
3967
|
+
};
|
|
3962
3968
|
/**
|
|
3963
3969
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
3964
3970
|
* items passed into this method.
|
package/package.json
CHANGED
package/shipments/api.d.ts
CHANGED
|
@@ -64,6 +64,10 @@ export declare class ShipmentsAPI {
|
|
|
64
64
|
* The `list` method retrieves a list of shipments for a given user.
|
|
65
65
|
*/
|
|
66
66
|
list: (options?: ListShipmentOptions) => Promise<import("axios").AxiosResponse<ListShipmentResult, any>>;
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve a shipment using an external shipment Id
|
|
69
|
+
*/
|
|
70
|
+
getByExternalId: (externalId: string) => Promise<import("axios").AxiosResponse<Shipment, any>>;
|
|
67
71
|
/**
|
|
68
72
|
* The `create` method allows for creating shipments based on a list of shipment
|
|
69
73
|
* items passed into this method.
|