{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oviond-com/json-schema/oviond-com-update-widget-request-schema.json",
  "title": "UpdateWidgetRequest",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oviond-com-openapi.json#/components/schemas/UpdateWidgetRequest",
  "type": "object",
  "properties": {
    "source_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "project",
        "template"
      ]
    },
    "source_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "page_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "client_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "DATA",
        "TEXT",
        "IMAGE",
        "HTML",
        "VIDEO",
        "EMBED",
        "TITLE",
        "BUTTON",
        "GOAL"
      ]
    },
    "chart": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "table",
        "score",
        "area",
        "line",
        "bar",
        "column",
        "pie",
        "donut",
        "funnel",
        "map",
        "areaspline",
        "spline",
        "stacked_area",
        "percentage_area",
        "stacked_column",
        "stacked_bar",
        "100_stacked_column",
        "3d_bar",
        "3d_column",
        "3d_pie",
        "3d_donut",
        "funnel3d",
        "custom"
      ]
    },
    "chart_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "table",
        "score",
        "area",
        "line",
        "bar",
        "column",
        "pie",
        "donut",
        "funnel",
        "map",
        "areaspline",
        "spline",
        "stacked_area",
        "percentage_area",
        "stacked_column",
        "stacked_bar",
        "100_stacked_column",
        "3d_bar",
        "3d_column",
        "3d_pie",
        "3d_donut",
        "funnel3d",
        "custom"
      ]
    },
    "chart_group": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "line",
        "area",
        "bar",
        "pie",
        "funnel",
        "table",
        "score",
        "map",
        "column",
        "donut",
        "column_bar_charts",
        "line_area_charts",
        "pie_donut_charts",
        "scorecard"
      ]
    },
    "state": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "loading",
        "LOADING",
        "active",
        "ACTIVE",
        "error",
        "ERROR",
        "NO_DATA",
        "demo",
        "DEMO"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "auto_generated_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "heading": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "h1",
        "h2",
        "h3",
        "h4",
        "h5"
      ]
    },
    "align": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "left",
        "center",
        "right",
        "justify"
      ]
    },
    "link": {
      "type": [
        "string",
        "null"
      ]
    },
    "link_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "image_fit": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "object-contain",
        "object-cover",
        "object-fill",
        "object-none"
      ]
    },
    "embed_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "URL",
        "IFRAME",
        "HTML"
      ]
    },
    "embed_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "embed_iframe": {
      "type": [
        "string",
        "null"
      ]
    },
    "embed_html": {
      "type": [
        "string",
        "null"
      ]
    },
    "size": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "content": {
      "type": [
        "string",
        "null"
      ]
    },
    "src": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "type": [
        "string",
        "null"
      ]
    },
    "icon": {
      "type": [
        "string",
        "null"
      ]
    },
    "target": {
      "type": [
        "string",
        "null"
      ]
    },
    "image_link_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "x": {
      "type": [
        "number",
        "null"
      ]
    },
    "y": {
      "type": [
        "number",
        "null"
      ]
    },
    "width": {
      "type": [
        "number",
        "null"
      ]
    },
    "height": {
      "type": [
        "number",
        "null"
      ]
    },
    "is_secondary": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "icon_position": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "top",
        "right",
        "bottom",
        "left",
        "none"
      ]
    },
    "options_3d": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "kpi": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "blended": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "row_limit": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "5",
        "10",
        "25",
        "50",
        "100",
        "500",
        "all"
      ]
    },
    "comparison_display": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "previous",
        "change",
        "both"
      ]
    },
    "sort_order": {
      "type": [
        "string",
        "null"
      ]
    },
    "sort_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "column_widths": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "number"
      }
    },
    "b_height": {
      "type": [
        "string",
        "null"
      ]
    },
    "legend_position": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "top",
        "right",
        "bottom",
        "left",
        "none"
      ]
    },
    "invert_y_axis": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_header": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_name": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_icon": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_date": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_grid_lines": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_legends": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_x_axis": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_y_axis": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_trendline": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_totals": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_search": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_table_filters": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_logarithmic": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_multiple_axes": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_custom_date_range": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_description": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_container": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_label_list": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "show_chart": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "expand_rows": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "datasource_id": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "advanced-web-ranking",
        "ac",
        "adroll",
        "ahrefs",
        "basecamp",
        "brightlocal",
        "call-rail",
        "drip",
        "keywords",
        "sendin-blue",
        "sendgrid",
        "moosend",
        "mautic",
        "mailer-lite",
        "pingdom",
        "uptime-robot",
        "piwik-pro",
        "wordpress",
        "pabbly-connect",
        "ment",
        "twilio",
        "switchy",
        "vimeo",
        "pinterest",
        "pinterest-ads",
        "gtres",
        "paypal",
        "gps",
        "gs",
        "CUSTOM_IMPORT",
        "CUSTOM_DATA",
        "CALCULATION",
        "GOALS",
        "str",
        "wistia",
        "ca-mon",
        "convertkit",
        "woocommerce",
        "xero",
        "matomo",
        "go-high-level",
        "wcs",
        "bing-webmaster-tools",
        "pipedrive",
        "salesforce",
        "tiktok",
        "tiktok-ads",
        "twr",
        "twr-ads",
        "spf",
        "ytbe",
        "google-local-services-ads",
        "klaviyo",
        "gsh",
        "ga4",
        "lkdin-ads",
        "lkdin-pg",
        "mlchmp",
        "inst-ads",
        "inst",
        "fb-ads",
        "fb-pg",
        "gmb",
        "serpstat",
        "hubspot",
        "gadw",
        "sem-rush",
        "se-ranking",
        "microsoft-ads",
        "plausible",
        "snapchat-ads",
        "microsoft-clarity",
        "serp-watch",
        "vbout",
        "moz",
        "chatgpt-ads",
        "omnisend",
        "lemlist",
        "airtable",
        "nozzle",
        "surnex",
        "jira",
        "clickup",
        "make",
        "freshdesk",
        "chart-mogul",
        "amplitude",
        "harvest",
        "zoho-crm",
        "clockify",
        "adtraction",
        "shopify",
        "copper",
        "help-scout-docs",
        "close-crm",
        "simplesat",
        "help-scout-mailbox",
        "paddle",
        "endorsal",
        "seocrawl",
        "encharge",
        "teamwork",
        "slack",
        "asana",
        "typeform",
        "appfigures",
        "intercom",
        "bigcommerce",
        "monday",
        "demo"
      ]
    },
    "datasource_type": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "DATASOURCE",
        "CALCULATION",
        "CUSTOM_DATA",
        "CUSTOM_IMPORT",
        "GOALS"
      ]
    },
    "data_view": {
      "type": [
        "string",
        "null"
      ]
    },
    "metrics": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/MetricSelection"
      }
    },
    "dimensions": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/DimensionSelection"
      }
    },
    "filters": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/WidgetFilter"
      }
    },
    "advanced": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {}
    },
    "currency": {
      "$ref": "#/$defs/CurrencyInput"
    },
    "date_range": {
      "allOf": [
        {
          "$ref": "#/$defs/DateRange"
        },
        {
          "type": [
            "object",
            "null"
          ]
        }
      ]
    },
    "current_data": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "current_summary": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {}
    },
    "previous_data": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "previous_summary": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {}
    },
    "series_fetched_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "error_status": {
      "type": "null"
    },
    "created_at": {}
  },
  "additionalProperties": false,
  "$defs": {
    "CurrencyInput": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "symbol": {
              "type": "string"
            },
            "iso": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^[A-Z]{2}$"
            }
          },
          "required": [
            "code",
            "symbol"
          ]
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO 4217 currency code (e.g. \"USD\") or a full { code, symbol, iso } object."
    },
    "DateRange": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "enum": [
            "Today",
            "Yesterday",
            "Last 7 Days",
            "Last 30 Days",
            "Last 60 Days",
            "Custom Days",
            "This Month",
            "Last Month",
            "Custom Months",
            "Last 2 Months",
            "Last 3 Months",
            "Last 12 Months",
            "This Year",
            "Last Year",
            "Custom"
          ]
        },
        "compare": {
          "type": "string",
          "enum": [
            "None",
            "Period",
            "Month",
            "Year",
            "Custom"
          ]
        },
        "include_today": {
          "type": "boolean"
        },
        "current_start": {
          "type": "string"
        },
        "current_end": {
          "type": "string"
        },
        "previous_start": {
          "type": "string"
        },
        "previous_end": {
          "type": "string"
        },
        "custom_days": {
          "type": "number"
        },
        "custom_months": {
          "type": "number"
        }
      }
    },
    "DimensionSelection": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "data_view": {
          "type": "string"
        }
      },
      "required": [
        "value"
      ]
    },
    "MetricSelection": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "data_view": {
          "type": "string"
        }
      },
      "required": [
        "value"
      ]
    },
    "WidgetFilter": {
      "type": "object",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string"
            }
          ]
        },
        "field": {
          "type": "string"
        },
        "operator": {
          "type": "string",
          "description": "Canonical: equals, not_equals, contains, not_contains, starts_with, ends_with, greater_than, less_than, greater_than_or_equal, less_than_or_equal (vendor tokens also accepted)."
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "items": {}
            }
          ]
        },
        "logicalOperator": {
          "type": "string",
          "enum": [
            "and",
            "or"
          ]
        }
      }
    }
  }
}