SDKs for TypeScript and Python
Velacent Bridge ships official client libraries for TypeScript and JavaScript and for Python. They have the same design and the same features, and they are optional: the API is plain HTTP and standard FHIR R4, so any standard FHIR client library that supports a bearer token works with the partner FHIR API, and so does curl. The SDKs take care of the parts every integration repeats.
| TypeScript and JavaScript | Python | |
|---|---|---|
| Guide | TypeScript SDK | Python SDK |
| Package | @velacent/sdk | velacent |
| Runs on | Node 20 or newer (tested on Node 26); the core also runs in modern browsers | Python 3.10 or newer |
| Runtime dependencies | none | none |
What they do for you
- Authentication. OAuth 2.0 client credentials with a client secret or a private key (RS384 or ES384). The token is cached for its 15 minutes, refreshed shortly before it expires on a monotonic clock (a wrong local clock cannot expire it early or late), shared by concurrent calls and never requested more often than needed (the token endpoint allows 30 requests a minute). Scopes are requested by name.
- Every operation of the Data API. The low-level client is generated from the same OpenAPI description that the API reference is generated from, so it cannot drift: a build fails when the description changes and the client was not regenerated. A thin layer on top adds ergonomic methods, pagination and a pull-mode event consumer.
- Retries that follow the published rules.
429and503are retried, waiting forRetry-After(thenRateLimit-Reset), otherwise with exponential backoff and jitter. A wait longer than a minute is not slept: you get the error with the wait attached. Every POST that accepts anIdempotency-Keygets one, reused across the retries, so a retry never creates a second message. - Typed errors.
application/problem+jsonanswers, FHIROperationOutcomeanswers and OAuth errors become typed exceptions that carry the stablecode, the HTTP status, therequest_idand whether the error is retryable. - Partner FHIR access per link.
client.link(id).fhir: read, search (GET and POST_search), paging iterators, create, update, conditional create,metadata, and patient lookups that follow the no-enumeration rules (an identifier, or family, given and a full birth date that match exactly one patient). At most four requests are in flight per link, the published limit. Bulk export is a preview. - Webhooks. Constant-time signature verification, the 5-minute replay window, several secrets during a rotation, typed events, de-duplication, and ready-made handlers for Node
httpand Express and for Python WSGI and ASGI. A pull-mode consumer reads events and hands you a cursor to store. - The sandbox. One switch (
sandbox: true) points everything at the developer sandbox, with a helper that builds a synthetic patient the sandbox accepts.
Install
Coming: the SDKs will be published on the public package registries as @velacent/sdk (npm) and velacent (PyPI). Until they are, everything they do works over plain HTTP: the developer quickstart and the API reference show each call with curl, and the TypeScript and Python guides show the raw HTTP next to each SDK call.
Versions
The SDKs use semantic versioning and are at 0.1.0 (pre-release): until 1.0 a minor version can change an API, and each release lists what changed in its changelog. An SDK release targets one API version (the Velacent-API-Version it sends); it follows the deprecation notice period of the API.
Security
Keep the client secret or private key on a server you control. Never ship one in a browser, a mobile app or any code a user can read: in a browser, have your server mint short-lived tokens and give the SDK a token callback instead. The SDKs never log secrets, tokens, request bodies or response bodies, refuse redirects (a redirect would carry your token elsewhere), and follow a link from a response (a next page, an export status URL) only when it stays on the API host. The sandbox takes synthetic data only: never send real patient data to it.
Something unclear or missing? Ask Help in the Velacent Bridge console; answers link to the right screen. How support works.