n8n-nodes-resend 2.5.3 → 2.6.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/README.md +13 -2
- package/dist/credentials/ResendApi.credentials.d.ts +4 -2
- package/dist/credentials/ResendApi.credentials.js +4 -1
- package/dist/credentials/ResendOAuth2Api.credentials.d.ts +15 -0
- package/dist/credentials/ResendOAuth2Api.credentials.js +27 -0
- package/dist/credentials/ResendWebhookSigningSecretApi.credentials.d.ts +1 -2
- package/dist/credentials/resend-icon-black.svg +3 -0
- package/dist/credentials/resend-icon-white.svg +3 -0
- package/dist/nodes/Resend/Resend.node.d.ts +13 -15
- package/dist/nodes/Resend/Resend.node.js +28 -1
- package/dist/nodes/Resend/ResendTrigger.node.d.ts +0 -1
- package/dist/nodes/Resend/actions/account/disconnect.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/account/disconnect.operation.js +49 -0
- package/dist/nodes/Resend/actions/account/execute.d.ts +4 -0
- package/dist/nodes/Resend/actions/account/execute.js +7 -0
- package/dist/nodes/Resend/actions/account/index.d.ts +8 -0
- package/dist/nodes/Resend/actions/account/index.js +42 -0
- package/dist/nodes/Resend/actions/broadcast/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/broadcast/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/broadcast/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/broadcast/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/broadcast/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/broadcast/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/broadcast/send.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/broadcast/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/addToSegment.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/contact/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/getTopics.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/contact/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/listSegments.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/removeFromSegment.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contact/updateTopics.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contactProperty/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contactProperty/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contactProperty/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/contactProperty/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contactProperty/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/contactProperty/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/contactProperty/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/claim.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/claim.operation.js +124 -0
- package/dist/nodes/Resend/actions/domain/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/createTrackingDomain.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/deleteTrackingDomain.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/domain/execute.js +6 -0
- package/dist/nodes/Resend/actions/domain/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/getClaim.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/getClaim.operation.js +37 -0
- package/dist/nodes/Resend/actions/domain/getTrackingDomain.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/index.d.ts +4 -2
- package/dist/nodes/Resend/actions/domain/index.js +45 -0
- package/dist/nodes/Resend/actions/domain/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/listTrackingDomains.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/verify.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/domain/verifyClaim.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/verifyClaim.operation.js +46 -0
- package/dist/nodes/Resend/actions/domain/verifyTrackingDomain.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/cancel.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/email/getAttachment.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/email/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/listAttachments.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/retrieve.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/send.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/sendAndWait.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/sendBatch.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/email/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/event/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/event/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/event/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/event/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/event/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/event/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/event/send.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/event/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/log/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/log/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/log/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/log/retrieve.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/receivingEmail/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/receivingEmail/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/receivingEmail/getAttachment.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/receivingEmail/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/receivingEmail/listAttachments.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/router.d.ts +0 -1
- package/dist/nodes/Resend/actions/router.js +2 -0
- package/dist/nodes/Resend/actions/segment/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/segment/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/segment/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/segment/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/segment/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/segment/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/segment/listContacts.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/duplicate.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/template/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/template/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/publish.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/template/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/topic/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/topic/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/topic/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/topic/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/topic/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/topic/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/topic/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/webhook/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/webhook/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/webhook/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/webhook/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/webhook/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/webhook/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/webhook/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/create.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/delete.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/execute.d.ts +1 -3
- package/dist/nodes/Resend/actions/workflow/get.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/getRun.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/getRunStep.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/index.d.ts +0 -1
- package/dist/nodes/Resend/actions/workflow/list.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/listRunSteps.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/listRuns.operation.d.ts +0 -2
- package/dist/nodes/Resend/actions/workflow/update.operation.d.ts +0 -2
- package/dist/nodes/Resend/methods/index.d.ts +0 -1
- package/dist/nodes/Resend/transport/index.d.ts +0 -1
- package/dist/nodes/Resend/transport/index.js +5 -2
- package/dist/nodes/Resend/utils/dynamicFields.d.ts +20 -21
- package/dist/nodes/Resend/utils/sendAndWait/descriptions.d.ts +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/interfaces.d.ts +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/utils.d.ts +2 -3
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ The table below shows which endpoints are currently implemented:
|
|
|
37
37
|
|
|
38
38
|
| API Resource | Endpoint | Status | Operations |
|
|
39
39
|
| ---------------------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| **Account** | `/oauth/revoke` | ✅ Full | Disconnect (OAuth2 credential only) |
|
|
40
41
|
| **Email** | `/emails` | ✅ Full | Send, Send Batch, Send and Wait, List, Get, Update, Cancel, List Attachments, Get Attachment |
|
|
41
42
|
| **Receiving Emails** | `/emails/receiving` | ✅ Full | List, Get, List Attachments, Get Attachment |
|
|
42
43
|
| **Domains** | `/domains` | ✅ Full | Create, List, Get, Update, Delete, Verify, Create Tracking Domain, Get Tracking Domain, List Tracking Domains, Delete Tracking Domain, Verify Tracking Domain |
|
|
@@ -62,7 +63,17 @@ The table below shows which endpoints are currently implemented:
|
|
|
62
63
|
|
|
63
64
|
## Credentials
|
|
64
65
|
|
|
65
|
-
This package uses
|
|
66
|
+
This package uses three separate credentials:
|
|
67
|
+
|
|
68
|
+
### Resend OAuth2 API (recommended)
|
|
69
|
+
|
|
70
|
+
1. In n8n, go to **Credentials** > **Add credential** and search for **Resend OAuth2 API**
|
|
71
|
+
2. Click **Connect my account**
|
|
72
|
+
|
|
73
|
+
That's it! n8n registers itself as an OAuth client with Resend.
|
|
74
|
+
|
|
75
|
+
> [!NOTE]
|
|
76
|
+
> Dynamic Client Registration relies on OAuth2 support that's new in n8n core. If **Connect my account** doesn't work, make sure you're on a recent n8n version, or use the **Resend API** credential below instead.
|
|
66
77
|
|
|
67
78
|
### Resend API
|
|
68
79
|
|
|
@@ -70,7 +81,7 @@ This package uses two separate credentials:
|
|
|
70
81
|
2. In n8n, go to **Credentials** > **Add credential**
|
|
71
82
|
3. Search for **Resend API** and paste your key
|
|
72
83
|
|
|
73
|
-
This credential is used by the main **Resend** node
|
|
84
|
+
This credential is used by the main **Resend** node when **Authentication** is set to **API Key**.
|
|
74
85
|
|
|
75
86
|
### Resend Webhook Signing Secret
|
|
76
87
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from "n8n-workflow";
|
|
2
|
-
|
|
3
2
|
//#region credentials/ResendApi.credentials.d.ts
|
|
4
3
|
declare class ResendApi implements ICredentialType {
|
|
5
4
|
name: string;
|
|
6
5
|
displayName: string;
|
|
7
6
|
documentationUrl: string;
|
|
8
|
-
icon:
|
|
7
|
+
icon: {
|
|
8
|
+
readonly light: 'file:resend-icon-black.svg';
|
|
9
|
+
readonly dark: 'file:resend-icon-white.svg';
|
|
10
|
+
};
|
|
9
11
|
properties: INodeProperties[];
|
|
10
12
|
authenticate: IAuthenticateGeneric;
|
|
11
13
|
test: ICredentialTestRequest;
|
|
@@ -5,7 +5,10 @@ var ResendApi = class {
|
|
|
5
5
|
this.name = "resendApi";
|
|
6
6
|
this.displayName = "Resend API";
|
|
7
7
|
this.documentationUrl = "https://resend.com/docs/api-reference/introduction";
|
|
8
|
-
this.icon =
|
|
8
|
+
this.icon = {
|
|
9
|
+
light: "file:resend-icon-black.svg",
|
|
10
|
+
dark: "file:resend-icon-white.svg"
|
|
11
|
+
};
|
|
9
12
|
this.properties = [{
|
|
10
13
|
displayName: "API Key",
|
|
11
14
|
name: "apiKey",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ICredentialType, INodeProperties } from "n8n-workflow";
|
|
2
|
+
//#region credentials/ResendOAuth2Api.credentials.d.ts
|
|
3
|
+
declare class ResendOAuth2Api implements ICredentialType {
|
|
4
|
+
name: string;
|
|
5
|
+
extends: string[];
|
|
6
|
+
displayName: string;
|
|
7
|
+
documentationUrl: string;
|
|
8
|
+
icon: {
|
|
9
|
+
readonly light: 'file:resend-icon-black.svg';
|
|
10
|
+
readonly dark: 'file:resend-icon-white.svg';
|
|
11
|
+
};
|
|
12
|
+
properties: INodeProperties[];
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ResendOAuth2Api };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region credentials/ResendOAuth2Api.credentials.ts
|
|
3
|
+
var ResendOAuth2Api = class {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = "resendOAuth2Api";
|
|
6
|
+
this.extends = ["oAuth2Api"];
|
|
7
|
+
this.displayName = "Resend OAuth2 API";
|
|
8
|
+
this.documentationUrl = "https://resend.com/docs/guides/building-a-resend-oauth-client";
|
|
9
|
+
this.icon = {
|
|
10
|
+
light: "file:resend-icon-black.svg",
|
|
11
|
+
dark: "file:resend-icon-white.svg"
|
|
12
|
+
};
|
|
13
|
+
this.properties = [{
|
|
14
|
+
displayName: "Server URL",
|
|
15
|
+
name: "serverUrl",
|
|
16
|
+
type: "hidden",
|
|
17
|
+
default: "https://api.resend.com"
|
|
18
|
+
}, {
|
|
19
|
+
displayName: "Use Dynamic Client Registration",
|
|
20
|
+
name: "useDynamicClientRegistration",
|
|
21
|
+
type: "hidden",
|
|
22
|
+
default: true
|
|
23
|
+
}];
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.ResendOAuth2Api = ResendOAuth2Api;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ICredentialType, INodeProperties } from "n8n-workflow";
|
|
2
|
-
|
|
3
2
|
//#region credentials/ResendWebhookSigningSecretApi.credentials.d.ts
|
|
4
3
|
declare class ResendWebhookSigningSecretApi implements ICredentialType {
|
|
5
4
|
name: string;
|
|
6
5
|
displayName: string;
|
|
7
6
|
documentationUrl: string;
|
|
8
|
-
icon:
|
|
7
|
+
icon: 'file:resend.svg';
|
|
9
8
|
properties: INodeProperties[];
|
|
10
9
|
}
|
|
11
10
|
//#endregion
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="60" height="60" viewBox="350 350 1100 1100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M1000.46 450C1174.77 450 1278.43 553.669 1278.43 691.282C1278.43 828.896 1174.77 932.563 1000.46 932.563H912.382L1350 1350H1040.82L707.794 1033.48C683.944 1011.47 672.936 985.781 672.935 963.765C672.935 932.572 694.959 905.049 737.161 893.122L908.712 847.244C973.85 829.812 1018.81 779.353 1018.81 713.298C1018.8 632.567 952.745 585.78 871.095 585.78H450V450H1000.46Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="60" height="60" viewBox="350 350 1100 1100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M1000.46 450C1174.77 450 1278.43 553.669 1278.43 691.282C1278.43 828.896 1174.77 932.563 1000.46 932.563H912.382L1350 1350H1040.82L707.794 1033.48C683.944 1011.47 672.936 985.781 672.935 963.765C672.935 932.572 694.959 905.049 737.161 893.122L908.712 847.244C973.85 829.812 1018.81 779.353 1018.81 713.298C1018.8 632.567 952.745 585.78 871.095 585.78H450V450H1000.46Z" fill="#FDFDFD"/>
|
|
3
|
+
</svg>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { router } from "./actions/router.js";
|
|
2
2
|
import { getBroadcasts, getContactProperties, getContacts, getDomains, getEmails, getReceivedEmails, getSegments, getTemplateVariables, getTemplates, getTopics, getWebhooks } from "./methods/index.js";
|
|
3
|
-
import * as _$n8n_workflow0 from "n8n-workflow";
|
|
4
3
|
import { INodeType, INodeTypeDescription, IWebhookFunctions } from "n8n-workflow";
|
|
5
|
-
|
|
6
4
|
//#region nodes/Resend/Resend.node.d.ts
|
|
7
5
|
declare class Resend implements INodeType {
|
|
8
6
|
description: INodeTypeDescription;
|
|
@@ -21,17 +19,17 @@ declare class Resend implements INodeType {
|
|
|
21
19
|
getWebhooks: typeof getWebhooks;
|
|
22
20
|
};
|
|
23
21
|
listSearch: {
|
|
24
|
-
getBroadcasts: (this:
|
|
25
|
-
getContactProperties: (this:
|
|
26
|
-
getContacts: (this:
|
|
27
|
-
getDomains: (this:
|
|
28
|
-
getEmails: (this:
|
|
29
|
-
getReceivedEmails: (this:
|
|
30
|
-
getSegments: (this:
|
|
31
|
-
getTemplates: (this:
|
|
32
|
-
getTemplateVariables: (this:
|
|
33
|
-
getTopics: (this:
|
|
34
|
-
getWebhooks: (this:
|
|
22
|
+
getBroadcasts: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
23
|
+
getContactProperties: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
24
|
+
getContacts: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
25
|
+
getDomains: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
26
|
+
getEmails: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
27
|
+
getReceivedEmails: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
28
|
+
getSegments: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
29
|
+
getTemplates: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
30
|
+
getTemplateVariables: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
31
|
+
getTopics: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
32
|
+
getWebhooks: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
|
|
35
33
|
};
|
|
36
34
|
};
|
|
37
35
|
webhook: (this: IWebhookFunctions) => Promise<{
|
|
@@ -39,6 +37,7 @@ declare class Resend implements INodeType {
|
|
|
39
37
|
webhookResponse?: undefined;
|
|
40
38
|
workflowData?: undefined;
|
|
41
39
|
} | {
|
|
40
|
+
noWebhookResponse?: undefined;
|
|
42
41
|
webhookResponse: undefined;
|
|
43
42
|
workflowData: {
|
|
44
43
|
json: {
|
|
@@ -47,8 +46,8 @@ declare class Resend implements INodeType {
|
|
|
47
46
|
};
|
|
48
47
|
};
|
|
49
48
|
}[][];
|
|
50
|
-
noWebhookResponse?: undefined;
|
|
51
49
|
} | {
|
|
50
|
+
noWebhookResponse?: undefined;
|
|
52
51
|
webhookResponse: undefined;
|
|
53
52
|
workflowData: {
|
|
54
53
|
json: {
|
|
@@ -57,7 +56,6 @@ declare class Resend implements INodeType {
|
|
|
57
56
|
};
|
|
58
57
|
};
|
|
59
58
|
}[][];
|
|
60
|
-
noWebhookResponse?: undefined;
|
|
61
59
|
}>;
|
|
62
60
|
execute: typeof router;
|
|
63
61
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_nodes_Resend_actions_account_index = require("./actions/account/index.js");
|
|
2
3
|
const require_nodes_Resend_actions_broadcast_index = require("./actions/broadcast/index.js");
|
|
3
4
|
const require_nodes_Resend_actions_contact_index = require("./actions/contact/index.js");
|
|
4
5
|
const require_nodes_Resend_actions_contactProperty_index = require("./actions/contactProperty/index.js");
|
|
@@ -35,20 +36,45 @@ var Resend = class {
|
|
|
35
36
|
subtitle: "={{(() => { const resourceLabels = { broadcasts: \"broadcast\", contacts: \"contact\", contactProperties: \"contact property\", domains: \"domain\", email: \"email\", logs: \"log\", receivingEmails: \"received email\", workflows: \"workflow\", events: \"event\", segments: \"segment\", templates: \"template\", topics: \"topic\", webhooks: \"webhook\" }; const operationLabels = { retrieve: \"get\", sendBatch: \"send batch\", listAttachments: \"list attachments\", getAttachment: \"get attachment\", addToSegment: \"add to segment\", listSegments: \"list segments\", removeFromSegment: \"remove from segment\", getTopics: \"get topics\", updateTopics: \"update topics\", listRuns: \"list runs\", getRun: \"get run\", listRunSteps: \"list run steps\", getRunStep: \"get run step\" }; const resource = $parameter[\"resource\"]; const operation = $parameter[\"operation\"]; const resourceLabel = resourceLabels[resource] ?? resource; const operationLabel = operationLabels[operation] ?? operation; return operationLabel + \": \" + resourceLabel; })() }}",
|
|
36
37
|
defaults: { name: "Resend" },
|
|
37
38
|
credentials: [{
|
|
39
|
+
name: "resendOAuth2Api",
|
|
40
|
+
required: true,
|
|
41
|
+
displayOptions: { show: { authentication: ["oAuth2"] } }
|
|
42
|
+
}, {
|
|
38
43
|
name: "resendApi",
|
|
39
|
-
required: true
|
|
44
|
+
required: true,
|
|
45
|
+
displayOptions: { show: { authentication: ["apiKey"] } }
|
|
40
46
|
}],
|
|
41
47
|
waitingNodeTooltip: require_nodes_Resend_utils_sendAndWait_utils.SEND_AND_WAIT_WAITING_TOOLTIP,
|
|
42
48
|
webhooks: require_nodes_Resend_utils_sendAndWait_descriptions.sendAndWaitWebhooksDescription,
|
|
43
49
|
inputs: [n8n_workflow.NodeConnectionTypes.Main],
|
|
44
50
|
outputs: [n8n_workflow.NodeConnectionTypes.Main],
|
|
45
51
|
properties: [
|
|
52
|
+
{
|
|
53
|
+
displayName: "Authentication",
|
|
54
|
+
name: "authentication",
|
|
55
|
+
type: "options",
|
|
56
|
+
options: [{
|
|
57
|
+
name: "OAuth2 (Recommended)",
|
|
58
|
+
value: "oAuth2",
|
|
59
|
+
description: "Sign in with your Resend account — n8n registers itself as an OAuth client automatically, no API key needed"
|
|
60
|
+
}, {
|
|
61
|
+
name: "API Key",
|
|
62
|
+
value: "apiKey",
|
|
63
|
+
description: "Manually paste a Resend API key"
|
|
64
|
+
}],
|
|
65
|
+
default: "oAuth2"
|
|
66
|
+
},
|
|
46
67
|
{
|
|
47
68
|
displayName: "Resource",
|
|
48
69
|
name: "resource",
|
|
49
70
|
type: "options",
|
|
50
71
|
noDataExpression: true,
|
|
51
72
|
options: [
|
|
73
|
+
{
|
|
74
|
+
name: "Account",
|
|
75
|
+
value: "account",
|
|
76
|
+
description: "Manage the connected Resend OAuth2 account, such as disconnecting it"
|
|
77
|
+
},
|
|
52
78
|
{
|
|
53
79
|
name: "Broadcast",
|
|
54
80
|
value: "broadcasts",
|
|
@@ -117,6 +143,7 @@ var Resend = class {
|
|
|
117
143
|
],
|
|
118
144
|
default: "email"
|
|
119
145
|
},
|
|
146
|
+
...require_nodes_Resend_actions_account_index.descriptions,
|
|
120
147
|
...require_nodes_Resend_actions_email_index.descriptions,
|
|
121
148
|
...require_nodes_Resend_actions_template_index.descriptions,
|
|
122
149
|
...require_nodes_Resend_actions_domain_index.descriptions,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
|
+
declare namespace disconnect_operation_d_exports {
|
|
3
|
+
export { description, execute };
|
|
4
|
+
}
|
|
5
|
+
declare const description: INodeProperties[];
|
|
6
|
+
declare function execute(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { description, disconnect_operation_d_exports, execute };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_nodes_Resend_transport_index = require("../../transport/index.js");
|
|
4
|
+
let n8n_workflow = require("n8n-workflow");
|
|
5
|
+
//#region nodes/Resend/actions/account/disconnect.operation.ts
|
|
6
|
+
var disconnect_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
7
|
+
description: () => description,
|
|
8
|
+
execute: () => execute
|
|
9
|
+
});
|
|
10
|
+
const description = [];
|
|
11
|
+
async function execute(index) {
|
|
12
|
+
var _credentials$oauthTok;
|
|
13
|
+
if (this.getNodeParameter("authentication", index, "apiKey") !== "oAuth2") throw new n8n_workflow.NodeOperationError(this.getNode(), "Disconnect is only available when the credential's Authentication is set to OAuth2.", { itemIndex: index });
|
|
14
|
+
const credentials = await this.getCredentials("resendOAuth2Api");
|
|
15
|
+
const clientId = credentials.clientId;
|
|
16
|
+
const refreshToken = (_credentials$oauthTok = credentials.oauthTokenData) === null || _credentials$oauthTok === void 0 ? void 0 : _credentials$oauthTok.refresh_token;
|
|
17
|
+
if (!clientId || !refreshToken) throw new n8n_workflow.NodeOperationError(this.getNode(), "No active Resend OAuth connection was found to disconnect. Connect the credential first.", { itemIndex: index });
|
|
18
|
+
try {
|
|
19
|
+
await this.helpers.httpRequest({
|
|
20
|
+
method: "POST",
|
|
21
|
+
url: "https://api.resend.com/oauth/revoke",
|
|
22
|
+
headers: {
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
"User-Agent": "n8n-nodes-resend"
|
|
25
|
+
},
|
|
26
|
+
body: {
|
|
27
|
+
client_id: clientId,
|
|
28
|
+
token: refreshToken,
|
|
29
|
+
token_type_hint: "refresh_token"
|
|
30
|
+
},
|
|
31
|
+
json: true
|
|
32
|
+
});
|
|
33
|
+
} catch (error) {
|
|
34
|
+
require_nodes_Resend_transport_index.handleResendApiError(this.getNode(), error, index);
|
|
35
|
+
}
|
|
36
|
+
return [{
|
|
37
|
+
json: { disconnected: true },
|
|
38
|
+
pairedItem: { item: index }
|
|
39
|
+
}];
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.description = description;
|
|
43
|
+
Object.defineProperty(exports, "disconnect_operation_exports", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return disconnect_operation_exports;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
exports.execute = execute;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_nodes_Resend_transport_index = require("../../transport/index.js");
|
|
3
|
+
const require_nodes_Resend_actions_account_disconnect_operation = require("./disconnect.operation.js");
|
|
4
|
+
//#region nodes/Resend/actions/account/execute.ts
|
|
5
|
+
const execute = require_nodes_Resend_transport_index.createOperationRouter({ disconnect: require_nodes_Resend_actions_account_disconnect_operation.disconnect_operation_exports });
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.execute = execute;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { disconnect_operation_d_exports } from "./disconnect.operation.js";
|
|
2
|
+
import { execute } from "./execute.js";
|
|
3
|
+
import { INodeProperties } from "n8n-workflow";
|
|
4
|
+
//#region nodes/Resend/actions/account/index.d.ts
|
|
5
|
+
declare const operations: INodeProperties[];
|
|
6
|
+
declare const descriptions: INodeProperties[];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { descriptions, disconnect_operation_d_exports as disconnect, execute, operations };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_nodes_Resend_actions_account_disconnect_operation = require("./disconnect.operation.js");
|
|
4
|
+
const require_nodes_Resend_actions_account_execute = require("./execute.js");
|
|
5
|
+
//#region nodes/Resend/actions/account/index.ts
|
|
6
|
+
var account_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
7
|
+
descriptions: () => descriptions,
|
|
8
|
+
disconnect: () => require_nodes_Resend_actions_account_disconnect_operation.disconnect_operation_exports,
|
|
9
|
+
execute: () => require_nodes_Resend_actions_account_execute.execute,
|
|
10
|
+
operations: () => operations
|
|
11
|
+
});
|
|
12
|
+
const operations = [{
|
|
13
|
+
displayName: "Operation",
|
|
14
|
+
name: "operation",
|
|
15
|
+
type: "options",
|
|
16
|
+
noDataExpression: true,
|
|
17
|
+
displayOptions: { show: { resource: ["account"] } },
|
|
18
|
+
options: [{
|
|
19
|
+
name: "Disconnect",
|
|
20
|
+
value: "disconnect",
|
|
21
|
+
description: "Revoke the connected Resend OAuth2 grant, ending the connection to your Resend account",
|
|
22
|
+
action: "Disconnect the Resend account"
|
|
23
|
+
}],
|
|
24
|
+
default: "disconnect"
|
|
25
|
+
}];
|
|
26
|
+
const descriptions = [...operations, ...require_nodes_Resend_actions_account_disconnect_operation.description];
|
|
27
|
+
//#endregion
|
|
28
|
+
Object.defineProperty(exports, "account_exports", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return account_exports;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
exports.descriptions = descriptions;
|
|
35
|
+
Object.defineProperty(exports, "disconnect", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function() {
|
|
38
|
+
return require_nodes_Resend_actions_account_disconnect_operation.disconnect_operation_exports;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
exports.execute = require_nodes_Resend_actions_account_execute.execute;
|
|
42
|
+
exports.operations = operations;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as _$n8n_workflow0 from "n8n-workflow";
|
|
2
|
-
|
|
3
1
|
//#region nodes/Resend/actions/broadcast/execute.d.ts
|
|
4
|
-
declare const execute: (this:
|
|
2
|
+
declare const execute: (this: import("n8n-workflow").IExecuteFunctions, index: number, operation: string) => Promise<import("n8n-workflow").INodeExecutionData[]>;
|
|
5
3
|
//#endregion
|
|
6
4
|
export { execute };
|
|
@@ -6,7 +6,6 @@ import { list_operation_d_exports } from "./list.operation.js";
|
|
|
6
6
|
import { send_operation_d_exports } from "./send.operation.js";
|
|
7
7
|
import { update_operation_d_exports } from "./update.operation.js";
|
|
8
8
|
import { INodeProperties } from "n8n-workflow";
|
|
9
|
-
|
|
10
9
|
//#region nodes/Resend/actions/broadcast/index.d.ts
|
|
11
10
|
declare const operations: INodeProperties[];
|
|
12
11
|
declare const descriptions: INodeProperties[];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as _$n8n_workflow0 from "n8n-workflow";
|
|
2
|
-
|
|
3
1
|
//#region nodes/Resend/actions/contact/execute.d.ts
|
|
4
|
-
declare const execute: (this:
|
|
2
|
+
declare const execute: (this: import("n8n-workflow").IExecuteFunctions, index: number, operation: string) => Promise<import("n8n-workflow").INodeExecutionData[]>;
|
|
5
3
|
//#endregion
|
|
6
4
|
export { execute };
|
|
@@ -10,7 +10,6 @@ import { removeFromSegment_operation_d_exports } from "./removeFromSegment.opera
|
|
|
10
10
|
import { update_operation_d_exports } from "./update.operation.js";
|
|
11
11
|
import { updateTopics_operation_d_exports } from "./updateTopics.operation.js";
|
|
12
12
|
import { INodeProperties } from "n8n-workflow";
|
|
13
|
-
|
|
14
13
|
//#region nodes/Resend/actions/contact/index.d.ts
|
|
15
14
|
declare const operations: INodeProperties[];
|
|
16
15
|
declare const descriptions: INodeProperties[];
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as _$n8n_workflow0 from "n8n-workflow";
|
|
2
|
-
|
|
3
1
|
//#region nodes/Resend/actions/contactProperty/execute.d.ts
|
|
4
|
-
declare const execute: (this:
|
|
2
|
+
declare const execute: (this: import("n8n-workflow").IExecuteFunctions, index: number, operation: string) => Promise<import("n8n-workflow").INodeExecutionData[]>;
|
|
5
3
|
//#endregion
|
|
6
4
|
export { execute };
|
|
@@ -5,7 +5,6 @@ import { get_operation_d_exports } from "./get.operation.js";
|
|
|
5
5
|
import { list_operation_d_exports } from "./list.operation.js";
|
|
6
6
|
import { update_operation_d_exports } from "./update.operation.js";
|
|
7
7
|
import { INodeProperties } from "n8n-workflow";
|
|
8
|
-
|
|
9
8
|
//#region nodes/Resend/actions/contactProperty/index.d.ts
|
|
10
9
|
declare const operations: INodeProperties[];
|
|
11
10
|
declare const descriptions: INodeProperties[];
|