@roxyon/api-client
v0.2.0
Published
Typed client for the Roxyon BaaS (RX engine) and the Roxyon Applications deploy API.
Readme
@roxyon/api-client
Typed TypeScript client for the Roxyon BaaS (the RX engine) and the Roxyon
console's deploy endpoints. Plain fetch, no browser dependency — works in Node,
the edge, and the browser.
npm i @roxyon/api-clientimport { Roxyon } from '@roxyon/api-client';
// A session token from `roxyon login`, or a roxp_ personal access token.
const roxyon = new Roxyon({ sessionToken: process.env.ROXYON_TOKEN });
const ctx = await roxyon.account.context(); // user + subscriptions + domains
const apps = await roxyon.account.apps();
const logs = await roxyon.applications.logs(apps[0].id, 100);What's in it
auth—/Auth/*login (email+password, OTP step-up),me,logoutaccount—context()(user + subs + domains),apps(),getApp()applications—uploadSource()(deploy),deploy/restart,logs,getEnv/setEnv,repoConnect(git push-to-deploy)sites— static-site publishtokens— personal access token create / list / revokeRUNTIMES,rxError,parseEnv/formatEnv,toQueryString
Notes
- A
roxp_…token authenticates the console endpoints (Authorization: Bearer); it is not a BaaS session token — resolve identity and subscriptions throughaccount.context(). - The BaaS resolves a failed write with an
errorfield rather than rejecting. The write helpers here check for it and throwRoxyonApiError.
MIT · part of roxyon-devtools
