{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/npm/json-schema/npm-staged-packument-request-schema.json",
  "title": "StagedPackumentRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/npm-registry-reference-openapi.yml#/components/schemas/StagedPackumentRequest",
  "type": "object",
  "required": [
    "name",
    "versions",
    "_attachments"
  ],
  "properties": {
    "_id": {
      "type": "string",
      "description": "The package name, including scope if applicable."
    },
    "name": {
      "type": "string",
      "description": "The name of the package, including scope if applicable."
    },
    "description": {
      "type": "string",
      "description": "A short description of the package."
    },
    "version": {
      "type": "string",
      "description": "The latest version string. Informational; the actual version to publish is determined by the first key in the `versions` object.\n"
    },
    "access": {
      "type": "string",
      "description": "The access level for the package. 'public' or 'private'.\n",
      "enum": [
        "public",
        "private"
      ]
    },
    "versions": {
      "type": "object",
      "description": "An object where each key is a semver version string and the value is the version metadata. The registry assumes the FIRST key in this object is the newest version being published. Only include the single new version being published.\n",
      "additionalProperties": {
        "type": "object",
        "description": "Version-specific metadata (package.json contents for this version).\n",
        "properties": {
          "_npmUser": {
            "type": "object",
            "description": "The user publishing this version. Should include at least the `name` field.\n"
          }
        }
      }
    },
    "dist-tags": {
      "type": "object",
      "description": "Mapping of distribution tags to semver version strings. e.g., {\"latest\": \"1.2.3\"}\n",
      "additionalProperties": {
        "type": "string"
      }
    },
    "readme": {
      "type": "string",
      "description": "The README content for the package."
    },
    "maintainers": {
      "type": "array",
      "description": "List of package maintainers.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      }
    },
    "author": {
      "type": "string",
      "description": "The package author."
    },
    "license": {
      "type": "string",
      "description": "The SPDX license identifier."
    },
    "repository": {
      "type": "object",
      "description": "The source code repository.",
      "properties": {
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      }
    },
    "main": {
      "type": "string",
      "description": "The entry point module."
    },
    "scripts": {
      "type": "object",
      "description": "Package scripts.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "_nodeVersion": {
      "type": "string",
      "description": "The version of node used to publish the package.\n"
    },
    "_npmVersion": {
      "type": "string",
      "description": "The version of npm used to publish the package.\n"
    },
    "_attachments": {
      "type": "object",
      "description": "An object containing the binary attachments. Each key is an attachment name (typically `{version}.tgz` for the tarball). The first attachment with `content_type: 'application/octet-stream'` is treated as the tarball; if no content_type is set, the first attachment is used. An optional sigstore provenance bundle attachment may also be included.\n",
      "additionalProperties": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string",
            "description": "The base64-encoded binary data of the attachment (tarball or provenance bundle).\n"
          },
          "content_type": {
            "type": "string",
            "description": "The MIME type of the attachment. Use `application/octet-stream` for the tarball. \n  For sigstore provenance bundles, use \n",
            "enum": [
              "application/octet-stream",
              "application/vnd.dev.sigstore.bundle+json;version=0.3"
            ]
          }
        }
      }
    },
    "_rev": {
      "type": "string",
      "description": "Packument document revision. May be included when updating an existing package.\n"
    }
  }
}