- ๐ค Iโm looking for help with shipstation-node
kjaenicke / shipstation-node Goto Github PK
View Code? Open in Web Editor NEWUnofficial Node.js Wrapper for Shipstation API
License: MIT License
Unofficial Node.js Wrapper for Shipstation API
License: MIT License
Does anyone have a complete list of carrier codes?
Also, I know this is more of a question for shipstation, but maybe it will help somebody else just picking this package up-- I've been playing around on postman and seem to be getting: "No applicable services were available for the configured shipment"
for almost all my attempts, other than from stamps_com
... do we need to configure other carriers to get their rates?
e.g. this returns no rates result
{
"carrierCode": "fedex",
"fromPostalCode": "03801",
"toPostalCode": "90712",
"weight": {
"value": 60,
"units": "pounds"
},
"toCountry": "US"
}
Is it just that fedex truly can't handle this delivery between these area codes or is this a matter of configuring the provider/carrier in my settings?
The same options but with stamps_com does return rates
{
"carrierCode": "stamps_com",
"fromPostalCode": "03801",
"toPostalCode": "90712",
"weight": {
"value": 60,
"units": "pounds"
},
"toCountry": "US"
}
Lastly, has anyone found a pattern for which carriers top out in terms of weight? I noticed stamps_com seems to max around around 70-80 pounds for most of the combinations I've tried.
and, of course, thanks for publishing this.
It is a warning, so not breaking, but would like it to go away, without having to suppress the warning.
When deploying to Google Cloud Functions, the following warning is displayed in logs.
/home/me/AndroidStudioProjects/order_fulfillment/functions/src/lib/helperFunctions.ts
10:25 warning '/home/me/AndroidStudioProjects/order_fulfillment/functions/node_modules/shipstation-node/dist/index.js' imported multiple times import/no-duplicates
112:28 warning '/home/me/AndroidStudioProjects/order_fulfillment/functions/node_modules/shipstation-node/dist/index.js' imported multiple times import/no-duplicates
I'm importing both ShipStation and ShipStationAPI so I can set the Promise return type.
In my helperFunctions.ts
I'm importing shipstation-node by doing the following:
import ShipStation from 'shipstation-node'
import ShipStationAPI from 'shipstation-node'
/**
* Set the ShipStation API client.
* https://github.com/kjaenicke/shipstation-node
* @return {ShipStationAPI | null} The ShipStation client.
*/
export async function setShipStationClient(): Promise<ShipStationAPI | null> {
try {
return new ShipStation({
apiKey,
apiSecret,
retry: { retries: 3 },
})
} catch (error) {
functions.logger.error(error)
return null
}
}
It seems to be unnecessary for a clean abstraction.
And feels like should be more of a project dependency.
Thanks.
Thanks for creating the ShipStation types, have you thought about publishing the types to @types?
https://github.com/DefinitelyTyped/DefinitelyTyped#how-can-i-contribute
If not, do you mind if I do?
Hi.
Your package looks great. can you add a license to it? I want to know if I can fork it
thanks
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
This is a great library and has really helped speed up my integration with ShipStation. However, I need to use "List By Tag" and don't see how to do it with your library. Can it be added?
https://www.shipstation.com/docs/api/orders/list-by-tag/
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.