@blueface_npm/ts-api
v0.34.1
Published
Typescript declaration files for the Blueface REST APIs
Downloads
248
Maintainers
Keywords
Readme
Blueface API types
Documents the Blueface API responses for Typescript projects.
Usage
Install the package
$ npm install @blueface_npm/ts-api --save-dev
Use in your Typescript code:
import { Device } from '@blueface_npm/ts-api/webapi/v2/devices';
const device = http.get<Device>('/api/v2/devices/1234');
Adding interfaces to the list
Consider the following API call:
GET http://iwebsvcs.dev.blueface.com/web_api/v1/billing/bundles/<bundle_id>
- The response for this request should be in this file:
webapi/v1/billing/bundles/index.d.ts
- The interface name should be
Bundle
.
Code standards
ESLint will check for code styling. You can run it locally: $ nx run ts-api:lint
Versioning
Please follow a slightly tweaked version of the Semver standard:
- Major versions introduce non-backwards compatible changes in the library, such as changes in the folder structure.
- Minor versions introduce backwards compatible changes, such as updating API interfaces or adding new ones.
- Patch versions introduce fixes to the existing interfaces (typo in field names or wrong type).