TypeScript client
The orvanta-client package wraps Orvanta’s HTTP API in typed TypeScript functions, for use both inside Orvanta script jobs running on Bun or Deno and from external TypeScript applications.
Installation
Section titled “Installation”To use the TypeScript client, you need to have Deno or Bun installed on your system. Follow the installation instructions from the official Deno or Bun documentation.
Once Deno/Bun is installed, you can import the orvanta module.
TypeScript (Deno):
import * as orvanta from 'npm:[email protected]';TypeScript (Bun):
import * as orvanta from 'orvanta-client';The TypeScript client provides several functions that you can use to interact with the Orvanta platform. Here’s an example of how to use the client to get a connection from Orvanta:
TypeScript (Deno):
import * as orvanta from 'npm:[email protected]';export async function main() { let x = await orvanta.getResource('u/user/name');}TypeScript (Bun):
import * as orvanta from '[email protected]';export async function main() { let x = await orvanta.getResource('u/user/name');}In the example above, the getResource function is used to retrieve a connection with the path 'u/user/name' from the Orvanta platform. The returned connection can be further processed or used as needed in your application.