{
  "$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-create-incident-or-note-request-create-note-request-schema.json",
  "title": "com.august.api.integrations.models.incidents.v1.CreateIncidentOrNoteRequest.CreateNoteRequest",
  "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.CreateIncidentOrNoteRequest.CreateNoteRequest",
  "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.CreateNoteDetails"
    },
    "onAlert": {
      "$ref": "#/$defs/com.august.api.integrations.models.incidents.v1.CreateOnAlert"
    },
    "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",
    "body",
    "note"
  ],
  "$defs": {
    "com.august.api.integrations.models.incidents.v1.CreateNoteDetails": {
      "properties": {
        "serviceDate": {
          "format": "date",
          "type": "string"
        },
        "serviceTime": {
          "format": "time-local",
          "type": "string"
        },
        "tags": {
          "items": {
            "$ref": "#/$defs/com.august.protos.incidents.NoteType"
          },
          "type": "array"
        }
      },
      "required": [
        "serviceDate",
        "tags"
      ]
    },
    "com.august.api.integrations.models.incidents.v1.CreateOnAlert": {
      "properties": {
        "alertFrequency": {
          "$ref": "#/$defs/com.august.protos.incidents.AlertFrequency",
          "description": "The shift-based alerting frequency. Mutually exclusive with alertFrequencyInMinutes."
        },
        "alertFrequencyInMinutes": {
          "description": "The legacy minutes-based alerting frequency. When both this and alertFrequency are unspecified, it should be interpreted as \"as needed\". Mutually exclusive with alertFrequency.",
          "format": "int32",
          "type": "integer"
        },
        "endedAt": {
          "description": "Indicates when this alert ended.",
          "format": "date-time",
          "type": "string"
        },
        "note": {
          "description": "Notes or instructions for current alert.",
          "type": "string"
        },
        "startedAt": {
          "description": "Indicates when this alert started. Must not be in the future — alerts cannot be scheduled ahead of time.",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "note",
        "startedAt",
        "endedAt"
      ]
    },
    "com.august.api.integrations.models.incidents.v1.ExternalMetadata": {
      "properties": {
        "url": {
          "format": "uri",
          "type": "string"
        }
      }
    },
    "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"
        }
      ]
    }
  }
}