itk-dev-shared-components 2.12.0__tar.gz → 2.13.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.
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/PKG-INFO +1 -1
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/nova_cases.py +26 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/fmcacov.py +14 -7
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components.egg-info/PKG-INFO +1 -1
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/pyproject.toml +1 -1
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/LICENSE +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/README.md +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/eflyt/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/eflyt/eflyt_case.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/eflyt/eflyt_login.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/eflyt/eflyt_search.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/eflyt/eflyt_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/getorganized/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/getorganized/go_api.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/graph/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/graph/authentication.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/graph/common.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/graph/file.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/graph/mail.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/graph/site.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/authentication.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/cpr.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/nova_documents.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/nova_notes.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/nova_objects.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/nova_tasks.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/kmd_nova/util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/misc/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/misc/address_lookup.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/misc/cpr_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/misc/cvr_lookup.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/misc/file_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/gridview_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/multi_session.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/opret_kundekontakt.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/sap_login.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/sap_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/sap/tree_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/smtp/__init__.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components/smtp/smtp_util.py +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components.egg-info/SOURCES.txt +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components.egg-info/dependency_links.txt +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components.egg-info/requires.txt +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/itk_dev_shared_components.egg-info/top_level.txt +0 -0
- {itk_dev_shared_components-2.12.0 → itk_dev_shared_components-2.13.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: itk_dev_shared_components
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.13.0
|
|
4
4
|
Summary: Shared components to use in RPA projects
|
|
5
5
|
Author-email: ITK Development <itk-rpa@mkb.aarhus.dk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/itk-dev-rpa/itk-dev-shared-components
|
|
@@ -3,6 +3,7 @@ to the KMD Nova api."""
|
|
|
3
3
|
|
|
4
4
|
import uuid
|
|
5
5
|
import urllib.parse
|
|
6
|
+
from typing import Literal
|
|
6
7
|
|
|
7
8
|
import requests
|
|
8
9
|
|
|
@@ -348,3 +349,28 @@ def add_case(case: NovaCase, nova_access: NovaAccess):
|
|
|
348
349
|
|
|
349
350
|
response = requests.post(url, params=params, headers=headers, json=payload, timeout=60)
|
|
350
351
|
response.raise_for_status()
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
def set_case_state(case_uuid: str, new_state: Literal["Opstaaet", "Oplyst", "Afgjort", "Bestilt", "Udfoert", "Afsluttet"], nova_access: NovaAccess):
|
|
355
|
+
"""Set the state of an existing case.
|
|
356
|
+
|
|
357
|
+
Args:
|
|
358
|
+
case_uuid: The uuid of the case.
|
|
359
|
+
new_state: The new state of the case.
|
|
360
|
+
nova_access: The NovaAccess object used to authenticate.
|
|
361
|
+
"""
|
|
362
|
+
url = urllib.parse.urljoin(nova_access.domain, "api/Case/Update")
|
|
363
|
+
params = {"api-version": "2.0-Case"}
|
|
364
|
+
|
|
365
|
+
headers = {'Content-Type': 'application/json', 'Authorization': f"Bearer {nova_access.get_bearer_token()}"}
|
|
366
|
+
|
|
367
|
+
payload = {
|
|
368
|
+
"common": {
|
|
369
|
+
"transactionId": str(uuid.uuid4()),
|
|
370
|
+
"uuid": case_uuid
|
|
371
|
+
},
|
|
372
|
+
"state": new_state
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
response = requests.patch(url, params=params, headers=headers, json=payload, timeout=60)
|
|
376
|
+
response.raise_for_status()
|
|
@@ -10,7 +10,7 @@ def open_forretningspartner(session, fp: str) -> None:
|
|
|
10
10
|
fp: The forretningspartner number.
|
|
11
11
|
|
|
12
12
|
Raises:
|
|
13
|
-
|
|
13
|
+
LookupError: If the forretningspartner wasn't found.
|
|
14
14
|
"""
|
|
15
15
|
session.StartTransaction('fmcacov')
|
|
16
16
|
|
|
@@ -18,10 +18,18 @@ def open_forretningspartner(session, fp: str) -> None:
|
|
|
18
18
|
session.findById("wnd[0]/usr/ctxtGPART_DYN").text = fp
|
|
19
19
|
session.findById("wnd[0]").sendVKey(0)
|
|
20
20
|
|
|
21
|
-
# Detect
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
# Detect popup
|
|
22
|
+
popup = session.findById('wnd[1]', False)
|
|
23
|
+
|
|
24
|
+
# Inactive FP popup
|
|
25
|
+
if popup and popup.Text == "BP inactive":
|
|
26
|
+
# Click 'OK'
|
|
27
|
+
session.FindById("wnd[1]/tbar[0]/btn[25]").press()
|
|
28
|
+
|
|
29
|
+
# "Forretningspartner 2 Entries" popup
|
|
30
|
+
elif popup and popup.Text == 'Forretningspartner 2 Entries':
|
|
31
|
+
# Look for matching fp number
|
|
32
|
+
for row_id in (3, 4):
|
|
25
33
|
fp_row = session.FindById(f'wnd[1]/usr/lbl[103,{row_id}]')
|
|
26
34
|
if fp_row.text == fp:
|
|
27
35
|
fp_row.SetFocus()
|
|
@@ -29,8 +37,7 @@ def open_forretningspartner(session, fp: str) -> None:
|
|
|
29
37
|
session.FindById('wnd[1]/tbar[0]/btn[0]').press()
|
|
30
38
|
break
|
|
31
39
|
else:
|
|
32
|
-
|
|
33
|
-
raise ValueError(f"Forretningspartner '{fp}' was not found in pop-up.")
|
|
40
|
+
raise LookupError(f"Forretningspartner '{fp}' was not found in pop-up.")
|
|
34
41
|
|
|
35
42
|
|
|
36
43
|
def dismiss_key_popup(session, fp: str = "25564617") -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: itk_dev_shared_components
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.13.0
|
|
4
4
|
Summary: Shared components to use in RPA projects
|
|
5
5
|
Author-email: ITK Development <itk-rpa@mkb.aarhus.dk>
|
|
6
6
|
Project-URL: Homepage, https://github.com/itk-dev-rpa/itk-dev-shared-components
|
|
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
|