{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/capepartners-fr/json-schema/capepartners-fr-interest-signals-response-schema.json",
  "title": "InterestSignalsResponse",
  "description": "Inbound interest signals from counterparties about the session's own entity. Counts only; no counterparty identities.",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/capepartners-fr-interest-api-openapi.yml#/components/schemas/InterestSignalsResponse",
  "type": "object",
  "properties": {
    "context": {
      "type": "string",
      "enum": [
        "seller",
        "buyer"
      ]
    },
    "entity_id": {
      "type": "integer"
    },
    "entity_name": {
      "type": "string"
    },
    "searches": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Counterparty searches whose results surfaced this entity (self-searches excluded)."
        },
        "counterparties": {
          "type": "integer",
          "description": "Distinct counterparty sessions behind those searches."
        },
        "recent": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string"
              },
              "at": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "suggestions": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Suggestion (matched) events referencing this entity."
        },
        "counterparties": {
          "type": "integer"
        },
        "parked": {
          "type": "integer",
          "description": "Pairings holding this entity at phase 0_prospecting, i.e. suggestions nobody has actioned."
        },
        "parked_counterparties": {
          "type": "integer"
        },
        "reach": {
          "type": "integer",
          "description": "Distinct counterparties that received this entity as a suggested match."
        }
      }
    },
    "pairings": {
      "type": "object",
      "description": "Interaction history: what counterparties have DONE with this profile — pairings created, every phase transition, drops and closes. Positive and negative alike. The live suggestion counts cannot carry this (a pairing leaves phase 0_prospecting as soon as it is actioned or dropped). `unnotified` is the hook a notifier consumes before marking events delivered.",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Ledger events recorded for this entity."
        },
        "counterparties": {
          "type": "integer",
          "description": "Distinct counterparties that ever paired this entity."
        },
        "created": {
          "type": "integer",
          "description": "Pairings created on this entity."
        },
        "advanced": {
          "type": "integer",
          "description": "Phase transitions that are progress."
        },
        "abandoned": {
          "type": "integer",
          "description": "Pairings a counterparty dropped."
        },
        "dropped": {
          "type": "integer",
          "description": "Alias of abandoned."
        },
        "closed": {
          "type": "integer",
          "description": "Pairings that reached a close."
        },
        "last_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Timestamp of the most recent interaction event."
        },
        "unnotified": {
          "type": "integer",
          "description": "Events not yet delivered to the workspace user."
        },
        "pending_review": {
          "type": "integer",
          "description": "Notifiable events (new pairing / phase change / drop / close) not yet reviewed. This is exactly what the Activity To Do block reports, so the card and the To Do list always agree."
        },
        "timeline": {
          "type": "array",
          "description": "The 10 most recent interaction events, oldest first.",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "event": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "cp_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "cp_id": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "phase_from": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phase_to": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "notified": {
                "type": "boolean"
              }
            }
          }
        }
      }
    },
    "universe": {
      "type": "object",
      "properties": {
        "appearances": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Counterparties whose scored universe contains this entity."
        },
        "universe_size": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Counterparties swept (the denominator)."
        },
        "best_score": {
          "type": [
            "number",
            "null"
          ]
        },
        "threshold": {
          "type": "number",
          "description": "Universe floor (50), the same cut the suggested-match reveal uses."
        },
        "scored": {
          "type": "integer",
          "description": "Counterparties that returned a usable score."
        },
        "unscored": {
          "type": "integer",
          "description": "Counterparties that returned no score (semantic step unavailable)."
        },
        "no_embedding": {
          "type": "integer",
          "description": "Counterparties missing the embedding the semantic step needs. Reported, never auto-generated."
        },
        "entity_embedded": {
          "type": "boolean",
          "description": "Whether this entity itself carries the embedding the semantic step needs."
        },
        "cached": {
          "type": "boolean"
        },
        "computed_at": {
          "type": "number"
        }
      }
    }
  }
}