{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://dashremix.com/spec/web/1.2.0/web@1.schema.json",
 "title": "web@1 v1.2.0",
 "description": "One property per table (an array of rows). Generated from schema.sql by spec/build.py. Extension tables (x_<owner>_*) belong to forks and board-derived tables (d_*) to the board that rebuilds them; both are allowed as additional properties.",
 "type": "object",
 "properties": {
  "meta": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "key": {
      "type": [
       "string",
       "null"
      ]
     },
     "value": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [],
    "additionalProperties": false
   }
  },
  "sites": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "site_id": {
      "type": "string"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "host": {
      "type": [
       "string",
       "null"
      ]
     },
     "search_property": {
      "type": [
       "string",
       "null"
      ]
     },
     "analytics_site": {
      "type": [
       "string",
       "null"
      ]
     },
     "tz": {
      "type": [
       "string",
       "null"
      ]
     },
     "source": {
      "type": [
       "string",
       "null"
      ]
     },
     "source_ref": {
      "type": [
       "string",
       "null"
      ]
     },
     "imported_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "site_id"
    ],
    "additionalProperties": false
   }
  },
  "pages": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "site_id": {
      "type": "string"
     },
     "page": {
      "type": "string"
     },
     "url": {
      "type": [
       "string",
       "null"
      ]
     },
     "title": {
      "type": [
       "string",
       "null"
      ]
     },
     "published_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "last_updated": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "source": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "site_id",
     "page"
    ],
    "additionalProperties": false
   }
  },
  "exports": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "export_id": {
      "type": "string"
     },
     "site_id": {
      "type": "string"
     },
     "kind": {
      "type": "string",
      "enum": [
       "search",
       "traffic",
       "conversions"
      ]
     },
     "source": {
      "type": "string"
     },
     "layout": {
      "type": [
       "string",
       "null"
      ]
     },
     "source_ref": {
      "type": "string"
     },
     "search_type": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "web",
       "image",
       "video",
       "news",
       "discover",
       "googleNews",
       null
      ]
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "period_from": {
      "type": [
       "string",
       "null"
      ]
     },
     "dims": {
      "type": "string"
     },
     "filters": {
      "type": [
       "string",
       "null"
      ]
     },
     "rows": {
      "type": "integer"
     },
     "row_cap": {
      "type": [
       "integer",
       "null"
      ]
     },
     "capped": {
      "type": "integer"
     },
     "imported_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "export_id",
     "site_id",
     "kind",
     "source",
     "source_ref",
     "date_from",
     "date_to",
     "dims",
     "rows",
     "capped"
    ],
    "additionalProperties": false
   }
  },
  "search_performance": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "site_id": {
      "type": "string"
     },
     "search_type": {
      "type": "string",
      "enum": [
       "web",
       "image",
       "video",
       "news",
       "discover",
       "googleNews"
      ]
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "dims": {
      "type": "string"
     },
     "query": {
      "type": [
       "string",
       "null"
      ]
     },
     "page": {
      "type": [
       "string",
       "null"
      ]
     },
     "country": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "AD",
       "AE",
       "AF",
       "AG",
       "AI",
       "AL",
       "AM",
       "AO",
       "AQ",
       "AR",
       "AS",
       "AT",
       "AU",
       "AW",
       "AX",
       "AZ",
       "BA",
       "BB",
       "BD",
       "BE",
       "BF",
       "BG",
       "BH",
       "BI",
       "BJ",
       "BL",
       "BM",
       "BN",
       "BO",
       "BQ",
       "BR",
       "BS",
       "BT",
       "BW",
       "BY",
       "BZ",
       "CA",
       "CD",
       "CF",
       "CG",
       "CH",
       "CI",
       "CK",
       "CL",
       "CM",
       "CN",
       "CO",
       "CR",
       "CU",
       "CV",
       "CW",
       "CY",
       "CZ",
       "DE",
       "DJ",
       "DK",
       "DM",
       "DO",
       "DZ",
       "EC",
       "EE",
       "EG",
       "ER",
       "ES",
       "ET",
       "FI",
       "FJ",
       "FK",
       "FM",
       "FO",
       "FR",
       "GA",
       "GB",
       "GD",
       "GE",
       "GF",
       "GG",
       "GH",
       "GI",
       "GL",
       "GM",
       "GN",
       "GP",
       "GQ",
       "GR",
       "GT",
       "GU",
       "GW",
       "GY",
       "HK",
       "HN",
       "HR",
       "HT",
       "HU",
       "ID",
       "IE",
       "IL",
       "IM",
       "IN",
       "IQ",
       "IR",
       "IS",
       "IT",
       "JE",
       "JM",
       "JO",
       "JP",
       "KE",
       "KG",
       "KH",
       "KI",
       "KM",
       "KN",
       "KP",
       "KR",
       "KW",
       "KY",
       "KZ",
       "LA",
       "LB",
       "LC",
       "LI",
       "LK",
       "LR",
       "LS",
       "LT",
       "LU",
       "LV",
       "LY",
       "MA",
       "MC",
       "MD",
       "ME",
       "MF",
       "MG",
       "MH",
       "MK",
       "ML",
       "MM",
       "MN",
       "MO",
       "MQ",
       "MR",
       "MT",
       "MU",
       "MV",
       "MW",
       "MX",
       "MY",
       "MZ",
       "NA",
       "NC",
       "NE",
       "NG",
       "NI",
       "NL",
       "NO",
       "NP",
       "NR",
       "NZ",
       "OM",
       "PA",
       "PE",
       "PF",
       "PG",
       "PH",
       "PK",
       "PL",
       "PR",
       "PS",
       "PT",
       "PW",
       "PY",
       "QA",
       "RE",
       "RO",
       "RS",
       "RU",
       "RW",
       "SA",
       "SB",
       "SC",
       "SD",
       "SE",
       "SG",
       "SI",
       "SK",
       "SL",
       "SM",
       "SN",
       "SO",
       "SR",
       "SS",
       "ST",
       "SV",
       "SX",
       "SY",
       "SZ",
       "TC",
       "TD",
       "TG",
       "TH",
       "TJ",
       "TL",
       "TM",
       "TN",
       "TO",
       "TR",
       "TT",
       "TV",
       "TW",
       "TZ",
       "UA",
       "UG",
       "US",
       "UY",
       "UZ",
       "VA",
       "VC",
       "VE",
       "VG",
       "VI",
       "VN",
       "VU",
       "WS",
       "XK",
       "YE",
       "ZA",
       "ZM",
       "ZW",
       "ZZ",
       null
      ]
     },
     "device": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "desktop",
       "laptop",
       "mobile",
       "tablet",
       null
      ]
     },
     "appearance": {
      "type": [
       "string",
       "null"
      ]
     },
     "clicks": {
      "type": "integer"
     },
     "impressions": {
      "type": "integer"
     },
     "position_sum": {
      "type": [
       "number",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": [
       "string",
       "null"
      ]
     },
     "export_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "imported_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "site_id",
     "search_type",
     "date_from",
     "date_to",
     "dims",
     "clicks",
     "impressions",
     "source"
    ],
    "additionalProperties": false
   }
  },
  "traffic": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "site_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "dims": {
      "type": "string"
     },
     "page": {
      "type": [
       "string",
       "null"
      ]
     },
     "entry_page": {
      "type": [
       "string",
       "null"
      ]
     },
     "traffic_source": {
      "type": [
       "string",
       "null"
      ]
     },
     "channel": {
      "type": [
       "string",
       "null"
      ]
     },
     "utm_medium": {
      "type": [
       "string",
       "null"
      ]
     },
     "utm_source": {
      "type": [
       "string",
       "null"
      ]
     },
     "utm_campaign": {
      "type": [
       "string",
       "null"
      ]
     },
     "country": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "AD",
       "AE",
       "AF",
       "AG",
       "AI",
       "AL",
       "AM",
       "AO",
       "AQ",
       "AR",
       "AS",
       "AT",
       "AU",
       "AW",
       "AX",
       "AZ",
       "BA",
       "BB",
       "BD",
       "BE",
       "BF",
       "BG",
       "BH",
       "BI",
       "BJ",
       "BL",
       "BM",
       "BN",
       "BO",
       "BQ",
       "BR",
       "BS",
       "BT",
       "BW",
       "BY",
       "BZ",
       "CA",
       "CD",
       "CF",
       "CG",
       "CH",
       "CI",
       "CK",
       "CL",
       "CM",
       "CN",
       "CO",
       "CR",
       "CU",
       "CV",
       "CW",
       "CY",
       "CZ",
       "DE",
       "DJ",
       "DK",
       "DM",
       "DO",
       "DZ",
       "EC",
       "EE",
       "EG",
       "ER",
       "ES",
       "ET",
       "FI",
       "FJ",
       "FK",
       "FM",
       "FO",
       "FR",
       "GA",
       "GB",
       "GD",
       "GE",
       "GF",
       "GG",
       "GH",
       "GI",
       "GL",
       "GM",
       "GN",
       "GP",
       "GQ",
       "GR",
       "GT",
       "GU",
       "GW",
       "GY",
       "HK",
       "HN",
       "HR",
       "HT",
       "HU",
       "ID",
       "IE",
       "IL",
       "IM",
       "IN",
       "IQ",
       "IR",
       "IS",
       "IT",
       "JE",
       "JM",
       "JO",
       "JP",
       "KE",
       "KG",
       "KH",
       "KI",
       "KM",
       "KN",
       "KP",
       "KR",
       "KW",
       "KY",
       "KZ",
       "LA",
       "LB",
       "LC",
       "LI",
       "LK",
       "LR",
       "LS",
       "LT",
       "LU",
       "LV",
       "LY",
       "MA",
       "MC",
       "MD",
       "ME",
       "MF",
       "MG",
       "MH",
       "MK",
       "ML",
       "MM",
       "MN",
       "MO",
       "MQ",
       "MR",
       "MT",
       "MU",
       "MV",
       "MW",
       "MX",
       "MY",
       "MZ",
       "NA",
       "NC",
       "NE",
       "NG",
       "NI",
       "NL",
       "NO",
       "NP",
       "NR",
       "NZ",
       "OM",
       "PA",
       "PE",
       "PF",
       "PG",
       "PH",
       "PK",
       "PL",
       "PR",
       "PS",
       "PT",
       "PW",
       "PY",
       "QA",
       "RE",
       "RO",
       "RS",
       "RU",
       "RW",
       "SA",
       "SB",
       "SC",
       "SD",
       "SE",
       "SG",
       "SI",
       "SK",
       "SL",
       "SM",
       "SN",
       "SO",
       "SR",
       "SS",
       "ST",
       "SV",
       "SX",
       "SY",
       "SZ",
       "TC",
       "TD",
       "TG",
       "TH",
       "TJ",
       "TL",
       "TM",
       "TN",
       "TO",
       "TR",
       "TT",
       "TV",
       "TW",
       "TZ",
       "UA",
       "UG",
       "US",
       "UY",
       "UZ",
       "VA",
       "VC",
       "VE",
       "VG",
       "VI",
       "VN",
       "VU",
       "WS",
       "XK",
       "YE",
       "ZA",
       "ZM",
       "ZW",
       "ZZ",
       null
      ]
     },
     "device": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "desktop",
       "laptop",
       "mobile",
       "tablet",
       null
      ]
     },
     "browser": {
      "type": [
       "string",
       "null"
      ]
     },
     "os": {
      "type": [
       "string",
       "null"
      ]
     },
     "visitors": {
      "type": [
       "integer",
       "null"
      ]
     },
     "visits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "pageviews": {
      "type": [
       "integer",
       "null"
      ]
     },
     "bounces": {
      "type": [
       "integer",
       "null"
      ]
     },
     "visit_duration_s": {
      "type": [
       "number",
       "null"
      ]
     },
     "confidence": {
      "type": [
       "string",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": [
       "string",
       "null"
      ]
     },
     "export_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "imported_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "site_id",
     "date_from",
     "date_to",
     "dims",
     "source"
    ],
    "additionalProperties": false
   }
  },
  "conversions": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "site_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "dims": {
      "type": "string"
     },
     "goal": {
      "type": "string"
     },
     "page": {
      "type": [
       "string",
       "null"
      ]
     },
     "traffic_source": {
      "type": [
       "string",
       "null"
      ]
     },
     "visitors": {
      "type": [
       "integer",
       "null"
      ]
     },
     "events": {
      "type": [
       "integer",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": [
       "string",
       "null"
      ]
     },
     "export_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "imported_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "site_id",
     "date_from",
     "date_to",
     "dims",
     "goal",
     "source"
    ],
    "additionalProperties": false
   }
  },
  "creator_accounts": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "account_id": {
      "type": "string"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "platform": {
      "type": "string"
     },
     "medium": {
      "type": "string",
      "enum": [
       "newsletter",
       "podcast",
       "social",
       "email",
       "ads"
      ]
     },
     "tz": {
      "type": [
       "string",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "account_id",
     "platform",
     "medium",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "creator_content": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "content_id": {
      "type": "string"
     },
     "account_id": {
      "type": "string"
     },
     "kind": {
      "type": "string",
      "enum": [
       "newsletter_issue",
       "episode",
       "post",
       "video",
       "short_video",
       "livestream"
      ]
     },
     "title": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "draft",
       "scheduled",
       "published",
       "cancelled",
       null
      ]
     },
     "scheduled_for": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "published_on": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "duration_s": {
      "type": [
       "number",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "content_id",
     "account_id",
     "kind",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "creator_audience": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "account_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "kind": {
      "type": "string",
      "enum": [
       "subscribers",
       "followers",
       "listeners"
      ]
     },
     "acquisition_source": {
      "type": [
       "string",
       "null"
      ]
     },
     "joined": {
      "type": [
       "integer",
       "null"
      ]
     },
     "left_count": {
      "type": [
       "integer",
       "null"
      ]
     },
     "ending_count": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unique_listeners": {
      "type": [
       "integer",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "account_id",
     "date_from",
     "date_to",
     "kind",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "creator_content_performance": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "content_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "window_days": {
      "type": [
       "integer",
       "null"
      ]
     },
     "views": {
      "type": [
       "integer",
       "null"
      ]
     },
     "impressions": {
      "type": [
       "integer",
       "null"
      ]
     },
     "watch_time_s": {
      "type": [
       "number",
       "null"
      ]
     },
     "downloads": {
      "type": [
       "integer",
       "null"
      ]
     },
     "sent": {
      "type": [
       "integer",
       "null"
      ]
     },
     "delivered": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unique_opens": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unique_clicks": {
      "type": [
       "integer",
       "null"
      ]
     },
     "reactions": {
      "type": [
       "integer",
       "null"
      ]
     },
     "comments": {
      "type": [
       "integer",
       "null"
      ]
     },
     "shares": {
      "type": [
       "integer",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "content_id",
     "date_from",
     "date_to",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "creator_retention": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "content_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "cohort": {
      "type": [
       "string",
       "null"
      ]
     },
     "offset_s": {
      "type": "number"
     },
     "starting_audience": {
      "type": [
       "integer",
       "null"
      ]
     },
     "remaining_audience": {
      "type": [
       "integer",
       "null"
      ]
     },
     "retained_share": {
      "type": [
       "number",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "content_id",
     "date_from",
     "date_to",
     "offset_s",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "creator_campaigns": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "campaign_id": {
      "type": "string"
     },
     "account_id": {
      "type": "string"
     },
     "kind": {
      "type": "string",
      "enum": [
       "email",
       "ad"
      ]
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "sent_on": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "campaign_id",
     "account_id",
     "kind",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "email_campaign_performance": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "campaign_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "sent": {
      "type": [
       "integer",
       "null"
      ]
     },
     "delivered": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unique_opens": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unique_clicks": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unsubscribes": {
      "type": [
       "integer",
       "null"
      ]
     },
     "attributed_revenue": {
      "type": [
       "number",
       "null"
      ]
     },
     "currency": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^[A-Z]{3}$"
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "campaign_id",
     "date_from",
     "date_to",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "ad_campaign_performance": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "row_id": {
      "type": "string"
     },
     "campaign_id": {
      "type": "string"
     },
     "date_from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "date_to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
     },
     "spend": {
      "type": "number"
     },
     "impressions": {
      "type": [
       "integer",
       "null"
      ]
     },
     "clicks": {
      "type": [
       "integer",
       "null"
      ]
     },
     "conversions": {
      "type": [
       "number",
       "null"
      ]
     },
     "attributed_value": {
      "type": [
       "number",
       "null"
      ]
     },
     "click_window_days": {
      "type": [
       "integer",
       "null"
      ]
     },
     "view_window_days": {
      "type": [
       "integer",
       "null"
      ]
     },
     "conversion_basis": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "reported",
       "estimated",
       null
      ]
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "row_id",
     "campaign_id",
     "date_from",
     "date_to",
     "currency",
     "spend",
     "source",
     "source_ref",
     "imported_at"
    ],
    "additionalProperties": false
   }
  },
  "bookings": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "booking_id": {
      "type": "string"
     },
     "site_id": {
      "type": "string"
     },
     "booked_on": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
     },
     "channel": {
      "type": "string",
      "enum": [
       "direct",
       "airbnb",
       "vrbo",
       "booking",
       "other"
      ]
     },
     "status": {
      "type": "string",
      "enum": [
       "confirmed",
       "cancelled",
       "pending",
       "no_show"
      ]
     },
     "traffic_source": {
      "type": [
       "string",
       "null"
      ]
     },
     "utm_source": {
      "type": [
       "string",
       "null"
      ]
     },
     "utm_medium": {
      "type": [
       "string",
       "null"
      ]
     },
     "utm_campaign": {
      "type": [
       "string",
       "null"
      ]
     },
     "reservation_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "value": {
      "type": [
       "number",
       "null"
      ]
     },
     "currency": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^[A-Z]{3}$"
     },
     "source": {
      "type": "string"
     },
     "source_ref": {
      "type": "string"
     },
     "imported_at": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?Z$"
     }
    },
    "required": [
     "booking_id",
     "site_id",
     "booked_on",
     "channel",
     "status",
     "source",
     "source_ref"
    ],
    "additionalProperties": false
   }
  },
  "import_issues": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "issue_id": {
      "type": "string"
     },
     "severity": {
      "type": "string",
      "enum": [
       "info",
       "warn",
       "error"
      ]
     },
     "kind": {
      "type": "string"
     },
     "file": {
      "type": [
       "string",
       "null"
      ]
     },
     "line": {
      "type": [
       "integer",
       "null"
      ]
     },
     "detail": {
      "type": "string"
     },
     "handling": {
      "type": "string"
     },
     "source": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "issue_id",
     "severity",
     "kind",
     "detail",
     "handling"
    ],
    "additionalProperties": false
   }
  },
  "overrides": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "override_id": {
      "type": "string"
     },
     "target": {
      "type": "string"
     },
     "field": {
      "type": [
       "string",
       "null"
      ]
     },
     "old_value": {
      "type": [
       "string",
       "null"
      ]
     },
     "new_value": {
      "type": [
       "string",
       "null"
      ]
     },
     "reason": {
      "type": "string"
     },
     "evidence": {
      "type": [
       "string",
       "null"
      ]
     },
     "author": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "override_id",
     "target",
     "reason"
    ],
    "additionalProperties": false
   }
  },
  "annotations": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "annotation_id": {
      "type": "string"
     },
     "target": {
      "type": "string"
     },
     "kind": {
      "type": "string"
     },
     "body": {
      "type": "string"
     },
     "author": {
      "type": [
       "string",
       "null"
      ]
     },
     "source_ref": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": [
       "string",
       "null"
      ]
     },
     "data_hash": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "annotation_id",
     "target",
     "kind",
     "body"
    ],
    "additionalProperties": false
   }
  },
  "metric_registry": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "metric_id": {
      "type": "string"
     },
     "version": {
      "type": [
       "integer",
       "null"
      ]
     },
     "unit": {
      "type": [
       "string",
       "null"
      ]
     },
     "params": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "sql": {
      "type": [
       "string",
       "null"
      ]
     },
     "test": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "metric_id"
    ],
    "additionalProperties": false
   }
  }
 },
 "required": [
  "meta",
  "sites",
  "exports",
  "search_performance",
  "traffic"
 ],
 "patternProperties": {
  "^x_[a-z0-9_]+$": {
   "type": "array"
  },
  "^d_[a-z0-9_]+$": {
   "type": "array"
  }
 },
 "additionalProperties": false
}
