shipstation-node
shipstation-node copied to clipboard
Shipments getAll Return Type is incorrect
Hey, first of all, thank you for all of work on this, it's been really helpful!
When attempting to use shipments.getAll, I noticed that the return type of the method is Promise<IShipment[]>
when it should be Promise<IShipmentPaginationResult>
(which doesn't currently exist) similar to the orders.getAll return. Because of this, attempting to access shipments from the returned object fails. I was able to work around it by importing your models and creating my own:
interface IShipmentPaginatedResults extends Models.IPaginatedResult {
shipments: Models.IShipment[];
}
and then casting the results
const { shipments, page, pages } = (await shipstation.shipments.getAll({
pageSize: 500,
shipDateStart: orderDateStart,
})) as unknown as IShipmentPaginatedResults
Just wanted to give you a heads up. Thanks again!
--DJ
+1