package com.kryptnostic.storage.v1.http;

import java.util.UUID;

import com.kryptnostic.kodex.v1.exceptions.types.BadRequestException;
import com.kryptnostic.kodex.v1.models.response.BasicResponse;

import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;

public interface CryptoKeyStorageApi {
    final String CONTROLLER         = "/keys";
    final String PRIVATE            = "/private";
    final String SEARCH_PRIVATE     = "/searchprivate";
    final String HASH               = "/hash";
    final String RSA_PUB            = "/rsapublic";
    final String ID                 = "id";
    final String ID_PATH            = "/{" + ID + "}";

    @POST( CONTROLLER + PRIVATE )
    BasicResponse<String> setFHEPrivateKeyForCurrentUser( @Body byte[] key ) throws BadRequestException;

    @GET( CONTROLLER + PRIVATE )
    byte[] getFHEPrivateKeyForCurrentUser() throws BadRequestException;

    @POST( CONTROLLER + SEARCH_PRIVATE )
    BasicResponse<String> setFHESearchPrivateKeyForCurrentUser( @Body byte[] key ) throws BadRequestException;

    @GET( CONTROLLER + SEARCH_PRIVATE )
    byte[] getFHESearchPriatveKeyForUser() throws BadRequestException;

    @POST( CONTROLLER + HASH )
    BasicResponse<String> setHashFunctionForCurrentUser( @Body byte[] key ) throws BadRequestException;

    @GET( CONTROLLER + HASH )
    byte[] getHashFunctionForCurrentUser() throws BadRequestException;

    @GET( CONTROLLER + RSA_PUB )
    byte[] getRsaPublicKeyForUser( @Path( ID ) UUID userId ) throws BadRequestException;

    @POST( CONTROLLER + RSA_PUB )
    BasicResponse<String> setRsaPublicKey( @Body byte[] key ) throws BadRequestException;

    @GET( CONTROLLER + RSA_PUB )
    byte[] getRsaPublicKeyForCurrentUser() throws BadRequestException;
}
@@ -39,32 +39,8 @@
 p;%0A%0A
-import java.util.UUID;%0A%0A
 impo
@@ -252,35 +252,8 @@
 OST;
-%0Aimport retrofit.http.Path;
 %0A%0Apu
@@ -1382,32 +1382,62 @@
 uestException;%0A%0A
+//%0A//    For future use!%0A//%0A//
     @GET( CONTRO
@@ -1445,32 +1445,34 @@
 LER + RSA_PUB )%0A
+//
     byte%5B%5D getRs
@@ -1536,33 +1536,37 @@
 questException;%0A
-%0A
+//%0A//
     @POST( CONTR
@@ -1579,24 +1579,26 @@
 + RSA_PUB )%0A
+//
     BasicRes
@@ -1667,33 +1667,37 @@
 questException;%0A
-%0A
+//%0A//
     @GET( CONTRO
@@ -1713,16 +1713,18 @@
 A_PUB )%0A
+//
     byte

comment out future endpoints