Thanks for taking the time. Issues and pull requests are welcome at https://github.com/devrobotlabs/visionapi-node.
If your question is about the API itself — a preset, a credit cost, a limit, an error code — https://support.visionapi.io reaches the team faster than an issue here does. This repository is the Node.js client; the service it talks to is documented at https://docs.visionapi.io.
git clone https://github.com/devrobotlabs/visionapi-node.git
cd visionapi-node
npm installRun what CI runs:
npm run typecheck
npm testThe test suite stubs the transport, so it needs no API key and makes no network calls. A test that reaches the real API will not be merged — it makes the suite slow, flaky, and impossible to run on a fork.
dist/ is built by npm run build, which prepublishOnly runs for you — never commit it.
This is one of nine clients — Node, Python, Go, Ruby, PHP, Java, Swift, React and Vue — that deliberately expose the same surface, named the way each language names things. A change to behaviour rather than to style is usually a change all nine need, so say so in the pull request and we will sort out the rest of the set.
Three rules the libraries exist to get right, and which any change has to preserve:
- Every scalar is wrapped in
{value, confidence}, and a line-item array is a bare array whose cells are wrapped individually — not a wrapped array of plain values. - Absent is not missing. A preset response contains every field of the preset, with the
ones the document did not carry as
value: null. Do not drop them. - Retries cannot double-charge. Every billable POST carries a generated
Idempotency-Key; 429 honours the server'sRetry-After, and 402 and input errors are never retried because they cannot succeed.
Match the surrounding code. The linters listed above are the arbiter for everything they cover; for everything else, the existing files are.
Please do not open a public issue — see SECURITY.md.