uipath 2.1.125__py3-none-any.whl → 2.1.127__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 uipath might be problematic. Click here for more details.
- uipath/_cli/_auth/_auth_service.py +2 -2
- uipath/_cli/_auth/_url_utils.py +3 -6
- uipath/_cli/_utils/_common.py +0 -1
- uipath/_resources/SDK_REFERENCE.md +133 -0
- uipath/_services/connections_service.py +171 -14
- uipath/models/connections.py +1 -0
- {uipath-2.1.125.dist-info → uipath-2.1.127.dist-info}/METADATA +1 -1
- {uipath-2.1.125.dist-info → uipath-2.1.127.dist-info}/RECORD +11 -11
- {uipath-2.1.125.dist-info → uipath-2.1.127.dist-info}/WHEEL +0 -0
- {uipath-2.1.125.dist-info → uipath-2.1.127.dist-info}/entry_points.txt +0 -0
- {uipath-2.1.125.dist-info → uipath-2.1.127.dist-info}/licenses/LICENSE +0 -0
|
@@ -19,7 +19,7 @@ from uipath.models.auth import TokenData
|
|
|
19
19
|
class AuthService:
|
|
20
20
|
def __init__(
|
|
21
21
|
self,
|
|
22
|
-
environment: str,
|
|
22
|
+
environment: Optional[str],
|
|
23
23
|
*,
|
|
24
24
|
force: bool,
|
|
25
25
|
client_id: Optional[str] = None,
|
|
@@ -34,7 +34,7 @@ class AuthService:
|
|
|
34
34
|
self._client_secret = client_secret
|
|
35
35
|
self._base_url = base_url
|
|
36
36
|
self._tenant = tenant
|
|
37
|
-
self._domain = resolve_domain(self._base_url, environment
|
|
37
|
+
self._domain = resolve_domain(self._base_url, environment)
|
|
38
38
|
self._scope = scope
|
|
39
39
|
|
|
40
40
|
def authenticate(self) -> None:
|
uipath/_cli/_auth/_url_utils.py
CHANGED
|
@@ -7,9 +7,7 @@ from .._utils._console import ConsoleLogger
|
|
|
7
7
|
console = ConsoleLogger()
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
def resolve_domain(
|
|
11
|
-
base_url: Optional[str], environment: Optional[str], force: bool = False
|
|
12
|
-
) -> str:
|
|
10
|
+
def resolve_domain(base_url: Optional[str], environment: Optional[str]) -> str:
|
|
13
11
|
"""Resolve the UiPath domain, giving priority to base_url when valid.
|
|
14
12
|
|
|
15
13
|
Args:
|
|
@@ -27,10 +25,9 @@ def resolve_domain(
|
|
|
27
25
|
if domain:
|
|
28
26
|
return domain
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
if not base_url or not force:
|
|
28
|
+
if environment is None:
|
|
32
29
|
uipath_url = os.getenv("UIPATH_URL")
|
|
33
|
-
if uipath_url
|
|
30
|
+
if uipath_url:
|
|
34
31
|
parsed = urlparse(uipath_url)
|
|
35
32
|
if parsed.scheme and parsed.netloc:
|
|
36
33
|
domain = f"{parsed.scheme}://{parsed.netloc}"
|
uipath/_cli/_utils/_common.py
CHANGED
|
@@ -70,6 +70,129 @@ sdk.assets.update_async(robot_asset: uipath.models.assets.UserAsset, folder_key:
|
|
|
70
70
|
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
### Attachments
|
|
74
|
+
|
|
75
|
+
Attachments service
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
# Delete an attachment.
|
|
79
|
+
sdk.attachments.delete(key: uuid.UUID, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
80
|
+
|
|
81
|
+
# Delete an attachment asynchronously.
|
|
82
|
+
sdk.attachments.delete_async(key: uuid.UUID, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
83
|
+
|
|
84
|
+
# Download an attachment.
|
|
85
|
+
sdk.attachments.download(key: uuid.UUID, destination_path: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> str
|
|
86
|
+
|
|
87
|
+
# Download an attachment asynchronously.
|
|
88
|
+
sdk.attachments.download_async(key: uuid.UUID, destination_path: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> str
|
|
89
|
+
|
|
90
|
+
# Upload a file or content to UiPath as an attachment.
|
|
91
|
+
sdk.attachments.upload(name: str, content: Union[str, bytes, NoneType]=None, source_path: Optional[str]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> uuid.UUID
|
|
92
|
+
|
|
93
|
+
# Upload a file or content to UiPath as an attachment asynchronously.
|
|
94
|
+
sdk.attachments.upload_async(name: str, content: Union[str, bytes, NoneType]=None, source_path: Optional[str]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> uuid.UUID
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Buckets
|
|
99
|
+
|
|
100
|
+
Buckets service
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
# Create a new bucket.
|
|
104
|
+
sdk.buckets.create(name: str, description: Optional[str]=None, identifier: Optional[str]=None, folder_path: Optional[str]=None, folder_key: Optional[str]=None) -> uipath.models.buckets.Bucket
|
|
105
|
+
|
|
106
|
+
# Async version of create().
|
|
107
|
+
sdk.buckets.create_async(name: str, description: Optional[str]=None, identifier: Optional[str]=None, folder_path: Optional[str]=None, folder_key: Optional[str]=None) -> uipath.models.buckets.Bucket
|
|
108
|
+
|
|
109
|
+
# Delete a file from a bucket.
|
|
110
|
+
sdk.buckets.delete(name: Optional[str]=None, key: Optional[str]=None, blob_file_path: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
111
|
+
|
|
112
|
+
# Delete a file from a bucket asynchronously.
|
|
113
|
+
sdk.buckets.delete_async(name: Optional[str]=None, key: Optional[str]=None, blob_file_path: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
114
|
+
|
|
115
|
+
# Download a file from a bucket.
|
|
116
|
+
sdk.buckets.download(name: Optional[str]=None, key: Optional[str]=None, blob_file_path: str, destination_path: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
117
|
+
|
|
118
|
+
# Download a file from a bucket asynchronously.
|
|
119
|
+
sdk.buckets.download_async(name: Optional[str]=None, key: Optional[str]=None, blob_file_path: str, destination_path: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
120
|
+
|
|
121
|
+
# Check if bucket exists.
|
|
122
|
+
sdk.buckets.exists(name: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> bool
|
|
123
|
+
|
|
124
|
+
# Async version of exists().
|
|
125
|
+
sdk.buckets.exists_async(name: str, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> bool
|
|
126
|
+
|
|
127
|
+
# Get files using OData GetFiles API (Studio-compatible).
|
|
128
|
+
sdk.buckets.get_files(name: Optional[str]=None, key: Optional[str]=None, prefix: str="", recursive: bool=False, file_name_glob: Optional[str]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> typing.Iterator[uipath.models.buckets.BucketFile]
|
|
129
|
+
|
|
130
|
+
# Async version of get_files().
|
|
131
|
+
sdk.buckets.get_files_async(name: Optional[str]=None, key: Optional[str]=None, prefix: str="", recursive: bool=False, file_name_glob: Optional[str]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> typing.AsyncIterator[uipath.models.buckets.BucketFile]
|
|
132
|
+
|
|
133
|
+
# List buckets with auto-pagination.
|
|
134
|
+
sdk.buckets.list(folder_path: Optional[str]=None, folder_key: Optional[str]=None, name: Optional[str]=None) -> typing.Iterator[uipath.models.buckets.Bucket]
|
|
135
|
+
|
|
136
|
+
# Async version of list() with auto-pagination.
|
|
137
|
+
sdk.buckets.list_async(folder_path: Optional[str]=None, folder_key: Optional[str]=None, name: Optional[str]=None) -> typing.AsyncIterator[uipath.models.buckets.Bucket]
|
|
138
|
+
|
|
139
|
+
# List files in a bucket.
|
|
140
|
+
sdk.buckets.list_files(name: Optional[str]=None, key: Optional[str]=None, prefix: str="", folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> typing.Iterator[uipath.models.buckets.BucketFile]
|
|
141
|
+
|
|
142
|
+
# List files in a bucket asynchronously.
|
|
143
|
+
sdk.buckets.list_files_async(name: Optional[str]=None, key: Optional[str]=None, prefix: str="", folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> typing.AsyncIterator[uipath.models.buckets.BucketFile]
|
|
144
|
+
|
|
145
|
+
# Retrieve bucket information by its name.
|
|
146
|
+
sdk.buckets.retrieve(name: Optional[str]=None, key: Optional[str]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> uipath.models.buckets.Bucket
|
|
147
|
+
|
|
148
|
+
# Asynchronously retrieve bucket information by its name.
|
|
149
|
+
sdk.buckets.retrieve_async(name: Optional[str]=None, key: Optional[str]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> uipath.models.buckets.Bucket
|
|
150
|
+
|
|
151
|
+
# Upload a file to a bucket.
|
|
152
|
+
sdk.buckets.upload(key: Optional[str]=None, name: Optional[str]=None, blob_file_path: str, content_type: Optional[str]=None, source_path: Optional[str]=None, content: Union[str, bytes, NoneType]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
153
|
+
|
|
154
|
+
# Upload a file to a bucket asynchronously.
|
|
155
|
+
sdk.buckets.upload_async(key: Optional[str]=None, name: Optional[str]=None, blob_file_path: str, content_type: Optional[str]=None, source_path: Optional[str]=None, content: Union[str, bytes, NoneType]=None, folder_key: Optional[str]=None, folder_path: Optional[str]=None) -> None
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Connections
|
|
160
|
+
|
|
161
|
+
Connections service
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
# Lists all connections with optional filtering.
|
|
165
|
+
sdk.connections.list(name: Optional[str]=None, folder_path: Optional[str]=None, folder_key: Optional[str]=None, connector_key: Optional[str]=None, skip: Optional[int]=None, top: Optional[int]=None) -> typing.List[uipath.models.connections.Connection]
|
|
166
|
+
|
|
167
|
+
# Asynchronously lists all connections with optional filtering.
|
|
168
|
+
sdk.connections.list_async(name: Optional[str]=None, folder_path: Optional[str]=None, folder_key: Optional[str]=None, connector_key: Optional[str]=None, skip: Optional[int]=None, top: Optional[int]=None) -> typing.List[uipath.models.connections.Connection]
|
|
169
|
+
|
|
170
|
+
# Synchronously retrieve connection API metadata.
|
|
171
|
+
sdk.connections.metadata(element_instance_id: int, connector_key: str, tool_path: str, parameters: Optional[Dict[str, str]]=None, schema_mode: bool=True, max_jit_depth: int=5) -> uipath.models.connections.ConnectionMetadata
|
|
172
|
+
|
|
173
|
+
# Asynchronously retrieve connection API metadata.
|
|
174
|
+
sdk.connections.metadata_async(element_instance_id: int, connector_key: str, tool_path: str, parameters: Optional[Dict[str, str]]=None, schema_mode: bool=True, max_jit_depth: int=5) -> uipath.models.connections.ConnectionMetadata
|
|
175
|
+
|
|
176
|
+
# Retrieve connection details by its key.
|
|
177
|
+
sdk.connections.retrieve(key: str) -> uipath.models.connections.Connection
|
|
178
|
+
|
|
179
|
+
# Asynchronously retrieve connection details by its key.
|
|
180
|
+
sdk.connections.retrieve_async(key: str) -> uipath.models.connections.Connection
|
|
181
|
+
|
|
182
|
+
# Retrieve event payload from UiPath Integration Service.
|
|
183
|
+
sdk.connections.retrieve_event_payload(event_args: uipath.models.connections.EventArguments) -> typing.Dict[str, typing.Any]
|
|
184
|
+
|
|
185
|
+
# Retrieve event payload from UiPath Integration Service.
|
|
186
|
+
sdk.connections.retrieve_event_payload_async(event_args: uipath.models.connections.EventArguments) -> typing.Dict[str, typing.Any]
|
|
187
|
+
|
|
188
|
+
# Retrieve an authentication token for a connection.
|
|
189
|
+
sdk.connections.retrieve_token(key: str, token_type: <enum 'ConnectionTokenType="direct") -> uipath.models.connections.ConnectionToken
|
|
190
|
+
|
|
191
|
+
# Asynchronously retrieve an authentication token for a connection.
|
|
192
|
+
sdk.connections.retrieve_token_async(key: str, token_type: <enum 'ConnectionTokenType="direct") -> uipath.models.connections.ConnectionToken
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
|
|
73
196
|
### Context Grounding
|
|
74
197
|
|
|
75
198
|
Context Grounding service
|
|
@@ -193,6 +316,16 @@ sdk.entities.update_records_async(entity_key: str, records: List[Any], schema: O
|
|
|
193
316
|
|
|
194
317
|
```
|
|
195
318
|
|
|
319
|
+
### Folders
|
|
320
|
+
|
|
321
|
+
Folders service
|
|
322
|
+
|
|
323
|
+
```python
|
|
324
|
+
# Retrieve the folder key by folder path with pagination support.
|
|
325
|
+
sdk.folders.retrieve_key(folder_path: str) -> typing.Optional[str]
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
|
|
196
329
|
### Jobs
|
|
197
330
|
|
|
198
331
|
Jobs service
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import logging
|
|
3
3
|
from typing import Any, Dict, List, Optional
|
|
4
|
+
from urllib.parse import parse_qsl, quote, urlsplit
|
|
4
5
|
|
|
5
6
|
from httpx import Response
|
|
6
7
|
|
|
@@ -60,24 +61,77 @@ class ConnectionsService(BaseService):
|
|
|
60
61
|
hide_output=True,
|
|
61
62
|
)
|
|
62
63
|
def metadata(
|
|
63
|
-
self,
|
|
64
|
+
self,
|
|
65
|
+
element_instance_id: int,
|
|
66
|
+
connector_key: str,
|
|
67
|
+
tool_path: str,
|
|
68
|
+
parameters: Optional[Dict[str, str]] = None,
|
|
69
|
+
schema_mode: bool = True,
|
|
70
|
+
max_jit_depth: int = 5,
|
|
64
71
|
) -> ConnectionMetadata:
|
|
65
72
|
"""Synchronously retrieve connection API metadata.
|
|
66
73
|
|
|
67
|
-
This method fetches the metadata for a connection,
|
|
68
|
-
|
|
74
|
+
This method fetches the metadata for a connection. When parameters are provided,
|
|
75
|
+
it automatically fetches JIT (Just-In-Time) metadata for cascading fields in a loop,
|
|
76
|
+
following action URLs up to a maximum depth.
|
|
69
77
|
|
|
70
78
|
Args:
|
|
71
79
|
element_instance_id (int): The element instance ID of the connection.
|
|
80
|
+
connector_key (str): The connector key (e.g., 'uipath-atlassian-jira', 'uipath-slack').
|
|
72
81
|
tool_path (str): The tool path to retrieve metadata for.
|
|
82
|
+
parameters (Optional[Dict[str, str]]): Parameter values. When provided, triggers
|
|
83
|
+
automatic JIT fetching for cascading fields.
|
|
73
84
|
schema_mode (bool): Whether or not to represent the output schema in the response fields.
|
|
85
|
+
max_jit_depth (int): The maximum depth of the JIT resolution loop.
|
|
74
86
|
|
|
75
87
|
Returns:
|
|
76
88
|
ConnectionMetadata: The connection metadata.
|
|
89
|
+
|
|
90
|
+
Examples:
|
|
91
|
+
>>> metadata = sdk.connections.metadata(
|
|
92
|
+
... element_instance_id=123,
|
|
93
|
+
... connector_key="uipath-atlassian-jira",
|
|
94
|
+
... tool_path="Issue",
|
|
95
|
+
... parameters={"projectId": "PROJ-123"} # Optional
|
|
96
|
+
... )
|
|
77
97
|
"""
|
|
78
|
-
spec = self._metadata_spec(
|
|
79
|
-
|
|
80
|
-
|
|
98
|
+
spec = self._metadata_spec(
|
|
99
|
+
element_instance_id, connector_key, tool_path, schema_mode
|
|
100
|
+
)
|
|
101
|
+
response = self.request(
|
|
102
|
+
spec.method, url=spec.endpoint, params=spec.params, headers=spec.headers
|
|
103
|
+
)
|
|
104
|
+
data = response.json()
|
|
105
|
+
metadata = ConnectionMetadata.model_validate(data)
|
|
106
|
+
|
|
107
|
+
last_action_url = None
|
|
108
|
+
depth = 0
|
|
109
|
+
|
|
110
|
+
while (
|
|
111
|
+
parameters
|
|
112
|
+
and (action_url := self._get_jit_action_url(metadata))
|
|
113
|
+
and depth < max_jit_depth
|
|
114
|
+
):
|
|
115
|
+
# Stop if we're about to call the same URL template again
|
|
116
|
+
if action_url == last_action_url:
|
|
117
|
+
break
|
|
118
|
+
|
|
119
|
+
last_action_url = action_url
|
|
120
|
+
depth += 1
|
|
121
|
+
|
|
122
|
+
jit_spec = self._metadata_jit_spec(
|
|
123
|
+
element_instance_id, action_url, parameters, schema_mode
|
|
124
|
+
)
|
|
125
|
+
jit_response = self.request(
|
|
126
|
+
jit_spec.method,
|
|
127
|
+
url=jit_spec.endpoint,
|
|
128
|
+
params=jit_spec.params,
|
|
129
|
+
headers=jit_spec.headers,
|
|
130
|
+
)
|
|
131
|
+
data = jit_response.json()
|
|
132
|
+
metadata = ConnectionMetadata.model_validate(data)
|
|
133
|
+
|
|
134
|
+
return metadata
|
|
81
135
|
|
|
82
136
|
@traced(name="connections_list", run_type="uipath")
|
|
83
137
|
def list(
|
|
@@ -217,26 +271,77 @@ class ConnectionsService(BaseService):
|
|
|
217
271
|
hide_output=True,
|
|
218
272
|
)
|
|
219
273
|
async def metadata_async(
|
|
220
|
-
self,
|
|
274
|
+
self,
|
|
275
|
+
element_instance_id: int,
|
|
276
|
+
connector_key: str,
|
|
277
|
+
tool_path: str,
|
|
278
|
+
parameters: Optional[Dict[str, str]] = None,
|
|
279
|
+
schema_mode: bool = True,
|
|
280
|
+
max_jit_depth: int = 5,
|
|
221
281
|
) -> ConnectionMetadata:
|
|
222
282
|
"""Asynchronously retrieve connection API metadata.
|
|
223
283
|
|
|
224
|
-
This method fetches the metadata for a connection,
|
|
225
|
-
|
|
284
|
+
This method fetches the metadata for a connection. When parameters are provided,
|
|
285
|
+
it automatically fetches JIT (Just-In-Time) metadata for cascading fields in a loop,
|
|
286
|
+
following action URLs up to a maximum depth.
|
|
226
287
|
|
|
227
288
|
Args:
|
|
228
289
|
element_instance_id (int): The element instance ID of the connection.
|
|
290
|
+
connector_key (str): The connector key (e.g., 'uipath-atlassian-jira', 'uipath-slack').
|
|
229
291
|
tool_path (str): The tool path to retrieve metadata for.
|
|
292
|
+
parameters (Optional[Dict[str, str]]): Parameter values. When provided, triggers
|
|
293
|
+
automatic JIT fetching for cascading fields.
|
|
230
294
|
schema_mode (bool): Whether or not to represent the output schema in the response fields.
|
|
295
|
+
max_jit_depth (int): The maximum depth of the JIT resolution loop.
|
|
231
296
|
|
|
232
297
|
Returns:
|
|
233
298
|
ConnectionMetadata: The connection metadata.
|
|
299
|
+
|
|
300
|
+
Examples:
|
|
301
|
+
>>> metadata = await sdk.connections.metadata_async(
|
|
302
|
+
... element_instance_id=123,
|
|
303
|
+
... connector_key="uipath-atlassian-jira",
|
|
304
|
+
... tool_path="Issue",
|
|
305
|
+
... parameters={"projectId": "PROJ-123"} # Optional
|
|
306
|
+
... )
|
|
234
307
|
"""
|
|
235
|
-
spec = self._metadata_spec(
|
|
308
|
+
spec = self._metadata_spec(
|
|
309
|
+
element_instance_id, connector_key, tool_path, schema_mode
|
|
310
|
+
)
|
|
236
311
|
response = await self.request_async(
|
|
237
|
-
spec.method, url=spec.endpoint, headers=spec.headers
|
|
312
|
+
spec.method, url=spec.endpoint, params=spec.params, headers=spec.headers
|
|
238
313
|
)
|
|
239
|
-
|
|
314
|
+
data = response.json()
|
|
315
|
+
metadata = ConnectionMetadata.model_validate(data)
|
|
316
|
+
|
|
317
|
+
last_action_url = None
|
|
318
|
+
depth = 0
|
|
319
|
+
|
|
320
|
+
while (
|
|
321
|
+
parameters
|
|
322
|
+
and (action_url := self._get_jit_action_url(metadata))
|
|
323
|
+
and depth < max_jit_depth
|
|
324
|
+
):
|
|
325
|
+
# Stop if we're about to call the same URL template again
|
|
326
|
+
if action_url == last_action_url:
|
|
327
|
+
break
|
|
328
|
+
|
|
329
|
+
last_action_url = action_url
|
|
330
|
+
depth += 1
|
|
331
|
+
|
|
332
|
+
jit_spec = self._metadata_jit_spec(
|
|
333
|
+
element_instance_id, action_url, parameters, schema_mode
|
|
334
|
+
)
|
|
335
|
+
jit_response = await self.request_async(
|
|
336
|
+
jit_spec.method,
|
|
337
|
+
url=jit_spec.endpoint,
|
|
338
|
+
params=jit_spec.params,
|
|
339
|
+
headers=jit_spec.headers,
|
|
340
|
+
)
|
|
341
|
+
data = jit_response.json()
|
|
342
|
+
metadata = ConnectionMetadata.model_validate(data)
|
|
343
|
+
|
|
344
|
+
return metadata
|
|
240
345
|
|
|
241
346
|
@traced(
|
|
242
347
|
name="connections_retrieve_token",
|
|
@@ -377,9 +482,13 @@ class ConnectionsService(BaseService):
|
|
|
377
482
|
)
|
|
378
483
|
|
|
379
484
|
def _metadata_spec(
|
|
380
|
-
self,
|
|
485
|
+
self,
|
|
486
|
+
element_instance_id: int,
|
|
487
|
+
connector_key: str,
|
|
488
|
+
tool_path: str,
|
|
489
|
+
schema_mode: bool,
|
|
381
490
|
) -> RequestSpec:
|
|
382
|
-
metadata_endpoint_url = f"/elements_/v3/element/instances/{element_instance_id}/elements/{tool_path}/metadata"
|
|
491
|
+
metadata_endpoint_url = f"/elements_/v3/element/instances/{element_instance_id}/elements/{connector_key}/objects/{tool_path}/metadata"
|
|
383
492
|
return RequestSpec(
|
|
384
493
|
method="GET",
|
|
385
494
|
endpoint=Endpoint(metadata_endpoint_url),
|
|
@@ -390,6 +499,54 @@ class ConnectionsService(BaseService):
|
|
|
390
499
|
},
|
|
391
500
|
)
|
|
392
501
|
|
|
502
|
+
def _metadata_jit_spec(
|
|
503
|
+
self,
|
|
504
|
+
element_instance_id: int,
|
|
505
|
+
dynamic_path: str,
|
|
506
|
+
parameters: Dict[str, str],
|
|
507
|
+
schema_mode: bool,
|
|
508
|
+
) -> RequestSpec:
|
|
509
|
+
"""Build request spec for JIT metadata with dynamic path parameter substitution.
|
|
510
|
+
|
|
511
|
+
For example, if the dynamic path is "elements/jira/projects/{projectId}/issues", and the parameters
|
|
512
|
+
are {"projectId": "PROJ-123"}, the resolved path will be "elements/jira/projects/PROJ-123/issues".
|
|
513
|
+
"""
|
|
514
|
+
for key, value in parameters.items():
|
|
515
|
+
dynamic_path = dynamic_path.replace(
|
|
516
|
+
f"{{{key}}}", quote(str(value), safe="")
|
|
517
|
+
)
|
|
518
|
+
split = urlsplit(dynamic_path.lstrip("/"))
|
|
519
|
+
query_params = dict(parse_qsl(split.query))
|
|
520
|
+
|
|
521
|
+
return RequestSpec(
|
|
522
|
+
method="GET",
|
|
523
|
+
endpoint=Endpoint(
|
|
524
|
+
f"/elements_/v3/element/instances/{element_instance_id}/{split.path}"
|
|
525
|
+
),
|
|
526
|
+
params=query_params,
|
|
527
|
+
headers={
|
|
528
|
+
"accept": "application/schema+json"
|
|
529
|
+
if schema_mode
|
|
530
|
+
else "application/json"
|
|
531
|
+
},
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
def _get_jit_action_url(
|
|
535
|
+
self, connection_metadata: ConnectionMetadata
|
|
536
|
+
) -> Optional[str]:
|
|
537
|
+
"""Return the URL of the JIT action that should be triggered dynamically."""
|
|
538
|
+
if "method" not in connection_metadata.metadata:
|
|
539
|
+
return None
|
|
540
|
+
|
|
541
|
+
methods = connection_metadata.metadata["method"]
|
|
542
|
+
actions = [
|
|
543
|
+
action
|
|
544
|
+
for method_data in methods.values()
|
|
545
|
+
for action in method_data.get("design", {}).get("actions", [])
|
|
546
|
+
if action.get("actionType") == "api"
|
|
547
|
+
]
|
|
548
|
+
return actions[0].get("apiConfiguration", {}).get("url") if actions else None
|
|
549
|
+
|
|
393
550
|
def _retrieve_token_spec(
|
|
394
551
|
self, key: str, token_type: ConnectionTokenType = ConnectionTokenType.DIRECT
|
|
395
552
|
) -> RequestSpec:
|
uipath/models/connections.py
CHANGED
|
@@ -8,6 +8,7 @@ class ConnectionMetadata(BaseModel):
|
|
|
8
8
|
"""Metadata about a connection."""
|
|
9
9
|
|
|
10
10
|
fields: dict[str, Any] = Field(default_factory=dict, alias="fields")
|
|
11
|
+
metadata: dict[str, Any] = Field(default_factory=dict, alias="metadata")
|
|
11
12
|
|
|
12
13
|
model_config = ConfigDict(populate_by_name=True, extra="allow")
|
|
13
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.127
|
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
@@ -24,11 +24,11 @@ uipath/_cli/cli_run.py,sha256=-pSuoPEfT-NzOmxLgNUtMvkYY-Lhk-dO5qv6UZkmkKU,4797
|
|
|
24
24
|
uipath/_cli/middlewares.py,sha256=tb0c4sU1SCYi0PNs956Qmk24NDk0C0mBfVQmTcyORE0,5000
|
|
25
25
|
uipath/_cli/spinner.py,sha256=bS-U_HA5yne11ejUERu7CQoXmWdabUD2bm62EfEdV8M,1107
|
|
26
26
|
uipath/_cli/_auth/_auth_server.py,sha256=v_b8KNwn0tAv8jxpeKdllOVzl31q9AcdwpE_koAK_w4,7235
|
|
27
|
-
uipath/_cli/_auth/_auth_service.py,sha256=
|
|
27
|
+
uipath/_cli/_auth/_auth_service.py,sha256=oWFfyTWBWdIFltnwZZS9iIpbBB373zljyPhb-EsjyFY,5414
|
|
28
28
|
uipath/_cli/_auth/_models.py,sha256=kWhqd5FqBo_oi3DW2x1IaJHsEloXq0I24f-pX5zb_O4,753
|
|
29
29
|
uipath/_cli/_auth/_oidc_utils.py,sha256=VEXnri7KinOdZMEPGYUf4mUZpCvSwmIL8TUBx6WhxDU,6446
|
|
30
30
|
uipath/_cli/_auth/_portal_service.py,sha256=fWnHGwd60Q_mrNEeENibqe5wv4ixp-yrG7X4XrXsXNk,8022
|
|
31
|
-
uipath/_cli/_auth/_url_utils.py,sha256
|
|
31
|
+
uipath/_cli/_auth/_url_utils.py,sha256=G_tCA5AAwSnsJakpstwv18Q1ryvx1UG0PSYwOYv5Hj8,2768
|
|
32
32
|
uipath/_cli/_auth/_utils.py,sha256=To4Ara_UF4g7nzUfKqFA11lTjhQWIZWNm4xwa5nNKmU,896
|
|
33
33
|
uipath/_cli/_auth/auth_config_25_10.json,sha256=o8J5BBFwiEtjZLHpJ_64lvnTeYeRIHaJ-Bhg0QvcUX8,521
|
|
34
34
|
uipath/_cli/_auth/auth_config_cloud.json,sha256=o8J5BBFwiEtjZLHpJ_64lvnTeYeRIHaJ-Bhg0QvcUX8,521
|
|
@@ -86,7 +86,7 @@ uipath/_cli/_templates/[Content_Types].xml.template,sha256=bYsKDz31PkIF9QksjgAY_
|
|
|
86
86
|
uipath/_cli/_templates/custom_evaluator.py.template,sha256=OuYQb8ScAOK7Qwz4FYwdETlC2NonEhLF5DXGnsYOzHg,2313
|
|
87
87
|
uipath/_cli/_templates/main.py.template,sha256=QB62qX5HKDbW4lFskxj7h9uuxBITnTWqu_DE6asCwcU,476
|
|
88
88
|
uipath/_cli/_templates/package.nuspec.template,sha256=YZyLc-u_EsmIoKf42JsLQ55OGeFmb8VkIU2VF7DFbtw,359
|
|
89
|
-
uipath/_cli/_utils/_common.py,sha256=
|
|
89
|
+
uipath/_cli/_utils/_common.py,sha256=LVI36jMFbF-6isAoyKmEDwOew-CAxZt2_kmJ-dO6NNA,4606
|
|
90
90
|
uipath/_cli/_utils/_console.py,sha256=scvnrrFoFX6CE451K-PXKV7UN0DUkInbOtDZ5jAdPP0,10070
|
|
91
91
|
uipath/_cli/_utils/_constants.py,sha256=AXeVidtHUFiODrkB2BCX_bqDL-bUzRg-Ieh1-2cCrGA,1374
|
|
92
92
|
uipath/_cli/_utils/_debug.py,sha256=zamzIR4VgbdKADAE4gbmjxDsbgF7wvdr7C5Dqp744Oc,1739
|
|
@@ -109,7 +109,7 @@ uipath/_resources/AGENTS.md,sha256=nRQNAVeEBaBvuMzXw8uXtMnGebLClUgwIMlgb8_qU9o,1
|
|
|
109
109
|
uipath/_resources/CLAUDE.md,sha256=kYsckFWTVe948z_fNWLysCHvi9_YpchBXl3s1Ek03lU,10
|
|
110
110
|
uipath/_resources/CLI_REFERENCE.md,sha256=PNVZINTXDSW4XN8QtxV3kS2WLreR7UyLfSso1_VXWBg,6758
|
|
111
111
|
uipath/_resources/REQUIRED_STRUCTURE.md,sha256=3laqGiNa3kauJ7jRI1d7w_fWKUDkqYBjcTT_6_8FAGk,1417
|
|
112
|
-
uipath/_resources/SDK_REFERENCE.md,sha256
|
|
112
|
+
uipath/_resources/SDK_REFERENCE.md,sha256=-KvQ6MFVVssuFfWEc6j05f0Uuexn8Kl84w-iQsZU5Po,27388
|
|
113
113
|
uipath/_services/__init__.py,sha256=_LNy4u--VlhVtTO66bULbCoBjyJBTuyh9jnzjWrv-h4,1140
|
|
114
114
|
uipath/_services/_base_service.py,sha256=6yGNEZ-px6lVR9l4wiMr8NDSeLrZU6nmjUlRp3lMDi8,5665
|
|
115
115
|
uipath/_services/actions_service.py,sha256=2RPMR-hFMsOlqEyjIf3aF7-lrf57jdrSD0pBjj0Kyko,16040
|
|
@@ -117,7 +117,7 @@ uipath/_services/api_client.py,sha256=kGm04ijk9AOEQd2BMxvQg-2QoB8dmyoDwFFDPyutAG
|
|
|
117
117
|
uipath/_services/assets_service.py,sha256=Z46_Nm4X7R0JcwF_Fph-5GwQ_qhQHRKJltCtwo3J8Yo,12090
|
|
118
118
|
uipath/_services/attachments_service.py,sha256=NPQYK7CGjfBaNT_1S5vEAfODmOChTbQZforllFM2ofU,26678
|
|
119
119
|
uipath/_services/buckets_service.py,sha256=FGWhJ3ewMEAahcSPY60wtFB0_qwAfaQAaAjqrC52VDk,44603
|
|
120
|
-
uipath/_services/connections_service.py,sha256=
|
|
120
|
+
uipath/_services/connections_service.py,sha256=SoOV8ZFn0AenhyodfqgO8oF7VmnWx9RdccCm0qosbxI,24059
|
|
121
121
|
uipath/_services/context_grounding_service.py,sha256=Pjx-QQQEiSKD-hY6ityj3QUSALN3fIcKLLHr_NZ0d_g,37117
|
|
122
122
|
uipath/_services/documents_service.py,sha256=2mPZzmOl2r5i8RYvdeRSJtEFWSSsiXqIauTgNTW75s4,45341
|
|
123
123
|
uipath/_services/entities_service.py,sha256=QKCLE6wRgq3HZraF-M2mljy-8il4vsNHrQhUgkewVVk,14028
|
|
@@ -201,7 +201,7 @@ uipath/models/assets.py,sha256=7x3swJRnG_a4VgjdXKKwraJLT5TF0u4wHsl6coOjX0g,2762
|
|
|
201
201
|
uipath/models/attachment.py,sha256=lI6BxBY6DY5U6qZbxhkNu-usseA1zovYSTRtLq50ubI,1029
|
|
202
202
|
uipath/models/auth.py,sha256=-CEo5KZVtZZgbAMatN6B1vBmGp8lTTumR8sMthRmL8I,345
|
|
203
203
|
uipath/models/buckets.py,sha256=7uDonM5ddfhunP6Vn24kEa-iW_ZluJU4SaWEqB2dWu8,2754
|
|
204
|
-
uipath/models/connections.py,sha256=
|
|
204
|
+
uipath/models/connections.py,sha256=g51K2zHnOz6_IRJ5YYMfrEav7PPwQzRO5FH8KjYUYo8,2822
|
|
205
205
|
uipath/models/context_grounding.py,sha256=3MaF2Fv2QYle8UUWvKGkCN5XGpx2T4a34fdbBqJ2fCs,1137
|
|
206
206
|
uipath/models/context_grounding_index.py,sha256=OhRyxZDHDSrEmBFK0-JLqMMMT64jir4XkHtQ54IKtc0,2683
|
|
207
207
|
uipath/models/documents.py,sha256=gh063bG0pl4YGThWQIgprwRCKxnKVoMOZrXDfDEVnQw,7337
|
|
@@ -224,8 +224,8 @@ uipath/tracing/_utils.py,sha256=emsQRgYu-P1gj1q7XUPJD94mOa12JvhheRkuZJpLd9Y,1505
|
|
|
224
224
|
uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
|
|
225
225
|
uipath/utils/_endpoints_manager.py,sha256=tnF_FiCx8qI2XaJDQgYkMN_gl9V0VqNR1uX7iawuLp8,8230
|
|
226
226
|
uipath/utils/dynamic_schema.py,sha256=w0u_54MoeIAB-mf3GmwX1A_X8_HDrRy6p998PvX9evY,3839
|
|
227
|
-
uipath-2.1.
|
|
228
|
-
uipath-2.1.
|
|
229
|
-
uipath-2.1.
|
|
230
|
-
uipath-2.1.
|
|
231
|
-
uipath-2.1.
|
|
227
|
+
uipath-2.1.127.dist-info/METADATA,sha256=2oA6gGyXHLX8-Cr7G2onsb1-XXfeY6G4_iXQlZgcK-E,6626
|
|
228
|
+
uipath-2.1.127.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
229
|
+
uipath-2.1.127.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
|
|
230
|
+
uipath-2.1.127.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
|
|
231
|
+
uipath-2.1.127.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|