@shipengine/js-api 1.28.0 → 1.30.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.
@@ -11,13 +11,20 @@ export interface Address {
11
11
  companyName?: string;
12
12
  countryCode: string;
13
13
  email?: string;
14
- geolocation?: string;
14
+ geolocation?: AddressGeolocation[];
15
15
  instructions?: string;
16
16
  name: string;
17
17
  phone: string;
18
18
  postalCode: string;
19
19
  stateProvince: string;
20
20
  }
21
+ /**
22
+ * @category Entities
23
+ */
24
+ export interface AddressGeolocation {
25
+ type: string;
26
+ value: string;
27
+ }
21
28
  /**
22
29
  * @category Entities
23
30
  */
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -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.
@@ -35,8 +35,8 @@ export interface CustomsInvoiceAdditionalDetails {
35
35
  discount?: Money;
36
36
  freightCharge?: Money;
37
37
  insuranceCharge?: Money;
38
+ otherCharge?: Money;
38
39
  otherChargeDescription?: string;
39
- otherCharges?: Money;
40
40
  }
41
41
  export interface DangerousGoods {
42
42
  AddionalDescription?: string;
@@ -106,12 +106,14 @@ export type ShipmentPackage = Omit<CarrierPackage, "name"> & {
106
106
  insuredValue?: Money;
107
107
  labelDownload?: Download;
108
108
  labelMessages?: {
109
- reference1: string;
110
- reference2: string;
111
- reference3: string;
109
+ reference1?: string;
110
+ reference2?: string;
111
+ reference3?: string;
112
112
  };
113
+ packageName: string;
113
114
  products?: Product[];
114
115
  sequence?: number;
116
+ shipmentPackageId: string;
115
117
  trackingNumber?: string;
116
118
  weight: WeightWithUnit;
117
119
  };
@@ -197,7 +199,7 @@ export interface Shipment {
197
199
  isReturn?: boolean;
198
200
  items: ShipmentItem[];
199
201
  modifiedAt: string;
200
- orderSourceCode: OrderSourceCode;
202
+ orderSourceCode: OrderSourceCode | null;
201
203
  originType?: OriginTypes;
202
204
  packages: ShipmentPackage[];
203
205
  returnTo: Address | null;