Skip to content

Latest commit

 

History

History
579 lines (440 loc) · 19.4 KB

File metadata and controls

579 lines (440 loc) · 19.4 KB
page_title subcategory description
epilot-schema_schema Resource - terraform-provider-epilot-schema
Schema Resource

epilot-schema_schema (Resource)

Schema Resource

Example Usage

resource "epilot-schema_schema" "my_schema" {
  attributes   = "{ \"see\": \"documentation\" }"
  blueprint    = "908c64a5-6ec4-462f-bc04-47cf986dab4a"
  capabilities = "{ \"see\": \"documentation\" }"
  category     = "customer_relations"
  created_at   = "...my_created_at..."
  description  = "Example description"
  dialog_config = {
    key = jsonencode("value"),
  }
  docs_url = "https://docs.epilot.io/docs/pricing/entities"
  draft    = false
  enable_setting = [
    "360_features"
  ]
  explicit_search_mappings = {
    fields = {
      key = jsonencode("value"),
    }
    index = false
    type  = "flattened"
  }
  feature_flag    = "FF_MY_FEATURE_FLAG"
  group_headlines = "{ \"see\": \"documentation\" }"
  group_settings  = "{ \"see\": \"documentation\" }"
  icon            = "person"
  id              = "89868668-91fd-45da-ba4d-b78cf9b60131"
  layout_settings = {
    additional_properties = "{ \"see\": \"documentation\" }"
    grid_gap              = "...my_grid_gap..."
    grid_template_columns = "...my_grid_template_columns..."
  }
  name      = "Contact"
  plural    = "Contacts"
  published = false
  purpose = [
    "..."
  ]
  slug           = "contact"
  title_template = "{{first_name}} {{last_name}}"
  ui_config = {
    create_view = {
      entity_default_create = {
        search_params = {
          key = "value",
        }
        view_type = "default"
      }
      entity_view_disabled = {
        view_type = "disabled"
      }
      redirect_entity_view = {
        route     = "/app/pricing-hub/product/:entityId"
        view_type = "redirect"
      }
    }
    edit_view = {
      entity_default_edit = {
        search_params = {
          key = "value",
        }
        summary_attributes = [
          "email"
        ]
        view_type = "default"
      }
      entity_view_disabled = {
        view_type = "disabled"
      }
      redirect_entity_view = {
        route     = "/app/pricing-hub/product/:entityId"
        view_type = "redirect"
      }
    }
    list_item = {
      quick_actions = [
        {
          action     = "preview_file"
          icon       = "visibility"
          label      = "Preview File"
          permission = "entity:edit"
        }
      ]
      summary_attributes = [
        {
          str = "email"
          summary_attribute = {
            content_line_cap    = 1.23
            content_wrap        = "normal"
            display_mode        = "inline"
            feature_flag        = "...my_feature_flag..."
            hide_label          = true
            highlight_container = true
            label               = "...my_label..."
            render_condition    = "...my_render_condition..."
            settings_flag = [
              {
                enabled = true
                name    = "...my_name..."
              }
            ]
            show_as_tag = false
            tag_color   = "...my_tag_color..."
            value       = "...my_value..."
          }
        }
      ]
      ui_config = {
        content_direction = "row"
      }
    }
    sharing = {
      show_sharing_button = true
    }
    single_view = {
      entity_default_edit = {
        search_params = {
          key = "value",
        }
        summary_attributes = [
          "email"
        ]
        view_type = "default"
      }
      entity_view_disabled = {
        view_type = "disabled"
      }
      redirect_entity_view = {
        route     = "/app/pricing-hub/product/:entityId"
        view_type = "redirect"
      }
    }
    table_view = {
      entity_default_table = {
        bulk_actions = [
          {
            entity_action = {
              action     = "preview_file"
              icon       = "visibility"
              label      = "Preview File"
              permission = "entity:edit"
            }
            str = "...my_str..."
          }
        ]
        enable_thumbnails = true
        navbar_actions = [
          {
            options = [
              {
                label = "...my_label..."
                params = {
                  # ...
                }
              }
            ]
            type = "...my_type..."
          }
        ]
        row_actions = [
          {
            entity_action = {
              action     = "preview_file"
              icon       = "visibility"
              label      = "Preview File"
              permission = "entity:edit"
            }
            str = "...my_str..."
          }
        ]
        view_type = "default"
      }
      entity_view_disabled = {
        view_type = "disabled"
      }
      redirect_entity_view = {
        route     = "/app/pricing-hub/product/:entityId"
        view_type = "redirect"
      }
    }
  }
  updated_at = "...my_updated_at..."
  version    = 2
}

Schema

Required

  • attributes (String) Parsed as JSON.
  • capabilities (String) Parsed as JSON.
  • name (String) User-friendly identifier for the entity schema
  • plural (String)
  • slug (String) Entity Type

Optional

  • blueprint (String) Reference to blueprint
  • category (String)
  • created_at (String)
  • description (String)
  • dialog_config (Map of String)
  • docs_url (String)
  • draft (Boolean) Default: false
  • enable_setting (List of String) This schema should only be active when one of the organization settings is enabled
  • explicit_search_mappings (Attributes Map) Advanced: explicit Elasticsearch index mapping definitions for entity data (see below for nested schema)
  • feature_flag (String) This schema should only be active when the feature flag is enabled
  • group_headlines (String) Parsed as JSON.
  • group_settings (String) Parsed as JSON.
  • icon (String)
  • id (String) Generated uuid for schema
  • layout_settings (Attributes) Custom grid definitions for the layout. These settings are composed by managed and un-managed properties:
  • Managed Properties: are interpreted and transformed into layout styles
  • Un-managed Properties: are appended as styles into the attribute mounting node (see below for nested schema)
  • published (Boolean)
  • purpose (List of String)
  • title_template (String) Template for rendering the title field. Uses handlebars
  • ui_config (Attributes) (see below for nested schema)
  • updated_at (String)
  • version (Number)

Nested Schema for explicit_search_mappings

Optional:

  • fields (Map of String)
  • index (Boolean) Default: true
  • type (String) must be one of ["keyword", "text", "boolean", "integer", "long", "float", "date", "flattened", "nested"]

Nested Schema for layout_settings

Optional:

  • additional_properties (String) Parsed as JSON.
  • grid_gap (String) Defines the grid gap for the mounting node of the attribute.
  • grid_template_columns (String) Defines the grid column template for the mounting node of the attribute.

Nested Schema for ui_config

Optional:

Nested Schema for ui_config.create_view

Optional:

Nested Schema for ui_config.create_view.entity_default_create

Optional:

  • search_params (Map of String)
  • view_type (String) must be "default"

Nested Schema for ui_config.create_view.entity_view_disabled

Optional:

  • view_type (String) must be "disabled"

Nested Schema for ui_config.create_view.redirect_entity_view

Optional:

  • route (String)
  • view_type (String) must be "redirect"

Nested Schema for ui_config.edit_view

Optional:

Nested Schema for ui_config.edit_view.entity_default_edit

Optional:

  • search_params (Map of String)
  • summary_attributes (List of String) List of attribute names that we show in the summary header
  • view_type (String) must be "default"

Nested Schema for ui_config.edit_view.entity_view_disabled

Optional:

  • view_type (String) must be "disabled"

Nested Schema for ui_config.edit_view.redirect_entity_view

Optional:

  • route (String)
  • view_type (String) must be "redirect"

Nested Schema for ui_config.list_item

Optional:

Nested Schema for ui_config.list_item.quick_actions

Optional:

  • action (String) A unique action name. Not Null
  • icon (String)
  • label (String) Not Null
  • permission (String) Permission required to show the action. If not provided, the action will be shown to all users.

Nested Schema for ui_config.list_item.summary_attributes

Optional:

  • str (String)
  • summary_attribute (Attributes) Represents an expanded version of an attribute to be displayed in the list item summary. This configuration can be used in the following way:
{
  "label": "Price components"
  "value": "{{"{{"}}item.prices.length{{"}}"}} price components"
  "show_as_tag": true
  "render_condition": "is_composite_price = "true""
}

The value field supports handlebar expressions from which you can pick any field from the entity state. (see below for nested schema)

Nested Schema for ui_config.list_item.summary_attributes.summary_attribute

Optional:

  • content_line_cap (Number) Defines the line numbers of the content. For instance, When set to 1, the content will be displayed in a single line.
  • content_wrap (String) Defines white-space of the content. must be one of ["normal", "nowrap", "pre", "pre-wrap"]
  • display_mode (String) Defines the display mode of the summary attribute. When set to inline, the label and value will be displayed in the same line. When set to block, the label and value will be displayed in separate lines. must be one of ["inline", "block"]
  • feature_flag (String) Binds summary field visibility to the feature flag state.
  • hide_label (Boolean) When set to true, will hide the label of the field.
  • highlight_container (Boolean) When set to true, will highlight the container of the field.
  • label (String) Label to be shown on the top of the value. Not Null
  • render_condition (String) Defines the conditional rendering expression for showing this field. When a valid expression is parsed, their evaluation defines the visibility of this attribute. Note: Empty or invalid expression have no effect on the field visibility.
  • settings_flag (Attributes List) This summary attribute should only be visible when all the settings have the correct value (see below for nested schema)
  • show_as_tag (Boolean) Displays the value within a tag chip.
  • tag_color (String) CSS hex color or CSS color name for the tag chip.
  • value (String) A static value or an handlebar expression. Not Null

Nested Schema for ui_config.list_item.summary_attributes.summary_attribute.settings_flag

Optional:

  • enabled (Boolean) Whether the setting should be enabled or not
  • name (String) The name of the organization setting to check

Nested Schema for ui_config.list_item.ui_config

Optional:

  • content_direction (String) Show attributes in a row or column. must be one of ["row", "column"]

Nested Schema for ui_config.sharing

Optional:

  • show_sharing_button (Boolean) Show the sharing button in entity detail view

Nested Schema for ui_config.single_view

Optional:

Nested Schema for ui_config.single_view.entity_default_edit

Optional:

  • search_params (Map of String)
  • summary_attributes (List of String) List of attribute names that we show in the summary header
  • view_type (String) must be "default"

Nested Schema for ui_config.single_view.entity_view_disabled

Optional:

  • view_type (String) must be "disabled"

Nested Schema for ui_config.single_view.redirect_entity_view

Optional:

  • route (String)
  • view_type (String) must be "redirect"

Nested Schema for ui_config.table_view

Optional:

Nested Schema for ui_config.table_view.entity_default_table

Optional:

Nested Schema for ui_config.table_view.entity_default_table.bulk_actions

Optional:

  • entity_action (Attributes) An entity action configured from the entity schema (see below for nested schema)
  • str (String)

Nested Schema for ui_config.table_view.entity_default_table.bulk_actions.entity_action

Optional:

  • action (String) A unique action name. Not Null
  • icon (String)
  • label (String) Not Null
  • permission (String) Permission required to show the action. If not provided, the action will be shown to all users.

Nested Schema for ui_config.table_view.entity_default_table.navbar_actions

Optional:

Nested Schema for ui_config.table_view.entity_default_table.navbar_actions.options

Optional:

Nested Schema for ui_config.table_view.entity_default_table.navbar_actions.options.params

Nested Schema for ui_config.table_view.entity_default_table.row_actions

Optional:

  • entity_action (Attributes) An entity action configured from the entity schema (see below for nested schema)
  • str (String)

Nested Schema for ui_config.table_view.entity_default_table.row_actions.entity_action

Optional:

  • action (String) A unique action name. Not Null
  • icon (String)
  • label (String) Not Null
  • permission (String) Permission required to show the action. If not provided, the action will be shown to all users.

Nested Schema for ui_config.table_view.entity_view_disabled

Optional:

  • view_type (String) must be "disabled"

Nested Schema for ui_config.table_view.redirect_entity_view

Optional:

  • route (String)
  • view_type (String) must be "redirect"

Import

Import is supported using the following syntax:

terraform import epilot-schema_schema.my_epilot-schema_schema "contact"