alita-sdk 0.3.202__py3-none-any.whl → 0.3.204__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.
- alita_sdk/runtime/clients/client.py +3 -3
- alita_sdk/tools/carrier/api_wrapper.py +3 -0
- alita_sdk/tools/carrier/backend_reports_tool.py +29 -1
- alita_sdk/tools/carrier/backend_tests_tool.py +33 -30
- alita_sdk/tools/carrier/carrier_sdk.py +14 -5
- alita_sdk/tools/carrier/tools.py +2 -1
- alita_sdk/tools/postman/api_wrapper.py +28 -15
- alita_sdk/tools/slack/api_wrapper.py +19 -4
- {alita_sdk-0.3.202.dist-info → alita_sdk-0.3.204.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.202.dist-info → alita_sdk-0.3.204.dist-info}/RECORD +13 -13
- {alita_sdk-0.3.202.dist-info → alita_sdk-0.3.204.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.202.dist-info → alita_sdk-0.3.204.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.202.dist-info → alita_sdk-0.3.204.dist-info}/top_level.txt +0 -0
@@ -58,8 +58,8 @@ class AlitaClient:
|
|
58
58
|
self.list_apps_url = f"{self.base_url}{self.api_path}/applications/applications/prompt_lib/{self.project_id}"
|
59
59
|
self.integration_details = f"{self.base_url}{self.api_path}/integrations/integration/{self.project_id}"
|
60
60
|
self.secrets_url = f"{self.base_url}{self.api_path}/secrets/secret/{self.project_id}"
|
61
|
-
self.artifacts_url = f"{self.base_url}{self.api_path}/artifacts/artifacts/{self.project_id}"
|
62
|
-
self.artifact_url = f"{self.base_url}{self.api_path}/artifacts/artifact/{self.project_id}"
|
61
|
+
self.artifacts_url = f"{self.base_url}{self.api_path}/artifacts/artifacts/default/{self.project_id}"
|
62
|
+
self.artifact_url = f"{self.base_url}{self.api_path}/artifacts/artifact/default/{self.project_id}"
|
63
63
|
self.bucket_url = f"{self.base_url}{self.api_path}/artifacts/buckets/{self.project_id}"
|
64
64
|
self.configurations_url = f'{self.base_url}{self.api_path}/integrations/integrations/default/{self.project_id}?section=configurations&unsecret=true'
|
65
65
|
self.ai_section_url = f'{self.base_url}{self.api_path}/integrations/integrations/default/{self.project_id}?section=ai'
|
@@ -291,7 +291,7 @@ class AlitaClient:
|
|
291
291
|
return self._process_requst(data)
|
292
292
|
|
293
293
|
def download_artifact(self, bucket_name, artifact_name):
|
294
|
-
url = f'{self.artifact_url}/{bucket_name}/{artifact_name}'
|
294
|
+
url = f'{self.artifact_url}/{bucket_name.lower()}/{artifact_name}'
|
295
295
|
data = requests.get(url, headers=self.headers, verify=False)
|
296
296
|
if data.status_code == 403:
|
297
297
|
return {"error": "You are not authorized to access this resource"}
|
@@ -61,6 +61,9 @@ class CarrierAPIWrapper(BaseModel):
|
|
61
61
|
def get_reports_list(self) -> List[Dict[str, Any]]:
|
62
62
|
return self._client.get_reports_list()
|
63
63
|
|
64
|
+
def add_tag_to_report(self, report_id, tag_name):
|
65
|
+
return self._client.add_tag_to_report(report_id, tag_name)
|
66
|
+
|
64
67
|
def get_tests_list(self) -> List[Dict[str, Any]]:
|
65
68
|
return self._client.get_tests_list()
|
66
69
|
|
@@ -23,10 +23,11 @@ class GetReportsTool(BaseTool):
|
|
23
23
|
description: str = "Get list of reports from the Carrier platform."
|
24
24
|
args_schema: Type[BaseModel] = create_model(
|
25
25
|
"GetReportsInput",
|
26
|
+
name=(str, Field(default="", description="Optional parameter. Report name to filter reports")),
|
26
27
|
tag_name=(str, Field(default="", description="Optional parameter. Tag name to filter reports")),
|
27
28
|
)
|
28
29
|
|
29
|
-
def _run(self, tag_name=""):
|
30
|
+
def _run(self, name="", tag_name=""):
|
30
31
|
try:
|
31
32
|
reports = self.api_wrapper.get_reports_list()
|
32
33
|
|
@@ -38,6 +39,10 @@ class GetReportsTool(BaseTool):
|
|
38
39
|
|
39
40
|
trimmed_reports = []
|
40
41
|
for report in reports:
|
42
|
+
# Filter reports by name
|
43
|
+
if name and not name == report["name"]:
|
44
|
+
continue
|
45
|
+
|
41
46
|
# Filter by tag title
|
42
47
|
tags = report.get("tags", [])
|
43
48
|
if tag_name and not any(tag.get("title") == tag_name for tag in tags):
|
@@ -111,6 +116,29 @@ class GetReportByIDTool(BaseTool):
|
|
111
116
|
raise ToolException(stacktrace)
|
112
117
|
|
113
118
|
|
119
|
+
class AddTagToReportTool(BaseTool):
|
120
|
+
api_wrapper: CarrierAPIWrapper = Field(..., description="Carrier API Wrapper instance")
|
121
|
+
name: str = "add_tag_to_report"
|
122
|
+
description: str = "Add tag to backend report"
|
123
|
+
args_schema: Type[BaseModel] = create_model(
|
124
|
+
"AddTagToReportInput",
|
125
|
+
report_id=(str, Field(description="Report id to update")),
|
126
|
+
tag_name=(str, Field(description="Tag name to add to report")),
|
127
|
+
)
|
128
|
+
|
129
|
+
def _run(self, report_id: str, tag_name: str):
|
130
|
+
try:
|
131
|
+
res = self.api_wrapper.add_tag_to_report(report_id, tag_name)
|
132
|
+
if "Tags was updated" in res.text:
|
133
|
+
return f"Added tag {tag_name} to report id {report_id}"
|
134
|
+
else:
|
135
|
+
return f"Failed to add new tag to report id {report_id}"
|
136
|
+
except Exception:
|
137
|
+
stacktrace = traceback.format_exc()
|
138
|
+
logger.error(f"Error downloading reports: {stacktrace}")
|
139
|
+
raise ToolException(stacktrace)
|
140
|
+
|
141
|
+
|
114
142
|
class CreateExcelReportTool(BaseTool):
|
115
143
|
api_wrapper: CarrierAPIWrapper = Field(..., description="Carrier API Wrapper instance")
|
116
144
|
name: str = "create_excel_report"
|
@@ -7,7 +7,6 @@ from pydantic.fields import Field
|
|
7
7
|
from pydantic import create_model, BaseModel
|
8
8
|
from .api_wrapper import CarrierAPIWrapper
|
9
9
|
|
10
|
-
|
11
10
|
logger = logging.getLogger(__name__)
|
12
11
|
|
13
12
|
|
@@ -79,8 +78,10 @@ class RunTestByIDTool(BaseTool):
|
|
79
78
|
description: str = "Execute test plan from the Carrier platform."
|
80
79
|
args_schema: Type[BaseModel] = create_model(
|
81
80
|
"RunTestByIdInput",
|
82
|
-
test_id=(
|
83
|
-
|
81
|
+
test_id=(
|
82
|
+
int, Field(default=None, description="Test id to execute. Use test_id if user provide id in int format")),
|
83
|
+
name=(
|
84
|
+
str, Field(default=None, description="Test name to execute. Use name if user provide name in str format")),
|
84
85
|
test_parameters=(list, Field(
|
85
86
|
default=None,
|
86
87
|
description=(
|
@@ -200,7 +201,6 @@ class RunTestByIDTool(BaseTool):
|
|
200
201
|
# Validate and merge user-provided cloud_settings with available parameters
|
201
202
|
cloud_settings = self._merge_cloud_settings(available_cloud_settings, cloud_settings)
|
202
203
|
|
203
|
-
|
204
204
|
# Build common_params dictionary
|
205
205
|
common_params = {
|
206
206
|
param["name"]: param
|
@@ -307,7 +307,8 @@ class CreateBackendTestInput(BaseModel):
|
|
307
307
|
test_type: str = Field(..., description="Test type")
|
308
308
|
env_type: str = Field(..., description="Env type")
|
309
309
|
entrypoint: str = Field(..., description="Entrypoint for the test (JMeter script path or Gatling simulation path)")
|
310
|
-
custom_cmd: str = Field(...,
|
310
|
+
custom_cmd: str = Field(...,
|
311
|
+
description="Custom command line to execute the test (e.g., -l /tmp/reports/jmeter.jtl -e -o /tmp/reports/html_report)")
|
311
312
|
runner: str = Field(..., description="Test runner (Gatling or JMeter)")
|
312
313
|
source: Optional[Dict[str, Optional[str]]] = Field(
|
313
314
|
None,
|
@@ -474,8 +475,11 @@ class CreateBackendTestTool(BaseTool):
|
|
474
475
|
return {
|
475
476
|
"message": "Do you want to configure email integration?",
|
476
477
|
"instructions": (
|
478
|
+
"If the user indicates no integrations are needed make sure to pass email_integration"
|
479
|
+
" as empty dict to _run method and invoke it ones again with email_integration={}."
|
477
480
|
"If yes, select an integration from the available options below and provide email recipients.\n"
|
478
|
-
"If no, respond with 'no'."
|
481
|
+
"If no, respond with 'no'. "
|
482
|
+
|
479
483
|
),
|
480
484
|
"available_integrations": [
|
481
485
|
{
|
@@ -491,6 +495,28 @@ class CreateBackendTestTool(BaseTool):
|
|
491
495
|
},
|
492
496
|
}
|
493
497
|
|
498
|
+
# Ensure email_integrations is an empty dict if the user indicates no integrations are needed
|
499
|
+
if isinstance(email_integration, str) and email_integration.lower() == "no":
|
500
|
+
email_integration = {}
|
501
|
+
elif (
|
502
|
+
len(integrations_list) > 0
|
503
|
+
and isinstance(email_integration, dict)
|
504
|
+
and "integration_id" in email_integration
|
505
|
+
and "recipients" in email_integration
|
506
|
+
):
|
507
|
+
email_integration = {
|
508
|
+
"reporters": {
|
509
|
+
"reporter_email": {
|
510
|
+
"id": email_integration["integration_id"],
|
511
|
+
"is_local": True,
|
512
|
+
"project_id": integrations_list[0]["project_id"],
|
513
|
+
"recipients": email_integration["recipients"],
|
514
|
+
}
|
515
|
+
}
|
516
|
+
}
|
517
|
+
else:
|
518
|
+
email_integration = {}
|
519
|
+
|
494
520
|
# Prepare the final data dictionary
|
495
521
|
data = {
|
496
522
|
"common_params": {
|
@@ -512,16 +538,7 @@ class CreateBackendTestTool(BaseTool):
|
|
512
538
|
"location": "default", # TODO update location
|
513
539
|
},
|
514
540
|
"test_parameters": test_parameters,
|
515
|
-
"integrations":
|
516
|
-
"reporters": {
|
517
|
-
"reporter_email": {
|
518
|
-
"id": email_integration["integration_id"],
|
519
|
-
"is_local": True,
|
520
|
-
"project_id": integrations_list[0]["project_id"], # Example project_id
|
521
|
-
"recipients": email_integration["recipients"],
|
522
|
-
}
|
523
|
-
}
|
524
|
-
},
|
541
|
+
"integrations": email_integration,
|
525
542
|
"scheduling": [],
|
526
543
|
"run_test": False,
|
527
544
|
}
|
@@ -539,17 +556,3 @@ class CreateBackendTestTool(BaseTool):
|
|
539
556
|
stacktrace = traceback.format_exc()
|
540
557
|
logger.error(f"Error while creating test: {stacktrace}")
|
541
558
|
raise ToolException(stacktrace)
|
542
|
-
|
543
|
-
# data = {"common_params":{"name":"toolkit_demo","test_type":"toolkit_demo","env_type":"toolkit_demo",
|
544
|
-
# "entrypoint":"tests/BasicEcommerceWithTransaction.jmx","runner":"v5.6.3",
|
545
|
-
# "source":{"name":"git_https","repo":"https://git.epam.com/epm-perf/boilerplate.git",
|
546
|
-
# "branch":"jmeter","username":"mykhailo_hunko@epam.com",
|
547
|
-
# "password":"{{secret.mykhailo_gitlab}}"},
|
548
|
-
# "env_vars":{"cpu_quota":2,"memory_quota":6,"cloud_settings":{},
|
549
|
-
# "custom_cmd":"-l /tmp/reports/jmeter.jtl -e -o /tmp/reports/html_report"},
|
550
|
-
# "parallel_runners":1,"cc_env_vars":{},"customization":{},"location":"default"},
|
551
|
-
# "test_parameters":[{"name":"VUSERS","default":"5","type":"string","description":"","action":""},
|
552
|
-
# {"name":"DURATION","default":"60","type":"string","description":"","action":""}],
|
553
|
-
# "integrations":{"reporters":{"reporter_email":{"id":1,"is_local":True,"project_id":36,
|
554
|
-
# "recipients":["mykhailo_hunko@epam.com"]}}},
|
555
|
-
# "scheduling":[],"run_test":True}
|
@@ -77,6 +77,17 @@ class CarrierClient(BaseModel):
|
|
77
77
|
endpoint = f"api/v1/backend_performance/reports/{self.credentials.project_id}"
|
78
78
|
return self.request('get', endpoint).get("rows", [])
|
79
79
|
|
80
|
+
def add_tag_to_report(self, report_id, tag_name):
|
81
|
+
endpoint = f"api/v1/backend_performance/tags/{self.credentials.project_id}/{report_id}"
|
82
|
+
full_url = f"{self.credentials.url.rstrip('/')}/{endpoint.lstrip('/')}"
|
83
|
+
headers = {
|
84
|
+
'Authorization': f'bearer {self.credentials.token}',
|
85
|
+
'content-type': 'application/json'
|
86
|
+
}
|
87
|
+
data = {"tags": [{"title": tag_name, "hex": "#5933c6"}]}
|
88
|
+
res = requests.post(full_url, headers=headers, json=data)
|
89
|
+
return res
|
90
|
+
|
80
91
|
def get_tests_list(self) -> List[Dict[str, Any]]:
|
81
92
|
endpoint = f"api/v1/backend_performance/tests/{self.credentials.project_id}"
|
82
93
|
return self.request('get', endpoint).get("rows", [])
|
@@ -90,9 +101,6 @@ class CarrierClient(BaseModel):
|
|
90
101
|
form_data = {"data": dumps(data)}
|
91
102
|
# Send the POST request
|
92
103
|
res = requests.post(full_url, headers=headers, data=form_data)
|
93
|
-
print("************************* response")
|
94
|
-
print(res.text)
|
95
|
-
print("**********************************")
|
96
104
|
return res
|
97
105
|
|
98
106
|
def run_test(self, test_id: str, json_body):
|
@@ -150,7 +158,8 @@ class CarrierClient(BaseModel):
|
|
150
158
|
for file_name in file_list:
|
151
159
|
if file_name.startswith(report_archive_prefix) and "excel_report" not in file_name:
|
152
160
|
report_files_list.append(file_name)
|
153
|
-
test_log_file_path, errors_log_file_path = self.download_and_merge_reports(report_files_list, lg_type,
|
161
|
+
test_log_file_path, errors_log_file_path = self.download_and_merge_reports(report_files_list, lg_type,
|
162
|
+
bucket_name, extract_to)
|
154
163
|
|
155
164
|
return report_info, test_log_file_path, errors_log_file_path
|
156
165
|
|
@@ -312,4 +321,4 @@ class CarrierClient(BaseModel):
|
|
312
321
|
}
|
313
322
|
}
|
314
323
|
|
315
|
-
return self.request('put', endpoint, json=cancel_body)
|
324
|
+
return self.request('put', endpoint, json=cancel_body)
|
alita_sdk/tools/carrier/tools.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# import all available tools
|
2
2
|
from .tickets_tool import FetchTicketsTool, CreateTicketTool
|
3
|
-
from .backend_reports_tool import GetReportsTool, GetReportByIDTool, CreateExcelReportTool
|
3
|
+
from .backend_reports_tool import GetReportsTool, GetReportByIDTool, CreateExcelReportTool, AddTagToReportTool
|
4
4
|
from .backend_tests_tool import GetTestsTool, GetTestByIDTool, RunTestByIDTool, CreateBackendTestTool
|
5
5
|
from .ui_reports_tool import GetUIReportsTool, GetUIReportByIDTool, GetUITestsTool
|
6
6
|
from .run_ui_test_tool import RunUITestTool
|
@@ -14,6 +14,7 @@ __all__ = [
|
|
14
14
|
{"name": "create_ticket", "tool": CreateTicketTool},
|
15
15
|
{"name": "get_reports", "tool": GetReportsTool},
|
16
16
|
{"name": "get_report_by_id", "tool": GetReportByIDTool},
|
17
|
+
{"name": "add_tag_to_report", "tool": AddTagToReportTool},
|
17
18
|
{"name": "create_excel_report", "tool": CreateExcelReportTool},
|
18
19
|
{"name": "get_tests", "tool": GetTestsTool},
|
19
20
|
{"name": "get_test_by_id", "tool": GetTestByIDTool},
|
@@ -91,12 +91,16 @@ PostmanUpdateCollectionDescription = create_model(
|
|
91
91
|
|
92
92
|
PostmanUpdateCollectionVariables = create_model(
|
93
93
|
"PostmanUpdateCollectionVariables",
|
94
|
-
variables=(List[Dict], Field(
|
94
|
+
variables=(Optional[List[Dict[str, Any]]], Field(default=None,
|
95
|
+
description="List of collection variables objects. "
|
96
|
+
"Example: [{'key': 'project_id', 'type': 'string', 'value': '15', 'enabled': true}]"))
|
95
97
|
)
|
96
98
|
|
97
99
|
PostmanUpdateCollectionAuth = create_model(
|
98
100
|
"PostmanUpdateCollectionAuth",
|
99
|
-
auth=(Dict, Field(
|
101
|
+
auth=(Optional[Dict[str, Any]], Field(default=None,
|
102
|
+
description="Updated authentication settings. Example: {'type': 'bearer',token '': 'your_token'}"
|
103
|
+
))
|
100
104
|
)
|
101
105
|
|
102
106
|
PostmanDeleteCollection = create_model(
|
@@ -190,19 +194,30 @@ PostmanUpdateRequestDescription = create_model(
|
|
190
194
|
PostmanUpdateRequestHeaders = create_model(
|
191
195
|
"PostmanUpdateRequestHeaders",
|
192
196
|
request_path=(str, Field(description="Path to the request (folder/requestName)")),
|
193
|
-
headers=(
|
197
|
+
headers=(str, Field(description="String containing HTTP headers, separated by newline characters. "
|
198
|
+
"Each header should be in the format: \"Header-Name: value\". "
|
199
|
+
"Example: \"Content-Type: application/json\\nAuthorization: Bearer token123\". "))
|
194
200
|
)
|
195
201
|
|
196
202
|
PostmanUpdateRequestBody = create_model(
|
197
203
|
"PostmanUpdateRequestBody",
|
198
204
|
request_path=(str, Field(description="Path to the request (folder/requestName)")),
|
199
|
-
body=(Dict, Field(description="Request body"))
|
205
|
+
body=(Optional[Dict[str, Any]], Field(default=None, description="Request body."))
|
200
206
|
)
|
201
207
|
|
202
208
|
PostmanUpdateRequestAuth = create_model(
|
203
209
|
"PostmanUpdateRequestAuth",
|
204
210
|
request_path=(str, Field(description="Path to the request (folder/requestName)")),
|
205
|
-
auth=(Dict, Field(
|
211
|
+
auth=(Optional[Dict[str, Any]], Field(default=None,
|
212
|
+
description=(
|
213
|
+
"An object. "
|
214
|
+
"For API key authentication, use: {\"type\": \"apikey\", \"apikey\": [{\"key\": \"key\", \"value\": \"api-key\"}, {\"key\": \"value\", \"value\": \"XXX\"}]}. "
|
215
|
+
"For bearer authentication, use: {\"type\": \"bearer\", \"bearer\": [{\"key\": \"token\", \"value\": \"XXX\", \"type\": \"string\"}]}. "
|
216
|
+
"For basic authentication, use: {\"type\": \"basic\", \"basic\": [{\"key\": \"username\", \"value\": \"user\"}, {\"key\": \"password\", \"value\": \"pass\"}]}. "
|
217
|
+
"`type`: Authentication type (e.g., \"apikey\", \"bearer\", \"basic\"). "
|
218
|
+
"`apikey`, `bearer`, `basic`: List of key-value pairs for configuration."
|
219
|
+
"Other types can be added as needed, following the same structure."
|
220
|
+
)))
|
206
221
|
)
|
207
222
|
|
208
223
|
PostmanUpdateRequestTests = create_model(
|
@@ -692,7 +707,7 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
692
707
|
def get_collections(self, **kwargs) -> str:
|
693
708
|
"""Get all Postman collections accessible to the user."""
|
694
709
|
try:
|
695
|
-
response = self._make_request('GET', '/collections')
|
710
|
+
response = self._make_request('GET', f'/collections?workspace={self.workspace_id}')
|
696
711
|
return json.dumps(response, indent=2)
|
697
712
|
except Exception as e:
|
698
713
|
stacktrace = format_exc()
|
@@ -1214,7 +1229,7 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
1214
1229
|
raise ToolException(
|
1215
1230
|
f"Unable to update collection {self.collection_id} description: {str(e)}")
|
1216
1231
|
|
1217
|
-
def update_collection_variables(self, variables: List[Dict], **kwargs) -> str:
|
1232
|
+
def update_collection_variables(self, variables: List[Dict[str, Any]], **kwargs) -> str:
|
1218
1233
|
"""Update collection variables."""
|
1219
1234
|
try:
|
1220
1235
|
# Get current collection
|
@@ -1234,7 +1249,7 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
1234
1249
|
raise ToolException(
|
1235
1250
|
f"Unable to update collection {self.collection_id} variables: {str(e)}")
|
1236
1251
|
|
1237
|
-
def update_collection_auth(self, auth: Dict, **kwargs) -> str:
|
1252
|
+
def update_collection_auth(self, auth: Dict[str, Any], **kwargs) -> str:
|
1238
1253
|
"""Update collection authentication settings."""
|
1239
1254
|
try:
|
1240
1255
|
# Get current collection
|
@@ -1638,7 +1653,7 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
1638
1653
|
raise ToolException(
|
1639
1654
|
f"Unable to update request '{request_path}' description: {str(e)}")
|
1640
1655
|
|
1641
|
-
def update_request_headers(self, request_path: str, headers:
|
1656
|
+
def update_request_headers(self, request_path: str, headers: str, **kwargs) -> str:
|
1642
1657
|
"""Update request headers."""
|
1643
1658
|
try:
|
1644
1659
|
# Get request item and ID
|
@@ -1646,7 +1661,7 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
1646
1661
|
|
1647
1662
|
# Create update payload
|
1648
1663
|
request_update = {
|
1649
|
-
"
|
1664
|
+
"headers": headers
|
1650
1665
|
}
|
1651
1666
|
|
1652
1667
|
# Update the headers field
|
@@ -1659,16 +1674,14 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
1659
1674
|
raise ToolException(
|
1660
1675
|
f"Unable to update request '{request_path}' headers: {str(e)}")
|
1661
1676
|
|
1662
|
-
def update_request_body(self, request_path: str, body: Dict, **kwargs) -> str:
|
1677
|
+
def update_request_body(self, request_path: str, body: Dict[str, Any], **kwargs) -> str:
|
1663
1678
|
"""Update request body."""
|
1664
1679
|
try:
|
1665
1680
|
# Get request item and ID
|
1666
1681
|
request_item, request_id, _ = self._get_request_item_and_id(request_path)
|
1667
1682
|
|
1668
1683
|
# Create update payload
|
1669
|
-
request_update =
|
1670
|
-
"body": body
|
1671
|
-
}
|
1684
|
+
request_update = body
|
1672
1685
|
|
1673
1686
|
# Update the body field
|
1674
1687
|
response = self._make_request('PUT', f'/collections/{self.collection_id}/requests/{request_id}',
|
@@ -1680,7 +1693,7 @@ class PostmanApiWrapper(BaseToolApiWrapper):
|
|
1680
1693
|
raise ToolException(
|
1681
1694
|
f"Unable to update request '{request_path}' body: {str(e)}")
|
1682
1695
|
|
1683
|
-
def update_request_auth(self, request_path: str, auth: Dict, **kwargs) -> str:
|
1696
|
+
def update_request_auth(self, request_path: str, auth: Dict[str, Any], **kwargs) -> str:
|
1684
1697
|
"""Update request authentication."""
|
1685
1698
|
try:
|
1686
1699
|
# Get request item and ID
|
@@ -203,8 +203,18 @@ class SlackApiWrapper(BaseToolApiWrapper):
|
|
203
203
|
client = self._get_client()
|
204
204
|
response = client.conversations_list() # Fetch conversations
|
205
205
|
channels = response.get("channels", [])
|
206
|
-
|
207
|
-
|
206
|
+
# Extract only the required fields
|
207
|
+
filtered_channels = [
|
208
|
+
{
|
209
|
+
"id": ch.get("id"),
|
210
|
+
"name": ch.get("name"),
|
211
|
+
"is_channel": ch.get("is_channel"),
|
212
|
+
"shared_team_ids": ch.get("shared_team_ids"),
|
213
|
+
}
|
214
|
+
for ch in channels
|
215
|
+
]
|
216
|
+
logger.info(f"Found {len(filtered_channels)} channels.")
|
217
|
+
return filtered_channels # Return the list of channels
|
208
218
|
except SlackApiError as e:
|
209
219
|
print(f"Error fetching conversations: {e.response['error']}")
|
210
220
|
return []
|
@@ -289,13 +299,18 @@ class SlackApiWrapper(BaseToolApiWrapper):
|
|
289
299
|
"description": self.list_workspace_users.__doc__ or "List all users in the Slack workspace.",
|
290
300
|
"args_schema": ListWorkspaceUsersModel,
|
291
301
|
"ref": self.list_workspace_users
|
292
|
-
}
|
293
|
-
,
|
302
|
+
},
|
294
303
|
{
|
295
304
|
"name": "invite_to_conversation",
|
296
305
|
"description": self.invite_to_conversation.__doc__ or "Invite to a conversation in the Slack workspace.",
|
297
306
|
"args_schema": InviteToConversationModel,
|
298
307
|
"ref": self.invite_to_conversation
|
308
|
+
},
|
309
|
+
{
|
310
|
+
"name": "list_workspace_conversations",
|
311
|
+
"description": self.list_workspace_conversations.__doc__ or "Invite to a conversation in the Slack workspace.",
|
312
|
+
"args_schema": ListWorkspaceConversationsModel,
|
313
|
+
"ref": self.list_workspace_conversations
|
299
314
|
}
|
300
315
|
|
301
316
|
]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.204
|
4
4
|
Summary: SDK for building langchain agents using resources from Alita
|
5
5
|
Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedjik@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
|
6
6
|
License-Expression: Apache-2.0
|
@@ -13,7 +13,7 @@ alita_sdk/community/analysis/jira_analyse/api_wrapper.py,sha256=Ui1GBWizIFGFOi98
|
|
13
13
|
alita_sdk/runtime/__init__.py,sha256=4W0UF-nl3QF2bvET5lnah4o24CoTwSoKXhuN0YnwvEE,828
|
14
14
|
alita_sdk/runtime/clients/__init__.py,sha256=BdehU5GBztN1Qi1Wul0cqlU46FxUfMnI6Vq2Zd_oq1M,296
|
15
15
|
alita_sdk/runtime/clients/artifact.py,sha256=4N2t5x3GibyXLq3Fvrv2o_VA7Z000yNfc-UN4eGsHZg,2679
|
16
|
-
alita_sdk/runtime/clients/client.py,sha256=
|
16
|
+
alita_sdk/runtime/clients/client.py,sha256=t4KckYtjJo7JauxcCuQxOsjqPzhfqR4B8bJuVUorPiY,21674
|
17
17
|
alita_sdk/runtime/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
|
18
18
|
alita_sdk/runtime/clients/prompt.py,sha256=li1RG9eBwgNK_Qf0qUaZ8QNTmsncFrAL2pv3kbxZRZg,1447
|
19
19
|
alita_sdk/runtime/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -129,18 +129,18 @@ alita_sdk/tools/browser/google_search_rag.py,sha256=QVHFbVwymiJGuno_HLSJOK1c_Mpg
|
|
129
129
|
alita_sdk/tools/browser/utils.py,sha256=4k3YM_f1Kqlhjz9vt2pNsGkvCjhy-EmY3nvcwdFCsLA,2501
|
130
130
|
alita_sdk/tools/browser/wiki.py,sha256=Qh3HBFd4dkS2VavXbFJOm4b8SjVSIe5xSD7CY1vEkKE,1126
|
131
131
|
alita_sdk/tools/carrier/__init__.py,sha256=pP-nk-dpqOkrvwcRY_szgwqoowyVNl_GobD4Inp-Qus,4435
|
132
|
-
alita_sdk/tools/carrier/api_wrapper.py,sha256=
|
133
|
-
alita_sdk/tools/carrier/backend_reports_tool.py,sha256=
|
134
|
-
alita_sdk/tools/carrier/backend_tests_tool.py,sha256=
|
132
|
+
alita_sdk/tools/carrier/api_wrapper.py,sha256=tP7oR_U0HX1rxqat0Jkz6oh3RB9BEr1ESKQ9J8OWDcE,9093
|
133
|
+
alita_sdk/tools/carrier/backend_reports_tool.py,sha256=8qnHQVCuUErW6eCH2nLF4bUl1AFuMWm2GQnKvOhfUCs,13452
|
134
|
+
alita_sdk/tools/carrier/backend_tests_tool.py,sha256=a6EivWZee8HVU2eXUM5NWS6oB3pt1-orxLz1YARrqHA,26572
|
135
135
|
alita_sdk/tools/carrier/cancel_ui_test_tool.py,sha256=pD1sKEcZGBWJqFpgjeohMk93uuUPWruVJRPVVg90rpo,6438
|
136
|
-
alita_sdk/tools/carrier/carrier_sdk.py,sha256=
|
136
|
+
alita_sdk/tools/carrier/carrier_sdk.py,sha256=IJUbnxoJWzqgUpKobJFdNS-85KT35IYRSAz6I92kWJk,15161
|
137
137
|
alita_sdk/tools/carrier/create_ui_excel_report_tool.py,sha256=8aSpkyIGXsOBTo8Ye_6p19v8OOl1y7QW47IJxZ6QDgM,20163
|
138
138
|
alita_sdk/tools/carrier/create_ui_test_tool.py,sha256=knKvPOo9usI2XHqZtcbBEBzKwB9tS7GEl9KIX78vJiA,8184
|
139
139
|
alita_sdk/tools/carrier/excel_reporter.py,sha256=fXptz7iaBDBcFSc8Ah8nZ9CSgugTONc5JMC1XcQEnfM,21487
|
140
140
|
alita_sdk/tools/carrier/lighthouse_excel_reporter.py,sha256=mVuU63tl2n-Gntx9RuedjEU0U5AP1APKsSx1DvJs7wk,6684
|
141
141
|
alita_sdk/tools/carrier/run_ui_test_tool.py,sha256=Wqfxi_jyOU6XxYGsTje2ftgm8O7PJRXRDHUwWcw8opM,26277
|
142
142
|
alita_sdk/tools/carrier/tickets_tool.py,sha256=d-wFyFWWTvV01o-hyssb2S-oLnr51b6tlNTUqA_CohY,8099
|
143
|
-
alita_sdk/tools/carrier/tools.py,sha256=
|
143
|
+
alita_sdk/tools/carrier/tools.py,sha256=xBKXKNEdPQ_kWysoV7w6y4cDjtAMno8Qj2ubI4zrBE8,1762
|
144
144
|
alita_sdk/tools/carrier/ui_reports_tool.py,sha256=Y6EstTRCa9d11ipFUFGOYlpiEhFx7aOQcgZ_M5Gd1lQ,13708
|
145
145
|
alita_sdk/tools/carrier/update_ui_test_schedule_tool.py,sha256=jh9Q86cMCEqpsFopJPNIP0wlr7sYVa_3lhlq6lRmkGg,11850
|
146
146
|
alita_sdk/tools/carrier/utils.py,sha256=rl7aq-F6ed_PapDM15w8EtS0BkgsjpDrNdKYuDCMOaI,4376
|
@@ -248,7 +248,7 @@ alita_sdk/tools/pandas/statsmodels/descriptive.py,sha256=APdofBnEiRhMrn6tLKwH076
|
|
248
248
|
alita_sdk/tools/pandas/statsmodels/hypothesis_testing.py,sha256=fdNAayMB3W7avMfKJCcbf2_P54vUXbq8KVebOB48348,10508
|
249
249
|
alita_sdk/tools/pandas/statsmodels/regression.py,sha256=Y1pWK4u_qzrfA740K-FX0nZ5FREGGPk8mfvykPIYoiI,9164
|
250
250
|
alita_sdk/tools/postman/__init__.py,sha256=FzVZvqbTrA08mdoHVs0GZH1HcXDTtiMMWmSK07Bdvlc,4766
|
251
|
-
alita_sdk/tools/postman/api_wrapper.py,sha256=
|
251
|
+
alita_sdk/tools/postman/api_wrapper.py,sha256=oJLtOu0vHqVzRsXgJIW6kXqXyYq9jAs6QE9JG1ALmHY,94912
|
252
252
|
alita_sdk/tools/postman/postman_analysis.py,sha256=2d-Oi2UORosIePIUyncSONw9hY7dw8Zc7BQvCd4aqpg,45115
|
253
253
|
alita_sdk/tools/pptx/__init__.py,sha256=vVUrWnj7KWJgEk9oxGSsCAQ2SMSXrp_SFOdUHYQKcAo,3444
|
254
254
|
alita_sdk/tools/pptx/pptx_wrapper.py,sha256=yyCYcTlIY976kJ4VfPo4dyxj4yeii9j9TWP6W8ZIpN8,29195
|
@@ -271,7 +271,7 @@ alita_sdk/tools/sharepoint/api_wrapper.py,sha256=qCHCIH4FRDtgdpIK22ewFhZJeOaTv9h
|
|
271
271
|
alita_sdk/tools/sharepoint/authorization_helper.py,sha256=n-nL5dlBoLMK70nHu7P2RYCb8C6c9HMA_gEaw8LxuhE,2007
|
272
272
|
alita_sdk/tools/sharepoint/utils.py,sha256=fZ1YzAu5CTjKSZeslowpOPH974902S8vCp1Wu7L44LM,446
|
273
273
|
alita_sdk/tools/slack/__init__.py,sha256=mbP2JiHybGSAH0ay8pxvPCqeU2eb9CK_NaCKG1uhPE4,3894
|
274
|
-
alita_sdk/tools/slack/api_wrapper.py,sha256=
|
274
|
+
alita_sdk/tools/slack/api_wrapper.py,sha256=5VrV7iSGno8ZcDzEHdGPNhInhtODGPPvAzoZ9W9iQWE,14009
|
275
275
|
alita_sdk/tools/sql/__init__.py,sha256=9Lh8YHKO8zD5eeolpR4O9swTUsjpXj9LVDn8fM-T5IM,3506
|
276
276
|
alita_sdk/tools/sql/api_wrapper.py,sha256=Rky0_CX9HWDQ2mClHGAgP3LHjYVX4iymPuilZMtaDlQ,3687
|
277
277
|
alita_sdk/tools/sql/models.py,sha256=AKJgSl_kEEz4fZfw3kbvdGHXaRZ-yiaqfJOB6YOj3i0,641
|
@@ -297,8 +297,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=UHVQUVqcBc3SZvDfO78HSuBzwAsRw
|
|
297
297
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
|
298
298
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
299
299
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
300
|
-
alita_sdk-0.3.
|
301
|
-
alita_sdk-0.3.
|
302
|
-
alita_sdk-0.3.
|
303
|
-
alita_sdk-0.3.
|
304
|
-
alita_sdk-0.3.
|
300
|
+
alita_sdk-0.3.204.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
301
|
+
alita_sdk-0.3.204.dist-info/METADATA,sha256=XoGRj3kkHdJlydCN2QeFm_fx1tIQ7Bi96TTIvMoPT4g,18804
|
302
|
+
alita_sdk-0.3.204.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
303
|
+
alita_sdk-0.3.204.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
304
|
+
alita_sdk-0.3.204.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|