uipath 2.1.53__py3-none-any.whl → 2.1.54__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.

@@ -319,7 +319,7 @@ class UiPathRuntimeContext(BaseModel):
319
319
  chat_handler: Optional[UiPathConversationHandler] = None
320
320
  is_conversational: Optional[bool] = None
321
321
 
322
- model_config = {"arbitrary_types_allowed": True}
322
+ model_config = {"arbitrary_types_allowed": True, "extra": "allow"}
323
323
 
324
324
  @classmethod
325
325
  def with_defaults(cls: type[C], config_path: Optional[str] = None, **kwargs) -> C:
@@ -1,6 +1,7 @@
1
1
  import json
2
2
  import os
3
3
  from functools import wraps
4
+ from pathlib import PurePath
4
5
  from typing import Any, Callable, List, Optional, Union
5
6
 
6
7
  from pydantic import BaseModel, ConfigDict, Field, field_validator
@@ -103,7 +104,7 @@ class ProjectFolder(BaseModel):
103
104
  return v
104
105
 
105
106
 
106
- class ProjectStructure(BaseModel):
107
+ class ProjectStructure(ProjectFolder):
107
108
  """Model representing the complete file structure of a UiPath project.
108
109
 
109
110
  Attributes:
@@ -114,34 +115,7 @@ class ProjectStructure(BaseModel):
114
115
  folder_type: The type of the root folder (optional)
115
116
  """
116
117
 
117
- model_config = ConfigDict(
118
- validate_by_name=True,
119
- validate_by_alias=True,
120
- use_enum_values=True,
121
- arbitrary_types_allowed=True,
122
- extra="allow",
123
- )
124
-
125
- id: Optional[str] = Field(default=None, alias="id")
126
- name: Optional[str] = Field(default=None, alias="name")
127
- folders: List[ProjectFolder] = Field(default_factory=list)
128
- files: List[ProjectFile] = Field(default_factory=list)
129
- folder_type: Optional[str] = Field(default=None, alias="folderType")
130
-
131
- @field_validator("folder_type", mode="before")
132
- @classmethod
133
- def convert_folder_type(cls, v: Union[str, int, None]) -> Optional[str]:
134
- """Convert numeric folder type to string.
135
-
136
- Args:
137
- v: The value to convert
138
-
139
- Returns:
140
- Optional[str]: The converted value or None
141
- """
142
- if isinstance(v, int):
143
- return str(v)
144
- return v
118
+ pass
145
119
 
146
120
 
147
121
  class LockInfo(BaseModel):
@@ -174,6 +148,33 @@ def get_folder_by_name(
174
148
  return None
175
149
 
176
150
 
151
+ def resolve_path(
152
+ folder: ProjectFolder,
153
+ path: PurePath,
154
+ ) -> ProjectFile | ProjectFolder:
155
+ """Resolve a path relative to the folder.
156
+
157
+ Args:
158
+ folder: Project folder
159
+ path: Path relative to the folder
160
+
161
+ Returns: The resolved folder or file. If resolution fails, an assertion is raised.
162
+ """
163
+ root = path.parts
164
+ while len(root) > 1:
165
+ child = next(
166
+ (folder for folder in folder.folders if folder.name == root[0]), None
167
+ )
168
+ assert child, "Path not found."
169
+ folder = child
170
+ root = root[1:]
171
+ file = next((f for f in folder.files if f.name == root[0]), None)
172
+ child = next((folder for folder in folder.folders if folder.name == root[0]), None)
173
+ resolved = file or child
174
+ assert resolved, "Path not found."
175
+ return resolved
176
+
177
+
177
178
  class AddedResource(BaseModel):
178
179
  """Represents a new file to be added during a structural migration."""
179
180
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.1.53
3
+ Version: 2.1.54
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
@@ -50,7 +50,7 @@ uipath/_cli/_evals/_models/_evaluation_set.py,sha256=mwcTstHuyHd7ys_nLzgCNKBAsS4
50
50
  uipath/_cli/_evals/_models/_evaluator_base_params.py,sha256=lTYKOV66tcjW85KHTyOdtF1p1VDaBNemrMAvH8bFIFc,382
51
51
  uipath/_cli/_evals/_models/_output.py,sha256=TTQ0hhmD3dTkIbj_Ly_rDCGSnpZsHwdmCsl7FLdoZD0,2634
52
52
  uipath/_cli/_push/sw_file_handler.py,sha256=AX4TKM-q6CNGw3JyBW02M8ktPZuFMcAU9LN3Ii0Q2QI,18202
53
- uipath/_cli/_runtime/_contracts.py,sha256=FziI4E1GF-brOwkYSGEUvRAKhLJUQ_2ZwUMefynl944,28764
53
+ uipath/_cli/_runtime/_contracts.py,sha256=ZK572viY3Ydnip21rzmJ3R6F3cXpHVtDTuvwcEciy3I,28782
54
54
  uipath/_cli/_runtime/_escalation.py,sha256=x3vI98qsfRA-fL_tNkRVTFXioM5Gv2w0GFcXJJ5eQtg,7981
55
55
  uipath/_cli/_runtime/_hitl.py,sha256=VKbM021nVg1HEDnTfucSLJ0LsDn83CKyUtVzofS2qTU,11369
56
56
  uipath/_cli/_runtime/_logging.py,sha256=MGklGKPjYKjs7J5Jy9eplA9zCDsdtEbkZdCbTwgut_4,8311
@@ -71,7 +71,7 @@ uipath/_cli/_utils/_input_args.py,sha256=3LGNqVpJItvof75VGm-ZNTUMUH9-c7-YgleM5b2
71
71
  uipath/_cli/_utils/_parse_ast.py,sha256=8Iohz58s6bYQ7rgWtOTjrEInLJ-ETikmOMZzZdIY2Co,20072
72
72
  uipath/_cli/_utils/_processes.py,sha256=q7DfEKHISDWf3pngci5za_z0Pbnf_shWiYEcTOTCiyk,1855
73
73
  uipath/_cli/_utils/_project_files.py,sha256=sulh3xZhDDw_rBOrn_XSUfVSD6sUu47ZK4n_lF5BKkQ,13197
74
- uipath/_cli/_utils/_studio_project.py,sha256=HvzcpIIIA4hUIvMbId1dsAhmFLMuhnS2ZtyNdcpXJ8c,15422
74
+ uipath/_cli/_utils/_studio_project.py,sha256=4aoRFj5FazUPpPltfr3jvyjoLsUd4hyl9We4SAuKFh4,15376
75
75
  uipath/_cli/_utils/_tracing.py,sha256=2igb03j3EHjF_A406UhtCKkPfudVfFPjUq5tXUEG4oo,1541
76
76
  uipath/_cli/_utils/_uv_helpers.py,sha256=6SvoLnZPoKIxW0sjMvD1-ENV_HOXDYzH34GjBqwT138,3450
77
77
  uipath/_resources/AGENTS.md,sha256=YWhWuX9XIbyVhVT3PnPc4Of3_q6bsNJcuzYu3N8f_Ug,25850
@@ -148,8 +148,8 @@ uipath/tracing/_traced.py,sha256=qeVDrds2OUnpdUIA0RhtF0kg2dlAZhyC1RRkI-qivTM,185
148
148
  uipath/tracing/_utils.py,sha256=wJRELaPu69iY0AhV432Dk5QYf_N_ViRU4kAUG1BI1ew,10384
149
149
  uipath/utils/__init__.py,sha256=VD-KXFpF_oWexFg6zyiWMkxl2HM4hYJMIUDZ1UEtGx0,105
150
150
  uipath/utils/_endpoints_manager.py,sha256=iRTl5Q0XAm_YgcnMcJOXtj-8052sr6jpWuPNz6CgT0Q,8408
151
- uipath-2.1.53.dist-info/METADATA,sha256=QYSNjKWwpoLp7Vuc_HWzFplKDGJu_40CGdIhmf9SxFE,6482
152
- uipath-2.1.53.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
153
- uipath-2.1.53.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
154
- uipath-2.1.53.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
155
- uipath-2.1.53.dist-info/RECORD,,
151
+ uipath-2.1.54.dist-info/METADATA,sha256=Yzw9AxJ3oi5FRDQ3ISjPi55QIWeKyNYqFSVzNnN-FXo,6482
152
+ uipath-2.1.54.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
153
+ uipath-2.1.54.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
154
+ uipath-2.1.54.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
155
+ uipath-2.1.54.dist-info/RECORD,,