Bakery Resources
| Resource Type | Description |
|---|---|
| resource_client | Client resource. At least one client is required. |
| resource_module | Module resource. |
| resource_entity | Entity resource |
| resource_user | User resource |
resource_module
Section titled “resource_module”Type: int, computed, immutable
ID of the module.
identifier
Section titled “identifier”Type: string
Identifier of the module.
Type: string, immutable, default: "module"
(optional) Type of the module.
Type: string, default: "question"
(optional) Icon of the module.
Type: string, default: ""
(optional) Title definition.
fields
Section titled “fields”Type: list(schema), default: []
(optional) List of field definitions.
-
idType:
int, computed, immutableID of the field.
-
configKeyType:
string(optional) Only needed when the field is going to be or was renamed. This ensures that the correct field in the system is matched to this field configuration.
-
identifierType:
stringIdentifier of the field.
-
typeType:
string, default:"text"(optional) Type of the field.
-
optionsType:
object(schema), default:{}(optional) Field options.
layouts
Section titled “layouts”Type: map, default: {}
(optional) Layouts of the module, where keys correspond to layout types and values to layout specs.
options
Section titled “options”Type: object(schema), default: {}
(optional) Options for the module.
-
single_entityType:
bool, default:false(optional) Prevents showing the index layout and always opens the first entity found.
-
two_factorType:
object(schema)(optional)
-
typeType:
string2fa type (e.g.
"email"). -
viewType:
EntityEntity of type
viewto use for the 2fa notification.
-
-
offlineType:
object(optional) Options for the offline mode.
-
enabledType:
bool, default:falseWhether the module is available offline.
-
downloadType:
objectOptions for the download.
-
triggerType:
stringTrigger for the download. One of
"manual","auto". -
filtersType:
object[][]Filters for the entities when downloading. Defaults to no filters, meaning all entities the user has access to are downloaded.
-
pagesType:
intNumber of pages to download. If set to
-1, all pages are downloaded.
-
-
Examples
Section titled “Examples”Invoice module
Section titled “Invoice module”[ { "resource_module": "invoices", "resource": { "identifier": "invoices", "title": "number", "icon": "file-text", "fields": [ { "identifier": "customer", "type": "select", "options": { "references": "customers" } }, { "identifier": "number", "type": "increment" }, { "identifier": "dueDate", "type": "date" }, { "identifier": "items", "type": "list", "options": { "fields": [ { "identifier": "amount", "type": "text" }, { "identifier": "product", "type": "select", "options": { "references": "products" } } ] } } ], "layouts": { "detail": { "tabs": [ { "identifier": "general", "rows": [ { "cols": [ { "components": [ { "type": "field_group", "options": { "fields": [ "customer", "number", "dueDate", "items" ] } } ] } ] } ] } ] } } } }]resource_client
Section titled “resource_client”Type: int, computed, immutable
ID of the client.
module
Section titled “module”Type: string
Module identifier of the client.
fields
Section titled “fields”Type: object(schema), default: []
(optional) List of field attributes. Schema: generated from the module’s fields during the planning phase.
global
Section titled “global”Type: bool, immutable, default: false
(optional) Whether this client is a global client that demands ID 0.
hostnames
Section titled “hostnames”Type: list(string), default: []
(optional) List of hostnames that belong to this client.
Examples
Section titled “Examples”Client entity
Section titled “Client entity”[ { "resource_entity": "client", "resource": { "module": "clients", "fields": { "name": "Strawberry", "description": "Strawberry client" }, "hostnames": ["strawberry.brezel.io"] } }]Global client entity
Section titled “Global client entity”[ { "resource_entity": "global_client", "resource": { "module": "clients", "fields": { "name": "Strawberry", "description": "Strawberry client" }, "global": true } }]resource_entity
Section titled “resource_entity”Type: int, computed, immutable
ID of the entity.
module
Section titled “module”Type: string
Module identifier of the entity.
:::caution
If this module is also defined in a configuration, you must add it as a dependency via "depends_on".
:::
client
Section titled “client”Type: Entity, default: current global client
(optional) Client of the entity.
fields
Section titled “fields”Type: object(schema), default: []
(optional) List of field attributes. Schema: generated from the module’s fields during the planning phase.
Examples
Section titled “Examples”Invoice entity
Section titled “Invoice entity”[ { "resource_entity": "invoice", "resource": { "module": "invoices", "fields": { "dueDate": "2069-06-09", "positions": [ { "amount": 10, "product": { "id": "${resource_entity.pretzel.id}" } } ] } } }]resource_user
Section titled “resource_user”Type: int, computed, immutable
ID of the user.
module
Section titled “module”Type: string
Module identifier of the user.
client
Section titled “client”Type: Entity, default: current global client
(optional) Client of the user.
Type: bool, default: false
(optional) Whether this user is a root user.
fields
Section titled “fields”Type: object(schema), default: []
(optional) List of field attributes. Schema: generated from the module’s fields during the planning phase.
Examples
Section titled “Examples”User entity
Section titled “User entity”[ { "resource_user": "admin", "resource": { "module": "users", "fields": { "email": "admin@brezel.io" } } }]