codemie-sdk-python 0.1.222__py3-none-any.whl → 0.1.224__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 codemie-sdk-python might be problematic. Click here for more details.

codemie_sdk/__init__.py CHANGED
@@ -35,9 +35,23 @@ from .models.vendor_assistant import (
35
35
  PaginationInfo,
36
36
  TokenPagination,
37
37
  )
38
- from .services.vendor import VendorService
38
+ from .models.vendor_workflow import (
39
+ VendorWorkflowSetting,
40
+ VendorWorkflowSettingsResponse,
41
+ VendorWorkflow,
42
+ VendorWorkflowStatus,
43
+ VendorWorkflowsResponse,
44
+ VendorWorkflowAlias,
45
+ VendorWorkflowAliasesResponse,
46
+ VendorWorkflowInstallRequest,
47
+ VendorWorkflowInstallSummary,
48
+ VendorWorkflowInstallResponse,
49
+ VendorWorkflowUninstallResponse,
50
+ )
51
+ from .services.vendor_assistant import VendorAssistantService
52
+ from .services.vendor_workflow import VendorWorkflowService
39
53
 
40
- __version__ = "0.2.9"
54
+ __version__ = "0.2.10"
41
55
  __all__ = [
42
56
  "CodeMieClient",
43
57
  "VendorType",
@@ -55,5 +69,17 @@ __all__ = [
55
69
  "VendorAssistantUninstallResponse",
56
70
  "PaginationInfo",
57
71
  "TokenPagination",
58
- "VendorService",
72
+ "VendorAssistantService",
73
+ "VendorWorkflowSetting",
74
+ "VendorWorkflowSettingsResponse",
75
+ "VendorWorkflow",
76
+ "VendorWorkflowStatus",
77
+ "VendorWorkflowsResponse",
78
+ "VendorWorkflowAlias",
79
+ "VendorWorkflowAliasesResponse",
80
+ "VendorWorkflowInstallRequest",
81
+ "VendorWorkflowInstallSummary",
82
+ "VendorWorkflowInstallResponse",
83
+ "VendorWorkflowUninstallResponse",
84
+ "VendorWorkflowService",
59
85
  ]
@@ -13,7 +13,8 @@ from ..services.user import UserService
13
13
  from ..services.workflow import WorkflowService
14
14
  from ..services.files import FileOperationService
15
15
  from ..services.webhook import WebhookService
16
- from ..services.vendor import VendorService
16
+ from ..services.vendor_assistant import VendorAssistantService
17
+ from ..services.vendor_workflow import VendorWorkflowService
17
18
 
18
19
 
19
20
  class CodeMieClient:
@@ -90,7 +91,10 @@ class CodeMieClient:
90
91
  self.webhook = WebhookService(
91
92
  self._api_domain, self._token, verify_ssl=self._verify_ssl
92
93
  )
93
- self.vendors = VendorService(
94
+ self.vendor_assistants = VendorAssistantService(
95
+ self._api_domain, self._token, verify_ssl=self._verify_ssl
96
+ )
97
+ self.vendor_workflows = VendorWorkflowService(
94
98
  self._api_domain, self._token, verify_ssl=self._verify_ssl
95
99
  )
96
100
 
@@ -139,7 +143,10 @@ class CodeMieClient:
139
143
  self.conversations = ConversationService(
140
144
  self._api_domain, self._token, verify_ssl=self._verify_ssl
141
145
  )
142
- self.vendors = VendorService(
146
+ self.vendor_assistants = VendorAssistantService(
147
+ self._api_domain, self._token, verify_ssl=self._verify_ssl
148
+ )
149
+ self.vendor_workflows = VendorWorkflowService(
143
150
  self._api_domain, self._token, verify_ssl=self._verify_ssl
144
151
  )
145
152
  return self._token
@@ -0,0 +1,145 @@
1
+ """Models for vendor workflow settings."""
2
+
3
+ from datetime import datetime
4
+ from enum import Enum
5
+ from typing import Optional, List
6
+
7
+ from pydantic import BaseModel, ConfigDict, Field
8
+
9
+ from .vendor_assistant import PaginationInfo, TokenPagination
10
+
11
+
12
+ class VendorWorkflowSetting(BaseModel):
13
+ """Model representing a vendor workflow setting."""
14
+
15
+ model_config = ConfigDict(extra="ignore")
16
+
17
+ setting_id: str = Field(..., description="Unique identifier for the setting")
18
+ setting_name: str = Field(..., description="Name of the setting")
19
+ project: str = Field(..., description="Project associated with the setting")
20
+ entities: List[str] = Field(
21
+ default_factory=list, description="List of entities associated with the setting"
22
+ )
23
+ invalid: Optional[bool] = Field(None, description="Whether the setting is invalid")
24
+ error: Optional[str] = Field(
25
+ None, description="Error message if the setting is invalid"
26
+ )
27
+
28
+
29
+ class VendorWorkflowSettingsResponse(BaseModel):
30
+ """Response model for vendor workflow settings list."""
31
+
32
+ model_config = ConfigDict(extra="ignore")
33
+
34
+ data: List[VendorWorkflowSetting] = Field(
35
+ ..., description="List of vendor workflow settings"
36
+ )
37
+ pagination: PaginationInfo = Field(..., description="Pagination information")
38
+
39
+
40
+ class VendorWorkflowStatus(str, Enum):
41
+ """Status of vendor workflow."""
42
+
43
+ PREPARED = "PREPARED"
44
+ NOT_PREPARED = "NOT_PREPARED"
45
+
46
+
47
+ class VendorWorkflow(BaseModel):
48
+ """Model representing a vendor workflow."""
49
+
50
+ model_config = ConfigDict(extra="ignore")
51
+
52
+ id: str = Field(..., description="Unique identifier for the workflow")
53
+ name: str = Field(..., description="Name of the workflow")
54
+ status: VendorWorkflowStatus = Field(..., description="Status of the workflow")
55
+ description: Optional[str] = Field(None, description="Description of the workflow")
56
+ version: str = Field(..., description="Version of the workflow")
57
+ createdAt: datetime = Field(
58
+ ..., description="Creation timestamp", alias="createdAt"
59
+ )
60
+ updatedAt: datetime = Field(
61
+ ..., description="Last update timestamp", alias="updatedAt"
62
+ )
63
+
64
+
65
+ class VendorWorkflowsResponse(BaseModel):
66
+ """Response model for vendor workflows list."""
67
+
68
+ model_config = ConfigDict(extra="ignore")
69
+
70
+ data: List[VendorWorkflow] = Field(..., description="List of vendor workflows")
71
+ pagination: TokenPagination = Field(
72
+ ..., description="Token-based pagination information"
73
+ )
74
+
75
+
76
+ class VendorWorkflowAlias(BaseModel):
77
+ """Model representing a vendor workflow alias."""
78
+
79
+ model_config = ConfigDict(extra="ignore")
80
+
81
+ id: str = Field(..., description="Unique identifier for the alias")
82
+ name: str = Field(..., description="Name of the alias")
83
+ status: VendorWorkflowStatus = Field(..., description="Status of the alias")
84
+ description: Optional[str] = Field(None, description="Description of the alias")
85
+ version: str = Field(..., description="Version of the alias")
86
+ createdAt: datetime = Field(
87
+ ..., description="Creation timestamp", alias="createdAt"
88
+ )
89
+ updatedAt: datetime = Field(
90
+ ..., description="Last update timestamp", alias="updatedAt"
91
+ )
92
+ aiRunId: Optional[str] = Field(
93
+ None, description="AI run ID if the alias is installed", alias="aiRunId"
94
+ )
95
+
96
+
97
+ class VendorWorkflowAliasesResponse(BaseModel):
98
+ """Response model for vendor workflow aliases list."""
99
+
100
+ model_config = ConfigDict(extra="ignore")
101
+
102
+ data: List[VendorWorkflowAlias] = Field(
103
+ ..., description="List of vendor workflow aliases"
104
+ )
105
+ pagination: TokenPagination = Field(
106
+ ..., description="Token-based pagination information"
107
+ )
108
+
109
+
110
+ class VendorWorkflowInstallRequest(BaseModel):
111
+ """Model for a single workflow installation request."""
112
+
113
+ model_config = ConfigDict(extra="ignore")
114
+
115
+ id: str = Field(..., description="Workflow ID to install")
116
+ flowAliasId: str = Field(..., description="Flow alias ID to use for the workflow")
117
+ setting_id: str = Field(..., description="Vendor setting ID")
118
+
119
+
120
+ class VendorWorkflowInstallSummary(BaseModel):
121
+ """Model for workflow installation summary."""
122
+
123
+ model_config = ConfigDict(extra="ignore")
124
+
125
+ flowId: str = Field(..., description="Installed workflow ID")
126
+ flowAliasId: str = Field(..., description="Flow alias ID used for installation")
127
+ aiRunId: str = Field(..., description="AI run ID for the installation")
128
+
129
+
130
+ class VendorWorkflowInstallResponse(BaseModel):
131
+ """Response model for workflow installation."""
132
+
133
+ model_config = ConfigDict(extra="ignore")
134
+
135
+ summary: List[VendorWorkflowInstallSummary] = Field(
136
+ ..., description="List of installation summaries"
137
+ )
138
+
139
+
140
+ class VendorWorkflowUninstallResponse(BaseModel):
141
+ """Response model for workflow uninstallation."""
142
+
143
+ model_config = ConfigDict(extra="ignore")
144
+
145
+ success: bool = Field(..., description="Whether the uninstallation was successful")
@@ -16,7 +16,7 @@ from ..models.vendor_assistant import (
16
16
  from ..utils import ApiRequestHandler
17
17
 
18
18
 
19
- class VendorService:
19
+ class VendorAssistantService:
20
20
  """Service for managing cloud vendor assistant settings (AWS, Azure, GCP)."""
21
21
 
22
22
  def __init__(self, api_domain: str, token: str, verify_ssl: bool = True):
@@ -47,9 +47,9 @@ class VendorService:
47
47
 
48
48
  Example:
49
49
  >>> # Using enum
50
- >>> settings = client.vendors.get_assistant_settings(VendorType.AWS, page=0, per_page=10)
50
+ >>> settings = client.vendor_assistants.get_assistant_settings(VendorType.AWS, page=0, per_page=10)
51
51
  >>> # Using string
52
- >>> settings = client.vendors.get_assistant_settings("aws", page=0, per_page=10)
52
+ >>> settings = client.vendor_assistants.get_assistant_settings("aws", page=0, per_page=10)
53
53
  """
54
54
  # Convert enum to string value if needed
55
55
  vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
@@ -86,14 +86,14 @@ class VendorService:
86
86
 
87
87
  Example:
88
88
  >>> # Get first page
89
- >>> assistants = client.vendors.get_assistants(
89
+ >>> assistants = client.vendor_assistants.get_assistants(
90
90
  ... vendor=VendorType.AWS,
91
91
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
92
92
  ... per_page=8
93
93
  ... )
94
94
  >>> # Get next page if available
95
95
  >>> if assistants.pagination.next_token:
96
- ... next_page = client.vendors.get_assistants(
96
+ ... next_page = client.vendor_assistants.get_assistants(
97
97
  ... vendor=VendorType.AWS,
98
98
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
99
99
  ... per_page=8,
@@ -135,7 +135,7 @@ class VendorService:
135
135
  VendorAssistant containing assistant details
136
136
 
137
137
  Example:
138
- >>> assistant = client.vendors.get_assistant(
138
+ >>> assistant = client.vendor_assistants.get_assistant(
139
139
  ... vendor=VendorType.AWS,
140
140
  ... assistant_id="TJBKR0DGWT",
141
141
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c"
@@ -176,7 +176,7 @@ class VendorService:
176
176
  instruction, foundation model, and timestamps
177
177
 
178
178
  Example:
179
- >>> version_details = client.vendors.get_assistant_version(
179
+ >>> version_details = client.vendor_assistants.get_assistant_version(
180
180
  ... vendor=VendorType.AWS,
181
181
  ... assistant_id="TJBKR0DGWT",
182
182
  ... version="1",
@@ -223,7 +223,7 @@ class VendorService:
223
223
 
224
224
  Example:
225
225
  >>> # Get first page of aliases
226
- >>> aliases = client.vendors.get_assistant_aliases(
226
+ >>> aliases = client.vendor_assistants.get_assistant_aliases(
227
227
  ... vendor=VendorType.AWS,
228
228
  ... assistant_id="TJBKR0DGWT",
229
229
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
@@ -233,7 +233,7 @@ class VendorService:
233
233
  ... print(f"{alias.name} (v{alias.version}): {alias.status}")
234
234
  >>> # Get next page if available
235
235
  >>> if aliases.pagination.next_token:
236
- ... next_page = client.vendors.get_assistant_aliases(
236
+ ... next_page = client.vendor_assistants.get_assistant_aliases(
237
237
  ... vendor=VendorType.AWS,
238
238
  ... assistant_id="TJBKR0DGWT",
239
239
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
@@ -281,7 +281,7 @@ class VendorService:
281
281
  ... agentAliasId="MNULODIW4N",
282
282
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c"
283
283
  ... )
284
- >>> response = client.vendors.install_assistants(
284
+ >>> response = client.vendor_assistants.install_assistants(
285
285
  ... vendor=VendorType.AWS,
286
286
  ... assistants=[install_request]
287
287
  ... )
@@ -301,7 +301,7 @@ class VendorService:
301
301
  ... setting_id="SETTING_ID"
302
302
  ... )
303
303
  ... ]
304
- >>> response = client.vendors.install_assistants(
304
+ >>> response = client.vendor_assistants.install_assistants(
305
305
  ... vendor=VendorType.AWS,
306
306
  ... assistants=requests
307
307
  ... )
@@ -340,14 +340,14 @@ class VendorService:
340
340
  ... agentAliasId="MNULODIW4N",
341
341
  ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c"
342
342
  ... )
343
- >>> install_response = client.vendors.install_assistants(
343
+ >>> install_response = client.vendor_assistants.install_assistants(
344
344
  ... vendor=VendorType.AWS,
345
345
  ... assistants=[install_request]
346
346
  ... )
347
347
  >>> ai_run_id = install_response.summary[0].aiRunId
348
348
  >>>
349
349
  >>> # Later, uninstall the assistant using the AI run ID
350
- >>> response = client.vendors.uninstall_assistant(
350
+ >>> response = client.vendor_assistants.uninstall_assistant(
351
351
  ... vendor=VendorType.AWS,
352
352
  ... ai_run_id=ai_run_id
353
353
  ... )
@@ -0,0 +1,330 @@
1
+ """Vendor workflow service implementation for managing cloud vendor workflow settings."""
2
+
3
+ from typing import Union, Optional, List
4
+
5
+ from ..models.vendor_assistant import VendorType
6
+ from ..models.vendor_workflow import (
7
+ VendorWorkflowSettingsResponse,
8
+ VendorWorkflowsResponse,
9
+ VendorWorkflow,
10
+ VendorWorkflowAliasesResponse,
11
+ VendorWorkflowInstallRequest,
12
+ VendorWorkflowInstallResponse,
13
+ VendorWorkflowUninstallResponse,
14
+ )
15
+ from ..utils import ApiRequestHandler
16
+
17
+
18
+ class VendorWorkflowService:
19
+ """Service for managing cloud vendor workflow settings (AWS, Azure, GCP)."""
20
+
21
+ def __init__(self, api_domain: str, token: str, verify_ssl: bool = True):
22
+ """Initialize the vendor workflow service.
23
+
24
+ Args:
25
+ api_domain: Base URL for the CodeMie API
26
+ token: Authentication token
27
+ verify_ssl: Whether to verify SSL certificates
28
+ """
29
+ self._api = ApiRequestHandler(api_domain, token, verify_ssl)
30
+
31
+ def get_workflow_settings(
32
+ self,
33
+ vendor: Union[VendorType, str],
34
+ page: int = 0,
35
+ per_page: int = 10,
36
+ ) -> VendorWorkflowSettingsResponse:
37
+ """Get workflow settings for a specific cloud vendor.
38
+
39
+ Args:
40
+ vendor: Cloud vendor type (aws, azure, gcp). Can be VendorType enum or string.
41
+ page: Page number for pagination (0-based)
42
+ per_page: Number of items per page
43
+
44
+ Returns:
45
+ VendorWorkflowSettingsResponse containing list of settings and pagination info
46
+
47
+ Example:
48
+ >>> # Using enum
49
+ >>> settings = client.vendor_workflows.get_workflow_settings(VendorType.AWS, page=0, per_page=10)
50
+ >>> # Using string
51
+ >>> settings = client.vendor_workflows.get_workflow_settings("aws", page=0, per_page=10)
52
+ >>> # Access settings data
53
+ >>> for setting in settings.data:
54
+ ... print(f"Setting: {setting.setting_name}, Project: {setting.project}")
55
+ ... if setting.invalid:
56
+ ... print(f"Error: {setting.error}")
57
+ """
58
+ # Convert enum to string value if needed
59
+ vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
60
+
61
+ params = {
62
+ "page": page,
63
+ "per_page": per_page,
64
+ }
65
+
66
+ return self._api.get(
67
+ f"/v1/vendors/{vendor_str}/workflows/settings",
68
+ VendorWorkflowSettingsResponse,
69
+ params=params,
70
+ wrap_response=False,
71
+ )
72
+
73
+ def get_workflows(
74
+ self,
75
+ vendor: Union[VendorType, str],
76
+ setting_id: str,
77
+ per_page: int = 10,
78
+ next_token: Optional[str] = None,
79
+ ) -> VendorWorkflowsResponse:
80
+ """Get workflows for a specific vendor setting.
81
+
82
+ Args:
83
+ vendor: Cloud vendor type (aws, azure, gcp). Can be VendorType enum or string.
84
+ setting_id: ID of the vendor setting to retrieve workflows for
85
+ per_page: Number of items per page
86
+ next_token: Token for pagination (optional, for retrieving next page)
87
+
88
+ Returns:
89
+ VendorWorkflowsResponse containing list of workflows and pagination token
90
+
91
+ Example:
92
+ >>> # Get first page
93
+ >>> workflows = client.vendor_workflows.get_workflows(
94
+ ... vendor=VendorType.AWS,
95
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
96
+ ... per_page=8
97
+ ... )
98
+ >>> # Access workflow data
99
+ >>> for workflow in workflows.data:
100
+ ... print(f"Name: {workflow.name}, Status: {workflow.status}")
101
+ ... print(f"Version: {workflow.version}, Description: {workflow.description}")
102
+ >>> # Get next page if available
103
+ >>> if workflows.pagination.next_token:
104
+ ... next_page = client.vendor_workflows.get_workflows(
105
+ ... vendor=VendorType.AWS,
106
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
107
+ ... per_page=8,
108
+ ... next_token=workflows.pagination.next_token
109
+ ... )
110
+ """
111
+ # Convert enum to string value if needed
112
+ vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
113
+
114
+ params = {
115
+ "setting_id": setting_id,
116
+ "per_page": per_page,
117
+ }
118
+
119
+ if next_token:
120
+ params["next_token"] = next_token
121
+
122
+ return self._api.get(
123
+ f"/v1/vendors/{vendor_str}/workflows",
124
+ VendorWorkflowsResponse,
125
+ params=params,
126
+ wrap_response=False,
127
+ )
128
+
129
+ def get_workflow(
130
+ self,
131
+ vendor: Union[VendorType, str],
132
+ workflow_id: str,
133
+ setting_id: str,
134
+ ) -> VendorWorkflow:
135
+ """Get a specific workflow by ID for a vendor setting.
136
+
137
+ Args:
138
+ vendor: Cloud vendor type (aws, azure, gcp). Can be VendorType enum or string.
139
+ workflow_id: ID of the workflow to retrieve
140
+ setting_id: ID of the vendor setting
141
+
142
+ Returns:
143
+ VendorWorkflow containing workflow details
144
+
145
+ Example:
146
+ >>> workflow = client.vendor_workflows.get_workflow(
147
+ ... vendor=VendorType.AWS,
148
+ ... workflow_id="9HXLQ7J9YP",
149
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c"
150
+ ... )
151
+ >>> print(f"Name: {workflow.name}, Status: {workflow.status}")
152
+ >>> print(f"Version: {workflow.version}, Description: {workflow.description}")
153
+ """
154
+ # Convert enum to string value if needed
155
+ vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
156
+
157
+ params = {
158
+ "setting_id": setting_id,
159
+ }
160
+
161
+ return self._api.get(
162
+ f"/v1/vendors/{vendor_str}/workflows/{workflow_id}",
163
+ VendorWorkflow,
164
+ params=params,
165
+ wrap_response=False,
166
+ )
167
+
168
+ def get_workflow_aliases(
169
+ self,
170
+ vendor: Union[VendorType, str],
171
+ workflow_id: str,
172
+ setting_id: str,
173
+ per_page: int = 10,
174
+ next_token: Optional[str] = None,
175
+ ) -> VendorWorkflowAliasesResponse:
176
+ """Get aliases for a specific vendor workflow.
177
+
178
+ Args:
179
+ vendor: Cloud vendor type (aws, azure, gcp). Can be VendorType enum or string.
180
+ workflow_id: ID of the workflow to retrieve aliases for
181
+ setting_id: ID of the vendor setting
182
+ per_page: Number of items per page
183
+ next_token: Token for pagination (optional, for retrieving next page)
184
+
185
+ Returns:
186
+ VendorWorkflowAliasesResponse containing list of aliases and pagination token
187
+
188
+ Example:
189
+ >>> # Get first page of aliases
190
+ >>> aliases = client.vendor_workflows.get_workflow_aliases(
191
+ ... vendor=VendorType.AWS,
192
+ ... workflow_id="9HXLQ7J9YP",
193
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
194
+ ... per_page=5
195
+ ... )
196
+ >>> for alias in aliases.data:
197
+ ... print(f"{alias.name} (v{alias.version}): {alias.status}")
198
+ ... if alias.aiRunId:
199
+ ... print(f" AI Run ID: {alias.aiRunId}")
200
+ >>> # Get next page if available
201
+ >>> if aliases.pagination.next_token:
202
+ ... next_page = client.vendor_workflows.get_workflow_aliases(
203
+ ... vendor=VendorType.AWS,
204
+ ... workflow_id="9HXLQ7J9YP",
205
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c",
206
+ ... per_page=5,
207
+ ... next_token=aliases.pagination.next_token
208
+ ... )
209
+ """
210
+ # Convert enum to string value if needed
211
+ vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
212
+
213
+ params = {
214
+ "setting_id": setting_id,
215
+ "per_page": per_page,
216
+ }
217
+
218
+ if next_token:
219
+ params["next_token"] = next_token
220
+
221
+ return self._api.get(
222
+ f"/v1/vendors/{vendor_str}/workflows/{workflow_id}/aliases",
223
+ VendorWorkflowAliasesResponse,
224
+ params=params,
225
+ wrap_response=False,
226
+ )
227
+
228
+ def install_workflows(
229
+ self,
230
+ vendor: Union[VendorType, str],
231
+ workflows: List[VendorWorkflowInstallRequest],
232
+ ) -> VendorWorkflowInstallResponse:
233
+ """Install/activate vendor workflows.
234
+
235
+ Args:
236
+ vendor: Cloud vendor type (aws, azure, gcp). Can be VendorType enum or string.
237
+ workflows: List of workflow installation requests with workflow ID, flow alias ID, and setting ID
238
+
239
+ Returns:
240
+ VendorWorkflowInstallResponse containing installation summary with AI run IDs
241
+
242
+ Example:
243
+ >>> from codemie_sdk import VendorWorkflowInstallRequest
244
+ >>> # Install single workflow
245
+ >>> install_request = VendorWorkflowInstallRequest(
246
+ ... id="9HXLQ7J9YP",
247
+ ... flowAliasId="9RUV0BI2L7",
248
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c"
249
+ ... )
250
+ >>> response = client.vendor_workflows.install_workflows(
251
+ ... vendor=VendorType.AWS,
252
+ ... workflows=[install_request]
253
+ ... )
254
+ >>> for item in response.summary:
255
+ ... print(f"Installed workflow {item.flowId} with run ID: {item.aiRunId}")
256
+ >>>
257
+ >>> # Install multiple workflows
258
+ >>> requests = [
259
+ ... VendorWorkflowInstallRequest(
260
+ ... id="WORKFLOW_ID_1",
261
+ ... flowAliasId="ALIAS_ID_1",
262
+ ... setting_id="SETTING_ID"
263
+ ... ),
264
+ ... VendorWorkflowInstallRequest(
265
+ ... id="WORKFLOW_ID_2",
266
+ ... flowAliasId="ALIAS_ID_2",
267
+ ... setting_id="SETTING_ID"
268
+ ... )
269
+ ... ]
270
+ >>> response = client.vendor_workflows.install_workflows(
271
+ ... vendor=VendorType.AWS,
272
+ ... workflows=requests
273
+ ... )
274
+ """
275
+ # Convert enum to string value if needed
276
+ vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
277
+
278
+ # Convert list of Pydantic models to list of dicts
279
+ payload = [workflow.model_dump(by_alias=True) for workflow in workflows]
280
+
281
+ return self._api.post(
282
+ f"/v1/vendors/{vendor_str}/workflows",
283
+ VendorWorkflowInstallResponse,
284
+ json_data=payload,
285
+ wrap_response=False,
286
+ )
287
+
288
+ def uninstall_workflow(
289
+ self,
290
+ vendor: Union[VendorType, str],
291
+ ai_run_id: str,
292
+ ) -> VendorWorkflowUninstallResponse:
293
+ """Uninstall/deactivate a vendor workflow.
294
+
295
+ Args:
296
+ vendor: Cloud vendor type (aws, azure, gcp). Can be VendorType enum or string.
297
+ ai_run_id: AI run ID returned from the workflow alias (aiRunId field)
298
+
299
+ Returns:
300
+ VendorWorkflowUninstallResponse with success status
301
+
302
+ Example:
303
+ >>> # Get workflow aliases to find the aiRunId
304
+ >>> aliases = client.vendor_workflows.get_workflow_aliases(
305
+ ... vendor=VendorType.AWS,
306
+ ... workflow_id="9HXLQ7J9YP",
307
+ ... setting_id="cac90788-39b7-4ffe-8b57-e8b047fa1f6c"
308
+ ... )
309
+ >>> # Find an installed alias with aiRunId
310
+ >>> for alias in aliases.data:
311
+ ... if alias.aiRunId:
312
+ ... ai_run_id = alias.aiRunId
313
+ ... break
314
+ >>>
315
+ >>> # Uninstall the workflow using the AI run ID
316
+ >>> response = client.vendor_workflows.uninstall_workflow(
317
+ ... vendor=VendorType.AWS,
318
+ ... ai_run_id="56fed66d-f66e-46e3-b420-bb3a8d93eed4"
319
+ ... )
320
+ >>> if response.success:
321
+ ... print("Workflow successfully uninstalled!")
322
+ """
323
+ # Convert enum to string value if needed
324
+ vendor_str = vendor.value if isinstance(vendor, VendorType) else vendor
325
+
326
+ return self._api.delete(
327
+ f"/v1/vendors/{vendor_str}/workflows/{ai_run_id}",
328
+ VendorWorkflowUninstallResponse,
329
+ wrap_response=False,
330
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codemie-sdk-python
3
- Version: 0.1.222
3
+ Version: 0.1.224
4
4
  Summary: CodeMie SDK for Python
5
5
  Author: Vadym Vlasenko
6
6
  Author-email: vadym_vlasenko@epam.com
@@ -1,8 +1,8 @@
1
- codemie_sdk/__init__.py,sha256=R0qglC50fdlkiD9NQenN2FEa3BHepwwL7GI8t4U2_Cg,1576
1
+ codemie_sdk/__init__.py,sha256=_rGR2Vjv_VUXb9N2lynKA8GirVGInyZbxm1TOmzHVBk,2432
2
2
  codemie_sdk/auth/__init__.py,sha256=IksEj223xEZtJ-cQ0AT9L0Bs9psIJ8QNzDXrPTUQ3xQ,126
3
3
  codemie_sdk/auth/credentials.py,sha256=OzR_CXPBNTEC6VmNdzcCHF7rWWGrVf3agAlGKgPtTiU,4361
4
4
  codemie_sdk/client/__init__.py,sha256=yf6C39MmrJ6gK9ZHMhBeynKwUUYVSUTQbKxU8-4qpKg,101
5
- codemie_sdk/client/client.py,sha256=s148DzRVkE0Rc5krpceoZnIX2HEgDdpEavK-d9pkVU4,5796
5
+ codemie_sdk/client/client.py,sha256=BfWq9Q4PC3iOJ0w9hs7yHD5VecNGJv50IwVyZGyByb8,6186
6
6
  codemie_sdk/exceptions.py,sha256=XoVPyognx-JmyVxLHkZPAcX1CMi1OoT1diBFJLU54so,1183
7
7
  codemie_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  codemie_sdk/models/assistant.py,sha256=zb_k9EZ7rVFD7T2BwSqu_UA0psLKn7VHbY6JB6SyMOo,10946
@@ -15,6 +15,7 @@ codemie_sdk/models/llm.py,sha256=ppb9-1dx1UFhRuJpSR3ij7H6Pfhe9nO4C4BEOIbToy4,119
15
15
  codemie_sdk/models/task.py,sha256=J4ZFRY3s8qBGrqB5NLQF0rMbInLh4s7OEZ0ZfmnW0Ho,1476
16
16
  codemie_sdk/models/user.py,sha256=Q0rjimZh-IbeaPfq6b6fk6ZaCtwLqWHEIlU863suCS4,1777
17
17
  codemie_sdk/models/vendor_assistant.py,sha256=4xPBwE-x2eWNNHAVsdOrZSDKvvp4UqlsunR0Q9pQccc,6409
18
+ codemie_sdk/models/vendor_workflow.py,sha256=EbBwpj4lDLsYawrflomDW0KcHUXN-34FKPqQBVQYJ4I,4975
18
19
  codemie_sdk/models/workflow.py,sha256=qfk0rBJnFUMpcEDq_E5GB3hzYKbe_bb2NYJlLZJwUEE,2453
19
20
  codemie_sdk/models/workflow_execution_payload.py,sha256=iEGkdw1jm09aniZiXswbQeLtoiUYIxhc3vsBvZL00JE,515
20
21
  codemie_sdk/models/workflow_state.py,sha256=okEMKzkiBU3GHs9VNBoiEMOnOeZRMXGYtpL0NYSg-FY,1374
@@ -27,13 +28,14 @@ codemie_sdk/services/integration.py,sha256=SdwFwR3hCPyJYilzzlkpKPLNbO89nfqmIXXoT
27
28
  codemie_sdk/services/llm.py,sha256=0-e4_7RvLHs2giCyoQ5U4KDTh6p5VXgPKNxnDP9ZDFU,1100
28
29
  codemie_sdk/services/task.py,sha256=3e9t8_LMkR4xfeMBwMCo7ZF87PxPS-ZbzDg85ilda2M,1031
29
30
  codemie_sdk/services/user.py,sha256=7B-Qw451qKPD5Io6qLda-kbFDaPRQ3TamJamiGwCQu4,1013
30
- codemie_sdk/services/vendor.py,sha256=aJFTPZmeO-6MJ6JsVcT7jHleA-My9_OoJ_8p2mgrMQ0,13356
31
+ codemie_sdk/services/vendor_assistant.py,sha256=QP8Qgo1rb0ak199mACFmNN2qrnYMAefs3VIBB5uHJxg,13485
32
+ codemie_sdk/services/vendor_workflow.py,sha256=h-UlEnYjV8d0EoEPb9BgMdxPBJvtY0KUZXLQfqYeqX4,12453
31
33
  codemie_sdk/services/webhook.py,sha256=QhRKo7y9BcboYJm_cPdPqYDhmv_OWTf9eodsT3UkAjM,1210
32
34
  codemie_sdk/services/workflow.py,sha256=cAGv2jEnb3dOSk5xxqg3L15mTcSkAVxaZHVZwTYjT-w,5407
33
35
  codemie_sdk/services/workflow_execution.py,sha256=P57fz3fsUnKLg8qUYszMxCn_ykovh22BQuUk0EGnC9I,4654
34
36
  codemie_sdk/services/workflow_execution_state.py,sha256=tXoaa8yT09xgYEUNiHhVULe76TwGwVgZupMIUyyLxdo,2070
35
37
  codemie_sdk/utils/__init__.py,sha256=BXAJJfAzO89-kMYvWWo9wSNhSbGgF3vB1In9sePFhMM,109
36
38
  codemie_sdk/utils/http.py,sha256=1eNjCoVh_hq0TIsDSlsXZWmqODznIXvPpRrIn-KeftY,9759
37
- codemie_sdk_python-0.1.222.dist-info/METADATA,sha256=keWZtqQaeGZfGT5CBFSxm1vDKJ3qMG1azDtc2l4F8Ko,24882
38
- codemie_sdk_python-0.1.222.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
39
- codemie_sdk_python-0.1.222.dist-info/RECORD,,
39
+ codemie_sdk_python-0.1.224.dist-info/METADATA,sha256=v3UtMaSG-QL1kQOqoEK3tDZfD4HGxRE6lYxwVDvOjzc,24882
40
+ codemie_sdk_python-0.1.224.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
41
+ codemie_sdk_python-0.1.224.dist-info/RECORD,,