@fulfillmenttools/fulfillmenttools-sdk-typescript v0.1.14
fulfillmenttools TypeScript SDK
🤖 Introduction
This is a JavaScript/TypeScript SDK for the fulfillmenttools API.
👨💻 Development
👉 Requirements
🛫 Setup
$ nvm use
🤸 Building
$ npm install
$ npm run build
🕵️ Running unit tests
When running unit tests the .env.local
file will be used with dummy settings.
$ npm run test
🕵️♀️ Linting
$ npm run lint
👉 Usage
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);
📖 Documentation
The official fulfillmenttools API documentation can be found here, and we also publish our OpenAPI specification.
📜 License
All code in this repository is licensed under the MIT license.
🙌 Contributing
We'd love to have your helping hand on this ecosystem! Please see CONTRIBUTING.md for more information on our guidelines.
:blue_heart: Thanks
Thanks for all your contributions and efforts towards improving the fulfillmenttools TypeScript SDK. We thank you for being part of our :sparkles: community :sparkles:!