FINERACT-1724: Preparation for versioned APIs

This commit is contained in:
Arnold Galovics
2023-05-15 13:19:06 +02:00
committed by Arnold Gálovics
parent 190d995628
commit 037f7f264f
211 changed files with 1202 additions and 2215 deletions
@@ -53,7 +53,7 @@ public interface DocumentsApiFixed {
* @return Call<PostEntityTypeEntityIdDocumentsResponse>
*/
@retrofit2.http.Multipart
@POST("{entityType}/{entityId}/documents")
@POST("v1/{entityType}/{entityId}/documents")
Call<PostEntityTypeEntityIdDocumentsResponse> createDocument(@retrofit2.http.Path("entityType") String entityType,
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Part okhttp3.MultipartBody.Part file,
@retrofit2.http.Part("name") String name, @retrofit2.http.Part("description") String description);
@@ -69,7 +69,7 @@ public interface DocumentsApiFixed {
* documentId (required)
* @return Call&lt;DeleteEntityTypeEntityIdDocumentsResponse&gt;
*/
@DELETE("{entityType}/{entityId}/documents/{documentId}")
@DELETE("v1/{entityType}/{entityId}/documents/{documentId}")
Call<DeleteEntityTypeEntityIdDocumentsResponse> deleteDocument(@retrofit2.http.Path("entityType") String entityType,
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId);
@@ -85,7 +85,7 @@ public interface DocumentsApiFixed {
* documentId (required)
* @return Call&lt;Void&gt;
*/
@GET("{entityType}/{entityId}/documents/{documentId}/attachment")
@GET("v1/{entityType}/{entityId}/documents/{documentId}/attachment")
Call<ResponseBody> downloadFile(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
@retrofit2.http.Path("documentId") Long documentId);
@@ -101,7 +101,7 @@ public interface DocumentsApiFixed {
* documentId (required)
* @return Call&lt;GetEntityTypeEntityIdDocumentsResponse&gt;
*/
@GET("{entityType}/{entityId}/documents/{documentId}")
@GET("v1/{entityType}/{entityId}/documents/{documentId}")
Call<GetEntityTypeEntityIdDocumentsResponse> getDocument(@retrofit2.http.Path("entityType") String entityType,
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId);
@@ -115,7 +115,7 @@ public interface DocumentsApiFixed {
* entityId (required)
* @return Call&lt;List&lt;GetEntityTypeEntityIdDocumentsResponse&gt;&gt;
*/
@GET("{entityType}/{entityId}/documents")
@GET("v1/{entityType}/{entityId}/documents")
Call<List<GetEntityTypeEntityIdDocumentsResponse>> retrieveAllDocuments(@retrofit2.http.Path("entityType") String entityType,
@retrofit2.http.Path("entityId") Long entityId);
@@ -138,7 +138,7 @@ public interface DocumentsApiFixed {
* @return Call&lt;PutEntityTypeEntityIdDocumentsResponse&gt;
*/
@retrofit2.http.Multipart
@PUT("{entityType}/{entityId}/documents/{documentId}")
@PUT("v1/{entityType}/{entityId}/documents/{documentId}")
Call<PutEntityTypeEntityIdDocumentsResponse> updateDocument(@retrofit2.http.Path("entityType") String entityType,
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId,
@retrofit2.http.Part okhttp3.MultipartBody.Part file, @retrofit2.http.Part("name") String name,
@@ -36,21 +36,21 @@ import retrofit2.http.PUT;
*/
public interface ImagesApi {
@POST("{entityType}/{entityId}/images")
@POST("v1/{entityType}/{entityId}/images")
@retrofit2.http.Multipart
Call<Void> create(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
@retrofit2.http.Part okhttp3.MultipartBody.Part file);
@GET("{entityType}/{entityId}/images")
@GET("v1/{entityType}/{entityId}/images")
Call<ResponseBody> get(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
@retrofit2.http.Query("maxWidth") Integer maxWidth, @retrofit2.http.Query("maxHeight") Integer maxHeight,
@retrofit2.http.Query("output") String output);
@PUT("{entityType}/{entityId}/images")
@PUT("v1/{entityType}/{entityId}/images")
@retrofit2.http.Multipart
Call<Void> update(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
@retrofit2.http.Part okhttp3.MultipartBody.Part file);
@DELETE("{entityType}/{entityId}/images")
@DELETE("v1/{entityType}/{entityId}/images")
Call<Void> delete(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId);
}
@@ -51,14 +51,14 @@ public interface RunReportsApi {
* isSelfServiceUserReport (optional, default to false)
* @return Call&lt;GetReportNameResponse&gt;
*/
@GET("runreports/{reportName}")
@GET("v1/runreports/{reportName}")
Call<RunReportsResponse> runReportGetData(@retrofit2.http.Path("reportName") String reportName,
@QueryMap Map<String, String> parameters, @retrofit2.http.Query("isSelfServiceUserReport") Boolean isSelfServiceUserReport);
/**
* Run Report which returns a response such as a PDF, CSV, XLS or XSLX file.
*/
@GET("runreports/{reportName}")
@GET("v1/runreports/{reportName}")
Call<ResponseBody> runReportGetFile(@retrofit2.http.Path("reportName") String reportName, @QueryMap Map<String, String> parameters,
@retrofit2.http.Query("isSelfServiceUserReport") Boolean isSelfServiceUserReport);