This is a JavaScript/TypeScript SDK for the fulfillmenttools API.
$ nvm use
$ npm install
$ npm run build
When running unit tests the .env.local
file will be used with dummy settings.
$ npm run test
$ npm run lint
This software is published on npmjs.com. The package contains both an ESM and a CommonJS build.
Here's a little example how to create a client instance in TypeScript:
import { FftApiClient, FftOrderService, OrderForCreation } from '@fulfillmenttools/fulfillmenttools-sdk-typescript';
const fftApiClient = new FftApiClient(
process.env.FFT_PROJECT_ID || '',
process.env.FFT_API_USER || '',
process.env.FFT_API_PASSWORD || '',
process.env.FFT_API_KEY || ''
);
const fftOrderService = new FftOrderService(fftApiClient);
const fftOrder = {} as OrderForCreation;
await fftOrderService.create(fftOrder);
By default, logging is disabled. If you wish to have the HttpClient logging enabled, just add a boolean to your FftApiClient
:
import { FftApiClient, FftOrderService, OrderForCreation } from '@fulfillmenttools/fulfillmenttools-sdk-typescript';
const fftApiClient = new FftApiClient(
process.env.FFT_PROJECT_ID || '',
process.env.FFT_API_USER || '',
process.env.FFT_API_PASSWORD || '',
process.env.FFT_API_KEY || '',
process.env.FFT_LOGGING_ENABLED || true
);
const fftOrderService = new FftOrderService(fftApiClient);
const fftOrder = {} as OrderForCreation;
await fftOrderService.create(fftOrder);
The official fulfillmenttools API documentation can be found here, and we also publish our OpenAPI specification.
All code in this repository is licensed under the MIT license.
We'd love to have your helping hand on this ecosystem! Please see CONTRIBUTING.md for more information on our guidelines.
Thanks for all your contributions and efforts towards improving the fulfillmenttools TypeScript SDK. We thank you for being part of our ✨ community ✨!