{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/conduyt-com/json-schema/conduyt-com-saved-report-create-schema.json",
  "title": "SavedReportCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/conduyt-com-reports-api-openapi.yml#/components/schemas/SavedReportCreate",
  "type": "object",
  "required": [
    "name",
    "entity"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "entity": {
      "type": "string",
      "enum": [
        "contacts",
        "deals",
        "activities",
        "tasks",
        "messages"
      ]
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "filters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
          },
          "operator": {
            "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
          },
          "value": {
            "type": "object",
            "properties": {
              "n": {
                "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
              },
              "unit": {
                "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
              },
              "value": {
                "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
              }
            },
            "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
          }
        }
      }
    },
    "groupBy": {
      "type": "string"
    },
    "sortBy": {
      "type": "string"
    },
    "sortDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ],
      "default": "desc"
    },
    "chartType": {
      "type": "string",
      "enum": [
        "bar",
        "line",
        "pie",
        "table",
        "funnel"
      ]
    },
    "isShared": {
      "type": "boolean",
      "default": false
    },
    "aggregate": {
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    },
    "groupBy2": {
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    },
    "isPrivate": {
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    },
    "measureField": {
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    },
    "pivot": {
      "type": "object",
      "properties": {
        "columns": {
          "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
        },
        "measures": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "aggregate": {
                "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
              },
              "field": {
                "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
              },
              "format": {
                "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
              }
            },
            "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
          },
          "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
        },
        "rows": {
          "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
        }
      },
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    },
    "population": {
      "type": "object",
      "properties": {
        "smartViewId": {
          "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
        }
      },
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    },
    "timeGrain": {
      "description": "Read by the handler from the JSON body (the route declares no schema for its type)."
    }
  }
}