Skip to main content

SDK reference

The vastframe SDK gives your app the signed-in user, its project database, file storage, Microsoft 365 and every integration your IT team has connected. There are no keys, URLs or login screens to configure: the platform injects everything at deploy time, and the Edge signs people in before a request ever reaches your code.

PackageLanguageInstall
@tenantcloud/sdkJavaScript / TypeScript (browser and Node)"@tenantcloud/sdk": "*" in package.json
tenantcloudPython 3.10+tenantcloud (or tenantcloud[pandas]) in requirements.txt
Availability

The packages are not published to a public registry yet. The platform build supplies them when it sees the dependency, so you don't need registry setup for deployed apps. The package names keep the project's working name (tenantcloud).

At a glance​

src/App.jsx
import { tc } from '@tenantcloud/sdk'

const me = await tc.auth.user() // who is signed in
const { data } = await tc.db.from('purchase_requests').select('*') // database, row-level security applies
const { data: link } = await tc.storage.from('receipts').createSignedUrl(path, 300)
const rows = await tc.m365.excel(budgetUrl).table('Actuals').rows() // Excel, as the signed-in user
await tc.teams.notify({ to: 'role:approver', text: 'New purchase request' })

What's in the SDK​

NamespaceWhat it doesPage
tc.authThe signed-in user, their groups and app roles; sign-in and sign-out helpersAuth and identity
tc.dbThe project's Postgres database: a postgrest-js (Supabase) query builder, raw SQL on the server, asUserDatabase
tc.storageFiles in the project's buckets, shaped like Supabase storage-jsStorage
tc.m365Excel workbooks, SharePoint lists and Outlook mail, read and sent as the signed-in userMicrosoft 365
tc.int.<name>Pass-through to any connected integration (Salesforce, an ERP, Microsoft Graph)Integrations
tc.teamsTeams messages through the platform botTeams
tc.middleware()Makes the current request implicit in server codeServer requests and jobs
TcErrorEvery error carries a stable code and a fixErrors

Browser and server​

The same import works in both places. Bundlers pick the browser build and Node picks the server build. Some members only make sense on one side; calling them on the other throws SERVER_ONLY. See Browser vs server.

Python​

The Python package mirrors the JavaScript surface with Python naming (from_, as_user, request=request). See Python SDK.

For AI agents​

Coding agents can read the whole SDK in one call through the MCP tool get_docs. See Agents & MCP.

Was this page helpful?