universal-mcp-applications 0.1.30__py3-none-any.whl → 0.1.36rc1__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 universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/ahrefs/app.py +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +33 -100
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/app.py +6 -17
- universal_mcp/applications/falai/app.py +23 -100
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +88 -188
- universal_mcp/applications/google_drive/app.py +140 -462
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +101 -578
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +9 -2
- universal_mcp/applications/linkedin/app.py +392 -212
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +14 -36
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +16 -76
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +216 -102
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +15 -37
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +50 -101
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -105
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from universal_mcp.applications.application import APIApplication
|
|
4
3
|
from universal_mcp.integrations import Integration
|
|
5
4
|
|
|
@@ -9,7 +8,7 @@ class MsTeamsApp(APIApplication):
|
|
|
9
8
|
super().__init__(name="ms_teams", integration=integration, **kwargs)
|
|
10
9
|
self.base_url = "https://graph.microsoft.com/v1.0"
|
|
11
10
|
|
|
12
|
-
def get_user_chats(
|
|
11
|
+
async def get_user_chats(
|
|
13
12
|
self,
|
|
14
13
|
top: int | None = None,
|
|
15
14
|
skip: int | None = None,
|
|
@@ -60,7 +59,7 @@ class MsTeamsApp(APIApplication):
|
|
|
60
59
|
response = self._get(url, params=query_params)
|
|
61
60
|
return self._handle_response(response)
|
|
62
61
|
|
|
63
|
-
def get_joined_teams(self) -> list[dict[str, Any]]:
|
|
62
|
+
async def get_joined_teams(self) -> list[dict[str, Any]]:
|
|
64
63
|
"""
|
|
65
64
|
Fetches all Microsoft Teams the authenticated user belongs to by querying the `/me/joinedTeams` Graph API endpoint. It returns a list of dictionaries, where each dictionary represents a single team's details, unlike functions that list channels or chats for a specific team.
|
|
66
65
|
|
|
@@ -76,10 +75,9 @@ class MsTeamsApp(APIApplication):
|
|
|
76
75
|
url = f"{self.base_url}/me/joinedTeams"
|
|
77
76
|
response = self._get(url)
|
|
78
77
|
data = self._handle_response(response)
|
|
79
|
-
# The API returns the list of teams under the "value" key.
|
|
80
78
|
return data.get("value", [])
|
|
81
79
|
|
|
82
|
-
def list_channels_for_team(
|
|
80
|
+
async def list_channels_for_team(
|
|
83
81
|
self,
|
|
84
82
|
team_id: str,
|
|
85
83
|
top: int | None = None,
|
|
@@ -134,7 +132,7 @@ class MsTeamsApp(APIApplication):
|
|
|
134
132
|
response = self._get(url, params=query_params)
|
|
135
133
|
return self._handle_response(response)
|
|
136
134
|
|
|
137
|
-
def send_chat_message(self, chat_id: str, content: str) -> dict[str, Any]:
|
|
135
|
+
async def send_chat_message(self, chat_id: str, content: str) -> dict[str, Any]:
|
|
138
136
|
"""
|
|
139
137
|
Posts a new message to a specific Microsoft Teams chat using its unique ID. This function targets direct or group chats, distinguishing it from `send_channel_message`, which posts to public team channels, and `reply_to_chat_message`, which responds to existing messages.
|
|
140
138
|
|
|
@@ -156,9 +154,7 @@ class MsTeamsApp(APIApplication):
|
|
|
156
154
|
response = self._post(url, data=payload)
|
|
157
155
|
return self._handle_response(response)
|
|
158
156
|
|
|
159
|
-
def send_channel_message(
|
|
160
|
-
self, team_id: str, channel_id: str, content: str
|
|
161
|
-
) -> dict[str, Any]:
|
|
157
|
+
async def send_channel_message(self, team_id: str, channel_id: str, content: str) -> dict[str, Any]:
|
|
162
158
|
"""
|
|
163
159
|
Posts a new message to a specified team channel, initiating a new conversation thread. Unlike `reply_to_channel_message`, which replies to a message, this function starts a new topic. It's distinct from `send_chat_message`, which is for private or group chats, not team channels.
|
|
164
160
|
|
|
@@ -181,9 +177,7 @@ class MsTeamsApp(APIApplication):
|
|
|
181
177
|
response = self._post(url, data=payload)
|
|
182
178
|
return self._handle_response(response)
|
|
183
179
|
|
|
184
|
-
def reply_to_channel_message(
|
|
185
|
-
self, team_id: str, channel_id: str, message_id: str, content: str
|
|
186
|
-
) -> dict[str, Any]:
|
|
180
|
+
async def reply_to_channel_message(self, team_id: str, channel_id: str, message_id: str, content: str) -> dict[str, Any]:
|
|
187
181
|
"""
|
|
188
182
|
Posts a reply to a specific message within a Microsoft Teams channel. It uses the team, channel, and original message IDs to target an existing conversation thread, distinguishing it from `send_channel_message` which starts a new one.
|
|
189
183
|
|
|
@@ -207,7 +201,7 @@ class MsTeamsApp(APIApplication):
|
|
|
207
201
|
response = self._post(url, data=payload)
|
|
208
202
|
return self._handle_response(response)
|
|
209
203
|
|
|
210
|
-
def create_chat(
|
|
204
|
+
async def create_chat(
|
|
211
205
|
self,
|
|
212
206
|
id: str | None = None,
|
|
213
207
|
chatType: str | None = None,
|
|
@@ -278,25 +272,13 @@ class MsTeamsApp(APIApplication):
|
|
|
278
272
|
"pinnedMessages": pinnedMessages,
|
|
279
273
|
"tabs": tabs,
|
|
280
274
|
}
|
|
281
|
-
request_body_data = {
|
|
282
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
283
|
-
}
|
|
275
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
284
276
|
url = f"{self.base_url}/chats"
|
|
285
277
|
query_params = {}
|
|
286
|
-
response = self._post(
|
|
287
|
-
url,
|
|
288
|
-
data=request_body_data,
|
|
289
|
-
params=query_params,
|
|
290
|
-
content_type="application/json",
|
|
291
|
-
)
|
|
278
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
292
279
|
return self._handle_response(response)
|
|
293
280
|
|
|
294
|
-
def get_chat_details(
|
|
295
|
-
self,
|
|
296
|
-
chat_id: str,
|
|
297
|
-
select: list[str] | None = None,
|
|
298
|
-
expand: list[str] | None = None,
|
|
299
|
-
) -> Any:
|
|
281
|
+
async def get_chat_details(self, chat_id: str, select: list[str] | None = None, expand: list[str] | None = None) -> Any:
|
|
300
282
|
"""
|
|
301
283
|
Retrieves the properties and relationships of a specific chat conversation by its unique ID. Unlike `get_user_chats` which lists all chats, this targets one chat. Optional parameters can select specific fields or expand related entities like members or apps to customize the returned data.
|
|
302
284
|
|
|
@@ -317,13 +299,11 @@ class MsTeamsApp(APIApplication):
|
|
|
317
299
|
if chat_id is None:
|
|
318
300
|
raise ValueError("Missing required parameter 'chat-id'.")
|
|
319
301
|
url = f"{self.base_url}/chats/{chat_id}"
|
|
320
|
-
query_params = {
|
|
321
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
322
|
-
}
|
|
302
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
323
303
|
response = self._get(url, params=query_params)
|
|
324
304
|
return self._handle_response(response)
|
|
325
305
|
|
|
326
|
-
def update_chat_details(
|
|
306
|
+
async def update_chat_details(
|
|
327
307
|
self,
|
|
328
308
|
chat_id: str,
|
|
329
309
|
id: str | None = None,
|
|
@@ -398,15 +378,13 @@ class MsTeamsApp(APIApplication):
|
|
|
398
378
|
"pinnedMessages": pinnedMessages,
|
|
399
379
|
"tabs": tabs,
|
|
400
380
|
}
|
|
401
|
-
request_body_data = {
|
|
402
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
403
|
-
}
|
|
381
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
404
382
|
url = f"{self.base_url}/chats/{chat_id}"
|
|
405
383
|
query_params = {}
|
|
406
384
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
407
385
|
return self._handle_response(response)
|
|
408
386
|
|
|
409
|
-
def list_installed_chat_apps(
|
|
387
|
+
async def list_installed_chat_apps(
|
|
410
388
|
self,
|
|
411
389
|
chat_id: str,
|
|
412
390
|
top: int | None = None,
|
|
@@ -461,7 +439,7 @@ class MsTeamsApp(APIApplication):
|
|
|
461
439
|
response = self._get(url, params=query_params)
|
|
462
440
|
return self._handle_response(response)
|
|
463
441
|
|
|
464
|
-
def list_chat_members(
|
|
442
|
+
async def list_chat_members(
|
|
465
443
|
self,
|
|
466
444
|
chat_id: str,
|
|
467
445
|
top: int | None = None,
|
|
@@ -516,7 +494,7 @@ class MsTeamsApp(APIApplication):
|
|
|
516
494
|
response = self._get(url, params=query_params)
|
|
517
495
|
return self._handle_response(response)
|
|
518
496
|
|
|
519
|
-
def add_member_to_chat(
|
|
497
|
+
async def add_member_to_chat(
|
|
520
498
|
self,
|
|
521
499
|
chat_id: str,
|
|
522
500
|
id: str | None = None,
|
|
@@ -552,25 +530,14 @@ class MsTeamsApp(APIApplication):
|
|
|
552
530
|
"roles": roles,
|
|
553
531
|
"visibleHistoryStartDateTime": visibleHistoryStartDateTime,
|
|
554
532
|
}
|
|
555
|
-
request_body_data = {
|
|
556
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
557
|
-
}
|
|
533
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
558
534
|
url = f"{self.base_url}/chats/{chat_id}/members"
|
|
559
535
|
query_params = {}
|
|
560
|
-
response = self._post(
|
|
561
|
-
url,
|
|
562
|
-
data=request_body_data,
|
|
563
|
-
params=query_params,
|
|
564
|
-
content_type="application/json",
|
|
565
|
-
)
|
|
536
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
566
537
|
return self._handle_response(response)
|
|
567
538
|
|
|
568
|
-
def get_chat_member(
|
|
569
|
-
self,
|
|
570
|
-
chat_id: str,
|
|
571
|
-
conversationMember_id: str,
|
|
572
|
-
select: list[str] | None = None,
|
|
573
|
-
expand: list[str] | None = None,
|
|
539
|
+
async def get_chat_member(
|
|
540
|
+
self, chat_id: str, conversationMember_id: str, select: list[str] | None = None, expand: list[str] | None = None
|
|
574
541
|
) -> Any:
|
|
575
542
|
"""
|
|
576
543
|
Retrieves detailed information for a specific member within a chat using their unique ID. This function targets a single individual, distinguishing it from `list_chat_members` which returns all members. The response can be customized by selecting specific properties or expanding related entities.
|
|
@@ -595,13 +562,11 @@ class MsTeamsApp(APIApplication):
|
|
|
595
562
|
if conversationMember_id is None:
|
|
596
563
|
raise ValueError("Missing required parameter 'conversationMember-id'.")
|
|
597
564
|
url = f"{self.base_url}/chats/{chat_id}/members/{conversationMember_id}"
|
|
598
|
-
query_params = {
|
|
599
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
600
|
-
}
|
|
565
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
601
566
|
response = self._get(url, params=query_params)
|
|
602
567
|
return self._handle_response(response)
|
|
603
568
|
|
|
604
|
-
def delete_chat_member(self, chat_id: str, conversationMember_id: str) -> Any:
|
|
569
|
+
async def delete_chat_member(self, chat_id: str, conversationMember_id: str) -> Any:
|
|
605
570
|
"""
|
|
606
571
|
Removes a specific member from a chat using their unique ID and the chat's ID. This function sends a DELETE request to the Microsoft Graph API to permanently remove the user from the conversation, acting as the counterpart to `add_member_to_chat`.
|
|
607
572
|
|
|
@@ -627,7 +592,7 @@ class MsTeamsApp(APIApplication):
|
|
|
627
592
|
response = self._delete(url, params=query_params)
|
|
628
593
|
return self._handle_response(response)
|
|
629
594
|
|
|
630
|
-
def list_chat_messages(
|
|
595
|
+
async def list_chat_messages(
|
|
631
596
|
self,
|
|
632
597
|
chat_id: str,
|
|
633
598
|
top: int | None = None,
|
|
@@ -682,12 +647,8 @@ class MsTeamsApp(APIApplication):
|
|
|
682
647
|
response = self._get(url, params=query_params)
|
|
683
648
|
return self._handle_response(response)
|
|
684
649
|
|
|
685
|
-
def get_chat_message(
|
|
686
|
-
self,
|
|
687
|
-
chat_id: str,
|
|
688
|
-
chatMessage_id: str,
|
|
689
|
-
select: list[str] | None = None,
|
|
690
|
-
expand: list[str] | None = None,
|
|
650
|
+
async def get_chat_message(
|
|
651
|
+
self, chat_id: str, chatMessage_id: str, select: list[str] | None = None, expand: list[str] | None = None
|
|
691
652
|
) -> Any:
|
|
692
653
|
"""
|
|
693
654
|
Retrieves the full details of a single message from a specific chat using both chat and message IDs. This function targets an individual message, differentiating it from `list_chat_messages`, which retrieves a collection. Optional parameters can customize the response by selecting specific properties or expanding entities.
|
|
@@ -712,13 +673,11 @@ class MsTeamsApp(APIApplication):
|
|
|
712
673
|
if chatMessage_id is None:
|
|
713
674
|
raise ValueError("Missing required parameter 'chatMessage-id'.")
|
|
714
675
|
url = f"{self.base_url}/chats/{chat_id}/messages/{chatMessage_id}"
|
|
715
|
-
query_params = {
|
|
716
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
717
|
-
}
|
|
676
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
718
677
|
response = self._get(url, params=query_params)
|
|
719
678
|
return self._handle_response(response)
|
|
720
679
|
|
|
721
|
-
def list_chat_message_replies(
|
|
680
|
+
async def list_chat_message_replies(
|
|
722
681
|
self,
|
|
723
682
|
chat_id: str,
|
|
724
683
|
chatMessage_id: str,
|
|
@@ -777,7 +736,7 @@ class MsTeamsApp(APIApplication):
|
|
|
777
736
|
response = self._get(url, params=query_params)
|
|
778
737
|
return self._handle_response(response)
|
|
779
738
|
|
|
780
|
-
def reply_to_chat_message(
|
|
739
|
+
async def reply_to_chat_message(
|
|
781
740
|
self,
|
|
782
741
|
chat_id: str,
|
|
783
742
|
chatMessage_id: str,
|
|
@@ -880,26 +839,14 @@ class MsTeamsApp(APIApplication):
|
|
|
880
839
|
"hostedContents": hostedContents,
|
|
881
840
|
"replies": replies,
|
|
882
841
|
}
|
|
883
|
-
request_body_data = {
|
|
884
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
885
|
-
}
|
|
842
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
886
843
|
url = f"{self.base_url}/chats/{chat_id}/messages/{chatMessage_id}/replies"
|
|
887
844
|
query_params = {}
|
|
888
|
-
response = self._post(
|
|
889
|
-
url,
|
|
890
|
-
data=request_body_data,
|
|
891
|
-
params=query_params,
|
|
892
|
-
content_type="application/json",
|
|
893
|
-
)
|
|
845
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
894
846
|
return self._handle_response(response)
|
|
895
847
|
|
|
896
|
-
def get_chat_reply_details(
|
|
897
|
-
self,
|
|
898
|
-
chat_id: str,
|
|
899
|
-
chatMessage_id: str,
|
|
900
|
-
chatMessage_id1: str,
|
|
901
|
-
select: list[str] | None = None,
|
|
902
|
-
expand: list[str] | None = None,
|
|
848
|
+
async def get_chat_reply_details(
|
|
849
|
+
self, chat_id: str, chatMessage_id: str, chatMessage_id1: str, select: list[str] | None = None, expand: list[str] | None = None
|
|
903
850
|
) -> Any:
|
|
904
851
|
"""
|
|
905
852
|
Retrieves a specific reply from a chat message thread using the chat, parent message, and reply IDs. Unlike `list_chat_message_replies`, which fetches all replies, this function targets a single reply for detailed information, allowing for customized field selection.
|
|
@@ -927,13 +874,11 @@ class MsTeamsApp(APIApplication):
|
|
|
927
874
|
if chatMessage_id1 is None:
|
|
928
875
|
raise ValueError("Missing required parameter 'chatMessage-id1'.")
|
|
929
876
|
url = f"{self.base_url}/chats/{chat_id}/messages/{chatMessage_id}/replies/{chatMessage_id1}"
|
|
930
|
-
query_params = {
|
|
931
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
932
|
-
}
|
|
877
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
933
878
|
response = self._get(url, params=query_params)
|
|
934
879
|
return self._handle_response(response)
|
|
935
880
|
|
|
936
|
-
def create_team_from_group(
|
|
881
|
+
async def create_team_from_group(
|
|
937
882
|
self,
|
|
938
883
|
group_id: str,
|
|
939
884
|
id: str | None = None,
|
|
@@ -1047,20 +992,13 @@ class MsTeamsApp(APIApplication):
|
|
|
1047
992
|
"tags": tags,
|
|
1048
993
|
"template": template,
|
|
1049
994
|
}
|
|
1050
|
-
request_body_data = {
|
|
1051
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1052
|
-
}
|
|
995
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1053
996
|
url = f"{self.base_url}/groups/{group_id}/team"
|
|
1054
997
|
query_params = {}
|
|
1055
|
-
response = self._put(
|
|
1056
|
-
url,
|
|
1057
|
-
data=request_body_data,
|
|
1058
|
-
params=query_params,
|
|
1059
|
-
content_type="application/json",
|
|
1060
|
-
)
|
|
998
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1061
999
|
return self._handle_response(response)
|
|
1062
1000
|
|
|
1063
|
-
def create_team(
|
|
1001
|
+
async def create_team(
|
|
1064
1002
|
self,
|
|
1065
1003
|
id: str | None = None,
|
|
1066
1004
|
classification: str | None = None,
|
|
@@ -1170,25 +1108,14 @@ class MsTeamsApp(APIApplication):
|
|
|
1170
1108
|
"tags": tags,
|
|
1171
1109
|
"template": template,
|
|
1172
1110
|
}
|
|
1173
|
-
request_body_data = {
|
|
1174
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1175
|
-
}
|
|
1111
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1176
1112
|
url = f"{self.base_url}/teams"
|
|
1177
1113
|
query_params = {}
|
|
1178
|
-
response = self._post(
|
|
1179
|
-
url,
|
|
1180
|
-
data=request_body_data,
|
|
1181
|
-
params=query_params,
|
|
1182
|
-
content_type="application/json",
|
|
1183
|
-
)
|
|
1114
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1184
1115
|
return self._handle_response(response)
|
|
1185
1116
|
|
|
1186
|
-
def get_channel_details(
|
|
1187
|
-
self,
|
|
1188
|
-
team_id: str,
|
|
1189
|
-
channel_id: str,
|
|
1190
|
-
select: list[str] | None = None,
|
|
1191
|
-
expand: list[str] | None = None,
|
|
1117
|
+
async def get_channel_details(
|
|
1118
|
+
self, team_id: str, channel_id: str, select: list[str] | None = None, expand: list[str] | None = None
|
|
1192
1119
|
) -> Any:
|
|
1193
1120
|
"""
|
|
1194
1121
|
Retrieves detailed information for a specific channel within a Microsoft Teams team, identified by both team and channel IDs. Optional parameters can select specific properties or expand related entities in the response, distinguishing it from list_channels_for_team, which retrieves a collection of channels.
|
|
@@ -1213,13 +1140,11 @@ class MsTeamsApp(APIApplication):
|
|
|
1213
1140
|
if channel_id is None:
|
|
1214
1141
|
raise ValueError("Missing required parameter 'channel-id'.")
|
|
1215
1142
|
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}"
|
|
1216
|
-
query_params = {
|
|
1217
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
1218
|
-
}
|
|
1143
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
1219
1144
|
response = self._get(url, params=query_params)
|
|
1220
1145
|
return self._handle_response(response)
|
|
1221
1146
|
|
|
1222
|
-
def update_channel_message(
|
|
1147
|
+
async def update_channel_message(
|
|
1223
1148
|
self,
|
|
1224
1149
|
team_id: str,
|
|
1225
1150
|
channel_id: str,
|
|
@@ -1326,15 +1251,13 @@ class MsTeamsApp(APIApplication):
|
|
|
1326
1251
|
"hostedContents": hostedContents,
|
|
1327
1252
|
"replies": replies,
|
|
1328
1253
|
}
|
|
1329
|
-
request_body_data = {
|
|
1330
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1331
|
-
}
|
|
1254
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1332
1255
|
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}/messages/{chatMessage_id}"
|
|
1333
1256
|
query_params = {}
|
|
1334
1257
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1335
1258
|
return self._handle_response(response)
|
|
1336
1259
|
|
|
1337
|
-
def update_channel_message_reply(
|
|
1260
|
+
async def update_channel_message_reply(
|
|
1338
1261
|
self,
|
|
1339
1262
|
team_id: str,
|
|
1340
1263
|
channel_id: str,
|
|
@@ -1445,15 +1368,13 @@ class MsTeamsApp(APIApplication):
|
|
|
1445
1368
|
"hostedContents": hostedContents,
|
|
1446
1369
|
"replies": replies,
|
|
1447
1370
|
}
|
|
1448
|
-
request_body_data = {
|
|
1449
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1450
|
-
}
|
|
1371
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1451
1372
|
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}/messages/{chatMessage_id}/replies/{chatMessage_id1}"
|
|
1452
1373
|
query_params = {}
|
|
1453
1374
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1454
1375
|
return self._handle_response(response)
|
|
1455
1376
|
|
|
1456
|
-
def list_channel_tabs(
|
|
1377
|
+
async def list_channel_tabs(
|
|
1457
1378
|
self,
|
|
1458
1379
|
team_id: str,
|
|
1459
1380
|
channel_id: str,
|
|
@@ -1512,7 +1433,7 @@ class MsTeamsApp(APIApplication):
|
|
|
1512
1433
|
response = self._get(url, params=query_params)
|
|
1513
1434
|
return self._handle_response(response)
|
|
1514
1435
|
|
|
1515
|
-
def create_channel_tab(
|
|
1436
|
+
async def create_channel_tab(
|
|
1516
1437
|
self,
|
|
1517
1438
|
team_id: str,
|
|
1518
1439
|
channel_id: str,
|
|
@@ -1548,33 +1469,15 @@ class MsTeamsApp(APIApplication):
|
|
|
1548
1469
|
if channel_id is None:
|
|
1549
1470
|
raise ValueError("Missing required parameter 'channel-id'.")
|
|
1550
1471
|
request_body_data = None
|
|
1551
|
-
request_body_data = {
|
|
1552
|
-
|
|
1553
|
-
"configuration": configuration,
|
|
1554
|
-
"displayName": displayName,
|
|
1555
|
-
"webUrl": webUrl,
|
|
1556
|
-
"teamsApp": teamsApp,
|
|
1557
|
-
}
|
|
1558
|
-
request_body_data = {
|
|
1559
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1560
|
-
}
|
|
1472
|
+
request_body_data = {"id": id, "configuration": configuration, "displayName": displayName, "webUrl": webUrl, "teamsApp": teamsApp}
|
|
1473
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1561
1474
|
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}/tabs"
|
|
1562
1475
|
query_params = {}
|
|
1563
|
-
response = self._post(
|
|
1564
|
-
url,
|
|
1565
|
-
data=request_body_data,
|
|
1566
|
-
params=query_params,
|
|
1567
|
-
content_type="application/json",
|
|
1568
|
-
)
|
|
1476
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1569
1477
|
return self._handle_response(response)
|
|
1570
1478
|
|
|
1571
|
-
def get_channel_tab_details(
|
|
1572
|
-
self,
|
|
1573
|
-
team_id: str,
|
|
1574
|
-
channel_id: str,
|
|
1575
|
-
teamsTab_id: str,
|
|
1576
|
-
select: list[str] | None = None,
|
|
1577
|
-
expand: list[str] | None = None,
|
|
1479
|
+
async def get_channel_tab_details(
|
|
1480
|
+
self, team_id: str, channel_id: str, teamsTab_id: str, select: list[str] | None = None, expand: list[str] | None = None
|
|
1578
1481
|
) -> Any:
|
|
1579
1482
|
"""
|
|
1580
1483
|
Fetches properties for a single tab within a specific Microsoft Teams channel, identified by its team, channel, and tab IDs. Unlike `list_channel_tabs` which gets all tabs, this targets a specific one, with options to select fields or expand related entities in the response.
|
|
@@ -1601,16 +1504,12 @@ class MsTeamsApp(APIApplication):
|
|
|
1601
1504
|
raise ValueError("Missing required parameter 'channel-id'.")
|
|
1602
1505
|
if teamsTab_id is None:
|
|
1603
1506
|
raise ValueError("Missing required parameter 'teamsTab-id'.")
|
|
1604
|
-
url =
|
|
1605
|
-
|
|
1606
|
-
)
|
|
1607
|
-
query_params = {
|
|
1608
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
1609
|
-
}
|
|
1507
|
+
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}/tabs/{teamsTab_id}"
|
|
1508
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
1610
1509
|
response = self._get(url, params=query_params)
|
|
1611
1510
|
return self._handle_response(response)
|
|
1612
1511
|
|
|
1613
|
-
def update_channel_tab(
|
|
1512
|
+
async def update_channel_tab(
|
|
1614
1513
|
self,
|
|
1615
1514
|
team_id: str,
|
|
1616
1515
|
channel_id: str,
|
|
@@ -1650,26 +1549,14 @@ class MsTeamsApp(APIApplication):
|
|
|
1650
1549
|
if teamsTab_id is None:
|
|
1651
1550
|
raise ValueError("Missing required parameter 'teamsTab-id'.")
|
|
1652
1551
|
request_body_data = None
|
|
1653
|
-
request_body_data = {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
"displayName": displayName,
|
|
1657
|
-
"webUrl": webUrl,
|
|
1658
|
-
"teamsApp": teamsApp,
|
|
1659
|
-
}
|
|
1660
|
-
request_body_data = {
|
|
1661
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1662
|
-
}
|
|
1663
|
-
url = (
|
|
1664
|
-
f"{self.base_url}/teams/{team_id}/channels/{channel_id}/tabs/{teamsTab_id}"
|
|
1665
|
-
)
|
|
1552
|
+
request_body_data = {"id": id, "configuration": configuration, "displayName": displayName, "webUrl": webUrl, "teamsApp": teamsApp}
|
|
1553
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1554
|
+
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}/tabs/{teamsTab_id}"
|
|
1666
1555
|
query_params = {}
|
|
1667
1556
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1668
1557
|
return self._handle_response(response)
|
|
1669
1558
|
|
|
1670
|
-
def delete_channel_tab(
|
|
1671
|
-
self, team_id: str, channel_id: str, teamsTab_id: str
|
|
1672
|
-
) -> Any:
|
|
1559
|
+
async def delete_channel_tab(self, team_id: str, channel_id: str, teamsTab_id: str) -> Any:
|
|
1673
1560
|
"""
|
|
1674
1561
|
Permanently removes a specific tab from a Microsoft Teams channel using its unique ID, along with the parent team and channel IDs. This function is the destructive counterpart to `create_channel_tab`, designed to delete a tab rather than create, list, or update one.
|
|
1675
1562
|
|
|
@@ -1693,19 +1580,12 @@ class MsTeamsApp(APIApplication):
|
|
|
1693
1580
|
raise ValueError("Missing required parameter 'channel-id'.")
|
|
1694
1581
|
if teamsTab_id is None:
|
|
1695
1582
|
raise ValueError("Missing required parameter 'teamsTab-id'.")
|
|
1696
|
-
url =
|
|
1697
|
-
f"{self.base_url}/teams/{team_id}/channels/{channel_id}/tabs/{teamsTab_id}"
|
|
1698
|
-
)
|
|
1583
|
+
url = f"{self.base_url}/teams/{team_id}/channels/{channel_id}/tabs/{teamsTab_id}"
|
|
1699
1584
|
query_params = {}
|
|
1700
1585
|
response = self._delete(url, params=query_params)
|
|
1701
1586
|
return self._handle_response(response)
|
|
1702
1587
|
|
|
1703
|
-
def get_primary_team_channel(
|
|
1704
|
-
self,
|
|
1705
|
-
team_id: str,
|
|
1706
|
-
select: list[str] | None = None,
|
|
1707
|
-
expand: list[str] | None = None,
|
|
1708
|
-
) -> Any:
|
|
1588
|
+
async def get_primary_team_channel(self, team_id: str, select: list[str] | None = None, expand: list[str] | None = None) -> Any:
|
|
1709
1589
|
"""
|
|
1710
1590
|
Retrieves the primary channel (usually 'General') for a specified team using its ID. Unlike `get_channel_details`, this function directly accesses the team's default channel without requiring a specific channel ID. Optional parameters can select or expand properties in the returned data.
|
|
1711
1591
|
|
|
@@ -1726,13 +1606,11 @@ class MsTeamsApp(APIApplication):
|
|
|
1726
1606
|
if team_id is None:
|
|
1727
1607
|
raise ValueError("Missing required parameter 'team-id'.")
|
|
1728
1608
|
url = f"{self.base_url}/teams/{team_id}/primaryChannel"
|
|
1729
|
-
query_params = {
|
|
1730
|
-
k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None
|
|
1731
|
-
}
|
|
1609
|
+
query_params = {k: v for k, v in [("$select", select), ("$expand", expand)] if v is not None}
|
|
1732
1610
|
response = self._get(url, params=query_params)
|
|
1733
1611
|
return self._handle_response(response)
|
|
1734
1612
|
|
|
1735
|
-
def list_user_installed_apps(
|
|
1613
|
+
async def list_user_installed_apps(
|
|
1736
1614
|
self,
|
|
1737
1615
|
user_id: str,
|
|
1738
1616
|
top: int | None = None,
|