{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/RetentionFilter",
  "title": "RetentionFilter",
  "additionalProperties": false,
  "properties": {
    "aggregationProperty": {
      "default": null,
      "description": "The property to aggregate when aggregationType is sum or avg",
      "title": "Aggregationproperty",
      "type": "string",
      "nullable": true
    },
    "aggregationPropertyType": {
      "default": "event",
      "description": "The type of property to aggregate on (event or person). Defaults to event.",
      "allOf": [
        {
          "$ref": "#/components/schemas/AggregationPropertyType"
        }
      ],
      "nullable": true
    },
    "aggregationType": {
      "default": "count",
      "description": "The aggregation type to use for retention",
      "allOf": [
        {
          "$ref": "#/components/schemas/AggregationType"
        }
      ],
      "nullable": true
    },
    "cumulative": {
      "default": null,
      "title": "Cumulative",
      "type": "boolean",
      "nullable": true
    },
    "customAggregationTarget": {
      "default": null,
      "description": "For data warehouse based retention insights when the aggregation target can't be mapped to persons or groups.",
      "title": "Customaggregationtarget",
      "type": "boolean",
      "nullable": true
    },
    "dashboardDisplay": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionDashboardDisplayType"
        }
      ],
      "nullable": true
    },
    "display": {
      "default": null,
      "description": "controls the display of the retention graph",
      "allOf": [
        {
          "$ref": "#/components/schemas/ChartDisplayType"
        }
      ],
      "nullable": true
    },
    "goalLines": {
      "default": null,
      "title": "Goallines",
      "items": {
        "$ref": "#/components/schemas/GoalLine"
      },
      "type": "array",
      "nullable": true
    },
    "meanRetentionCalculation": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/MeanRetentionCalculation"
        }
      ],
      "nullable": true
    },
    "minimumOccurrences": {
      "default": null,
      "title": "Minimumoccurrences",
      "type": "integer",
      "nullable": true
    },
    "period": {
      "default": "Day",
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionPeriod"
        }
      ],
      "nullable": true
    },
    "retentionCustomBrackets": {
      "default": null,
      "description": "Custom brackets for retention calculations",
      "title": "Retentioncustombrackets",
      "items": {
        "type": "number"
      },
      "type": "array",
      "nullable": true
    },
    "retentionReference": {
      "default": null,
      "description": "Whether retention is with regard to initial cohort size, or that of the previous period.",
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionReference"
        }
      ],
      "nullable": true
    },
    "retentionType": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionType"
        }
      ],
      "nullable": true
    },
    "returningEntity": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionEntity"
        }
      ],
      "nullable": true
    },
    "selectedInterval": {
      "default": null,
      "description": "The selected interval to display across all cohorts (null = show all intervals for each cohort)",
      "title": "Selectedinterval",
      "type": "integer",
      "nullable": true
    },
    "showTrendLines": {
      "default": null,
      "title": "Showtrendlines",
      "type": "boolean",
      "nullable": true
    },
    "targetEntity": {
      "default": null,
      "allOf": [
        {
          "$ref": "#/components/schemas/RetentionEntity"
        }
      ],
      "nullable": true
    },
    "timeWindowMode": {
      "default": null,
      "description": "The time window mode to use for retention calculations",
      "allOf": [
        {
          "$ref": "#/components/schemas/TimeWindowMode"
        }
      ],
      "nullable": true
    },
    "totalIntervals": {
      "default": 8,
      "title": "Totalintervals",
      "type": "integer",
      "nullable": true
    }
  },
  "type": "object"
}