@voltade/sdk
v0.1.28
Published
Type declarations for a Volty project: automations, pages, Level 1 flows, inbox settings and params.
Readme
@voltade/sdk
Type declarations for a Volty project, the folder volty pull writes. The package lets your editor and your coding agent check the project's files with the same types Volty checks them against when you push.
The package has no runtime code. Volty runs your automations and pages on its own platform, so nothing here is bundled into what you deploy.
Modules
~/automationholdsdefineAutomation, thectxan automation'srunreceives,zfor its input and output schemas, andphonefor reading phone numbers. Files underautomations/import it.~/appholdsdefineApp, the server half of a page. Eachpages/<slug>/bff.tsimports it. A page'sentry.tsxreadswindow.__VOLTY_MINI_APP__, which@voltade/sdk/globalsdeclares.~/chat-flowholdsdefineChatFlowand the step builders (message,ask,collect,aiRoute,aiCheck,automation,end). Eachinboxes/<slug>/quick-paths.tsimports it. A step that points at a step name the flow does not have is a type error that readsNo step called <name>.~/inboxholdsdefineInboxand theInboxFiletype. Eachinboxes/<slug>/inbox.tsimports it. Every field is optional, and a push leaves a field you leave out as it is in the workspace, exceptparams, the inbox's own params.~/paramsholdsdefineParamsand theParamtypes.params.tsat the folder's root imports it and declares the workspace-wide values an admin may change in the app without a push: text, a number, a switch, a choice, a date, or a map of names to text. Each has a label and a default. A quick path's text and an instruction read a value as{params.brandName}, and an automation and a page'sbff.tsasctx.params.brandName, which~/automationand~/apptype.
Setup
volty init sets a project folder up to use this package; the "Starting a project folder" section of volty docs (also served at https://volty.voltade.com/llms.txt) explains its tsconfig files.
Writing a page or an automation
The types say what compiles. Before writing a page or an automation, read the "Building pages, tables and automations" section of volty docs, the CLI guide.
