pyxecm 3.0.0__py3-none-any.whl → 3.1.0__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 pyxecm might be problematic. Click here for more details.
- pyxecm/avts.py +4 -4
- pyxecm/coreshare.py +14 -15
- pyxecm/helper/data.py +2 -1
- pyxecm/helper/web.py +11 -11
- pyxecm/helper/xml.py +41 -10
- pyxecm/otac.py +1 -1
- pyxecm/otawp.py +19 -19
- pyxecm/otca.py +870 -67
- pyxecm/otcs.py +1567 -280
- pyxecm/otds.py +332 -153
- pyxecm/otkd.py +4 -4
- pyxecm/otmm.py +1 -1
- pyxecm/otpd.py +246 -30
- pyxecm-3.1.0.dist-info/METADATA +127 -0
- pyxecm-3.1.0.dist-info/RECORD +82 -0
- pyxecm_api/app.py +45 -35
- pyxecm_api/auth/functions.py +2 -2
- pyxecm_api/auth/router.py +2 -3
- pyxecm_api/common/functions.py +164 -12
- pyxecm_api/settings.py +0 -8
- pyxecm_api/terminal/router.py +1 -1
- pyxecm_api/v1_csai/router.py +33 -18
- pyxecm_customizer/browser_automation.py +98 -48
- pyxecm_customizer/customizer.py +43 -25
- pyxecm_customizer/guidewire.py +422 -8
- pyxecm_customizer/k8s.py +23 -27
- pyxecm_customizer/knowledge_graph.py +501 -20
- pyxecm_customizer/m365.py +45 -44
- pyxecm_customizer/payload.py +1684 -1159
- pyxecm_customizer/payload_list.py +3 -0
- pyxecm_customizer/salesforce.py +122 -79
- pyxecm_customizer/servicenow.py +27 -7
- pyxecm_customizer/settings.py +3 -1
- pyxecm_customizer/successfactors.py +2 -2
- pyxecm_customizer/translate.py +1 -1
- pyxecm-3.0.0.dist-info/METADATA +0 -48
- pyxecm-3.0.0.dist-info/RECORD +0 -96
- pyxecm_api/agents/__init__.py +0 -7
- pyxecm_api/agents/app.py +0 -13
- pyxecm_api/agents/functions.py +0 -119
- pyxecm_api/agents/models.py +0 -10
- pyxecm_api/agents/otcm_knowledgegraph/__init__.py +0 -1
- pyxecm_api/agents/otcm_knowledgegraph/functions.py +0 -85
- pyxecm_api/agents/otcm_knowledgegraph/models.py +0 -61
- pyxecm_api/agents/otcm_knowledgegraph/router.py +0 -74
- pyxecm_api/agents/otcm_user_agent/__init__.py +0 -1
- pyxecm_api/agents/otcm_user_agent/models.py +0 -20
- pyxecm_api/agents/otcm_user_agent/router.py +0 -65
- pyxecm_api/agents/otcm_workspace_agent/__init__.py +0 -1
- pyxecm_api/agents/otcm_workspace_agent/models.py +0 -40
- pyxecm_api/agents/otcm_workspace_agent/router.py +0 -200
- {pyxecm-3.0.0.dist-info → pyxecm-3.1.0.dist-info}/WHEEL +0 -0
- {pyxecm-3.0.0.dist-info → pyxecm-3.1.0.dist-info}/entry_points.txt +0 -0
|
@@ -796,6 +796,9 @@ class PayloadList:
|
|
|
796
796
|
|
|
797
797
|
# end def run_and_complete_payload()
|
|
798
798
|
|
|
799
|
+
# add delay here to allow for logging to work reliably for the the first payload
|
|
800
|
+
time.sleep(10)
|
|
801
|
+
|
|
799
802
|
while not self._stopped:
|
|
800
803
|
# Get runnable items as subset of the initial data frame:
|
|
801
804
|
runnable_items: pd.DataFrame = self.pick_runnables()
|
pyxecm_customizer/salesforce.py
CHANGED
|
@@ -24,8 +24,8 @@ REQUEST_LOGIN_HEADERS = {
|
|
|
24
24
|
"Accept": "application/json",
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
REQUEST_TIMEOUT = 60
|
|
28
|
-
REQUEST_RETRY_DELAY = 20
|
|
27
|
+
REQUEST_TIMEOUT = 60.0
|
|
28
|
+
REQUEST_RETRY_DELAY = 20.0
|
|
29
29
|
REQUEST_MAX_RETRIES = 3
|
|
30
30
|
|
|
31
31
|
SALESFORCE_API_VERSION = "v60.0"
|
|
@@ -199,7 +199,7 @@ class Salesforce:
|
|
|
199
199
|
json_data: dict | None = None,
|
|
200
200
|
files: dict | None = None,
|
|
201
201
|
params: dict | None = None,
|
|
202
|
-
timeout:
|
|
202
|
+
timeout: float | None = REQUEST_TIMEOUT,
|
|
203
203
|
show_error: bool = True,
|
|
204
204
|
show_warning: bool = False,
|
|
205
205
|
warning_message: str = "",
|
|
@@ -231,7 +231,7 @@ class Salesforce:
|
|
|
231
231
|
Add key-value pairs to the query string of the URL.
|
|
232
232
|
When you use the params parameter, requests automatically appends
|
|
233
233
|
the key-value pairs to the URL as part of the query string
|
|
234
|
-
timeout (
|
|
234
|
+
timeout (float | None, optional):
|
|
235
235
|
Timeout for the request in seconds. Defaults to REQUEST_TIMEOUT.
|
|
236
236
|
show_error (bool, optional):
|
|
237
237
|
Whether or not an error should be logged in case of a failed REST call.
|
|
@@ -267,7 +267,7 @@ class Salesforce:
|
|
|
267
267
|
|
|
268
268
|
if headers is None:
|
|
269
269
|
self.logger.error(
|
|
270
|
-
"Missing request header. Cannot send request to
|
|
270
|
+
"Missing request header. Cannot send request to Salesforce!",
|
|
271
271
|
)
|
|
272
272
|
return None
|
|
273
273
|
|
|
@@ -370,7 +370,7 @@ class Salesforce:
|
|
|
370
370
|
time.sleep(REQUEST_RETRY_DELAY) # Add a delay before retrying
|
|
371
371
|
else:
|
|
372
372
|
self.logger.error(
|
|
373
|
-
"%s; connection error
|
|
373
|
+
"%s; connection error!",
|
|
374
374
|
failure_message,
|
|
375
375
|
)
|
|
376
376
|
if retry_forever:
|
|
@@ -449,7 +449,7 @@ class Salesforce:
|
|
|
449
449
|
|
|
450
450
|
Args:
|
|
451
451
|
response (dict):
|
|
452
|
-
REST response from an Salesforce API call
|
|
452
|
+
REST response from an Salesforce API call.
|
|
453
453
|
key (str):
|
|
454
454
|
The property name (key) of the item to lookup.
|
|
455
455
|
value (str):
|
|
@@ -536,7 +536,7 @@ class Salesforce:
|
|
|
536
536
|
Returns:
|
|
537
537
|
str | None:
|
|
538
538
|
The Access token. Also stores access token in self._access_token.
|
|
539
|
-
None in case of error
|
|
539
|
+
None in case of error.
|
|
540
540
|
|
|
541
541
|
"""
|
|
542
542
|
|
|
@@ -604,12 +604,16 @@ class Salesforce:
|
|
|
604
604
|
"""Get the ID of a given Salesforce object with a given type and name.
|
|
605
605
|
|
|
606
606
|
Args:
|
|
607
|
-
object_type (str):
|
|
608
|
-
|
|
609
|
-
|
|
607
|
+
object_type (str):
|
|
608
|
+
The Salesforce object type, like "Account", "Case", ...
|
|
609
|
+
name (str):
|
|
610
|
+
The name of the Salesforce object.
|
|
611
|
+
name_field (str, optional):
|
|
612
|
+
The field where the name is stored. Defaults to "Name".
|
|
610
613
|
|
|
611
614
|
Returns:
|
|
612
|
-
|
|
615
|
+
str | None:
|
|
616
|
+
Object ID or None if the request fails.
|
|
613
617
|
|
|
614
618
|
"""
|
|
615
619
|
|
|
@@ -650,17 +654,21 @@ class Salesforce:
|
|
|
650
654
|
"""Get a Salesforce object based on a defined field value and return selected result fields.
|
|
651
655
|
|
|
652
656
|
Args:
|
|
653
|
-
object_type (str):
|
|
654
|
-
|
|
655
|
-
|
|
657
|
+
object_type (str):
|
|
658
|
+
The Salesforce Business Object type. Such as "Account" or "Case".
|
|
659
|
+
search_field (str):
|
|
660
|
+
The object field to search in.
|
|
661
|
+
search_value (str):
|
|
662
|
+
The value to search for.
|
|
656
663
|
result_fields (list | None):
|
|
657
|
-
|
|
664
|
+
The list of fields to return. If None, then all standard fields
|
|
658
665
|
of the object will be returned.
|
|
659
666
|
limit (int, optional):
|
|
660
667
|
The maximum number of fields to return. Salesforce enforces 200 as upper limit.
|
|
661
668
|
|
|
662
669
|
Returns:
|
|
663
|
-
dict | None:
|
|
670
|
+
dict | None:
|
|
671
|
+
Dictionary with the Salesforce object data.
|
|
664
672
|
|
|
665
673
|
Example:
|
|
666
674
|
{
|
|
@@ -742,7 +750,8 @@ class Salesforce:
|
|
|
742
750
|
on the object type.
|
|
743
751
|
|
|
744
752
|
Returns:
|
|
745
|
-
dict | None:
|
|
753
|
+
dict | None:
|
|
754
|
+
Dictionary with the Salesforce object data or None if the request fails.
|
|
746
755
|
|
|
747
756
|
"""
|
|
748
757
|
|
|
@@ -824,10 +833,12 @@ class Salesforce:
|
|
|
824
833
|
"""Get a group ID by group name.
|
|
825
834
|
|
|
826
835
|
Args:
|
|
827
|
-
group_name (str):
|
|
836
|
+
group_name (str):
|
|
837
|
+
The name of the Group.
|
|
828
838
|
|
|
829
839
|
Returns:
|
|
830
|
-
|
|
840
|
+
str | None:
|
|
841
|
+
The technical Salesforce ID of the group.
|
|
831
842
|
|
|
832
843
|
"""
|
|
833
844
|
|
|
@@ -844,7 +855,7 @@ class Salesforce:
|
|
|
844
855
|
|
|
845
856
|
Args:
|
|
846
857
|
group_id (str):
|
|
847
|
-
ID of the Salesforce group to retrieve.
|
|
858
|
+
The ID of the Salesforce group to retrieve.
|
|
848
859
|
|
|
849
860
|
Returns:
|
|
850
861
|
dict | None:
|
|
@@ -884,11 +895,14 @@ class Salesforce:
|
|
|
884
895
|
"""Add a new Salesforce group.
|
|
885
896
|
|
|
886
897
|
Args:
|
|
887
|
-
group_name (str):
|
|
888
|
-
|
|
898
|
+
group_name (str):
|
|
899
|
+
The name of the new Salesforce group.
|
|
900
|
+
group_type (str, optional):
|
|
901
|
+
The type of the group. Default is "Regular".
|
|
889
902
|
|
|
890
903
|
Returns:
|
|
891
|
-
dict | None:
|
|
904
|
+
dict | None:
|
|
905
|
+
Dictionary with the Salesforce Group data or None if the request fails.
|
|
892
906
|
|
|
893
907
|
Example:
|
|
894
908
|
{
|
|
@@ -932,11 +946,14 @@ class Salesforce:
|
|
|
932
946
|
"""Update a Salesforce group.
|
|
933
947
|
|
|
934
948
|
Args:
|
|
935
|
-
group_id (str):
|
|
936
|
-
|
|
949
|
+
group_id (str):
|
|
950
|
+
The Salesforce group ID.
|
|
951
|
+
update_data (dict):
|
|
952
|
+
A dictionary containing the fields to update.
|
|
937
953
|
|
|
938
954
|
Returns:
|
|
939
|
-
dict | None:
|
|
955
|
+
dict | None:
|
|
956
|
+
Response from the Salesforce API. None in case of an error.
|
|
940
957
|
|
|
941
958
|
"""
|
|
942
959
|
|
|
@@ -1132,10 +1149,12 @@ class Salesforce:
|
|
|
1132
1149
|
"""Get a user profile ID by profile name.
|
|
1133
1150
|
|
|
1134
1151
|
Args:
|
|
1135
|
-
profile_name (str):
|
|
1152
|
+
profile_name (str):
|
|
1153
|
+
The name of the User Profile.
|
|
1136
1154
|
|
|
1137
1155
|
Returns:
|
|
1138
|
-
|
|
1156
|
+
str | None:
|
|
1157
|
+
The technical ID of the user profile.
|
|
1139
1158
|
|
|
1140
1159
|
"""
|
|
1141
1160
|
|
|
@@ -1166,10 +1185,12 @@ class Salesforce:
|
|
|
1166
1185
|
"""Get a Salesforce user based on its ID.
|
|
1167
1186
|
|
|
1168
1187
|
Args:
|
|
1169
|
-
user_id (str):
|
|
1188
|
+
user_id (str):
|
|
1189
|
+
The ID of the Salesforce user.
|
|
1170
1190
|
|
|
1171
1191
|
Returns:
|
|
1172
|
-
dict | None:
|
|
1192
|
+
dict | None:
|
|
1193
|
+
Dictionary with the Salesforce user data or None if the request fails.
|
|
1173
1194
|
|
|
1174
1195
|
"""
|
|
1175
1196
|
|
|
@@ -1217,20 +1238,20 @@ class Salesforce:
|
|
|
1217
1238
|
|
|
1218
1239
|
Args:
|
|
1219
1240
|
username (str):
|
|
1220
|
-
|
|
1241
|
+
The login name of the new user
|
|
1221
1242
|
email (str):
|
|
1222
|
-
Email of the new user
|
|
1243
|
+
The Email of the new user.
|
|
1223
1244
|
firstname (str):
|
|
1224
|
-
|
|
1245
|
+
The first name of the new user.
|
|
1225
1246
|
lastname (str):
|
|
1226
|
-
|
|
1227
|
-
title (str):
|
|
1228
|
-
|
|
1229
|
-
department (str):
|
|
1230
|
-
|
|
1231
|
-
company_name (str):
|
|
1247
|
+
The last name of the new user.
|
|
1248
|
+
title (str, optional):
|
|
1249
|
+
The title of the user.
|
|
1250
|
+
department (str, optional):
|
|
1251
|
+
The name of the department of the user.
|
|
1252
|
+
company_name (str, optional):
|
|
1232
1253
|
Name of the Company of the user.
|
|
1233
|
-
profile_name (str):
|
|
1254
|
+
profile_name (str, optional):
|
|
1234
1255
|
Profile name like "Standard User"
|
|
1235
1256
|
profile_id (str, optional):
|
|
1236
1257
|
Profile ID of the new user. Defaults to None.
|
|
@@ -1246,7 +1267,8 @@ class Salesforce:
|
|
|
1246
1267
|
Alias of the new user. Defaults to None.
|
|
1247
1268
|
|
|
1248
1269
|
Returns:
|
|
1249
|
-
dict | None:
|
|
1270
|
+
dict | None:
|
|
1271
|
+
Dictionary with the Salesforce User data or None if the request fails.
|
|
1250
1272
|
|
|
1251
1273
|
"""
|
|
1252
1274
|
|
|
@@ -1297,15 +1319,18 @@ class Salesforce:
|
|
|
1297
1319
|
self,
|
|
1298
1320
|
user_id: str,
|
|
1299
1321
|
update_data: dict,
|
|
1300
|
-
) -> dict:
|
|
1322
|
+
) -> dict | None:
|
|
1301
1323
|
"""Update a Salesforce user.
|
|
1302
1324
|
|
|
1303
1325
|
Args:
|
|
1304
|
-
user_id (str):
|
|
1305
|
-
|
|
1326
|
+
user_id (str):
|
|
1327
|
+
The Salesforce user ID.
|
|
1328
|
+
update_data (dict):
|
|
1329
|
+
Dictionary containing the fields to update.
|
|
1306
1330
|
|
|
1307
1331
|
Returns:
|
|
1308
|
-
dict
|
|
1332
|
+
dict | None:
|
|
1333
|
+
Response from the Salesforce API. None in case of an error.
|
|
1309
1334
|
|
|
1310
1335
|
"""
|
|
1311
1336
|
|
|
@@ -1343,11 +1368,14 @@ class Salesforce:
|
|
|
1343
1368
|
"""Update the password of a Salesforce user.
|
|
1344
1369
|
|
|
1345
1370
|
Args:
|
|
1346
|
-
user_id (str):
|
|
1347
|
-
|
|
1371
|
+
user_id (str):
|
|
1372
|
+
The Salesforce user ID.
|
|
1373
|
+
password (str):
|
|
1374
|
+
The new user password.
|
|
1348
1375
|
|
|
1349
1376
|
Returns:
|
|
1350
|
-
dict
|
|
1377
|
+
dict | None:
|
|
1378
|
+
Response from the Salesforce API. None in case of an error.
|
|
1351
1379
|
|
|
1352
1380
|
"""
|
|
1353
1381
|
|
|
@@ -1387,11 +1415,14 @@ class Salesforce:
|
|
|
1387
1415
|
"""Update the Salesforce user photo.
|
|
1388
1416
|
|
|
1389
1417
|
Args:
|
|
1390
|
-
user_id (str):
|
|
1391
|
-
|
|
1418
|
+
user_id (str):
|
|
1419
|
+
The Salesforce ID of the user.
|
|
1420
|
+
photo_path (str):
|
|
1421
|
+
A file system path with the location of the photo.
|
|
1392
1422
|
|
|
1393
1423
|
Returns:
|
|
1394
|
-
dict | None:
|
|
1424
|
+
dict | None:
|
|
1425
|
+
Dictionary with the Salesforce User data or None if the request fails.
|
|
1395
1426
|
|
|
1396
1427
|
"""
|
|
1397
1428
|
|
|
@@ -1410,7 +1441,7 @@ class Salesforce:
|
|
|
1410
1441
|
except OSError:
|
|
1411
1442
|
# Handle any errors that occurred while reading the photo file
|
|
1412
1443
|
self.logger.error(
|
|
1413
|
-
"Error reading photo file -> %s",
|
|
1444
|
+
"Error reading photo file -> '%s'!",
|
|
1414
1445
|
photo_path,
|
|
1415
1446
|
)
|
|
1416
1447
|
return None
|
|
@@ -1464,17 +1495,26 @@ class Salesforce:
|
|
|
1464
1495
|
"""Add a new Account object to Salesforce.
|
|
1465
1496
|
|
|
1466
1497
|
Args:
|
|
1467
|
-
account_name (str):
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1498
|
+
account_name (str):
|
|
1499
|
+
The name of the new Salesforce account.
|
|
1500
|
+
account_number (str):
|
|
1501
|
+
The number of the new Salesforce account (this is a logical number, not the technical ID).
|
|
1502
|
+
account_type (str):
|
|
1503
|
+
The type of the Salesforce account. Typical values are "Customer" or "Prospect".
|
|
1504
|
+
description(str, optional):
|
|
1505
|
+
The description of the new Salesforce account.
|
|
1506
|
+
industry (str, optional):
|
|
1507
|
+
The industry of the new Salesforce account. Defaults to None.
|
|
1508
|
+
website (str, optional):
|
|
1509
|
+
The website of the new Salesforce account. Defaults to None.
|
|
1510
|
+
phone (str, optional):
|
|
1511
|
+
The phone number of the new Salesforce account. Defaults to None.
|
|
1512
|
+
kwargs (dict):
|
|
1513
|
+
Additional values (e.g. custom fields)
|
|
1475
1514
|
|
|
1476
1515
|
Returns:
|
|
1477
|
-
dict | None:
|
|
1516
|
+
dict | None:
|
|
1517
|
+
Dictionary with the Salesforce Account data or None if the request fails.
|
|
1478
1518
|
|
|
1479
1519
|
"""
|
|
1480
1520
|
|
|
@@ -1528,18 +1568,19 @@ class Salesforce:
|
|
|
1528
1568
|
|
|
1529
1569
|
Args:
|
|
1530
1570
|
product_name (str):
|
|
1531
|
-
|
|
1571
|
+
The name of the Salesforce Product.
|
|
1532
1572
|
product_code (str):
|
|
1533
|
-
|
|
1573
|
+
The code of the Salesforce Product.
|
|
1534
1574
|
description (str):
|
|
1535
|
-
|
|
1575
|
+
A description of the Salesforce Product.
|
|
1536
1576
|
price (float):
|
|
1537
|
-
|
|
1538
|
-
kwargs:
|
|
1577
|
+
The price of the Salesforce Product.
|
|
1578
|
+
kwargs (dict):
|
|
1539
1579
|
Additional keyword arguments.
|
|
1540
1580
|
|
|
1541
1581
|
Returns:
|
|
1542
|
-
dict | None:
|
|
1582
|
+
dict | None:
|
|
1583
|
+
Dictionary with the Salesforce Product data or None if the request fails.
|
|
1543
1584
|
|
|
1544
1585
|
"""
|
|
1545
1586
|
|
|
@@ -1591,9 +1632,10 @@ class Salesforce:
|
|
|
1591
1632
|
"""Add a new Opportunity object to Salesfoce.
|
|
1592
1633
|
|
|
1593
1634
|
Args:
|
|
1594
|
-
name (str):
|
|
1635
|
+
name (str):
|
|
1636
|
+
The name of the Opportunity.
|
|
1595
1637
|
stage (str):
|
|
1596
|
-
|
|
1638
|
+
The stage of the Opportunity. Typical Value:
|
|
1597
1639
|
- "Prospecting"
|
|
1598
1640
|
- "Qualification"
|
|
1599
1641
|
- "Value Proposition"
|
|
@@ -1601,7 +1643,7 @@ class Salesforce:
|
|
|
1601
1643
|
- "Closed Won"
|
|
1602
1644
|
- "Closed Lost"
|
|
1603
1645
|
close_date (str):
|
|
1604
|
-
|
|
1646
|
+
The close date of the Opportunity. Should be in format YYYY-MM-DD.
|
|
1605
1647
|
amount (Union[int, float]):
|
|
1606
1648
|
Amount (expected revenue) of the opportunity.
|
|
1607
1649
|
Can either be an integer or a float value.
|
|
@@ -1613,7 +1655,8 @@ class Salesforce:
|
|
|
1613
1655
|
Additional keyword arguments.
|
|
1614
1656
|
|
|
1615
1657
|
Returns:
|
|
1616
|
-
dict | None:
|
|
1658
|
+
dict | None:
|
|
1659
|
+
Dictionary with the Salesforce Opportunity data or None if the request fails.
|
|
1617
1660
|
|
|
1618
1661
|
"""
|
|
1619
1662
|
|
|
@@ -1670,11 +1713,11 @@ class Salesforce:
|
|
|
1670
1713
|
|
|
1671
1714
|
Args:
|
|
1672
1715
|
subject (str):
|
|
1673
|
-
|
|
1716
|
+
The subject (title) of the case. It's like the name.
|
|
1674
1717
|
description (str):
|
|
1675
|
-
|
|
1718
|
+
The description of the case.
|
|
1676
1719
|
status (str):
|
|
1677
|
-
Status of the case. Typecal values: "New", "On Hold", "Escalated"
|
|
1720
|
+
Status of the case. Typecal values: "New", "On Hold", "Escalated".
|
|
1678
1721
|
priority (str):
|
|
1679
1722
|
Priority of the case. Typical values: "High", "Medium", "Low".
|
|
1680
1723
|
origin (str):
|
|
@@ -1683,9 +1726,9 @@ class Salesforce:
|
|
|
1683
1726
|
Technical ID of the related Account
|
|
1684
1727
|
owner_id (str):
|
|
1685
1728
|
Owner of the case
|
|
1686
|
-
asset_id (str):
|
|
1729
|
+
asset_id (str, optional):
|
|
1687
1730
|
Technical ID of the related Asset.
|
|
1688
|
-
product_id (str):
|
|
1731
|
+
product_id (str, optional):
|
|
1689
1732
|
Technical ID of the related Product.
|
|
1690
1733
|
kwargs (dict):
|
|
1691
1734
|
Additional values (e.g. custom fields)
|
|
@@ -1762,7 +1805,7 @@ class Salesforce:
|
|
|
1762
1805
|
Purchase date of the Asset.
|
|
1763
1806
|
install_date (str):
|
|
1764
1807
|
Install date of the Asset.
|
|
1765
|
-
description (str):
|
|
1808
|
+
description (str, optional):
|
|
1766
1809
|
Description of the Asset.
|
|
1767
1810
|
kwargs (dict):
|
|
1768
1811
|
Additional values (e.g. custom fields)
|
|
@@ -1835,7 +1878,7 @@ class Salesforce:
|
|
|
1835
1878
|
- "Support"
|
|
1836
1879
|
- "Lease"
|
|
1837
1880
|
- "Service"
|
|
1838
|
-
status (str):
|
|
1881
|
+
status (str, optional):
|
|
1839
1882
|
Status of the Contract. Typical values are:
|
|
1840
1883
|
- "Draft"
|
|
1841
1884
|
- "Activated"
|
pyxecm_customizer/servicenow.py
CHANGED
|
@@ -44,7 +44,7 @@ USER_AGENT = (
|
|
|
44
44
|
|
|
45
45
|
REQUEST_HEADERS = {"User-Agent": USER_AGENT, "Accept": "application/json", "Content-Type": "application/json"}
|
|
46
46
|
|
|
47
|
-
REQUEST_TIMEOUT = 60
|
|
47
|
+
REQUEST_TIMEOUT = 60.0
|
|
48
48
|
|
|
49
49
|
KNOWLEDGE_BASE_PATH = os.path.join(tempfile.gettempdir(), "attachments")
|
|
50
50
|
|
|
@@ -650,11 +650,13 @@ class ServiceNow:
|
|
|
650
650
|
data = self.parse_request_response(response)
|
|
651
651
|
return int(data["result"]["stats"]["count"])
|
|
652
652
|
except HTTPError:
|
|
653
|
-
self.logger.error("HTTP error occurred!")
|
|
653
|
+
self.logger.error("HTTP error occurred when trying to get the table count for table -> '%s'!", table_name)
|
|
654
654
|
except RequestException:
|
|
655
|
-
self.logger.error(
|
|
655
|
+
self.logger.error(
|
|
656
|
+
"Request error occurred when trying to get the table count for table -> '%s'!", table_name
|
|
657
|
+
)
|
|
656
658
|
except Exception:
|
|
657
|
-
self.logger.error("An error occurred!")
|
|
659
|
+
self.logger.error("An error occurred when trying to get the table count for table -> '%s'!", table_name)
|
|
658
660
|
|
|
659
661
|
return None
|
|
660
662
|
|
|
@@ -1007,11 +1009,29 @@ class ServiceNow:
|
|
|
1007
1009
|
return attachments
|
|
1008
1010
|
|
|
1009
1011
|
except HTTPError:
|
|
1010
|
-
self.logger.error(
|
|
1012
|
+
self.logger.error(
|
|
1013
|
+
"HTTP error occurred when trying to get the attachments for article -> '%s' (%s) with URL -> %s and parameters -> %s!",
|
|
1014
|
+
article_number,
|
|
1015
|
+
article_sys_id,
|
|
1016
|
+
request_url,
|
|
1017
|
+
params,
|
|
1018
|
+
)
|
|
1011
1019
|
except RequestException:
|
|
1012
|
-
self.logger.error(
|
|
1020
|
+
self.logger.error(
|
|
1021
|
+
"Request error occurred when trying to get the attachments for article -> '%s' (%s) with URL -> %s and parameters -> %s!",
|
|
1022
|
+
article_number,
|
|
1023
|
+
article_sys_id,
|
|
1024
|
+
request_url,
|
|
1025
|
+
params,
|
|
1026
|
+
)
|
|
1013
1027
|
except Exception:
|
|
1014
|
-
self.logger.error(
|
|
1028
|
+
self.logger.error(
|
|
1029
|
+
"An error occurred when trying to get the attachments for article -> '%s' (%s) with URL -> %s and parameters -> %s!",
|
|
1030
|
+
article_number,
|
|
1031
|
+
article_sys_id,
|
|
1032
|
+
request_url,
|
|
1033
|
+
params,
|
|
1034
|
+
)
|
|
1015
1035
|
|
|
1016
1036
|
return None
|
|
1017
1037
|
|
pyxecm_customizer/settings.py
CHANGED
|
@@ -18,6 +18,8 @@ class CustomizerSettingsOTDS(BaseModel):
|
|
|
18
18
|
|
|
19
19
|
username: str = Field(default="admin", description="Username for the OTDS admin user")
|
|
20
20
|
password: SecretStr = Field(default=None, description="Password for the OTDS admin user")
|
|
21
|
+
client_id: str | None = Field(None, description="Client ID for the OTDS admin user")
|
|
22
|
+
client_secret: SecretStr | None = Field(None, description="Client Secret for the OTDS admin user")
|
|
21
23
|
ticket: str | None = Field(None, description="Ticket for the OTDS admin user")
|
|
22
24
|
admin_partition: str = Field(default="otds.admin", description="Name of the admin partition in OTDS")
|
|
23
25
|
enable_audit: bool = Field(default=True, description="Enable the OTDS Audit")
|
|
@@ -214,7 +216,7 @@ class CustomizerSettingsOTPD(BaseModel):
|
|
|
214
216
|
self.url = HttpUrl(
|
|
215
217
|
os.environ.get("OTPD_PROTOCOL", "http")
|
|
216
218
|
+ "://"
|
|
217
|
-
+ os.environ.get("OTPD_SERVICE_HOST", "otpd
|
|
219
|
+
+ os.environ.get("OTPD_SERVICE_HOST", "otpd")
|
|
218
220
|
+ ":"
|
|
219
221
|
+ os.environ.get("OTPD_SERVICE_PORT", "8080"),
|
|
220
222
|
)
|
pyxecm_customizer/translate.py
CHANGED
pyxecm-3.0.0.dist-info/METADATA
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: pyxecm
|
|
3
|
-
Version: 3.0.0
|
|
4
|
-
Summary: A Python library to interact with Opentext Content Management Rest API
|
|
5
|
-
Project-URL: Homepage, https://github.com/opentext/pyxecm
|
|
6
|
-
Author-email: Kai Gatzweiler <kgatzweiler@opentext.com>, "Dr. Marc Diefenbruch" <mdiefenb@opentext.com>
|
|
7
|
-
Keywords: appworks,archivecenter,contentserver,extendedecm,opentext,otds
|
|
8
|
-
Classifier: Development Status :: 4 - Beta
|
|
9
|
-
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Content Management System
|
|
14
|
-
Requires-Python: >=3.10
|
|
15
|
-
Requires-Dist: lxml>=6.0.0
|
|
16
|
-
Requires-Dist: opentelemetry-api>=1.34.1
|
|
17
|
-
Requires-Dist: opentelemetry-exporter-otlp>=1.34.1
|
|
18
|
-
Requires-Dist: opentelemetry-instrumentation-requests>=0.55b1
|
|
19
|
-
Requires-Dist: opentelemetry-instrumentation-threading>=0.55b1
|
|
20
|
-
Requires-Dist: opentelemetry-sdk>=1.34.1
|
|
21
|
-
Requires-Dist: pandas>=2.3.1
|
|
22
|
-
Requires-Dist: requests-toolbelt>=1.0.0
|
|
23
|
-
Requires-Dist: requests>=2.32.4
|
|
24
|
-
Requires-Dist: suds>=1.2.0
|
|
25
|
-
Requires-Dist: websockets>=15.0.1
|
|
26
|
-
Requires-Dist: xmltodict>=0.14.2
|
|
27
|
-
Provides-Extra: api
|
|
28
|
-
Requires-Dist: asyncio>=3.4.3; extra == 'api'
|
|
29
|
-
Requires-Dist: fastapi>=0.116.0; extra == 'api'
|
|
30
|
-
Requires-Dist: jinja2>=3.1.6; extra == 'api'
|
|
31
|
-
Requires-Dist: opentelemetry-api>=1.34.1; extra == 'api'
|
|
32
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.55b1; extra == 'api'
|
|
33
|
-
Requires-Dist: opentelemetry-sdk>=1.34.1; extra == 'api'
|
|
34
|
-
Requires-Dist: prometheus-fastapi-instrumentator>=7.1.0; extra == 'api'
|
|
35
|
-
Requires-Dist: pydantic-settings>=2.10.1; extra == 'api'
|
|
36
|
-
Requires-Dist: python-multipart>=0.0.20; extra == 'api'
|
|
37
|
-
Requires-Dist: uvicorn>=0.35.0; extra == 'api'
|
|
38
|
-
Provides-Extra: customizer
|
|
39
|
-
Requires-Dist: kubernetes>=33.1.0; extra == 'customizer'
|
|
40
|
-
Requires-Dist: playwright>=1.53.0; extra == 'customizer'
|
|
41
|
-
Requires-Dist: pydantic>=2.11.7; extra == 'customizer'
|
|
42
|
-
Requires-Dist: python-hcl2>=7.2.1; extra == 'customizer'
|
|
43
|
-
Provides-Extra: magic
|
|
44
|
-
Requires-Dist: python-magic; extra == 'magic'
|
|
45
|
-
Provides-Extra: pyvis
|
|
46
|
-
Requires-Dist: pyvis>=0.3.2; extra == 'pyvis'
|
|
47
|
-
Provides-Extra: sap
|
|
48
|
-
Requires-Dist: pyrfc==3.3.1; extra == 'sap'
|