n8n-nodes-resend 2.7.0 → 2.9.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 CHANGED
@@ -43,7 +43,7 @@ The table below shows which endpoints are currently implemented:
43
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 |
44
44
  | **Templates** | `/templates` | ✅ Full | Create, List, Get, Update, Delete, Publish, Duplicate |
45
45
  | **Contacts** | `/contacts` | ✅ Full | Create, List, Get, Update, Delete, Add to Segment, List Segments, Remove from Segment, Get Topics, Update Topics |
46
- | **Broadcasts** | `/broadcasts` | ✅ Full | Create, List, Get, Update, Delete, Send |
46
+ | **Broadcasts** | `/broadcasts` | ✅ Full | Create, List, Get, Update, Delete, Send, Cancel |
47
47
  | **Segments** | `/segments` | ✅ Full | Create, List, Get, Delete |
48
48
  | **Suppressions** | `/suppressions` | ✅ Full | Create, List, Get, Delete, Batch Add, Batch Remove |
49
49
  | **Topics** | `/topics` | ✅ Full | Create, List, Get, Update, Delete |
@@ -69,7 +69,7 @@ var ResendTrigger = class {
69
69
  group: ["trigger"],
70
70
  version: 1,
71
71
  description: "Triggers workflows when Resend email events occur, such as email sent, delivered, opened, clicked, bounced, or complained. Includes secure webhook signature verification.",
72
- subtitle: "={{(() => { const events = $parameter[\"events\"] ?? []; const actionLabels = { created: \"create\", deleted: \"delete\", updated: \"update\", sent: \"send\", opened: \"open\", clicked: \"click\", bounced: \"bounce\", complained: \"complain\", delivered: \"deliver\", delivery_delayed: \"delay\", failed: \"fail\", received: \"receive\", scheduled: \"schedule\", suppressed: \"suppress\" }; return events.map((event) => { const [resource, action] = event.split(\".\"); if (!resource || !action) { return event; } const actionLabel = actionLabels[action] ?? action.replace(/_/g, \" \"); return actionLabel + \": \" + resource; }).join(\", \"); })() }}",
72
+ subtitle: "={{(() => { const events = $parameter[\"events\"] ?? []; const actionLabels = { created: \"create\", deleted: \"delete\", updated: \"update\", sent: \"send\", opened: \"open\", clicked: \"click\", bounced: \"bounce\", complained: \"complain\", delivered: \"deliver\", delivery_delayed: \"delay\", failed: \"fail\", received: \"receive\", scheduled: \"schedule\", suppressed: \"suppress\" }; return events.map((event) => { const parts = event.split(\".\"); const action = parts.pop(); const resource = parts.join(\".\"); if (!resource || !action) { return event; } const actionLabel = actionLabels[action] ?? action.replace(/_/g, \" \"); return actionLabel + \": \" + resource; }).join(\", \"); })() }}",
73
73
  defaults: { name: "Resend Trigger" },
74
74
  credentials: [{
75
75
  name: "resendWebhookSigningSecretApi",
@@ -119,6 +119,10 @@ var ResendTrigger = class {
119
119
  name: "Contact Deleted",
120
120
  value: "contact.deleted"
121
121
  },
122
+ {
123
+ name: "Contact Topics Updated",
124
+ value: "contact.topics.updated"
125
+ },
122
126
  {
123
127
  name: "Contact Updated",
124
128
  value: "contact.updated"
@@ -186,6 +190,18 @@ var ResendTrigger = class {
186
190
  {
187
191
  name: "Suppression Removed",
188
192
  value: "suppression.removed"
193
+ },
194
+ {
195
+ name: "Topic Created",
196
+ value: "topic.created"
197
+ },
198
+ {
199
+ name: "Topic Deleted",
200
+ value: "topic.deleted"
201
+ },
202
+ {
203
+ name: "Topic Updated",
204
+ value: "topic.updated"
189
205
  }
190
206
  ],
191
207
  description: "Select the Resend event types to listen for"
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace cancel_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 { cancel_operation_d_exports, description, execute };
@@ -0,0 +1,37 @@
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/broadcast/cancel.operation.ts
6
+ var cancel_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [require_nodes_Resend_utils_dynamicFields.createDynamicIdField({
11
+ fieldName: "broadcastId",
12
+ resourceName: "broadcast",
13
+ displayName: "Broadcast",
14
+ required: true,
15
+ placeholder: "bc_123456",
16
+ description: "The unique identifier of the broadcast to cancel. Only works for broadcasts that are queued or scheduled and have not been delivered yet.",
17
+ displayOptions: { show: {
18
+ resource: ["broadcasts"],
19
+ operation: ["cancel"]
20
+ } }
21
+ })];
22
+ async function execute(index) {
23
+ const broadcastId = require_nodes_Resend_utils_dynamicFields.resolveDynamicIdValue(this, "broadcastId", index);
24
+ return [{
25
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", `/broadcasts/${encodeURIComponent(broadcastId)}/cancel`),
26
+ pairedItem: { item: index }
27
+ }];
28
+ }
29
+ //#endregion
30
+ Object.defineProperty(exports, "cancel_operation_exports", {
31
+ enumerable: true,
32
+ get: function() {
33
+ return cancel_operation_exports;
34
+ }
35
+ });
36
+ exports.description = description;
37
+ 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_broadcast_cancel_operation = require("./cancel.operation.js");
3
4
  const require_nodes_Resend_actions_broadcast_create_operation = require("./create.operation.js");
4
5
  const require_nodes_Resend_actions_broadcast_delete_operation = require("./delete.operation.js");
5
6
  const require_nodes_Resend_actions_broadcast_get_operation = require("./get.operation.js");
@@ -12,7 +13,8 @@ const execute = require_nodes_Resend_transport_index.createOperationRouter({
12
13
  get: require_nodes_Resend_actions_broadcast_get_operation.get_operation_exports,
13
14
  update: require_nodes_Resend_actions_broadcast_update_operation.update_operation_exports,
14
15
  delete: require_nodes_Resend_actions_broadcast_delete_operation.delete_operation_exports,
15
- send: require_nodes_Resend_actions_broadcast_send_operation.send_operation_exports
16
+ send: require_nodes_Resend_actions_broadcast_send_operation.send_operation_exports,
17
+ cancel: require_nodes_Resend_actions_broadcast_cancel_operation.cancel_operation_exports
16
18
  }, { list: require_nodes_Resend_actions_broadcast_list_operation.list_operation_exports });
17
19
  //#endregion
18
20
  exports.execute = execute;
@@ -1,3 +1,4 @@
1
+ import { cancel_operation_d_exports } from "./cancel.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 { execute } from "./execute.js";
@@ -10,4 +11,4 @@ import { INodeProperties } from "n8n-workflow";
10
11
  declare const operations: INodeProperties[];
11
12
  declare const descriptions: INodeProperties[];
12
13
  //#endregion
13
- export { create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, execute, get_operation_d_exports as get, list_operation_d_exports as list, operations, send_operation_d_exports as send, update_operation_d_exports as update };
14
+ export { cancel_operation_d_exports as cancel, create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, execute, get_operation_d_exports as get, list_operation_d_exports as list, operations, send_operation_d_exports as send, 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_broadcast_cancel_operation = require("./cancel.operation.js");
3
4
  const require_nodes_Resend_actions_broadcast_create_operation = require("./create.operation.js");
4
5
  const require_nodes_Resend_actions_broadcast_delete_operation = require("./delete.operation.js");
5
6
  const require_nodes_Resend_actions_broadcast_get_operation = require("./get.operation.js");
@@ -9,6 +10,7 @@ const require_nodes_Resend_actions_broadcast_update_operation = require("./updat
9
10
  const require_nodes_Resend_actions_broadcast_execute = require("./execute.js");
10
11
  //#region nodes/Resend/actions/broadcast/index.ts
11
12
  var broadcast_exports = /* @__PURE__ */ require_runtime.__exportAll({
13
+ cancel: () => require_nodes_Resend_actions_broadcast_cancel_operation.cancel_operation_exports,
12
14
  create: () => require_nodes_Resend_actions_broadcast_create_operation.create_operation_exports,
13
15
  delete: () => require_nodes_Resend_actions_broadcast_delete_operation.delete_operation_exports,
14
16
  descriptions: () => descriptions,
@@ -26,6 +28,12 @@ const operations = [{
26
28
  noDataExpression: true,
27
29
  displayOptions: { show: { resource: ["broadcasts"] } },
28
30
  options: [
31
+ {
32
+ name: "Cancel",
33
+ value: "cancel",
34
+ description: "Cancel a broadcast campaign that is queued or scheduled before it is delivered to its audience",
35
+ action: "Cancel a broadcast"
36
+ },
29
37
  {
30
38
  name: "Create",
31
39
  value: "create",
@@ -72,7 +80,8 @@ const descriptions = [
72
80
  ...require_nodes_Resend_actions_broadcast_list_operation.description,
73
81
  ...require_nodes_Resend_actions_broadcast_update_operation.description,
74
82
  ...require_nodes_Resend_actions_broadcast_delete_operation.description,
75
- ...require_nodes_Resend_actions_broadcast_send_operation.description
83
+ ...require_nodes_Resend_actions_broadcast_send_operation.description,
84
+ ...require_nodes_Resend_actions_broadcast_cancel_operation.description
76
85
  ];
77
86
  //#endregion
78
87
  Object.defineProperty(exports, "broadcast_exports", {
@@ -81,6 +90,12 @@ Object.defineProperty(exports, "broadcast_exports", {
81
90
  return broadcast_exports;
82
91
  }
83
92
  });
93
+ Object.defineProperty(exports, "cancel", {
94
+ enumerable: true,
95
+ get: function() {
96
+ return require_nodes_Resend_actions_broadcast_cancel_operation.cancel_operation_exports;
97
+ }
98
+ });
84
99
  Object.defineProperty(exports, "create", {
85
100
  enumerable: true,
86
101
  get: function() {
@@ -27,6 +27,10 @@ const webhookEventOptions = [
27
27
  name: "Contact Deleted",
28
28
  value: "contact.deleted"
29
29
  },
30
+ {
31
+ name: "Contact Topics Updated",
32
+ value: "contact.topics.updated"
33
+ },
30
34
  {
31
35
  name: "Contact Updated",
32
36
  value: "contact.updated"
@@ -94,6 +98,18 @@ const webhookEventOptions = [
94
98
  {
95
99
  name: "Suppression Removed",
96
100
  value: "suppression.removed"
101
+ },
102
+ {
103
+ name: "Topic Created",
104
+ value: "topic.created"
105
+ },
106
+ {
107
+ name: "Topic Deleted",
108
+ value: "topic.deleted"
109
+ },
110
+ {
111
+ name: "Topic Updated",
112
+ value: "topic.updated"
97
113
  }
98
114
  ];
99
115
  const operations = [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-resend",
3
- "version": "2.7.0",
3
+ "version": "2.9.0",
4
4
  "description": "Resend integration for n8n: Email, Broadcasts, Templates, Domains, Contacts, Segments, Topics, Webhooks, Workflows, Events, and more",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",