UNPKG

@softr/sdk

Version:

The SDK for building Softr apps on TanStack Start. It lets an app interact with Softr: auth, datasources, workflows and integrations.

25 lines (24 loc) • 763 B
import { User } from "./user.js"; import { Formatting } from "../formatting.js"; import { Permissions } from "./permissions.js"; //#region src/auth/context.d.ts /** Who the visitor is and what they may do, for one request. */ type Session = { /** The visitor, or `null` when signed out. */ user: User | null; /** * The visitor's global data restrictions. An escape hatch; the SDK already checks them. * @deprecated Always empty. */ permissions: Permissions; }; /** * The route context the root route publishes — see `getSoftrContext`. The * session, and how this request formats dates and numbers. */ type SoftrContext = Session & { /** Read it with `useFormatting()`. */ formatting: Formatting; }; //#endregion export { SoftrContext };