Blueprint
Types

Overview

Blueprint offers 6 supported field types. Field Types inform the user interface how to sort and display data.

Setting a field type does not transform or validate data out-of-the-box. These are still done with recordHooks.

string (default)

Defines a property that should be stored and read as a basic string.

{
  "key": "sku",
  "label": "Product Code",
  "type": "string"
},

string

number

Defines a property that should be stored and read as either an integer or floating point number. Numbers are displayed using a monospaced font. Database engines should look at the configuration to determine ideal storage format.

config.decimal_placesDefault: "0"
number

The number of decimal places to preserve accuracy to. Overages should be automatically rounded with a warning. A hook can pre-format to accomplish floor or ceiling.

{
  "key": "price",
  "label": "Retail Price",
  "type": "number",
  "config": {
    "decimal_places": 2
  }
},

number

enum

Defines an enumerated list of options for the user to select from. Matching tooling attempts to resolve incoming data assigment to a valid option. The maximum number of options for this list is 100. For larger lists, users should use the reference lookup types.

enum

config.allow_customDefault: "false"
boolean

Permit the user to create new options for this specific field.

config.optionsrequired

An array of valid options the user can select from

valuerequired

The value or ID of this option. This value will be sent in egress

labelDefault: "value"
string

A visual label for this option, defaults to value if not provided

color
string

An optional color to assign this option

icon
string

A reference pointer to a previously registered icon

metadata
object

An arbitrary JSON object to be associated with this option and made available to hooks

{
  "key": "status",
  "label": "Status",
  "type": "enum",
  "config": {
    "options": [
      {
        "value": "active",
        "label": "Active"
      },
      {
        "value": "inactive",
        "label": "Disabled",
        "color": "#ff0000",
        "icon": "fa fa-ban",
        "metadata": {
          "foo": "bar"
        }
      }
    ]
  }
},

reference

Defines a reference to another sheet. Links should be established automatically by the matching engine or similar upon an evaluation of unique or similar columns between datasets.

config.refrequired

The full path reference to another sheet/table configuration. Must be in the same workbook.

config.relationshiprequired

The type of relationship this defines. Can be has-one

reference

boolean

A true or false value type. Matching engines should attempt to resolve all common ways of representing this value and it should usually be displayed as a checkbox.

{
  "key": "is_active",
  "label": "Active",
  "type": "boolean"
}

boolean

date

Store a field as a GMT date.

Data hooks must convert this value into a YYYY-MM-DD format in order for it to be considered a valid value for sorting.

Datetime should be a separate and future supported value as it must consider timezone.


Field Options

keyrequired
string

The system name of this field. Primarily informs JSON and egress structures.

typerequired

One of string, number, boolean, date, enum, reference. Defines the handling of this property.

labelDefault: "key"
string

A user-facing descriptive label designed to be displayed in the UI such as a table header.

description
string

A long form description of the property intended to be displayed to an end user.

constraintsDefault: "[]"
array

An array of system level Validation Rules meant to be applied after hooks are run.

configDefault: "{}"
object

Configuration relevant to the type of column. See property documentation below.

multiDefault: "false"
boolean

Will allow multiple values and store / provide the values in an array if set. Not all field types support arrays.

metadataDefault: "{}"
object

Arbitrary object of values to pass through to hooks and egress