All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.com.vanniktech.maven.publish.nexus.NexusService.kt Maven / Gradle / Ivy

package com.vanniktech.maven.publish.nexus

import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

/* Nexus service definition based on the incomplete documentation at:
 * -Nexus STAGING API: https://oss.sonatype.org/nexus-staging-plugin/default/docs/index.html
 * -Nexus CORE API: https://repository.sonatype.org/nexus-restlet1x-plugin/default/docs/index.html
 */
internal interface NexusService {

  @GET("staging/profiles")
  fun getStagingProfiles(): Call

  @POST("staging/profiles/{profileId}/start")
  fun createRepository(
    @Path("profileId") stagingProfileId: String,
    @Body input: CreateRepositoryInput,
  ): Call

  @GET("staging/profile_repositories")
  fun getProfileRepositories(): Call

  @GET("staging/repository/{repositoryId}")
  fun getRepository(@Path("repositoryId") repositoryId: String): Call

  @GET("staging/repository/{repositoryId}/activity")
  fun getRepositoryActivity(@Path("repositoryId") repositoryId: String): Call>

  @POST("staging/bulk/close")
  fun closeRepository(@Body input: TransitionRepositoryInput): Call

  @POST("staging/bulk/promote")
  fun releaseRepository(@Body input: TransitionRepositoryInput): Call

  @POST("staging/bulk/drop")
  fun dropRepository(@Body input: TransitionRepositoryInput): Call
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy