mbu-dev-shared-components 0.0.34__tar.gz → 0.0.36__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.34/mbu_dev_shared_components.egg-info → mbu_dev_shared_components-0.0.36}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/getorganized/cases.py +6 -7
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/getorganized/documents.py +4 -5
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/getorganized/objects.py +7 -8
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36/mbu_dev_shared_components.egg-info}/PKG-INFO +1 -1
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/.gitignore +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/LICENSE +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/README.md +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/getorganized/auth.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/office365/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/office365/excel/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/office365/excel/excel_reader.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/office365/sharepoint_api/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/office365/sharepoint_api/files.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/os2forms/documents.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/sap/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/utils/__init__.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components/utils/json_handler.py +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/pyproject.toml +0 -0
- {mbu_dev_shared_components-0.0.34 → mbu_dev_shared_components-0.0.36}/setup.cfg +0 -0
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"""This module has functions to do with case related calls
|
|
2
2
|
to the GetOrganized api."""
|
|
3
|
-
from typing import Dict, Any
|
|
4
3
|
import requests
|
|
5
4
|
from mbu_dev_shared_components.getorganized.auth import get_ntlm_go_api_credentials
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
def find_case_by_case_properties(case_data:
|
|
7
|
+
def find_case_by_case_properties(case_data: str, api_endpoint: str, api_username: str, api_password: str) -> requests.Response:
|
|
9
8
|
"""
|
|
10
9
|
Sends a POST request to search for cases based on specific case properties provided in `case_data`.
|
|
11
10
|
|
|
12
11
|
Parameters:
|
|
13
|
-
case_data (
|
|
12
|
+
case_data (str): A JSON string containing case properties to filter cases by in the API search.
|
|
14
13
|
api_endpoint (str): GetOrganized API endpoint.
|
|
15
14
|
api_username (str): The API username for GetOrganized API.
|
|
16
15
|
api_password (str): The API password for GetOrganized API.
|
|
@@ -27,12 +26,12 @@ def find_case_by_case_properties(case_data: Dict[str, Any], api_endpoint: str, a
|
|
|
27
26
|
return response
|
|
28
27
|
|
|
29
28
|
|
|
30
|
-
def create_case_folder(case_data:
|
|
29
|
+
def create_case_folder(case_data: str, api_endpoint: str, api_username: str, api_password: str) -> requests.Response:
|
|
31
30
|
"""
|
|
32
31
|
Sends a POST request to create a new case folder with the provided `case_data`.
|
|
33
32
|
|
|
34
33
|
Parameters:
|
|
35
|
-
case_data (
|
|
34
|
+
case_data (str): A JSON string containing the data required to create a new case folder.
|
|
36
35
|
api_endpoint (str): GetOrganized API endpoint.
|
|
37
36
|
api_username (str): The API username for GetOrganized API.
|
|
38
37
|
api_password (str): The API password for GetOrganized API.
|
|
@@ -49,12 +48,12 @@ def create_case_folder(case_data: Dict[str, Any], api_endpoint: str, api_usernam
|
|
|
49
48
|
return response
|
|
50
49
|
|
|
51
50
|
|
|
52
|
-
def create_case(case_data:
|
|
51
|
+
def create_case(case_data: str, api_endpoint: str, api_username: str, api_password: str) -> requests.Response:
|
|
53
52
|
"""
|
|
54
53
|
Sends a POST request to create a new case in the system with the specified `case_data`.
|
|
55
54
|
|
|
56
55
|
Parameters:
|
|
57
|
-
case_data (
|
|
56
|
+
case_data (str): A JSON string containing the data required to create a new case.
|
|
58
57
|
api_endpoint (str): GetOrganized API endpoint.
|
|
59
58
|
api_username (str): The API username for GetOrganized API.
|
|
60
59
|
api_password (str): The API password for GetOrganized API.
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"""This module..."""
|
|
2
|
-
from typing import Dict, Any
|
|
3
2
|
import requests
|
|
4
3
|
from mbu_dev_shared_components.getorganized.auth import get_ntlm_go_api_credentials
|
|
5
4
|
|
|
6
5
|
|
|
7
|
-
def upload_file_to_case(file_data:
|
|
6
|
+
def upload_file_to_case(file_data: str, api_endpoint: str, api_username: str, api_password: str) -> requests.Response:
|
|
8
7
|
"""
|
|
9
8
|
Uploads a file to a case by sending file data as a JSON payload to a specific API endpoint.
|
|
10
9
|
The function uses NTLM authentication and expects an environment variable for the API base URL.
|
|
11
10
|
|
|
12
11
|
Parameters:
|
|
13
|
-
file_data (
|
|
12
|
+
file_data (str): A JSON string containing file data and associated case information to be uploaded.
|
|
14
13
|
api_endpoint (str): GetOrganized API endpoint.
|
|
15
14
|
api_username (str): The API username for GetOrganized API.
|
|
16
15
|
api_password (str): The API password for GetOrganized API.
|
|
@@ -27,7 +26,7 @@ def upload_file_to_case(file_data: Dict[str, Any], api_endpoint: str, api_userna
|
|
|
27
26
|
return response
|
|
28
27
|
|
|
29
28
|
|
|
30
|
-
def mark_file_as_case_record(documents_id: list, api_endpoint: str, api_username: str, api_password: str) ->
|
|
29
|
+
def mark_file_as_case_record(documents_id: list, api_endpoint: str, api_username: str, api_password: str) -> requests.Response:
|
|
31
30
|
"""
|
|
32
31
|
Marks one or more documents by their IDs as case records in the system via a POST request to a specific API endpoint.
|
|
33
32
|
This operation modifies the status of the documents to reflect their new role as official case records.
|
|
@@ -50,4 +49,4 @@ def mark_file_as_case_record(documents_id: list, api_endpoint: str, api_username
|
|
|
50
49
|
print(payload)
|
|
51
50
|
response = requests.request(method='POST', url=api_endpoint, headers=headers, json=payload, auth=get_ntlm_go_api_credentials(api_username, api_password), timeout=60)
|
|
52
51
|
|
|
53
|
-
return response
|
|
52
|
+
return response
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
This module contains classes relating data to be used in API requests to
|
|
3
3
|
GetOrganized when working with cases and documents.
|
|
4
4
|
"""
|
|
5
|
-
import json
|
|
6
5
|
import dataclasses
|
|
7
|
-
from typing import Literal
|
|
6
|
+
from typing import Literal
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
CaseTypePrefix = Literal["BOR", "EMN", "PPR", "AKT", "ELM", "PER", "GEO", "SAM", "MOD"]
|
|
@@ -16,7 +15,7 @@ class CaseDataJson:
|
|
|
16
15
|
|
|
17
16
|
This class provides a method to serialize case data into a JSON format.
|
|
18
17
|
"""
|
|
19
|
-
def case_data_json(self, case_type_prefix: CaseTypePrefix, metadata_xml: str, return_when_case_fully_created: bool) ->
|
|
18
|
+
def case_data_json(self, case_type_prefix: CaseTypePrefix, metadata_xml: str, return_when_case_fully_created: bool) -> str:
|
|
20
19
|
"""
|
|
21
20
|
Creates a JSON string representing a case with the provided attributes.
|
|
22
21
|
|
|
@@ -33,9 +32,9 @@ class CaseDataJson:
|
|
|
33
32
|
"MetadataXml": metadata_xml,
|
|
34
33
|
"ReturnWhenCaseFullyCreated": return_when_case_fully_created
|
|
35
34
|
}
|
|
36
|
-
return
|
|
35
|
+
return case_data
|
|
37
36
|
|
|
38
|
-
def search_case_folder_data_json(self, case_type_prefix: CaseTypePrefix, person_full_name: str, person_id: str, person_ssn: str) ->
|
|
37
|
+
def search_case_folder_data_json(self, case_type_prefix: CaseTypePrefix, person_full_name: str, person_id: str, person_ssn: str) -> str:
|
|
39
38
|
"""
|
|
40
39
|
Creates a JSON string representing a search string for case folder with the provided attributes.
|
|
41
40
|
|
|
@@ -72,7 +71,7 @@ class CaseDataJson:
|
|
|
72
71
|
"ExcludeDeletedCases": "True",
|
|
73
72
|
"ReturnCasesNumber": "1"
|
|
74
73
|
}
|
|
75
|
-
return
|
|
74
|
+
return search_case_folder_data
|
|
76
75
|
|
|
77
76
|
|
|
78
77
|
@dataclasses.dataclass
|
|
@@ -83,7 +82,7 @@ class DocumentJsonCreator:
|
|
|
83
82
|
|
|
84
83
|
This class is used to serialize document attributes into a JSON format.
|
|
85
84
|
"""
|
|
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) ->
|
|
85
|
+
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:
|
|
87
86
|
"""
|
|
88
87
|
Creates a JSON string representing a document with the provided attributes.
|
|
89
88
|
|
|
@@ -108,4 +107,4 @@ class DocumentJsonCreator:
|
|
|
108
107
|
"Overwrite": overwrite,
|
|
109
108
|
"Bytes": data_in_bytes
|
|
110
109
|
}
|
|
111
|
-
return
|
|
110
|
+
return 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
|