universal-mcp-applications 0.1.21__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 +80 -81
- 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 +90 -97
- 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 +193 -196
- universal_mcp/applications/zenquotes/__init__.py +2 -0
- universal_mcp/applications/zenquotes/app.py +3 -3
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.22.dist-info}/METADATA +2 -1
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.22.dist-info}/RECORD +78 -74
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.22.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
-
import resend
|
|
4
3
|
from universal_mcp.applications.application import APIApplication
|
|
5
4
|
from universal_mcp.exceptions import NotAuthorizedError, ToolError
|
|
6
5
|
from universal_mcp.integrations import Integration
|
|
7
6
|
|
|
7
|
+
import resend
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
class ResendApp(APIApplication):
|
|
10
11
|
def __init__(self, integration: Integration, **kwargs: Any) -> None:
|
|
@@ -40,19 +41,19 @@ class ResendApp(APIApplication):
|
|
|
40
41
|
) -> dict[str, Any]:
|
|
41
42
|
"""
|
|
42
43
|
Sends a single email with a specified subject and text body to a list of recipients via the Resend API. Unlike `send_batch_emails`, which processes multiple distinct emails at once, this function is designed for dispatching one individual email composition per API call.
|
|
43
|
-
|
|
44
|
+
|
|
44
45
|
Args:
|
|
45
46
|
from_email: The email address to send the email from in this format:- Ankit <ankit@agentr.dev>
|
|
46
47
|
to_emails: A list of email addresses to send the email to.
|
|
47
48
|
subject: The subject of the email.
|
|
48
49
|
text: The text content of the email.
|
|
49
|
-
|
|
50
|
+
|
|
50
51
|
Returns:
|
|
51
52
|
A dictionary containing the response from the Resend API.
|
|
52
|
-
|
|
53
|
+
|
|
53
54
|
Raises:
|
|
54
55
|
ToolError: If the email fails to send due to an API error.
|
|
55
|
-
|
|
56
|
+
|
|
56
57
|
Tags:
|
|
57
58
|
send, email, api, communication, important
|
|
58
59
|
"""
|
|
@@ -75,16 +76,16 @@ class ResendApp(APIApplication):
|
|
|
75
76
|
) -> dict[str, Any]:
|
|
76
77
|
"""
|
|
77
78
|
Sends multiple emails (1-100) in a single API request. Unlike the `send_email` function which handles a single message, this accepts a list of email objects for efficient, high-volume delivery. It validates that the batch size is within the allowed limits before making the API call.
|
|
78
|
-
|
|
79
|
+
|
|
79
80
|
Args:
|
|
80
81
|
emails: A list of dictionaries containing parameters for individual emails, such as `from`, `to`, `subject`, `html`, and `text`.
|
|
81
|
-
|
|
82
|
+
|
|
82
83
|
Returns:
|
|
83
84
|
A dictionary containing the response from the Resend API.
|
|
84
|
-
|
|
85
|
+
|
|
85
86
|
Raises:
|
|
86
87
|
ToolError: If the batch email sending fails or if the number of emails is not between 1 and 100.
|
|
87
|
-
|
|
88
|
+
|
|
88
89
|
Tags:
|
|
89
90
|
batch, send, emails, resend-api
|
|
90
91
|
"""
|
|
@@ -103,16 +104,16 @@ class ResendApp(APIApplication):
|
|
|
103
104
|
def retrieve_email_by_id(self, email_id: str) -> dict[str, Any]:
|
|
104
105
|
"""
|
|
105
106
|
Retrieves the details and status of a single email from the Resend API using its unique identifier. This function allows for looking up a specific email that has already been sent or scheduled, distinct from functions that initiate sending.
|
|
106
|
-
|
|
107
|
+
|
|
107
108
|
Args:
|
|
108
109
|
email_id: The unique identifier of the email to retrieve.
|
|
109
|
-
|
|
110
|
+
|
|
110
111
|
Returns:
|
|
111
112
|
A dictionary containing the details of the retrieved email.
|
|
112
|
-
|
|
113
|
+
|
|
113
114
|
Raises:
|
|
114
115
|
ToolError: Raised if the retrieval of the email fails due to an internal error.
|
|
115
|
-
|
|
116
|
+
|
|
116
117
|
Tags:
|
|
117
118
|
retrieve, email, management
|
|
118
119
|
"""
|
|
@@ -123,22 +124,20 @@ class ResendApp(APIApplication):
|
|
|
123
124
|
except Exception as e:
|
|
124
125
|
raise ToolError(f"Failed to retrieve email: {e}")
|
|
125
126
|
|
|
126
|
-
def reschedule_email(
|
|
127
|
-
self, email_id: str, scheduled_at: str
|
|
128
|
-
) -> dict[str, Any]:
|
|
127
|
+
def reschedule_email(self, email_id: str, scheduled_at: str) -> dict[str, Any]:
|
|
129
128
|
"""
|
|
130
129
|
Modifies the delivery time for a specific, previously scheduled email using its ID. It updates the `scheduled_at` attribute to a new ISO 8601 formatted time, effectively rescheduling its dispatch. This differs from `cancel_scheduled_email`, which permanently stops the send.
|
|
131
|
-
|
|
130
|
+
|
|
132
131
|
Args:
|
|
133
132
|
email_id: The ID of the email to update.
|
|
134
133
|
scheduled_at: The new scheduled time in ISO 8601 format.
|
|
135
|
-
|
|
134
|
+
|
|
136
135
|
Returns:
|
|
137
136
|
A dictionary containing the response from the Resend API.
|
|
138
|
-
|
|
137
|
+
|
|
139
138
|
Raises:
|
|
140
139
|
ToolError: If updating the scheduled email fails.
|
|
141
|
-
|
|
140
|
+
|
|
142
141
|
Tags:
|
|
143
142
|
update, email, async_job, management
|
|
144
143
|
"""
|
|
@@ -156,16 +155,16 @@ class ResendApp(APIApplication):
|
|
|
156
155
|
def cancel_scheduled_email(self, email_id: str) -> dict[str, Any]:
|
|
157
156
|
"""
|
|
158
157
|
Cancels a previously scheduled email using its unique ID, preventing it from being sent. This function calls the Resend API's cancellation endpoint, returning a confirmation response. It is distinct from `update_scheduled_email`, which reschedules the email instead of stopping its transmission.
|
|
159
|
-
|
|
158
|
+
|
|
160
159
|
Args:
|
|
161
160
|
email_id: The ID of the scheduled email to cancel.
|
|
162
|
-
|
|
161
|
+
|
|
163
162
|
Returns:
|
|
164
163
|
A dictionary containing the response from the Resend API.
|
|
165
|
-
|
|
164
|
+
|
|
166
165
|
Raises:
|
|
167
166
|
ToolError: If canceling the scheduled email fails.
|
|
168
|
-
|
|
167
|
+
|
|
169
168
|
Tags:
|
|
170
169
|
cancel, email, management
|
|
171
170
|
"""
|
|
@@ -179,16 +178,16 @@ class ResendApp(APIApplication):
|
|
|
179
178
|
def create_domain(self, name: str) -> dict[str, Any]:
|
|
180
179
|
"""
|
|
181
180
|
Registers a new sending domain with the Resend service using the provided name. This is a prerequisite for sending emails from your own domain and returns a dictionary containing details of the new domain object, which can then be verified and managed with other domain-related functions.
|
|
182
|
-
|
|
181
|
+
|
|
183
182
|
Args:
|
|
184
183
|
name: The name of the domain to create (e.g., 'example.com')
|
|
185
|
-
|
|
184
|
+
|
|
186
185
|
Returns:
|
|
187
186
|
A dictionary containing the created domain object and its details.
|
|
188
|
-
|
|
187
|
+
|
|
189
188
|
Raises:
|
|
190
189
|
ToolError: If the domain creation fails due to API errors or invalid input.
|
|
191
|
-
|
|
190
|
+
|
|
192
191
|
Tags:
|
|
193
192
|
create, domain, management, api, batch, important
|
|
194
193
|
"""
|
|
@@ -203,16 +202,16 @@ class ResendApp(APIApplication):
|
|
|
203
202
|
def get_domain(self, domain_id: str) -> dict[str, Any]:
|
|
204
203
|
"""
|
|
205
204
|
Retrieves the details of a specific domain from the Resend API using its unique ID. Unlike `list_domains`, which fetches all domains, this function targets a single record and returns a dictionary containing the domain's properties, like its verification status and tracking settings.
|
|
206
|
-
|
|
205
|
+
|
|
207
206
|
Args:
|
|
208
207
|
domain_id: The ID of the domain to retrieve.
|
|
209
|
-
|
|
208
|
+
|
|
210
209
|
Returns:
|
|
211
210
|
A dictionary containing the domain object.
|
|
212
|
-
|
|
211
|
+
|
|
213
212
|
Raises:
|
|
214
213
|
ToolError: Raised if the domain retrieval fails.
|
|
215
|
-
|
|
214
|
+
|
|
216
215
|
Tags:
|
|
217
216
|
retrieve, domain, management
|
|
218
217
|
"""
|
|
@@ -226,16 +225,16 @@ class ResendApp(APIApplication):
|
|
|
226
225
|
def verify_domain(self, domain_id: str) -> dict[str, Any]:
|
|
227
226
|
"""
|
|
228
227
|
Triggers the verification process for a registered domain using its unique ID. This action is crucial for authorizing the domain to send emails via Resend and returns an API response containing the verification status and necessary DNS records to complete the process.
|
|
229
|
-
|
|
228
|
+
|
|
230
229
|
Args:
|
|
231
230
|
domain_id: The ID of the domain to verify.
|
|
232
|
-
|
|
231
|
+
|
|
233
232
|
Returns:
|
|
234
233
|
A dictionary containing the response from the domain verification API.
|
|
235
|
-
|
|
234
|
+
|
|
236
235
|
Raises:
|
|
237
236
|
ToolError: If the domain verification process fails.
|
|
238
|
-
|
|
237
|
+
|
|
239
238
|
Tags:
|
|
240
239
|
verify, domain
|
|
241
240
|
"""
|
|
@@ -255,19 +254,19 @@ class ResendApp(APIApplication):
|
|
|
255
254
|
) -> dict[str, Any]:
|
|
256
255
|
"""
|
|
257
256
|
Updates settings for a specific domain identified by its ID. This function can modify configurations like open and click tracking, and TLS enforcement. It returns the updated domain object from the API, raising a ToolError if the update fails. Only the provided settings are modified.
|
|
258
|
-
|
|
257
|
+
|
|
259
258
|
Args:
|
|
260
259
|
domain_id: The ID of the domain to update.
|
|
261
260
|
open_tracking: Enable or disable open tracking.
|
|
262
261
|
click_tracking: Enable or disable click tracking.
|
|
263
262
|
tls: The TLS enforcement policy (enforced or opportunistic).
|
|
264
|
-
|
|
263
|
+
|
|
265
264
|
Returns:
|
|
266
265
|
A dictionary containing the updated domain object.
|
|
267
|
-
|
|
266
|
+
|
|
268
267
|
Raises:
|
|
269
268
|
ToolError: Raised if updating the domain fails.
|
|
270
|
-
|
|
269
|
+
|
|
271
270
|
Tags:
|
|
272
271
|
update, domain, management
|
|
273
272
|
"""
|
|
@@ -288,13 +287,13 @@ class ResendApp(APIApplication):
|
|
|
288
287
|
def list_domains(self) -> list[dict[str, Any]]:
|
|
289
288
|
"""
|
|
290
289
|
Fetches a complete list of all domains registered with the Resend account. Unlike `get_domain`, which retrieves a single domain by ID, this provides a comprehensive overview of all configured domains for management and verification tasks.
|
|
291
|
-
|
|
290
|
+
|
|
292
291
|
Returns:
|
|
293
292
|
A list of dictionaries, each representing a domain.
|
|
294
|
-
|
|
293
|
+
|
|
295
294
|
Raises:
|
|
296
295
|
ToolError: If listing the domains fails.
|
|
297
|
-
|
|
296
|
+
|
|
298
297
|
Tags:
|
|
299
298
|
list, domains, important, management
|
|
300
299
|
"""
|
|
@@ -308,16 +307,16 @@ class ResendApp(APIApplication):
|
|
|
308
307
|
def remove_domain(self, domain_id: str) -> dict[str, Any]:
|
|
309
308
|
"""
|
|
310
309
|
Permanently removes a specific domain from the Resend account using its unique ID. This function makes an authenticated API call to delete the domain, distinguishing it from retrieval (`get_domain`) or modification (`update_domain`) operations, and raises an error if the process fails.
|
|
311
|
-
|
|
310
|
+
|
|
312
311
|
Args:
|
|
313
312
|
domain_id: The unique identifier of the domain to be removed.
|
|
314
|
-
|
|
313
|
+
|
|
315
314
|
Returns:
|
|
316
315
|
A dictionary containing the response from the Resend API after attempting to remove the domain.
|
|
317
|
-
|
|
316
|
+
|
|
318
317
|
Raises:
|
|
319
318
|
ToolError: Raised if the operation to remove the domain fails, including if the API call encounters an error.
|
|
320
|
-
|
|
319
|
+
|
|
321
320
|
Tags:
|
|
322
321
|
remove, management, api, domain
|
|
323
322
|
"""
|
|
@@ -331,16 +330,16 @@ class ResendApp(APIApplication):
|
|
|
331
330
|
def create_api_key(self, name: str) -> dict[str, Any]:
|
|
332
331
|
"""
|
|
333
332
|
Creates a new API key for authenticating with the Resend service, identified by a specified name. It returns a dictionary containing the new key object, including the generated token required for subsequent API requests.
|
|
334
|
-
|
|
333
|
+
|
|
335
334
|
Args:
|
|
336
335
|
name: The name of the API key (e.g., 'Production').
|
|
337
|
-
|
|
336
|
+
|
|
338
337
|
Returns:
|
|
339
338
|
A dictionary containing the new API key object.
|
|
340
|
-
|
|
339
|
+
|
|
341
340
|
Raises:
|
|
342
341
|
ToolError: Raised if API key creation fails.
|
|
343
|
-
|
|
342
|
+
|
|
344
343
|
Tags:
|
|
345
344
|
create, api-key, authentication
|
|
346
345
|
"""
|
|
@@ -355,16 +354,16 @@ class ResendApp(APIApplication):
|
|
|
355
354
|
def list_api_keys(self) -> list[dict[str, Any]]:
|
|
356
355
|
"""
|
|
357
356
|
Retrieves a list of all API keys for the authenticated Resend account. This read-only operation allows for auditing and viewing existing credentials, contrasting with `create_api_key` and `remove_api_key` which are used to add or delete keys.
|
|
358
|
-
|
|
357
|
+
|
|
359
358
|
Args:
|
|
360
359
|
None: This function takes no arguments.
|
|
361
|
-
|
|
360
|
+
|
|
362
361
|
Returns:
|
|
363
362
|
List of dictionaries, each representing an API key with associated details.
|
|
364
|
-
|
|
363
|
+
|
|
365
364
|
Raises:
|
|
366
365
|
ToolError: If there is a failure when attempting to list the API keys, typically due to an underlying exception from the resend API.
|
|
367
|
-
|
|
366
|
+
|
|
368
367
|
Tags:
|
|
369
368
|
list, api, important
|
|
370
369
|
"""
|
|
@@ -378,16 +377,16 @@ class ResendApp(APIApplication):
|
|
|
378
377
|
def remove_api_key(self, api_key_id: str) -> dict[str, Any]:
|
|
379
378
|
"""
|
|
380
379
|
Deletes a specific Resend API key identified by its unique ID. This function, part of the key management suite alongside `create_api_key` and `list_api_keys`, returns an API confirmation response or raises a `ToolError` if the operation fails.
|
|
381
|
-
|
|
380
|
+
|
|
382
381
|
Args:
|
|
383
382
|
api_key_id: The ID of the API key to remove.
|
|
384
|
-
|
|
383
|
+
|
|
385
384
|
Returns:
|
|
386
385
|
A dictionary containing the response from the Resend API after removing the API key.
|
|
387
|
-
|
|
386
|
+
|
|
388
387
|
Raises:
|
|
389
388
|
ToolError: Raised if removing the API key fails, including any underlying errors.
|
|
390
|
-
|
|
389
|
+
|
|
391
390
|
Tags:
|
|
392
391
|
remove, api-key, management
|
|
393
392
|
"""
|
|
@@ -407,19 +406,19 @@ class ResendApp(APIApplication):
|
|
|
407
406
|
) -> dict[str, Any]:
|
|
408
407
|
"""
|
|
409
408
|
Registers a new email broadcast campaign for a specific audience using the Resend API. This function creates the broadcast object but does not send it; use the `send_broadcast` function to dispatch the created campaign to the audience.
|
|
410
|
-
|
|
409
|
+
|
|
411
410
|
Args:
|
|
412
411
|
audience_id: The ID of the audience to send the broadcast to.
|
|
413
412
|
from_email: The sender's email address.
|
|
414
413
|
subject: The subject line of the broadcast.
|
|
415
414
|
html: The HTML content of the broadcast. Use {{{...}}} for merge tags.
|
|
416
|
-
|
|
415
|
+
|
|
417
416
|
Returns:
|
|
418
417
|
A dictionary containing the created broadcast object.
|
|
419
|
-
|
|
418
|
+
|
|
420
419
|
Raises:
|
|
421
420
|
ToolError: Raised if creating the broadcast fails due to an underlying exception.
|
|
422
|
-
|
|
421
|
+
|
|
423
422
|
Tags:
|
|
424
423
|
broadcast, email, important
|
|
425
424
|
"""
|
|
@@ -439,16 +438,16 @@ class ResendApp(APIApplication):
|
|
|
439
438
|
def get_broadcast(self, broadcast_id: str) -> dict[str, Any]:
|
|
440
439
|
"""
|
|
441
440
|
Retrieves a specific broadcast's complete details, including its status and content, by its unique ID. Unlike `list_broadcasts` which retrieves all broadcasts, this function targets a single entry for inspection.
|
|
442
|
-
|
|
441
|
+
|
|
443
442
|
Args:
|
|
444
443
|
broadcast_id: The ID of the broadcast to retrieve.
|
|
445
|
-
|
|
444
|
+
|
|
446
445
|
Returns:
|
|
447
446
|
A dictionary containing the broadcast object.
|
|
448
|
-
|
|
447
|
+
|
|
449
448
|
Raises:
|
|
450
449
|
ToolError: Raised if retrieving the broadcast fails.
|
|
451
|
-
|
|
450
|
+
|
|
452
451
|
Tags:
|
|
453
452
|
retrieve, broadcast
|
|
454
453
|
"""
|
|
@@ -467,18 +466,18 @@ class ResendApp(APIApplication):
|
|
|
467
466
|
) -> dict[str, Any]:
|
|
468
467
|
"""
|
|
469
468
|
Updates the HTML content and/or subject of an existing broadcast, identified by its ID. Requires that at least one modifiable field (html or subject) is provided. This function alters a broadcast's content, differing from `send_broadcast` which triggers its delivery.
|
|
470
|
-
|
|
469
|
+
|
|
471
470
|
Args:
|
|
472
471
|
broadcast_id: The ID of the broadcast to update.
|
|
473
472
|
html: The new HTML content for the broadcast.
|
|
474
473
|
subject: The new subject line for the broadcast.
|
|
475
|
-
|
|
474
|
+
|
|
476
475
|
Returns:
|
|
477
476
|
A dictionary containing the updated broadcast object.
|
|
478
|
-
|
|
477
|
+
|
|
479
478
|
Raises:
|
|
480
479
|
ToolError: Raised if updating the broadcast fails or no update fields are provided.
|
|
481
|
-
|
|
480
|
+
|
|
482
481
|
Tags:
|
|
483
482
|
update, management, broadcast, api
|
|
484
483
|
"""
|
|
@@ -503,17 +502,17 @@ class ResendApp(APIApplication):
|
|
|
503
502
|
) -> dict[str, Any]:
|
|
504
503
|
"""
|
|
505
504
|
Initiates the delivery of a pre-existing broadcast, identified by its ID, to its target audience. The broadcast can be sent immediately or scheduled for a future time via the optional `scheduled_at` parameter. It returns the API response upon execution.
|
|
506
|
-
|
|
505
|
+
|
|
507
506
|
Args:
|
|
508
507
|
broadcast_id: The ID of the broadcast to send.
|
|
509
508
|
scheduled_at: The time to send the broadcast, e.g., 'in 1 min' or an ISO 8601 datetime.
|
|
510
|
-
|
|
509
|
+
|
|
511
510
|
Returns:
|
|
512
511
|
A dictionary containing the response from the Resend API.
|
|
513
|
-
|
|
512
|
+
|
|
514
513
|
Raises:
|
|
515
514
|
ToolError: If sending the broadcast fails.
|
|
516
|
-
|
|
515
|
+
|
|
517
516
|
Tags:
|
|
518
517
|
broadcast, send, api, management
|
|
519
518
|
"""
|
|
@@ -530,16 +529,16 @@ class ResendApp(APIApplication):
|
|
|
530
529
|
def remove_draft_broadcast(self, broadcast_id: str) -> dict[str, Any]:
|
|
531
530
|
"""
|
|
532
531
|
Deletes a broadcast from the Resend service using its unique ID. This action is restricted to broadcasts that have a 'draft' status and have not been sent, returning the API's response upon successful removal or raising an error if the operation fails.
|
|
533
|
-
|
|
532
|
+
|
|
534
533
|
Args:
|
|
535
534
|
broadcast_id: The ID of the broadcast to remove.
|
|
536
|
-
|
|
535
|
+
|
|
537
536
|
Returns:
|
|
538
537
|
A dictionary containing the response from the Resend API.
|
|
539
|
-
|
|
538
|
+
|
|
540
539
|
Raises:
|
|
541
540
|
ToolError: If removing the broadcast fails.
|
|
542
|
-
|
|
541
|
+
|
|
543
542
|
Tags:
|
|
544
543
|
remove, broadcast, api-management, draft-status
|
|
545
544
|
"""
|
|
@@ -553,13 +552,13 @@ class ResendApp(APIApplication):
|
|
|
553
552
|
def list_broadcasts(self) -> list[dict[str, Any]]:
|
|
554
553
|
"""
|
|
555
554
|
Retrieves a list of all broadcasts associated with the authenticated account. Unlike `get_broadcast` which fetches a single item by ID, this function returns a list of dictionaries, each containing the attributes of a specific broadcast. Raises a `ToolError` on API failure.
|
|
556
|
-
|
|
555
|
+
|
|
557
556
|
Returns:
|
|
558
557
|
A list of dictionaries, each representing a broadcast with its attributes.
|
|
559
|
-
|
|
558
|
+
|
|
560
559
|
Raises:
|
|
561
560
|
ToolError: If listing broadcasts fails due to a connection, API, or other retrieval error.
|
|
562
|
-
|
|
561
|
+
|
|
563
562
|
Tags:
|
|
564
563
|
list, broadcast, api, management, important
|
|
565
564
|
"""
|
|
@@ -573,16 +572,16 @@ class ResendApp(APIApplication):
|
|
|
573
572
|
def create_audience(self, name: str) -> dict[str, Any]:
|
|
574
573
|
"""
|
|
575
574
|
Creates a new audience, a named list for contacts, within the Resend service. This function requires a name for the audience and returns a dictionary representing the newly created object, enabling subsequent management of contacts within that specific list.
|
|
576
|
-
|
|
575
|
+
|
|
577
576
|
Args:
|
|
578
577
|
name: The name of the audience (e.g., "Registered Users").
|
|
579
|
-
|
|
578
|
+
|
|
580
579
|
Returns:
|
|
581
580
|
A dictionary containing the created audience object.
|
|
582
|
-
|
|
581
|
+
|
|
583
582
|
Raises:
|
|
584
583
|
ToolError: If creating the audience fails due to an underlying error.
|
|
585
|
-
|
|
584
|
+
|
|
586
585
|
Tags:
|
|
587
586
|
create, audience, management, important
|
|
588
587
|
"""
|
|
@@ -597,16 +596,16 @@ class ResendApp(APIApplication):
|
|
|
597
596
|
def get_audience(self, audience_id: str) -> dict[str, Any]:
|
|
598
597
|
"""
|
|
599
598
|
Retrieves the details of a single audience using its unique ID. This provides a targeted lookup for one audience, distinct from `list_audiences` which fetches all available audiences in the account.
|
|
600
|
-
|
|
599
|
+
|
|
601
600
|
Args:
|
|
602
601
|
audience_id: The unique identifier of the audience to retrieve.
|
|
603
|
-
|
|
602
|
+
|
|
604
603
|
Returns:
|
|
605
604
|
A dictionary containing all data for the requested audience object.
|
|
606
|
-
|
|
605
|
+
|
|
607
606
|
Raises:
|
|
608
607
|
ToolError: If retrieving the audience from the API fails, with a message describing the error.
|
|
609
|
-
|
|
608
|
+
|
|
610
609
|
Tags:
|
|
611
610
|
fetch, audience, management, api
|
|
612
611
|
"""
|
|
@@ -620,16 +619,16 @@ class ResendApp(APIApplication):
|
|
|
620
619
|
def remove_audience(self, audience_id: str) -> dict[str, Any]:
|
|
621
620
|
"""
|
|
622
621
|
Deletes a specific audience from the Resend service using its unique identifier. This function wraps the Resend API's remove operation, returning the API's response. Unlike `remove_contact`, which targets individuals, this function removes the entire contact list defined by the audience ID.
|
|
623
|
-
|
|
622
|
+
|
|
624
623
|
Args:
|
|
625
624
|
audience_id: The unique identifier of the audience to remove.
|
|
626
|
-
|
|
625
|
+
|
|
627
626
|
Returns:
|
|
628
627
|
A dictionary containing the response from the Resend API.
|
|
629
|
-
|
|
628
|
+
|
|
630
629
|
Raises:
|
|
631
630
|
ToolError: Raised if removing the audience fails due to API error or other issues.
|
|
632
|
-
|
|
631
|
+
|
|
633
632
|
Tags:
|
|
634
633
|
remove, audience, management, api
|
|
635
634
|
"""
|
|
@@ -643,13 +642,13 @@ class ResendApp(APIApplication):
|
|
|
643
642
|
def list_audiences(self) -> list[dict[str, Any]]:
|
|
644
643
|
"""
|
|
645
644
|
Retrieves a complete list of all audiences from the Resend account. It returns a list of dictionaries, with each containing the details of a specific audience. This function is distinct from `get_audience`, which fetches a single audience by its ID.
|
|
646
|
-
|
|
645
|
+
|
|
647
646
|
Returns:
|
|
648
647
|
A list of dictionaries, each representing an audience.
|
|
649
|
-
|
|
648
|
+
|
|
650
649
|
Raises:
|
|
651
650
|
ToolError: Raised if listing the audiences fails due to an internal error.
|
|
652
|
-
|
|
651
|
+
|
|
653
652
|
Tags:
|
|
654
653
|
list, audiences, management, important
|
|
655
654
|
"""
|
|
@@ -670,20 +669,20 @@ class ResendApp(APIApplication):
|
|
|
670
669
|
) -> dict[str, Any]:
|
|
671
670
|
"""
|
|
672
671
|
Creates a new contact with a given email, optional name, and subscription status, adding it to a specific audience. This function populates audience lists, differing from `update_contact` which modifies existing entries, and requires a valid `audience_id` to function.
|
|
673
|
-
|
|
672
|
+
|
|
674
673
|
Args:
|
|
675
674
|
audience_id: The ID of the audience to add the contact to.
|
|
676
675
|
email: The email address of the contact.
|
|
677
676
|
first_name: The contact's first name.
|
|
678
677
|
last_name: The contact's last name.
|
|
679
678
|
unsubscribed: The contact's subscription status.
|
|
680
|
-
|
|
679
|
+
|
|
681
680
|
Returns:
|
|
682
681
|
A dictionary containing the created contact's ID.
|
|
683
|
-
|
|
682
|
+
|
|
684
683
|
Raises:
|
|
685
684
|
ToolError: Raised if creating the contact fails.
|
|
686
|
-
|
|
685
|
+
|
|
687
686
|
Tags:
|
|
688
687
|
create, contact, management, important
|
|
689
688
|
"""
|
|
@@ -708,18 +707,18 @@ class ResendApp(APIApplication):
|
|
|
708
707
|
) -> dict[str, Any]:
|
|
709
708
|
"""
|
|
710
709
|
Fetches a single contact's details from a specified audience by its unique ID or email address. The function requires exactly one identifier for the lookup, raising an error if the identifier is missing, ambiguous, or if the API call fails.
|
|
711
|
-
|
|
710
|
+
|
|
712
711
|
Args:
|
|
713
712
|
audience_id: The ID of the audience in which to search for the contact.
|
|
714
713
|
contact_id: The unique ID of the contact, if available. Exactly one of 'contact_id' or 'email' must be provided.
|
|
715
714
|
email: The email address of the contact, if available. Exactly one of 'contact_id' or 'email' must be provided.
|
|
716
|
-
|
|
715
|
+
|
|
717
716
|
Returns:
|
|
718
717
|
A dictionary containing the retrieved contact object, with details such as ID, email, and other contact attributes.
|
|
719
|
-
|
|
718
|
+
|
|
720
719
|
Raises:
|
|
721
720
|
ToolError: Raised if neither 'contact_id' nor 'email' is provided, if both are provided (ambiguous identifier), or if retrieval from the API fails.
|
|
722
|
-
|
|
721
|
+
|
|
723
722
|
Tags:
|
|
724
723
|
retrieve, contact, audience, management, api
|
|
725
724
|
"""
|
|
@@ -748,7 +747,7 @@ class ResendApp(APIApplication):
|
|
|
748
747
|
) -> dict[str, Any]:
|
|
749
748
|
"""
|
|
750
749
|
Updates an existing contact's details (e.g., name, subscription status) within a specific audience. The contact is identified by its unique ID or email address. This function validates inputs and returns the Resend API response, raising a ToolError on failure or if arguments are invalid.
|
|
751
|
-
|
|
750
|
+
|
|
752
751
|
Args:
|
|
753
752
|
audience_id: The ID of the audience containing the contact.
|
|
754
753
|
contact_id: The ID of the contact to update.
|
|
@@ -756,13 +755,13 @@ class ResendApp(APIApplication):
|
|
|
756
755
|
first_name: The new first name for the contact.
|
|
757
756
|
last_name: The new last name for the contact.
|
|
758
757
|
unsubscribed: The new subscription status for the contact.
|
|
759
|
-
|
|
758
|
+
|
|
760
759
|
Returns:
|
|
761
760
|
A dictionary containing the response from the Resend API.
|
|
762
|
-
|
|
761
|
+
|
|
763
762
|
Raises:
|
|
764
763
|
ToolError: Raised if the update fails, if an identifier is missing, or if no update fields are provided.
|
|
765
|
-
|
|
764
|
+
|
|
766
765
|
Tags:
|
|
767
766
|
update, contact, management
|
|
768
767
|
"""
|
|
@@ -797,18 +796,18 @@ class ResendApp(APIApplication):
|
|
|
797
796
|
) -> dict[str, Any]:
|
|
798
797
|
"""
|
|
799
798
|
Removes a contact from a specified audience. The contact must be identified by either its unique ID or email address, but not both. Raises an error if the identifier is missing, ambiguous, or if the API call to the Resend service fails.
|
|
800
|
-
|
|
799
|
+
|
|
801
800
|
Args:
|
|
802
801
|
audience_id: The ID of the audience.
|
|
803
802
|
contact_id: The ID of the contact to remove.
|
|
804
803
|
email: The email of the contact to remove.
|
|
805
|
-
|
|
804
|
+
|
|
806
805
|
Returns:
|
|
807
806
|
A dictionary containing the response from the Resend API.
|
|
808
|
-
|
|
807
|
+
|
|
809
808
|
Raises:
|
|
810
809
|
ToolError: If contact removal fails, or if the contact identifier is missing or ambiguous.
|
|
811
|
-
|
|
810
|
+
|
|
812
811
|
Tags:
|
|
813
812
|
remove, contact-management, api-call
|
|
814
813
|
"""
|
|
@@ -829,16 +828,16 @@ class ResendApp(APIApplication):
|
|
|
829
828
|
def list_contacts(self, audience_id: str) -> list[dict[str, Any]]:
|
|
830
829
|
"""
|
|
831
830
|
Retrieves a complete list of contacts belonging to a specific audience, identified by its unique ID. This function returns all contacts within the audience, unlike `get_contact` which retrieves only a single contact by its ID or email.
|
|
832
|
-
|
|
831
|
+
|
|
833
832
|
Args:
|
|
834
833
|
audience_id: The ID of the audience whose contacts you want to list.
|
|
835
|
-
|
|
834
|
+
|
|
836
835
|
Returns:
|
|
837
836
|
A list of dictionaries, each representing a contact in the audience.
|
|
838
|
-
|
|
837
|
+
|
|
839
838
|
Raises:
|
|
840
839
|
ToolError: Raised if listing the contacts fails.
|
|
841
|
-
|
|
840
|
+
|
|
842
841
|
Tags:
|
|
843
842
|
list, contacts, management, important
|
|
844
843
|
"""
|
|
@@ -1 +1 @@
|
|
|
1
|
-
from .app import ScraperApp
|
|
1
|
+
from .app import ScraperApp
|