{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/boardwalkai-com/json-schema/boardwalkai-com-project-count-response-schema.json",
  "title": "ProjectCountResponse",
  "description": "Free. Carries no record identity of any kind: no ids, no names, no samples, no facets.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/boardwalkai-com-openapi.yml#/components/schemas/ProjectCountResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "matchCount": {
          "type": "integer",
          "description": "Distinct project records matching. A lower bound when `matchCountIsExact` is false."
        },
        "matchCountIsExact": {
          "type": "boolean"
        },
        "matchCountBasis": {
          "type": "string",
          "enum": [
            "enumerated",
            "scan_ceiling_reached"
          ],
          "description": "`enumerated` implies exact; `scan_ceiling_reached` implies a lower bound. They can never disagree with `matchCountIsExact`."
        },
        "countedAs": {
          "type": "string",
          "enum": [
            "distinct_projects"
          ],
          "description": "One unit is one project record. Never a count of index rows."
        },
        "scanCeiling": {
          "type": "integer"
        },
        "billable": {
          "type": "object",
          "description": "What you would actually be charged. Lower than `matchCount` where the pool already holds unchanged copies.",
          "properties": {
            "records": {
              "type": "integer"
            },
            "credits": {
              "type": "integer"
            },
            "creditRate": {
              "type": "integer"
            },
            "isUpperBound": {
              "type": "boolean",
              "description": "True when the count was exact: the real charge can only come in lower than the quote, never higher. When the scan hit its ceiling (`matchCountIsExact: false`) the quote priced a prefix of the match and is not a ceiling; this field is false and says so."
            },
            "nonBillable": {
              "type": "object",
              "properties": {
                "alreadyDeliveredUnchanged": {
                  "type": "integer"
                },
                "ledgerApplied": {
                  "type": "boolean",
                  "description": "False when delivery history could not be read, so everything was priced as new."
                }
              }
            }
          }
        },
        "affordability": {
          "type": "object",
          "properties": {
            "affordable": {
              "type": "boolean"
            },
            "blockReason": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "insufficient_credits",
                "credits_exhausted",
                "subscription_required",
                null
              ]
            },
            "shortfallCredits": {
              "type": "integer"
            },
            "maxAffordableRecords": {
              "type": [
                "integer",
                "null"
              ],
              "description": "Null for an actor who is never debited."
            },
            "boundBy": {
              "type": "string",
              "enum": [
                "period_balance"
              ]
            },
            "unlimited": {
              "type": "boolean"
            }
          }
        },
        "ordering": {
          "type": "object",
          "description": "The published ordering policy for this request.",
          "properties": {
            "sort": {
              "type": "string"
            },
            "order": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "tiebreak": {
              "type": [
                "string",
                "null"
              ],
              "description": "Secondary sort key. **Currently null**: records sharing a sort value have no defined order between them, so paging a tie-heavy sort is not guaranteed stable."
            },
            "meaning": {
              "type": "string"
            }
          }
        },
        "truncation": {
          "type": "object",
          "description": "What happens when a metered page costs more than the balance has left.",
          "properties": {
            "policy": {
              "type": "string",
              "enum": [
                "refuse",
                "trial_truncate"
              ],
              "description": "A paid page is delivered whole or refused whole, never trimmed; trial keys truncate the page to what the trial balance affords and say so."
            },
            "wouldTruncate": {
              "type": "boolean"
            },
            "deliverableRecords": {
              "type": [
                "integer",
                "null"
              ]
            },
            "explanation": {
              "type": "string"
            }
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "type": "string"
        },
        "representation": {
          "type": "string",
          "enum": [
            "compact",
            "standard",
            "full"
          ]
        },
        "credits": {
          "type": "object",
          "properties": {
            "limit": {
              "type": "integer"
            },
            "used": {
              "type": "integer"
            },
            "remaining": {
              "type": "integer"
            },
            "charged": {
              "type": "integer",
              "enum": [
                0
              ],
              "description": "Always zero."
            },
            "periodStart": {
              "type": [
                "string",
                "null"
              ]
            },
            "periodEnd": {
              "type": [
                "string",
                "null"
              ]
            },
            "isTeamPool": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string"
        },
        "search": {
          "type": "string",
          "description": "The metered route carrying the identical filters."
        },
        "docs": {
          "type": "string"
        }
      }
    }
  }
}