{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowral-app/json-schema/flowral-app-notification-preferences-schema.json",
  "title": "NotificationPreferences",
  "description": "What one person is emailed about, resolved. When `flowId` is set, this is the account settings with that flow's override already applied.",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowral-app-openapi.json#/components/schemas/NotificationPreferences",
  "type": "object",
  "properties": {
    "memberId": {
      "type": "string"
    },
    "flowId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Null for the account-level answer."
    },
    "email": {
      "type": "boolean",
      "description": "The master switch. False means no notification email at all, whatever the per-event flags say."
    },
    "muted": {
      "type": "boolean",
      "description": "Set by a flow-level override to silence one flow."
    },
    "events": {
      "type": "object",
      "description": "Per-event switches.",
      "properties": {
        "assigned": {
          "type": "boolean",
          "description": "A task was assigned to them."
        },
        "unlocked": {
          "type": "boolean",
          "description": "A task of theirs stopped being blocked."
        },
        "digest": {
          "type": "boolean",
          "description": "The morning summary. Account level only."
        }
      }
    },
    "timezone": {
      "type": "string",
      "description": "IANA zone. The digest is sent in this person's morning."
    },
    "digestHour": {
      "type": "integer",
      "description": "0–23, local."
    }
  },
  "required": [
    "memberId",
    "email",
    "events"
  ]
}