@@ -29,16 +29,20 @@ async def save_integration_provider(
2929 self , name : str , integration_update : IntegrationUpdateAdapter , ** kwargs
3030 ) -> None :
3131 """Create or update an integration provider"""
32- await self ._integration_api .save_integration_provider (name , integration_update , ** kwargs )
32+ await self ._integration_api .save_integration_provider (
33+ name = name , integration_update = integration_update , ** kwargs
34+ )
3335
3436 async def save_integration (
35- self , integration_name , integration_details : IntegrationUpdateAdapter
37+ self , integration_name , integration_details : IntegrationUpdateAdapter , ** kwargs
3638 ) -> None :
37- await self ._integration_api .save_integration_provider (integration_name , integration_details )
39+ await self ._integration_api .save_integration_provider (
40+ name = integration_name , integration_update = integration_details , ** kwargs
41+ )
3842
3943 async def get_integration_provider (self , name : str , ** kwargs ) -> IntegrationAdapter :
4044 """Get integration provider by name"""
41- return await self ._integration_api .get_integration_provider (name , ** kwargs )
45+ return await self ._integration_api .get_integration_provider (name = name , ** kwargs )
4246
4347 async def get_integration (self , integration_name : str ) -> Optional [IntegrationAdapter ]:
4448 try :
@@ -48,7 +52,7 @@ async def get_integration(self, integration_name: str) -> Optional[IntegrationAd
4852
4953 async def delete_integration_provider (self , name : str , ** kwargs ) -> None :
5054 """Delete an integration provider"""
51- await self ._integration_api .delete_integration_provider (name , ** kwargs )
55+ await self ._integration_api .delete_integration_provider (name = name , ** kwargs )
5256
5357 async def get_integration_providers (
5458 self , category : Optional [str ] = None , active_only : Optional [bool ] = None , ** kwargs
@@ -72,33 +76,40 @@ async def save_integration_api(
7276 ) -> None :
7377 """Create or update an integration API"""
7478 await self ._integration_api .save_integration_api (
75- name , integration_name , integration_api_update , ** kwargs
79+ name = name ,
80+ integration_name = integration_name ,
81+ integration_api_update = integration_api_update ,
82+ ** kwargs ,
7683 )
7784
7885 async def get_integration_api (
7986 self , name : str , integration_name : str , ** kwargs
8087 ) -> IntegrationApiAdapter :
8188 """Get integration API by name and integration name"""
82- return await self ._integration_api .get_integration_api (name , integration_name , ** kwargs )
89+ return await self ._integration_api .get_integration_api (
90+ name = name , integration_name = integration_name , ** kwargs
91+ )
8392
8493 async def delete_integration_api (self , name : str , integration_name : str , ** kwargs ) -> None :
8594 """Delete an integration API"""
86- await self ._integration_api .delete_integration_api (name , integration_name , ** kwargs )
95+ await self ._integration_api .delete_integration_api (
96+ name = name , integration_name = integration_name , ** kwargs
97+ )
8798
8899 async def get_integration_apis (
89100 self , integration_name : str , ** kwargs
90101 ) -> List [IntegrationApiAdapter ]:
91102 """Get all APIs for a specific integration"""
92- return await self ._integration_api .get_integration_apis (integration_name , ** kwargs )
103+ return await self ._integration_api .get_integration_apis (name = integration_name , ** kwargs )
93104
94105 async def get_integration_available_apis (self , name : str , ** kwargs ) -> List [str ]:
95106 """Get available APIs for an integration"""
96- return await self ._integration_api .get_integration_available_apis (name , ** kwargs )
107+ return await self ._integration_api .get_integration_available_apis (name = name , ** kwargs )
97108
98109 # Integration Operations
99110 async def save_all_integrations (self , request_body : List [IntegrationAdapter ], ** kwargs ) -> None :
100111 """Save all integrations"""
101- await self ._integration_api .save_all_integrations (request_body , ** kwargs )
112+ await self ._integration_api .save_all_integrations (integration = request_body , ** kwargs )
102113
103114 async def get_all_integrations (
104115 self , category : Optional [str ] = None , active_only : Optional [bool ] = None , ** kwargs
@@ -145,52 +156,61 @@ async def put_tag_for_integration_provider(
145156 self , body : List [TagAdapter ], name : str , ** kwargs
146157 ) -> None :
147158 """Add tags to an integration provider"""
148- await self ._integration_api .put_tag_for_integration_provider (name , body , ** kwargs )
159+ await self ._integration_api .put_tag_for_integration_provider (name = name , tag = body , ** kwargs )
149160
150161 async def get_tags_for_integration_provider (self , name : str , ** kwargs ) -> List [TagAdapter ]:
151162 """Get tags for an integration provider"""
152- return await self ._integration_api .get_tags_for_integration_provider (name , ** kwargs )
163+ return await self ._integration_api .get_tags_for_integration_provider (name = name , ** kwargs )
153164
154165 async def delete_tag_for_integration_provider (
155166 self , body : List [TagAdapter ], name : str , ** kwargs
156167 ) -> None :
157168 """Delete tags from an integration provider"""
158- await self ._integration_api .delete_tag_for_integration_provider (name , body , ** kwargs )
169+ await self ._integration_api .delete_tag_for_integration_provider (
170+ name = name , tag = body , ** kwargs
171+ )
159172
160173 # Token Usage Operations
161174 async def get_token_usage_for_integration (
162175 self , name : str , integration_name : str , ** kwargs
163176 ) -> int :
164177 """Get token usage for a specific integration"""
165178 return await self ._integration_api .get_token_usage_for_integration (
166- name , integration_name , ** kwargs
179+ name = name , integration_name = integration_name , ** kwargs
167180 )
168181
169182 async def get_token_usage_for_integration_provider (self , name : str , ** kwargs ) -> Dict [str , str ]:
170183 """Get token usage for an integration provider"""
171- return await self ._integration_api .get_token_usage_for_integration_provider (name , ** kwargs )
184+ return await self ._integration_api .get_token_usage_for_integration_provider (
185+ name = name , ** kwargs
186+ )
172187
173188 async def register_token_usage (
174189 self , name : str , integration_name : str , tokens : int , ** kwargs
175190 ) -> None :
176191 """Register token usage for an integration"""
177- await self ._integration_api .register_token_usage (name , integration_name , tokens , ** kwargs )
192+ await self ._integration_api .register_token_usage (
193+ name = name , integration_name = integration_name , body = tokens , ** kwargs
194+ )
178195
179196 # Prompt Integration Operations
180197 async def associate_prompt_with_integration (
181198 self , ai_prompt : str , integration_provider : str , integration_name : str , ** kwargs
182199 ) -> None :
183200 """Associate a prompt with an integration"""
184201 await self ._integration_api .associate_prompt_with_integration (
185- ai_prompt , integration_provider , integration_name , ** kwargs
202+ integration_provider = integration_provider ,
203+ integration_name = integration_name ,
204+ prompt_name = ai_prompt ,
205+ ** kwargs ,
186206 )
187207
188208 async def get_prompts_with_integration (
189209 self , integration_provider : str , integration_name : str , ** kwargs
190210 ) -> List [MessageTemplateAdapter ]:
191211 """Get prompts associated with an integration"""
192212 return await self ._integration_api .get_prompts_with_integration (
193- integration_provider , integration_name , ** kwargs
213+ integration_provider = integration_provider , integration_name = integration_name , ** kwargs
194214 )
195215
196216 # Event and Statistics Operations
@@ -214,11 +234,16 @@ async def get_active_integrations(self) -> List[IntegrationAdapter]:
214234 return await self .get_all_integrations (active_only = True )
215235
216236 async def get_integration_provider_by_category (
217- self , category : str , active_only : bool = True
237+ self , category : str , active_only : bool = True , ** kwargs
218238 ) -> List [IntegrationAdapter ]:
219239 """Get integration providers filtered by category"""
220- return await self .get_integration_providers (category = category , active_only = active_only )
240+ return await self .get_integration_providers (
241+ category = category , active_only = active_only , ** kwargs
242+ )
221243
222- async def get_active_integration_providers (self ) -> List [IntegrationAdapter ]:
244+ async def get_active_integration_providers (self , ** kwargs ) -> List [IntegrationAdapter ]:
223245 """Get only active integration providers"""
224- return await self .get_integration_providers (active_only = True )
246+ return await self .get_integration_providers (active_only = True , ** kwargs )
247+
248+ async def get_integrations (self , ** kwargs ) -> List [IntegrationAdapter ]:
249+ return await self ._integration_api .get_integration_providers (** kwargs )
0 commit comments