@chisquare-tech/jsx-polylog
v0.2.13
Published
## JSX Polylog
Readme
Chisquare
JSX Polylog
Introduction
This is the javascript SDK for chisquare platform. It covers APIs for the following services:
- Events
- Files
- Forms
- Jobs
- Logs
- Messages
- Motion
- Webhooks
Supported Platforms
- Browser
- Node.js (Javascript/Typescript)
Installation
- NPM
$ npm i @chisquare-tech/jsx-polylog- CDN
Usage & API
- Initialization
import { init } from '@chisquare-tech/jsx-polylog';
init({
// config
});- Events
- identify
import { events } from '@chisquare-tech/jsx-polylog';
events.identify(id, payload, options);- track
import { events } from '@chisquare-tech/jsx-polylog';
events.track(id, payload, options);- Jobs
- Schedule a new job
import { jobs } from '@chisquare-tech/jsx-polylog'
jobs.schedule(id, payload, options)- Files
- Upload file
import { files } from '@chisquare-tech/jsx-polylog'
files.upload(name, files, options)- Forms
- Submit form
import { forms } from '@chisquare-tech/jsx-polylog'
forms.submit(name, payload, options)- Webhooks
- register webhook
import { webhooks } from '@chisquare-tech/jsx-polylog'
webhooks.register(name, payload, options)- Logs
- identify
import { events } from '@chisquare-tech/jsx-polylog';
events.identify(id, payload, options);- track
import { events } from '@chisquare-tech/jsx-polylog';
events.track(id, payload, options);Commands
DTS scaffolds your new library inside /src.
To run DTS, use:
npm start # or yarn startThis builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.
To do a one-off build, use npm run build or yarn build.
To run tests, use npm test or yarn test.
Custom Commands
# build and sync locally
$ node ./build --env=dev --sync=true
# build and publish
$ node ./build --env=prod --sync=true --version=x.x.xPublish
$ git tag <version e.g v0.0.0>
$ git push origin <version>