{
  "$comment": "GENERATED FILE — DO NOT EDIT DIRECTLY. Source: packages/schemas/src. Regenerate with `npm run generate:json-schema --workspace=@spacecorp/schemas`.",
  "$id": "https://spacecorp.io/schemas/artifact.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "number",
      "const": 1
    },
    "id": {
      "type": "string",
      "pattern": "^artifact-[a-z0-9][a-z0-9-]*$"
    },
    "project": {
      "type": "string",
      "pattern": "^scp-[a-z0-9][a-z0-9-]*$"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "pattern": "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
    },
    "filename": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
    },
    "media_type": {
      "type": "string",
      "pattern": "^[a-z]+\\/[a-z0-9.+-]+$"
    },
    "size_bytes": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "created": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "source_commit": {
      "type": "string",
      "pattern": "^[a-f0-9]{7,40}$"
    },
    "source_repository": {
      "type": "string",
      "minLength": 1
    },
    "storage": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "const": "r2"
        },
        "bucket": {
          "type": "string",
          "minLength": 1
        },
        "key": {
          "type": "string",
          "pattern": "^projects\\/scp-[a-z0-9-]+\\/(releases|models|datasets|images|documents)\\/\\S+$"
        }
      },
      "required": [
        "provider",
        "bucket",
        "key"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "schema_version",
    "id",
    "project",
    "name",
    "version",
    "filename",
    "media_type",
    "size_bytes",
    "sha256",
    "created",
    "source_commit",
    "storage"
  ],
  "additionalProperties": false
}
