{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/npm/json-schema/npm-oidc-configs-create-schema.json",
  "title": "OidcConfigsCreate",
  "description": "Array of OIDC trusted publisher configurations to create",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/npm-registry-reference-openapi.yml#/components/schemas/OidcConfigsCreate",
  "type": "array",
  "items": {
    "oneOf": [
      {
        "$ref": "#/$defs/GitHubActionsConfigCreate"
      },
      {
        "$ref": "#/$defs/GitLabPipelinesConfigCreate"
      },
      {
        "$ref": "#/$defs/CircleCIConfigCreate"
      }
    ]
  },
  "$defs": {
    "CircleCIConfigCreate": {
      "type": "object",
      "required": [
        "type",
        "claims",
        "permissions"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "circleci"
          ],
          "description": "Type of the trusted publisher"
        },
        "claims": {
          "type": "object",
          "required": [
            "oidc.circleci.com/org-id",
            "oidc.circleci.com/project-id",
            "oidc.circleci.com/pipeline-definition-id",
            "oidc.circleci.com/vcs-origin"
          ],
          "properties": {
            "oidc.circleci.com/org-id": {
              "type": "string",
              "format": "uuid",
              "description": "The UUID of the CircleCI organization"
            },
            "oidc.circleci.com/project-id": {
              "type": "string",
              "format": "uuid",
              "description": "The UUID of the CircleCI project"
            },
            "oidc.circleci.com/pipeline-definition-id": {
              "type": "string",
              "format": "uuid",
              "description": "The UUID of the pipeline definition Id"
            },
            "oidc.circleci.com/context-ids": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "description": "Optional array of CircleCI context UUIDs."
            },
            "oidc.circleci.com/vcs-origin": {
              "type": "string",
              "description": "The origin repository where the CI job runs, in the format `<vcs-provider>/<org>/<repo>`.\n"
            }
          }
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "createPackage",
              "createStagedPackage",
              "manageDistTags"
            ]
          },
          "description": "List of permissions granted to the trusted publisher configuration"
        }
      }
    },
    "GitHubActionsConfigCreate": {
      "type": "object",
      "required": [
        "type",
        "claims",
        "permissions"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "github"
          ],
          "description": "Type of the trusted publisher"
        },
        "claims": {
          "type": "object",
          "required": [
            "repository"
          ],
          "properties": {
            "repository": {
              "type": "string",
              "description": "GitHub repository in format 'owner/repo'"
            },
            "workflow_ref": {
              "oneOf": [
                {
                  "type": "string",
                  "description": "Exact workflow reference"
                },
                {
                  "type": "object",
                  "description": "Partial workflow reference match",
                  "properties": {
                    "file": {
                      "type": "string",
                      "description": "Workflow file name (e.g., 'publish.yml')"
                    }
                  }
                }
              ],
              "description": "Reference to the GitHub Actions workflow"
            },
            "environment": {
              "type": "string",
              "description": "GitHub environment name"
            }
          }
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "createPackage",
              "createStagedPackage",
              "manageDistTags"
            ]
          },
          "description": "List of permissions granted to the trusted publisher configuration"
        }
      }
    },
    "GitLabPipelinesConfigCreate": {
      "type": "object",
      "required": [
        "type",
        "claims",
        "permissions"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "gitlab"
          ],
          "description": "Type of the trusted publisher"
        },
        "claims": {
          "type": "object",
          "required": [
            "project_path"
          ],
          "properties": {
            "project_path": {
              "type": "string",
              "description": "GitLab project path in format 'group/project'"
            },
            "ci_config_ref_uri": {
              "oneOf": [
                {
                  "type": "string",
                  "description": "Exact CI config reference"
                },
                {
                  "type": "object",
                  "description": "Partial CI config reference match",
                  "properties": {
                    "file": {
                      "type": "string",
                      "description": "CI configuration file name (e.g., '.gitlab-ci.yml')"
                    }
                  }
                }
              ],
              "description": "Reference to the GitLab CI configuration"
            },
            "environment": {
              "type": "string",
              "description": "GitLab environment name"
            }
          }
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "createPackage",
              "createStagedPackage",
              "manageDistTags"
            ]
          },
          "description": "List of permissions granted to the trusted publisher configuration"
        }
      }
    }
  }
}