{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usetrackly-app/json-schema/usetrackly-app-company-list-counts-unavailable-schema.json",
  "title": "CompanyListCountsUnavailable",
  "description": "Available only with `allowUnavailableCounts=1` after a live aggregation deadline. List count and total remain company counts, not job counts.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usetrackly-app-openapi.json#/components/schemas/CompanyListCountsUnavailable",
  "type": "object",
  "required": [
    "success",
    "companies",
    "count",
    "countsState",
    "retryAfterSeconds"
  ],
  "properties": {
    "countsState": {
      "type": "string",
      "const": "unavailable"
    },
    "retryAfterSeconds": {
      "type": "integer",
      "const": 60
    },
    "success": {
      "type": "boolean",
      "const": true
    },
    "companies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CompanyCountsUnavailable"
      }
    },
    "count": {
      "type": "integer",
      "description": "Number of companies returned in this page (respects `limit`/`offset`)."
    },
    "total": {
      "type": "integer",
      "description": "Total number of companies matching the filter across all pages."
    },
    "servedFromCache": {
      "type": "boolean"
    },
    "dataFreshnessMs": {
      "type": "integer"
    }
  },
  "$defs": {
    "CompanyCountsUnavailable": {
      "type": "object",
      "description": "Opt-in Companies list record when live counts are unavailable. All count fields are null; metadata and per-user favorites retain their normal meaning.",
      "required": [
        "id",
        "name",
        "domain",
        "isFavorite",
        "pmJobCount",
        "totalJobCount",
        "mbaJobCount",
        "functionCounts"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "logoUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "atsType": {
          "type": [
            "string",
            "null"
          ],
          "description": "ATS vendor slug (e.g. greenhouse, lever, ashby, eightfold)."
        },
        "industry": {
          "type": [
            "string",
            "null"
          ]
        },
        "isFavorite": {
          "type": "boolean"
        },
        "pmJobCount": {
          "type": "null"
        },
        "totalJobCount": {
          "type": "null"
        },
        "mbaJobCount": {
          "type": "null"
        },
        "functionCounts": {
          "type": "null"
        },
        "companyStage": {
          "type": [
            "string",
            "null"
          ]
        },
        "fundingStage": {
          "type": [
            "string",
            "null"
          ]
        },
        "fundingSeries": {
          "type": [
            "string",
            "null"
          ]
        },
        "valuationMillions": {
          "type": [
            "number",
            "null"
          ]
        },
        "lastFinancingDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "ycBatch": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}