1.0.11 • Published 23 days ago

@chift/chift-nodejs v1.0.11

Weekly downloads
-
License
Apache License 2....
Repository
-
Last release
23 days ago

Chift Node.js Library

npm version Build Coverage Status code style: prettier

The Chift NodeJS library provides convenient access to the Chift API from applications written in the NodeJS language (Javascript/Typescript).

Documentation

See the API docs.

Requirements

Node 12 or higher.

Installation

Install the package with:

npm install @chift/chift-nodejs
# or
yarn add @chift/chift-nodejs

Example

const chift = require('@chift/chift-nodejs');
const client = new chift.API({
    clientId: process.env.CHIFT_CLIENT_ID,
    clientSecret: process.env.CHIFT_CLIENT_SECRET,
    accountId: process.env.CHIFT_ACCOUNT_ID,
});
const consumers = await client.Consumers.getConsumers();
// my first consumer has a POS connection
const locations = await consumers[0].pos.getLocations();

Development

How to generate the typescript schemas from the OpenAPI schema of Chift:

npx openapi-typescript https://api.chift.eu/openapi.json --output src/types/public-api/schema.d.ts

1.0.11

23 days ago

1.0.9

1 month ago

1.0.10

1 month ago

1.0.8

1 month ago

1.0.7

1 month ago

1.0.6

6 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.0.1

8 months ago