id.unum.facade.rest.UnumAPIService Maven / Gradle / Ivy
The newest version!
package id.unum.facade.rest;
import id.unum.dto.*;
import id.unum.protos.crypto.v1.PublicKeyInfo;
import id.unum.protos.didDocument.v1.DidDocument;
import id.unum.protos.issuer.v1.Issuer;
import id.unum.protos.presentationRequest.v1.PresentationRequest;
import id.unum.protos.presentationRequestEnriched.v1.PresentationRequestEnriched;
import id.unum.protos.presentationRequestEnriched.v1.PresentationRequestRepoDto;
import id.unum.protos.receipt.v1.PresentationVerifiedReceiptOptions;
import id.unum.protos.receipt.v1.Receipt;
import id.unum.protos.credential.v1.IssueCredentialRequest;
import id.unum.protos.credential.v1.CredentialStatusInfo;
import id.unum.protos.verifier.v1.Verifier;
import retrofit2.Call;
import retrofit2.http.*;
import id.unum.facade.rest.request.*;
import id.unum.protos.externalMessage.v1.ExternalMessage;
/**
* API Service to hold all api calls
*/
public interface UnumAPIService {
// Issuer Service
@POST("/issuer")
Call registerIssuer(@Header("Authorization") String apiKey,
@Body RegisterIssuerRequest request);
@POST("/credentialRepository")
Call issueCredential(@Header ("Authorization") String authToken, @Body IssueCredentialRequest request);
@PATCH("/credentialStatus/{uuid}")
Call updateCredentialStatus(@Header ("Authorization") String authToken,
@Path("uuid") String uuid, @Body UpdateCredentialStatusRequest request);
// Verifier Service
@POST("/verifier")
Call registerVerifier(@Header ("Authorization") String apiKey,
@Body RegisterVerifierRequest request);
@POST("/presentationRequest")
Call sendRequest(@Header ("Authorization") String authToken,
@Body PresentationRequest request);
@GET("/credentialStatus/{id}")
Call checkCredentialStatus(@Header ("Authorization") String authToken, @Path("id") String id);
@POST("/sms")
Call sendSms(@Header ("Authorization") String authToken, @Body ExternalMessage request);
@POST("/email")
Call sendEmail(@Header ("Authorization") String authToken, @Body SendMessageRequest request);
@GET("/presentationRequestRepository/{id}")
Call getPresentationRequest(@Header ("Authorization") String authToken, @Path("id") String id);
// Did Document Service
@GET("/didDocument/{did}")
Call getDidDoc(@Header ("Authorization") String authToken, @Path("did") String did);
@GET("/didDocument/{didWithKeyId}")
Call getDidDocKey(@Header ("Authorization") String authToken, @Path("didWithKeyId") String didWithKeyId);
// Receipt Service
@POST("/receipt")
Call createPresentationVerifiedReceipt(@Header ("Authorization") String authToken, @Body PresentationVerifiedReceiptOptions request);
}