documente_shared 0.1.93__py3-none-any.whl → 0.1.95__py3-none-any.whl

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.

@@ -75,6 +75,14 @@ class DocumentProcessing(object):
75
75
  @property
76
76
  def is_inreview(self) -> bool:
77
77
  return self.status == DocumentProcessingStatus.IN_REVIEW
78
+
79
+ @property
80
+ def is_circular(self) -> bool:
81
+ return self.category and self.category.is_circular
82
+
83
+ @property
84
+ def is_desgravamen(self) -> bool:
85
+ return self.category and self.category.is_desgravamen
78
86
 
79
87
  @property
80
88
  def is_valid(self) -> bool:
@@ -31,6 +31,14 @@ class ProcessingCase(object):
31
31
  def is_procesable(self) -> bool:
32
32
  return self.items and len(self.items) > 0
33
33
 
34
+ @property
35
+ def is_bcp_microcredito(self) -> bool:
36
+ return self.case_type and self.case_type.is_bcp_microcredito
37
+
38
+ @property
39
+ def is_univida_soat(self) -> bool:
40
+ return self.case_type and self.case_type.is_univida_soat
41
+
34
42
  def pending(self, timezone: tzinfo = la_paz_tz):
35
43
  self.status = ProcessingStatus.PENDING
36
44
  self.started_at = None
@@ -9,6 +9,10 @@ class ProcessingCaseType(BaseEnum):
9
9
  def is_bcp_microcredito(self):
10
10
  return self == ProcessingCaseType.BCP_MICROCREDITO
11
11
 
12
+ @property
13
+ def is_univida_soat(self):
14
+ return self == ProcessingCaseType.UNIVIDA_SOAT
15
+
12
16
 
13
17
  class ProcessingDocumentType(BaseEnum):
14
18
  REVIEW_CHECKLIST = 'REVISION_CHECKLIST'
@@ -7,16 +7,21 @@ from typing import Optional
7
7
  class DocumenteClientMixin(object):
8
8
  api_url: str
9
9
  api_key: str
10
+ tenant: Optional[str] = None
10
11
  session: Optional[Session] = None
11
12
 
12
13
  def __post_init__(self):
13
- self.session = Session()
14
+ if self.session is None:
15
+ self.session = Session()
14
16
  self.session.headers.update(self.get_common_headers())
15
17
 
16
18
 
17
19
  def get_common_headers(self) -> dict:
18
- return {
20
+ common_headers = {
19
21
  "X-Api-Key": self.api_key,
20
22
  "Content-Type": "application/json"
21
23
  }
24
+ if self.tenant:
25
+ common_headers.update({"X-Tenant": self.tenant})
26
+ return common_headers
22
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.93
3
+ Version: 0.1.95
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -12,10 +12,10 @@ documente_shared/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
12
12
  documente_shared/domain/base_enum.py,sha256=DojAfn-zQdtjtImeHUpBzE6TBTm07XrbMOdW3h8RVd8,1449
13
13
  documente_shared/domain/constants.py,sha256=NG5BGaXBr_FnzudjTRPxpDpyiSDdaB_PLCdlYlFUQeU,187
14
14
  documente_shared/domain/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- documente_shared/domain/entities/document.py,sha256=AthTUyA-QZE3WAT7lMoKVr_Z8mO_3qERuCnZge0DTLQ,12595
15
+ documente_shared/domain/entities/document.py,sha256=xGZdrqqBkbvDbgoxUvIck6FplXjwLcZzFkcEsuh80u8,12819
16
16
  documente_shared/domain/entities/document_metadata.py,sha256=ygyFIC5qwxlm8DUM5kvVFny9zJfPQS8vNLM2br5XsQ8,2353
17
17
  documente_shared/domain/entities/in_memory_result.py,sha256=0sLNUrovKFQx4M-E9e4DrAiVgch2i4AKA-9BQBRaeI8,1482
18
- documente_shared/domain/entities/processing_case.py,sha256=3zq70K9bMhhWDX-r2sGDDzcSj8dkfE0Vp_2G9YLKTBE,5349
18
+ documente_shared/domain/entities/processing_case.py,sha256=ocPSvy0owiJq0cWnSHLIlY1UgE6Qz3ys0NwF6IxcMI0,5595
19
19
  documente_shared/domain/entities/processing_case_filters.py,sha256=harKyu7QEuL1bI_Z8_UxkVCMo5r9vHeNHyi_Ja07vjs,1953
20
20
  documente_shared/domain/entities/processing_case_item.py,sha256=U_g99AJdlRRJpJ0NPfmXzlr2x04l5hc53oNLxx_Q7XQ,9734
21
21
  documente_shared/domain/entities/processing_case_item_filters.py,sha256=R_AvDCB496Lww1qn2OwtltqULKE3IpcJB0ejnmRkg7Q,2009
@@ -24,7 +24,7 @@ documente_shared/domain/entities/scaling.py,sha256=Me1z3X-5NjzPMX-TBQ4xHwE_44tIJ
24
24
  documente_shared/domain/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  documente_shared/domain/enums/common.py,sha256=wJWYhh98sdCGL_1WodhYLpoT_IYTzkTDOexclpaIM-0,2827
26
26
  documente_shared/domain/enums/document.py,sha256=QwvckW-VJBSujllIVloKlZUh1pI5UnX4oueYbV5CYGw,3205
27
- documente_shared/domain/enums/processing_case.py,sha256=LhFhcoWlockxcpplsVdC6M2kpXn7sOdzQySf24wFhx8,1572
27
+ documente_shared/domain/enums/processing_case.py,sha256=nIXtya6lmEOB0uWKkH4hLWOeBa8_BgKshHiMrGweswQ,1673
28
28
  documente_shared/domain/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  documente_shared/domain/interfaces/scaling.py,sha256=yWAud0rcLKMMf2-QxEE__GRpzqUY0H9_qxlQTfnRYmw,249
30
30
  documente_shared/domain/repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -32,7 +32,7 @@ documente_shared/domain/repositories/document.py,sha256=vJzr6c92gqBzyhaEdjrvnone
32
32
  documente_shared/domain/repositories/processing_case.py,sha256=QcY0LumRokRLmL3IWkOZTgN-LQ-Kku5_v7DWujO1Dfw,778
33
33
  documente_shared/domain/repositories/processing_case_item.py,sha256=uBgJN2fJnZDcKUk018P_Fv25dQRZD5FBxFxsCQNaGAQ,948
34
34
  documente_shared/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- documente_shared/infrastructure/documente_client.py,sha256=paO66zNelDyA6D6iqTXXFVQ9ERRZoJCGWR3T3hySsaM,503
35
+ documente_shared/infrastructure/documente_client.py,sha256=u6k73yIefuEkCsHULMpVCydFzrSXclf_5oQd2D7CkKU,698
36
36
  documente_shared/infrastructure/dynamo_table.py,sha256=TMQbcuty7wjDMbuhI8PbT0IGXelgELsNTtqTEQeZ824,2112
37
37
  documente_shared/infrastructure/lambdas.py,sha256=sGgkw7Mhvuq2TpbW_RNdf5JvQnuzxWYH6gPOVtQ4DtE,357
38
38
  documente_shared/infrastructure/repositories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -48,6 +48,6 @@ documente_shared/infrastructure/services/http_scaling.py,sha256=cIo-61nfIwbtO86E
48
48
  documente_shared/infrastructure/sqs_queue.py,sha256=KZWeHZ9zmXmrxoNpOQX7GEdDhZ1knbPXgwSwFwJblGg,1504
49
49
  documente_shared/presentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  documente_shared/presentation/presenters.py,sha256=GGAEwefmjCIVepsUA2oZOVLxXbhhiISPM0Jgt6dT6O0,423
51
- documente_shared-0.1.93.dist-info/METADATA,sha256=YSvwdn6kKI2_1xOaKGIhUcY4X60uPnJrt0odePZrQvU,920
52
- documente_shared-0.1.93.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
- documente_shared-0.1.93.dist-info/RECORD,,
51
+ documente_shared-0.1.95.dist-info/METADATA,sha256=JWiCUhfkk8hqIbbJbmT8R-Ad4p6gsqlw8aYQv6tiKVc,920
52
+ documente_shared-0.1.95.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
53
+ documente_shared-0.1.95.dist-info/RECORD,,