{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-artifact-distribution-schema.json",
  "title": "ArtifactDistribution",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-mirrors-api-openapi.yml#/components/schemas/ArtifactDistribution",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "artifact",
    "policy",
    "hostedDownloads",
    "upstream",
    "decentralizedFallbacks"
  ],
  "properties": {
    "schemaVersion": {
      "const": "hugging-bay.artifact-distribution.v1"
    },
    "generatedAt": {
      "type": "string"
    },
    "baseUrl": {
      "type": "string"
    },
    "artifact": {
      "$ref": "https://huggingbay.xyz/api/schemas#/$defs/ArtifactSummary"
    },
    "policy": {
      "type": "object",
      "additionalProperties": true
    },
    "hostedDownloads": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        },
        "hosted": {
          "type": "boolean"
        },
        "hostedFiles": {
          "type": "number"
        },
        "filesUrl": {
          "type": "string"
        },
        "downloadableFilesUrl": {
          "type": "string"
        },
        "manifestUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "reviewedPeerFallbackReady": {
          "type": "boolean"
        },
        "reviewedPeerFallbackFiles": {
          "type": "number"
        },
        "reviewedPeerFallbackCount": {
          "type": "number"
        },
        "peerFallbackReadinessUrl": {
          "type": "string"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "https://huggingbay.xyz/api/schemas#/$defs/DownloadableFileRow"
          }
        }
      },
      "additionalProperties": true
    },
    "upstream": {
      "type": "object",
      "additionalProperties": true
    },
    "decentralizedFallbacks": {
      "type": "object",
      "properties": {
        "protocol": {
          "type": "string"
        },
        "verifiedCount": {
          "type": "number"
        },
        "pendingReviewCount": {
          "type": "number"
        },
        "requestUrl": {
          "type": "string"
        },
        "verified": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "pendingReview": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": true
    },
    "recommendedFlow": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "actions": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}