@bubblelab/bubble-core 0.1.0
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.
- package/LICENSE.txt +202 -0
- package/dist/bubble-bundle.d.ts +2021 -0
- package/dist/bubble-factory.d.ts +161 -0
- package/dist/bubble-factory.d.ts.map +1 -0
- package/dist/bubble-factory.js +426 -0
- package/dist/bubble-factory.js.map +1 -0
- package/dist/bubble-flow/bubble-flow-class.d.ts +19 -0
- package/dist/bubble-flow/bubble-flow-class.d.ts.map +1 -0
- package/dist/bubble-flow/bubble-flow-class.js +23 -0
- package/dist/bubble-flow/bubble-flow-class.js.map +1 -0
- package/dist/bubble-flow/sample/data-analyst-flow.d.ts +15 -0
- package/dist/bubble-flow/sample/data-analyst-flow.d.ts.map +1 -0
- package/dist/bubble-flow/sample/data-analyst-flow.js +63 -0
- package/dist/bubble-flow/sample/data-analyst-flow.js.map +1 -0
- package/dist/bubble-flow/sample/error-ts.d.ts +23 -0
- package/dist/bubble-flow/sample/error-ts.d.ts.map +1 -0
- package/dist/bubble-flow/sample/error-ts.js +31 -0
- package/dist/bubble-flow/sample/error-ts.js.map +1 -0
- package/dist/bubble-flow/sample/sanitytest.d.ts +10 -0
- package/dist/bubble-flow/sample/sanitytest.d.ts.map +1 -0
- package/dist/bubble-flow/sample/sanitytest.js +13 -0
- package/dist/bubble-flow/sample/sanitytest.js.map +1 -0
- package/dist/bubble-flow/sample/simple-webhook-2.d.ts +19 -0
- package/dist/bubble-flow/sample/simple-webhook-2.d.ts.map +1 -0
- package/dist/bubble-flow/sample/simple-webhook-2.js +23 -0
- package/dist/bubble-flow/sample/simple-webhook-2.js.map +1 -0
- package/dist/bubble-flow/sample/simple-webhook.d.ts +10 -0
- package/dist/bubble-flow/sample/simple-webhook.d.ts.map +1 -0
- package/dist/bubble-flow/sample/simple-webhook.js +18 -0
- package/dist/bubble-flow/sample/simple-webhook.js.map +1 -0
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts +29 -0
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.d.ts.map +1 -0
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.js +150 -0
- package/dist/bubble-flow/sample/simplified-data-analysis.flow.js.map +1 -0
- package/dist/bubble-flow/sample/slack-v0.1.d.ts +10 -0
- package/dist/bubble-flow/sample/slack-v0.1.d.ts.map +1 -0
- package/dist/bubble-flow/sample/slack-v0.1.js +59 -0
- package/dist/bubble-flow/sample/slack-v0.1.js.map +1 -0
- package/dist/bubble-flow/sample/slackagenttest.d.ts +10 -0
- package/dist/bubble-flow/sample/slackagenttest.d.ts.map +1 -0
- package/dist/bubble-flow/sample/slackagenttest.js +59 -0
- package/dist/bubble-flow/sample/slackagenttest.js.map +1 -0
- package/dist/bubble-trigger/index.d.ts +2 -0
- package/dist/bubble-trigger/index.d.ts.map +1 -0
- package/dist/bubble-trigger/index.js +2 -0
- package/dist/bubble-trigger/index.js.map +1 -0
- package/dist/bubble-trigger/types.d.ts +87 -0
- package/dist/bubble-trigger/types.d.ts.map +1 -0
- package/dist/bubble-trigger/types.js +14 -0
- package/dist/bubble-trigger/types.js.map +1 -0
- package/dist/bubbles/service-bubble/ai-agent.d.ts +428 -0
- package/dist/bubbles/service-bubble/ai-agent.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/ai-agent.js +881 -0
- package/dist/bubbles/service-bubble/ai-agent.js.map +1 -0
- package/dist/bubbles/service-bubble/gmail.d.ts +3073 -0
- package/dist/bubbles/service-bubble/gmail.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/gmail.js +908 -0
- package/dist/bubbles/service-bubble/gmail.js.map +1 -0
- package/dist/bubbles/service-bubble/google-calendar.d.ts +3377 -0
- package/dist/bubbles/service-bubble/google-calendar.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-calendar.js +527 -0
- package/dist/bubbles/service-bubble/google-calendar.js.map +1 -0
- package/dist/bubbles/service-bubble/google-drive.d.ts +1152 -0
- package/dist/bubbles/service-bubble/google-drive.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-drive.js +943 -0
- package/dist/bubbles/service-bubble/google-drive.js.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets.d.ts +1811 -0
- package/dist/bubbles/service-bubble/google-sheets.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/google-sheets.js +904 -0
- package/dist/bubbles/service-bubble/google-sheets.js.map +1 -0
- package/dist/bubbles/service-bubble/hello-world.d.ts +74 -0
- package/dist/bubbles/service-bubble/hello-world.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/hello-world.js +67 -0
- package/dist/bubbles/service-bubble/hello-world.js.map +1 -0
- package/dist/bubbles/service-bubble/http.d.ts +134 -0
- package/dist/bubbles/service-bubble/http.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/http.js +184 -0
- package/dist/bubbles/service-bubble/http.js.map +1 -0
- package/dist/bubbles/service-bubble/postgresql.d.ts +180 -0
- package/dist/bubbles/service-bubble/postgresql.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/postgresql.js +448 -0
- package/dist/bubbles/service-bubble/postgresql.js.map +1 -0
- package/dist/bubbles/service-bubble/resend.d.ts +301 -0
- package/dist/bubbles/service-bubble/resend.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/resend.js +253 -0
- package/dist/bubbles/service-bubble/resend.js.map +1 -0
- package/dist/bubbles/service-bubble/slack.d.ts +5869 -0
- package/dist/bubbles/service-bubble/slack.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/slack.js +1536 -0
- package/dist/bubbles/service-bubble/slack.js.map +1 -0
- package/dist/bubbles/service-bubble/storage.d.ts +571 -0
- package/dist/bubbles/service-bubble/storage.d.ts.map +1 -0
- package/dist/bubbles/service-bubble/storage.js +504 -0
- package/dist/bubbles/service-bubble/storage.js.map +1 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts +308 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js +285 -0
- package/dist/bubbles/tool-bubble/bubbleflow-validation-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/chart-js-tool.d.ts +416 -0
- package/dist/bubbles/tool-bubble/chart-js-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/chart-js-tool.js +570 -0
- package/dist/bubbles/tool-bubble/chart-js-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts +99 -0
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.js +645 -0
- package/dist/bubbles/tool-bubble/get-bubble-details-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts +112 -0
- package/dist/bubbles/tool-bubble/list-bubbles-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/list-bubbles-tool.js +82 -0
- package/dist/bubbles/tool-bubble/list-bubbles-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts +413 -0
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.js +327 -0
- package/dist/bubbles/tool-bubble/reddit-scrape-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts +122 -0
- package/dist/bubbles/tool-bubble/research-agent-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/research-agent-tool.js +343 -0
- package/dist/bubbles/tool-bubble/research-agent-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts +131 -0
- package/dist/bubbles/tool-bubble/sql-query-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/sql-query-tool.js +147 -0
- package/dist/bubbles/tool-bubble/sql-query-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/tool-template.d.ts +257 -0
- package/dist/bubbles/tool-bubble/tool-template.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/tool-template.js +238 -0
- package/dist/bubbles/tool-bubble/tool-template.js.map +1 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor-example.d.ts +8 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor-example.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor-example.js +65 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor-example.js.map +1 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor.tool.d.ts +125 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor.tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor.tool.js +169 -0
- package/dist/bubbles/tool-bubble/virtual-file-editor.tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts +218 -0
- package/dist/bubbles/tool-bubble/web-crawl-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/web-crawl-tool.js +255 -0
- package/dist/bubbles/tool-bubble/web-crawl-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts +134 -0
- package/dist/bubbles/tool-bubble/web-extract-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/web-extract-tool.js +175 -0
- package/dist/bubbles/tool-bubble/web-extract-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts +228 -0
- package/dist/bubbles/tool-bubble/web-scrape-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/web-scrape-tool.js +214 -0
- package/dist/bubbles/tool-bubble/web-scrape-tool.js.map +1 -0
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts +134 -0
- package/dist/bubbles/tool-bubble/web-search-tool.d.ts.map +1 -0
- package/dist/bubbles/tool-bubble/web-search-tool.js +155 -0
- package/dist/bubbles/tool-bubble/web-search-tool.js.map +1 -0
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts +114 -0
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js +777 -0
- package/dist/bubbles/workflow-bubble/bubbleflow-generator.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.d.ts +97 -0
- package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.js +327 -0
- package/dist/bubbles/workflow-bubble/bubblscript-generateor.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts +303 -0
- package/dist/bubbles/workflow-bubble/database-analyzer.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/database-analyzer.workflow.js +297 -0
- package/dist/bubbles/workflow-bubble/database-analyzer.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.d.ts +157 -0
- package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.js +310 -0
- package/dist/bubbles/workflow-bubble/file-editor-agent.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts +543 -0
- package/dist/bubbles/workflow-bubble/generate-document.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/generate-document.workflow.js +628 -0
- package/dist/bubbles/workflow-bubble/generate-document.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts +679 -0
- package/dist/bubbles/workflow-bubble/parse-document.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/parse-document.workflow.js +604 -0
- package/dist/bubbles/workflow-bubble/parse-document.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts +1011 -0
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js +841 -0
- package/dist/bubbles/workflow-bubble/pdf-form-operations.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts +883 -0
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js +781 -0
- package/dist/bubbles/workflow-bubble/pdf-ocr.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts +300 -0
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js +508 -0
- package/dist/bubbles/workflow-bubble/slack-data-assistant.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts +731 -0
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.js +690 -0
- package/dist/bubbles/workflow-bubble/slack-formatter-agent.js.map +1 -0
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts +401 -0
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js +382 -0
- package/dist/bubbles/workflow-bubble/slack-notifier.workflow.js.map +1 -0
- package/dist/bubbles/workflow-bubble/workflow-template.d.ts +144 -0
- package/dist/bubbles/workflow-bubble/workflow-template.d.ts.map +1 -0
- package/dist/bubbles/workflow-bubble/workflow-template.js +124 -0
- package/dist/bubbles/workflow-bubble/workflow-template.js.map +1 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/BubbleLogger.d.ts +146 -0
- package/dist/logging/BubbleLogger.d.ts.map +1 -0
- package/dist/logging/BubbleLogger.js +472 -0
- package/dist/logging/BubbleLogger.js.map +1 -0
- package/dist/logging/StreamingBubbleLogger.d.ts +85 -0
- package/dist/logging/StreamingBubbleLogger.d.ts.map +1 -0
- package/dist/logging/StreamingBubbleLogger.js +340 -0
- package/dist/logging/StreamingBubbleLogger.js.map +1 -0
- package/dist/types/ai-models.d.ts +4 -0
- package/dist/types/ai-models.d.ts.map +1 -0
- package/dist/types/ai-models.js +14 -0
- package/dist/types/ai-models.js.map +1 -0
- package/dist/types/available-tools.d.ts +4 -0
- package/dist/types/available-tools.d.ts.map +1 -0
- package/dist/types/available-tools.js +19 -0
- package/dist/types/available-tools.js.map +1 -0
- package/dist/types/base-bubble-class.d.ts +47 -0
- package/dist/types/base-bubble-class.d.ts.map +1 -0
- package/dist/types/base-bubble-class.js +212 -0
- package/dist/types/base-bubble-class.js.map +1 -0
- package/dist/types/bubble-errors.d.ts +44 -0
- package/dist/types/bubble-errors.d.ts.map +1 -0
- package/dist/types/bubble-errors.js +51 -0
- package/dist/types/bubble-errors.js.map +1 -0
- package/dist/types/bubble.d.ts +73 -0
- package/dist/types/bubble.d.ts.map +1 -0
- package/dist/types/bubble.js +2 -0
- package/dist/types/bubble.js.map +1 -0
- package/dist/types/credentials.d.ts +6 -0
- package/dist/types/credentials.d.ts.map +1 -0
- package/dist/types/credentials.js +6 -0
- package/dist/types/credentials.js.map +1 -0
- package/dist/types/service-bubble-class.d.ts +31 -0
- package/dist/types/service-bubble-class.d.ts.map +1 -0
- package/dist/types/service-bubble-class.js +36 -0
- package/dist/types/service-bubble-class.js.map +1 -0
- package/dist/types/streaming-events.d.ts +18 -0
- package/dist/types/streaming-events.d.ts.map +1 -0
- package/dist/types/streaming-events.js +5 -0
- package/dist/types/streaming-events.js.map +1 -0
- package/dist/types/tool-bubble-class.d.ts +19 -0
- package/dist/types/tool-bubble-class.d.ts.map +1 -0
- package/dist/types/tool-bubble-class.js +48 -0
- package/dist/types/tool-bubble-class.js.map +1 -0
- package/dist/types/workflow-bubble-class.d.ts +25 -0
- package/dist/types/workflow-bubble-class.d.ts.map +1 -0
- package/dist/types/workflow-bubble-class.js +30 -0
- package/dist/types/workflow-bubble-class.js.map +1 -0
- package/dist/utils/bubbleflow-parser.d.ts +32 -0
- package/dist/utils/bubbleflow-parser.d.ts.map +1 -0
- package/dist/utils/bubbleflow-parser.js +332 -0
- package/dist/utils/bubbleflow-parser.js.map +1 -0
- package/dist/utils/bubbleflow-validation.d.ts +9 -0
- package/dist/utils/bubbleflow-validation.d.ts.map +1 -0
- package/dist/utils/bubbleflow-validation.js +116 -0
- package/dist/utils/bubbleflow-validation.js.map +1 -0
- package/dist/utils/json-parsing.d.ts +20 -0
- package/dist/utils/json-parsing.d.ts.map +1 -0
- package/dist/utils/json-parsing.js +394 -0
- package/dist/utils/json-parsing.js.map +1 -0
- package/dist/utils/mock-data-generator.d.ts +43 -0
- package/dist/utils/mock-data-generator.d.ts.map +1 -0
- package/dist/utils/mock-data-generator.js +312 -0
- package/dist/utils/mock-data-generator.js.map +1 -0
- package/dist/utils/param-helper.d.ts +2 -0
- package/dist/utils/param-helper.d.ts.map +1 -0
- package/dist/utils/param-helper.js +5 -0
- package/dist/utils/param-helper.js.map +1 -0
- package/dist/utils/source-bubble-parser.d.ts +31 -0
- package/dist/utils/source-bubble-parser.d.ts.map +1 -0
- package/dist/utils/source-bubble-parser.js +231 -0
- package/dist/utils/source-bubble-parser.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceBubble } from '../../types/service-bubble-class.js';
|
|
3
|
+
import type { BubbleContext } from '../../types/bubble.js';
|
|
4
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
5
|
+
declare const ResendParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
6
|
+
operation: z.ZodLiteral<"send_email">;
|
|
7
|
+
from: z.ZodDefault<z.ZodString>;
|
|
8
|
+
to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
9
|
+
cc: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
10
|
+
bcc: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
11
|
+
subject: z.ZodString;
|
|
12
|
+
text: z.ZodOptional<z.ZodString>;
|
|
13
|
+
html: z.ZodOptional<z.ZodString>;
|
|
14
|
+
reply_to: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
15
|
+
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
16
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
17
|
+
filename: z.ZodString;
|
|
18
|
+
content: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
|
|
19
|
+
content_type: z.ZodOptional<z.ZodString>;
|
|
20
|
+
path: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
23
|
+
filename: string;
|
|
24
|
+
path?: string | undefined;
|
|
25
|
+
content_type?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
28
|
+
filename: string;
|
|
29
|
+
path?: string | undefined;
|
|
30
|
+
content_type?: string | undefined;
|
|
31
|
+
}>, "many">>;
|
|
32
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
value: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
value: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}, {
|
|
39
|
+
value: string;
|
|
40
|
+
name: string;
|
|
41
|
+
}>, "many">>;
|
|
42
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
operation: "send_email";
|
|
46
|
+
from: string;
|
|
47
|
+
to: string | string[];
|
|
48
|
+
subject: string;
|
|
49
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
50
|
+
tags?: {
|
|
51
|
+
value: string;
|
|
52
|
+
name: string;
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
text?: string | undefined;
|
|
55
|
+
html?: string | undefined;
|
|
56
|
+
attachments?: {
|
|
57
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
58
|
+
filename: string;
|
|
59
|
+
path?: string | undefined;
|
|
60
|
+
content_type?: string | undefined;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
cc?: string | string[] | undefined;
|
|
63
|
+
bcc?: string | string[] | undefined;
|
|
64
|
+
reply_to?: string | string[] | undefined;
|
|
65
|
+
scheduled_at?: string | undefined;
|
|
66
|
+
headers?: Record<string, string> | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
operation: "send_email";
|
|
69
|
+
to: string | string[];
|
|
70
|
+
subject: string;
|
|
71
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
72
|
+
tags?: {
|
|
73
|
+
value: string;
|
|
74
|
+
name: string;
|
|
75
|
+
}[] | undefined;
|
|
76
|
+
text?: string | undefined;
|
|
77
|
+
html?: string | undefined;
|
|
78
|
+
attachments?: {
|
|
79
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
80
|
+
filename: string;
|
|
81
|
+
path?: string | undefined;
|
|
82
|
+
content_type?: string | undefined;
|
|
83
|
+
}[] | undefined;
|
|
84
|
+
from?: string | undefined;
|
|
85
|
+
cc?: string | string[] | undefined;
|
|
86
|
+
bcc?: string | string[] | undefined;
|
|
87
|
+
reply_to?: string | string[] | undefined;
|
|
88
|
+
scheduled_at?: string | undefined;
|
|
89
|
+
headers?: Record<string, string> | undefined;
|
|
90
|
+
}>, z.ZodObject<{
|
|
91
|
+
operation: z.ZodLiteral<"get_email_status">;
|
|
92
|
+
email_id: z.ZodString;
|
|
93
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
operation: "get_email_status";
|
|
96
|
+
email_id: string;
|
|
97
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
operation: "get_email_status";
|
|
100
|
+
email_id: string;
|
|
101
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
102
|
+
}>]>;
|
|
103
|
+
declare const ResendResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
104
|
+
operation: z.ZodLiteral<"send_email">;
|
|
105
|
+
success: z.ZodBoolean;
|
|
106
|
+
email_id: z.ZodOptional<z.ZodString>;
|
|
107
|
+
error: z.ZodString;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
success: boolean;
|
|
110
|
+
error: string;
|
|
111
|
+
operation: "send_email";
|
|
112
|
+
email_id?: string | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
success: boolean;
|
|
115
|
+
error: string;
|
|
116
|
+
operation: "send_email";
|
|
117
|
+
email_id?: string | undefined;
|
|
118
|
+
}>, z.ZodObject<{
|
|
119
|
+
operation: z.ZodLiteral<"get_email_status">;
|
|
120
|
+
success: z.ZodBoolean;
|
|
121
|
+
status: z.ZodOptional<z.ZodString>;
|
|
122
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
123
|
+
last_event: z.ZodOptional<z.ZodString>;
|
|
124
|
+
error: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
success: boolean;
|
|
127
|
+
error: string;
|
|
128
|
+
operation: "get_email_status";
|
|
129
|
+
status?: string | undefined;
|
|
130
|
+
created_at?: string | undefined;
|
|
131
|
+
last_event?: string | undefined;
|
|
132
|
+
}, {
|
|
133
|
+
success: boolean;
|
|
134
|
+
error: string;
|
|
135
|
+
operation: "get_email_status";
|
|
136
|
+
status?: string | undefined;
|
|
137
|
+
created_at?: string | undefined;
|
|
138
|
+
last_event?: string | undefined;
|
|
139
|
+
}>]>;
|
|
140
|
+
type ResendResult = z.output<typeof ResendResultSchema>;
|
|
141
|
+
type ResendParams = z.input<typeof ResendParamsSchema>;
|
|
142
|
+
export type ResendOperationResult<T extends ResendParams['operation']> = Extract<ResendResult, {
|
|
143
|
+
operation: T;
|
|
144
|
+
}>;
|
|
145
|
+
export declare class ResendBubble<T extends ResendParams = ResendParams> extends ServiceBubble<T, Extract<ResendResult, {
|
|
146
|
+
operation: T['operation'];
|
|
147
|
+
}>> {
|
|
148
|
+
static readonly type: "service";
|
|
149
|
+
static readonly service = "resend";
|
|
150
|
+
static readonly authType: "apikey";
|
|
151
|
+
static readonly bubbleName = "resend";
|
|
152
|
+
static readonly schema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
153
|
+
operation: z.ZodLiteral<"send_email">;
|
|
154
|
+
from: z.ZodDefault<z.ZodString>;
|
|
155
|
+
to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
156
|
+
cc: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
157
|
+
bcc: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
158
|
+
subject: z.ZodString;
|
|
159
|
+
text: z.ZodOptional<z.ZodString>;
|
|
160
|
+
html: z.ZodOptional<z.ZodString>;
|
|
161
|
+
reply_to: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
162
|
+
scheduled_at: z.ZodOptional<z.ZodString>;
|
|
163
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
164
|
+
filename: z.ZodString;
|
|
165
|
+
content: z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>]>;
|
|
166
|
+
content_type: z.ZodOptional<z.ZodString>;
|
|
167
|
+
path: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
170
|
+
filename: string;
|
|
171
|
+
path?: string | undefined;
|
|
172
|
+
content_type?: string | undefined;
|
|
173
|
+
}, {
|
|
174
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
175
|
+
filename: string;
|
|
176
|
+
path?: string | undefined;
|
|
177
|
+
content_type?: string | undefined;
|
|
178
|
+
}>, "many">>;
|
|
179
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
value: z.ZodString;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
value: string;
|
|
184
|
+
name: string;
|
|
185
|
+
}, {
|
|
186
|
+
value: string;
|
|
187
|
+
name: string;
|
|
188
|
+
}>, "many">>;
|
|
189
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
190
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
operation: "send_email";
|
|
193
|
+
from: string;
|
|
194
|
+
to: string | string[];
|
|
195
|
+
subject: string;
|
|
196
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
197
|
+
tags?: {
|
|
198
|
+
value: string;
|
|
199
|
+
name: string;
|
|
200
|
+
}[] | undefined;
|
|
201
|
+
text?: string | undefined;
|
|
202
|
+
html?: string | undefined;
|
|
203
|
+
attachments?: {
|
|
204
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
205
|
+
filename: string;
|
|
206
|
+
path?: string | undefined;
|
|
207
|
+
content_type?: string | undefined;
|
|
208
|
+
}[] | undefined;
|
|
209
|
+
cc?: string | string[] | undefined;
|
|
210
|
+
bcc?: string | string[] | undefined;
|
|
211
|
+
reply_to?: string | string[] | undefined;
|
|
212
|
+
scheduled_at?: string | undefined;
|
|
213
|
+
headers?: Record<string, string> | undefined;
|
|
214
|
+
}, {
|
|
215
|
+
operation: "send_email";
|
|
216
|
+
to: string | string[];
|
|
217
|
+
subject: string;
|
|
218
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
219
|
+
tags?: {
|
|
220
|
+
value: string;
|
|
221
|
+
name: string;
|
|
222
|
+
}[] | undefined;
|
|
223
|
+
text?: string | undefined;
|
|
224
|
+
html?: string | undefined;
|
|
225
|
+
attachments?: {
|
|
226
|
+
content: string | Buffer<ArrayBufferLike>;
|
|
227
|
+
filename: string;
|
|
228
|
+
path?: string | undefined;
|
|
229
|
+
content_type?: string | undefined;
|
|
230
|
+
}[] | undefined;
|
|
231
|
+
from?: string | undefined;
|
|
232
|
+
cc?: string | string[] | undefined;
|
|
233
|
+
bcc?: string | string[] | undefined;
|
|
234
|
+
reply_to?: string | string[] | undefined;
|
|
235
|
+
scheduled_at?: string | undefined;
|
|
236
|
+
headers?: Record<string, string> | undefined;
|
|
237
|
+
}>, z.ZodObject<{
|
|
238
|
+
operation: z.ZodLiteral<"get_email_status">;
|
|
239
|
+
email_id: z.ZodString;
|
|
240
|
+
credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
|
|
241
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
operation: "get_email_status";
|
|
243
|
+
email_id: string;
|
|
244
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
operation: "get_email_status";
|
|
247
|
+
email_id: string;
|
|
248
|
+
credentials?: Partial<Record<CredentialType, string>> | undefined;
|
|
249
|
+
}>]>;
|
|
250
|
+
static readonly resultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
|
|
251
|
+
operation: z.ZodLiteral<"send_email">;
|
|
252
|
+
success: z.ZodBoolean;
|
|
253
|
+
email_id: z.ZodOptional<z.ZodString>;
|
|
254
|
+
error: z.ZodString;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
success: boolean;
|
|
257
|
+
error: string;
|
|
258
|
+
operation: "send_email";
|
|
259
|
+
email_id?: string | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
success: boolean;
|
|
262
|
+
error: string;
|
|
263
|
+
operation: "send_email";
|
|
264
|
+
email_id?: string | undefined;
|
|
265
|
+
}>, z.ZodObject<{
|
|
266
|
+
operation: z.ZodLiteral<"get_email_status">;
|
|
267
|
+
success: z.ZodBoolean;
|
|
268
|
+
status: z.ZodOptional<z.ZodString>;
|
|
269
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
270
|
+
last_event: z.ZodOptional<z.ZodString>;
|
|
271
|
+
error: z.ZodString;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
success: boolean;
|
|
274
|
+
error: string;
|
|
275
|
+
operation: "get_email_status";
|
|
276
|
+
status?: string | undefined;
|
|
277
|
+
created_at?: string | undefined;
|
|
278
|
+
last_event?: string | undefined;
|
|
279
|
+
}, {
|
|
280
|
+
success: boolean;
|
|
281
|
+
error: string;
|
|
282
|
+
operation: "get_email_status";
|
|
283
|
+
status?: string | undefined;
|
|
284
|
+
created_at?: string | undefined;
|
|
285
|
+
last_event?: string | undefined;
|
|
286
|
+
}>]>;
|
|
287
|
+
static readonly shortDescription = "Email sending service via Resend API";
|
|
288
|
+
static readonly longDescription = "\n Resend email service integration for sending transactional emails.\n Use cases:\n - Send transactional emails with HTML and text content\n - Track email delivery status and metrics\n - Manage email attachments and custom headers\n \n Security Features:\n - API key-based authentication\n - Email address validation\n - Content sanitization\n - Rate limiting awareness\n ";
|
|
289
|
+
static readonly alias = "resend";
|
|
290
|
+
private resend;
|
|
291
|
+
constructor(params?: T, context?: BubbleContext);
|
|
292
|
+
testCredential(): Promise<boolean>;
|
|
293
|
+
protected performAction(context?: BubbleContext): Promise<Extract<ResendResult, {
|
|
294
|
+
operation: T['operation'];
|
|
295
|
+
}>>;
|
|
296
|
+
private sendEmail;
|
|
297
|
+
private getEmailStatus;
|
|
298
|
+
protected chooseCredential(): string | undefined;
|
|
299
|
+
}
|
|
300
|
+
export {};
|
|
301
|
+
//# sourceMappingURL=resend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend.d.ts","sourceRoot":"","sources":["../../../src/bubbles/service-bubble/resend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAoB3D,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8FtB,CAAC;AAGH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBtB,CAAC;AAEH,KAAK,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACxD,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAGvD,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,YAAY,CAAC,WAAW,CAAC,IACnE,OAAO,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAE1C,qBAAa,YAAY,CACvB,CAAC,SAAS,YAAY,GAAG,YAAY,CACrC,SAAQ,aAAa,CACrB,CAAC,EACD,OAAO,CAAC,YAAY,EAAE;IAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;CAAE,CAAC,CACrD;IACC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IAC1C,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IACnC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IAC7C,MAAM,CAAC,QAAQ,CAAC,UAAU,YAAY;IACtC,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAsB;IAC5C,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAsB;IAClD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,0CAA0C;IAC1E,MAAM,CAAC,QAAQ,CAAC,eAAe,6ZAY7B;IACF,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAY;IAEjC,OAAO,CAAC,MAAM,CAAS;gBAGrB,MAAM,GAAE,CAMF,EACN,OAAO,CAAC,EAAE,aAAa;IAQZ,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;cAU/B,aAAa,CAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE;QAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;YA4BlD,SAAS;YAuDT,cAAc;IAqB5B,SAAS,CAAC,gBAAgB,IAAI,MAAM,GAAG,SAAS;CAYjD"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ServiceBubble } from '../../types/service-bubble-class.js';
|
|
3
|
+
import { CredentialType } from '@bubblelab/shared-schemas';
|
|
4
|
+
import { Resend } from 'resend';
|
|
5
|
+
// Define email address schema
|
|
6
|
+
const EmailAddressSchema = z.string().email('Invalid email address format');
|
|
7
|
+
// Define attachment schema
|
|
8
|
+
const AttachmentSchema = z.object({
|
|
9
|
+
filename: z.string().describe('Name of the attached file'),
|
|
10
|
+
content: z
|
|
11
|
+
.union([z.string(), z.instanceof(Buffer)])
|
|
12
|
+
.describe('File content as string or Buffer'),
|
|
13
|
+
content_type: z.string().optional().describe('MIME type of the file'),
|
|
14
|
+
path: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Path where the attachment file is hosted'),
|
|
18
|
+
});
|
|
19
|
+
// Define the parameters schema for Resend operations
|
|
20
|
+
const ResendParamsSchema = z.discriminatedUnion('operation', [
|
|
21
|
+
// Send email operation
|
|
22
|
+
z.object({
|
|
23
|
+
operation: z.literal('send_email').describe('Send an email via Resend'),
|
|
24
|
+
from: z
|
|
25
|
+
.string()
|
|
26
|
+
.default('Bubble Lab Team <welcome@hello.bubblelab.ai>')
|
|
27
|
+
.describe('Sender email address (defaults to Bubble Lab Team if not provided)'),
|
|
28
|
+
to: z
|
|
29
|
+
.union([EmailAddressSchema, z.array(EmailAddressSchema)])
|
|
30
|
+
.describe('Recipient email address(es). For multiple addresses, send as an array of strings. Max 50.'),
|
|
31
|
+
cc: z
|
|
32
|
+
.union([EmailAddressSchema, z.array(EmailAddressSchema)])
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('CC email address(es). For multiple addresses, send as an array of strings.'),
|
|
35
|
+
bcc: z
|
|
36
|
+
.union([EmailAddressSchema, z.array(EmailAddressSchema)])
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('BCC email address(es). For multiple addresses, send as an array of strings.'),
|
|
39
|
+
subject: z
|
|
40
|
+
.string()
|
|
41
|
+
.min(1, 'Subject is required')
|
|
42
|
+
.describe('Email subject line'),
|
|
43
|
+
text: z.string().optional().describe('Plain text email content'),
|
|
44
|
+
html: z.string().optional().describe('HTML email content'),
|
|
45
|
+
reply_to: z
|
|
46
|
+
.union([EmailAddressSchema, z.array(EmailAddressSchema)])
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Reply-to email address(es). For multiple addresses, send as an array of strings.'),
|
|
49
|
+
scheduled_at: z
|
|
50
|
+
.string()
|
|
51
|
+
.optional()
|
|
52
|
+
.describe('Schedule email to be sent later (ISO 8601 format or natural language like "in 1 hour")'),
|
|
53
|
+
attachments: z
|
|
54
|
+
.array(AttachmentSchema)
|
|
55
|
+
.optional()
|
|
56
|
+
.describe('Array of email attachments (max 40MB total per email)'),
|
|
57
|
+
tags: z
|
|
58
|
+
.array(z.object({
|
|
59
|
+
name: z
|
|
60
|
+
.string()
|
|
61
|
+
.describe('Tag name (ASCII letters, numbers, underscores, dashes only, max 256 chars)'),
|
|
62
|
+
value: z
|
|
63
|
+
.string()
|
|
64
|
+
.describe('Tag value (ASCII letters, numbers, underscores, dashes only, max 256 chars)'),
|
|
65
|
+
}))
|
|
66
|
+
.optional()
|
|
67
|
+
.describe('Array of email tags for tracking and analytics'),
|
|
68
|
+
headers: z
|
|
69
|
+
.record(z.string())
|
|
70
|
+
.optional()
|
|
71
|
+
.describe('Custom email headers (e.g., X-Custom-Header)'),
|
|
72
|
+
credentials: z
|
|
73
|
+
.record(z.nativeEnum(CredentialType), z.string())
|
|
74
|
+
.optional()
|
|
75
|
+
.describe('Object mapping credential types to values (injected at runtime)'),
|
|
76
|
+
}),
|
|
77
|
+
// Get email status operation
|
|
78
|
+
z.object({
|
|
79
|
+
operation: z
|
|
80
|
+
.literal('get_email_status')
|
|
81
|
+
.describe('Get the status of a sent email'),
|
|
82
|
+
email_id: z
|
|
83
|
+
.string()
|
|
84
|
+
.min(1, 'Email ID is required')
|
|
85
|
+
.describe('Resend email ID to check status for'),
|
|
86
|
+
credentials: z
|
|
87
|
+
.record(z.nativeEnum(CredentialType), z.string())
|
|
88
|
+
.optional()
|
|
89
|
+
.describe('Object mapping credential types to values (injected at runtime)'),
|
|
90
|
+
}),
|
|
91
|
+
]);
|
|
92
|
+
// Define result schemas for different operations
|
|
93
|
+
const ResendResultSchema = z.discriminatedUnion('operation', [
|
|
94
|
+
z.object({
|
|
95
|
+
operation: z.literal('send_email').describe('Send an email via Resend'),
|
|
96
|
+
success: z.boolean().describe('Whether the email was sent successfully'),
|
|
97
|
+
email_id: z.string().optional().describe('Resend email ID if successful'),
|
|
98
|
+
error: z.string().describe('Error message if email sending failed'),
|
|
99
|
+
}),
|
|
100
|
+
z.object({
|
|
101
|
+
operation: z
|
|
102
|
+
.literal('get_email_status')
|
|
103
|
+
.describe('Get the status of a sent email'),
|
|
104
|
+
success: z.boolean().describe('Whether the status request was successful'),
|
|
105
|
+
status: z.string().optional().describe('Current status of the email'),
|
|
106
|
+
created_at: z
|
|
107
|
+
.string()
|
|
108
|
+
.optional()
|
|
109
|
+
.describe('Timestamp when the email was created'),
|
|
110
|
+
last_event: z
|
|
111
|
+
.string()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe('Last event that occurred with the email'),
|
|
114
|
+
error: z.string().describe('Error message if status request failed'),
|
|
115
|
+
}),
|
|
116
|
+
]);
|
|
117
|
+
export class ResendBubble extends ServiceBubble {
|
|
118
|
+
static type = 'service';
|
|
119
|
+
static service = 'resend';
|
|
120
|
+
static authType = 'apikey';
|
|
121
|
+
static bubbleName = 'resend';
|
|
122
|
+
static schema = ResendParamsSchema;
|
|
123
|
+
static resultSchema = ResendResultSchema;
|
|
124
|
+
static shortDescription = 'Email sending service via Resend API';
|
|
125
|
+
static longDescription = `
|
|
126
|
+
Resend email service integration for sending transactional emails.
|
|
127
|
+
Use cases:
|
|
128
|
+
- Send transactional emails with HTML and text content
|
|
129
|
+
- Track email delivery status and metrics
|
|
130
|
+
- Manage email attachments and custom headers
|
|
131
|
+
|
|
132
|
+
Security Features:
|
|
133
|
+
- API key-based authentication
|
|
134
|
+
- Email address validation
|
|
135
|
+
- Content sanitization
|
|
136
|
+
- Rate limiting awareness
|
|
137
|
+
`;
|
|
138
|
+
static alias = 'resend';
|
|
139
|
+
resend;
|
|
140
|
+
constructor(params = {
|
|
141
|
+
operation: 'send_email',
|
|
142
|
+
from: 'noreply@example.com',
|
|
143
|
+
to: ['user@example.com'],
|
|
144
|
+
subject: 'Test Email',
|
|
145
|
+
text: 'This is a test email.',
|
|
146
|
+
}, context) {
|
|
147
|
+
super(params, context);
|
|
148
|
+
// Initialize Resend client with API key
|
|
149
|
+
const apiKey = this.chooseCredential();
|
|
150
|
+
this.resend = new Resend(apiKey);
|
|
151
|
+
}
|
|
152
|
+
async testCredential() {
|
|
153
|
+
try {
|
|
154
|
+
// Test the API key by making a simple API call
|
|
155
|
+
await this.resend.domains.list();
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async performAction(context) {
|
|
163
|
+
void context;
|
|
164
|
+
const { operation } = this.params;
|
|
165
|
+
try {
|
|
166
|
+
const result = await (async () => {
|
|
167
|
+
switch (operation) {
|
|
168
|
+
case 'send_email':
|
|
169
|
+
return await this.sendEmail(this.params);
|
|
170
|
+
case 'get_email_status':
|
|
171
|
+
return await this.getEmailStatus(this.params);
|
|
172
|
+
default:
|
|
173
|
+
throw new Error(`Unsupported operation: ${operation}`);
|
|
174
|
+
}
|
|
175
|
+
})();
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
catch (error) {
|
|
179
|
+
return {
|
|
180
|
+
operation,
|
|
181
|
+
success: false,
|
|
182
|
+
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
async sendEmail(params) {
|
|
187
|
+
const { from, to, cc, bcc, subject, text, html, reply_to, attachments, tags, headers, scheduled_at, } = params;
|
|
188
|
+
// Validate that either text or html content is provided
|
|
189
|
+
if (!text && !html) {
|
|
190
|
+
throw new Error('Either text or html content must be provided');
|
|
191
|
+
}
|
|
192
|
+
// Build the email payload according to Resend API specification
|
|
193
|
+
const emailPayload = {
|
|
194
|
+
from: from,
|
|
195
|
+
to,
|
|
196
|
+
subject,
|
|
197
|
+
react: undefined,
|
|
198
|
+
};
|
|
199
|
+
// Add optional fields only if they exist
|
|
200
|
+
if (cc)
|
|
201
|
+
emailPayload.cc = cc;
|
|
202
|
+
if (bcc)
|
|
203
|
+
emailPayload.bcc = bcc;
|
|
204
|
+
if (text)
|
|
205
|
+
emailPayload.text = text;
|
|
206
|
+
if (html)
|
|
207
|
+
emailPayload.html = html;
|
|
208
|
+
if (reply_to)
|
|
209
|
+
emailPayload.replyTo = reply_to;
|
|
210
|
+
if (scheduled_at)
|
|
211
|
+
emailPayload.scheduledAt = scheduled_at;
|
|
212
|
+
if (attachments)
|
|
213
|
+
emailPayload.attachments = attachments;
|
|
214
|
+
if (tags)
|
|
215
|
+
emailPayload.tags = tags;
|
|
216
|
+
if (headers)
|
|
217
|
+
emailPayload.headers = headers;
|
|
218
|
+
const { data, error } = await this.resend.emails.send(emailPayload);
|
|
219
|
+
if (error) {
|
|
220
|
+
throw new Error(`Failed to send email: ${JSON.stringify(error)}`);
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
operation: 'send_email',
|
|
224
|
+
success: true,
|
|
225
|
+
email_id: data?.id,
|
|
226
|
+
error: '',
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
async getEmailStatus(params) {
|
|
230
|
+
const { email_id } = params;
|
|
231
|
+
const { data, error } = await this.resend.emails.get(email_id);
|
|
232
|
+
if (error) {
|
|
233
|
+
throw new Error(`Failed to get email status: ${error.message}`);
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
operation: 'get_email_status',
|
|
237
|
+
success: true,
|
|
238
|
+
status: data?.last_event,
|
|
239
|
+
created_at: data?.created_at,
|
|
240
|
+
last_event: data?.last_event,
|
|
241
|
+
error: '',
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
chooseCredential() {
|
|
245
|
+
const { credentials } = this.params;
|
|
246
|
+
if (!credentials || typeof credentials !== 'object') {
|
|
247
|
+
throw new Error('No resend credentials provided');
|
|
248
|
+
}
|
|
249
|
+
// Resend bubble uses RESEND_CRED credentials
|
|
250
|
+
return credentials[CredentialType.RESEND_CRED];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=resend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend.js","sourceRoot":"","sources":["../../../src/bubbles/service-bubble/resend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAA2B,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzD,8BAA8B;AAC9B,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAE5E,2BAA2B;AAC3B,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC1D,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;SACzC,QAAQ,CAAC,kCAAkC,CAAC;IAC/C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACrE,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,0CAA0C,CAAC;CACxD,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,kBAAkB,GAAG,CAAC,CAAC,kBAAkB,CAAC,WAAW,EAAE;IAC3D,uBAAuB;IACvB,CAAC,CAAC,MAAM,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