{
  "type": "object",
  "properties": {
    "safeName": {
      "type": "string"
    },
    "transposed": {
      "type": "boolean"
    },
    "dynamicHeight": {
      "type": "boolean"
    },
    "showTitle": {
      "type": "boolean"
    },
    "showTotals": {
      "type": "boolean"
    },
    "updateFrequency": {
      "type": "number"
    },
    "hiddenColumns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "onlyShownColumns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "defaultVisibleColumns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "itemsPerPage": {
      "type": "number"
    },
    "overrideLoadingConfig": {
      "$ref": "#/definitions/LoadingConfig"
    },
    "loadingOverrides": {
      "description": "Loading semantics: the loading type the table behaves as and the date\ncolumns the window filters by. Drives the default window, the header's\npickers and the data request alike. Callers own them; anything unset falls\nback to the template's own configuration server-side.",
      "$ref": "#/definitions/ITemplateLoadingOverrides"
    },
    "overriddenColumnValues": {
      "$ref": "#/definitions/OverriddenColumnValues"
    },
    "filter": {
      "type": ["null", "string"]
    },
    "defaultFilter": {
      "type": "string"
    },
    "optionalFilters": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/OptionalFilter"
      }
    },
    "foreignKeyFilters": {
      "$ref": "#/definitions/Record<string,string[]>"
    },
    "datasetTimeColumns": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/DatasetTimeColumn"
      }
    },
    "onFetchError": {
      "type": "object"
    },
    "exactDateFrom": {
      "type": "string",
      "format": "date-time"
    },
    "exactDateTo": {
      "type": "string",
      "format": "date-time"
    },
    "hideDates": {
      "type": "boolean"
    },
    "showFilter": {
      "type": "boolean"
    },
    "showImport": {
      "type": "boolean"
    },
    "useExternalFilterEndpoint": {
      "type": "boolean"
    },
    "allowAddEntry": {
      "type": "boolean"
    },
    "allowRowEdit": {
      "type": "boolean"
    },
    "hideHeader": {
      "type": "boolean"
    },
    "hidePagination": {
      "type": "boolean"
    },
    "defaultSorting": {
      "enum": ["ASC", "DESC"],
      "type": "string"
    },
    "defaultSortingAttribute": {
      "type": "string"
    },
    "isColumnsSortable": {
      "type": "boolean"
    },
    "maxAge": {
      "type": "number"
    },
    "onFilterChange": {
      "type": "object"
    },
    "rowSize": {
      "enum": ["LARGE", "MEDIUM", "SMALL"],
      "type": "string"
    },
    "rowHeight": {
      "type": "number"
    },
    "textAlign": {
      "enum": ["center", "left", "right"],
      "type": "string"
    },
    "fontSize": {
      "type": "number"
    },
    "id": {
      "type": "string"
    },
    "reportOptions": {
      "$ref": "#/definitions/ReportOptions"
    },
    "reportMode": {
      "type": "boolean"
    },
    "stateCb": {
      "type": "object"
    },
    "calendarType": {
      "const": "CALENDAR_445",
      "type": "string"
    },
    "editColumnLocation": {
      "enum": ["BACK", "FRONT"],
      "type": "string"
    },
    "disableRowDuplicate": {
      "type": "boolean"
    },
    "disableRowRemove": {
      "type": "boolean"
    }
  },
  "required": ["safeName"],
  "definitions": {
    "LoadingConfig": {
      "type": "object",
      "properties": {
        "loadingType": {
          "enum": [
            "EVERYTHING",
            "FIXED_PERIOD",
            "OVERLAP",
            "OVERLAP_OPEN_ENDED",
            "RANGE"
          ],
          "type": "string"
        },
        "loadingConfig": {
          "$ref": "#/definitions/IPeriodLoadingConfig"
        }
      }
    },
    "IPeriodLoadingConfig": {
      "type": "object",
      "properties": {
        "defaultConfigUnit": {
          "enum": [
            "DAYS",
            "HALFHOUR",
            "HOURS",
            "MILLIS",
            "MINUTES",
            "MONTHS",
            "SECONDS",
            "WEEKS",
            "YEARS"
          ],
          "type": "string"
        },
        "truncateStartUnit": {
          "enum": [
            "DAYS",
            "HALFHOUR",
            "HOURS",
            "MILLIS",
            "MINUTES",
            "MONTHS",
            "SECONDS",
            "WEEKS",
            "YEARS"
          ],
          "type": "string"
        },
        "periodUnit": {
          "enum": [
            "DAYS",
            "HALFHOUR",
            "HOURS",
            "MILLIS",
            "MINUTES",
            "MONTHS",
            "SECONDS",
            "WEEKS",
            "YEARS"
          ],
          "type": "string"
        },
        "period": {
          "type": "number"
        },
        "offsetUnit": {
          "enum": [
            "DAYS",
            "HALFHOUR",
            "HOURS",
            "MILLIS",
            "MINUTES",
            "MONTHS",
            "SECONDS",
            "WEEKS",
            "YEARS"
          ],
          "type": "string"
        },
        "offset": {
          "type": "number"
        }
      }
    },
    "ITemplateLoadingOverrides": {
      "description": "Server-side loading overrides for components reading product template\nentries with a date window. Each part is independent and falls back to the\ntemplate's own configuration when unset; sent as the loadingType /\nstartAttribute / stopAttribute query params.",
      "type": "object",
      "properties": {
        "loadingType": {
          "enum": [
            "EVERYTHING",
            "FIXED_PERIOD",
            "OVERLAP",
            "OVERLAP_OPEN_ENDED",
            "RANGE"
          ],
          "type": "string"
        },
        "startAttribute": {
          "description": "Temporal (DATETIME/INSTANT) attribute the window's start filters by.",
          "type": "string"
        },
        "stopAttribute": {
          "description": "Temporal (DATETIME/INSTANT) attribute the window's end filters by.",
          "type": "string"
        }
      }
    },
    "OverriddenColumnValues": {
      "type": "object",
      "properties": {
        "selectedColumnsToOverride": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SelectedColumnToOverride"
          }
        },
        "overrideColumnValues": {
          "type": "boolean"
        }
      },
      "required": ["overrideColumnValues", "selectedColumnsToOverride"]
    },
    "SelectedColumnToOverride": {
      "type": "object",
      "properties": {
        "columnTitle": {
          "type": "string"
        },
        "defaultValue": {
          "type": "string"
        }
      },
      "required": ["columnTitle", "defaultValue"]
    },
    "OptionalFilter": {
      "type": "object",
      "properties": {
        "filter": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      },
      "required": ["filter", "label"]
    },
    "Record<string,string[]>": {
      "type": "object"
    },
    "DatasetTimeColumn": {
      "type": "object",
      "properties": {
        "referenceName": {
          "type": "string"
        },
        "pattern": {
          "description": "js-joda date pattern; defaults to `yyyy-MM-dd HH:mm` when unset.",
          "type": "string"
        }
      },
      "required": ["referenceName"]
    },
    "ReportOptions": {
      "type": "object",
      "properties": {
        "splitAfter": {
          "type": "number"
        },
        "fontSize": {
          "type": "string"
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
