{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coralogix/json-schema/coralogix-case-lifecycle-schema.json",
  "title": "Case lifecycle settings",
  "description": "Team-level configuration options for the lifecycle of case, such as suppression and snooze periods.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coralogix-case-settings-service-api-openapi.yml#/components/schemas/CaseLifecycle",
  "type": "object",
  "properties": {
    "alertSuppressionStrategy": {
      "allOf": [
        {
          "$ref": "#/$defs/AlertSuppressionStrategy"
        }
      ],
      "description": "Configuration for how cases process suppressed alerts."
    },
    "autoClose": {
      "allOf": [
        {
          "$ref": "#/$defs/AutoCloseConfig"
        }
      ],
      "description": "Configuration for automatically closing resolved cases after a certain period. If not defined, it will fallback to auto closure after 1 week."
    },
    "autoResolve": {
      "allOf": [
        {
          "$ref": "#/$defs/AutoResolveConfig"
        }
      ],
      "description": "Configuration for inactive cases resolution."
    },
    "kpi": {
      "allOf": [
        {
          "$ref": "#/$defs/CaseKPIs"
        }
      ],
      "description": "KPI thresholds for acknowledgement and resolution, grouped by case priority."
    },
    "resolutionSnoozePeriod": {
      "description": "Period after resolution during which new cases are snoozed.",
      "minLength": 0,
      "type": "string",
      "x-coralogix-presence": true
    },
    "suppressionPeriod": {
      "description": "Default period during which duplicate or related cases are suppressed.",
      "minLength": 0,
      "type": "string",
      "x-coralogix-presence": true
    }
  },
  "$defs": {
    "AlertSuppressionStrategy": {
      "enum": [
        "ALERT_SUPPRESSION_STRATEGY_UNSPECIFIED",
        "ALERT_SUPPRESSION_STRATEGY_IGNORE",
        "ALERT_SUPPRESSION_STRATEGY_CREATE_CASE"
      ],
      "type": "string",
      "description": "Alert suppression strategy."
    },
    "AutoCloseConfig": {
      "title": "Auto Close config",
      "required": [
        "postResolutionPeriod"
      ],
      "type": "object",
      "properties": {
        "postResolutionPeriod": {
          "description": "Period after which resolved cases are automatically closed.",
          "maxLength": 30,
          "minLength": 2,
          "pattern": "^[\\s\\S]*$",
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for automatically closing cases after a certain period past resolution."
    },
    "AutoResolveConfig": {
      "title": "Auto resolve config",
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable/disable automatic resolution"
        },
        "inactivePeriod": {
          "description": "Period of inactivity after which cases are automatically resolved.",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        }
      },
      "description": "Configuration for automatically resolving cases after a certain period of inactivity."
    },
    "CaseKPIs": {
      "title": "KPI settings",
      "type": "object",
      "properties": {
        "thresholds": {
          "minItems": 0,
          "type": "array",
          "items": {
            "$ref": "#/$defs/KPISettings"
          },
          "description": "List of KPI thresholds for different case priorities."
        }
      },
      "description": "Case lifecycle KPI thresholds grouped first by KPI type and then by case priority."
    },
    "CasePriority": {
      "enum": [
        "CASE_PRIORITY_UNSPECIFIED",
        "CASE_PRIORITY_P1",
        "CASE_PRIORITY_P2",
        "CASE_PRIORITY_P3",
        "CASE_PRIORITY_P4",
        "CASE_PRIORITY_P5"
      ],
      "type": "string",
      "description": "Case priority."
    },
    "KPISettings": {
      "title": "KPI threshold entry",
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable or disable this threshold entry."
        },
        "priority": {
          "allOf": [
            {
              "$ref": "#/$defs/CasePriority"
            }
          ],
          "description": "Case priority level for which this threshold applies."
        },
        "threshold": {
          "description": "Elapsed time after which the KPI is considered breached.",
          "minLength": 0,
          "type": "string",
          "x-coralogix-presence": true
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/KPIType"
            }
          ],
          "description": "Type of KPI this threshold applies to (acknowledgement or resolution)."
        }
      },
      "description": "Single KPI breach threshold for a specific case priority."
    },
    "KPIType": {
      "enum": [
        "KPI_TYPE_UNSPECIFIED",
        "KPI_TYPE_TIME_TO_ACKNOWLEDGE",
        "KPI_TYPE_TIME_TO_RESOLVE",
        "KPI_TYPE_TIME_TO_UPDATE"
      ],
      "type": "string",
      "description": "Kpi type."
    }
  }
}