{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/august-health/json-schema/august-health-com-august-api-integrations-models-incidents-v1-patch-incident-or-note-request-patch-incident-request-schema.json",
  "title": "com.august.api.integrations.models.incidents.v1.PatchIncidentOrNoteRequest.PatchIncidentRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/august-health-incidents-v1-api-openapi.yml#/components/schemas/com.august.api.integrations.models.incidents.v1.PatchIncidentOrNoteRequest.PatchIncidentRequest",
  "properties": {
    "body": {
      "type": "string"
    },
    "externalMetadata": {
      "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.ExternalMetadata"
    },
    "incident": {
      "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.PatchIncidentDetails"
    },
    "onAlert": {
      "anyOf": [
        {
          "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.PatchOnAlert"
        },
        {
          "type": "null"
        }
      ]
    },
    "recorder": {
      "oneOf": [
        {
          "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.Recorder.UserAccountRecorder"
        },
        {
          "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.Recorder.ExternalEntityStringRecorder"
        }
      ],
      "type": "object"
    },
    "type": {
      "enum": [
        "INCIDENT"
      ],
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "$defs": {
    "com.august.api.integrations.models.incidents.v1.ExternalMetadata": {
      "properties": {
        "url": {
          "format": "uri",
          "type": "string"
        }
      }
    },
    "com.august.api.integrations.models.incidents.v1.PatchIncidentDetails": {
      "properties": {
        "injuries": {
          "type": "string"
        },
        "location": {
          "$ref": "#/$defs/com.august.protos.incidents.IncidentLocation"
        },
        "occurrenceDate": {
          "format": "date",
          "type": "string"
        },
        "occurrenceTime": {
          "format": "time-local",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/com.august.protos.incidents.IncidentStatus"
        },
        "tags": {
          "items": {
            "$ref": "#/$defs/com.august.protos.incidents.IncidentType"
          },
          "type": "array"
        }
      }
    },
    "com.august.api.integrations.models.incidents.v1.PatchOnAlert": {
      "properties": {
        "alertFrequency": {
          "anyOf": [
            {
              "$ref": "#/$defs/com.august.protos.incidents.AlertFrequency"
            },
            {
              "type": "null"
            }
          ]
        },
        "alertFrequencyInMinutes": {
          "format": "int32",
          "type": [
            "integer",
            "null"
          ]
        },
        "endedAt": {
          "format": "date-time",
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "startedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": []
    },
    "com.august.api.integrations.models.incidents.v1.Recorder.ExternalEntityStringRecorder": {
      "properties": {
        "externalEntity": {
          "type": "string"
        }
      },
      "required": [
        "externalEntity"
      ]
    },
    "com.august.api.integrations.models.incidents.v1.Recorder.UserAccountRecorder": {
      "properties": {
        "userAccountId": {
          "type": "string"
        }
      },
      "required": [
        "userAccountId"
      ]
    },
    "com.august.protos.incidents.AlertFrequency": {
      "enum": [
        "ALERT_FREQUENCY_1X_PER_SHIFT",
        "ALERT_FREQUENCY_2X_PER_SHIFT",
        "ALERT_FREQUENCY_3X_PER_SHIFT",
        "ALERT_FREQUENCY_4X_PER_SHIFT",
        "ALERT_FREQUENCY_1X_PER_DAY",
        "ALERT_FREQUENCY_2X_PER_DAY"
      ],
      "type": "string"
    },
    "com.august.protos.incidents.IncidentLocation": {
      "enum": [
        "INCIDENT_LOCATION_OTHER",
        "INCIDENT_LOCATION_ROOM",
        "INCIDENT_LOCATION_BATHROOM",
        "INCIDENT_LOCATION_SHOWER_BATHTUB",
        "INCIDENT_LOCATION_COMMON_AREA",
        "INCIDENT_LOCATION_DINING_ROOM",
        "INCIDENT_LOCATION_ACTIVITY_ROOM",
        "INCIDENT_LOCATION_BEAUTY_SALON",
        "INCIDENT_LOCATION_LOBBY",
        "INCIDENT_LOCATION_HALLWAY"
      ],
      "type": "string"
    },
    "com.august.protos.incidents.IncidentStatus": {
      "enum": [
        "INCIDENT_STATUS_OPEN",
        "INCIDENT_STATUS_COMPLETED"
      ],
      "type": "string"
    },
    "com.august.protos.incidents.IncidentType": {
      "enum": [
        "INCIDENT_TYPE_OTHER",
        "INCIDENT_TYPE_FALL",
        "INCIDENT_TYPE_MED_ERROR",
        "INCIDENT_TYPE_ELOPEMENT",
        "INCIDENT_TYPE_HOSPITALIZATION",
        "INCIDENT_TYPE_SKIN",
        "INCIDENT_TYPE_MEDICAL_EMERGENCY",
        "INCIDENT_TYPE_INJURY",
        "INCIDENT_TYPE_ILLNESS",
        "INCIDENT_TYPE_ABUSE",
        "INCIDENT_TYPE_BEHAVIORAL",
        "INCIDENT_TYPE_COVID",
        "INCIDENT_TYPE_ON_FLOOR",
        "INCIDENT_TYPE_ER_VISIT"
      ],
      "type": "string"
    }
  }
}