From 87e27050dd639e28214f81597f5575b2b0aa9234 Mon Sep 17 00:00:00 2001 From: Kresnadi Budisantoso Date: Tue, 26 Sep 2023 17:52:16 +0200 Subject: [PATCH] OpenAPI Specification for DocuMine --- .../controller/DossierTemplateController.java | 4 +- .../controller/RSSComponentLogController.java | 257 ++ .../api/impl/controller/RSSController.java | 2 + .../controller/ComponentControllerV2.java | 4 +- .../impl/controller/DossierControllerV2.java | 27 +- .../model/DocuMineDossierRequest.java | 51 + .../api/external/model/EntityReference.java | 8 +- .../external/model/FileComponentsList.java | 4 +- .../external/resource/DossierResource.java | 3 +- .../src/main/resources/api/openapi.json | 2550 ----------------- .../src/main/resources/api/openapi.yaml | 2388 +++++++++++++++ .../src/main/resources/application.yaml | 1 + .../shared/model/DossierTemplateModel.java | 35 +- .../dossiertemplate/dossier/Dossier.java | 25 +- 14 files changed, 2790 insertions(+), 2569 deletions(-) create mode 100644 persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSComponentLogController.java create mode 100644 persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/DocuMineDossierRequest.java delete mode 100644 persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.json create mode 100644 persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.yaml diff --git a/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/DossierTemplateController.java b/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/DossierTemplateController.java index dfd3a3849..882a3935e 100644 --- a/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/DossierTemplateController.java +++ b/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/DossierTemplateController.java @@ -290,7 +290,7 @@ public class DossierTemplateController implements DossierTemplateResource { private DossierTemplateModel convert(DossierTemplate dossierTemplate) { return DossierTemplateModel.builder() - .dossierTemplateId(dossierTemplate.getId()) + .id(dossierTemplate.getId()) .name(dossierTemplate.getName()) .description(dossierTemplate.getDescription()) .dateAdded(dossierTemplate.getDateAdded()) @@ -300,7 +300,7 @@ public class DossierTemplateController implements DossierTemplateResource { .validFrom(dossierTemplate.getValidFrom()) .validTo(dossierTemplate.getValidTo()) .downloadFileTypes(dossierTemplate.getDownloadFileTypes()) - .dossierTemplateStatus(DossierTemplateStatus.valueOf(dossierTemplate.getDossierTemplateStatus().name())) + .status(DossierTemplateStatus.valueOf(dossierTemplate.getDossierTemplateStatus().name())) .keepImageMetadata(dossierTemplate.isKeepImageMetadata()) .keepHiddenText(dossierTemplate.isKeepHiddenText()) .keepOverlappingObjects(dossierTemplate.isKeepOverlappingObjects()) diff --git a/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSComponentLogController.java b/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSComponentLogController.java new file mode 100644 index 000000000..2992ec674 --- /dev/null +++ b/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSComponentLogController.java @@ -0,0 +1,257 @@ +package com.iqser.red.persistence.service.v1.external.api.impl.controller; + +import static com.iqser.red.service.persistence.management.v1.processor.roles.ActionRoles.GET_RSS; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.iqser.red.service.persistence.management.v1.processor.service.ComponentLogService; +import com.iqser.red.service.persistence.management.v1.processor.service.ComponentOverrideService; +import com.iqser.red.service.persistence.management.v1.processor.service.persistence.AuditPersistenceService; +import com.iqser.red.service.persistence.service.v1.api.external.resource.ComponentLogResource; +import com.iqser.red.service.persistence.service.v1.api.external.resource.RSSResource; +import com.iqser.red.service.persistence.service.v1.api.shared.model.AuditCategory; +import com.iqser.red.service.persistence.service.v1.api.shared.model.FileStatus; +import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.componentlog.ComponentLogEntityReference; +import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.componentlog.ComponentLogEntry; +import com.iqser.red.service.persistence.service.v1.api.shared.model.analysislog.componentlog.ComponentLogEntryValue; +import com.iqser.red.service.persistence.service.v1.api.shared.model.audit.AuditRequest; +import com.iqser.red.service.persistence.service.v1.api.shared.model.component.ComponentsOverrides; +import com.iqser.red.service.persistence.service.v1.api.shared.model.component.RevertOverrideRequest; +import com.iqser.red.service.persistence.service.v1.api.shared.model.rss.RSSFileResponse; +import com.iqser.red.service.persistence.service.v1.api.shared.model.rss.RSSResponse; +import com.iqser.red.service.redaction.report.v1.api.model.rss.DetailedRSSFileResponse; +import com.iqser.red.service.redaction.report.v1.api.model.rss.DetailedRSSResponse; +import com.iqser.red.service.redaction.report.v1.api.model.rss.SCMComponent; +import com.iqser.red.service.redaction.report.v1.api.model.rss.ScmAnnotation; +import com.knecon.fforesight.keycloakcommons.security.KeycloakSecurity; + +import lombok.RequiredArgsConstructor; + +@Deprecated(forRemoval = true) +@RestController +@RequiredArgsConstructor +@ConditionalOnProperty(name = "application.rss.component-log.enabled", havingValue = "true") +public class RSSComponentLogController implements RSSResource { + + private final ComponentOverrideService componentOverrideService; + private final AuditPersistenceService auditPersistenceService; + private final ComponentLogService componentLogService; + private final StatusController statusController; + + + @PreAuthorize("hasAuthority('" + GET_RSS + "')") + public RSSResponse getRSS(@PathVariable(DOSSIER_ID) String dossierId, @RequestParam(value = "fileId", required = false) String fileId) { + + List dossierFiles; + if (StringUtils.isBlank(fileId)) { + dossierFiles = statusController.getDossierStatus(dossierId); + } else { + dossierFiles = List.of(statusController.getFileStatus(dossierId, fileId)); + } + + List fileResponses = dossierFiles.stream().map(this::getRssResponse).toList(); + + return new RSSResponse(fileResponses); + + } + + + private RSSFileResponse getRssResponse(FileStatus file) { + + var componentLog = componentLogService.getComponentLog(file.getDossierId(), file.getId(), true); + + Map results = new HashMap<>(); + + for (var entry : componentLog.getComponentLogEntries()) { + if (entry.getComponentValues().size() <= 1) { + results.put(entry.getName(), entry.getComponentValues().get(0).getValue()); + continue; + } + + List componentValues = entry.getComponentValues(); + for (int i = 0, componentValuesSize = componentValues.size(); i < componentValuesSize; i++) { + ComponentLogEntryValue v = componentValues.get(i); + results.put(entry.getName() + "_" + (i + 1), v.getValue()); + } + } + + return RSSFileResponse.builder().filename(file.getFilename()).result(results).build(); + + } + + + @PreAuthorize("hasAuthority('" + GET_RSS + "')") + public DetailedRSSResponse getDetailedRSS(@PathVariable(DOSSIER_ID) String dossierId, @RequestParam(value = "fileId", required = false) String fileId) { + + List dossierFiles; + if (StringUtils.isBlank(fileId)) { + dossierFiles = statusController.getDossierStatus(dossierId); + } else { + dossierFiles = List.of(statusController.getFileStatus(dossierId, fileId)); + } + + List fileResponses = dossierFiles.stream().map(this::getDetailedRssResponse).toList(); + + return new DetailedRSSResponse(fileResponses); + } + + + private DetailedRSSFileResponse getDetailedRssResponse(FileStatus file) { + + var componentLog = componentLogService.getComponentLog(file.getDossierId(), file.getId(), true); + + Map results = new HashMap<>(); + + for (var entry : componentLog.getComponentLogEntries()) { + if (entry.getComponentValues().size() <= 1) { + results.put(entry.getName(), toSCMComponent(entry.getComponentValues().get(0))); + continue; + } + + List componentValues = entry.getComponentValues(); + for (int i = 0, componentValuesSize = componentValues.size(); i < componentValuesSize; i++) { + ComponentLogEntryValue v = componentValues.get(i); + results.put(entry.getName() + "_" + (i + 1), toSCMComponent(v)); + } + } + + return DetailedRSSFileResponse.builder().filename(file.getFilename()).result(results).build(); + } + + + private SCMComponent toSCMComponent(ComponentLogEntryValue v) { + + return SCMComponent.builder() + .value(v.getValue()) + .originalValue(v.getOriginalValue()) + .transformation(v.getValueDescription()) + .scmAnnotations(v.getComponentLogEntityReferences().stream().map(this::toScmAnnotation).toList()) + .build(); + } + + + private ScmAnnotation toScmAnnotation(ComponentLogEntityReference er) { + + return ScmAnnotation.builder().type(er.getType()).pages(Set.of(er.getPage())).ruleIdentifier(er.getEntityRuleId()).reason("").build(); + } + + @PreAuthorize("hasAuthority('" + GET_RSS + "')") + public void addOverrides(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody ComponentsOverrides componentsOverrides) { + + var componentLog = componentLogService.getComponentLog(dossierId, fileId); + var allComponents = componentLog.getComponentLogEntries(); + + componentOverrideService.addOverrides(dossierId, fileId, componentsOverrides); + + componentsOverrides.getComponentOverrides().forEach((componentName, overrideValue) -> auditOverride(dossierId, fileId, componentName, overrideValue, allComponents)); + } + + + @PreAuthorize("hasAuthority('" + GET_RSS + "')") + public ComponentsOverrides getOverrides(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId) { + + return componentOverrideService.getOverrides(dossierId, fileId); + } + + + @PreAuthorize("hasAuthority('" + GET_RSS + "')") + public void revertOverrides(@PathVariable(DOSSIER_ID) String dossierId, @PathVariable(FILE_ID) String fileId, @RequestBody RevertOverrideRequest revertOverrideRequest) { + + var componentLog = componentLogService.getComponentLog(dossierId, fileId); + var allComponents = componentLog.getComponentLogEntries(); + + componentOverrideService.revertOverrides(dossierId, fileId, revertOverrideRequest); + + revertOverrideRequest.getComponents().forEach(componentNameToRevert -> auditOverrideRevert(dossierId, fileId, componentNameToRevert, allComponents)); + } + + + private void auditOverride(String dossierId, String fileId, String componentName, String overrideValue, List allComponentLogEntries) { + + Optional component = allComponentLogEntries.stream().filter(c -> c.getName().equals(componentName)).findFirst(); + String originalValue = getOriginalValue(component); + String value = getValue(component); + auditPersistenceService.audit(AuditRequest.builder() + .userId(KeycloakSecurity.getUserId()) + .objectId(fileId) + .category(AuditCategory.DOCUMENT.name()) + .message("The component is overwritten with value") + .details(Map.of(DOSSIER_ID, + dossierId, + FILE_ID, + fileId, + "ComponentName", + componentName, + "Action", + "MODIFY", + "OriginalValue", + originalValue, + "OldValue", + value, + "NewValue", + overrideValue)) + .build()); + } + + + private void auditOverrideRevert(String dossierId, String fileId, String componentNameToRevert, List allComponentLogEntries) { + + Optional component = allComponentLogEntries.stream().filter(c -> c.getName().equals(componentNameToRevert)).findFirst(); + String originalValue = getOriginalValue(component); + String value = getValue(component); + auditPersistenceService.audit(AuditRequest.builder() + .userId(KeycloakSecurity.getUserId()) + .objectId(fileId) + .category(AuditCategory.DOCUMENT.name()) + .message("The component override for was reverted") + .details(Map.of(DOSSIER_ID, + dossierId, + FILE_ID, + fileId, + "ComponentName", + componentNameToRevert, + "Action", + "REVERT", + "OriginalValue", + originalValue, + "OldValue", + value, + "NewValue", + originalValue)) + .build()); + } + + + private String getValue(Optional component) { + + return component.map(ComponentLogEntry::getComponentValues) + .stream() + .map(a -> a.stream().map(ComponentLogEntryValue::getValue).collect(Collectors.joining(", "))) + .findFirst() + .orElse(""); + } + + + private static String getOriginalValue(Optional component) { + + return component.map(ComponentLogEntry::getComponentValues) + .stream() + .map(a -> a.stream().map(ComponentLogEntryValue::getOriginalValue).collect(Collectors.joining(", "))) + .findFirst() + .orElse(""); + } + +} diff --git a/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSController.java b/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSController.java index b40f111ca..0769dbf3a 100644 --- a/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSController.java +++ b/persistence-service-v1/persistence-service-external-api-impl-v1/src/main/java/com/iqser/red/persistence/service/v1/external/api/impl/controller/RSSController.java @@ -5,6 +5,7 @@ import static com.iqser.red.service.persistence.management.v1.processor.roles.Ac import java.util.Map; import java.util.stream.Collectors; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; @@ -29,6 +30,7 @@ import lombok.RequiredArgsConstructor; @Deprecated(forRemoval = true) @RestController @RequiredArgsConstructor +@ConditionalOnProperty(name = "application.rss.component-log.enabled", havingValue = "false") public class RSSController implements RSSResource { private final RssReportClient rssReportClient; diff --git a/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/ComponentControllerV2.java b/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/ComponentControllerV2.java index 9b33861b0..5835de012 100644 --- a/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/ComponentControllerV2.java +++ b/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/ComponentControllerV2.java @@ -95,9 +95,9 @@ public class ComponentControllerV2 implements ComponentResource { return EntityReference.builder() .id(componentLogEntityReference.getId()) - .entityRule(componentLogEntityReference.getEntityRuleId()) + .entityRuleId(componentLogEntityReference.getEntityRuleId()) .type(componentLogEntityReference.getType()) - .pages(Set.of(componentLogEntityReference.getPage())) + .page(componentLogEntityReference.getPage()) .build(); } diff --git a/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/DossierControllerV2.java b/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/DossierControllerV2.java index fb726091e..2aea7167a 100644 --- a/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/DossierControllerV2.java +++ b/persistence-service-v1/persistence-service-external-api-impl-v2/src/main/java/com/iqser/red/persistence/service/v2/external/api/impl/controller/DossierControllerV2.java @@ -4,7 +4,9 @@ import com.iqser.red.persistence.service.v1.external.api.impl.controller.Dossier import com.iqser.red.persistence.service.v1.external.api.impl.controller.DossierTemplateController; import com.iqser.red.service.persistence.management.v1.processor.exception.DossierNotFoundException; import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierRequest; +import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DownloadFileType; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.Dossier; +import com.iqser.red.service.persistence.service.v2.api.external.model.DocuMineDossierRequest; import com.iqser.red.service.persistence.service.v2.api.external.model.DossierList; import com.iqser.red.service.persistence.service.v2.api.external.resource.DossierResource; import io.swagger.v3.oas.annotations.Parameter; @@ -19,6 +21,8 @@ import org.springframework.web.bind.annotation.RestController; import static com.iqser.red.service.persistence.management.v1.processor.exception.DossierNotFoundException.DOSSIER_NOT_FOUND_MESSAGE; import static com.iqser.red.service.persistence.service.v2.api.external.resource.DossierTemplateResource.DOSSIER_TEMPLATE_ID_PARAM; +import java.util.Set; + @RestController @RequiredArgsConstructor @Tag(name = "2. Dossier endpoints", description = "Provides operations related to dossiers") @@ -63,12 +67,13 @@ public class DossierControllerV2 implements DossierResource { public ResponseEntity createDossierOrUpdateDossier(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId, - @RequestBody DossierRequest dossier) { + @RequestBody DocuMineDossierRequest dossier) { - return dossierController.createDossierOrUpdateDossier(dossier); + dossierTemplateController.getDossierTemplate(dossierTemplateId); + + return dossierController.createDossierOrUpdateDossier(mapToDossierRequest(dossierTemplateId, dossier)); } - public void deleteDossier(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId, @Parameter(name = DOSSIER_ID_PARAM, description = "The identifier of the dossier to retrieve.", required = true) @PathVariable(DOSSIER_ID_PARAM) String dossierId) { @@ -77,5 +82,21 @@ public class DossierControllerV2 implements DossierResource { dossierController.deleteDossier(dossierId); } + private static DossierRequest mapToDossierRequest(String dossierTemplateId, DocuMineDossierRequest dossier) { + return DossierRequest.builder() + .dossierId(dossier.getId()) + .dossierName(dossier.getName()) + .dossierTemplateId(dossierTemplateId) + .description(dossier.getDescription()) + .ownerId(dossier.getOwnerId()) + .memberIds(dossier.getMemberIds()) + .approverIds(dossier.getMemberIds()) // for DocuMine, the members are always set as approvers + .downloadFileTypes(Set.of(DownloadFileType.ORIGINAL)) + .reportTemplateIds(dossier.getReportTemplateIds()) + .watermarkId(null) + .previewWatermarkId(null) + .dossierStatusId(dossier.getDossierStatusId()) + .build(); + } } diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/DocuMineDossierRequest.java b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/DocuMineDossierRequest.java new file mode 100644 index 000000000..5ac1081d5 --- /dev/null +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/DocuMineDossierRequest.java @@ -0,0 +1,51 @@ +package com.iqser.red.service.persistence.service.v2.api.external.model; + +import java.time.OffsetDateTime; +import java.util.HashSet; +import java.util.Set; + +import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierRequest; +import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DownloadFileType; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.NonNull; + +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Schema(name="DossierRequest", description = "Object containing information about a dossier.") +public class DocuMineDossierRequest { + + @Schema(description = "The id of the dossier, can be null for create requests.") + private String id; + + @NonNull + @Schema(description = "The name of the dossier. Must be unique.") + private String name; + + @Schema(description = "The dossier's description (optional).") + private String description; + + @Schema(description = "The date when the dossier is due.") + private OffsetDateTime dueDate; + + @Schema(description = "The id of the owning user.") + private String ownerId; + + @Builder.Default + @Schema(description = "The id(s) of members associated to this dossier.") + private Set memberIds = new HashSet<>(); + + @Builder.Default + @Schema(description = "Id(s) of the word report templates used to generate downloads") + private Set reportTemplateIds = new HashSet<>(); + + @Schema(description = "The dossierStatusId for this dossier. can be null for update request.") + private String dossierStatusId; + +} diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/EntityReference.java b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/EntityReference.java index 3575d30a9..164a4a3ed 100644 --- a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/EntityReference.java +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/EntityReference.java @@ -3,12 +3,14 @@ package com.iqser.red.service.persistence.service.v2.api.external.model; import java.util.HashSet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlCData; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import lombok.NonNull; @Data @Builder @@ -19,12 +21,12 @@ public class EntityReference { private String id; @JacksonXmlCData private String type; + @JacksonXmlCData - private String entityRule; + private String entityRuleId; @JacksonXmlCData private String value; - @Builder.Default - private Set pages = new HashSet<>(); + private Integer page; } diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/FileComponentsList.java b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/FileComponentsList.java index f11919e8a..df0bb1ee2 100644 --- a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/FileComponentsList.java +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/model/FileComponentsList.java @@ -8,6 +8,8 @@ import lombok.NoArgsConstructor; import java.util.ArrayList; import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + @Data @Builder @NoArgsConstructor @@ -15,5 +17,5 @@ import java.util.List; public class FileComponentsList { @Builder.Default - private List fileComponents = new ArrayList<>(); + private List files = new ArrayList<>(); } diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/resource/DossierResource.java b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/resource/DossierResource.java index b6f9eb5ca..b18e8b9f7 100644 --- a/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/resource/DossierResource.java +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/java/com/iqser/red/service/persistence/service/v2/api/external/resource/DossierResource.java @@ -2,6 +2,7 @@ package com.iqser.red.service.persistence.service.v2.api.external.resource; import com.iqser.red.service.persistence.service.v1.api.shared.model.DossierRequest; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.dossier.Dossier; +import com.iqser.red.service.persistence.service.v2.api.external.model.DocuMineDossierRequest; import com.iqser.red.service.persistence.service.v2.api.external.model.DossierList; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -55,7 +56,7 @@ public interface DossierResource { @Operation(summary = "Creates or updates a dossier for a specific dossier template.", description = "None") @ApiResponses(value = {@ApiResponse(responseCode = "201", description = "Successfully saved the dossier."), @ApiResponse(responseCode = "400", description = "Malformed request parameters or body"), @ApiResponse(responseCode = "409", description = "Duplicate")}) ResponseEntity createDossierOrUpdateDossier(@Parameter(name = DOSSIER_TEMPLATE_ID_PARAM, description = "The identifier of the dossier template that is used for the dossier.", required = true) @PathVariable(DOSSIER_TEMPLATE_ID_PARAM) String dossierTemplateId, - @RequestBody DossierRequest dossier); + @RequestBody DocuMineDossierRequest dossier); @ResponseStatus(value = HttpStatus.NO_CONTENT) diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.json b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.json deleted file mode 100644 index 7704d9c6a..000000000 --- a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.json +++ /dev/null @@ -1,2550 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "Open API Documentation", - "description": "TBD", - "version": "4.0" - }, - "servers": [ - { - "url": "https://staging.documine.ai", - "description": "Generated server url" - } - ], - "security": [ - { - "FF-OAUTH": [] - } - ], - "paths": { - "/api/dossier-templates": { - "get": { - "tags": [ - "dossier-template-controller" - ], - "summary": "Lists all existing DossierTemplates.", - "description": "TODO", - "operationId": "getAllDossierTemplates", - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "List of all existing DossierTemplates.", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/DossierTemplateList" - } - } - } - } - } - } - }, - "/api/dossier-template/{dossierTemplateId}": { - "get": { - "tags": [ - "dossier-template-controller" - ], - "summary": "Get a specific DossierTemplate by its identifier.", - "description": "TODO", - "operationId": "getDossierTemplate", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template to retrieve." - } - ], - "responses": { - "404": { - "description": "The DossierTemplate is not found.", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "The DossierTemplate.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DossierTemplate" - } - } - } - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers": { - "get": { - "tags": [ - "dossier-controller" - ], - "summary": "Gets all existing dossiers for a specific dossier template.", - "description": "TODO", - "operationId": "getDossiers", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "includeActive", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true - }, - "description": "A Toggle to include active dossiers: If `true` (default) the response contains dossiers that are active, i.e. the dossier is neither archived nor soft-deleted." - }, - { - "name": "includeArchived", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to include archived dossiers: If `true` the response contains dossiers that have been archived." - }, - { - "name": "includeSoftDeleted", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to include soft-deleted dossiers: If `true` the response contains dossiers that have been soft-deleted, i.e. the dossiers can still be restored." - } - ], - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/DossierList" - } - } - } - } - } - }, - "post": { - "tags": [ - "dossier-controller" - ], - "summary": "Creates or updates a dossier for a specific dossier template.", - "description": "TODO", - "operationId": "createDossierOrUpdateDossier", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The `dossierTemplateId` that is used for the dossier." - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DossierRequest" - } - } - }, - "required": true - }, - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Incorrect dossier ID provided or attempted to change dossier-template for a dossier with files.", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Duplicate", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "201": { - "description": "Successfully saved the dossier.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dossier" - } - } - } - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}": { - "get": { - "tags": [ - "dossier-controller" - ], - "summary": "Gets an existing dossier.", - "description": "By default, the requested dossier will be returned only if it is active. This behavior can be changed by using and combining the respective toggle parameters.", - "operationId": "getDossier", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier to retrieve." - }, - { - "name": "includeActive", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true - }, - "description": "A Toggle to return an active dossier: If `true` the dossiers will be returned if it is active, i.e. the dossiers is neither archived nor deleted." - }, - { - "name": "includeArchived", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to return an archived dossier: If `true` the dossier will be returned if it is archived." - }, - { - "name": "includeSoftDeleted", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to return a soft-deleted dossier: If `true` the dossier will be returned if it has been soft-deleted, i.e. the dossier can still be restored." - } - ], - "responses": { - "404": { - "description": "Not found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dossier" - } - } - } - } - } - }, - "delete": { - "tags": [ - "dossier-controller" - ], - "summary": "Deletes an existing dossier.", - "description": "Dossiers get soft-deleted unless specified other. A soft-deleted dossier can be restored during a retention period that is configured in the application settings. The default retention period is 96h.", - "operationId": "deleteDossier", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier to delete." - }, - { - "name": "deletePermanently", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to permanently delete the dossier: If `true`the dossier will be deleted permanently, i.e. in contrast to a soft-delete (value is `false`) the dossier cannot be restored anymore. This can be applied also on previously soft-deleted dossiers." - } - ], - "responses": { - "404": { - "description": "Not found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "204": { - "description": "Successfully deleted the dossier." - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files": { - "post": { - "tags": [ - "file-controller" - ], - "summary": "Upload a file for a specific dossier.", - "description": "The multipart file upload returns the identifier for the uploaded file. If the dossier contains a file with the same name, it will be overwritten. Supported file types are PDF documents, Microsoft Office documents, and CSV files. Microsoft office files (file extensions `docx`, `xlsx`, or `pptx`) will be converted into PDF documents. Please note that the generated PDF might look slightly different to the original as the system does not necessarily have all fonts. However, it will generate an output on best effort to stay as close to the original as possible. CSV files are used to support a bulk annotation of file attributes. If the dossier is configured in a way to map specific fields of the CSV to file attributes and the CSV matches the mapped structure, the system will process the file or ignore it otherwise.", - "operationId": "upload", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier to where the file is to be uploaded." - }, - { - "name": "keepManualChanges", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to keep manual changes: Manual changes are manually added annotations or manipulations on existing ones. If set to `true` the system keeps the manual changes on re-uploading (overwriting) the file." - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file" - ], - "type": "object", - "properties": { - "file": { - "$ref": "#/components/schemas/MultipartFile" - } - } - } - } - } - }, - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "201": { - "description": "File upload succeeded. Return the fileId of the uploaded file.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileUploadResult" - } - } - } - } - } - }, - "get": { - "tags": [ - "file-controller" - ], - "summary": "Gets the status for all files of a specific dossier.", - "description": "The status contains information like ... By default, only the status of active files is returned. There are several parameters that can be combined to change the response scope.", - "operationId": "getDossierStatus", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier containing the file of which the status is requested." - }, - { - "name": "includeActive", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true - }, - "description": "A Toggle to include active files: If `true` (default) the response contains the status of files that are active, i.e. they are not soft-deleted." - }, - { - "name": "includeArchived", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to include files of archived dossiers: If `true` the response contains the status of files that belong to an archived dossier. Set to `false` if you expect a `404 Not found` if the dossier is archived." - }, - { - "name": "includeSoftDeleted", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to include soft-deleted dossiers and files: If `true` the response contains the status of files that have been soft-deleted, i.e. the files can still be restored." - } - ], - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/FileStatusList" - } - } - } - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}": { - "get": { - "tags": [ - "status-controller" - ], - "summary": "Gets the status of a single file.", - "description": "TODO", - "operationId": "getFileStatus", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier that contains the file." - }, - { - "name": "fileId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the file of which the status is requested." - }, - { - "name": "includeSoftDeleted", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to return the status of soft-deleted files: If `true` the response contains the status of files that have been soft-deleted, i.e. the files can still be restored. Otherwise the response would be a `404 Not found` error if the requested file has been soft-deleted or permanently deleted." - } - ], - "responses": { - "404": { - "description": "Not found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileStatus" - } - } - } - } - } - }, - "delete": { - "tags": [ - "file-management-controller" - ], - "summary": "Deletes a specific file.", - "description": "When deleting a file, it gets 'soft-deleted' by default, i.e. it can be restored within retention time configured in the dossier template. There is a toggle to also permanently delete the file.", - "operationId": "deleteFile", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier that contains the file." - }, - { - "name": "fileId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the file that will be deleted." - }, - { - "name": "deletePermanently", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to permanently delete the file: If `true` the file will be deleted permanently, i.e. in contrast to a soft-delete (value is `false`) the file cannot be restored anymore. This can be applied also on previously soft-deleted files." - } - ], - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "204": { - "description": "OK" - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/delete": { - "post": { - "tags": [ - "file-management-controller" - ], - "summary": "Deletes a list of files of a specific dossier (DELETE with body payload)", - "description": "TODO", - "operationId": "deleteFiles", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier that contains the files." - }, - { - "name": "deletePermanently", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "A Toggle to permanently delete the files: If `true` the files will be deleted permanently, i.e. in contrast to a soft-delete (value is `false`) permanently deleted files cannot be restored anymore. This can be applied also on previously soft-deleted files." - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileDeleteRequest" - } - } - }, - "required": true - }, - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "204": { - "description": "OK" - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/attributes": { - "post": { - "tags": [ - "file-attributes-controller" - ], - "summary": "Set file attributes of an existing file", - "description": "TODO", - "operationId": "setFileAttributes", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier that contains the file." - }, - { - "name": "fileId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the file of which the file attributes are set." - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileAttributes" - } - } - }, - "required": true - }, - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK" - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/components": { - "get": { - "tags": [ - "component-controller" - ], - "summary": "Returns the component for a file", - "description": "TODO", - "operationId": "getComponents", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier that contains the file." - }, - { - "name": "fileId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the file of which the file attributes are set." - }, - { - "name": "includeDetails", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "TODO" - } - ], - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileComponents" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/FileComponents" - } - } - } - } - } - } - }, - "/api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/get-components": { - "get": { - "tags": [ - "component-controller" - ], - "summary": "Returns the RSS response for all files of a dossier", - "description": "TODO", - "operationId": "getComponentsOfDossier", - "parameters": [ - { - "name": "dossierTemplateId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier template that is used for the dossier." - }, - { - "name": "dossierId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the dossier that contains the file." - }, - { - "name": "fileId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "The identifier of the file of which the file attributes are set." - }, - { - "name": "includeDetails", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": false - }, - "description": "TODO" - } - ], - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileComponentsList" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/FileComponentsList" - } - } - } - } - } - } - }, - "/api/license/active/usage": { - "post": { - "tags": [ - "license-controller" - ], - "summary": "Creates and serves license report.", - "description": "TODO", - "operationId": "getReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseReportRequest" - } - } - }, - "required": true - }, - "responses": { - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - } - }, - "200": { - "description": "Successfully created and served a license report.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseReport" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "ErrorMessage": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time" - }, - "message": { - "type": "string" - } - } - }, - "MultipartFile": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "originalFilename": { - "type": "string" - }, - "contentType": { - "type": "string" - }, - "empty": { - "type": "boolean" - }, - "size": { - "type": "integer", - "format": "int64" - }, - "bytes": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - } - }, - "inputStream": { - "type": "object" - }, - "resource": { - "$ref": "#/components/schemas/Resource" - } - } - }, - "Resource": { - "type": "object", - "properties": { - "readable": { - "type": "boolean" - }, - "open": { - "type": "boolean" - }, - "file": { - "type": "string", - "format": "binary" - }, - "url": { - "type": "string", - "format": "url" - }, - "uri": { - "type": "string", - "format": "uri" - }, - "contentAsByteArray": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - } - }, - "filename": { - "type": "string" - }, - "description": { - "type": "string" - }, - "inputStream": { - "type": "object" - } - } - }, - "FileUploadResult": { - "type": "object", - "properties": { - "fileIds": { - "type": "array", - "description": "List of fileIds generated for uploaded file(s).", - "items": { - "type": "string", - "description": "List of fileIds generated for uploaded file(s)." - } - }, - "processedAttributes": { - "type": "array", - "description": "List processed file attributes, in case the upload contained a CSV.", - "items": { - "type": "string", - "description": "List processed file attributes, in case the upload contained a CSV." - } - }, - "processedFileIds": { - "type": "array", - "description": "List processed fileIds, in case the upload contained a CSV.", - "items": { - "type": "string", - "description": "List processed fileIds, in case the upload contained a CSV." - } - } - }, - "description": "Object containing information about a successfully uploaded file." - }, - "FileAttributes": { - "type": "object", - "properties": { - "attributeIdToValue": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "example": { - "myFileAttribute": "This is a file attribute value", - "yetAnotherFileAttribute": "This is yet another file attribute value", - "numericValuesNeedToBeStrings": "1234" - }, - "description": "Additional file attributes that can be set or imported" - }, - "FileErrorInfo": { - "type": "object", - "properties": { - "cause": { - "type": "string" - }, - "queue": { - "type": "string" - }, - "service": { - "type": "string" - }, - "timestamp": { - "type": "string", - "format": "date-time" - } - }, - "description": "The error information for the error state of the file" - }, - "FileStatusList": { - "type": "object", - "properties": { - "dossiers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileStatus" - } - } - } - }, - "FileStatus": { - "type": "object", - "properties": { - "dossierId": { - "type": "string", - "description": "The ID of the dossier the file belongs to." - }, - "dossierTemplateId": { - "type": "string", - "description": "The ID of the dossier template of the dossier the file belongs to." - }, - "dossierStatusId": { - "type": "string", - "description": "The ID of the dossier status of the dossier the file belongs to." - }, - "fileId": { - "type": "string", - "description": "The ID of the file." - }, - "filename": { - "type": "string", - "description": "The file's name." - }, - "dossierArchived": { - "type": "boolean", - "description": "Tells if the dossier of this file is archived or not." - }, - "processingStatus": { - "type": "string", - "description": "The processing status of a file", - "enum": [ - "ANALYSE", - "ERROR", - "FULLREPROCESS", - "IMAGE_ANALYZING", - "INDEXING", - "NER_ANALYZING", - "OCR_PROCESSING_QUEUED", - "OCR_PROCESSING", - "PROCESSED", - "PROCESSING", - "REPROCESS", - "UNPROCESSED", - "FULL_PROCESSING", - "PRE_PROCESSING_QUEUED", - "PRE_PROCESSING", - "PRE_PROCESSED", - "FIGURE_DETECTION_ANALYZING", - "TABLE_PARSING_ANALYZING" - ] - }, - "workflowStatus": { - "type": "string", - "description": "The workflow status of a file", - "enum": [ - "NEW", - "UNDER_REVIEW", - "UNDER_APPROVAL", - "APPROVED" - ] - }, - "numberOfPages": { - "type": "integer", - "description": "The number of pages of the file.", - "format": "int32" - }, - "added": { - "type": "string", - "description": "Date and time when the file was added to the system.", - "format": "date-time" - }, - "lastUpdated": { - "type": "string", - "description": "Date and time when the file was last updated.", - "format": "date-time" - }, - "numberOfAnalyses": { - "type": "integer", - "description": "The number of times the file has been analyzed.", - "format": "int32" - }, - "assignee": { - "type": "string", - "description": "The current assignee's (if any) user id." - }, - "lastReviewer": { - "type": "string", - "description": "The last reviewer's (if any) user id." - }, - "lastApprover": { - "type": "string", - "description": "The last approvers's (if any) user id." - }, - "hasRedactions": { - "type": "boolean", - "description": "Shows if any redactions were found during the analysis." - }, - "hasHints": { - "type": "boolean", - "description": "Shows if any hints were found during the analysis." - }, - "hasRequests": { - "type": "boolean", - "description": "Shows if any requests were found during the analysis." - }, - "hasUpdates": { - "type": "boolean", - "description": "Shows if there is any change between the previous and current analysis." - }, - "hasImages": { - "type": "boolean", - "description": "Shows if any images were found during the analysis." - }, - "ocrStartTime": { - "type": "string", - "description": "Shows if this file has been OCRed by us. Start time of OCR Process", - "format": "date-time" - }, - "numberOfPagesToOCR": { - "type": "integer", - "description": "Number of pages to be OCRed by us", - "format": "int32" - }, - "numberOfOCRedPages": { - "type": "integer", - "description": "Number of pages already OCRed by us", - "format": "int32" - }, - "ocrEndTime": { - "type": "string", - "description": "Shows if this file has been OCRed by us. End time of OCR Process", - "format": "date-time" - }, - "hasAnnotationComments": { - "type": "boolean", - "description": "Shows if this file has comments on annotations." - }, - "uploader": { - "type": "string", - "description": "The ID of the user who uploaded the file." - }, - "dictionaryVersion": { - "type": "integer", - "description": "Shows which dictionary versions was used during the analysis.", - "format": "int64" - }, - "rulesVersion": { - "type": "integer", - "description": "Shows which rules versions was used during the analysis.", - "format": "int64" - }, - "legalBasisVersion": { - "type": "integer", - "description": "Shows which legal basis versions was used during the analysis.", - "format": "int64" - }, - "excluded": { - "type": "boolean", - "description": "Shows if the file was excluded from analysis." - }, - "lastProcessed": { - "type": "string", - "description": "Shows the last date of a successful analysis.", - "format": "date-time" - }, - "lastLayoutProcessed": { - "type": "string", - "description": "Shows the last date of a layout parsing.", - "format": "date-time" - }, - "approvalDate": { - "type": "string", - "description": "Shows the date of approval, if approved.", - "format": "date-time" - }, - "lastUploaded": { - "type": "string", - "description": "Shows last date the document was uploaded.", - "format": "date-time" - }, - "analysisDuration": { - "type": "integer", - "description": "Shows how long the last analysis took", - "format": "int64" - }, - "fileAttributes": { - "$ref": "#/components/schemas/FileAttributes" - }, - "dossierDictionaryVersion": { - "type": "integer", - "description": "Shows which dossier dictionary versions was used during the analysis.", - "format": "int64" - }, - "analysisRequired": { - "type": "boolean", - "description": "Shows if the file requires reanalysis." - }, - "excludedPages": { - "uniqueItems": true, - "type": "array", - "description": "Set of excluded pages for this file.", - "items": { - "type": "integer", - "description": "Set of excluded pages for this file.", - "format": "int32" - } - }, - "softDeletedTime": { - "type": "string", - "description": "Shows if the file is soft deleted.", - "format": "date-time" - }, - "lastFileAttributeChange": { - "type": "string", - "description": "Date and time when the files attributes was last updated.", - "format": "date-time" - }, - "hasSuggestions": { - "type": "boolean", - "description": "Shows if there are any Suggestions in this file." - }, - "excludedFromAutomaticAnalysis": { - "type": "boolean", - "description": "Shows if the file is excluded from automatic analysis." - }, - "redactionModificationDate": { - "type": "string", - "description": "Shows the last redaction modification date of this file.", - "format": "date-time" - }, - "fileManipulationDate": { - "type": "string", - "description": "Shows the date of the last manipulation of this file.", - "format": "date-time" - }, - "lastManualChangeDate": { - "type": "string", - "description": "Shows the date of the last manual change of an annotation of this file.", - "format": "date-time" - }, - "hasHighlights": { - "type": "boolean", - "description": "Shows if there are highlights to remove or convert for this file." - }, - "fileSize": { - "type": "integer", - "description": "Size of the optimized, internally stored file.", - "format": "int64" - }, - "analysisVersion": { - "type": "integer", - "description": "Analysis Version.", - "format": "int32" - }, - "lastIndexed": { - "type": "string", - "description": "Last time the file was indexed in ES.", - "format": "date-time" - }, - "fileErrorInfo": { - "$ref": "#/components/schemas/FileErrorInfo" - }, - "lastOCRTime": { - "type": "string", - "description": "Shows if this file has been OCRed by us. Last Time of OCR.", - "format": "date-time" - }, - "id": { - "type": "string" - } - }, - "description": "Object containing information on a specific file." - }, - "FileDeleteRequest": { - "type": "object", - "properties": { - "fileIds": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "LicenseReportRequest": { - "type": "object", - "properties": { - "startDate": { - "type": "string", - "format": "date-time" - }, - "endDate": { - "type": "string", - "format": "date-time" - } - } - }, - "LicenseReport": { - "type": "object", - "properties": { - "totalFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "activeFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "trashFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "archivedFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "numberOfAnalyzedFiles": { - "type": "integer", - "format": "int32" - }, - "numberOfOcrFiles": { - "type": "integer", - "format": "int32" - }, - "numberOfDossiers": { - "type": "integer", - "format": "int32" - }, - "numberOfAnalyzedPages": { - "type": "integer", - "format": "int32" - }, - "analysedFilesBytes": { - "type": "integer", - "format": "int64" - }, - "numberOfOcrPages": { - "type": "integer", - "format": "int32" - }, - "startDate": { - "type": "string", - "format": "date-time" - }, - "endDate": { - "type": "string", - "format": "date-time" - }, - "monthlyData": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MonthlyReportData" - } - } - } - }, - "MonthlyReportData": { - "type": "object", - "properties": { - "startDate": { - "type": "string", - "format": "date-time" - }, - "endDate": { - "type": "string", - "format": "date-time" - }, - "totalFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "activeFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "trashFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "archivedFilesUploadedBytes": { - "type": "integer", - "format": "int64" - }, - "numberOfAnalyzedPages": { - "type": "integer", - "format": "int32" - }, - "analysedFilesBytes": { - "type": "integer", - "format": "int64" - }, - "numberOfOcrPages": { - "type": "integer", - "format": "int32" - } - } - }, - "DossierRequest": { - "type": "object", - "properties": { - "dossierId": { - "type": "string", - "description": "The id of the dossier, can be null for create requests." - }, - "dossierName": { - "type": "string", - "description": "The name of the dossier. Must be unique." - }, - "description": { - "type": "string", - "description": "The dossier's description (optional)." - }, - "dueDate": { - "type": "string", - "description": "The date when the dossier is due.", - "format": "date-time" - }, - "ownerId": { - "type": "string", - "description": "The id of the owning user." - }, - "memberIds": { - "uniqueItems": true, - "type": "array", - "description": "The id(s) of members associated to this dossier.", - "items": { - "type": "string", - "description": "The id(s) of members associated to this dossier." - } - }, - "approverIds": { - "uniqueItems": true, - "type": "array", - "description": "The id(s) of approvers associated to this dossier.", - "items": { - "type": "string", - "description": "The id(s) of approvers associated to this dossier." - } - }, - "downloadFileTypes": { - "uniqueItems": true, - "type": "array", - "description": "Download File Types for this dossiers submission package.", - "items": { - "type": "string", - "description": "Download File Types for this dossiers submission package.", - "enum": [ - "ORIGINAL", - "PREVIEW", - "REDACTED", - "ANNOTATED", - "FLATTEN", - "DELTA_PREVIEW" - ] - } - }, - "reportTemplateIds": { - "uniqueItems": true, - "type": "array", - "description": "Id(s) of the word report templates used to generate downloads", - "items": { - "type": "string", - "description": "Id(s) of the word report templates used to generate downloads" - } - }, - "watermarkId": { - "type": "integer", - "description": "The watermark id to be applied to the redacted files.", - "format": "int64" - }, - "previewWatermarkId": { - "type": "integer", - "description": "The preview watermark id that will be applied to the previewed files.", - "format": "int64" - }, - "dossierStatusId": { - "type": "string", - "description": "The dossierStatusId for this dossier. can be null for update request." - } - }, - "description": "Object containing information about a dossier." - }, - "DossierList": { - "type": "object", - "properties": { - "dossiers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Dossier" - } - } - } - }, - "Dossier": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "dossierName": { - "type": "string" - }, - "date": { - "type": "string", - "format": "date-time" - }, - "description": { - "type": "string" - }, - "ownerId": { - "type": "string" - }, - "memberIds": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "approverIds": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "downloadFileTypes": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string", - "enum": [ - "ORIGINAL", - "PREVIEW", - "REDACTED", - "ANNOTATED", - "FLATTEN", - "DELTA_PREVIEW" - ] - } - }, - "reportTemplateIds": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "watermarkId": { - "type": "integer", - "format": "int64" - }, - "previewWatermarkId": { - "type": "integer", - "format": "int64" - }, - "softDeletedTime": { - "type": "string", - "format": "date-time" - }, - "hardDeletedTime": { - "type": "string", - "format": "date-time" - }, - "startDate": { - "type": "string", - "format": "date-time" - }, - "dueDate": { - "type": "string", - "format": "date-time" - }, - "archivedTime": { - "type": "string", - "format": "date-time" - }, - "dossierTemplateId": { - "type": "string" - }, - "dossierStatusId": { - "type": "string" - }, - "visibility": { - "type": "string", - "enum": [ - "PRIVATE", - "PUBLIC" - ] - }, - "dossierId": { - "type": "string" - } - } - }, - "DossierTemplateList": { - "type": "object", - "properties": { - "dossierTemplates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DossierTemplate" - } - } - } - }, - "DossierTemplate": { - "type": "object", - "properties": { - "dossierTemplateId": { - "type": "string", - "description": "The Rule Set Id. Generated by the system on create." - }, - "name": { - "type": "string", - "description": "The name of this dossierTemplate. Must be set on create / update requests" - }, - "description": { - "type": "string", - "description": "The description of this dossierTemplate" - }, - "dateAdded": { - "type": "string", - "description": "The date when this dossierTemplate was created. Set by System on create.", - "format": "date-time" - }, - "dateModified": { - "type": "string", - "description": "The date when this dossierTemplate was last modified. Set by System on create.", - "format": "date-time" - }, - "createdBy": { - "type": "string", - "description": "The userId of the user who created this DossierTemplate. Set by the system." - }, - "modifiedBy": { - "type": "string", - "description": "The userId of the user who last modified this DossierTemplate. Set by the system." - }, - "validFrom": { - "type": "string", - "description": "Validity of start this dossierTemplate.", - "format": "date-time" - }, - "validTo": { - "type": "string", - "description": "Validity of end this dossierTemplate.", - "format": "date-time" - }, - "downloadFileTypes": { - "uniqueItems": true, - "type": "array", - "description": "Download File Types for this dossierTemplate's dossiers submission package.", - "items": { - "type": "string", - "description": "Download File Types for this dossierTemplate's dossiers submission package. For RedactManager the values `ORIGINAL`, `PREVIEW`, `REDACTED`, and `DELTA_PREVIEW` are valid. For DocuMine, only `ORIGINAL` can be used.", - "enum": [ - "ORIGINAL", - "PREVIEW", - "REDACTED", - "DELTA_PREVIEW" - ] - } - }, - "dossierTemplateStatus": { - "type": "string", - "description": "Status of dossier template.", - "enum": [ - "INCOMPLETE", - "INACTIVE", - "ACTIVE" - ] - }, - "keepImageMetadata": { - "type": "boolean", - "description": "Representing the setting if the metadata of images in pdfs should get kept, or removed" - }, - "keepHiddenText": { - "type": "boolean", - "description": "Representing the setting if the hidden text in pdfs should get kept, or removed" - }, - "keepOverlappingObjects": { - "type": "boolean", - "description": "Representing the setting if the overlapping objects in pdfs should get kept or removed by flattening the pages" - }, - "applyDictionaryUpdatesToAllDossiersByDefault": { - "type": "boolean", - "description": "Representing the setting if dictionary updates is applied to all dossiers" - }, - "ocrByDefault": { - "type": "boolean", - "description": "Flag that specifies if OCR is automatically performed on upload for all dossiers of this template" - }, - "removeWatermark": { - "type": "boolean", - "description": "Flag that specifies the watermark removal in documents will be performed before the OCR processing" - }, - "id": { - "type": "string" - } - } - }, - "FileComponents": { - "type": "object", - "properties": { - "dossierTemplateId": { - "type": "string", - "format": "uuid" - }, - "dossierId": { - "type": "string", - "format": "uuid" - }, - "fileId": { - "type": "string", - "format": "uuid" - }, - "filename": { - "type": "string" - }, - "components": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "componentDetails": { - "type": "object", - "nullable": true, - "additionalProperties": { - "$ref": "#/components/schemas/Component" - } - } - } - }, - "FileComponentsList": { - "type": "object", - "properties": { - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FileComponents" - } - } - } - }, - "Component": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "values": { - "type": "array", - "items": { - "type": "string" - } - }, - "originalValues": { - "type": "array", - "items": { - "type": "string" - } - }, - "entityReferences": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Entity" - } - }, - "componentRule": { - "type": "string" - } - } - }, - "Entity": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "value": { - "type": "string" - }, - "entityRule": { - "type": "string" - }, - "pages": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - } - }, - "securitySchemes": { - "FF-OAUTH": { - "type": "oauth2", - "flows": { - "authorizationCode": { - "authorizationUrl": "/auth/realms/redaction/protocol/openid-connect/auth", - "tokenUrl": "/auth/realms/redaction/protocol/openid-connect/token", - "scopes": {} - } - } - } - } - } -} \ No newline at end of file diff --git a/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.yaml b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.yaml new file mode 100644 index 000000000..a4b42ba64 --- /dev/null +++ b/persistence-service-v1/persistence-service-external-api-v2/src/main/resources/api/openapi.yaml @@ -0,0 +1,2388 @@ +openapi: 3.0.2 +info: + title: DocuMine API + version: "1.0.0" + description: | + The DocuMine API provides a comprehensive solution for managing resources such as dossiers and their associated files. + Users can also retrieve components of files that have been processed and extracted by the system. + + Given that DocuMine supports multi-tenancy, it is essential to include the 'X-Tenant-ID' header with every request. + This tenant ID is referred to as the "Workspace ID" within the application. + + All endpoints are secured using OAuth2, with the "authorizationCode" being the supported authorization flow. + Obtain a JWT token for authentication and send it in the 'Authorization' header with the format `Bearer {JWT_TOKEN}`. + + Example Headers: + ```properties + X-Tenant-ID: my-workspace + Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI... + ``` + license: + name: knecon License + contact: + name: knecon Service Desk + email: support@documine.ai + url: https://support.documine.ai +externalDocs: + description: Find out more about DocuMine + url: https://docs.documine.ai +servers: + - url: https://app.documine.ai + description: DocuMine Cloud Service +security: + - FF-OAUTH: [ ] +tags: + - name: 1. Dossier Templates + description: Operations related to dossier templates. + - name: 2. Dossiers + description: Operations for managing dossiers that are based on a dossier template. + - name: 3. Files + description: Operations for managing files within a dossier. + - name: 4. Components + description: Operations related to components of a file within a dossier. + - name: 5. License + description: Operations related to license information and usage metrics. +paths: + /api/dossier-templates: + get: + operationId: getAllDossierTemplates + tags: + - 1. Dossier Templates + summary: Retrieve a list of all available dossier templates. + description: | + This endpoint provides a list of all dossier templates stored in the system. + + It returns an object containing an array of dossier template objects under the key `dossierTemplates`. + Each template object contains an identifier, a name, a dossier template status, and other fields with + further details about the template. + + Use this endpoint to fetch all templates before performing actions on specific ones. + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/DossierTemplateList' + description: | + Successfully retrieved the list of dossier templates. + + The response could be an empty list if there are no dossier templates at all. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}: + get: + operationId: getDossierTemplate + tags: + - 1. Dossier Templates + summary: Retrieve a specific dossier template by its identifier. + description: | + Utilize this endpoint to retrieve comprehensive details about a designated dossier template. The response encompasses + various attributes such as the dossier template's identifier, name, status, among other pertinent details. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DossierTemplate' + description: | + Successfully retrieved the requested dossier template. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier-template' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers: + get: + operationId: getDossiers + tags: + - 2. Dossiers + summary: Retrieve a list of dossiers based on a specific dossier template. + description: | + By default, this endpoint provides a list of all *active* dossiers that are based on a specific dossier template. + + It returns an object containing an array of dossier objects under the key `dossiers`. Each dossier object contains + an identifier, a name, a description, an owner, and other fields with further details about the dossier. + + Use this endpoint to fetch the required dossiers before performing actions on specific ones. Use the query parameters + to modify the response. E.g., set the `includeArchivedDossiers` parameter to `true` so that the response also contains + *archived* dossiers. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/includeActiveDossiers' + - $ref: '#/components/parameters/includeArchivedDossiers' + - $ref: '#/components/parameters/includeSoftDeletedDossiers' + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/DossierList' + description: | + Successfully retrieved the dossiers that are based on the requested dossier template. + + The response could be an empty + list if there are no *active* dossiers based on it. If query parameters have been set, an empty list will be returned if + no dossier matches the respective combination. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier-template' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + post: + operationId: createOrUpdateDossier + tags: + - 2. Dossiers + summary: Creates or updates a dossier for a specific dossier template. + description: | + This endpoint is meant to create a new dossier or to update an existing one. + + To create a new dossier, do not set the identifier of the dossier object provided in the request body. + + To update an existing dossier, the set identifier needs to be valid. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DossierRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Dossier' + description: | + Successfully saved the dossier. + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Dossier' + description: | + successfully created the dossier. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "409": + $ref: '#/components/responses/409-dossier-conflict' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}: + delete: + operationId: deleteDossier + tags: + - 2. Dossiers + summary: Deletes a specific dossier by its identifier. + description: | + Removes a dossier either in a recoverable manner (soft-delete) or permanently. By default, a soft-deleted dossier + remains recoverable for a retention period determined by application settings. The default retention period is + 96 hours (4 days) but may vary based on configuration. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/permanentlyDeleteDossier' + responses: + "204": + description: | + Dossier deletion successful. Note that the absence of the dossier with the given `dossierId` is confirmed, + regardless of whether it was pre-existing, already removed, or never present. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier-template' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + get: + operationId: getDossier + tags: + - 2. Dossiers + summary: Retrieve a specific dossier by its identifier. + description: | + Utilize this endpoint to retrieve comprehensive details about a designated dossier. The response encompasses various + attributes such as the dossier's unique ID, name, description, associated owner, among other pertinent details. + + If the dossier has been soft-deleted but not yet permanently deleted, the `includeSoftDeleted` parameter can be utilized + to get it. Without this, a soft-deleted dossier would return a `404 Dossier not found` error. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/includeSoftDeletedDossier' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Dossier' + description: | + Successfully retrieved the requested dossier. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files: + get: + operationId: getDossierStatus + tags: + - 3. Files + summary: Retrieves the status of the files of a specific dossier. + description: | + This endpoint provides status information for each file within a designated dossier. + + The file status encompasses attributes such as identifier, file name, number of pages, file size, + processing and workflow status, among other pertinent details. By default, only active files + are fetched. However, various parameters can be combined to adjust the scope of the response. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/includeActiveFiles' + - $ref: '#/components/parameters/includeArchivedFiles' + - $ref: '#/components/parameters/includeSoftDeletedFiles' + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/FileStatusList' + description: | + Successfully retrieved file status information. + + The response could be an empty list if the dossier contains no *active* files. If query parameters + have been set, an empty list will be returned if no file matches the respective combination. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + post: + operationId: upload + tags: + - 3. Files + summary: Upload a file and associate it with a specific dossier. + description: | + This endpoint facilitates the upload of files to a specific dossier. + + Upon successful upload, the system returns the unique identifier of the uploaded file. In cases where the dossier already + contains a file with the same name, the new file will replace the existing one. + + Supported file formats include PDF documents, Microsoft Office documents (if supported by your license), CSV files, and + ZIP archives. + + Notably, Microsoft office files (file extensions `docx`, `xlsx`, or `pptx`) are automatically converted into PDF format + upon upload. Be aware that due to potential font discrepancies, the resulting PDF may slightly differ in appearance from + the original. Nevertheless, our system ensures maximum fidelity to the original content. + + CSV files offer support for bulk importing of file attributes. If the dossier is set up to map specific CSV fields to + file attributes and the uploaded CSV aligns with this mapping, the system will process the CSV accordingly. Mismatched + CSVs will be disregarded. For successfully processed CSV files, the response contains information about the file attributes + and the annotated files. + + ZIP archives offer support to upload multiple files at once. In case of an upload of a ZIP archive, the system returns a + list of unique identifiers of the contained files. The archive can even contain a mix of files like some PDF files and + a CSV file that will annotate some file attributes. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/keepManualChanges' + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/UploadRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/FileUploadResult' + description: | + Successfully uploaded the file. Returns an object with the unique identifier of the uploaded file, a list of unique + identifiers in case of an uploaded ZIP archive, or some annotation information in case of a successfully processing + of an uploaded CSV file. + "400": + $ref: '#/components/responses/400' + "401": + $ref: '#/components/responses/401' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "429": + $ref: '#/components/responses/429' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}: + delete: + operationId: deleteFile + tags: + - 3. Files + summary: Deletes a specific file associated with a dossier and its template. + description: | + This endpoint facilitates the removal of a file linked to a specific dossier under a dossier template. By default, the + file undergoes a soft-delete, meaning it can be restored within the retention period determined by application settings. + The default retention period is 96 hours (4 days) but may vary based on configuration. Use the `deletePermanently` query + parameter to opt for a permanent deletion, preventing any future restoration. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/permanentlyDeleteFile' + responses: + "204": + description: | + File deletion successful. This confirms the absence of the specified file, irrespective of its previous existence. + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-file' + "500": + $ref: '#/components/responses/500' + get: + operationId: getFileStatus + tags: + - 3. Files + summary: Retrieves the status of a particular file. + description: | + This endpoint is designed to fetch the status of a specific file associated to a dossier based on a dossier template. If + the file has been soft-deleted but not yet permanently deleted, the `includeSoftDeleted` parameter can be utilized to get + the status of such files. Without this, a soft-deleted file would return a `404 File not found` error. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/includeSoftDeletedFile' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FileStatus' + description: | + Successfully retrieved the status of the requested file. + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-file' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/delete: + post: + operationId: deleteFiles + tags: + - 3. Files + summary: Bulk delete specific files within a dossier. (DELETE with body payload) + description: | + This endpoint allows for the bulk deletion of specified files associated with a certain dossier. + + It provides the flexibility to perform either a soft-delete (by default) or a permanent deletion. A soft-deleted + file remains restorable within the retention period set by the application (96h by default). In contrast, permanently + deleted files are irrevocably removed and cannot be restored. + + Use this route to manage large file deletions efficiently. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/permanentlyDeleteFiles' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileDeleteRequest' + required: true + responses: + "204": + description: | + Bulk file deletion successful. + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-dossier' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/attributes: + post: + operationId: setFileAttributes + tags: + - 3. Files + summary: Update or set attributes for a specific file. + description: | + This endpoint facilitates the updating or setting of specific file attributes for a given file within a dossier. + Ensure you provide the necessary file attributes within the request body. + + Use this route to maintain or enhance file metadata and properties. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/fileId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileAttributes' + required: true + responses: + "200": + description: | + File attributes successfully updated. + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-file' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/{fileId}/components: + get: + operationId: getComponents + tags: + - 4. Components + summary: Fetch the components associated with a specific file. + description: | + This endpoint retrieves the derived and extracted components from a given file within a dossier. Components represent + various aspects, metadata or content of the file. Entity and component rules define these components based on the file's + content. They can give a *structured view* on a document's text. + + To include detailed component information, set the `includeDetails` query parameter to `true`. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/includeComponentDetails' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FileComponents' + application/xml: + schema: + $ref: '#/components/schemas/FileComponents' + description: | + Successfully retrieved file components. + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "404": + $ref: '#/components/responses/404-file' + "500": + $ref: '#/components/responses/500' + /api/dossier-templates/{dossierTemplateId}/dossiers/{dossierId}/files/bulk/get-components: + get: + operationId: getComponentsOfDossier + tags: + - 4. Components + summary: Returns the RSS response for all files of a dossier + description: | + This endpoint fetches components for all files associated with a specified dossier. Like individual file components, + these represent various aspects, metadata or content of the files. Entity and component rules define these components based on the file's + content. They can give a *structured view* on a document's text. + + To include detailed component information, set the `includeDetails` query parameter to `true`. + parameters: + - $ref: '#/components/parameters/dossierTemplateId' + - $ref: '#/components/parameters/dossierId' + - $ref: '#/components/parameters/fileId' + - $ref: '#/components/parameters/includeComponentDetails' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/FileComponentsList' + application/xml: + schema: + $ref: '#/components/schemas/FileComponentsList' + description: | + Successfully fetched components for all files in the dossier. + "404": + $ref: '#/components/responses/404-dossier' + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "500": + $ref: '#/components/responses/500' + /api/license/active/usage: + post: + operationId: getReport + tags: + - 5. License + summary: Generate and retrieve a license usage report. + description: | + This endpoint enables users to create and fetch a report detailing the active usage of licenses. The report contains + valuable insights and metrics that can aid in monitoring and managing license consumption. Ensure your request body + contains the necessary parameters for generating this report. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LicenseReportRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LicenseReport' + description: | + License report successfully generated and retrieved. + "400": + $ref: '#/components/responses/400' + "403": + $ref: '#/components/responses/403' + "500": + $ref: '#/components/responses/500' +components: + headers: + X-Tenant-ID: + description: Tenant identifier, also known as the *Workspace ID* in the application. + required: true + schema: + type: string + example: 'my-workspace' + Authorization: + description: JWT token for authorization. Format should be `Bearer {JWT_TOKEN}`. + required: true + schema: + type: string + example: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI...' + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + The request was malformed or invalid. Double-check the request structure or parameters. + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Unauthorized access. You must provide valid authentication credentials to access this + resource. This error can happen if the access token was revoked or has expired. + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Forbidden. Your credentials are valid, but you do not have permission to access this resource. + "404-dossier-template": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Dossier template not found. This happens if the requested dossier template does not exist. + "404-dossier": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Dossier not found. This happens if the dossier template or the dossier is deleted or did never exist. + + Some endpoints support a `includeSoftDeleted` parameter: If this is set to `true`, this response is returned + for a previously existing dossier only if it is actually deleted permanently. + "404-file": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + File not found. This indicates that the dossier, dossier template, or file is deleted or did never exist. + + Some endpoints support a `includeSoftDeleted` parameter: If this is set to `true`, this response is returned + only if the file is deleted permanently. + "409-dossier-conflict": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Name conflict: The provided name is already in use by another dossier. It needs to be unique in the scope of your workspace. + "429": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: | + Too many requests have been made in a given time frame. Rate limiting is in place to prevent abuse. + "500": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorMessage' + description: Internal Server Error. An unexpected error occurred on the server side. Please try again later or contact support. + parameters: + dossierTemplateId: + name: dossierTemplateId + in: path + required: true + schema: + type: string + style: simple + explode: false + description: The identifier of a dossier template + dossierId: + name: dossierId + in: path + required: true + schema: + type: string + style: simple + explode: false + description: The identifier of a dossier + fileId: + name: fileId + in: path + required: true + schema: + type: string + style: simple + explode: false + description: The identifier of a file + includeActiveDossiers: + name: includeActive + in: query + required: false + schema: + default: true + type: boolean + style: form + explode: true + description: | + A toggle to include or exclude active dossiers: If `true` (default), dossiers + that are neither archived nor soft-deleted are included. If `false`, they are + ignored. + includeActiveFiles: + name: includeActive + in: query + required: false + schema: + default: true + type: boolean + style: form + explode: true + description: | + A toggle to include or exclude active files: If set to `true` (default), files + that neither belong to an archived dossier nor have been soft-deleted are + included. If set to `false`, they are ignored. + includeArchivedDossiers: + name: includeArchived + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to include or exclude archived dossiers: If set to `true`, archived + dossiers are included. If set to `false` (default), they are ignored. + includeArchivedFiles: + name: includeArchived + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to include or exclude archived files (i.e., files of archived dossiers): + If set to `true`, files of archived dossiers are included. If set to `false` + (default), they are ignored. + includeSoftDeletedDossiers: + name: includeSoftDeleted + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to include soft-deleted dossiers: + - `true`: The response will include soft-deleted dossiers. + - `false` (default): Soft-deleted dossiers are ignored and will not be part of the response. + + Soft-deleted means that the dossier has not been deleted permanently. + includeSoftDeletedDossier: + name: includeSoftDeleted + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A Toggle to return a soft-deleted dossier: + - `true`: The system returns the dossier regardless whether it has been soft-deleted or not. + - `false` (default): The system returns only non-deleted dossiers. It would return a `404 Dossier not found` error + if the requested dossier has been soft-deleted. + + Soft-deleted means that the dossier has not been deleted permanently. + includeSoftDeletedFiles: + name: includeSoftDeleted + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to include soft-deleted files: + - `true`: The response will include soft-deleted files. + - `false` (default): Soft-deleted files are ignored and will not be part of the response. + + Soft-deleted means that the file or dossier of the file has not been deleted permanently. + includeSoftDeletedFile: + name: includeSoftDeleted + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A Toggle to return the status of soft-deleted files: + - `true`: The system returns the status of the file regardless whether it has been soft-deleted or not. + - `false` (default): The system returns only non-deleted files. It would return a `404 File not found` error + if the requested file has been soft-deleted. + + Soft-deleted means that the file or dossier of the file has not been deleted permanently. + permanentlyDeleteDossier: + name: deletePermanently + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to determine the deletion mode for a dossier: + - `true`: The dossier will be permanently deleted and can't be restored. + - `false` (default): Soft-delete, allowing restoration within the application-configured retention period. + + Using this parameter, you can also permanently delete a previously soft-deleted dossier during its retention period. + + Note: Deleting a dossier also deletes all associated files. + permanentlyDeleteFile: + name: deletePermanently + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + Determines the deletion mode for a file. + - `true`: The file will be permanently deleted and can't be restored. + - `false` (default): Soft-delete, allowing restoration within the retention period, provided its parent dossier + hasn't been deleted. If the parent dossier has been deleted meanwhile, it needs to be restored first. + + Using this parameter, you can also permanently delete a previously soft-deleted file during its retention period. + permanentlyDeleteFiles: + name: deletePermanently + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + Determines the deletion mode for a list of files: + - `true`: The files will be permanently deleted and can't be restored. + - `false` (default): Soft-delete, allowing restoration within the retention period, provided the files' parent dossier + hasn't been deleted. If the parent dossier has been deleted meanwhile, it needs to be restored first. + + Using this parameter, you can also permanently delete a previously soft-deleted files during their retention period. + keepManualChanges: + name: keepManualChanges + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to keep manual changes, i.e., to preserve manually added annotations or manipulations on existing ones when + overwriting a file: + - `true`: The system keeps the manual changes on re-uploading (overwriting) the file. + - `false` (default): Manual changes get discarded on re-uploading the file. + includeComponentDetails: + name: includeDetails + in: query + required: false + schema: + default: false + type: boolean + style: form + explode: true + description: | + A toggle to decide whether to include detailed component information in the response: + - `true`: The component object's field `componentDetails` stores detailed information about the *source* of its + respective value(s). + - `false` (default): The component object does not contain a field `componentDetails`. + schemas: + EntityReference: + type: object + description: | + Represents a reference to an entity object discovered in a document. Together with the unique identifier + of the entity, the reference contains some basic details of the entity. + properties: + id: + type: string + description: | + The unique identifier for the entity. + + Note: In general, it is a valid UUID. Only if an entity spans over multiple pages, it is split on page breaks. Each + part becomes an own entity object and the first one keeps the UUID while the following get an additional suffix. + + Example: Even is `bcd22239-c3df-442f-a5a1-1664cba94dc6_2` is not a valid UUID it is still a valid identifier for an + entity object. + entityRuleId: + type: string + description: An identifier that represents a specific rule associated with the entity. + type: + type: string + description: The name of the entity. + page: + type: integer + format: int32 + description: The page number in the document where the entity is located. + example: + id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + Component: + type: object + description: Represents a component with its associated values. + properties: + name: + type: string + description: The name of the component. + componentValues: + type: array + description: A list of value objects associated with the component. + items: + $ref: '#/components/schemas/ComponentValue' + example: + name: the component name + componentValues: + - value: my overwritten component value + originalValue: the original value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: bcd22239-c3df-442f-a5a1-1664cba94dc6_2 + entityRuleId: ABC.0.0 + type: entity_type + page: 124 + - id: b748b89a-5679-4254-9286-1dd652d9970b + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + - value: yet another component value + originalValue: yet another component value + componentRuleId: COM.0.1 + valueDescription: Another value description + entityReferences: + - id: 70496456-a016-4679-81b1-6c8856dded6e + entityRuleId: XYZ.0.0 + type: yet_another_entity_type + page: 123 + ComponentValue: + type: object + description: Describes a value associated with a component, including its origin and related entities found in the document. + properties: + value: + type: string + description: The current value of the component. + originalValue: + type: string + description: The original value before any modifications. + componentRuleId: + type: string + description: Identifier for the rule associated with this component value. + valueDescription: + type: string + description: A brief description of the value. + entityReferences: + items: + $ref: '#/components/schemas/EntityReference' + type: array + example: + value: my overwritten component value + originalValue: the original value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: b748b89a-5679-4254-9286-1dd652d9970b + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + FileComponents: + type: object + description: Represents file details along with its associated components and values. + properties: + dossierTemplateId: + format: uuid + type: string + description: Identifier for the template associated with the dossier. + dossierId: + format: uuid + type: string + description: Identifier for the dossier. + fileId: + type: string + description: Identifier for the file. + filename: + type: string + description: Name of the file. + components: + type: object + description: A map of component names to their list of values. + additionalProperties: + items: + type: string + type: array + componentDetails: + type: object + description: A map of component names to their detailed representations. + additionalProperties: + $ref: '#/components/schemas/Component' + example: + dossierTemplateId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dossierId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fileId: 1fdbd888b39059c8cf171df26f62f8a5 + filename: MyFile.pdf + components: + "my component": + - my overwritten component value + - yet another component value + "yet another component": + - only one value + componentDetails: + - name: my component + componentValues: + - value: my overwritten component value + originalValue: the original value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: b748b89a-5679-4254-9286-1dd652d9970b + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + - value: yet another component value + originalValue: yet another component value + componentRuleId: COM.0.1 + valueDescription: Another value description + entityReferences: + - id: 70496456-a016-4679-81b1-6c8856dded6e + entityRuleId: XYZ.0.0 + type: yet_another_entity_type + page: 123 + - name: yet another component + componentValues: + - value: only one value + originalValue: only one value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: b748b89a-5679-4254-9286-1dd652d9970b + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + FileComponentsList: + type: object + description: A list of files and their associated components. + properties: + files: + type: array + description: List of files with their component details. + items: + $ref: '#/components/schemas/FileComponents' + example: + files: + - dossierTemplateId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dossierId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fileId: 1fdbd888b39059c8cf171df26f62f8a5 + filename: MyFile.pdf + components: + "my component": + - my overwritten component value + - yet another component value + "yet another component": + - only one value + componentDetails: + - name: my component + componentValues: + - value: my overwritten component value + originalValue: the original value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: b748b89a-5679-4254-9286-1dd652d9970b + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + - value: yet another component value + originalValue: yet another component value + componentRuleId: COM.0.1 + valueDescription: Another value description + entityReferences: + - id: 70496456-a016-4679-81b1-6c8856dded6e + entityRuleId: XYZ.0.0 + type: yet_another_entity_type + page: 123 + - name: yet another component + componentValues: + - value: only one value + originalValue: only one value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: bcd22239-cedf-442f-a5a1-1664cba94dc6 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: b748b89a-5679-4254-9286-1dd652d9970b + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + - dossierTemplateId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + dossierId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + fileId: 4d2334def5fced0003888e47cbc270f7 + filename: Copy of MyFile.pdf + components: + "my component": + - my overwritten component value + - yet another component value + "yet another component": + - only one value + componentDetails: + - name: my component + componentValues: + - value: my overwritten component value + originalValue: the original value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: dadb54d4-587b-4e69-8c07-be9446a33537 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: 30339f5a-4c19-447f-b0a0-0f14c094037e + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + - value: yet another component value + originalValue: yet another component value + componentRuleId: COM.0.1 + valueDescription: Another value description + entityReferences: + - id: 086cd500-97da-44f8-8628-3324d11b4e8d + entityRuleId: XYZ.0.0 + type: yet_another_entity_type + page: 123 + - name: yet another component + componentValues: + - value: only one value + originalValue: only one value + componentRuleId: COM.0.0 + valueDescription: My value description + entityReferences: + - id: dadb54d4-587b-4e69-8c07-be9446a33537 + entityRuleId: ABC.0.0 + type: entity_type + page: 123 + - id: 30339f5a-4c19-447f-b0a0-0f14c094037e + entityRuleId: DEF.13.37 + type: another_entity_type + page: 456 + Dossier: + type: object + description: | + The `Dossier` object captures all relevant information related to a specific dossier. A dossier is a collection + of documents, managed and analyzed based on settings and rules of the `DossierTemplate` it is derived from. + properties: + id: + type: string + description: | + A unique identifier for the dossier. This ID is automatically generated by + the system upon creation and is used for referencing the dossier in API calls. + name: + type: string + description: | + User-defined name of the dossier, capturing its essence. The name needs to be unique + for the entire workspace (i.e., tenant). + date: + type: string + format: date-time + description: | + The date when the dossier was created. This is automatically set by the system upon the dossier's creation. + dossierTemplateId: + type: string + format: uuid + description: The unique identifier for the template that governs the settings and rules for this dossier. + description: + type: string + description: A detailed narrative explaining the purpose and contents of the dossier. + ownerId: + type: string + format: uuid + description: | + The identifier of the user or entity responsible for the dossier. Typically, + this is the creator or main contact point for the dossier. Only users with "Manager" + privileges can create dossiers and become dossier owners. + memberIds: + type: array + items: + type: string + format: uuid + uniqueItems: true + description: List of unique user identifiers associated with this dossier, such as contributors or viewers. + approverIds: + type: array + items: + type: string + format: uuid + uniqueItems: true + description: | + List of unique user identifiers with elevated permissions. Needed if using an approval workflow. + + The DocuMine application does not have an approval workflow. However, every member will be + elevated to a privileged member to ensure full functionality. + visibility: + type: string + enum: + - PRIVATE + - PUBLIC + description: | + Determines who can see the dossier. Possible values include: + - `PRIVATE`: Visible to dossier members only. + - `PUBLIC`: Visible to all users. + + The system sets the value based on the permissions defined in the application. + startDate: + type: string + format: date-time + description: The starting date for the lifecycle of this dossier. + dueDate: + type: string + format: date-time + description: The end date or deadline for actions related to this dossier. + dossierStatusId: + type: string + format: uuid + description: The unique identifier of the current status of the dossier. The status definitions are managed in the dossier template. + watermarkId: + type: string + format: uuid + deprecated: true + description: | + Identifier for the watermark that's to be applied on redacted documents within this dossier. + + In DocuMine, watermarks are not supported. + previewWatermarkId: + type: string + format: uuid + deprecated: true + description: | + Identifier for the watermark pattern used for generated previews documents within this dossier. + + In DocuMine, watermarks are not supported. + downloadFileTypes: + type: array + items: + enum: + - ORIGINAL + - PREVIEW + - REDACTED + - ANNOTATED + - FLATTEN + - DELTA_PREVIEW + type: string + uniqueItems: true + description: | + Types of files available for download from the dossier. These types can + differ based on the application. DocuMine only supports `ORIGINAL`. The files are + provided or generated when requesting a download package. + reportTemplateIds: + type: array + items: + type: string + format: uuid + uniqueItems: true + description: | + List of template identifiers indicating which templates are to be used for generating reports or outputs + for this dossier. The reports are generated when requesting a download package. + archivedTime: + type: string + format: date-time + description: The date and time when the dossier was archived. Archived dossiers are read-only and cannot be modified. + softDeletedTime: + type: string + format: date-time + description: | + The timestamp indicating when the dossier was softly deleted, i.e., hidden from + most users but not completely removed from the system. `null` if not deleted. + + A soft-deleted dossier can be restored within a retention period configured in the application. + hardDeletedTime: + type: string + format: date-time + description: The timestamp indicating when the dossier was permanently removed from the system. `null` if not deleted. + example: + id: 2ef05d6a-6fb3-4f27-b3c7-9a6438b38c3b + name: Project Alpha + date: 2000-01-23T04:56:07.000+00:00 + dossierTemplateId: 1ed2db85-9cd5-48b0-855f-77ca2a688501 + description: Collection of documents for Project Alpha. + ownerId: a0044ae9-ddca-4f97-b0a1-3cb2517dbf39 + memberIds: + - da8d5f98-ae61-4696-85bf-27986d93877c + - f4a0beb4-4034-4b92-a75e-5f37591326ea + approverIds: + - da8d5f98-ae61-4696-85bf-27986d93877c + - f4a0beb4-4034-4b92-a75e-5f37591326ea + visibility: PRIVATE + startDate: null + dueDate: 2001-01-23T04:56:07.000+00:00 + dossierStatusId: b8280985-f558-43c0-852a-a3fa86803548 + watermarkId: null + previewWatermarkId: null + downloadFileTypes: + - ORIGINAL + - PREVIEW + reportTemplateIds: + - daadea5f-917b-482a-b7d2-e65afe8f80ca + - 8130acf6-4910-4123-827c-caacd8111402 + archivedTime: null + softDeletedTime: null + hardDeletedTime: null + DossierList: + type: object + description: A list of dossiers. + properties: + dossiers: + items: + $ref: '#/components/schemas/Dossier' + type: array + example: + dossiers: + - id: 2ef05d6a-6fb3-4f27-b3c7-9a6438b38c3b + name: Project Alpha + date: 2000-01-23T04:56:07.000+00:00 + dossierTemplateId: 1ed2db85-9cd5-48b0-855f-77ca2a688501 + description: Collection of documents for Project Alpha. + ownerId: a0044ae9-ddca-4f97-b0a1-3cb2517dbf39 + memberIds: + - da8d5f98-ae61-4696-85bf-27986d93877c + - f4a0beb4-4034-4b92-a75e-5f37591326ea + approverIds: + - da8d5f98-ae61-4696-85bf-27986d93877c + - f4a0beb4-4034-4b92-a75e-5f37591326ea + visibility: PUBLIC + startDate: null + dueDate: 2001-01-23T04:56:07.000+00:00 + dossierStatusId: b8280985-f558-43c0-852a-a3fa86803548 + watermarkId: null + previewWatermarkId: null + downloadFileTypes: + - ORIGINAL + - PREVIEW + reportTemplateIds: + - daadea5f-917b-482a-b7d2-e65afe8f80ca + - 8130acf6-4910-4123-827c-caacd8111402 + archivedTime: null + softDeletedTime: null + hardDeletedTime: null + - id: dc28cc82-2682-4b7f-ae0b-2132b205d47a + name: Project Beta + date: 2001-01-23T04:56:07.000+00:00 + dossierTemplateId: 1ed2db85-9cd5-48b0-855f-77ca2a688501 + description: Collection of documents for Project Beta. + ownerId: 0d53a7c3-7b3a-4c57-857d-ec5e0fc3019b + memberIds: + - a0044ae9-ddca-4f97-b0a1-3cb2517dbf39 + - c2e33246-e50a-4c43-831c-6789a5637db8 + - 6123fa16-6943-4b74-8524-54b0046a0ce6 + visibility: PUBLIC + startDate: null + dueDate: 2001-01-23T04:56:07.000+00:00 + dossierStatusId: b8280985-f558-43c0-852a-a3fa86803548 + watermarkId: null + previewWatermarkId: null + downloadFileTypes: + - ORIGINAL + - PREVIEW + reportTemplateIds: + - daadea5f-917b-482a-b7d2-e65afe8f80ca + - 8130acf6-4910-4123-827c-caacd8111402 + archivedTime: null + softDeletedTime: null + hardDeletedTime: null + DossierRequest: + type: object + description: | + Object containing essential attributes for creating or updating a dossier. + Includes information about ownership, members, approvers, and various configurations + like watermarks and download file types. + properties: + id: + type: string + format: uuid + description: | + The unique identifier of the dossier to update. This property needs to be null for create requests, + as the system will generate it automatically. If the value is not a valid identifier, the + endpoint will return a `400 Bad request` error. + name: + type: string + description: | + A human-readable name for the dossier. The name must be unique among all dossiers + within the scope of the workspace (tenant). + description: + type: string + description: | + A textual description providing additional context or information + about the purpose and content of the dossier. + dueDate: + type: string + format: date-time + description: | + Specifies the deadline by which actions related to this dossier should be completed. + The date is in ISO 8601 date-time format. + ownerId: + type: string + format: uuid + description: | + A unique identifier representing the user who owns or created this dossier. + If `null` when creating the dossier, the current user will be set as the owner. + Must not be `null` when updating a dossier. + memberIds: + type: array + description: An array of unique identifiers for users who have access to the dossier. + items: + type: string + description: A unique identifier for a member with access to the dossier. + uniqueItems: true + reportTemplateIds: + type: array + description: | + An array of identifiers representing templates used for generating reports + or exports from this dossier. + items: + description: An identifier for a report template. + type: string + uniqueItems: true + dossierStatusId: + type: string + description: | + An identifier representing the current status of the dossier. + Use `null` to unset the current status. + required: + - name + example: + id: dc28cc82-2682-4b7f-ae0b-2132b205d47a + name: Project Beta + description: Collection of documents for Project Beta. + dueDate: 2001-01-23T04:56:07.000+00:00 + ownerId: 0d53a7c3-7b3a-4c57-857d-ec5e0fc3019b + memberIds: + - a0044ae9-ddca-4f97-b0a1-3cb2517dbf39 + - c2e33246-e50a-4c43-831c-6789a5637db8 + - 6123fa16-6943-4b74-8524-54b0046a0ce6 + reportTemplateIds: + - daadea5f-917b-482a-b7d2-e65afe8f80ca + - 8130acf6-4910-4123-827c-caacd8111402 + dossierStatusId: b8280985-f558-43c0-852a-a3fa86803548 + DossierTemplate: + description: | + The `DossierTemplate` object represents the blueprint for creating and + managing dossiers and for handling and analyzing the files of dossiers. + It contains various settings, rules, and metadata to control the behavior + of individual dossiers that get created based on this template. + example: + id: 1e07cde0-d36a-4ab7-b389-494ca694a0cb + name: RedactManager Example + description: Typical settings for RedactManager. + dateAdded: 2020-01-23T04:56:07.000+00:00 + dateModified: 2021-01-23T04:56:07.000+00:00 + createdBy: c2e33246-e50a-4c43-831c-6789a5637db6 + modifiedBy: c2e33246-e50a-4c43-831c-6789a5637db6 + validFrom: 2020-01-01T00:00:00.000+00:00 + validTo: 2030-12-31T23:59:59.999+00:00 + dossierTemplateStatus: ACTIVE + removeWatermark: false + keepImageMetadata: false + ocrByDefault: false + keepHiddenText: false + keepOverlappingObjects: false + applyDictionaryUpdatesToAllDossiersByDefault: false + downloadFileTypes: + - PREVIEW + - REDACTED + properties: + id: + description: | + A unique identifier generated by the system when the dossier template + is created. This ID is used to reference the template in API calls. + type: string + format: uuid + name: + description: The user-defined name of the dossier template, required for create and update operations. + type: string + description: + description: A detailed description of the purpose and usage of this dossier template. + type: string + dateAdded: + description: The date when this dossier template was first created. Automatically set by the system. + format: date-time + type: string + dateModified: + description: | + The most recent date when modifications were made to this dossier template. + Automatically set by the system. + format: date-time + type: string + createdBy: + description: The identifier of the user who initially created this dossier template. Automatically set by the system. + type: string + format: uuid + modifiedBy: + description: The identifier of the user who last modified this dossier template. Automatically set by the system. + type: string + format: uuid + validFrom: + description: | + The starting date for the validity of this dossier template. Dossiers can only be created + based on this template after this date. + format: date-time + type: string + validTo: + description: | + The ending date for the validity of this dossier template. Dossiers will no longer be able to + be created based on this template after this date. + format: date-time + type: string + downloadFileTypes: + description: | + Specifies the types of files that will be set as default types to download for dossiers created from + this template. Valid options may vary depending on the system. + + * Valid options for RedactManager: + * `ORIGINAL`: The optimized version of the PDF like it is used by the system for further analysis. + * `PREVIEW`: The optimized PDF with redaction annotations indicating what gets redacted by the + system. Note that the content to redact is actually still present and readable. + * `REDACTED`: The redacted PDF + * `DELTA_PREVIEW`: If redactions were imported (e.g., by uploading a PDF with redaction annotations), + this PDF highlights the changes made to imported redactions in different colors (green: no change, + red: removed, blue: added). + * Valid options for DocuMine: + * `ORIGINAL`: The optimized version of the PDF like it is used by the system for further analysis. + items: + description: Enumerated type indicating a permissible download file type for dossiers under this template. + enum: + - ORIGINAL + - PREVIEW + - REDACTED + - DELTA_PREVIEW + type: string + type: array + uniqueItems: true + status: + description: | + Indicates the current status of the dossier template: + * `INCOMPLETE`: The dossier template is missing some information or settings. Dossiers cannot be created based + on this template until the missing information and settings are added. + * `INACTIVE`: The dossier template cannot be used for creating dossiers based on it. + * `ACTIVE`: The dossier template can be used for creating dossiers based on it. + enum: + - INCOMPLETE + - INACTIVE + - ACTIVE + type: string + keepImageMetadata: + description: Flag indicating whether metadata from images in PDFs should be retained or removed. + type: boolean + keepHiddenText: + description: Flag indicating whether hidden text in PDFs should be retained or removed. + type: boolean + keepOverlappingObjects: + description: Flag indicating whether overlapping objects in PDFs should be retained or flattened. + type: boolean + applyDictionaryUpdatesToAllDossiersByDefault: + description: | + Flag indicating whether updates to the dictionary should automatically be applied to all dossiers + created from this template. + type: boolean + ocrByDefault: + description: Flag specifying if OCR should be automatically applied to PDFs that get upload to dossiers based on this template. + type: boolean + removeWatermark: + description: Flag specifying if the system should try to remove watermarks in documents prior to OCR processing. + type: boolean + type: object + DossierTemplateList: + description: Represents a list of dossier templates, each encapsulating a set of rules and settings. + example: + dossierTemplates: + - id: 1e07cde0-d36a-4ab7-b389-494ca694a0cb + name: RedactManager Example + description: Typical settings for RedactManager. + dateAdded: 2020-01-23T04:56:07.000+00:00 + dateModified: 2021-01-23T04:56:07.000+00:00 + createdBy: c2e33246-e50a-4c43-831c-6789a5637db6 + modifiedBy: c2e33246-e50a-4c43-831c-6789a5637db6 + validFrom: 2020-01-01T00:00:00.000+00:00 + validTo: 2030-12-31T23:59:59.999+00:00 + dossierTemplateStatus: ACTIVE + removeWatermark: false + keepImageMetadata: false + ocrByDefault: false + keepHiddenText: false + keepOverlappingObjects: false + applyDictionaryUpdatesToAllDossiersByDefault: false + downloadFileTypes: + - PREVIEW + - REDACTED + - id: 8d8cae48-5c33-4617-ac27-1643f29b79d8 + name: DocuMine Example + description: Typical settings for DocuMine. + dateAdded: 2023-09-01T06:54:32.000+00:00 + dateModified: 2023-09-01T06:54:32.000+00:00 + createdBy: 46a7f9d3-6ba0-41d7-b312-b8e708aa6f4d + modifiedBy: 46a7f9d3-6ba0-41d7-b312-b8e708aa6f4d + validFrom: 2023-01-01T00:00:00.000+00:00 + validTo: 2033-12-31T23:59:59.999+00:00 + dossierTemplateStatus: ACTIVE + removeWatermark: true + keepImageMetadata: true + ocrByDefault: true + keepHiddenText: true + keepOverlappingObjects: true + applyDictionaryUpdatesToAllDossiersByDefault: false + downloadFileTypes: + - ORIGINAL + properties: + dossierTemplates: + description: Each entry is a dossier template with its details. + items: + $ref: '#/components/schemas/DossierTemplate' + type: array + type: object + ErrorMessage: + type: object + description: | + Represents an error message returned by the API, providing details on when the error occurred + and a description of the issue. + properties: + timestamp: + type: string + format: date-time + description: The exact date and time when the error was encountered. This can be useful for logging or troubleshooting. + message: + type: string + description: A detailed description of the error, providing insights on the problem and potentially how to resolve or avoid it. + example: + timestamp: "2023-09-21T12:45:00Z" + message: "Invalid input provided for the 'name' field." + FileAttributes: + type: object + description: Additional file attributes that can be set or imported + properties: + attributeIdToValue: + additionalProperties: + type: string + type: object + example: + myFileAttribute: This is a file attribute value + yetAnotherFileAttribute: This is yet another file attribute value + numericValuesNeedToBeStrings: "1234" + FileDeleteRequest: + type: object + description: Request payload to initiate the deletion of specific files. + properties: + fileIds: + type: array + description: A list of unique identifiers for the files to be deleted. + items: + type: string + description: The unique identifier of a file. + example: + fileIds: + - 51d3f70ac322c98dc4db70a2ac44115a + - 1fdbd888b39059c8cf171df26f62f8a5 + FileErrorInfo: + type: object + description: Detailed information about an error encountered with a file. + properties: + cause: + type: string + description: The underlying reason or cause of the error. + queue: + type: string + description: The queue or process where the error was encountered. + service: + type: string + description: The specific service or component that reported the error. + timestamp: + type: string + format: date-time + description: The exact time when the error was recorded. + example: + service: LayoutParsingService + cause: The reason or cause why something went wrong. + queue: LAYOUT_PARSING_REQUEST_QUEUE + timestamp: 2000-01-23T04:56:07.000+00:00 + FileStatus: + type: object + description: Object containing information on a specific file. + properties: + id: + type: string + description: The unique identifier of the file. + dossierId: + type: string + format: uuid + description: The unique identifier linking the file to its associated dossier. + dossierTemplateId: + type: string + format: uuid + description: The identifier of the dossier template of the file's dossier. + dossierStatusId: + type: string + format: uuid + description: The identifier of the dossier status of the file's dossier. + filename: + description: The file's name. + type: string + dossierArchived: + description: Tells if the dossier of this file is archived or not. + type: boolean + processingStatus: + type: string + enum: + - ANALYSE + - ERROR + - FULLREPROCESS + - IMAGE_ANALYZING + - INDEXING + - NER_ANALYZING + - OCR_PROCESSING_QUEUED + - OCR_PROCESSING + - PROCESSED + - PROCESSING + - REPROCESS + - UNPROCESSED + - FULL_PROCESSING + - PRE_PROCESSING_QUEUED + - PRE_PROCESSING + - PRE_PROCESSED + - FIGURE_DETECTION_ANALYZING + - TABLE_PARSING_ANALYZING + description: | + The processing status of a file. The states give detailed information about the current processing step. + In general, this information is useful for debugging is the file is stuck in a status. + + The status `UNPROCESSED` indicates a newly uploaded file. Status `ERROR` indicates that the system could not + process the file for some reason. Finally, `PROCESSED` is what you usually expect as the final state after + all required processing steps are done. + workflowStatus: + type: string + enum: + - NEW + - UNDER_REVIEW + - UNDER_APPROVAL + - APPROVED + description: | + The workflow status of a file. + + As DocuMine does not have an approval workflow the meaning of the states is as follows: + - `NEW` means "New", nothing else. + - `UNDER_REVIEW` is actually not used in DocuMine. + - `UNDER_APPROVAL` means "In progress", i.e. a user is checking the extracted components. + - `APPROVED` means "Done", i.e. a user has checked and adjusted the components if necessary. + numberOfPages: + description: The number of pages of the file. + format: int32 + type: integer + added: + description: Date and time when the file was added to the system. + format: date-time + type: string + lastUpdated: + description: Date and time when the file was last updated. + format: date-time + type: string + numberOfAnalyses: + description: The number of times the file has been analyzed. + format: int32 + type: integer + assignee: + description: The current assignee's (if any) user id. + type: string + lastReviewer: + description: The last reviewer's (if any) user id. + type: string + lastApprover: + description: The user id of the last approver (if any). + type: string + hasRedactions: + description: Shows if any redactions were found during the analysis. + type: boolean + hasHints: + description: Shows if any hints were found during the analysis. + type: boolean + hasRequests: + description: Shows if any requests were found during the analysis. + type: boolean + hasUpdates: + description: | + Shows if there is any change between the previous and current + analysis. + type: boolean + hasImages: + description: Shows if any images were found during the analysis. + type: boolean + ocrStartTime: + description: | + Shows if this file has been OCRed by us. Start time of OCR + Process + format: date-time + type: string + numberOfPagesToOCR: + description: Number of pages to be OCRed by us + format: int32 + type: integer + numberOfOCRedPages: + description: Number of pages already OCRed by us + format: int32 + type: integer + ocrEndTime: + description: Shows if this file has been OCRed by us. End time of OCR Process + format: date-time + type: string + hasAnnotationComments: + description: Shows if this file has comments on annotations. + type: boolean + uploader: + description: The ID of the user who uploaded the file. + type: string + dictionaryVersion: + description: Shows which dictionary versions was used during the analysis. + format: int64 + type: integer + rulesVersion: + description: Shows which rules versions was used during the analysis. + format: int64 + type: integer + legalBasisVersion: + description: Shows which legal basis versions was used during the analysis. + format: int64 + type: integer + excluded: + description: Shows if the file was excluded from analysis. + type: boolean + lastProcessed: + description: Shows the last date of a successful analysis. + format: date-time + type: string + lastLayoutProcessed: + description: Shows the last date of a layout parsing. + format: date-time + type: string + approvalDate: + description: Shows the date of approval, if approved. + format: date-time + type: string + lastUploaded: + description: Shows last date the document was uploaded. + format: date-time + type: string + analysisDuration: + description: Shows how long the last analysis took + format: int64 + type: integer + fileAttributes: + $ref: '#/components/schemas/FileAttributes' + dossierDictionaryVersion: + description: | + Shows which dossier dictionary versions was used during the + analysis. + format: int64 + type: integer + analysisRequired: + description: Shows if the file requires reanalysis. + type: boolean + excludedPages: + description: Set of excluded pages for this file. + items: + description: Set of excluded pages for this file. + format: int32 + type: integer + type: array + uniqueItems: true + softDeletedTime: + description: Shows if the file is soft deleted. + format: date-time + type: string + lastFileAttributeChange: + description: Date and time when the files attributes was last updated. + format: date-time + type: string + hasSuggestions: + description: Shows if there are any Suggestions in this file. + type: boolean + excludedFromAutomaticAnalysis: + description: Shows if the file is excluded from automatic analysis. + type: boolean + redactionModificationDate: + description: Shows the last redaction modification date of this file. + format: date-time + type: string + fileManipulationDate: + description: Shows the date of the last manipulation of this file. + format: date-time + type: string + lastManualChangeDate: + description: | + Shows the date of the last manual change of an annotation of + this file. + format: date-time + type: string + hasHighlights: + description: | + Shows if there are highlights to remove or convert for this + file. + type: boolean + fileSize: + description: Size of the optimized, internally stored file. + format: int64 + type: integer + analysisVersion: + description: Analysis Version. + format: int32 + type: integer + lastIndexed: + description: Last time the file was indexed in ES. + format: date-time + type: string + fileErrorInfo: + $ref: '#/components/schemas/FileErrorInfo' + lastOCRTime: + description: Shows if this file has been OCRed by us. Last Time of OCR. + format: date-time + type: string + example: + hasRedactions: true + added: 2000-01-23T04:56:07.000+00:00 + workflowStatus: NEW + hasAnnotationComments: true + rulesVersion: 2 + excluded: true + lastUpdated: 2000-01-23T04:56:07.000+00:00 + lastManualChangeDate: 2000-01-23T04:56:07.000+00:00 + lastProcessed: 2000-01-23T04:56:07.000+00:00 + excludedFromAutomaticAnalysis: true + dictionaryVersion: 5 + dossierArchived: true + hasRequests: true + lastFileAttributeChange: 2000-01-23T04:56:07.000+00:00 + id: a7f0303d-a33c-4f2e-bd7a-a2adc1b8f92b + analysisDuration: 9 + hasHighlights: true + dossierStatusId: dossierStatusId + fileErrorInfo: + service: service + cause: cause + queue: queue + timestamp: 2000-01-23T04:56:07.000+00:00 + processingStatus: ANALYSE + numberOfAnalyses: 6 + filename: filename + fileAttributes: + myFileAttribute: This is a file attribute value + yetAnotherFileAttribute: This is yet another file attribute value + numericValuesNeedToBeStrings: "1234" + lastOCRTime: 2000-01-23T04:56:07.000+00:00 + legalBasisVersion: 7 + excludedPages: + - 2 + - 2 + redactionModificationDate: 2000-01-23T04:56:07.000+00:00 + fileSize: 4 + fileManipulationDate: 2000-01-23T04:56:07.000+00:00 + dossierId: dossierId + lastUploaded: 2000-01-23T04:56:07.000+00:00 + assignee: assignee + analysisRequired: true + approvalDate: 2000-01-23T04:56:07.000+00:00 + numberOfPagesToOCR: 1 + ocrEndTime: 2000-01-23T04:56:07.000+00:00 + hasHints: true + softDeletedTime: 2000-01-23T04:56:07.000+00:00 + numberOfPages: 0 + uploader: uploader + lastReviewer: lastReviewer + lastIndexed: 2000-01-23T04:56:07.000+00:00 + numberOfOCRedPages: 5 + analysisVersion: 7 + lastLayoutProcessed: 2000-01-23T04:56:07.000+00:00 + lastApprover: lastApprover + ocrStartTime: 2000-01-23T04:56:07.000+00:00 + dossierDictionaryVersion: 3 + dossierTemplateId: dossierTemplateId + hasImages: true + hasUpdates: true + hasSuggestions: true + FileStatusList: + type: object + description: Represents a list detailing the status of a bunch of files. + properties: + files: + type: array + description: An array of status details for each individual file. + items: + $ref: '#/components/schemas/FileStatus' + example: + files: + - hasRedactions: true + added: 2000-01-23T04:56:07.000+00:00 + workflowStatus: NEW + hasAnnotationComments: true + rulesVersion: 2 + excluded: true + lastUpdated: 2000-01-23T04:56:07.000+00:00 + lastManualChangeDate: 2000-01-23T04:56:07.000+00:00 + lastProcessed: 2000-01-23T04:56:07.000+00:00 + excludedFromAutomaticAnalysis: true + dictionaryVersion: 5 + dossierArchived: true + hasRequests: true + lastFileAttributeChange: 2000-01-23T04:56:07.000+00:00 + id: id + analysisDuration: 9 + hasHighlights: true + dossierStatusId: dossierStatusId + fileErrorInfo: + service: service + cause: cause + queue: queue + timestamp: 2000-01-23T04:56:07.000+00:00 + processingStatus: ANALYSE + numberOfAnalyses: 6 + filename: filename + fileAttributes: + myFileAttribute: This is a file attribute value + yetAnotherFileAttribute: This is yet another file attribute value + numericValuesNeedToBeStrings: "1234" + lastOCRTime: 2000-01-23T04:56:07.000+00:00 + legalBasisVersion: 7 + excludedPages: + - 2 + - 2 + redactionModificationDate: 2000-01-23T04:56:07.000+00:00 + fileSize: 4 + fileManipulationDate: 2000-01-23T04:56:07.000+00:00 + dossierId: 15849e05-5414-498c-b48b-47afa3fd74da + lastUploaded: 2000-01-23T04:56:07.000+00:00 + assignee: assignee + fileId: 4d2334def5fced0003888e47cbc270f7 + analysisRequired: true + approvalDate: 2000-01-23T04:56:07.000+00:00 + numberOfPagesToOCR: 1 + ocrEndTime: 2000-01-23T04:56:07.000+00:00 + hasHints: true + softDeletedTime: 2000-01-23T04:56:07.000+00:00 + numberOfPages: 0 + uploader: uploader + lastReviewer: lastReviewer + lastIndexed: 2000-01-23T04:56:07.000+00:00 + numberOfOCRedPages: 5 + analysisVersion: 7 + lastLayoutProcessed: 2000-01-23T04:56:07.000+00:00 + lastApprover: lastApprover + ocrStartTime: 2000-01-23T04:56:07.000+00:00 + dossierDictionaryVersion: 3 + dossierTemplateId: dossierTemplateId + hasImages: true + hasUpdates: true + hasSuggestions: true + - hasRedactions: true + added: 2000-01-23T04:56:07.000+00:00 + workflowStatus: NEW + hasAnnotationComments: true + rulesVersion: 2 + excluded: true + lastUpdated: 2000-01-23T04:56:07.000+00:00 + lastManualChangeDate: 2000-01-23T04:56:07.000+00:00 + lastProcessed: 2000-01-23T04:56:07.000+00:00 + excludedFromAutomaticAnalysis: true + dictionaryVersion: 5 + dossierArchived: true + hasRequests: true + lastFileAttributeChange: 2000-01-23T04:56:07.000+00:00 + id: id + analysisDuration: 9 + hasHighlights: true + dossierStatusId: dossierStatusId + fileErrorInfo: + service: service + cause: cause + queue: queue + timestamp: 2000-01-23T04:56:07.000+00:00 + processingStatus: ANALYSE + numberOfAnalyses: 6 + filename: filename + fileAttributes: + myFileAttribute: This is a file attribute value + yetAnotherFileAttribute: This is yet another file attribute value + numericValuesNeedToBeStrings: "1234" + lastOCRTime: 2000-01-23T04:56:07.000+00:00 + legalBasisVersion: 7 + excludedPages: + - 2 + - 2 + redactionModificationDate: 2000-01-23T04:56:07.000+00:00 + fileSize: 4 + fileManipulationDate: 2000-01-23T04:56:07.000+00:00 + dossierId: dossierId + lastUploaded: 2000-01-23T04:56:07.000+00:00 + assignee: assignee + fileId: 1fdbd888b39059c8cf171df26f62f8a5 + analysisRequired: true + approvalDate: 2000-01-23T04:56:07.000+00:00 + numberOfPagesToOCR: 1 + ocrEndTime: 2000-01-23T04:56:07.000+00:00 + hasHints: true + softDeletedTime: 2000-01-23T04:56:07.000+00:00 + numberOfPages: 0 + uploader: uploader + lastReviewer: lastReviewer + lastIndexed: 2000-01-23T04:56:07.000+00:00 + numberOfOCRedPages: 5 + analysisVersion: 7 + lastLayoutProcessed: 2000-01-23T04:56:07.000+00:00 + lastApprover: lastApprover + ocrStartTime: 2000-01-23T04:56:07.000+00:00 + dossierDictionaryVersion: 3 + dossierTemplateId: dossierTemplateId + hasImages: true + hasUpdates: true + hasSuggestions: true + FileUploadResult: + description: Object containing information about a successfully uploaded file. + example: + fileIds: + - fileIds + - fileIds + processedFileIds: + - processedFileIds + - processedFileIds + processedAttributes: + - processedAttributes + - processedAttributes + properties: + fileIds: + description: List of fileIds generated for uploaded file(s). + items: + description: List of fileIds generated for uploaded file(s). + type: string + type: array + processedAttributes: + description: | + List processed file attributes, in case the upload contained + a CSV. + items: + description: | + List processed file attributes, in case the upload contained + a CSV. + type: string + type: array + processedFileIds: + description: List processed fileIds, in case the upload contained a CSV. + items: + description: List processed fileIds, in case the upload contained a CSV. + type: string + type: array + type: object + LicenseReport: + type: object + description: A comprehensive report of licensing metrics and usage statistics. + properties: + startDate: + type: string + format: date-time + description: The starting date of the report. + endDate: + type: string + format: date-time + description: The ending date of the report. + numberOfAnalyzedFiles: + type: integer + format: int32 + description: | + The count of files that have been analyzed in the requested period. The counter is + increased only once for each file, regardless of the number of analysis. + numberOfAnalyzedPages: + type: integer + format: int32 + description: | + The count of pages that have been analyzed in the requested period. The counter is + increased only once for each file, regardless of the number of analysis. + analyzedFilesBytes: + type: integer + format: int64 + description: | + The size in bytes of the files that have been analyzed in the requested period. + The counter is increased only once for each file, regardless of the number of analysis. + totalFilesUploadedBytes: + type: integer + format: int64 + description: The total size in bytes of all present files at the end of the period. + activeFilesUploadedBytes: + type: integer + format: int64 + description: The size in bytes of all active files at the end of the period. + trashFilesUploadedBytes: + type: integer + format: int64 + description: The size in bytes of all soft-deleted files at the end of the period. + archivedFilesUploadedBytes: + type: integer + format: int64 + description: The size in bytes of all archived files at the end of the period. + numberOfOcrFiles: + type: integer + format: int32 + description: | + The count of files that have undergone OCR (Optical Character Recognition) in the + requested period. + numberOfOcrPages: + type: integer + format: int32 + description: The count of pages that have undergone OCR in the requested period. + numberOfDossiers: + type: integer + format: int32 + description: The total number of present dossiers at the end of the period. + monthlyData: + description: A list of data metrics categorized on a monthly basis. + items: + $ref: '#/components/schemas/MonthlyReportData' + type: array + example: + startDate: 2000-01-01T00:00:00.000+00:00 + endDate: 2001-01-01T00:00:00.000+00:00 + numberOfAnalyzedFiles: 5 + numberOfAnalyzedPages: 9 + analyzedFilesBytes: 30000 + totalFilesUploadedBytes: 30000 + activeFilesUploadedBytes: 20000 + archivedFilesUploadedBytes: 5000 + trashFilesUploadedBytes: 5000 + numberOfOcrFiles: 2 + numberOfOcrPages: 2 + numberOfDossiers: 1 + monthlyData: + - startDate: 2000-01-01T00:00:00.000+00:00 + endDate: 2000-02-01T00:00:00.000+00:00 + numberOfAnalyzedPages: 7 + analyzedFilesBytes: 25000 + totalFilesUploadedBytes: 25000 + activeFilesUploadedBytes: 22000 + archivedFilesUploadedBytes: 0 + trashFilesUploadedBytes: 3000 + numberOfOcrPages: 1 + - startDate: 2000-02-01T00:00:00.000+00:00 + endDate: 2000-03-01T00:00:00.000+00:00 + numberOfAnalyzedPages: 2 + analyzedFilesBytes: 5000 + totalFilesUploadedBytes: 30000 + activeFilesUploadedBytes: 20000 + archivedFilesUploadedBytes: 5000 + trashFilesUploadedBytes: 5000 + numberOfOcrPages: 1 + LicenseReportRequest: + type: object + description: Request object to retrieve a license report for a given date range. + properties: + startDate: + type: string + format: date-time + description: The start date for the requested report. + endDate: + type: string + format: date-time + description: The end date for the requested report. + example: + startDate: 2000-01-01T00:00:00.000+00:00 + endDate: 2001-01-01T00:00:00.000+00:00 + MonthlyReportData: + type: object + description: Detailed metrics regarding license usage for a given month. + properties: + startDate: + type: string + format: date-time + description: The starting date of the respective month. + endDate: + type: string + format: date-time + description: The ending date of the respective month. + numberOfAnalyzedPages: + type: integer + format: int32 + description: | + The count of pages that have been analyzed in the respective month. The counter is + increased only once for each file, regardless of the number of analysis. + analyzedFilesBytes: + type: integer + format: int64 + description: | + The size in bytes of the files that have been analyzed in the respective month. + The counter is increased only once for each file, regardless of the number of analysis. + totalFilesUploadedBytes: + type: integer + format: int64 + description: The total size in bytes of all present files at the end of the respective month. + activeFilesUploadedBytes: + type: integer + format: int64 + description: The size in bytes of all active files at the end of the respective month. + trashFilesUploadedBytes: + type: integer + format: int64 + description: The size in bytes of all soft-deleted files at the end of the respective month. + archivedFilesUploadedBytes: + type: integer + format: int64 + description: The size in bytes of all archived files at the end of the respective month. + numberOfOcrPages: + type: integer + format: int32 + description: The count of pages that have undergone OCR in the requested respective month. + example: + startDate: 2000-01-01T00:00:00.000+00:00 + endDate: 2000-02-01T00:00:00.000+00:00 + numberOfAnalyzedPages: 7 + analyzedFilesBytes: 25000 + totalFilesUploadedBytes: 25000 + activeFilesUploadedBytes: 22000 + archivedFilesUploadedBytes: 0 + trashFilesUploadedBytes: 3000 + numberOfOcrPages: 1 + UploadRequest: + type: object + description: Request object to upload a file. + properties: + file: + type: string + format: binary + description: The binary content of the file to be uploaded. + required: + - file + securitySchemes: + FF-OAUTH: + flows: + authorizationCode: + authorizationUrl: /auth/realms/redaction/protocol/openid-connect/auth + scopes: { } + tokenUrl: /auth/realms/redaction/protocol/openid-connect/token + type: oauth2 diff --git a/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml b/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml index 037fa3048..48be66922 100644 --- a/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml +++ b/persistence-service-v1/persistence-service-server-v1/src/main/resources/application.yaml @@ -9,6 +9,7 @@ tenant-user-management-service.url: "http://tenant-user-management-service:8080/ application: type: "RedactManager" + rss.component-log.enabled: false server: port: 8080 diff --git a/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/DossierTemplateModel.java b/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/DossierTemplateModel.java index 8dc9fe89b..dca997fc2 100644 --- a/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/DossierTemplateModel.java +++ b/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/DossierTemplateModel.java @@ -19,8 +19,8 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class DossierTemplateModel { - @Schema(description = "The Rule Set Id. Generated by the system on create.") - private String dossierTemplateId; + @Schema(description = "The dossier template identifier. Generated by the system on create.") + private String id; @Schema(description = "The name of this dossierTemplate. Must be set on create / update requests") private String name; @@ -51,7 +51,7 @@ public class DossierTemplateModel { private Set downloadFileTypes = new HashSet<>(); @Schema(description = "Status of dossier template.") - private DossierTemplateStatus dossierTemplateStatus; + private DossierTemplateStatus status; @Schema(description = "Representing the setting if the metadata of images in pdfs should get kept, or removed") private boolean keepImageMetadata; @@ -71,9 +71,34 @@ public class DossierTemplateModel { @Schema(description = "Flag that specifies the watermark removal in documents will be performed before the OCR processing") private boolean removeWatermark; - public String getId() { - return dossierTemplateId; + // TODO: The following getters and setter ensure backwards compatibility. Remove them as soon as UI does not use them anymore + + @Deprecated + public String getDossierTemplateId() { + + return id; + } + + + @Deprecated + public void setDossierTemplateId(String id) { + + this.id = id; + } + + + @Deprecated + public DossierTemplateStatus getDossierTemplateStatus() { + + return status; + } + + + @Deprecated + public void setDossierTemplateStatus(DossierTemplateStatus status) { + + this.status = status; } } diff --git a/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/dossiertemplate/dossier/Dossier.java b/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/dossiertemplate/dossier/Dossier.java index 8891b4db8..be9c3cc99 100644 --- a/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/dossiertemplate/dossier/Dossier.java +++ b/persistence-service-v1/persistence-service-shared-api-v1/src/main/java/com/iqser/red/service/persistence/service/v1/api/shared/model/dossiertemplate/dossier/Dossier.java @@ -4,6 +4,7 @@ import java.time.OffsetDateTime; import java.util.HashSet; import java.util.Set; +import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonProperty; import com.iqser.red.service.persistence.service.v1.api.shared.model.dossiertemplate.DownloadFileType; @@ -19,7 +20,7 @@ import lombok.NoArgsConstructor; public class Dossier { private String id; - private String dossierName; + private String name; private OffsetDateTime date; private String description; private String ownerId; @@ -38,7 +39,27 @@ public class Dossier { private String dossierStatusId; private DossierVisibility visibility; - public String getDossierId(){ + + // TODO: The following getters and setter ensure backwards compatibility. Remove them as soon as UI does not use them anymore + + @Deprecated + public String getDossierId() { + return id; } + + + @Deprecated + public String getDossierName() { + + return name; + } + + + @Deprecated + public void setDossierName(String name) { + + this.name = name; + } + }