snapbase-sdk
v0.1.0
Published
Typed TypeScript SDK for the Snapbase PostgreSQL project API.
Maintainers
Readme
snapbase-sdk
Typed TypeScript client for the Snapbase API. Install with:
npm install snapbase-sdkConfigure a service URL and bearer token from environment variables or a secret manager:
import { SnapbaseClient } from "snapbase-sdk";
const snapbase = new SnapbaseClient({
baseUrl: process.env.SNAPBASE_URL!,
token: process.env.SNAPBASE_TOKEN!,
});
const projects = await snapbase.projects.list();
console.log(projects);The SDK exposes auth, projects, developerApps, tokens, and oauth APIs. OAuth helpers create state, a verifier, and an S256 challenge; verify the returned state and keep the verifier private until code exchange. The client does not persist credentials. Never commit API tokens or database connection URIs.
