{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vicem-ai/json-schema/vicem-ai-today-response-schema.json",
  "title": "TodayResponse",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vicem-ai-openapi.json#/components/schemas/TodayResponse",
  "type": "object",
  "properties": {
    "viewer": {
      "type": "string",
      "enum": [
        "owner",
        "helper"
      ]
    },
    "ownerName": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ]
    },
    "day": {
      "type": "string",
      "maxLength": 10
    },
    "timeZone": {
      "type": "string",
      "maxLength": 64
    },
    "status": {
      "type": "object",
      "properties": {
        "line": {
          "type": "string",
          "maxLength": 80
        },
        "tone": {
          "type": "string",
          "enum": [
            "ok",
            "away",
            "new"
          ]
        },
        "lastCallAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "away": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "until": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/IsoDate"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "label": {
                  "type": "string",
                  "maxLength": 80
                }
              },
              "required": [
                "until",
                "label"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "line",
        "tone",
        "lastCallAt",
        "away"
      ],
      "additionalProperties": false
    },
    "health": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "on",
            "setup",
            "broken",
            "limited",
            "pending"
          ]
        },
        "lead": {
          "type": "string",
          "maxLength": 80
        },
        "detail": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 120
            },
            {
              "type": "null"
            }
          ]
        },
        "lastAnsweredAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "action": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "maxLength": 40
                },
                "fix": {
                  "$ref": "#/$defs/ProblemFix"
                }
              },
              "required": [
                "label",
                "fix"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "state",
        "lead",
        "detail",
        "lastAnsweredAt",
        "action"
      ],
      "additionalProperties": false
    },
    "statusCard": {
      "anyOf": [
        {
          "$ref": "#/$defs/TodayCard"
        },
        {
          "type": "null"
        }
      ]
    },
    "setupCard": {
      "anyOf": [
        {
          "$ref": "#/$defs/TodayCard"
        },
        {
          "type": "null"
        }
      ]
    },
    "live": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LiveCall"
      }
    },
    "recap": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "from": {
              "$ref": "#/$defs/IsoDate"
            },
            "to": {
              "$ref": "#/$defs/IsoDate"
            },
            "calls": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "handled": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "bullets": {
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 160
              }
            },
            "more": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "needYou": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "reason": {
              "type": "string",
              "enum": [
                "return",
                "away",
                "overnight",
                "phone_back"
              ]
            },
            "noticeId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "from",
            "to",
            "calls",
            "handled",
            "bullets",
            "more",
            "needYou",
            "reason",
            "noticeId"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "hero": {
      "$ref": "#/$defs/DayFigures"
    },
    "jobsDone": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "weekTally": {
      "type": "object",
      "properties": {
        "calls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "jobs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "missed": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "calls",
        "jobs"
      ],
      "additionalProperties": false
    },
    "saved": {
      "type": "object",
      "properties": {
        "minutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "howWeCount": {
          "type": "string",
          "maxLength": 600
        }
      },
      "required": [
        "minutes",
        "howWeCount"
      ],
      "additionalProperties": false
    },
    "moneyMade": {
      "type": "object",
      "properties": {
        "jobs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "booked": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "quotes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "urgent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "wonMinor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "estimateMinor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "totalMinor": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "perJobMinor": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "scamsStopped": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "minutesSaved": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "span": {
          "type": "string",
          "enum": [
            "week",
            "so_far"
          ]
        },
        "howWeCount": {
          "type": "string",
          "maxLength": 600
        },
        "line": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 240
            },
            {
              "type": "null"
            }
          ]
        },
        "change": {
          "type": "string",
          "maxLength": 60
        }
      },
      "required": [
        "jobs",
        "booked",
        "quotes",
        "urgent",
        "wonMinor",
        "estimateMinor",
        "totalMinor",
        "currency",
        "perJobMinor",
        "scamsStopped",
        "minutesSaved",
        "span",
        "howWeCount",
        "line",
        "change"
      ],
      "additionalProperties": false
    },
    "askJobValue": {
      "type": "string",
      "maxLength": 80
    },
    "aiCallers": {
      "type": "object",
      "properties": {
        "line": {
          "type": "string",
          "maxLength": 240
        },
        "count": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "line",
        "count"
      ],
      "additionalProperties": false
    },
    "spamMonth": {
      "type": "object",
      "properties": {
        "line": {
          "type": "string",
          "maxLength": 240
        },
        "count": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "line",
        "count"
      ],
      "additionalProperties": false
    },
    "overnight": {
      "type": "boolean"
    },
    "tally": {
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "booked",
              "messages",
              "scamsStopped",
              "silentCalls",
              "callsForYou"
            ]
          },
          "count": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "robocalls": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "key",
          "count"
        ],
        "additionalProperties": false
      }
    },
    "needsYou": {
      "type": "object",
      "properties": {
        "items": {
          "maxItems": 600,
          "type": "array",
          "items": {
            "$ref": "#/$defs/NeedsYouItem"
          }
        },
        "more": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "openCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "label": {
          "type": "string",
          "maxLength": 4
        },
        "fromEarlierCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "earlierIsYesterday": {
          "type": "boolean"
        },
        "olderCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "items",
        "openCount",
        "label",
        "fromEarlierCount",
        "earlierIsYesterday",
        "olderCount"
      ],
      "additionalProperties": false
    },
    "comingUp": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 3,
            "maxLength": 100
          },
          "kind": {
            "type": "string",
            "enum": [
              "booking",
              "callback",
              "commitment",
              "notice"
            ]
          },
          "at": {
            "anyOf": [
              {
                "$ref": "#/$defs/IsoDate"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasTime": {
            "type": "boolean"
          },
          "text": {
            "type": "string",
            "maxLength": 200
          },
          "source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "interactionId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          },
          "commitmentId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          },
          "noticeId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "at",
          "hasTime",
          "text",
          "source",
          "interactionId",
          "commitmentId",
          "noticeId"
        ],
        "additionalProperties": false
      }
    },
    "handled": {
      "maxItems": 60,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 3,
            "maxLength": 100
          },
          "kind": {
            "type": "string",
            "enum": [
              "person",
              "scam",
              "stopped",
              "hang_up"
            ]
          },
          "day": {
            "type": "string",
            "enum": [
              "today",
              "yesterday",
              "earlier"
            ]
          },
          "at": {
            "$ref": "#/$defs/IsoDate"
          },
          "who": {
            "type": "string",
            "maxLength": 120
          },
          "verb": {
            "type": "string",
            "maxLength": 240
          },
          "outcomeKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "booked",
                  "moved",
                  "cancelled",
                  "reminded",
                  "message_taken",
                  "callback_asked",
                  "callback_promised",
                  "callback_due",
                  "callback_kept",
                  "callback_late",
                  "scam_stopped",
                  "spam_stopped",
                  "campaign_stopped",
                  "robocall_blocked",
                  "scam_not_ended",
                  "silent",
                  "put_through",
                  "rang_no_pickup",
                  "rang_no_pickup_hung_up",
                  "told_them",
                  "chip_callback",
                  "texted_back",
                  "emailed",
                  "relayed",
                  "photos",
                  "automated",
                  "receipt_confirmed",
                  "errand",
                  "hung_up_silent",
                  "hung_up_no_message",
                  "ended_abusive",
                  "line_dropped",
                  "answered"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "count": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "interactionId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          },
          "contactId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          },
          "number": {
            "anyOf": [
              {
                "$ref": "#/$defs/E164"
              },
              {
                "type": "null"
              }
            ]
          },
          "fromMobile": {
            "type": "boolean"
          },
          "scamReason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "money",
                  "code",
                  "authority",
                  "impersonation"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "line": {
            "type": "object",
            "properties": {
              "e164": {
                "$ref": "#/$defs/E164"
              },
              "label": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 60
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "e164",
              "label"
            ],
            "additionalProperties": false
          },
          "headline": {
            "type": "string",
            "maxLength": 120
          }
        },
        "required": [
          "id",
          "kind",
          "day",
          "at",
          "who",
          "verb",
          "outcomeKind",
          "count",
          "interactionId",
          "contactId",
          "number",
          "fromMobile"
        ],
        "additionalProperties": false
      }
    },
    "asks": {
      "maxItems": 60,
      "type": "array",
      "items": {
        "$ref": "#/$defs/AskOrCheck"
      }
    },
    "receipts": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Receipt"
      }
    },
    "cases": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^cas_[0-9a-z]+$"
          },
          "title": {
            "type": "string",
            "maxLength": 80
          },
          "status": {
            "type": "string",
            "enum": [
              "drafted",
              "open",
              "waiting",
              "needs_owner",
              "done",
              "given_up",
              "cancelled"
            ]
          },
          "placement": {
            "type": "string",
            "enum": [
              "live",
              "needs_you",
              "coming_up"
            ]
          },
          "nextActionKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "call",
                  "email",
                  "wait_reply",
                  "wait_callback",
                  "ask_owner"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "nextActionAt": {
            "anyOf": [
              {
                "$ref": "#/$defs/IsoDate"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterpartName": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "askId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "placement",
          "nextActionKind",
          "nextActionAt",
          "counterpartName"
        ],
        "additionalProperties": false
      }
    },
    "casesDone": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^cas_[0-9a-z]+$"
          },
          "title": {
            "type": "string",
            "maxLength": 80
          },
          "status": {
            "type": "string",
            "enum": [
              "done",
              "given_up"
            ]
          },
          "nextActionKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "call",
                  "email",
                  "wait_reply",
                  "wait_callback",
                  "ask_owner"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "nextActionAt": {
            "anyOf": [
              {
                "$ref": "#/$defs/IsoDate"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterpartName": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ]
          },
          "askId": {
            "anyOf": [
              {
                "$ref": "#/$defs/Id"
              },
              {
                "type": "null"
              }
            ]
          },
          "outcome": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "result": {
                    "type": "string",
                    "enum": [
                      "done",
                      "given_up",
                      "cancelled"
                    ]
                  },
                  "summary": {
                    "type": "string",
                    "maxLength": 600
                  },
                  "reference": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "amount": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "result",
                  "summary",
                  "reference",
                  "amount"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "closedAt": {
            "$ref": "#/$defs/IsoDate"
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "nextActionKind",
          "nextActionAt",
          "counterpartName",
          "askId",
          "outcome",
          "closedAt"
        ],
        "additionalProperties": false
      }
    },
    "forwarder": {
      "type": "boolean"
    },
    "forwardingProof": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "proven",
            "unproven",
            "failed"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "planOff": {
      "type": "boolean"
    },
    "showShare": {
      "type": "boolean"
    },
    "quietLine": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "never",
            "quiet"
          ]
        },
        "days": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        },
        "number": {
          "$ref": "#/$defs/E164"
        },
        "done": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "google",
              "listings",
              "website",
              "signature",
              "card",
              "social",
              "voicemail"
            ]
          }
        },
        "next": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "google",
                "listings",
                "website",
                "signature",
                "card",
                "social",
                "voicemail"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "rows": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "google",
              "listings",
              "website",
              "signature",
              "card",
              "social",
              "voicemail"
            ]
          }
        }
      },
      "required": [
        "state",
        "days",
        "number",
        "done",
        "next"
      ],
      "additionalProperties": false
    },
    "vicemNumber": {
      "anyOf": [
        {
          "$ref": "#/$defs/E164"
        },
        {
          "type": "null"
        }
      ]
    },
    "handle": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "canMakeCalls": {
      "type": "boolean"
    },
    "firstCallFree": {
      "type": "boolean"
    },
    "firstCallOffered": {
      "type": "boolean"
    },
    "siteFacts": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 999
        },
        "changes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999
        }
      },
      "required": [
        "host",
        "count",
        "changes"
      ],
      "additionalProperties": false
    },
    "coverMobileOffer": {
      "type": "boolean"
    },
    "coverMobileLater": {
      "type": "string",
      "maxLength": 120
    },
    "callsHome": {
      "type": "boolean"
    },
    "callCountries": {
      "maxItems": 250,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 2,
        "maxLength": 2
      }
    },
    "proofNote": {
      "type": "object",
      "properties": {
        "noticeId": {
          "$ref": "#/$defs/Id"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "lines": {
          "maxItems": 4,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 160
          }
        },
        "suggestion": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "maxLength": 24
                },
                "text": {
                  "type": "string",
                  "maxLength": 120
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "path": {
                  "type": "string",
                  "maxLength": 400
                }
              },
              "required": [
                "key",
                "text",
                "label",
                "path"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "hear": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "path": {
              "type": "string",
              "maxLength": 120
            }
          },
          "required": [
            "label",
            "path"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "title",
        "lines",
        "suggestion"
      ],
      "additionalProperties": false
    },
    "firstRun": {
      "type": "boolean"
    },
    "generatedAt": {
      "$ref": "#/$defs/IsoDate"
    }
  },
  "required": [
    "viewer",
    "ownerName",
    "day",
    "timeZone",
    "status",
    "statusCard",
    "setupCard",
    "live",
    "recap",
    "hero",
    "overnight",
    "tally",
    "needsYou",
    "comingUp",
    "handled",
    "forwarder",
    "showShare",
    "vicemNumber",
    "handle",
    "canMakeCalls",
    "generatedAt"
  ],
  "additionalProperties": false,
  "$defs": {
    "Ask": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "mode": {
          "type": "string",
          "enum": [
            "live",
            "async"
          ]
        },
        "interactionId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "actionClass": {
          "type": "string"
        },
        "title": {
          "type": "string",
          "maxLength": 40
        },
        "body": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "approve",
              "edit",
              "reject",
              "reply",
              "join_call",
              "ring_me",
              "quote"
            ]
          }
        },
        "consequenceIfIgnored": {
          "type": "string"
        },
        "deadline": {
          "$ref": "#/$defs/IsoDate"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "approved",
            "edited",
            "rejected",
            "expired",
            "cancelled"
          ]
        },
        "payloadHash": {
          "type": "string"
        },
        "rules": {
          "type": "object",
          "properties": {
            "alwaysDo": {
              "type": "boolean"
            },
            "alwaysAsk": {
              "type": "boolean"
            },
            "openBooking": {
              "type": "boolean"
            }
          },
          "required": [
            "alwaysDo",
            "alwaysAsk"
          ],
          "additionalProperties": false
        },
        "fields": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AskField"
          }
        },
        "basedOn": {
          "maxItems": 6,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AskBasedOn"
          }
        },
        "seal": {
          "type": "string",
          "maxLength": 8
        },
        "chips": {
          "maxItems": 6,
          "type": "array",
          "items": {
            "$ref": "#/$defs/AskChip"
          }
        },
        "screen": {
          "$ref": "#/$defs/AskScreen"
        },
        "editable": {
          "type": "object",
          "properties": {
            "when": {
              "anyOf": [
                {
                  "$ref": "#/$defs/IsoDate"
                },
                {
                  "type": "null"
                }
              ]
            },
            "durationMin": {
              "anyOf": [
                {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "when",
            "durationMin"
          ],
          "additionalProperties": false
        },
        "standing": {
          "type": "object",
          "properties": {
            "question": {
              "type": "string",
              "maxLength": 120
            }
          },
          "required": [
            "question"
          ],
          "additionalProperties": false
        },
        "offerRemember": {
          "type": "object",
          "properties": {
            "company": {
              "type": "string",
              "maxLength": 120
            }
          },
          "required": [
            "company"
          ],
          "additionalProperties": false
        },
        "reversibility": {
          "type": "string",
          "enum": [
            "irreversible"
          ]
        },
        "visibleTo": {
          "type": "object",
          "properties": {
            "name": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false
        },
        "bookOnYes": {
          "type": "boolean",
          "const": true
        },
        "quote": {
          "type": "object",
          "properties": {
            "job": {
              "type": "string",
              "maxLength": 80
            },
            "currency": {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            "suggestions": {
              "maxItems": 3,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "amountMinor": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 40
                  }
                },
                "required": [
                  "amountMinor",
                  "label"
                ],
                "additionalProperties": false
              }
            },
            "confirmAbove": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "keep": {
              "type": "boolean"
            }
          },
          "required": [
            "job",
            "currency",
            "suggestions",
            "confirmAbove",
            "keep"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "mode",
        "actionClass",
        "title",
        "body",
        "options",
        "consequenceIfIgnored",
        "deadline",
        "status",
        "payloadHash"
      ],
      "additionalProperties": false
    },
    "AskBasedOn": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 200
        },
        "source": {
          "type": "string",
          "enum": [
            "you",
            "record",
            "caller",
            "rule"
          ]
        },
        "flag": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "heard",
                "claimed"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "text",
        "source",
        "flag"
      ],
      "additionalProperties": false
    },
    "AskChip": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/ChipId"
        },
        "label": {
          "type": "string",
          "maxLength": 60
        }
      },
      "required": [
        "id",
        "label"
      ],
      "additionalProperties": false
    },
    "AskField": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "maxLength": 40
        },
        "value": {
          "type": "string",
          "maxLength": 200
        },
        "flag": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "heard",
                "claimed"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "label",
        "value",
        "flag"
      ],
      "additionalProperties": false
    },
    "AskOrCheck": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "ask"
            },
            "ask": {
              "$ref": "#/$defs/Ask"
            }
          },
          "required": [
            "kind",
            "ask"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "teach_back"
            },
            "teachBack": {
              "$ref": "#/$defs/TeachBack"
            }
          },
          "required": [
            "kind",
            "teachBack"
          ],
          "additionalProperties": false
        }
      ]
    },
    "AskScreen": {
      "type": "object",
      "properties": {
        "textBack": {
          "type": "object",
          "properties": {
            "to": {
              "type": "string",
              "pattern": "^\\+[1-9]\\d{6,14}$"
            },
            "body": {
              "type": "string",
              "minLength": 1,
              "maxLength": 600
            }
          },
          "required": [
            "to",
            "body"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "CallbackSource": {
      "type": "string",
      "enum": [
        "stated",
        "caller_id",
        "heard_in_message",
        "none"
      ]
    },
    "Channel": {
      "type": "string",
      "enum": [
        "call",
        "email",
        "sms",
        "link",
        "owner",
        "web"
      ]
    },
    "ChipId": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{1,31}$"
    },
    "DayFigures": {
      "type": "object",
      "properties": {
        "calls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "handled": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "needsYou": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "booked": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "messages": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "scamsStopped": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "silentCalls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "robocalls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "callsForYou": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "newPeople": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "minutesSaved": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "calls",
        "handled",
        "needsYou",
        "booked",
        "messages",
        "scamsStopped",
        "silentCalls",
        "callsForYou",
        "newPeople",
        "minutesSaved"
      ],
      "additionalProperties": false
    },
    "E164": {
      "type": "string",
      "pattern": "^\\+[1-9]\\d{6,14}$"
    },
    "Id": {
      "type": "string",
      "minLength": 3,
      "maxLength": 64
    },
    "IsoDate": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "ItemState": {
      "type": "object",
      "properties": {
        "readAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "snoozedUntil": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "doneAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "readAt",
        "snoozedUntil",
        "doneAt"
      ],
      "additionalProperties": false
    },
    "JobBlock": {
      "type": "object",
      "properties": {
        "leadId": {
          "type": "string"
        },
        "title": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        },
        "what": {
          "type": [
            "string",
            "null"
          ]
        },
        "where": {
          "type": [
            "string",
            "null"
          ]
        },
        "when": {
          "type": [
            "string",
            "null"
          ]
        },
        "whenAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "whenHasTime": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "whenPart": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "morning",
                "afternoon",
                "evening"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "budget": {
          "type": [
            "string",
            "null"
          ]
        },
        "urgency": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "emergency",
                "today",
                "this_week",
                "no_rush"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "quoted": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 40
            },
            {
              "type": "null"
            }
          ]
        },
        "askedPrice": {
          "type": "boolean"
        },
        "status": {
          "type": "string",
          "enum": [
            "new",
            "contacted",
            "booked",
            "won",
            "lost"
          ]
        },
        "bookedAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "promise": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 300
                },
                "dueAt": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/IsoDate"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "hasTime": {
                  "type": "boolean"
                },
                "overdue": {
                  "type": "boolean"
                }
              },
              "required": [
                "text",
                "dueAt",
                "hasTime",
                "overdue"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "whereCheck": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "verified": {
                  "type": "boolean"
                },
                "pin": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "lat": {
                          "type": "number"
                        },
                        "lng": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "lat",
                        "lng"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "outside": {
                  "type": "boolean"
                }
              },
              "required": [
                "verified",
                "pin",
                "outside"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "original": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 12
                },
                "what": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "where": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "when": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "budget": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "lang",
                "what",
                "where",
                "when",
                "budget"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "sendText": {
          "$ref": "#/$defs/SendText"
        },
        "bookIt": {
          "anyOf": [
            {
              "$ref": "#/$defs/JobBookIt"
            },
            {
              "type": "null"
            }
          ]
        },
        "followUp": {
          "anyOf": [
            {
              "$ref": "#/$defs/JobFollowUp"
            },
            {
              "type": "null"
            }
          ]
        },
        "photos": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "stale": {
          "type": "boolean"
        }
      },
      "required": [
        "leadId",
        "what",
        "where",
        "when",
        "budget",
        "urgency",
        "status",
        "bookedAt"
      ],
      "additionalProperties": false
    },
    "JobBookIt": {
      "type": "object",
      "properties": {
        "askId": {
          "$ref": "#/$defs/Id"
        },
        "payloadHash": {
          "type": "string"
        },
        "startsAt": {
          "$ref": "#/$defs/IsoDate"
        },
        "hasTime": {
          "type": "boolean"
        },
        "deadline": {
          "$ref": "#/$defs/IsoDate"
        }
      },
      "required": [
        "askId",
        "payloadHash",
        "startsAt",
        "hasTime",
        "deadline"
      ],
      "additionalProperties": false
    },
    "JobFollowUp": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "still_waiting",
            "did_you_get_it"
          ]
        },
        "since": {
          "$ref": "#/$defs/IsoDate"
        }
      },
      "required": [
        "kind",
        "since"
      ],
      "additionalProperties": false
    },
    "LiveCall": {
      "type": "object",
      "properties": {
        "interactionId": {
          "$ref": "#/$defs/Id"
        },
        "caller": {
          "type": "string"
        },
        "identityBadge": {
          "type": "string",
          "enum": [
            "verified_contact",
            "likely",
            "unknown",
            "suspicious"
          ]
        },
        "statusLine": {
          "type": "string"
        },
        "startedAt": {
          "$ref": "#/$defs/IsoDate"
        },
        "holding": {
          "type": "boolean"
        },
        "askId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "contactId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "interactionId",
        "caller",
        "identityBadge",
        "statusLine",
        "startedAt",
        "holding",
        "askId"
      ],
      "additionalProperties": false
    },
    "MessageCallback": {
      "type": "object",
      "properties": {
        "e164": {
          "anyOf": [
            {
              "$ref": "#/$defs/E164"
            },
            {
              "type": "null"
            }
          ]
        },
        "source": {
          "$ref": "#/$defs/CallbackSource"
        },
        "verified": {
          "type": "boolean"
        }
      },
      "required": [
        "e164",
        "source",
        "verified"
      ],
      "additionalProperties": false
    },
    "MessageFacts": {
      "type": "object",
      "properties": {
        "callback": {
          "anyOf": [
            {
              "$ref": "#/$defs/MessageCallback"
            },
            {
              "type": "null"
            }
          ]
        },
        "callerName": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        },
        "callerCompany": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        },
        "bestTimeToReach": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "anyOf": [
            {
              "$ref": "#/$defs/MessageReason"
            },
            {
              "type": "null"
            }
          ]
        },
        "email": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string",
                  "maxLength": 254
                },
                "verified": {
                  "type": "boolean"
                }
              },
              "required": [
                "value",
                "verified"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "replyRequested": {
          "type": "boolean"
        }
      },
      "required": [
        "callback",
        "callerName",
        "callerCompany",
        "bestTimeToReach",
        "reason",
        "email",
        "replyRequested"
      ],
      "additionalProperties": false
    },
    "MessageReason": {
      "type": "string",
      "enum": [
        "personal",
        "work",
        "appointment",
        "delivery",
        "sales",
        "other"
      ]
    },
    "NeedsYouAction": {
      "type": "string",
      "enum": [
        "yes",
        "no",
        "pick_up",
        "call_them",
        "call_back",
        "reply",
        "send",
        "edit",
        "dont_reply",
        "reveal",
        "copy",
        "change",
        "open",
        "check_with_contact"
      ]
    },
    "NeedsYouClaim": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 300
        },
        "source": {
          "type": "string",
          "enum": [
            "someone_said",
            "vicem_guessed"
          ]
        }
      },
      "required": [
        "text",
        "source"
      ],
      "additionalProperties": false
    },
    "NeedsYouItem": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "live_question"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "askId": {
              "$ref": "#/$defs/Id"
            },
            "payloadHash": {
              "type": "string"
            },
            "deadline": {
              "$ref": "#/$defs/IsoDate"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "askId",
            "payloadHash",
            "deadline"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "impostor"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "trigger": {
              "type": "string",
              "enum": [
                "family_claim",
                "new_number",
                "bank_claim"
              ]
            },
            "result": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "given",
                    "wrong",
                    "refused",
                    "not_set",
                    "not_asked"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "check": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "contactId": {
                      "$ref": "#/$defs/Id"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 60
                    }
                  },
                  "required": [
                    "contactId",
                    "name"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "pickUp": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "trigger",
            "result",
            "check",
            "pickUp"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "new_lead"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "entryId": {
              "$ref": "#/$defs/Id"
            },
            "callback": {
              "anyOf": [
                {
                  "$ref": "#/$defs/E164"
                },
                {
                  "type": "null"
                }
              ]
            },
            "reason": {
              "type": "string",
              "enum": [
                "appointment",
                "work"
              ]
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "job": {
              "$ref": "#/$defs/JobBlock"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "entryId",
            "callback",
            "reason"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "still_waiting"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "askId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "followUpId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "askId",
            "followUpId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "question"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "askId": {
              "$ref": "#/$defs/Id"
            },
            "payloadHash": {
              "type": "string"
            },
            "deadline": {
              "$ref": "#/$defs/IsoDate"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "askId",
            "payloadHash",
            "deadline"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "call_back"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "entryId": {
              "$ref": "#/$defs/Id"
            },
            "callback": {
              "anyOf": [
                {
                  "$ref": "#/$defs/E164"
                },
                {
                  "type": "null"
                }
              ]
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "commitmentId": {
              "$ref": "#/$defs/Id"
            },
            "job": {
              "$ref": "#/$defs/JobBlock"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "entryId",
            "callback"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "reminder"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "commitmentId": {
              "$ref": "#/$defs/Id"
            },
            "due": {
              "type": "object",
              "properties": {
                "at": {
                  "$ref": "#/$defs/IsoDate"
                },
                "hasTime": {
                  "type": "boolean"
                }
              },
              "required": [
                "at",
                "hasTime"
              ],
              "additionalProperties": false
            },
            "saidAt": {
              "$ref": "#/$defs/IsoDate"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "commitmentId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "zone_ask"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "zone": {
              "type": "string",
              "maxLength": 64
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "zone"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "expect_call"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "rule": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "expecting"
                },
                "who": {
                  "type": "string",
                  "minLength": 2,
                  "maxLength": 60
                },
                "number": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/E164"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "contactId": {
                  "anyOf": [
                    {
                      "$ref": "#/$defs/Id"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "until": {
                  "$ref": "#/$defs/IsoDate"
                }
              },
              "required": [
                "kind",
                "who",
                "number",
                "contactId",
                "until"
              ],
              "additionalProperties": false
            },
            "hash": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "rule",
            "hash"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "reply_ready"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "draftId": {
              "$ref": "#/$defs/Id"
            },
            "payloadHash": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "draftId",
            "payloadHash"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "unanswered_text"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "threadId": {
              "$ref": "#/$defs/Id"
            },
            "entryId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "threadId",
            "entryId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "couldnt_reach"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "followUpId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "callback": {
              "anyOf": [
                {
                  "$ref": "#/$defs/E164"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "followUpId",
            "callback"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "missed_call"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "callback": {
              "anyOf": [
                {
                  "$ref": "#/$defs/E164"
                },
                {
                  "type": "null"
                }
              ]
            },
            "possibleJob": {
              "type": "boolean"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "callback"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "automated_notice"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "nudge"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "link": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NoticeLink"
                },
                {
                  "type": "null"
                }
              ]
            },
            "path": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "link",
            "path"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "trial_ending"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "fix"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "noticeId": {
              "$ref": "#/$defs/Id"
            },
            "path": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "noticeId",
            "path"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "code"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "codeId": {
              "$ref": "#/$defs/Id"
            },
            "sender": {
              "type": "string",
              "maxLength": 80
            },
            "until": {
              "$ref": "#/$defs/IsoDate"
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "codeId",
            "sender",
            "until"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "check"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "teachBackId": {
              "$ref": "#/$defs/Id"
            },
            "source": {
              "type": "string",
              "enum": [
                "someone_said",
                "vicem_guessed"
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "teachBackId",
            "source"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "decided"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "followUpId": {
              "$ref": "#/$defs/Id"
            },
            "askId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "followUpId",
            "askId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "case"
            },
            "id": {
              "type": "string",
              "minLength": 3,
              "maxLength": 100
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            },
            "title": {
              "type": "string",
              "maxLength": 240
            },
            "lang": {
              "type": "string",
              "minLength": 2,
              "maxLength": 10
            },
            "detail": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "original": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 400
                },
                "lang": {
                  "type": "string",
                  "maxLength": 12
                }
              },
              "required": [
                "text",
                "lang"
              ],
              "additionalProperties": false
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 400
                },
                {
                  "type": "null"
                }
              ]
            },
            "person": {
              "anyOf": [
                {
                  "$ref": "#/$defs/NeedsYouPerson"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interactionId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ledgerEntryIds": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              }
            },
            "primary": {
              "$ref": "#/$defs/NeedsYouAction"
            },
            "actions": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "$ref": "#/$defs/NeedsYouAction"
              }
            },
            "claim": {
              "$ref": "#/$defs/NeedsYouClaim"
            },
            "time": {
              "$ref": "#/$defs/IsoDate"
            },
            "day": {
              "type": "string",
              "maxLength": 10
            },
            "folded": {
              "type": "boolean"
            },
            "outcome": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "booked",
                    "moved",
                    "cancelled",
                    "reminded",
                    "message_taken",
                    "callback_asked",
                    "callback_promised",
                    "callback_due",
                    "callback_kept",
                    "callback_late",
                    "scam_stopped",
                    "spam_stopped",
                    "campaign_stopped",
                    "robocall_blocked",
                    "scam_not_ended",
                    "silent",
                    "put_through",
                    "rang_no_pickup",
                    "rang_no_pickup_hung_up",
                    "told_them",
                    "chip_callback",
                    "texted_back",
                    "emailed",
                    "relayed",
                    "photos",
                    "automated",
                    "receipt_confirmed",
                    "errand",
                    "hung_up_silent",
                    "hung_up_no_message",
                    "ended_abusive",
                    "line_dropped",
                    "answered"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 240
                }
              },
              "required": [
                "kind",
                "text"
              ],
              "additionalProperties": false
            },
            "sounded": {
              "type": "string",
              "enum": [
                "callback",
                "lead",
                "urgent"
              ]
            },
            "urgent": {
              "type": "boolean"
            },
            "earlier": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500
                },
                "entryIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                },
                "noticeIds": {
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/Id"
                  }
                }
              },
              "required": [
                "count",
                "entryIds",
                "noticeIds"
              ],
              "additionalProperties": false
            },
            "line": {
              "type": "object",
              "properties": {
                "e164": {
                  "$ref": "#/$defs/E164"
                },
                "label": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 60
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "e164",
                "label"
              ],
              "additionalProperties": false
            },
            "reached": {
              "$ref": "#/$defs/NeedsYouReached"
            },
            "caseId": {
              "$ref": "#/$defs/Id"
            },
            "status": {
              "type": "string",
              "enum": [
                "drafted",
                "needs_owner"
              ]
            },
            "askId": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Id"
                },
                {
                  "type": "null"
                }
              ]
            },
            "payloadHash": {
              "type": [
                "string",
                "null"
              ]
            },
            "deadline": {
              "anyOf": [
                {
                  "$ref": "#/$defs/IsoDate"
                },
                {
                  "type": "null"
                }
              ]
            },
            "nextActionKind": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "call",
                    "email",
                    "wait_reply",
                    "wait_callback",
                    "ask_owner"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "nextActionAt": {
              "anyOf": [
                {
                  "$ref": "#/$defs/IsoDate"
                },
                {
                  "type": "null"
                }
              ]
            },
            "counterpartName": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 80
                },
                {
                  "type": "null"
                }
              ]
            },
            "parkedReason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 40
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "type",
            "id",
            "at",
            "title",
            "detail",
            "person",
            "interactionId",
            "ledgerEntryIds",
            "primary",
            "actions",
            "caseId",
            "status",
            "askId",
            "payloadHash",
            "deadline",
            "nextActionKind",
            "nextActionAt",
            "counterpartName",
            "parkedReason"
          ],
          "additionalProperties": false
        }
      ]
    },
    "NeedsYouPerson": {
      "type": "object",
      "properties": {
        "id": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string",
          "maxLength": 80
        }
      },
      "required": [
        "id",
        "name"
      ],
      "additionalProperties": false
    },
    "NeedsYouReached": {
      "type": "object",
      "properties": {
        "via": {
          "type": "string",
          "enum": [
            "call",
            "text"
          ]
        },
        "at": {
          "$ref": "#/$defs/IsoDate"
        },
        "secs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 86400
        }
      },
      "required": [
        "via",
        "at"
      ],
      "additionalProperties": false
    },
    "NoticeLink": {
      "type": "object",
      "properties": {
        "screen": {
          "type": "string",
          "const": "settings"
        },
        "section": {
          "type": "string",
          "enum": [
            "availability",
            "billing",
            "calendars"
          ]
        }
      },
      "required": [
        "screen",
        "section"
      ],
      "additionalProperties": false
    },
    "ProblemFix": {
      "type": "object",
      "properties": {
        "screen": {
          "type": "string",
          "const": "settings"
        },
        "section": {
          "type": "string",
          "enum": [
            "forwarding",
            "alerts",
            "billing",
            "status"
          ]
        }
      },
      "required": [
        "screen",
        "section"
      ],
      "additionalProperties": false
    },
    "Receipt": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "ledgerEntryId": {
          "$ref": "#/$defs/Id"
        },
        "at": {
          "$ref": "#/$defs/IsoDate"
        },
        "who": {
          "type": "string"
        },
        "whoNote": {
          "type": "string",
          "maxLength": 120
        },
        "what": {
          "type": "string"
        },
        "outcome": {
          "type": "string"
        },
        "mandateUsed": {
          "type": "string",
          "enum": [
            "observe",
            "handle",
            "act",
            "policy"
          ]
        },
        "undoUntil": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "interactionId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "contactId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "channel": {
          "$ref": "#/$defs/Channel"
        },
        "risk": {
          "anyOf": [
            {
              "$ref": "#/$defs/RiskLabel"
            },
            {
              "type": "null"
            }
          ]
        },
        "message": {
          "$ref": "#/$defs/MessageFacts"
        },
        "basis": {
          "$ref": "#/$defs/ReceiptBasis"
        },
        "askFirst": {
          "type": "boolean"
        },
        "state": {
          "$ref": "#/$defs/ItemState"
        },
        "snippet": {
          "type": "string",
          "maxLength": 400
        },
        "matchedIn": {
          "type": "string",
          "enum": [
            "transcript",
            "summary",
            "fact"
          ]
        },
        "matchedSeq": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "forwardReason": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "busy",
                "no_answer",
                "unreachable",
                "unconditional",
                "other"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "ledgerEntryId",
        "at",
        "who",
        "what",
        "outcome",
        "mandateUsed",
        "undoUntil",
        "interactionId"
      ],
      "additionalProperties": false
    },
    "ReceiptBasis": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "rule",
            "graduated",
            "approved"
          ]
        },
        "text": {
          "type": "string",
          "maxLength": 200
        },
        "ledgerEntryId": {
          "$ref": "#/$defs/Id"
        },
        "at": {
          "$ref": "#/$defs/IsoDate"
        },
        "sealShort": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 8
            },
            {
              "type": "null"
            }
          ]
        },
        "firstFire": {
          "type": "boolean"
        }
      },
      "required": [
        "kind",
        "text",
        "ledgerEntryId",
        "at",
        "sealShort"
      ],
      "additionalProperties": false
    },
    "RiskLabel": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "verify",
            "high"
          ]
        },
        "text": {
          "type": "string",
          "maxLength": 200
        },
        "pattern": {
          "$ref": "#/$defs/ScamPattern"
        }
      },
      "required": [
        "level",
        "text"
      ],
      "additionalProperties": false
    },
    "ScamPattern": {
      "type": "string",
      "enum": [
        "grandchild",
        "bank",
        "government",
        "tech_support",
        "prize",
        "delivery",
        "generic",
        "job"
      ]
    },
    "SendText": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "booked",
            "captured"
          ]
        },
        "body": {
          "type": "string",
          "maxLength": 600
        },
        "lang": {
          "type": "string",
          "minLength": 2,
          "maxLength": 12
        },
        "via": {
          "type": "string",
          "enum": [
            "vicem",
            "phone"
          ]
        },
        "bookingId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "sentAt": {
          "anyOf": [
            {
              "$ref": "#/$defs/IsoDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "nothingInWriting": {
          "type": "boolean"
        },
        "called": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "calling",
                "human",
                "machine"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "kind",
        "body",
        "lang",
        "via",
        "bookingId",
        "sentAt",
        "nothingInWriting"
      ],
      "additionalProperties": false
    },
    "TeachBack": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/Id"
        },
        "text": {
          "type": "string"
        },
        "factId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "confirm",
              "fix",
              "forget"
            ]
          }
        },
        "kind": {
          "type": "string",
          "enum": [
            "learned",
            "graduation",
            "same_person"
          ]
        },
        "title": {
          "type": "string",
          "maxLength": 80
        }
      },
      "required": [
        "id",
        "text",
        "factId",
        "options"
      ],
      "additionalProperties": false
    },
    "TodayCard": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/TodayCardKind"
        },
        "text": {
          "type": "string",
          "maxLength": 240
        },
        "line": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 160
            },
            {
              "type": "null"
            }
          ]
        },
        "action": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 60
            },
            {
              "type": "null"
            }
          ]
        },
        "fix": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "screen": {
                  "type": "string",
                  "maxLength": 40
                },
                "section": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 40
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "screen",
                "section"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "stopsCalls": {
          "type": "boolean"
        },
        "noticeId": {
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ]
        },
        "path": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 120
            },
            {
              "type": "null"
            }
          ]
        },
        "forget": {
          "anyOf": [
            {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "const": "contact"
                    },
                    "contactId": {
                      "$ref": "#/$defs/Id"
                    }
                  },
                  "required": [
                    "source",
                    "contactId"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string",
                      "const": "interaction"
                    },
                    "interactionId": {
                      "$ref": "#/$defs/Id"
                    }
                  },
                  "required": [
                    "source",
                    "interactionId"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "share": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 600
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "jobValue": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "amount": {
                  "anyOf": [
                    {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1000000
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "type": "string",
                  "pattern": "^[A-Z]{3}$"
                }
              },
              "required": [
                "amount",
                "currency"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "textBack": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "to": {
                  "type": "string",
                  "pattern": "^\\+[1-9]\\d{6,14}$"
                },
                "body": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 600
                },
                "noticeId": {
                  "$ref": "#/$defs/Id"
                }
              },
              "required": [
                "to",
                "body"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "release": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "numberId": {
                  "$ref": "#/$defs/Id"
                },
                "e164": {
                  "type": "string",
                  "pattern": "^\\+[1-9]\\d{6,14}$"
                },
                "keep": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "done": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "doneKept": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "undo": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "undone": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                }
              },
              "required": [
                "numberId",
                "e164",
                "keep",
                "done",
                "doneKept",
                "undo",
                "undone"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "kind",
        "text",
        "action",
        "fix",
        "stopsCalls"
      ],
      "additionalProperties": false
    },
    "TodayCardKind": {
      "type": "string",
      "enum": [
        "comp_cap",
        "plan_ended",
        "message_only",
        "payment_failed",
        "forwarding_failing",
        "our_side",
        "kyc",
        "connection_paused",
        "push_off",
        "minutes_80",
        "trial_ending",
        "fix",
        "not_tested",
        "nudge",
        "share",
        "add_hours",
        "connect_calendar",
        "bring_ai",
        "answer_gap",
        "interview",
        "decline_tip",
        "local_number",
        "local_number_instant",
        "local_number_live",
        "move_number",
        "job_value",
        "prices"
      ]
    }
  }
}