n8n-nodes-resend 3.2.0 → 3.3.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 +2 -2
- package/dist/nodes/Resend/Resend.node.js +1 -1
- package/dist/nodes/Resend/actions/automation/cancelRun.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/automation/cancelRun.operation.js +50 -0
- package/dist/nodes/Resend/actions/automation/execute.js +3 -1
- package/dist/nodes/Resend/actions/automation/index.d.ts +2 -1
- package/dist/nodes/Resend/actions/automation/index.js +16 -1
- package/dist/nodes/Resend/actions/domain/enableForge.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/enableForge.operation.js +58 -0
- package/dist/nodes/Resend/actions/domain/execute.js +2 -0
- package/dist/nodes/Resend/actions/domain/index.d.ts +2 -1
- package/dist/nodes/Resend/actions/domain/index.js +15 -0
- package/dist/nodes/Resend/actions/domain/verify.operation.js +24 -2
- package/dist/nodes/Resend/actions/email/send.operation.js +33 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ The table below shows which endpoints are currently implemented:
|
|
|
41
41
|
| **Account** | `/oauth`, `/usage` | ✅ Full | Get Usage, Disconnect (OAuth2 credential only), List Grants, Revoke Grant |
|
|
42
42
|
| **Email** | `/emails` | ✅ Full | Send, Send Batch, Send and Wait, List, Get, Update, Cancel, Share, Get Metrics, List Attachments, Get Attachment |
|
|
43
43
|
| **Receiving Emails** | `/emails/receiving` | ✅ Full | List, Get, List Attachments, Get Attachment |
|
|
44
|
-
| **Domains** | `/domains` | ✅ Full | Create, List, Get, Update, Delete, Verify, Claim, Get Claim, Verify Claim
|
|
44
|
+
| **Domains** | `/domains` | ✅ Full | Create, List, Get, Update, Delete, Verify (with Forge scope), Claim, Get Claim, Verify Claim, Enable Forge; tracking subdomain via Create/Update |
|
|
45
45
|
| **Templates** | `/templates` | ✅ Full | Create, List, Get, Update, Delete, Publish, Duplicate |
|
|
46
46
|
| **Contacts** | `/contacts` | ✅ Full | Create, List, Get, Update, Delete, Add to Segment, List Segments, Remove from Segment, Get Topics, Update Topics, Create Import, List Imports, Get Import |
|
|
47
47
|
| **Broadcasts** | `/broadcasts` | ✅ Full | Create, List, Get, Update, Delete, Send, Cancel, Duplicate, List Clicked Links, List Recipients |
|
|
@@ -54,7 +54,7 @@ The table below shows which endpoints are currently implemented:
|
|
|
54
54
|
| **Inboxes** | `/inboxes` | ✅ Full | Create, List, Get, Update, Delete, Get Agent Settings, Update Agent Settings, Create Label, List Labels, Update Label, Delete Label |
|
|
55
55
|
| **Inbox Threads** | `/inboxes/{id}/threads` | ✅ Full | List, Search, Get, Update, Delete, Add Labels, Set Labels, Remove Label, List Emails, Get Email, Reply, Forward |
|
|
56
56
|
| **Inbox Drafts** | `/inboxes/{id}/drafts` | ✅ Full | Create, List, Get, Update, Delete, Send |
|
|
57
|
-
| **Automations** | `/automations` | ✅ Full | Create, List, Get, Update, Delete, Duplicate, Stop, List Runs, Get Run
|
|
57
|
+
| **Automations** | `/automations` | ✅ Full | Create, List, Get, Update, Delete, Duplicate, Stop, List Runs, Get Run, Cancel Run |
|
|
58
58
|
| **Logs** | `/logs` | ✅ Full | List, Retrieve |
|
|
59
59
|
|
|
60
60
|
</details>
|
|
@@ -37,7 +37,7 @@ var Resend = class {
|
|
|
37
37
|
version: [1, 2],
|
|
38
38
|
usableAsTool: true,
|
|
39
39
|
description: "Send emails, manage contacts, create broadcasts, handle templates, domains, segments, topics, and webhooks using the Resend email platform",
|
|
40
|
-
subtitle: "={{(() => { const resourceLabels = { account: \"account\", automations: \"automation\", broadcasts: \"broadcast\", contacts: \"contact\", contactProperties: \"contact property\", domains: \"domain\", email: \"email\", logs: \"log\", receivingEmails: \"received email\", inboxes: \"inbox\", inboxThreads: \"inbox thread\", inboxDrafts: \"inbox draft\", events: \"event\", segments: \"segment\", suppressions: \"suppression\", 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\", batchAdd: \"batch add\", batchRemove: \"batch remove\", listClickedLinks: \"list clicked links\", listRecipients: \"list recipients\", getMetrics: \"get metrics\", listGrants: \"list grants\", revokeGrant: \"revoke grant\", createImport: \"create import\", listImports: \"list imports\", getImport: \"get import\", getUsage: \"get usage\", rotateSigningSecret: \"rotate signing secret\", listEvents: \"list events\", getEvent: \"get event\", replayEvent: \"replay event\", listEventAttempts: \"list event attempts\", getAgent: \"get agent settings\", updateAgent: \"update agent settings\", createLabel: \"create label\", listLabels: \"list labels\", updateLabel: \"update label\", deleteLabel: \"delete label\", listEmails: \"list emails\", getEmail: \"get email\", addLabels: \"add labels\", setLabels: \"set labels\", removeLabel: \"remove label\" }; const resource = $parameter[\"resource\"]; const operation = $parameter[\"operation\"]; const resourceLabel = resourceLabels[resource] ?? resource; const operationLabel = operationLabels[operation] ?? operation; return operationLabel + \": \" + resourceLabel; })() }}",
|
|
40
|
+
subtitle: "={{(() => { const resourceLabels = { account: \"account\", automations: \"automation\", broadcasts: \"broadcast\", contacts: \"contact\", contactProperties: \"contact property\", domains: \"domain\", email: \"email\", logs: \"log\", receivingEmails: \"received email\", inboxes: \"inbox\", inboxThreads: \"inbox thread\", inboxDrafts: \"inbox draft\", events: \"event\", segments: \"segment\", suppressions: \"suppression\", 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\", cancelRun: \"cancel run\", batchAdd: \"batch add\", batchRemove: \"batch remove\", listClickedLinks: \"list clicked links\", listRecipients: \"list recipients\", getMetrics: \"get metrics\", listGrants: \"list grants\", revokeGrant: \"revoke grant\", createImport: \"create import\", listImports: \"list imports\", getImport: \"get import\", getUsage: \"get usage\", rotateSigningSecret: \"rotate signing secret\", listEvents: \"list events\", getEvent: \"get event\", replayEvent: \"replay event\", listEventAttempts: \"list event attempts\", getAgent: \"get agent settings\", updateAgent: \"update agent settings\", createLabel: \"create label\", listLabels: \"list labels\", updateLabel: \"update label\", deleteLabel: \"delete label\", listEmails: \"list emails\", getEmail: \"get email\", addLabels: \"add labels\", setLabels: \"set labels\", removeLabel: \"remove label\" }; const resource = $parameter[\"resource\"]; const operation = $parameter[\"operation\"]; const resourceLabel = resourceLabels[resource] ?? resource; const operationLabel = operationLabels[operation] ?? operation; return operationLabel + \": \" + resourceLabel; })() }}",
|
|
41
41
|
defaults: { name: "Resend" },
|
|
42
42
|
credentials: [{
|
|
43
43
|
name: "resendOAuth2Api",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
|
+
declare namespace cancelRun_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 { cancelRun_operation_d_exports, description, execute };
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
//#region nodes/Resend/actions/automation/cancelRun.operation.ts
|
|
5
|
+
var cancelRun_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
6
|
+
description: () => description,
|
|
7
|
+
execute: () => execute
|
|
8
|
+
});
|
|
9
|
+
const description = [{
|
|
10
|
+
displayName: "Automation ID",
|
|
11
|
+
name: "automationId",
|
|
12
|
+
type: "string",
|
|
13
|
+
required: true,
|
|
14
|
+
default: "",
|
|
15
|
+
placeholder: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
|
|
16
|
+
displayOptions: { show: {
|
|
17
|
+
resource: ["automations"],
|
|
18
|
+
operation: ["cancelRun"]
|
|
19
|
+
} },
|
|
20
|
+
description: "The unique identifier of the automation"
|
|
21
|
+
}, {
|
|
22
|
+
displayName: "Run ID",
|
|
23
|
+
name: "runId",
|
|
24
|
+
type: "string",
|
|
25
|
+
required: true,
|
|
26
|
+
default: "",
|
|
27
|
+
placeholder: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
28
|
+
displayOptions: { show: {
|
|
29
|
+
resource: ["automations"],
|
|
30
|
+
operation: ["cancelRun"]
|
|
31
|
+
} },
|
|
32
|
+
description: "The unique identifier of the automation run to cancel. Runs that have already finished cannot be cancelled."
|
|
33
|
+
}];
|
|
34
|
+
async function execute(index) {
|
|
35
|
+
const automationId = this.getNodeParameter("automationId", index);
|
|
36
|
+
const runId = this.getNodeParameter("runId", index);
|
|
37
|
+
return [{
|
|
38
|
+
json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", `/automations/${encodeURIComponent(automationId)}/runs/${encodeURIComponent(runId)}/cancel`),
|
|
39
|
+
pairedItem: { item: index }
|
|
40
|
+
}];
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
Object.defineProperty(exports, "cancelRun_operation_exports", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return cancelRun_operation_exports;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
exports.description = description;
|
|
50
|
+
exports.execute = execute;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_nodes_Resend_transport_index = require("../../transport/index.js");
|
|
3
|
+
const require_nodes_Resend_actions_automation_cancelRun_operation = require("./cancelRun.operation.js");
|
|
3
4
|
const require_nodes_Resend_actions_automation_create_operation = require("./create.operation.js");
|
|
4
5
|
const require_nodes_Resend_actions_automation_delete_operation = require("./delete.operation.js");
|
|
5
6
|
const require_nodes_Resend_actions_automation_duplicate_operation = require("./duplicate.operation.js");
|
|
@@ -18,7 +19,8 @@ const execute = require_nodes_Resend_transport_index.createOperationRouter({
|
|
|
18
19
|
duplicate: require_nodes_Resend_actions_automation_duplicate_operation.duplicate_operation_exports,
|
|
19
20
|
stop: require_nodes_Resend_actions_automation_stop_operation.stop_operation_exports,
|
|
20
21
|
listRuns: require_nodes_Resend_actions_automation_listRuns_operation.listRuns_operation_exports,
|
|
21
|
-
getRun: require_nodes_Resend_actions_automation_getRun_operation.getRun_operation_exports
|
|
22
|
+
getRun: require_nodes_Resend_actions_automation_getRun_operation.getRun_operation_exports,
|
|
23
|
+
cancelRun: require_nodes_Resend_actions_automation_cancelRun_operation.cancelRun_operation_exports
|
|
22
24
|
}, { list: require_nodes_Resend_actions_automation_list_operation.list_operation_exports });
|
|
23
25
|
//#endregion
|
|
24
26
|
exports.execute = execute;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cancelRun_operation_d_exports } from "./cancelRun.operation.js";
|
|
1
2
|
import { create_operation_d_exports } from "./create.operation.js";
|
|
2
3
|
import { delete_operation_d_exports } from "./delete.operation.js";
|
|
3
4
|
import { duplicate_operation_d_exports } from "./duplicate.operation.js";
|
|
@@ -13,4 +14,4 @@ import { INodeProperties } from "n8n-workflow";
|
|
|
13
14
|
declare const operations: INodeProperties[];
|
|
14
15
|
declare const descriptions: INodeProperties[];
|
|
15
16
|
//#endregion
|
|
16
|
-
export { create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, duplicate_operation_d_exports as duplicate, execute, get_operation_d_exports as get, getRun_operation_d_exports as getRun, list_operation_d_exports as list, listRuns_operation_d_exports as listRuns, operations, stop_operation_d_exports as stop, update_operation_d_exports as update };
|
|
17
|
+
export { cancelRun_operation_d_exports as cancelRun, create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, duplicate_operation_d_exports as duplicate, execute, get_operation_d_exports as get, getRun_operation_d_exports as getRun, list_operation_d_exports as list, listRuns_operation_d_exports as listRuns, operations, stop_operation_d_exports as stop, update_operation_d_exports as update };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_nodes_Resend_actions_automation_cancelRun_operation = require("./cancelRun.operation.js");
|
|
3
4
|
const require_nodes_Resend_actions_automation_create_operation = require("./create.operation.js");
|
|
4
5
|
const require_nodes_Resend_actions_automation_delete_operation = require("./delete.operation.js");
|
|
5
6
|
const require_nodes_Resend_actions_automation_duplicate_operation = require("./duplicate.operation.js");
|
|
@@ -12,6 +13,7 @@ const require_nodes_Resend_actions_automation_update_operation = require("./upda
|
|
|
12
13
|
const require_nodes_Resend_actions_automation_execute = require("./execute.js");
|
|
13
14
|
//#region nodes/Resend/actions/automation/index.ts
|
|
14
15
|
var automation_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
16
|
+
cancelRun: () => require_nodes_Resend_actions_automation_cancelRun_operation.cancelRun_operation_exports,
|
|
15
17
|
create: () => require_nodes_Resend_actions_automation_create_operation.create_operation_exports,
|
|
16
18
|
delete: () => require_nodes_Resend_actions_automation_delete_operation.delete_operation_exports,
|
|
17
19
|
descriptions: () => descriptions,
|
|
@@ -32,6 +34,12 @@ const operations = [{
|
|
|
32
34
|
noDataExpression: true,
|
|
33
35
|
displayOptions: { show: { resource: ["automations"] } },
|
|
34
36
|
options: [
|
|
37
|
+
{
|
|
38
|
+
name: "Cancel Run",
|
|
39
|
+
value: "cancelRun",
|
|
40
|
+
description: "Cancel a running automation run and skip its remaining steps",
|
|
41
|
+
action: "Cancel an automation run"
|
|
42
|
+
},
|
|
35
43
|
{
|
|
36
44
|
name: "Create",
|
|
37
45
|
value: "create",
|
|
@@ -99,7 +107,8 @@ const descriptions = [
|
|
|
99
107
|
...require_nodes_Resend_actions_automation_duplicate_operation.description,
|
|
100
108
|
...require_nodes_Resend_actions_automation_stop_operation.description,
|
|
101
109
|
...require_nodes_Resend_actions_automation_listRuns_operation.description,
|
|
102
|
-
...require_nodes_Resend_actions_automation_getRun_operation.description
|
|
110
|
+
...require_nodes_Resend_actions_automation_getRun_operation.description,
|
|
111
|
+
...require_nodes_Resend_actions_automation_cancelRun_operation.description
|
|
103
112
|
];
|
|
104
113
|
//#endregion
|
|
105
114
|
Object.defineProperty(exports, "automation_exports", {
|
|
@@ -108,6 +117,12 @@ Object.defineProperty(exports, "automation_exports", {
|
|
|
108
117
|
return automation_exports;
|
|
109
118
|
}
|
|
110
119
|
});
|
|
120
|
+
Object.defineProperty(exports, "cancelRun", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function() {
|
|
123
|
+
return require_nodes_Resend_actions_automation_cancelRun_operation.cancelRun_operation_exports;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
111
126
|
Object.defineProperty(exports, "create", {
|
|
112
127
|
enumerable: true,
|
|
113
128
|
get: function() {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
|
+
declare namespace enableForge_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, enableForge_operation_d_exports, execute };
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
const require_nodes_Resend_utils_dynamicFields = require("../../utils/dynamicFields.js");
|
|
5
|
+
//#region nodes/Resend/actions/domain/enableForge.operation.ts
|
|
6
|
+
var enableForge_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
7
|
+
description: () => description,
|
|
8
|
+
execute: () => execute
|
|
9
|
+
});
|
|
10
|
+
const description = [require_nodes_Resend_utils_dynamicFields.createDynamicIdField({
|
|
11
|
+
fieldName: "domainId",
|
|
12
|
+
resourceName: "domain",
|
|
13
|
+
displayName: "Domain",
|
|
14
|
+
required: true,
|
|
15
|
+
placeholder: "d91cd9bd-1176-453e-8fc1-35364d380206",
|
|
16
|
+
description: "The sending domain to put on Resend Forge. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
|
|
17
|
+
displayOptions: { show: {
|
|
18
|
+
resource: ["domains"],
|
|
19
|
+
operation: ["enableForge"]
|
|
20
|
+
} }
|
|
21
|
+
}), {
|
|
22
|
+
displayName: "Additional Options",
|
|
23
|
+
name: "additionalOptions",
|
|
24
|
+
type: "collection",
|
|
25
|
+
placeholder: "Add Option",
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: { show: {
|
|
28
|
+
resource: ["domains"],
|
|
29
|
+
operation: ["enableForge"]
|
|
30
|
+
} },
|
|
31
|
+
options: [{
|
|
32
|
+
displayName: "Custom Return Path",
|
|
33
|
+
name: "custom_return_path",
|
|
34
|
+
type: "string",
|
|
35
|
+
default: "",
|
|
36
|
+
placeholder: "forge",
|
|
37
|
+
description: "The subdomain for the Forge Return-Path address (e.g., \"forge\" on example.com produces forge.example.com). It must start with a letter, end with a letter or digit, and be 63 characters or less. When omitted, Resend picks a free subdomain. It is set once and cannot be changed afterwards."
|
|
38
|
+
}]
|
|
39
|
+
}];
|
|
40
|
+
async function execute(index) {
|
|
41
|
+
const domainId = require_nodes_Resend_utils_dynamicFields.resolveDynamicIdValue(this, "domainId", index);
|
|
42
|
+
const additionalOptions = this.getNodeParameter("additionalOptions", index, {});
|
|
43
|
+
const body = {};
|
|
44
|
+
if (additionalOptions.custom_return_path) body.custom_return_path = additionalOptions.custom_return_path;
|
|
45
|
+
return [{
|
|
46
|
+
json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", `/domains/${encodeURIComponent(domainId)}/forge`, body),
|
|
47
|
+
pairedItem: { item: index }
|
|
48
|
+
}];
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.description = description;
|
|
52
|
+
Object.defineProperty(exports, "enableForge_operation_exports", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function() {
|
|
55
|
+
return enableForge_operation_exports;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
exports.execute = execute;
|
|
@@ -3,6 +3,7 @@ const require_nodes_Resend_transport_index = require("../../transport/index.js")
|
|
|
3
3
|
const require_nodes_Resend_actions_domain_claim_operation = require("./claim.operation.js");
|
|
4
4
|
const require_nodes_Resend_actions_domain_create_operation = require("./create.operation.js");
|
|
5
5
|
const require_nodes_Resend_actions_domain_delete_operation = require("./delete.operation.js");
|
|
6
|
+
const require_nodes_Resend_actions_domain_enableForge_operation = require("./enableForge.operation.js");
|
|
6
7
|
const require_nodes_Resend_actions_domain_get_operation = require("./get.operation.js");
|
|
7
8
|
const require_nodes_Resend_actions_domain_getClaim_operation = require("./getClaim.operation.js");
|
|
8
9
|
const require_nodes_Resend_actions_domain_list_operation = require("./list.operation.js");
|
|
@@ -13,6 +14,7 @@ const require_nodes_Resend_actions_domain_verifyClaim_operation = require("./ver
|
|
|
13
14
|
const execute = require_nodes_Resend_transport_index.createOperationRouter({
|
|
14
15
|
claim: require_nodes_Resend_actions_domain_claim_operation.claim_operation_exports,
|
|
15
16
|
create: require_nodes_Resend_actions_domain_create_operation.create_operation_exports,
|
|
17
|
+
enableForge: require_nodes_Resend_actions_domain_enableForge_operation.enableForge_operation_exports,
|
|
16
18
|
get: require_nodes_Resend_actions_domain_get_operation.get_operation_exports,
|
|
17
19
|
getClaim: require_nodes_Resend_actions_domain_getClaim_operation.getClaim_operation_exports,
|
|
18
20
|
update: require_nodes_Resend_actions_domain_update_operation.update_operation_exports,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { claim_operation_d_exports } from "./claim.operation.js";
|
|
2
2
|
import { create_operation_d_exports } from "./create.operation.js";
|
|
3
3
|
import { delete_operation_d_exports } from "./delete.operation.js";
|
|
4
|
+
import { enableForge_operation_d_exports } from "./enableForge.operation.js";
|
|
4
5
|
import { execute } from "./execute.js";
|
|
5
6
|
import { get_operation_d_exports } from "./get.operation.js";
|
|
6
7
|
import { getClaim_operation_d_exports } from "./getClaim.operation.js";
|
|
@@ -13,4 +14,4 @@ import { INodeProperties } from "n8n-workflow";
|
|
|
13
14
|
declare const operations: INodeProperties[];
|
|
14
15
|
declare const descriptions: INodeProperties[];
|
|
15
16
|
//#endregion
|
|
16
|
-
export { claim_operation_d_exports as claim, create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, execute, get_operation_d_exports as get, getClaim_operation_d_exports as getClaim, list_operation_d_exports as list, operations, update_operation_d_exports as update, verify_operation_d_exports as verify, verifyClaim_operation_d_exports as verifyClaim };
|
|
17
|
+
export { claim_operation_d_exports as claim, create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, enableForge_operation_d_exports as enableForge, execute, get_operation_d_exports as get, getClaim_operation_d_exports as getClaim, list_operation_d_exports as list, operations, update_operation_d_exports as update, verify_operation_d_exports as verify, verifyClaim_operation_d_exports as verifyClaim };
|
|
@@ -3,6 +3,7 @@ const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
|
3
3
|
const require_nodes_Resend_actions_domain_claim_operation = require("./claim.operation.js");
|
|
4
4
|
const require_nodes_Resend_actions_domain_create_operation = require("./create.operation.js");
|
|
5
5
|
const require_nodes_Resend_actions_domain_delete_operation = require("./delete.operation.js");
|
|
6
|
+
const require_nodes_Resend_actions_domain_enableForge_operation = require("./enableForge.operation.js");
|
|
6
7
|
const require_nodes_Resend_actions_domain_get_operation = require("./get.operation.js");
|
|
7
8
|
const require_nodes_Resend_actions_domain_getClaim_operation = require("./getClaim.operation.js");
|
|
8
9
|
const require_nodes_Resend_actions_domain_list_operation = require("./list.operation.js");
|
|
@@ -16,6 +17,7 @@ var domain_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
|
16
17
|
create: () => require_nodes_Resend_actions_domain_create_operation.create_operation_exports,
|
|
17
18
|
delete: () => require_nodes_Resend_actions_domain_delete_operation.delete_operation_exports,
|
|
18
19
|
descriptions: () => descriptions,
|
|
20
|
+
enableForge: () => require_nodes_Resend_actions_domain_enableForge_operation.enableForge_operation_exports,
|
|
19
21
|
execute: () => require_nodes_Resend_actions_domain_execute.execute,
|
|
20
22
|
get: () => require_nodes_Resend_actions_domain_get_operation.get_operation_exports,
|
|
21
23
|
getClaim: () => require_nodes_Resend_actions_domain_getClaim_operation.getClaim_operation_exports,
|
|
@@ -50,6 +52,12 @@ const operations = [{
|
|
|
50
52
|
description: "Remove a sending domain from your account. Emails can no longer be sent from this domain after deletion.",
|
|
51
53
|
action: "Delete a domain"
|
|
52
54
|
},
|
|
55
|
+
{
|
|
56
|
+
name: "Enable Forge",
|
|
57
|
+
value: "enableForge",
|
|
58
|
+
description: "Put a domain's sending on Resend Forge. Returns the DNS records to add, then verify with the Forge scope.",
|
|
59
|
+
action: "Enable forge for a domain"
|
|
60
|
+
},
|
|
53
61
|
{
|
|
54
62
|
name: "Get",
|
|
55
63
|
value: "get",
|
|
@@ -98,6 +106,7 @@ const descriptions = [
|
|
|
98
106
|
...require_nodes_Resend_actions_domain_list_operation.description,
|
|
99
107
|
...require_nodes_Resend_actions_domain_update_operation.description,
|
|
100
108
|
...require_nodes_Resend_actions_domain_delete_operation.description,
|
|
109
|
+
...require_nodes_Resend_actions_domain_enableForge_operation.description,
|
|
101
110
|
...require_nodes_Resend_actions_domain_verify_operation.description,
|
|
102
111
|
...require_nodes_Resend_actions_domain_verifyClaim_operation.description
|
|
103
112
|
];
|
|
@@ -127,6 +136,12 @@ Object.defineProperty(exports, "domain_exports", {
|
|
|
127
136
|
return domain_exports;
|
|
128
137
|
}
|
|
129
138
|
});
|
|
139
|
+
Object.defineProperty(exports, "enableForge", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function() {
|
|
142
|
+
return require_nodes_Resend_actions_domain_enableForge_operation.enableForge_operation_exports;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
130
145
|
exports.execute = require_nodes_Resend_actions_domain_execute.execute;
|
|
131
146
|
Object.defineProperty(exports, "get", {
|
|
132
147
|
enumerable: true,
|
|
@@ -18,11 +18,33 @@ const description = [require_nodes_Resend_utils_dynamicFields.createDynamicIdFie
|
|
|
18
18
|
resource: ["domains"],
|
|
19
19
|
operation: ["verify"]
|
|
20
20
|
} }
|
|
21
|
-
})
|
|
21
|
+
}), {
|
|
22
|
+
displayName: "Additional Options",
|
|
23
|
+
name: "additionalOptions",
|
|
24
|
+
type: "collection",
|
|
25
|
+
placeholder: "Add Option",
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: { show: {
|
|
28
|
+
resource: ["domains"],
|
|
29
|
+
operation: ["verify"]
|
|
30
|
+
} },
|
|
31
|
+
options: [{
|
|
32
|
+
displayName: "Scope",
|
|
33
|
+
name: "scope",
|
|
34
|
+
type: "multiOptions",
|
|
35
|
+
options: [{
|
|
36
|
+
name: "Forge",
|
|
37
|
+
value: "forge"
|
|
38
|
+
}],
|
|
39
|
+
default: [],
|
|
40
|
+
description: "Limit the check to specific records. With Forge, only the Forge record is checked and the other records keep their current status. Requires Forge to be enabled on the domain. When empty, all records are checked."
|
|
41
|
+
}]
|
|
42
|
+
}];
|
|
22
43
|
async function execute(index) {
|
|
23
44
|
const domainId = require_nodes_Resend_utils_dynamicFields.resolveDynamicIdValue(this, "domainId", index);
|
|
45
|
+
const scope = this.getNodeParameter("additionalOptions", index, {}).scope;
|
|
24
46
|
return [{
|
|
25
|
-
json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", `/domains/${encodeURIComponent(domainId)}/verify
|
|
47
|
+
json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", `/domains/${encodeURIComponent(domainId)}/verify`, (scope === null || scope === void 0 ? void 0 : scope.length) ? { scope } : void 0),
|
|
26
48
|
pairedItem: { item: index }
|
|
27
49
|
}];
|
|
28
50
|
}
|
|
@@ -422,38 +422,40 @@ async function execute(index) {
|
|
|
422
422
|
});
|
|
423
423
|
if (additionalOptions.topicId) requestBody.topic_id = additionalOptions.topicId;
|
|
424
424
|
if (additionalOptions.scheduledAt) requestBody.scheduled_at = additionalOptions.scheduledAt;
|
|
425
|
-
if ((_additionalOptions$at = additionalOptions.attachments) === null || _additionalOptions$at === void 0 || (_additionalOptions$at = _additionalOptions$at.attachments) === null || _additionalOptions$at === void 0 ? void 0 : _additionalOptions$at.length)
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
filename,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
if (
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
425
|
+
if ((_additionalOptions$at = additionalOptions.attachments) === null || _additionalOptions$at === void 0 || (_additionalOptions$at = _additionalOptions$at.attachments) === null || _additionalOptions$at === void 0 ? void 0 : _additionalOptions$at.length) {
|
|
426
|
+
const attachments = [];
|
|
427
|
+
for (const attachment of additionalOptions.attachments.attachments) {
|
|
428
|
+
var _attachment$content_i, _attachment$content_t;
|
|
429
|
+
const contentId = (_attachment$content_i = attachment.content_id) !== null && _attachment$content_i !== void 0 ? _attachment$content_i : attachment.contentId;
|
|
430
|
+
const contentType = (_attachment$content_t = attachment.content_type) !== null && _attachment$content_t !== void 0 ? _attachment$content_t : attachment.contentType;
|
|
431
|
+
if (attachment.attachmentType === "binaryData") {
|
|
432
|
+
var _items$index$binary;
|
|
433
|
+
const binaryPropertyName = attachment.binaryPropertyName || "data";
|
|
434
|
+
const binaryData = (_items$index$binary = items[index].binary) === null || _items$index$binary === void 0 ? void 0 : _items$index$binary[binaryPropertyName];
|
|
435
|
+
if (!binaryData) throw new n8n_workflow.NodeOperationError(this.getNode(), `Binary property "${binaryPropertyName}" not found in item ${index}`, { itemIndex: index });
|
|
436
|
+
const filename = attachment.filename || binaryData.fileName;
|
|
437
|
+
if (!filename) throw new n8n_workflow.NodeOperationError(this.getNode(), "File Name is required for binary attachments.", { itemIndex: index });
|
|
438
|
+
const attachmentEntry = {
|
|
439
|
+
filename,
|
|
440
|
+
content: (await this.helpers.getBinaryDataBuffer(index, binaryPropertyName)).toString("base64")
|
|
441
|
+
};
|
|
442
|
+
if (contentId) attachmentEntry.content_id = contentId;
|
|
443
|
+
if (contentType) attachmentEntry.content_type = contentType;
|
|
444
|
+
attachments.push(attachmentEntry);
|
|
445
|
+
} else if (attachment.attachmentType === "url") {
|
|
446
|
+
if (!attachment.filename) throw new n8n_workflow.NodeOperationError(this.getNode(), "File Name is required for URL attachments.", { itemIndex: index });
|
|
447
|
+
if (!attachment.fileUrl) throw new n8n_workflow.NodeOperationError(this.getNode(), "File URL is required for URL attachments.", { itemIndex: index });
|
|
448
|
+
const attachmentEntry = {
|
|
449
|
+
filename: attachment.filename,
|
|
450
|
+
path: attachment.fileUrl
|
|
451
|
+
};
|
|
452
|
+
if (contentId) attachmentEntry.content_id = contentId;
|
|
453
|
+
if (contentType) attachmentEntry.content_type = contentType;
|
|
454
|
+
attachments.push(attachmentEntry);
|
|
455
|
+
}
|
|
454
456
|
}
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
+
requestBody.attachments = attachments;
|
|
458
|
+
}
|
|
457
459
|
const requestHeaders = { "Content-Type": "application/json" };
|
|
458
460
|
if (additionalOptions.idempotencyKey) requestHeaders["Idempotency-Key"] = additionalOptions.idempotencyKey;
|
|
459
461
|
let response;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-resend",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Resend integration for n8n: Email, Broadcasts, Templates, Domains, Contacts, Segments, Topics, Webhooks, Automations, Events, and more",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|