Module

Schema

id (int, computed, immutable)

ID of the module.

identifier (string)

Identifier of the module.

type (string, immutable, default = "module") (optional)

Type of the module.

icon (string, default = "question") (optional)

Icon of the module.

title (string, default = "") (optional)

Title definition.

fields (list(schema), default = []) (optional)

List of field definitions.

id: (int, computed, immutable)

ID of the field.

configKey (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.

identifier (string)

Identifier of the field.

type (string, default = "text") (optional)

Type of the field.

options (object(schema), default = {}) (optional)

Field options.

layouts (map, default = {}) (optional)

Layouts of the module, where keys correspond to layout types and values to layout specs.

options (object(schema), default = {}) (optional)

Options for the module

single_entity (bool, default = false) (optional)

Prevents showing the index layout and always opens the first entity found

two_factor (object(schema)) (optional)
type: (string)

2fa type (e.g. "email")

view: (Entity)

Entity of type view to use for the 2fa notification

Examples

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"
                            ]
                          }
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      }
    }
  }
]