{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/ballerina/refs/heads/main/json-structure/central-api-package-structure.json",
  "name": "Package",
  "description": "A package published to Ballerina Central.",
  "type": "object",
  "properties": {
    "id": {
      "type": "int32",
      "description": "Registry-assigned numeric package id."
    },
    "organization": {
      "type": "string",
      "description": "Owning organization",
      "e.g. `ballerina`.": null
    },
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "platform": {
      "type": "string",
      "description": "Target platform of the published artifact, e.g. `java21` or `any`."
    },
    "languageSpecificationVersion": {
      "type": "string",
      "description": "Ballerina language specification the package was built against, e.g. `2024R1`."
    },
    "isDeprecated": {
      "type": "boolean",
      "description": "True when the maintainer has deprecated this package version."
    },
    "deprecateMessage": {
      "type": "string",
      "description": "Maintainer-supplied deprecation notice; empty when not deprecated."
    },
    "URL": {
      "type": "string",
      "description": "Central-relative path to the package page, e.g. `/ballerina/http/2.17.0`."
    },
    "balaVersion": {
      "type": "string",
      "description": "Version of the BALA archive format used."
    },
    "balaURL": {
      "type": "string",
      "description": "Download URL for the BALA archive."
    },
    "digest": {
      "type": "string",
      "description": "Content digest of the published archive."
    },
    "summary": {
      "type": "string"
    },
    "readme": {
      "type": "string",
      "description": "Full README markdown; omitted when `readme=false`."
    },
    "template": {
      "type": "boolean",
      "description": "True when the package is a project template."
    },
    "licenses": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "authors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sourceCodeLocation": {
      "type": "string"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ballerinaVersion": {
      "type": "string"
    },
    "icon": {
      "type": "string"
    },
    "ownerUUID": {
      "type": "string"
    },
    "createdDate": {
      "type": "int32",
      "description": "Publication time",
      "epoch milliseconds.": null
    },
    "pullCount": {
      "type": "int32",
      "description": "Cumulative pulls of this package."
    },
    "visibility": {
      "type": "string",
      "description": "`public` for everything reachable anonymously."
    },
    "modules": {
      "type": "array",
      "items": {
        "$ref": "https://raw.githubusercontent.com/api-evangelist/ballerina/refs/heads/main/json-structure/central-api-module-structure.json"
      }
    },
    "balToolId": {
      "type": "string",
      "description": "Set when the package ships a `bal` CLI tool."
    },
    "graalvmCompatible": {
      "type": "string",
      "description": "GraalVM native-image compatibility as declared/verified: e.g. `Yes`, `No`, `Unknown`."
    }
  }
}