The script declaration and the grant words.
Generated from the language definition for language 1.0.
Declaration
A script is script <name> <kind> with its source from "…" or inline as js """…""". A component's grant is using sdk; every other kind uses using db.
script := "script" ident kind [props] [grant] ("from" string | "js" rawstring)
kind := "guard" | "action" | "compute" | "process" | "component"
props := "props" "(" prop ("," prop)* ")"
prop := ident ":" (type | ident) ["required"] ["label" string]
grant := "using" ("db" dbgrant ("," dbgrant)* | "sdk" sdkgrant ("," sdkgrant)*)
dbgrant := "read" | "write" | "fsm"
sdkgrant := "read" | "write" | "fsm" | "files" | "forms"
Grants
A using sdk word adds the scopes below, and any word implies read. The using db words are read, write, and fsm.
| Word | Scopes |
|---|---|
read | data:read, workflow:read |
write | data:write |
fsm | workflow:execute |
files | files:read, files:write |
forms | forms:read, forms:write |