2.0.0 • Published 2 years ago

@zerapix/pixydocs-sdk v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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
2.0.0

2 years ago

1.0.0

2 years ago