package sbt.internal.sona
@target(Scala)
@codecPackage("sbt.internal.sona.codec")
@fullCodec("JsonProtocol")

enum DeploymentState {
  PENDING
  VALIDATING
  VALIDATED
  PUBLISHING
  PUBLISHED
  FAILED
}

## https://central.sonatype.org/publish/publish-portal-api/#uploading-a-deployment-bundle
type PublisherStatus {
  deploymentId: String!
  deploymentName: String!
  deploymentState: sbt.internal.sona.DeploymentState!
  purls: [String]
  # Optional errors. The field has non-standard structure and thus we avoid automatic format generation
  errors: sjsonnew.shaded.scalajson.ast.unsafe.JValue
}