API reference (3)
@luxel-framework/compiler/config
luxel.config.ts and server/contract.ts.
| Export | Kind | Description |
|---|---|---|
| allow | const | An event the session's roles must allow. */ |
| collection | const | A keyed list. collection({ key, fields, page: false, maxItems: 12 }) declares a short, fixed list that policies.pageSize does not apply to (Sprint 12.3, C14): maxItems bounds it, here and at run time, and policies.maxCollectionItems still applies. The two go together: luxel build refuses one without the other (LUXEL-E029). / |
| CollectionSpec | type | What collection() takes: the key and the fields, and for a list exempt from the page size, its bound. */ |
| CollectionState | interface | — |
| CompositePageConfig | interface | A page that mounts several views side by side, each in its own context. */ |
| date | const | A date, ISO 8601 (yyyy-mm-dd); luxel-host formats it. */ |
| DateState | interface | A date (ISO 8601 yyyy-mm-dd); luxel-host formats it with the page's language (Sprint 7). */ |
| defineConfig | function | — |
| defineContract | function | — |
| EventPolicy | interface | The authorization policy of one event (Sprint 7, mandatory: an event without one does not compile, and the gateway denies it). Deny by default: roles the session must hold one of them (a public event takes public: true instead); effect "write" (default: idempotent, one transaction, version check) or "read" (a query: a search, a page, a recalculation; nothing is stored); refs object authorization: for each id the event carries (its param, a select input, a column of a rows input), the kind of resource it names. The app's scope function for that kind re-checks every id against the session before the handler runs. local marks an id that names no resource (e.g. a row key of a form being filled). / |
| ItemFieldState | type | A field of a collection item. */ |
| LoadPolicy | interface | Sprint 12 (SEC-S12): who may load a view (run its defineLoad), like an event's policy: the session's roles (allow([...])) or anyone (publicLoad(), only for a view whose route is public). No default. / |
| LOCAL | const | The refs kind of an id that names no resource (e.g. the key of a row of a form). */ |
| LuxelConfig | interface | — |
| money | const | An amount in integer cents; luxel-host formats it. */ |
| MoneyState | interface | An amount in integer cents; luxel-host formats it with the app's locale and currency. */ |
| number | const | A raw number for a number slot (finite, within [min, max]). */ |
| numbers | const | A list of exactly length raw numbers for a number-list slot. */ |
| NumbersState | interface | A list of raw finite numbers, exactly length of them (a number-list slot, Sprint 7). */ |
| NumberState | interface | A raw finite number for number slots (a bar, a viewBox), bounded at build time (Sprint 7). */ |
| options | const | The options of a select, at most max. */ |
| OptionsState | interface | The options of a select (key + label), at most max (Sprint 7). */ |
| publicEvent | const | An event any session may send (e.g. login). */ |
| publicLoad | const | Sprint 12: a view anyone may load (a public route: a login, a public page). */ |
| quantity | const | A number shown as text; luxel-host formats it. */ |
| QuantityState | interface | A number shown as text; luxel-host formats it with the page's language (Sprint 7). */ |