package com.kryptnostic.v2.storage.api;

import java.util.Map;
import java.util.UUID;

import com.kryptnostic.kodex.v1.constants.Names;

import retrofit.http.GET;
import retrofit.http.Path;

public interface TypesApi {

    String SCOPE      = "scope";
    String SCOPE_PATH = "/{" + SCOPE + "}";

    String TYPE       = Names.TYPE_FIELD;
    String TYPE_PATH  = "/{" + TYPE + "}";

    /**
     * Used to retrieve type information for all available scopes.
     * 
     * @return A mapping of each scope to a mapping of type names to corresponding {@link UUID}s.
     */
    @GET( "/" )
    Map<String, Map<String, UUID>> getScopes();

    /**
     * Used to retrieve type information for a particular scope.
     * 
     * @return A mapping of type names to corresponding {@link UUID}s.
     */
    @GET( SCOPE_PATH )
    Map<String, UUID> getScopeInformation();

    /**
     * Resolves as scope and type name to a UUID, creating one if necessary.
     * 
     * @param scope The name of the scope for which to resolve the type.
     * @param type The name of the type.
     * @return A type UUID that is unique across all scopes.
     */
    @GET( SCOPE_PATH + TYPE_PATH )
    UUID getOrCreateUuidForType( @Path( SCOPE ) String scope, @Path( TYPE ) String type);

}
@@ -211,16 +211,50 @@
 pesApi %7B
+%0A    String CONTROLLER = %22/types%22;
 %0A%0A    St
@@ -890,16 +890,44 @@
 rmation(
+ @Path( SCOPE ) String scope
 );%0A%0A    

update types api