{
  "title": "UK Trade Tariff Monitor – Duties, Controls & Measure Changes",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "commodityCodes": {
      "title": "UK commodity codes",
      "type": "array",
      "editor": "stringList",
      "default": [
        "8542319000"
      ],
      "prefill": [
        "8542319000"
      ],
      "description": "One to three exact ten-digit declarable UK commodity codes; no keyword classification."
    },
    "direction": {
      "title": "Trade direction",
      "type": "string",
      "editor": "select",
      "enum": [
        "import",
        "export",
        "both"
      ],
      "enumTitles": [
        "Import measures",
        "Export measures",
        "Both directions"
      ],
      "description": "Choose import measures, export measures, or both for each selected commodity. Import and export observations keep distinct identities and source conditions.",
      "default": "import"
    },
    "measureTypeContains": {
      "title": "Measure type contains",
      "type": "string",
      "editor": "textfield",
      "default": "",
      "description": "Optional case-insensitive text, e.g. duty, tariff preference or restriction."
    },
    "geographicalAreaIds": {
      "title": "Exact geographical-area IDs",
      "type": "array",
      "editor": "stringList",
      "default": [],
      "description": "Optional source IDs, such as 1011 for ERGA OMNES. No automatic expansion of country groups or applicability determination."
    },
    "measuresPerCommodity": {
      "title": "Measures per commodity",
      "type": "integer",
      "default": 3,
      "minimum": 1,
      "maximum": 50,
      "description": "Select up to this many matching measures per code before applying the overall maximum."
    },
    "maxResults": {
      "title": "Maximum saved results",
      "type": "integer",
      "default": 3,
      "minimum": 1,
      "maximum": 100,
      "description": "Maximum observations saved in the selected window. Rows outside this window are not compared."
    },
    "comparePrevious": {
      "title": "Compare with previous observations",
      "type": "boolean",
      "default": false,
      "description": "First complete run establishes a baseline. Repeat identical filters and history name to inspect changes."
    },
    "onlyChanges": {
      "title": "Save only new or changed records",
      "type": "boolean",
      "default": false,
      "description": "Enables comparison. Unchanged observations are not saved or charged."
    },
    "snapshotName": {
      "title": "Comparison history name",
      "type": "string",
      "editor": "textfield",
      "default": "default",
      "description": "1–80 letters, numbers, underscores or hyphens. Use separate names for independent workflows."
    },
    "maxRunSeconds": {
      "title": "Run time budget in seconds",
      "type": "integer",
      "default": 120,
      "minimum": 30,
      "maximum": 120,
      "description": "Source requests and output are bounded. Incomplete runs never advance history."
    }
  }
}
