SDK reference
What your screens and workflows can call, member by member: signature, parameters, return value, errors, what row-level security allows, and an example. Generated from the TypeScript source, so it matches the code you run.
Namespaces
- The app handleEvery custom component receives app: AppHandle next to its props. It is the app runtime narrowed to what a screen may do, and every call it makes goes through the app's data API, so row-level security decides what is allowed. (7 members)
- Sign-in and sessionsapp.auth drives an authored sign-in screen. usePlatformSession and SignInGate give exported and self-hosted apps the same sign-in the platform runs, against /__appbricx/auth. (19 members)
- DataRead and write rows of the app's own tables. Every call is a request to the app's data API under the signed-in user's identity, so the database's per-role row-level security decides what each user sees and changes. (12 members)
- RealtimeFollow the server's change feed for a table so chats, boards and queues update as other users write. (1 members)
- AIAsk the app's AI for summaries, suggestions, drafts and classifications. Calls go through /__appbricx/ai/chat with the project's own key or plan credits; the provider key never reaches the browser. (2 members)
- Server functionsRun a workflow declared with on: { call: true } for the signed-in user and get its JSON return value. Third-party keys stay on the server. (1 members)
- PaymentsTake payment for an order row: offline (pay at pickup) always, card through the owner's connected Stripe account. The amount is always computed on the server from the order's line rows. (5 members)
- FilesUpload a user file into the project's object store and store the returned URL in an image or attachment field. (1 members)
- PrimitivesThe presentational building blocks compositions and custom components are made of: layout, content, data display, charts, feedback, navigation, media, inputs, motion and decor. Each has a closed prop contract, generated here from the manifest. (178 primitives)
- Workflow ctxThe ctx a workflow's run(ctx, event) receives on the server. Two shapes exist: the @app/sdk shape for defineWorkflow modules (what generated apps use) and the native shape for .workflow.js modules. (70 members)
Every member
The app handle
app.user, app.params, app.me, app.navigate, app.can, useAppHandle, stubAppHandle
Sign-in and sessions
app.auth.mode, app.auth.setMode, app.auth.canSignUp, app.auth.signIn, app.auth.signUp, app.auth.requestReset, app.auth.providers, app.auth.startProvider, app.auth.skip, app.auth.signOut, usePlatformSession, usePlatformSession().session, usePlatformSession().signIn, usePlatformSession().signUp, usePlatformSession().signOut, usePlatformSession().requestReset, usePlatformSession().startProvider, usePlatformSession().discovery, SignInGate
Data
app.rows, app.loading, app.revision, app.query, app.get, app.create, app.update, app.remove, app.transition, useEntityQuery, useRecord, useAggregate
Realtime
Server functions
Files
Workflow ctx
defineWorkflow, ctx.db.list, ctx.db.get, ctx.db.create, ctx.db.update, ctx.db.updateWhere, ctx.db.remove, ctx.http.fetch, ctx.notify, ctx.ai.ask, ctx.ai.chat, ctx.email, ctx.emailRole, ctx.messages.render, ctx.messages.email, ctx.files.put, ctx.files.get, ctx.files.list, ctx.files.remove, ctx.secrets.get, ctx.vars.get, ctx.vars.set, ctx.integrations.call, ctx.workflows.trigger, ctx.log, ctx.now, ctx.projectId, ctx.runId, ctx.trigger, ctx.queries.run, ctx.db.query, ctx.db.exec, ctx.api.list, ctx.api.get, ctx.api.create, ctx.api.update, ctx.api.delete, ctx.http.fetch, ctx.files.read, ctx.files.write, ctx.files.list, ctx.files.delete, ctx.log.info, ctx.log.warn, ctx.log.error, ctx.topics.publish, ctx.topics.subscribe, ctx.secrets.get, ctx.ai.ask, ctx.ai.chat, ctx.integrations.invoke, ctx.messages.email, ctx.messages.sms, ctx.messages.whatsapp, ctx.messages.telegram, ctx.schedules.create, ctx.schedules.update, ctx.schedules.list, ctx.schedules.delete, ctx.users.list, ctx.users.get, ctx.users.update, ctx.users.setAdmin, ctx.users.disable, ctx.rbac.listRoles, ctx.rbac.createRole, ctx.rbac.assign, ctx.rbac.revoke, ctx.rbac.hasPermission, ctx.callWorkflow