documente_shared 0.1.125__tar.gz → 0.1.127__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of documente_shared might be problematic. Click here for more details.
- {documente_shared-0.1.125 → documente_shared-0.1.127}/PKG-INFO +1 -1
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/in_memory_document.py +0 -1
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/common.py +14 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/repositories/processing_case.py +3 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/repositories/processing_case_item.py +5 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/dynamo_processing_case.py +3 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +15 -2
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/http_processing_case.py +11 -2
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/http_processing_case_item.py +29 -4
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/mem_document.py +11 -2
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/mem_processing_case.py +3 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/pyproject.toml +1 -1
- {documente_shared-0.1.125 → documente_shared-0.1.127}/README.md +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/dates.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/files.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/json.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/numbers.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/payloads.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/query_params.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/document.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/processing_case.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/processing_case_filters.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/processing_case_item.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/processing_case_item_filters.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/processing_documents.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/processing_event.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/scaling.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/exceptions.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/interfaces/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/interfaces/scaling.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/repositories/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/repositories/document.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/documente_client.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/lambdas.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/dynamo_document.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/http_document.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/repositories/mem_processing_case_item.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/services/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/services/http_scaling.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/sqs_queue.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/presentation/__init__.py +0 -0
- {documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/presentation/presenters.py +0 -0
|
@@ -3,7 +3,6 @@ from typing import Optional
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
5
|
from documente_shared.application.files import get_filename_from_path, remove_extension, remove_slash_from_path
|
|
6
|
-
from documente_shared.domain.exceptions import InMemoryDocumentContentError
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
@dataclass
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/common.py
RENAMED
|
@@ -117,3 +117,17 @@ class TaskResultStatus(BaseEnum):
|
|
|
117
117
|
SUCCESS = "SUCCESS"
|
|
118
118
|
IN_PROGRESS = "IN_PROGRESS"
|
|
119
119
|
FAILURE = "FAILURE"
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class DocumentViewFormat(BaseEnum):
|
|
123
|
+
PUBLIC_URL = 'PUBLIC_URL'
|
|
124
|
+
STORAGE_KEY = 'STORAGE_KEY'
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def is_public_url(self):
|
|
128
|
+
return self == DocumentViewFormat.PUBLIC_URL
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def is_object_storage(self):
|
|
132
|
+
return self == DocumentViewFormat.STORAGE_KEY
|
|
133
|
+
|
|
@@ -3,6 +3,7 @@ from typing import Optional, List
|
|
|
3
3
|
|
|
4
4
|
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
5
5
|
from documente_shared.domain.entities.processing_case_filters import ProcessingCaseFilters
|
|
6
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class ProcessingCaseRepository(ABC):
|
|
@@ -13,6 +14,7 @@ class ProcessingCaseRepository(ABC):
|
|
|
13
14
|
uuid: str,
|
|
14
15
|
include_items: bool = False,
|
|
15
16
|
include_items_bytes: bool = False,
|
|
17
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
16
18
|
) -> Optional[ProcessingCase]:
|
|
17
19
|
raise NotImplementedError
|
|
18
20
|
|
|
@@ -21,6 +23,7 @@ class ProcessingCaseRepository(ABC):
|
|
|
21
23
|
self,
|
|
22
24
|
instance: ProcessingCase,
|
|
23
25
|
persist_items: bool = False,
|
|
26
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
24
27
|
) -> ProcessingCase:
|
|
25
28
|
raise NotImplementedError
|
|
26
29
|
|
|
@@ -3,6 +3,7 @@ from typing import Optional, List
|
|
|
3
3
|
|
|
4
4
|
from documente_shared.domain.entities.processing_case_item import ProcessingCaseItem
|
|
5
5
|
from documente_shared.domain.entities.processing_case_item_filters import ProcessingCaseItemFilters
|
|
6
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class ProcessingCaseItemRepository(ABC):
|
|
@@ -12,6 +13,7 @@ class ProcessingCaseItemRepository(ABC):
|
|
|
12
13
|
self,
|
|
13
14
|
uuid: str,
|
|
14
15
|
read_bytes: bool = False,
|
|
16
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
15
17
|
) -> Optional[ProcessingCaseItem]:
|
|
16
18
|
raise NotImplementedError
|
|
17
19
|
|
|
@@ -20,6 +22,7 @@ class ProcessingCaseItemRepository(ABC):
|
|
|
20
22
|
self,
|
|
21
23
|
digest: str,
|
|
22
24
|
read_bytes: bool = False,
|
|
25
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
23
26
|
) -> Optional[ProcessingCaseItem]:
|
|
24
27
|
raise NotImplementedError
|
|
25
28
|
|
|
@@ -29,6 +32,7 @@ class ProcessingCaseItemRepository(ABC):
|
|
|
29
32
|
instance: ProcessingCaseItem,
|
|
30
33
|
read_bytes: bool = False,
|
|
31
34
|
persist_bytes: bool = False,
|
|
35
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
32
36
|
) -> ProcessingCaseItem:
|
|
33
37
|
raise NotImplementedError
|
|
34
38
|
|
|
@@ -40,5 +44,6 @@ class ProcessingCaseItemRepository(ABC):
|
|
|
40
44
|
def filter(
|
|
41
45
|
self,
|
|
42
46
|
filters: ProcessingCaseItemFilters,
|
|
47
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
43
48
|
) -> List[ProcessingCaseItem]:
|
|
44
49
|
raise NotImplementedError
|
|
@@ -4,6 +4,7 @@ from boto3.dynamodb.conditions import Key
|
|
|
4
4
|
|
|
5
5
|
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
6
6
|
from documente_shared.domain.entities.processing_case_filters import ProcessingCaseFilters
|
|
7
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
7
8
|
from documente_shared.domain.repositories.processing_case import ProcessingCaseRepository
|
|
8
9
|
|
|
9
10
|
from documente_shared.infrastructure.dynamo_table import DynamoDBTable
|
|
@@ -18,6 +19,7 @@ class DynamoProcessingCaseRepository(
|
|
|
18
19
|
uuid: str,
|
|
19
20
|
include_items: bool = False,
|
|
20
21
|
include_items_bytes: bool = False,
|
|
22
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
21
23
|
) -> Optional[ProcessingCase]:
|
|
22
24
|
item = self.get(key={'uuid': uuid})
|
|
23
25
|
if item:
|
|
@@ -28,6 +30,7 @@ class DynamoProcessingCaseRepository(
|
|
|
28
30
|
self,
|
|
29
31
|
instance: ProcessingCase,
|
|
30
32
|
persist_items: bool = False,
|
|
33
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
31
34
|
) -> ProcessingCase:
|
|
32
35
|
self.put(instance.to_persist_dict)
|
|
33
36
|
return instance
|
|
@@ -4,6 +4,7 @@ from boto3.dynamodb.conditions import Key
|
|
|
4
4
|
|
|
5
5
|
from documente_shared.domain.entities.processing_case_item import ProcessingCaseItem
|
|
6
6
|
from documente_shared.domain.entities.processing_case_item_filters import ProcessingCaseItemFilters
|
|
7
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
7
8
|
from documente_shared.domain.repositories.processing_case_item import ProcessingCaseItemRepository
|
|
8
9
|
|
|
9
10
|
from documente_shared.infrastructure.dynamo_table import DynamoDBTable
|
|
@@ -13,13 +14,23 @@ class DynamoProcessingCaseItemRepository(
|
|
|
13
14
|
DynamoDBTable,
|
|
14
15
|
ProcessingCaseItemRepository,
|
|
15
16
|
):
|
|
16
|
-
def find(
|
|
17
|
+
def find(
|
|
18
|
+
self,
|
|
19
|
+
uuid: str,
|
|
20
|
+
read_bytes: bool = False,
|
|
21
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
22
|
+
) -> Optional[ProcessingCaseItem]:
|
|
17
23
|
item = self.get(key={'digest': uuid})
|
|
18
24
|
if item:
|
|
19
25
|
return ProcessingCaseItem.from_dict(item)
|
|
20
26
|
return None
|
|
21
27
|
|
|
22
|
-
def find_by_digest(
|
|
28
|
+
def find_by_digest(
|
|
29
|
+
self,
|
|
30
|
+
digest: str,
|
|
31
|
+
read_bytes: bool = False,
|
|
32
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
33
|
+
) -> Optional[ProcessingCaseItem]:
|
|
23
34
|
item = self.get(key={'digest': digest})
|
|
24
35
|
if item:
|
|
25
36
|
return ProcessingCaseItem.from_dict(item)
|
|
@@ -30,6 +41,7 @@ class DynamoProcessingCaseItemRepository(
|
|
|
30
41
|
instance: ProcessingCaseItem,
|
|
31
42
|
read_bytes: bool = False,
|
|
32
43
|
persist_bytes: bool = False,
|
|
44
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
33
45
|
) -> ProcessingCaseItem:
|
|
34
46
|
self.put(instance.to_simple_dict)
|
|
35
47
|
return instance
|
|
@@ -40,6 +52,7 @@ class DynamoProcessingCaseItemRepository(
|
|
|
40
52
|
def filter(
|
|
41
53
|
self,
|
|
42
54
|
filters: ProcessingCaseItemFilters,
|
|
55
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
43
56
|
) -> List[ProcessingCaseItem]:
|
|
44
57
|
items = []
|
|
45
58
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
-
from sqlite3.dbapi2 import paramstyle
|
|
3
2
|
from typing import List, Optional
|
|
4
3
|
|
|
5
4
|
from loguru import logger
|
|
@@ -9,6 +8,7 @@ from documente_shared.application.payloads import camel_to_snake
|
|
|
9
8
|
from documente_shared.application.query_params import parse_bool_to_str
|
|
10
9
|
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
11
10
|
from documente_shared.domain.entities.processing_case_filters import ProcessingCaseFilters
|
|
11
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
12
12
|
from documente_shared.domain.repositories.processing_case import ProcessingCaseRepository
|
|
13
13
|
from documente_shared.infrastructure.documente_client import DocumenteClientMixin
|
|
14
14
|
|
|
@@ -23,8 +23,15 @@ class HttpProcessingCaseRepository(
|
|
|
23
23
|
uuid: str,
|
|
24
24
|
include_items: bool = False,
|
|
25
25
|
include_items_bytes: bool = False,
|
|
26
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
26
27
|
) -> Optional[ProcessingCase]:
|
|
27
|
-
|
|
28
|
+
params = {
|
|
29
|
+
"view_format": str(view_format),
|
|
30
|
+
}
|
|
31
|
+
response = self.session.get(
|
|
32
|
+
url=f"{self.api_url}/v1/processing-cases/{uuid}/",
|
|
33
|
+
params=params,
|
|
34
|
+
)
|
|
28
35
|
if response.status_code not in [200, 201]:
|
|
29
36
|
return None
|
|
30
37
|
return self._build_processing_case(response)
|
|
@@ -33,10 +40,12 @@ class HttpProcessingCaseRepository(
|
|
|
33
40
|
self,
|
|
34
41
|
instance: ProcessingCase,
|
|
35
42
|
persist_items: bool = False,
|
|
43
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
36
44
|
) -> ProcessingCase:
|
|
37
45
|
logger.info(f"PERSISTING_PROCESSING_CASE: data={instance.to_queue_dict}")
|
|
38
46
|
params = {
|
|
39
47
|
"persist_items": parse_bool_to_str(persist_items),
|
|
48
|
+
"view_format": str(view_format),
|
|
40
49
|
}
|
|
41
50
|
response = self.session.put(
|
|
42
51
|
url=f"{self.api_url}/v1/processing-cases/{instance.uuid}/",
|
|
@@ -8,6 +8,7 @@ from documente_shared.application.payloads import camel_to_snake
|
|
|
8
8
|
from documente_shared.application.query_params import parse_bool_to_str
|
|
9
9
|
from documente_shared.domain.entities.processing_case_item import ProcessingCaseItem
|
|
10
10
|
from documente_shared.domain.entities.processing_case_item_filters import ProcessingCaseItemFilters
|
|
11
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
11
12
|
from documente_shared.domain.repositories.processing_case_item import ProcessingCaseItemRepository
|
|
12
13
|
from documente_shared.infrastructure.documente_client import DocumenteClientMixin
|
|
13
14
|
|
|
@@ -17,7 +18,12 @@ class HttpProcessingCaseItemRepository(
|
|
|
17
18
|
DocumenteClientMixin,
|
|
18
19
|
ProcessingCaseItemRepository,
|
|
19
20
|
):
|
|
20
|
-
def find(
|
|
21
|
+
def find(
|
|
22
|
+
self,
|
|
23
|
+
uuid: str,
|
|
24
|
+
read_bytes: bool = False,
|
|
25
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
26
|
+
) -> Optional[ProcessingCaseItem]:
|
|
21
27
|
response = self.session.get(
|
|
22
28
|
url=f"{self.api_url}/v1/processing-case-items/{uuid}/?read_bytes={parse_bool_to_str(read_bytes)}",
|
|
23
29
|
)
|
|
@@ -25,9 +31,19 @@ class HttpProcessingCaseItemRepository(
|
|
|
25
31
|
return None
|
|
26
32
|
return self._build_processing_case_item(response)
|
|
27
33
|
|
|
28
|
-
def find_by_digest(
|
|
34
|
+
def find_by_digest(
|
|
35
|
+
self,
|
|
36
|
+
digest: str,
|
|
37
|
+
read_bytes: bool = False,
|
|
38
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
39
|
+
) -> Optional[ProcessingCaseItem]:
|
|
40
|
+
params = {
|
|
41
|
+
"read_bytes": parse_bool_to_str(read_bytes),
|
|
42
|
+
"view_format": str(view_format),
|
|
43
|
+
}
|
|
29
44
|
response = self.session.get(
|
|
30
|
-
url=f"{self.api_url}/v1/processing-case-items/{digest}
|
|
45
|
+
url=f"{self.api_url}/v1/processing-case-items/{digest}/",
|
|
46
|
+
params=params,
|
|
31
47
|
)
|
|
32
48
|
if response.status_code not in [200, 201]:
|
|
33
49
|
return None
|
|
@@ -38,10 +54,12 @@ class HttpProcessingCaseItemRepository(
|
|
|
38
54
|
instance: ProcessingCaseItem,
|
|
39
55
|
read_bytes: bool = False,
|
|
40
56
|
persist_bytes: bool = False,
|
|
57
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
41
58
|
) -> ProcessingCaseItem:
|
|
42
59
|
logger.info(f"PERSISTING_PROCESSING_CASE_ITEM: data={instance.to_queue_dict}")
|
|
43
60
|
params = {
|
|
44
61
|
"read_bytes": parse_bool_to_str(read_bytes),
|
|
62
|
+
"view_format": str(view_format),
|
|
45
63
|
}
|
|
46
64
|
response: Response = self.session.put(
|
|
47
65
|
url=f"{self.api_url}/v1/processing-case-items/{instance.uuid}/",
|
|
@@ -62,8 +80,15 @@ class HttpProcessingCaseItemRepository(
|
|
|
62
80
|
def filter(
|
|
63
81
|
self,
|
|
64
82
|
filters: ProcessingCaseItemFilters,
|
|
83
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
65
84
|
) -> List[ProcessingCaseItem]:
|
|
66
|
-
|
|
85
|
+
params = {
|
|
86
|
+
"view_format": str(view_format),
|
|
87
|
+
}
|
|
88
|
+
response = self.session.get(
|
|
89
|
+
url=f"{self.api_url}/v1/processing-case-items/",
|
|
90
|
+
params=params,
|
|
91
|
+
)
|
|
67
92
|
if response.status_code not in [200, 201]:
|
|
68
93
|
return []
|
|
69
94
|
raw_response = response.json()
|
|
@@ -2,6 +2,7 @@ from dataclasses import dataclass
|
|
|
2
2
|
from typing import List, Optional
|
|
3
3
|
|
|
4
4
|
from documente_shared.domain.entities.document import DocumentProcessing
|
|
5
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
5
6
|
from documente_shared.domain.enums.document import DocumentProcessingStatus
|
|
6
7
|
from documente_shared.domain.repositories.document import DocumentProcessingRepository
|
|
7
8
|
|
|
@@ -13,13 +14,21 @@ class MemoryDocumentProcessingRepository(DocumentProcessingRepository):
|
|
|
13
14
|
def __post_init__(self):
|
|
14
15
|
self.collection = self.collection or {}
|
|
15
16
|
|
|
16
|
-
def find(
|
|
17
|
+
def find(
|
|
18
|
+
self,
|
|
19
|
+
digest: str,
|
|
20
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
21
|
+
) -> Optional[DocumentProcessing]:
|
|
17
22
|
if digest in self.collection:
|
|
18
23
|
return self.collection[digest]
|
|
19
24
|
return None
|
|
20
25
|
|
|
21
26
|
|
|
22
|
-
def persist(
|
|
27
|
+
def persist(
|
|
28
|
+
self,
|
|
29
|
+
instance: DocumentProcessing,
|
|
30
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
31
|
+
) -> DocumentProcessing:
|
|
23
32
|
self.collection[instance.digest] = instance
|
|
24
33
|
return instance
|
|
25
34
|
|
|
@@ -3,6 +3,7 @@ from typing import List, Optional
|
|
|
3
3
|
|
|
4
4
|
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
5
5
|
from documente_shared.domain.entities.processing_case_filters import ProcessingCaseFilters
|
|
6
|
+
from documente_shared.domain.enums.common import DocumentViewFormat
|
|
6
7
|
|
|
7
8
|
from documente_shared.domain.repositories.processing_case import ProcessingCaseRepository
|
|
8
9
|
|
|
@@ -19,6 +20,7 @@ class MemoryProcessingCaseRepository(ProcessingCaseRepository):
|
|
|
19
20
|
uuid: str,
|
|
20
21
|
include_items: bool = False,
|
|
21
22
|
include_items_bytes: bool = False,
|
|
23
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
22
24
|
) -> Optional[ProcessingCase]:
|
|
23
25
|
if uuid in self.collection:
|
|
24
26
|
return self.collection[uuid]
|
|
@@ -28,6 +30,7 @@ class MemoryProcessingCaseRepository(ProcessingCaseRepository):
|
|
|
28
30
|
self,
|
|
29
31
|
instance: ProcessingCase,
|
|
30
32
|
persist_items: bool = False,
|
|
33
|
+
view_format: DocumentViewFormat = DocumentViewFormat.PUBLIC_URL,
|
|
31
34
|
) -> ProcessingCase:
|
|
32
35
|
self.collection[instance.uuid] = instance
|
|
33
36
|
return instance
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/digest.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/numbers.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/payloads.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/query_params.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/entities/scaling.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/interfaces/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/domain/interfaces/scaling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/lambdas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/presentation/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.125 → documente_shared-0.1.127}/documente_shared/presentation/presenters.py
RENAMED
|
File without changes
|