mbu-dev-shared-components 0.0.33__tar.gz → 0.0.34__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.
- {mbu_dev_shared_components-0.0.33/mbu_dev_shared_components.egg-info → mbu_dev_shared_components-0.0.34}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/getorganized/objects.py +17 -13
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34/mbu_dev_shared_components.egg-info}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/.gitignore +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/LICENSE +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/README.md +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/getorganized/auth.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/getorganized/cases.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/getorganized/documents.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/office365/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/office365/excel/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/office365/excel/excel_reader.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/office365/sharepoint_api/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/office365/sharepoint_api/files.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/os2forms/documents.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/sap/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/utils/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components/utils/json_handler.py +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/pyproject.toml +0 -0
- {mbu_dev_shared_components-0.0.33 → mbu_dev_shared_components-0.0.34}/setup.cfg +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
"""
|
|
2
|
-
|
|
1
|
+
"""
|
|
2
|
+
This module contains classes relating data to be used in API requests to
|
|
3
|
+
GetOrganized when working with cases and documents.
|
|
4
|
+
"""
|
|
3
5
|
import json
|
|
4
6
|
import dataclasses
|
|
5
|
-
from typing import Literal
|
|
7
|
+
from typing import Literal, Dict, Any
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
CaseTypePrefix = Literal["BOR", "EMN", "PPR", "AKT", "ELM", "PER", "GEO", "SAM", "MOD"]
|
|
@@ -14,7 +16,7 @@ class CaseDataJson:
|
|
|
14
16
|
|
|
15
17
|
This class provides a method to serialize case data into a JSON format.
|
|
16
18
|
"""
|
|
17
|
-
def case_data_json(self, case_type_prefix: CaseTypePrefix, metadata_xml: str, return_when_case_fully_created: bool) -> str:
|
|
19
|
+
def case_data_json(self, case_type_prefix: CaseTypePrefix, metadata_xml: str, return_when_case_fully_created: bool) -> Dict[str, Any]:
|
|
18
20
|
"""
|
|
19
21
|
Creates a JSON string representing a case with the provided attributes.
|
|
20
22
|
|
|
@@ -24,25 +26,27 @@ class CaseDataJson:
|
|
|
24
26
|
return_when_case_fully_created (bool): A flag indicating whether to wait for the case to be fully created before returning.
|
|
25
27
|
|
|
26
28
|
Returns:
|
|
27
|
-
|
|
29
|
+
dict: A dictionary representing the case data in JSON format.
|
|
28
30
|
"""
|
|
29
31
|
case_data = {
|
|
30
32
|
"CaseTypePrefix": case_type_prefix,
|
|
31
33
|
"MetadataXml": metadata_xml,
|
|
32
34
|
"ReturnWhenCaseFullyCreated": return_when_case_fully_created
|
|
33
35
|
}
|
|
34
|
-
return json.
|
|
36
|
+
return json.loads(case_data)
|
|
35
37
|
|
|
36
|
-
def search_case_folder_data_json(self, case_type_prefix: CaseTypePrefix, person_full_name: str, person_id: str, person_ssn: str) -> str:
|
|
38
|
+
def search_case_folder_data_json(self, case_type_prefix: CaseTypePrefix, person_full_name: str, person_id: str, person_ssn: str) -> Dict[str, Any]:
|
|
37
39
|
"""
|
|
38
40
|
Creates a JSON string representing a search string for case folder with the provided attributes.
|
|
39
41
|
|
|
40
42
|
Parameters:
|
|
41
43
|
case_type_prefix (CaseTypePrefix): The prefix indicating the type of the case. Must be one of the predefined literal values.
|
|
42
|
-
|
|
44
|
+
person_full_name (str): The full name of the person associated with the case.
|
|
45
|
+
person_id (str): The ID of the person associated with the case.
|
|
46
|
+
person_ssn (str): The Social Security Number of the person associated with the case.
|
|
43
47
|
|
|
44
48
|
Returns:
|
|
45
|
-
|
|
49
|
+
dict: A dictionary representing the search criteria for the case folder in JSON format.
|
|
46
50
|
"""
|
|
47
51
|
search_case_folder_data = {
|
|
48
52
|
"FieldProperties": [
|
|
@@ -68,7 +72,7 @@ class CaseDataJson:
|
|
|
68
72
|
"ExcludeDeletedCases": "True",
|
|
69
73
|
"ReturnCasesNumber": "1"
|
|
70
74
|
}
|
|
71
|
-
return json.
|
|
75
|
+
return json.loads(search_case_folder_data)
|
|
72
76
|
|
|
73
77
|
|
|
74
78
|
@dataclasses.dataclass
|
|
@@ -79,7 +83,7 @@ class DocumentJsonCreator:
|
|
|
79
83
|
|
|
80
84
|
This class is used to serialize document attributes into a JSON format.
|
|
81
85
|
"""
|
|
82
|
-
def document_data_json(self, case_id: str, list_name: str, folder_path: str, filename: str, metadata: str, overwrite: bool, data_in_bytes: bytes) -> str:
|
|
86
|
+
def document_data_json(self, case_id: str, list_name: str, folder_path: str, filename: str, metadata: str, overwrite: bool, data_in_bytes: bytes) -> Dict[str, Any]:
|
|
83
87
|
"""
|
|
84
88
|
Creates a JSON string representing a document with the provided attributes.
|
|
85
89
|
|
|
@@ -93,7 +97,7 @@ class DocumentJsonCreator:
|
|
|
93
97
|
data_in_bytes (bytes): The binary data of the file being represented.
|
|
94
98
|
|
|
95
99
|
Returns:
|
|
96
|
-
|
|
100
|
+
dict: A dictionary representing the document data in JSON format.
|
|
97
101
|
"""
|
|
98
102
|
document_data = {
|
|
99
103
|
"CaseId": case_id,
|
|
@@ -104,4 +108,4 @@ class DocumentJsonCreator:
|
|
|
104
108
|
"Overwrite": overwrite,
|
|
105
109
|
"Bytes": data_in_bytes
|
|
106
110
|
}
|
|
107
|
-
return json.
|
|
111
|
+
return json.loads(document_data)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|