export interface ShipEngineConfig {
/**
* Your ShipEngine API key.
*
* This can be a production or sandbox key. Sandbox keys start with "TEST_".
*/
apiKey: string;
/**
* ShipEngine child account API key (partner API)
*
* This can be a production or sandbox key. Sandbox keys start with "TEST_".
*/
onBehalfOf?: string;
/**
* The URL of the ShipEngine API. You can usually leave this unset and it will
* default to our public API.
*/
baseURL?: string | URL;
/**
* Some ShipEngine API endpoints return paged data. This lets you control the
* number of items returned per request. Larger numbers will use more memory
* but will require fewer HTTP requests.
*
* Defaults to 50.
*/
pageSize?: number;
/**
* If the ShipEngine client receives a rate limit error it can automatically
* retry the request after a few seconds. This setting lets you control how
* many times it will retry before giving up.
-
Clone this repo
git clone https://github.com/ShipEngine/shipengine-js.git
-
Install dependencies
npm install
-
Build the code
npm run build
Or you can use npm run watch to automatically re-build whenever source files change.
-
Lint the code
npm run lint
Or you can use npm run lint:fix to automatically fix most linting errors.
-
Run the tests
npm test
This runs tests in both Node.js and web browsers. Use npm run test:node to only run Node.js tests, or npm run test:browser to only run browser tests.