@shipengine/js-api 0.48.1 → 0.48.3

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/labels/api.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
+ import { CreationRangeQuery, PageableQuery, PageableResult, SortableQuery } from "../resources";
2
3
  import { Label, LabelLayout, VoidRequest } from "./types";
3
4
  /**
4
5
  * # Labels API - Create Label Options
@@ -35,13 +36,47 @@ export interface CreateLabelOptions {
35
36
  /**
36
37
  * # Labels API - List Labels Params
37
38
  */
38
- export interface ListLabelsParams {
39
+ export type ListLabelsParams = {
40
+ /**
41
+ * `batchId` is an optional string to retrieve labels within a given batch.
42
+ */
43
+ batchId?: string;
44
+ /**
45
+ * `carrierId` is an optional string to limit results to only lables for
46
+ * a specific carrier.
47
+ */
48
+ carrierId?: string;
49
+ /**
50
+ * `labelStatus` optionally allows filtering results to a specific status.
51
+ */
52
+ labelStatus?: Label["status"];
53
+ /**
54
+ * `rateId` is an optional string to return labels purchased with a
55
+ * specific rate.
56
+ */
57
+ rateId?: string;
58
+ /**
59
+ * `serviceCode` is an optional string to limit results to only labels for
60
+ * a specific carrier service.
61
+ */
62
+ serviceCode?: string;
39
63
  /**
40
64
  * `shipmentId` is an optional string to filter labels by shipment ID. This
41
65
  * is a unique identifier that ShipEngine API associates with your shipment.
42
66
  */
43
67
  shipmentId?: string;
44
- }
68
+ /** `trackingNumber` is an optional string to retrieve labels for a specific
69
+ * tracking number
70
+ */
71
+ trackingNumber?: string;
72
+ /** `warehouseId` is an optional string to limit results to only those
73
+ * originating from a specific warehouse.
74
+ */
75
+ warehouseId?: string;
76
+ } & PageableQuery & CreationRangeQuery & SortableQuery<"created_at" | "modified_at" | "order_date">;
77
+ export type ListLabelsResult = {
78
+ labels: Label[];
79
+ } & PageableResult;
45
80
  /**
46
81
  * # Labels API module - /v1/labels
47
82
  */
@@ -55,9 +90,7 @@ export declare class LabelsAPI {
55
90
  /**
56
91
  * The `list` method retrieves a list of labels created by a given user.
57
92
  */
58
- list: (params?: ListLabelsParams) => Promise<import("axios").AxiosResponse<{
59
- labels: Label[];
60
- }, any>>;
93
+ list: (params?: ListLabelsParams) => Promise<import("axios").AxiosResponse<ListLabelsResult, any>>;
61
94
  /**
62
95
  * The `createByRateId` allows you to create a shipping label by using a `rateId`
63
96
  * which is a unique identifier tied to a specific rate.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.48.1",
3
+ "version": "0.48.3",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -51,6 +51,10 @@ export type ListSalesOrderShipmentsParams = {
51
51
  * querying sales orders.
52
52
  */
53
53
  salesOrderIds?: string[];
54
+ /**
55
+ * `shipmentIds` is an optional array of shipment IDs to fetch.
56
+ */
57
+ shipmentIds?: string[];
54
58
  } & PageableQuery & CreationRangeQuery & ModificationRangeQuery & SortableQuery<"created_at" | "modified_at" | "order_date">;
55
59
  /**
56
60
  * # Sales Order Shipments - List Sales Order Shipments Body