{
  "$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-note-request-schema.json",
  "title": "com.august.api.integrations.models.incidents.v1.PatchIncidentOrNoteRequest.PatchNoteRequest",
  "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.PatchNoteRequest",
  "properties": {
    "body": {
      "type": "string"
    },
    "externalMetadata": {
      "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.ExternalMetadata"
    },
    "note": {
      "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.PatchNoteDetails"
    },
    "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": [
        "NOTE"
      ],
      "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.PatchNoteDetails": {
      "properties": {
        "serviceDate": {
          "format": "date",
          "type": "string"
        },
        "serviceTime": {
          "format": "time-local",
          "type": "string"
        },
        "tags": {
          "items": {
            "$ref": "#/$defs/com.august.protos.incidents.NoteType"
          },
          "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.NoteType": {
      "oneOf": [
        {
          "enum": [
            "NOTE_TYPE_OTHER",
            "NOTE_TYPE_PROGRESS",
            "NOTE_TYPE_OBSERVATION",
            "NOTE_TYPE_CLINICIAN_VISIT",
            "NOTE_TYPE_AGENCY_VISIT",
            "NOTE_TYPE_SHIFT_CHANGE",
            "NOTE_TYPE_CARE_CONFERENCE",
            "NOTE_TYPE_COVID",
            "NOTE_TYPE_HOSPITAL_DISCHARGE",
            "NOTE_TYPE_VITAL",
            "NOTE_TYPE_FAMILY_OUTREACH"
          ],
          "title": "values",
          "type": "string"
        },
        {
          "deprecated": true,
          "enum": [
            "NOTE_TYPE_ROOM_CHANGE",
            "NOTE_TYPE_ROOM_RATE_CHANGE"
          ],
          "title": "deprecated values",
          "type": "string"
        }
      ]
    }
  }
}