@fulfillmenttools/fulfillmenttools-sdk-typescript
TypeScript icon, indicating that this package has built-in type declarations

0.1.14 • Public • Published

fulfillmenttools TypeScript SDK

fulfillmenttools logo

npm version Release CI License Contributor Covenant PRs Welcome TypeScript

🤖 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.

💙 Thanks

Thanks for all your contributions and efforts towards improving the fulfillmenttools TypeScript SDK. We thank you for being part of our ✨ community ✨!

Package Sidebar

Install

npm i @fulfillmenttools/fulfillmenttools-sdk-typescript

Weekly Downloads

96

Version

0.1.14

License

MIT

Unpacked Size

3.95 MB

Total Files

401

Last publish

Collaborators

  • nwilhelmfft
  • arnoerpenbeck