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

com.deque.networking.models.devtools.AxeDevToolsAccessTokenInterface.kt Maven / Gradle / Ivy

There is a newer version: 5.5.2
Show newest version
package com.deque.networking.models.devtools

import com.deque.axe.android.AxeResult
import com.deque.networking.models.DEFAULT_CONTENT_TYPE
import com.deque.networking.models.devtools.serializable.AxeDevToolsResultKey
import com.deque.networking.models.devtools.serializable.AxeDevToolsResultSummaryResponse
import com.deque.networking.models.devtools.serializable.UserInfo
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.Headers
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.Query

interface AxeDevToolsAccessTokenInterface {

    @POST("/attest/result/axe")
    @Headers(DEFAULT_CONTENT_TYPE)
    suspend fun uploadResult(
        @Header("authorization") bearerToken: String?,
        @Body axeResult: AxeResult
    ): Result

    @POST("/attest/result/axe")
    @Headers(DEFAULT_CONTENT_TYPE)
    suspend fun uploadResult(@Body axeResult: AxeResult?): Result

    @DELETE("/attest/result/{userId}/{packageName}/{resultId}")
    @Headers(DEFAULT_CONTENT_TYPE)
    suspend fun deleteResult(
        @Header("Authorization") bearerToken: String?,
        @Path("userId") userId: String,
        @Path("packageName") packageName: String,
        @Path("resultId") resultId: String
    ): Result

    @GET("/attest/result/axe/{userId}/{packageName}/{resultId}")
    @Headers(DEFAULT_CONTENT_TYPE)
    suspend fun getAxeDevToolsResultAxe(
        @Header("Authorization") bearerToken: String?,
        @Path("userId") userId: String,
        @Path("packageName") packageName: String,
        @Path("resultId") resultId: String
    ): Result

    @POST("/attest/result/tag/{userId}/{packageName}/{resultId}")
    @Headers(DEFAULT_CONTENT_TYPE)
    suspend fun postAxeDevToolsResultTag(
        @Header("authorization") bearerToken: String?,
        @Path("userId") userId: String,
        @Path("packageName") packageName: String,
        @Path("resultId") resultId: String,
        @Body tags: TagsSet?
    ): Result

    @GET("/attest/results/summaries")
    @Headers(DEFAULT_CONTENT_TYPE)
    suspend fun getSummariesByUser(
        @Header("authorization") bearerToken: String?,
        @Query("user") user: String,
    ): Result

    @PUT("/attest/results/summaries/{userId}/{packageName}/{resultId}/name")
    @Headers("Content-Type: text/plain")
    suspend fun setScanName(
        @Header("authorization") bearerToken: String?,
        @Path("userId") userId: String,
        @Path("packageName") packageName: String,
        @Path("resultId") resultId: String,
        @Body scanName: String
    ): Result

    @GET("/attest/user")
    suspend fun getUserInfo(@Header("authorization") bearerToken: String?): Result
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy