@zerapix/pixydocs-sdk

2.0.0 • Public • Published

Pixydocs Javascript SDK

This SDK is meant to be used in the browser to simplify the integration of Pixydocs.

Example

import pixydocs from '@zerapix/pixydocs-sdk'

pixydocs.config.projectId = '<project-id>'
pixydocs.config.orgId = '<root-org-id>'

pixydocs.uploadDocument({
  // file selected by user via a file input
  file,

  // Fires when the document is created and processing is starting
  // documentData includes standard metadata, such as the document name and ID,
  // but does not include OCR or labeling values.
  onDocumentCreated: (documentData) => {},

  // Fires when the document is done processing.
  // documentData includes all discovered values from the document.
  onDocumentProcessed: (documentData) => {},
})

Local Development

To try this locally, first install serve globally with this command:

npm i -g serve

Then build the package:

yarn build

Make the package available as a global package.

yarn link

Navigate into the test app.

cd test-app

Install dependencies for the test app.

yarn install

Link the package.

yarn link @zerapix/pixydocs-sdk

Run the test app.

yarn start

Readme

Keywords

none

Package Sidebar

Install

npm i @zerapix/pixydocs-sdk

Weekly Downloads

1

Version

2.0.0

License

ISC

Unpacked Size

262 kB

Total Files

3

Last publish

Collaborators

  • zerapix-admin