Entities
Query, create, and change entity state with @lunnoa/client.
Entities (Objects) are typed records defined by your deployment's entity types. Load the schema, create records with attributes keyed by field ID, then iterate or change state as needed.
Prefer codegen when you can: lunnoa.entities.invoice.create({ ... }) is compile-time checked. Without it, use the generic entities / entityTypes namespaces and discovery.
Query and create
entities.ts
List conventions
- One page:
entities.list({ objectTypeSlug, state, search, page, pageSize, expansion })(default page size 20, max 100) - Everything:
entities.iterate(...)fetches pages lazily for exports or aggregations - State changes are validated against the type's state machine
- Prefer
entities.getStateTransitions(id)for transitions valid now, not the full schema
Next
- Workflows: trigger automation from entity events or forms
- Discovery: build dynamic forms from
attributeSchema - TypeScript client SDK: overview and auth patterns