universal-mcp-applications 0.1.20__py3-none-any.whl → 0.1.22__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/BEST_PRACTICES.md +166 -0
- universal_mcp/applications/airtable/app.py +0 -1
- universal_mcp/applications/apollo/app.py +0 -1
- universal_mcp/applications/aws_s3/app.py +40 -39
- universal_mcp/applications/browser_use/README.md +1 -0
- universal_mcp/applications/browser_use/__init__.py +0 -0
- universal_mcp/applications/browser_use/app.py +76 -0
- universal_mcp/applications/calendly/app.py +125 -125
- universal_mcp/applications/canva/app.py +95 -99
- universal_mcp/applications/confluence/app.py +0 -1
- universal_mcp/applications/contentful/app.py +4 -5
- universal_mcp/applications/domain_checker/app.py +11 -15
- universal_mcp/applications/e2b/app.py +4 -4
- universal_mcp/applications/elevenlabs/app.py +18 -15
- universal_mcp/applications/exa/app.py +17 -17
- universal_mcp/applications/falai/app.py +28 -29
- universal_mcp/applications/file_system/app.py +9 -9
- universal_mcp/applications/firecrawl/app.py +36 -36
- universal_mcp/applications/fireflies/app.py +55 -56
- universal_mcp/applications/fpl/app.py +49 -50
- universal_mcp/applications/ghost_content/app.py +0 -1
- universal_mcp/applications/github/app.py +41 -43
- universal_mcp/applications/google_calendar/app.py +40 -39
- universal_mcp/applications/google_docs/app.py +56 -56
- universal_mcp/applications/google_drive/app.py +212 -215
- universal_mcp/applications/google_gemini/app.py +1 -5
- universal_mcp/applications/google_mail/app.py +91 -90
- universal_mcp/applications/google_searchconsole/app.py +29 -29
- universal_mcp/applications/google_sheet/app.py +115 -115
- universal_mcp/applications/hashnode/README.md +6 -3
- universal_mcp/applications/hashnode/app.py +174 -25
- universal_mcp/applications/http_tools/app.py +10 -11
- universal_mcp/applications/hubspot/__init__.py +1 -1
- universal_mcp/applications/hubspot/api_segments/api_segment_base.py +36 -7
- universal_mcp/applications/hubspot/api_segments/crm_api.py +368 -368
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +115 -115
- universal_mcp/applications/hubspot/app.py +131 -72
- universal_mcp/applications/jira/app.py +0 -1
- universal_mcp/applications/linkedin/app.py +20 -20
- universal_mcp/applications/markitdown/app.py +10 -5
- universal_mcp/applications/ms_teams/app.py +123 -123
- universal_mcp/applications/openai/app.py +40 -39
- universal_mcp/applications/outlook/app.py +32 -32
- universal_mcp/applications/perplexity/app.py +4 -4
- universal_mcp/applications/reddit/app.py +69 -70
- universal_mcp/applications/resend/app.py +116 -117
- universal_mcp/applications/rocketlane/app.py +0 -1
- universal_mcp/applications/scraper/__init__.py +1 -1
- universal_mcp/applications/scraper/app.py +234 -16
- universal_mcp/applications/serpapi/app.py +14 -14
- universal_mcp/applications/sharepoint/app.py +19 -20
- universal_mcp/applications/shopify/app.py +0 -1
- universal_mcp/applications/slack/app.py +48 -48
- universal_mcp/applications/tavily/app.py +4 -4
- universal_mcp/applications/twitter/api_segments/compliance_api.py +13 -15
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +20 -20
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/likes_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/lists_api.py +37 -39
- universal_mcp/applications/twitter/api_segments/spaces_api.py +24 -24
- universal_mcp/applications/twitter/api_segments/trends_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/tweets_api.py +105 -105
- universal_mcp/applications/twitter/api_segments/usage_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/users_api.py +136 -136
- universal_mcp/applications/twitter/app.py +6 -2
- universal_mcp/applications/unipile/app.py +321 -71
- universal_mcp/applications/whatsapp/app.py +53 -54
- universal_mcp/applications/whatsapp/audio.py +39 -35
- universal_mcp/applications/whatsapp/whatsapp.py +176 -154
- universal_mcp/applications/whatsapp_business/app.py +92 -92
- universal_mcp/applications/yahoo_finance/app.py +105 -63
- universal_mcp/applications/youtube/app.py +206 -199
- universal_mcp/applications/zenquotes/__init__.py +2 -0
- universal_mcp/applications/zenquotes/app.py +3 -3
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/METADATA +2 -1
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/RECORD +78 -74
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import base64
|
|
2
2
|
from typing import Any, Literal
|
|
3
3
|
|
|
4
|
+
from universal_mcp.applications.application import APIApplication
|
|
5
|
+
from universal_mcp.integrations import Integration
|
|
6
|
+
|
|
4
7
|
from openai import NOT_GIVEN, AsyncOpenAI, OpenAIError
|
|
5
8
|
from openai._types import FileTypes as OpenAiFileTypes
|
|
6
9
|
from openai.types import FilePurpose as OpenAiFilePurpose
|
|
@@ -15,8 +18,6 @@ from openai.types.audio_model import AudioModel as OpenAiAudioModel
|
|
|
15
18
|
from openai.types.chat import ChatCompletionMessageParam
|
|
16
19
|
from openai.types.file_object import FileObject
|
|
17
20
|
from openai.types.image_model import ImageModel as OpenAiImageModel
|
|
18
|
-
from universal_mcp.applications.application import APIApplication
|
|
19
|
-
from universal_mcp.integrations import Integration
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
class OpenaiApp(APIApplication):
|
|
@@ -62,7 +63,7 @@ class OpenaiApp(APIApplication):
|
|
|
62
63
|
) -> dict[str, Any] | str:
|
|
63
64
|
"""
|
|
64
65
|
Generates a model response for a chat conversation. It supports both standard and streaming modes; if streaming, it internally aggregates response chunks into a single complete object, simplifying stream handling. Returns the completion data as a dictionary on success or an error string on failure.
|
|
65
|
-
|
|
66
|
+
|
|
66
67
|
Args:
|
|
67
68
|
messages: A list of messages comprising the conversation so far.
|
|
68
69
|
model: ID of the model to use. Defaults to "gpt-4o".
|
|
@@ -79,12 +80,12 @@ class OpenaiApp(APIApplication):
|
|
|
79
80
|
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far.
|
|
80
81
|
stop: Up to 4 sequences where the API will stop generating further tokens.
|
|
81
82
|
user: A unique identifier representing your end-user.
|
|
82
|
-
|
|
83
|
+
|
|
83
84
|
Returns:
|
|
84
85
|
A dictionary containing the chat completion response on success,
|
|
85
86
|
or a string containing an error message on failure.
|
|
86
87
|
If stream=True, usage data in the response will be None.
|
|
87
|
-
|
|
88
|
+
|
|
88
89
|
Tags:
|
|
89
90
|
chat, llm, important
|
|
90
91
|
"""
|
|
@@ -164,16 +165,16 @@ class OpenaiApp(APIApplication):
|
|
|
164
165
|
) -> dict[str, Any] | str:
|
|
165
166
|
"""
|
|
166
167
|
Uploads a file to the user's OpenAI account for use across various endpoints like 'assistants'. It accepts a file path or object and a purpose string, returning a dictionary with the created file object's details upon success.
|
|
167
|
-
|
|
168
|
+
|
|
168
169
|
Args:
|
|
169
170
|
file: The File object (not file name) or path to be uploaded.
|
|
170
171
|
Can be bytes, a PathLike object, or a file-like object.
|
|
171
172
|
purpose: The intended purpose of the uploaded file (e.g., 'fine-tune', 'assistants').
|
|
172
|
-
|
|
173
|
+
|
|
173
174
|
Returns:
|
|
174
175
|
A dictionary containing the file object details on success,
|
|
175
176
|
or a string containing an error message on failure.
|
|
176
|
-
|
|
177
|
+
|
|
177
178
|
Tags:
|
|
178
179
|
files, upload, storage
|
|
179
180
|
"""
|
|
@@ -195,17 +196,17 @@ class OpenaiApp(APIApplication):
|
|
|
195
196
|
) -> dict[str, Any] | str:
|
|
196
197
|
"""
|
|
197
198
|
Retrieves a paginated list of files uploaded to the OpenAI account. Allows filtering by purpose and controlling the output with limit, `after` cursor, and sort order parameters to efficiently navigate through the file collection.
|
|
198
|
-
|
|
199
|
+
|
|
199
200
|
Args:
|
|
200
201
|
purpose: Only return files with the given purpose.
|
|
201
202
|
limit: A limit on the number of objects to be returned.
|
|
202
203
|
after: A cursor for use in pagination.
|
|
203
204
|
order: Sort order by the `created_at` timestamp.
|
|
204
|
-
|
|
205
|
+
|
|
205
206
|
Returns:
|
|
206
207
|
A dictionary representing a page of file objects on success,
|
|
207
208
|
or a string containing an error message on failure.
|
|
208
|
-
|
|
209
|
+
|
|
209
210
|
Tags:
|
|
210
211
|
files, list, storage
|
|
211
212
|
"""
|
|
@@ -231,14 +232,14 @@ class OpenaiApp(APIApplication):
|
|
|
231
232
|
async def retrieve_file_metadata(self, file_id: str) -> dict[str, Any] | str:
|
|
232
233
|
"""
|
|
233
234
|
Retrieves the metadata (e.g., purpose, creation date) for a specific file from the OpenAI account using its ID. Unlike `retrieve_file_content`, this function does not download the file's contents. It returns a dictionary with file details on success or an error string on failure.
|
|
234
|
-
|
|
235
|
+
|
|
235
236
|
Args:
|
|
236
237
|
file_id: The ID of the file to retrieve.
|
|
237
|
-
|
|
238
|
+
|
|
238
239
|
Returns:
|
|
239
240
|
A dictionary containing the file object details on success,
|
|
240
241
|
or a string containing an error message on failure.
|
|
241
|
-
|
|
242
|
+
|
|
242
243
|
Tags:
|
|
243
244
|
files, retrieve, storage
|
|
244
245
|
"""
|
|
@@ -256,14 +257,14 @@ class OpenaiApp(APIApplication):
|
|
|
256
257
|
async def delete_file(self, file_id: str) -> dict[str, Any] | str:
|
|
257
258
|
"""
|
|
258
259
|
Permanently deletes a file from the user's OpenAI account using its unique file ID. This action is irreversible. It returns a dictionary confirming the deletion on success or an error message string on failure. This is the 'delete' operation in the file management lifecycle.
|
|
259
|
-
|
|
260
|
+
|
|
260
261
|
Args:
|
|
261
262
|
file_id: The ID of the file to delete.
|
|
262
|
-
|
|
263
|
+
|
|
263
264
|
Returns:
|
|
264
265
|
A dictionary containing the deletion status on success,
|
|
265
266
|
or a string containing an error message on failure.
|
|
266
|
-
|
|
267
|
+
|
|
267
268
|
Tags:
|
|
268
269
|
files, delete, storage
|
|
269
270
|
"""
|
|
@@ -279,14 +280,14 @@ class OpenaiApp(APIApplication):
|
|
|
279
280
|
async def retrieve_file_content(self, file_id: str) -> dict[str, Any] | str:
|
|
280
281
|
"""
|
|
281
282
|
Retrieves a file's content from OpenAI using its ID. It returns plain text for common text formats (e.g., JSON, CSV). For binary or undecodable files, it returns a dictionary with base64-encoded data, differentiating it from `retrieve_file` which only fetches metadata.
|
|
282
|
-
|
|
283
|
+
|
|
283
284
|
Args:
|
|
284
285
|
file_id: The ID of the file whose content to retrieve.
|
|
285
|
-
|
|
286
|
+
|
|
286
287
|
Returns:
|
|
287
288
|
The file content as a string if text, a dictionary with base64 encoded
|
|
288
289
|
content if binary, or an error message string on failure.
|
|
289
|
-
|
|
290
|
+
|
|
290
291
|
Tags:
|
|
291
292
|
files, content, download
|
|
292
293
|
"""
|
|
@@ -347,7 +348,7 @@ class OpenaiApp(APIApplication):
|
|
|
347
348
|
) -> dict[str, Any] | str:
|
|
348
349
|
"""
|
|
349
350
|
Generates new images from a textual prompt using OpenAI's DALL-E models. It allows customization of parameters like image size, quality, style, and response format (URL or base64 JSON). Unlike other image functions in this class, it creates images entirely from scratch based on text.
|
|
350
|
-
|
|
351
|
+
|
|
351
352
|
Args:
|
|
352
353
|
prompt: A text description of the desired image(s).
|
|
353
354
|
model: The model to use for image generation. Defaults to "dall-e-3".
|
|
@@ -364,11 +365,11 @@ class OpenaiApp(APIApplication):
|
|
|
364
365
|
For "dall-e-3": "1024x1024", "1792x1024", or "1024x1792".
|
|
365
366
|
style: The style of the generated images ("vivid" or "natural"). Only for "dall-e-3".
|
|
366
367
|
user: A unique identifier representing your end-user.
|
|
367
|
-
|
|
368
|
+
|
|
368
369
|
Returns:
|
|
369
370
|
A dictionary containing the image generation response on success,
|
|
370
371
|
or a string containing an error message on failure.
|
|
371
|
-
|
|
372
|
+
|
|
372
373
|
Tags:
|
|
373
374
|
images, generate, dalle, important
|
|
374
375
|
"""
|
|
@@ -416,7 +417,7 @@ class OpenaiApp(APIApplication):
|
|
|
416
417
|
) -> dict[str, Any] | str:
|
|
417
418
|
"""
|
|
418
419
|
Modifies a source image using the DALL-E 2 model based on a text prompt. An optional mask can be supplied to specify the exact area for editing. This function is distinct from generating images from scratch (`generate_image`) or creating simple variations (`create_image_variation`).
|
|
419
|
-
|
|
420
|
+
|
|
420
421
|
Args:
|
|
421
422
|
image: The image to edit. Must be a valid PNG file, less than 4MB, and square.
|
|
422
423
|
prompt: A text description of the desired image(s).
|
|
@@ -427,11 +428,11 @@ class OpenaiApp(APIApplication):
|
|
|
427
428
|
response_format: The format of the returned images ("url" or "b64_json"). Defaults to "url".
|
|
428
429
|
size: The size of the generated images. Must be one of "256x256", "512x512", or "1024x1024".
|
|
429
430
|
user: A unique identifier representing your end-user.
|
|
430
|
-
|
|
431
|
+
|
|
431
432
|
Returns:
|
|
432
433
|
A dictionary containing the image edit response on success,
|
|
433
434
|
or a string containing an error message on failure.
|
|
434
|
-
|
|
435
|
+
|
|
435
436
|
Tags:
|
|
436
437
|
images, edit, dalle
|
|
437
438
|
"""
|
|
@@ -469,7 +470,7 @@ class OpenaiApp(APIApplication):
|
|
|
469
470
|
) -> dict[str, Any] | str:
|
|
470
471
|
"""
|
|
471
472
|
Generates one or more variations of a provided image using the OpenAI API, specifically the DALL-E 2 model. It allows customization of the number, size, and response format of the resulting images. Returns a dictionary with image data on success or an error string on failure.
|
|
472
|
-
|
|
473
|
+
|
|
473
474
|
Args:
|
|
474
475
|
image: The image to use as the basis for the variation(s). Must be a valid PNG file.
|
|
475
476
|
model: The model to use. Defaults to "dall-e-2", which is currently the only
|
|
@@ -478,11 +479,11 @@ class OpenaiApp(APIApplication):
|
|
|
478
479
|
response_format: The format of the returned images ("url" or "b64_json"). Defaults to "url".
|
|
479
480
|
size: The size of the generated images. Must be one of "256x256", "512x512", or "1024x1024".
|
|
480
481
|
user: A unique identifier representing your end-user.
|
|
481
|
-
|
|
482
|
+
|
|
482
483
|
Returns:
|
|
483
484
|
A dictionary containing the image variation response on success,
|
|
484
485
|
or a string containing an error message on failure.
|
|
485
|
-
|
|
486
|
+
|
|
486
487
|
Tags:
|
|
487
488
|
images, variation, dalle
|
|
488
489
|
"""
|
|
@@ -522,7 +523,7 @@ class OpenaiApp(APIApplication):
|
|
|
522
523
|
) -> dict[str, Any] | str:
|
|
523
524
|
"""
|
|
524
525
|
Transcribes an audio file into text in its original language using models like Whisper or GPT-4o. It supports multiple response formats and internally aggregates streaming data into a final object. This differs from `create_translation`, which translates audio specifically into English text.
|
|
525
|
-
|
|
526
|
+
|
|
526
527
|
Args:
|
|
527
528
|
file: The audio file object (not file name) to transcribe.
|
|
528
529
|
model: ID of the model to use (e.g., "whisper-1", "gpt-4o-transcribe").
|
|
@@ -538,12 +539,12 @@ class OpenaiApp(APIApplication):
|
|
|
538
539
|
Only works with response_format="json" and gpt-4o models.
|
|
539
540
|
stream: If True, streams the response. The method will aggregate the stream
|
|
540
541
|
into a final response object. Streaming is not supported for "whisper-1".
|
|
541
|
-
|
|
542
|
+
|
|
542
543
|
Returns:
|
|
543
544
|
A dictionary containing the transcription or a string, depending on `response_format`.
|
|
544
545
|
If `stream` is True, an aggregated response dictionary.
|
|
545
546
|
Returns an error message string on failure.
|
|
546
|
-
|
|
547
|
+
|
|
547
548
|
Tags:
|
|
548
549
|
audio, transcription, speech-to-text, important
|
|
549
550
|
"""
|
|
@@ -615,18 +616,18 @@ class OpenaiApp(APIApplication):
|
|
|
615
616
|
) -> dict[str, Any] | str:
|
|
616
617
|
"""
|
|
617
618
|
Translates audio from any supported language into English text using OpenAI's API. Unlike `create_transcription`, which converts audio to text in its original language, this function's output is always English. It supports various response formats like JSON, text, or SRT for the translated content.
|
|
618
|
-
|
|
619
|
+
|
|
619
620
|
Args:
|
|
620
621
|
file: The audio file object (not file name) to translate.
|
|
621
622
|
model: ID of the model to use (currently, only "whisper-1" is supported).
|
|
622
623
|
prompt: Optional text to guide the model's style (should be in English).
|
|
623
624
|
response_format: The format of the translated text.
|
|
624
625
|
temperature: Sampling temperature between 0 and 1.
|
|
625
|
-
|
|
626
|
+
|
|
626
627
|
Returns:
|
|
627
628
|
A dictionary containing the translation or a string, depending on `response_format`.
|
|
628
629
|
Returns an error message string on failure.
|
|
629
|
-
|
|
630
|
+
|
|
630
631
|
Tags:
|
|
631
632
|
audio, translation, speech-to-text
|
|
632
633
|
"""
|
|
@@ -681,7 +682,7 @@ class OpenaiApp(APIApplication):
|
|
|
681
682
|
) -> dict[str, Any] | str:
|
|
682
683
|
"""
|
|
683
684
|
Generates audio from input text using a specified TTS model and voice. This text-to-speech function allows customizing audio format and speed. On success, it returns a dictionary containing the base64-encoded audio content and its corresponding MIME type, or an error string on failure.
|
|
684
|
-
|
|
685
|
+
|
|
685
686
|
Args:
|
|
686
687
|
input_text: The text to generate audio for (max 4096 characters).
|
|
687
688
|
model: The TTS model to use (e.g., "tts-1", "tts-1-hd", "gpt-4o-mini-tts").
|
|
@@ -689,12 +690,12 @@ class OpenaiApp(APIApplication):
|
|
|
689
690
|
response_format: The format of the audio ("mp3", "opus", "aac", "flac", "wav", "pcm"). Defaults to "mp3".
|
|
690
691
|
speed: Speed of the generated audio (0.25 to 4.0). Defaults to 1.0.
|
|
691
692
|
instructions: Control voice with additional instructions (not for tts-1/tts-1-hd).
|
|
692
|
-
|
|
693
|
-
|
|
693
|
+
|
|
694
|
+
|
|
694
695
|
Returns:
|
|
695
696
|
A dictionary containing the base64 encoded audio content and content type,
|
|
696
697
|
or an error message string on failure.
|
|
697
|
-
|
|
698
|
+
|
|
698
699
|
Tags:
|
|
699
700
|
audio, speech, text-to-speech, tts, important
|
|
700
701
|
"""
|
|
@@ -19,19 +19,19 @@ class OutlookApp(APIApplication):
|
|
|
19
19
|
) -> Any:
|
|
20
20
|
"""
|
|
21
21
|
Replies to an email using its message ID, with either a simple comment or a full message object including attachments. Unlike `send_mail`, which creates a new email, this function targets an existing message. It defaults to the current user if no user ID is specified.
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
Args:
|
|
24
24
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
25
25
|
message_id (string): message-id
|
|
26
26
|
comment (string): A comment to include in the reply. Example: 'Thank you for your email. Here is my reply.'.
|
|
27
27
|
message (object): A message object to specify additional properties for the reply, such as attachments. Example: {'subject': 'RE: Project Update', 'body': {'contentType': 'Text', 'content': 'Thank you for the update. Looking forward to the next steps.'}, 'toRecipients': [{'emailAddress': {'address': 'alice@contoso.com'}}], 'attachments': [{'@odata.type': '#microsoft.graph.fileAttachment', 'name': 'agenda.pdf', 'contentType': 'application/pdf', 'contentBytes': 'SGVsbG8gV29ybGQh'}]}.
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
Returns:
|
|
30
30
|
Any: Success
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
Raises:
|
|
33
33
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
Tags:
|
|
36
36
|
users.message, important
|
|
37
37
|
"""
|
|
@@ -71,18 +71,18 @@ class OutlookApp(APIApplication):
|
|
|
71
71
|
) -> Any:
|
|
72
72
|
"""
|
|
73
73
|
Sends a new email on behalf of a specified or current user, using a dictionary for content like recipients and subject. Unlike `reply_to_message`, which replies to an existing message, this function composes and sends an entirely new email from scratch.
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
Args:
|
|
76
76
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
77
77
|
message (object): message Example: {'subject': 'Meet for lunch?', 'body': {'contentType': 'Text', 'content': 'The new cafeteria is open.'}, 'toRecipients': [{'emailAddress': {'address': 'frannis@contoso.com'}}], 'ccRecipients': [{'emailAddress': {'address': 'danas@contoso.com'}}], 'bccRecipients': [{'emailAddress': {'address': 'bccuser@contoso.com'}}], 'attachments': [{'@odata.type': '#microsoft.graph.fileAttachment', 'name': 'attachment.txt', 'contentType': 'text/plain', 'contentBytes': 'SGVsbG8gV29ybGQh'}]}.
|
|
78
78
|
saveToSentItems (boolean): saveToSentItems Example: 'False'.
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
Returns:
|
|
81
81
|
Any: Success
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
Raises:
|
|
84
84
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
85
|
-
|
|
85
|
+
|
|
86
86
|
Tags:
|
|
87
87
|
users.user.Actions, important
|
|
88
88
|
"""
|
|
@@ -122,20 +122,20 @@ class OutlookApp(APIApplication):
|
|
|
122
122
|
) -> Any:
|
|
123
123
|
"""
|
|
124
124
|
Retrieves a specific mail folder's metadata by its ID for a given user. The response can be customized to include hidden folders or select specific properties. Unlike `list_user_messages`, this function fetches folder details, not the emails contained within it.
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
Args:
|
|
127
127
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
128
128
|
mailFolder_id (string): mailFolder-id
|
|
129
129
|
includeHiddenFolders (string): Include Hidden Folders
|
|
130
130
|
select (array): Select properties to be returned
|
|
131
131
|
expand (array): Expand related entities
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
Returns:
|
|
134
134
|
Any: Retrieved navigation property
|
|
135
|
-
|
|
135
|
+
|
|
136
136
|
Raises:
|
|
137
137
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
Tags:
|
|
140
140
|
users.mailFolder, important
|
|
141
141
|
"""
|
|
@@ -177,7 +177,7 @@ class OutlookApp(APIApplication):
|
|
|
177
177
|
) -> dict[str, Any]:
|
|
178
178
|
"""
|
|
179
179
|
Retrieves a list of messages from a user's mailbox. This function supports powerful querying using optional parameters for filtering, searching, sorting, and pagination, unlike `get_user_message`, which fetches a single email by its ID.
|
|
180
|
-
|
|
180
|
+
|
|
181
181
|
Args:
|
|
182
182
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
183
183
|
select (list): Select properties to be returned. Defaults to ['bodyPreview'].
|
|
@@ -196,13 +196,13 @@ class OutlookApp(APIApplication):
|
|
|
196
196
|
count (boolean): Include count of items
|
|
197
197
|
orderby (array): Order items by property values
|
|
198
198
|
expand (array): Expand related entities
|
|
199
|
-
|
|
199
|
+
|
|
200
200
|
Returns:
|
|
201
201
|
dict[str, Any]: Retrieved collection
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
Raises:
|
|
204
204
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
205
|
-
|
|
205
|
+
|
|
206
206
|
Tags:
|
|
207
207
|
users.message, important
|
|
208
208
|
"""
|
|
@@ -251,20 +251,20 @@ class OutlookApp(APIApplication):
|
|
|
251
251
|
) -> Any:
|
|
252
252
|
"""
|
|
253
253
|
Retrieves a specific email message by its ID for a given user, with options to select specific fields or expand related data. Unlike `list_user_messages`, which fetches a collection of emails with advanced filtering, this function is designed to retrieve a single, known message.
|
|
254
|
-
|
|
254
|
+
|
|
255
255
|
Args:
|
|
256
256
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
257
257
|
message_id (string): message-id
|
|
258
258
|
includeHiddenMessages (string): Include Hidden Messages
|
|
259
259
|
select (array): Select properties to be returned
|
|
260
260
|
expand (array): Expand related entities
|
|
261
|
-
|
|
261
|
+
|
|
262
262
|
Returns:
|
|
263
263
|
Any: Retrieved navigation property
|
|
264
|
-
|
|
264
|
+
|
|
265
265
|
Raises:
|
|
266
266
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
267
|
-
|
|
267
|
+
|
|
268
268
|
Tags:
|
|
269
269
|
users.message, important
|
|
270
270
|
"""
|
|
@@ -294,17 +294,17 @@ class OutlookApp(APIApplication):
|
|
|
294
294
|
def user_delete_message(self, message_id: str, user_id: str | None = None) -> Any:
|
|
295
295
|
"""
|
|
296
296
|
Permanently deletes a specific email, identified by `message_id`, from a user's mailbox. If `user_id` is not provided, it defaults to the current authenticated user. Unlike retrieval functions such as `get_user_message`, this performs a destructive action to remove the specified email from Outlook.
|
|
297
|
-
|
|
297
|
+
|
|
298
298
|
Args:
|
|
299
299
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
300
300
|
message_id (string): message-id
|
|
301
|
-
|
|
301
|
+
|
|
302
302
|
Returns:
|
|
303
303
|
Any: Success
|
|
304
|
-
|
|
304
|
+
|
|
305
305
|
Raises:
|
|
306
306
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
307
|
-
|
|
307
|
+
|
|
308
308
|
Tags:
|
|
309
309
|
users.message, important
|
|
310
310
|
"""
|
|
@@ -338,7 +338,7 @@ class OutlookApp(APIApplication):
|
|
|
338
338
|
) -> dict[str, Any]:
|
|
339
339
|
"""
|
|
340
340
|
Retrieves attachments for a specific email message, identified by its ID. Supports advanced querying for filtering, sorting, and pagination, allowing users to select specific fields to return in the result set, focusing only on attachments rather than the full message content.
|
|
341
|
-
|
|
341
|
+
|
|
342
342
|
Args:
|
|
343
343
|
user_id (string, optional): user-id. If not provided, will automatically get the current user's ID.
|
|
344
344
|
message_id (string): message-id
|
|
@@ -350,13 +350,13 @@ class OutlookApp(APIApplication):
|
|
|
350
350
|
orderby (array): Order items by property values
|
|
351
351
|
select (array): Select properties to be returned
|
|
352
352
|
expand (array): Expand related entities
|
|
353
|
-
|
|
353
|
+
|
|
354
354
|
Returns:
|
|
355
355
|
dict[str, Any]: Retrieved collection
|
|
356
|
-
|
|
356
|
+
|
|
357
357
|
Raises:
|
|
358
358
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
359
|
-
|
|
359
|
+
|
|
360
360
|
Tags:
|
|
361
361
|
users.message, important
|
|
362
362
|
"""
|
|
@@ -393,14 +393,14 @@ class OutlookApp(APIApplication):
|
|
|
393
393
|
) -> dict[str, Any]:
|
|
394
394
|
"""
|
|
395
395
|
Fetches the `userPrincipalName` for the currently authenticated user from the `/me` endpoint. This internal helper is used by other methods to automatically obtain the user's ID for API calls when a `user_id` is not explicitly provided.
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
|
|
397
|
+
|
|
398
398
|
Returns:
|
|
399
399
|
dict[str, Any]: Current user information
|
|
400
|
-
|
|
400
|
+
|
|
401
401
|
Raises:
|
|
402
402
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
403
|
-
|
|
403
|
+
|
|
404
404
|
Tags:
|
|
405
405
|
me, important
|
|
406
406
|
"""
|
|
@@ -25,20 +25,20 @@ class PerplexityApp(APIApplication):
|
|
|
25
25
|
) -> dict[str, Any] | str:
|
|
26
26
|
"""
|
|
27
27
|
Queries the Perplexity Chat Completions API for a web-search-grounded answer. It sends the user's prompt and model parameters to the `/chat/completions` endpoint, then parses the response to return the synthesized content and a list of supporting source citations, ideal for real-time information retrieval.
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
Args:
|
|
30
30
|
query: The search query or question to ask. For example: "What are the latest developments in AI regulation?"
|
|
31
31
|
model: The Perplexity model to use.
|
|
32
32
|
temperature: Controls randomness in the model's output. Higher values make the output more random, lower values make it more deterministic. Defaults to 1.
|
|
33
33
|
system_prompt: The initial system message to guide the model's behavior.
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
Returns:
|
|
36
36
|
A dictionary containing the generated 'content' (str) and a list of 'citations' (list) from the web search.
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
Raises:
|
|
39
39
|
AuthenticationError: Raised when API authentication fails due to missing or invalid credentials.
|
|
40
40
|
HTTPError: Raised when the API request fails or returns an error status.
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
Tags:
|
|
43
43
|
search, web, research, citations, current events, important
|
|
44
44
|
"""
|