pyxecm 3.4.3__tar.gz → 3.4.4__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.
- {pyxecm-3.4.3 → pyxecm-3.4.4}/PKG-INFO +1 -1
- {pyxecm-3.4.3 → pyxecm-3.4.4}/pyproject.toml +1 -1
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otcs.py +221 -11
- {pyxecm-3.4.3 → pyxecm-3.4.4}/.gitignore +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/README.md +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/avts.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/coreshare.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/helper/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/helper/assoc.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/helper/data.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/helper/logadapter.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/helper/web.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/helper/xml.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otac.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otawp.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otca.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otds.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otiv.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otkd.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otmm.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/otpd.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm/py.typed +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/__main__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/app.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/auth/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/auth/functions.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/auth/models.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/auth/router.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/common/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/common/functions.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/common/metrics.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/common/models.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/common/router.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/settings.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/terminal/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/terminal/router.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_maintenance/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_maintenance/functions.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_maintenance/models.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_maintenance/router.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_otcs/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_otcs/functions.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_otcs/router.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_payload/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_payload/functions.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_payload/models.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_api/v1_payload/router.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/__main__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/browser_automation.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/customizer.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/exceptions.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/guidewire.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/k8s.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/log.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/m365.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/payload.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/payload_list.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/salesforce.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/sap.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/servicenow.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/settings.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/successfactors.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_customizer/translate.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_maintenance_page/__init__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_maintenance_page/__main__.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_maintenance_page/app.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_maintenance_page/settings.py +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_maintenance_page/static/favicon.avif +0 -0
- {pyxecm-3.4.3 → pyxecm-3.4.4}/src/pyxecm_maintenance_page/templates/maintenance.html +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyxecm
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.4
|
|
4
4
|
Summary: A Python library to interact with Opentext Content Management Rest API
|
|
5
5
|
Project-URL: Homepage, https://github.com/opentext/pyxecm
|
|
6
6
|
Author-email: Kai Gatzweiler <kgatzweiler@opentext.com>, "Dr. Marc Diefenbruch" <mdiefenb@opentext.com>
|
|
@@ -542,6 +542,8 @@ class OTCS:
|
|
|
542
542
|
otcs_config["businessObjectTypesUrl"] = otcs_rest_url + "/v2/businessobjecttypes"
|
|
543
543
|
otcs_config["businessObjectsSearchUrl"] = otcs_rest_url + "/v2/forms/businessobjects/search"
|
|
544
544
|
otcs_config["businessWorkspaceTypesUrl"] = otcs_rest_url + "/v1/businessworkspacetypes"
|
|
545
|
+
otcs_config["businessWorkspaceReportsUrl"] = otcs_rest_url + "/v2/businessworkspace"
|
|
546
|
+
otcs_config["businessWorkspaceMyTeamTodoUrl"] = otcs_rest_url + "/v2/businessworkspace/myteamtodo"
|
|
545
547
|
otcs_config["businessWorkspaceTypesUrlv2"] = otcs_rest_url + "/v2/businessworkspacetypes"
|
|
546
548
|
otcs_config["businessworkspacecreateform"] = otcs_rest_url + "/v2/forms/businessworkspaces/create"
|
|
547
549
|
otcs_config["businessWorkspacesUrl"] = otcs_rest_url + "/v2/businessworkspaces"
|
|
@@ -608,6 +610,12 @@ class OTCS:
|
|
|
608
610
|
self._soap_docman_client: Client | None = None
|
|
609
611
|
self._soap_transport: Transport | None = None
|
|
610
612
|
|
|
613
|
+
# Memoized full reminder client/type list (client_id=None). Reminder client
|
|
614
|
+
# and type configuration is effectively static for the lifetime of an OTCS
|
|
615
|
+
# object, so caching it avoids repeated 1+N REST round-trips when a single
|
|
616
|
+
# add/update operation resolves and validates a reminder type multiple times.
|
|
617
|
+
self._reminder_clients_cache: list[dict] | None = None
|
|
618
|
+
|
|
611
619
|
# Handle concurrent HTTP requests that may run into 401 errors and
|
|
612
620
|
# re-authentication at the same time:
|
|
613
621
|
self._authentication_lock = threading.Lock()
|
|
@@ -14931,7 +14939,7 @@ class OTCS:
|
|
|
14931
14939
|
def create_workspace(
|
|
14932
14940
|
self,
|
|
14933
14941
|
workspace_template_id: int,
|
|
14934
|
-
workspace_name: str,
|
|
14942
|
+
workspace_name: str | None,
|
|
14935
14943
|
workspace_description: str,
|
|
14936
14944
|
workspace_type: int,
|
|
14937
14945
|
category_data: dict | None = None,
|
|
@@ -14951,12 +14959,13 @@ class OTCS:
|
|
|
14951
14959
|
template and type, with optional category data and business object details.
|
|
14952
14960
|
It also supports linking to external systems and specifying metadata such as
|
|
14953
14961
|
creation and modification dates.
|
|
14962
|
+
If the name is not specified it will be derived from workspace metadata.
|
|
14954
14963
|
|
|
14955
14964
|
Args:
|
|
14956
14965
|
workspace_template_id (int):
|
|
14957
14966
|
The ID of the workspace template to be used.
|
|
14958
|
-
workspace_name (str):
|
|
14959
|
-
The name of the new workspace.
|
|
14967
|
+
workspace_name (str | None):
|
|
14968
|
+
The name of the new workspace. If not specified, it will be derived from workspace metadata.
|
|
14960
14969
|
workspace_description (str):
|
|
14961
14970
|
A description of the new workspace.
|
|
14962
14971
|
workspace_type (int):
|
|
@@ -15024,13 +15033,16 @@ class OTCS:
|
|
|
15024
15033
|
|
|
15025
15034
|
create_workspace_post_data = {
|
|
15026
15035
|
"template_id": str(workspace_template_id),
|
|
15027
|
-
"name": workspace_name,
|
|
15028
15036
|
"description": workspace_description,
|
|
15029
15037
|
"wksp_type_id": str(workspace_type),
|
|
15030
15038
|
"type": str(self.ITEM_TYPE_BUSINESS_WORKSPACE),
|
|
15031
15039
|
"roles": {}, # category_data,
|
|
15032
15040
|
}
|
|
15033
15041
|
|
|
15042
|
+
# Yes, workspace name is optional. If not specified, it will be derived from workspace metadata.
|
|
15043
|
+
if workspace_name:
|
|
15044
|
+
create_workspace_post_data["name"] = workspace_name
|
|
15045
|
+
|
|
15034
15046
|
if category_data:
|
|
15035
15047
|
create_workspace_post_data["roles"]["categories"] = category_data
|
|
15036
15048
|
if external_create_date:
|
|
@@ -15062,7 +15074,7 @@ class OTCS:
|
|
|
15062
15074
|
if parent_id is not None:
|
|
15063
15075
|
create_workspace_post_data["parent_id"] = parent_id
|
|
15064
15076
|
self.logger.debug(
|
|
15065
|
-
"Use specified location with node ID -> %d for workspace -> '%s'",
|
|
15077
|
+
"Use specified location with node ID -> %d for creation of workspace -> '%s'",
|
|
15066
15078
|
parent_id,
|
|
15067
15079
|
workspace_name,
|
|
15068
15080
|
)
|
|
@@ -15211,7 +15223,7 @@ class OTCS:
|
|
|
15211
15223
|
self,
|
|
15212
15224
|
workspace_id: int,
|
|
15213
15225
|
related_workspace_id: int,
|
|
15214
|
-
relationship_type: str = "child",
|
|
15226
|
+
relationship_type: str | None = "child",
|
|
15215
15227
|
show_error: bool = True,
|
|
15216
15228
|
) -> dict | None:
|
|
15217
15229
|
"""Create a relationship between two workspaces.
|
|
@@ -15231,7 +15243,7 @@ class OTCS:
|
|
|
15231
15243
|
and the other of type 'child', but this is a less common use case.
|
|
15232
15244
|
|
|
15233
15245
|
Adding a relationship R1: A --> Child --> B makes A to the parent of B _AND_ also
|
|
15234
|
-
B to the child of A. Requesting the childs of A will include
|
|
15246
|
+
B to the child of A. Requesting the childs of A will include relationship R1. Requesting the
|
|
15235
15247
|
parents of B will include R1 as well. But it is still possible to add a relationship
|
|
15236
15248
|
R2: A --> Parent --> B. This will be a separate relationship.
|
|
15237
15249
|
|
|
@@ -15240,8 +15252,10 @@ class OTCS:
|
|
|
15240
15252
|
The ID of the workspace.
|
|
15241
15253
|
related_workspace_id (int):
|
|
15242
15254
|
The ID of the related workspace.
|
|
15243
|
-
relationship_type (str, optional):
|
|
15244
|
-
Can be "parent" or "child" - "child" is default
|
|
15255
|
+
relationship_type (str | None, optional):
|
|
15256
|
+
Can be "parent" or "child" - "child" is the default. If None (or empty)
|
|
15257
|
+
is provided, it falls back to "child" instead of sending an invalid
|
|
15258
|
+
relationship type to the REST API.
|
|
15245
15259
|
show_error (bool, optional):
|
|
15246
15260
|
If True, log an error if relationship cration fails.
|
|
15247
15261
|
Otherwise log a warning.
|
|
@@ -15252,6 +15266,17 @@ class OTCS:
|
|
|
15252
15266
|
|
|
15253
15267
|
"""
|
|
15254
15268
|
|
|
15269
|
+
# Normalize the relationship type so that callers passing None explicitly
|
|
15270
|
+
# (which overrides the default) still get the intended "child" behavior:
|
|
15271
|
+
if not relationship_type:
|
|
15272
|
+
relationship_type = "child"
|
|
15273
|
+
elif relationship_type not in ("parent", "child"):
|
|
15274
|
+
self.logger.error(
|
|
15275
|
+
"Illegal relationship type -> '%s'! Must be either 'parent' or 'child'.",
|
|
15276
|
+
relationship_type,
|
|
15277
|
+
)
|
|
15278
|
+
return None
|
|
15279
|
+
|
|
15255
15280
|
create_workspace_relationship_post_data = {
|
|
15256
15281
|
"rel_bw_id": str(related_workspace_id),
|
|
15257
15282
|
"rel_type": relationship_type,
|
|
@@ -26113,6 +26138,14 @@ class OTCS:
|
|
|
26113
26138
|
|
|
26114
26139
|
# end method definition of _extract_field_mappings()
|
|
26115
26140
|
|
|
26141
|
+
# Serve the memoized full client/type list when no specific client filter
|
|
26142
|
+
# is requested (the common case for type resolution and validation). The
|
|
26143
|
+
# local `client_id` is reassigned inside the loop below, so capture the
|
|
26144
|
+
# original intent up front for both the cache read and the cache write:
|
|
26145
|
+
is_full_list = client_id is None
|
|
26146
|
+
if is_full_list and self._reminder_clients_cache is not None:
|
|
26147
|
+
return self._reminder_clients_cache
|
|
26148
|
+
|
|
26116
26149
|
response = self.get_reminder_types(client_id=client_id)
|
|
26117
26150
|
if not response:
|
|
26118
26151
|
return None
|
|
@@ -26154,6 +26187,10 @@ class OTCS:
|
|
|
26154
26187
|
str(clients),
|
|
26155
26188
|
)
|
|
26156
26189
|
|
|
26190
|
+
# Memoize the full client/type list for subsequent lookups in this session:
|
|
26191
|
+
if is_full_list:
|
|
26192
|
+
self._reminder_clients_cache = clients
|
|
26193
|
+
|
|
26157
26194
|
return clients
|
|
26158
26195
|
|
|
26159
26196
|
# end method definition
|
|
@@ -27501,7 +27538,13 @@ class OTCS:
|
|
|
27501
27538
|
dict | None:
|
|
27502
27539
|
Response from the server, or None if the request fails.
|
|
27503
27540
|
|
|
27504
|
-
|
|
27541
|
+
Note:
|
|
27542
|
+
On OTCM 26.2 and newer the `results` payload contains the ID of the
|
|
27543
|
+
newly created reminder (extractable via `get_result_value(response, key="id")`).
|
|
27544
|
+
On older releases `results` was empty even on success, so callers that
|
|
27545
|
+
need the reminder ID on those releases must fall back to `get_reminders()`.
|
|
27546
|
+
|
|
27547
|
+
Example (OTCM 26.2 and newer):
|
|
27505
27548
|
{
|
|
27506
27549
|
'links': {
|
|
27507
27550
|
'data': {
|
|
@@ -27514,7 +27557,7 @@ class OTCS:
|
|
|
27514
27557
|
}
|
|
27515
27558
|
}
|
|
27516
27559
|
},
|
|
27517
|
-
'results': {}
|
|
27560
|
+
'results': {'id': 66} # ID of the newly created reminder (empty {} on releases before 26.2)
|
|
27518
27561
|
}
|
|
27519
27562
|
|
|
27520
27563
|
"""
|
|
@@ -27890,3 +27933,170 @@ class OTCS:
|
|
|
27890
27933
|
)
|
|
27891
27934
|
|
|
27892
27935
|
# end method definition
|
|
27936
|
+
|
|
27937
|
+
@tracer.start_as_current_span(attributes=OTEL_TRACING_ATTRIBUTES, name="get_workspace_report_detail")
|
|
27938
|
+
def get_workspace_report_detail(
|
|
27939
|
+
self,
|
|
27940
|
+
workspace_id: int,
|
|
27941
|
+
report_type: str,
|
|
27942
|
+
) -> dict | None:
|
|
27943
|
+
"""Get the full document list for a single workspace report type.
|
|
27944
|
+
|
|
27945
|
+
REST operation: GET /v2/businessworkspace/{workspace_id}/reports?type={report_type}
|
|
27946
|
+
|
|
27947
|
+
Args:
|
|
27948
|
+
workspace_id (int):
|
|
27949
|
+
Business workspace node ID.
|
|
27950
|
+
report_type (str):
|
|
27951
|
+
Report type key. One of ``"documentsAdded"``, ``"outdatedDocuments"``,
|
|
27952
|
+
or ``"recentDocuments"``.
|
|
27953
|
+
|
|
27954
|
+
Returns:
|
|
27955
|
+
dict | None:
|
|
27956
|
+
Report detail response containing a ``results.data`` list and
|
|
27957
|
+
``results.total_count``, or None on error.
|
|
27958
|
+
|
|
27959
|
+
"""
|
|
27960
|
+
|
|
27961
|
+
request_url = "{}/{}/reports?type={}".format(
|
|
27962
|
+
self.config()["businessWorkspaceReportsUrl"],
|
|
27963
|
+
workspace_id,
|
|
27964
|
+
report_type,
|
|
27965
|
+
)
|
|
27966
|
+
request_header = self.request_json_header()
|
|
27967
|
+
|
|
27968
|
+
self.logger.debug(
|
|
27969
|
+
"Get workspace report detail for workspace with ID -> %d, type -> %s; calling -> %s",
|
|
27970
|
+
workspace_id,
|
|
27971
|
+
report_type,
|
|
27972
|
+
request_url,
|
|
27973
|
+
)
|
|
27974
|
+
|
|
27975
|
+
return self.do_request(
|
|
27976
|
+
url=request_url,
|
|
27977
|
+
method="GET",
|
|
27978
|
+
headers=request_header,
|
|
27979
|
+
timeout=REQUEST_TIMEOUT,
|
|
27980
|
+
failure_message="Failed to get '{}' report detail for workspace with ID -> {}".format(
|
|
27981
|
+
report_type, workspace_id
|
|
27982
|
+
),
|
|
27983
|
+
)
|
|
27984
|
+
|
|
27985
|
+
# end method definition
|
|
27986
|
+
|
|
27987
|
+
@tracer.start_as_current_span(attributes=OTEL_TRACING_ATTRIBUTES, name="get_workspace_documents")
|
|
27988
|
+
def get_workspace_documents(
|
|
27989
|
+
self,
|
|
27990
|
+
workspace_id: int,
|
|
27991
|
+
document_type: Literal["missing", "inprocess"] = "missing",
|
|
27992
|
+
) -> dict | None:
|
|
27993
|
+
"""Get the list of missing or in-process documents for a Business Workspace.
|
|
27994
|
+
|
|
27995
|
+
REST operation: GET /v2/businessworkspaces/{workspace_id}/missingdocuments
|
|
27996
|
+
REST operation: GET /v2/businessworkspaces/{workspace_id}/inprocessdocuments
|
|
27997
|
+
|
|
27998
|
+
Missing documents are required document types that are absent from the workspace.
|
|
27999
|
+
In-process documents are currently being processed within the workspace
|
|
28000
|
+
(e.g. pending classification, approval, or ingestion workflows).
|
|
28001
|
+
|
|
28002
|
+
Args:
|
|
28003
|
+
workspace_id (int):
|
|
28004
|
+
Business workspace node ID.
|
|
28005
|
+
document_type (Literal["missing", "inprocess"], optional):
|
|
28006
|
+
Which document category to retrieve:
|
|
28007
|
+
* ``"missing"`` — required documents absent from the workspace
|
|
28008
|
+
(``/missingdocuments``).
|
|
28009
|
+
* ``"inprocess"`` — documents currently being processed
|
|
28010
|
+
(``/inprocessdocuments``).
|
|
28011
|
+
Defaults to ``"missing"``.
|
|
28012
|
+
|
|
28013
|
+
Returns:
|
|
28014
|
+
dict | None:
|
|
28015
|
+
Response containing a ``results.data`` list and ``results.total_count``,
|
|
28016
|
+
or None on error.
|
|
28017
|
+
|
|
28018
|
+
"""
|
|
28019
|
+
|
|
28020
|
+
endpoint = "inprocessdocuments" if document_type == "inprocess" else "missingdocuments"
|
|
28021
|
+
request_url = "{}/{}/{}".format(
|
|
28022
|
+
self.config()["businessWorkspacesUrl"],
|
|
28023
|
+
workspace_id,
|
|
28024
|
+
endpoint,
|
|
28025
|
+
)
|
|
28026
|
+
request_header = self.request_json_header()
|
|
28027
|
+
|
|
28028
|
+
self.logger.debug(
|
|
28029
|
+
"Get %s for workspace with ID -> %d; calling -> %s",
|
|
28030
|
+
endpoint,
|
|
28031
|
+
workspace_id,
|
|
28032
|
+
request_url,
|
|
28033
|
+
)
|
|
28034
|
+
|
|
28035
|
+
return self.do_request(
|
|
28036
|
+
url=request_url,
|
|
28037
|
+
method="GET",
|
|
28038
|
+
headers=request_header,
|
|
28039
|
+
timeout=REQUEST_TIMEOUT,
|
|
28040
|
+
failure_message="Failed to get {} for workspace with ID -> {}".format(endpoint, workspace_id),
|
|
28041
|
+
)
|
|
28042
|
+
|
|
28043
|
+
# end method definition
|
|
28044
|
+
|
|
28045
|
+
@tracer.start_as_current_span(attributes=OTEL_TRACING_ATTRIBUTES, name="get_workspace_myteamtodo")
|
|
28046
|
+
def get_workspace_myteamtodo(self) -> dict | None:
|
|
28047
|
+
"""Get the My Team Todo data for the currently authenticated user.
|
|
28048
|
+
|
|
28049
|
+
Returns the employee-file completeness status (missing and outdated document types)
|
|
28050
|
+
for all direct reports of the currently authenticated user.
|
|
28051
|
+
|
|
28052
|
+
REST operation: GET /v2/businessworkspace/myteamtodo
|
|
28053
|
+
|
|
28054
|
+
Returns:
|
|
28055
|
+
dict | None:
|
|
28056
|
+
Response containing a ``results`` list where each element holds a
|
|
28057
|
+
``data.members`` list of direct reportees with their completeness status,
|
|
28058
|
+
or None on error.
|
|
28059
|
+
|
|
28060
|
+
Example:
|
|
28061
|
+
{
|
|
28062
|
+
'results': [
|
|
28063
|
+
{
|
|
28064
|
+
'data': {
|
|
28065
|
+
'members': [
|
|
28066
|
+
{
|
|
28067
|
+
'id': 1234,
|
|
28068
|
+
'display_name': 'Ian Grant',
|
|
28069
|
+
'first_name': 'Ian',
|
|
28070
|
+
'last_name': 'Grant',
|
|
28071
|
+
'business_email': 'ian.grant@example.com',
|
|
28072
|
+
'employee_file_todos': {
|
|
28073
|
+
'missing': [{'doc_type_name': 'Contract'}],
|
|
28074
|
+
'outdated': [{'doc_type_name': 'Accident'}],
|
|
28075
|
+
},
|
|
28076
|
+
}
|
|
28077
|
+
]
|
|
28078
|
+
},
|
|
28079
|
+
'properties': None,
|
|
28080
|
+
}
|
|
28081
|
+
]
|
|
28082
|
+
}
|
|
28083
|
+
|
|
28084
|
+
"""
|
|
28085
|
+
|
|
28086
|
+
request_url = self.config()["businessWorkspaceMyTeamTodoUrl"]
|
|
28087
|
+
request_header = self.request_json_header()
|
|
28088
|
+
|
|
28089
|
+
self.logger.debug(
|
|
28090
|
+
"Get My Team Todo data for current user; calling -> %s",
|
|
28091
|
+
request_url,
|
|
28092
|
+
)
|
|
28093
|
+
|
|
28094
|
+
return self.do_request(
|
|
28095
|
+
url=request_url,
|
|
28096
|
+
method="GET",
|
|
28097
|
+
headers=request_header,
|
|
28098
|
+
timeout=REQUEST_TIMEOUT,
|
|
28099
|
+
failure_message="Failed to get My Team Todo data.",
|
|
28100
|
+
)
|
|
28101
|
+
|
|
28102
|
+
# end method definition
|
|
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
|
|
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
|