mbu-dev-shared-components 4.2.8__tar.gz → 4.3.0__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-4.2.8 → mbu_dev_shared_components-4.3.0}/PKG-INFO +1 -1
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/database/constants.py +61 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components.egg-info/PKG-INFO +1 -1
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/pyproject.toml +1 -1
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/LICENSE +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/README.md +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/database/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/database/connection.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/database/logging.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/database/utility.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/getorganized/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/getorganized/auth.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/getorganized/cases.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/getorganized/contacts.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/getorganized/documents.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/getorganized/objects.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/google/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/google/api/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/google/api/auth.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/google/workspace/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/google/workspace/alerts.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/msoffice365/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/msoffice365/excel/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/msoffice365/excel/excel_reader.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/msoffice365/sharepoint_api/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/msoffice365/sharepoint_api/files.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/os2forms/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/os2forms/documents.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/os2forms/forms.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/romexis/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/romexis/db_handler.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/romexis/helper_functions.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/sap/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/sap/create_invoice.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/aftalebog.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/app_handler.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/appointment.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/base_ui.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/clinic.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/document.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/edi_portal.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/event.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/exceptions.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/handler_base.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/journal_note.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/application/patient.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/database/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/solteqtand/database/db_handler.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/utils/__init__.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/utils/db_stored_procedure_executor.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/utils/fernet_encryptor.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/utils/file_handler.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components/utils/json_handler.py +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components.egg-info/requires.txt +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/mbu_dev_shared_components.egg-info/top_level.txt +0 -0
- {mbu_dev_shared_components-4.2.8 → mbu_dev_shared_components-4.3.0}/setup.cfg +0 -0
|
@@ -25,6 +25,31 @@ class Constants:
|
|
|
25
25
|
return {"constant_name": name, "value": value}
|
|
26
26
|
raise ValueError(f"No constant found with name: {constant_name}")
|
|
27
27
|
|
|
28
|
+
def update_constant(self, constant_name: str, new_value: str, changed_at: datetime | None = None):
|
|
29
|
+
if not new_value:
|
|
30
|
+
raise ValueError("new_value must be provided")
|
|
31
|
+
|
|
32
|
+
if changed_at is None:
|
|
33
|
+
changed_at = datetime.now()
|
|
34
|
+
|
|
35
|
+
query = """
|
|
36
|
+
UPDATE [RPA].[rpa].[Constants]
|
|
37
|
+
SET
|
|
38
|
+
value = ?,
|
|
39
|
+
changed_at = ?
|
|
40
|
+
WHERE
|
|
41
|
+
name = ?
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
rows_affected = self.execute_query(
|
|
45
|
+
query,
|
|
46
|
+
[new_value, changed_at, constant_name],
|
|
47
|
+
return_rowcount=True
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
if rows_affected == 0:
|
|
51
|
+
raise ValueError(f"No constant found with name: {constant_name}")
|
|
52
|
+
|
|
28
53
|
def add_credential(self, credential_name: str, username: str, password: str,
|
|
29
54
|
changed_at: datetime = datetime.now()):
|
|
30
55
|
encryptor = Encryptor()
|
|
@@ -52,3 +77,39 @@ class Constants:
|
|
|
52
77
|
"encrypted_password": encrypted_password
|
|
53
78
|
}
|
|
54
79
|
raise ValueError(f"No credential found with name {credential_name}")
|
|
80
|
+
|
|
81
|
+
def update_credential(self, credential_name: str, new_username: str | None = None, new_password: str | None = None, changed_at: datetime | None = None):
|
|
82
|
+
if not new_username and not new_password:
|
|
83
|
+
raise ValueError("At least one of new_username or new_password must be provided")
|
|
84
|
+
|
|
85
|
+
if changed_at is None:
|
|
86
|
+
changed_at = datetime.now()
|
|
87
|
+
|
|
88
|
+
fields = []
|
|
89
|
+
values = []
|
|
90
|
+
|
|
91
|
+
if new_username:
|
|
92
|
+
fields.append("username = ?")
|
|
93
|
+
values.append(new_username)
|
|
94
|
+
|
|
95
|
+
if new_password:
|
|
96
|
+
encryptor = Encryptor()
|
|
97
|
+
encrypted_password = encryptor.encrypt(new_password)
|
|
98
|
+
fields.append("password = ?")
|
|
99
|
+
values.append(encrypted_password)
|
|
100
|
+
|
|
101
|
+
fields.append("changed_at = ?")
|
|
102
|
+
values.append(changed_at)
|
|
103
|
+
|
|
104
|
+
query = f"""
|
|
105
|
+
UPDATE [RPA].[rpa].[Credentials]
|
|
106
|
+
SET {", ".join(fields)}
|
|
107
|
+
WHERE name = ?
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
values.append(credential_name)
|
|
111
|
+
|
|
112
|
+
rows_affected = self.execute_query(query, values, return_rowcount=True)
|
|
113
|
+
|
|
114
|
+
if rows_affected == 0:
|
|
115
|
+
raise ValueError(f"No credential found with name: {credential_name}")
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|