{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vicem-ai/json-schema/vicem-ai-value-report-response-schema.json",
  "title": "ValueReportResponse",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vicem-ai-openapi.json#/components/schemas/ValueReportResponse",
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "enum": [
        "week",
        "month"
      ]
    },
    "title": {
      "type": "string",
      "maxLength": 80
    },
    "from": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "to": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "dates": {
      "type": "string",
      "maxLength": 80
    },
    "figures": {
      "minItems": 6,
      "maxItems": 6,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "calls",
              "messages",
              "bookings",
              "scams",
              "minutes",
              "people"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "text": {
            "type": "string",
            "maxLength": 160
          },
          "href": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "key",
          "count",
          "text",
          "href"
        ],
        "additionalProperties": false
      }
    },
    "lead": {
      "type": "string",
      "maxLength": 400
    },
    "howWeCount": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "maxLength": 80
        },
        "text": {
          "type": "string",
          "maxLength": 600
        }
      },
      "required": [
        "title",
        "text"
      ],
      "additionalProperties": false
    },
    "moment": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "maxLength": 240
            },
            "href": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 200
                },
                {
                  "type": "null"
                }
              ]
            },
            "title": {
              "type": "string",
              "maxLength": 80
            }
          },
          "required": [
            "text",
            "href",
            "title"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "quiet": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "maxLength": 160
            },
            "tip": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "maxLength": 240
                },
                "href": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "text",
                "href"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "text",
            "tip"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "plan": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "saves": {
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "after_hours",
              "phone_off",
              "junk_silent",
              "real_unknowns"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "text": {
            "type": "string",
            "maxLength": 400
          },
          "href": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "key",
          "count",
          "text",
          "href"
        ],
        "additionalProperties": false
      }
    },
    "strip": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "maxLength": 40
        },
        "items": {
          "maxItems": 2,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "enum": [
                  "calls",
                  "messages",
                  "bookings",
                  "scams",
                  "minutes",
                  "people"
                ]
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "text": {
                "type": "string",
                "maxLength": 160
              },
              "href": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "key",
              "count",
              "text",
              "href"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "label",
        "items"
      ],
      "additionalProperties": false
    },
    "errands": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "total": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "done": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "refused": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "text": {
              "type": "string",
              "maxLength": 200
            }
          },
          "required": [
            "total",
            "done",
            "refused",
            "text"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "jobHunt": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "recruiters": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "screensBooked": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "scamsStopped": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "lines": {
              "maxItems": 4,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 200
              }
            }
          },
          "required": [
            "title",
            "recruiters",
            "screensBooked",
            "scamsStopped",
            "lines"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "visits": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "confirmed": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "reviewsAsked": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "lines": {
              "maxItems": 2,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 200
              }
            }
          },
          "required": [
            "title",
            "confirmed",
            "reviewsAsked",
            "lines"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "locations": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "lines": {
              "maxItems": 5,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 200
              }
            }
          },
          "required": [
            "title",
            "lines"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "learned": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "maxLength": 120
            },
            "factId": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 64
                },
                {
                  "type": "null"
                }
              ]
            },
            "at": {
              "$ref": "#/$defs/IsoDate"
            }
          },
          "required": [
            "text",
            "factId",
            "at"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "tiles": {
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "calls",
              "helped",
              "stopped",
              "bookings",
              "messages",
              "minutes"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "value": {
            "type": "string",
            "maxLength": 24
          },
          "label": {
            "type": "string",
            "maxLength": 80
          },
          "change": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "changeText": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ]
          },
          "href": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "key",
          "count",
          "value",
          "label",
          "change",
          "changeText",
          "href"
        ],
        "additionalProperties": false
      }
    },
    "tilesNote": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ]
    },
    "improve": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "enum": [
                "callback",
                "forwarding",
                "screened",
                "question"
              ]
            },
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "text": {
              "type": "string",
              "maxLength": 240
            },
            "action": {
              "type": "string",
              "maxLength": 40
            },
            "href": {
              "type": "string",
              "maxLength": 200
            }
          },
          "required": [
            "key",
            "title",
            "text",
            "action",
            "href"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "bookingValue": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "maxLength": 200
            },
            "amount": {
              "type": "number",
              "minimum": 0
            },
            "currency": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "counted": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "total": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "text",
            "amount",
            "currency",
            "counted",
            "total"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "scorecard": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "rows": {
              "minItems": 1,
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "enum": [
                      "answer",
                      "resolved",
                      "passed",
                      "complete",
                      "spam_free",
                      "booked"
                    ]
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "href": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "key",
                  "label",
                  "value",
                  "href"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "title",
            "rows"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "share": {
      "type": "object",
      "properties": {
        "calls": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "scams": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "calls",
        "scams"
      ],
      "additionalProperties": false
    },
    "kindLine": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "jobs": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "newJobs": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "booked": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "won": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "amounts": {
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "minor": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "currency": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 3
                  }
                },
                "required": [
                  "minor",
                  "currency"
                ],
                "additionalProperties": false
              }
            },
            "text": {
              "type": "string",
              "maxLength": 200
            },
            "href": {
              "type": "string",
              "maxLength": 200
            }
          },
          "required": [
            "title",
            "newJobs",
            "booked",
            "won",
            "amounts",
            "text",
            "href"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "recap": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "maxLength": 80
            },
            "stats": {
              "maxItems": 6,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "enum": [
                      "answered",
                      "messages",
                      "jobs",
                      "blocked",
                      "minutes",
                      "pickup"
                    ]
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "value": {
                    "type": "string",
                    "maxLength": 24
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "note": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "change": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "href": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "key",
                  "count",
                  "value",
                  "label",
                  "note",
                  "change",
                  "href"
                ],
                "additionalProperties": false
              }
            },
            "missed": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 240
                    },
                    "how": {
                      "type": "string",
                      "maxLength": 240
                    },
                    "href": {
                      "type": "string",
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "count",
                    "title",
                    "text",
                    "how",
                    "href"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "fix": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "enum": [
                        "retest",
                        "local",
                        "keep",
                        "share"
                      ]
                    },
                    "title": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 240
                    },
                    "action": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "href": {
                      "type": "string",
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "key",
                    "title",
                    "text",
                    "action",
                    "href"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "card": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "calls": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "blocked": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "minutes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "calls",
                    "blocked",
                    "minutes"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "title",
            "stats",
            "missed",
            "fix",
            "card"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "period",
    "title",
    "from",
    "to",
    "dates",
    "figures",
    "lead",
    "howWeCount",
    "moment",
    "quiet",
    "plan",
    "strip"
  ],
  "additionalProperties": false,
  "$defs": {
    "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)))$"
    }
  }
}