n8n-nodes-resend 2.9.0 → 3.0.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.
Files changed (154) hide show
  1. package/README.md +29 -17
  2. package/dist/nodes/Resend/Resend.node.js +18 -11
  3. package/dist/nodes/Resend/ResendTrigger.node.js +7 -100
  4. package/dist/nodes/Resend/actions/account/execute.d.ts +2 -1
  5. package/dist/nodes/Resend/actions/account/execute.js +8 -1
  6. package/dist/nodes/Resend/actions/account/getUsage.operation.d.ts +8 -0
  7. package/dist/nodes/Resend/actions/{workflow/list.operation.js → account/getUsage.operation.js} +9 -7
  8. package/dist/nodes/Resend/actions/account/index.d.ts +4 -1
  9. package/dist/nodes/Resend/actions/account/index.js +58 -8
  10. package/dist/nodes/Resend/actions/account/listGrants.operation.d.ts +8 -0
  11. package/dist/nodes/Resend/actions/account/listGrants.operation.js +44 -0
  12. package/dist/nodes/Resend/actions/account/revokeGrant.operation.d.ts +8 -0
  13. package/dist/nodes/Resend/actions/account/revokeGrant.operation.js +37 -0
  14. package/dist/nodes/Resend/actions/{workflow → automation}/create.operation.js +19 -19
  15. package/dist/nodes/Resend/actions/{workflow → automation}/delete.operation.js +7 -7
  16. package/dist/nodes/Resend/actions/automation/duplicate.operation.d.ts +8 -0
  17. package/dist/nodes/Resend/actions/automation/duplicate.operation.js +37 -0
  18. package/dist/nodes/Resend/actions/automation/execute.d.ts +5 -0
  19. package/dist/nodes/Resend/actions/automation/execute.js +24 -0
  20. package/dist/nodes/Resend/actions/{workflow → automation}/get.operation.js +7 -7
  21. package/dist/nodes/Resend/actions/{workflow → automation}/getRun.operation.js +9 -9
  22. package/dist/nodes/Resend/actions/{workflow → automation}/index.d.ts +4 -4
  23. package/dist/nodes/Resend/actions/automation/index.js +167 -0
  24. package/dist/nodes/Resend/actions/automation/list.operation.js +75 -0
  25. package/dist/nodes/Resend/actions/automation/listRuns.operation.js +95 -0
  26. package/dist/nodes/Resend/actions/automation/stop.operation.d.ts +8 -0
  27. package/dist/nodes/Resend/actions/automation/stop.operation.js +37 -0
  28. package/dist/nodes/Resend/actions/automation/update.operation.js +120 -0
  29. package/dist/nodes/Resend/actions/broadcast/create.operation.js +34 -4
  30. package/dist/nodes/Resend/actions/broadcast/duplicate.operation.d.ts +8 -0
  31. package/dist/nodes/Resend/actions/broadcast/duplicate.operation.js +37 -0
  32. package/dist/nodes/Resend/actions/broadcast/execute.d.ts +2 -1
  33. package/dist/nodes/Resend/actions/broadcast/execute.js +7 -1
  34. package/dist/nodes/Resend/actions/broadcast/index.d.ts +4 -1
  35. package/dist/nodes/Resend/actions/broadcast/index.js +47 -2
  36. package/dist/nodes/Resend/actions/broadcast/listClickedLinks.operation.d.ts +8 -0
  37. package/dist/nodes/Resend/actions/broadcast/listClickedLinks.operation.js +63 -0
  38. package/dist/nodes/Resend/actions/broadcast/listRecipients.operation.d.ts +8 -0
  39. package/dist/nodes/Resend/actions/broadcast/listRecipients.operation.js +169 -0
  40. package/dist/nodes/Resend/actions/broadcast/update.operation.js +11 -1
  41. package/dist/nodes/Resend/actions/contact/create.operation.js +27 -19
  42. package/dist/nodes/Resend/actions/contact/createImport.operation.d.ts +8 -0
  43. package/dist/nodes/Resend/actions/contact/createImport.operation.js +198 -0
  44. package/dist/nodes/Resend/actions/contact/execute.d.ts +2 -1
  45. package/dist/nodes/Resend/actions/contact/execute.js +10 -2
  46. package/dist/nodes/Resend/actions/contact/getImport.operation.d.ts +8 -0
  47. package/dist/nodes/Resend/actions/contact/getImport.operation.js +37 -0
  48. package/dist/nodes/Resend/actions/contact/getTopics.operation.js +2 -9
  49. package/dist/nodes/Resend/actions/contact/index.d.ts +4 -1
  50. package/dist/nodes/Resend/actions/contact/index.js +46 -1
  51. package/dist/nodes/Resend/actions/contact/list.operation.js +2 -3
  52. package/dist/nodes/Resend/actions/contact/listImports.operation.d.ts +8 -0
  53. package/dist/nodes/Resend/actions/contact/listImports.operation.js +90 -0
  54. package/dist/nodes/Resend/actions/contact/listSegments.operation.js +2 -9
  55. package/dist/nodes/Resend/actions/contact/properties.d.ts +12 -0
  56. package/dist/nodes/Resend/actions/contact/properties.js +55 -0
  57. package/dist/nodes/Resend/actions/contact/update.operation.js +25 -17
  58. package/dist/nodes/Resend/actions/contact/updateTopics.operation.js +2 -2
  59. package/dist/nodes/Resend/actions/contactProperty/create.operation.js +6 -1
  60. package/dist/nodes/Resend/actions/contactProperty/execute.d.ts +2 -1
  61. package/dist/nodes/Resend/actions/contactProperty/list.operation.js +23 -1
  62. package/dist/nodes/Resend/actions/domain/create.operation.js +11 -2
  63. package/dist/nodes/Resend/actions/domain/execute.d.ts +2 -1
  64. package/dist/nodes/Resend/actions/domain/execute.js +1 -11
  65. package/dist/nodes/Resend/actions/domain/index.d.ts +1 -6
  66. package/dist/nodes/Resend/actions/domain/index.js +3 -78
  67. package/dist/nodes/Resend/actions/domain/update.operation.js +47 -2
  68. package/dist/nodes/Resend/actions/email/execute.d.ts +2 -1
  69. package/dist/nodes/Resend/actions/email/execute.js +5 -1
  70. package/dist/nodes/Resend/actions/email/getMetrics.operation.d.ts +8 -0
  71. package/dist/nodes/Resend/actions/email/getMetrics.operation.js +256 -0
  72. package/dist/nodes/Resend/actions/email/index.d.ts +3 -1
  73. package/dist/nodes/Resend/actions/email/index.js +31 -1
  74. package/dist/nodes/Resend/actions/email/listAttachments.operation.js +2 -9
  75. package/dist/nodes/Resend/actions/email/send.operation.js +13 -16
  76. package/dist/nodes/Resend/actions/email/sendBatch.operation.js +1 -3
  77. package/dist/nodes/Resend/actions/email/share.operation.d.ts +8 -0
  78. package/dist/nodes/Resend/actions/email/share.operation.js +51 -0
  79. package/dist/nodes/Resend/actions/event/execute.d.ts +2 -1
  80. package/dist/nodes/Resend/actions/event/list.operation.js +23 -1
  81. package/dist/nodes/Resend/actions/event/send.operation.js +1 -1
  82. package/dist/nodes/Resend/actions/event/update.operation.js +2 -2
  83. package/dist/nodes/Resend/actions/log/execute.d.ts +2 -1
  84. package/dist/nodes/Resend/actions/receivingEmail/execute.d.ts +2 -1
  85. package/dist/nodes/Resend/actions/receivingEmail/get.operation.js +31 -2
  86. package/dist/nodes/Resend/actions/receivingEmail/list.operation.js +23 -1
  87. package/dist/nodes/Resend/actions/receivingEmail/listAttachments.operation.js +2 -9
  88. package/dist/nodes/Resend/actions/router.js +42 -18
  89. package/dist/nodes/Resend/actions/segment/execute.d.ts +2 -1
  90. package/dist/nodes/Resend/actions/segment/execute.js +6 -4
  91. package/dist/nodes/Resend/actions/segment/getMetrics.operation.d.ts +8 -0
  92. package/dist/nodes/Resend/actions/segment/getMetrics.operation.js +84 -0
  93. package/dist/nodes/Resend/actions/segment/index.d.ts +3 -1
  94. package/dist/nodes/Resend/actions/segment/index.js +31 -1
  95. package/dist/nodes/Resend/actions/segment/listContacts.operation.d.ts +1 -1
  96. package/dist/nodes/Resend/actions/segment/listContacts.operation.js +6 -4
  97. package/dist/nodes/Resend/actions/segment/update.operation.d.ts +8 -0
  98. package/dist/nodes/Resend/actions/segment/update.operation.js +50 -0
  99. package/dist/nodes/Resend/actions/suppression/execute.d.ts +2 -1
  100. package/dist/nodes/Resend/actions/template/create.operation.js +51 -14
  101. package/dist/nodes/Resend/actions/template/execute.d.ts +2 -1
  102. package/dist/nodes/Resend/actions/template/list.operation.js +23 -1
  103. package/dist/nodes/Resend/actions/template/update.operation.js +5 -9
  104. package/dist/nodes/Resend/actions/topic/create.operation.js +1 -1
  105. package/dist/nodes/Resend/actions/topic/execute.d.ts +2 -1
  106. package/dist/nodes/Resend/actions/topic/list.operation.js +23 -1
  107. package/dist/nodes/Resend/actions/webhook/create.operation.js +3 -3
  108. package/dist/nodes/Resend/actions/webhook/events.d.ts +5 -0
  109. package/dist/nodes/Resend/actions/webhook/events.js +98 -0
  110. package/dist/nodes/Resend/actions/webhook/execute.d.ts +2 -1
  111. package/dist/nodes/Resend/actions/webhook/execute.js +11 -1
  112. package/dist/nodes/Resend/actions/webhook/getEvent.operation.d.ts +8 -0
  113. package/dist/nodes/Resend/actions/webhook/getEvent.operation.js +39 -0
  114. package/dist/nodes/Resend/actions/webhook/index.d.ts +8 -3
  115. package/dist/nodes/Resend/actions/webhook/index.js +79 -97
  116. package/dist/nodes/Resend/actions/webhook/list.operation.js +23 -1
  117. package/dist/nodes/Resend/actions/{domain/getTrackingDomain.operation.d.ts → webhook/listEventAttempts.operation.d.ts} +2 -2
  118. package/dist/nodes/Resend/actions/webhook/listEventAttempts.operation.js +66 -0
  119. package/dist/nodes/Resend/actions/webhook/listEvents.operation.d.ts +8 -0
  120. package/dist/nodes/Resend/actions/webhook/listEvents.operation.js +63 -0
  121. package/dist/nodes/Resend/actions/webhook/replayEvent.operation.d.ts +8 -0
  122. package/dist/nodes/Resend/actions/webhook/replayEvent.operation.js +39 -0
  123. package/dist/nodes/Resend/actions/{domain/listTrackingDomains.operation.d.ts → webhook/rotateSigningSecret.operation.d.ts} +2 -2
  124. package/dist/nodes/Resend/actions/webhook/rotateSigningSecret.operation.js +37 -0
  125. package/dist/nodes/Resend/actions/webhook/shared.d.ts +6 -0
  126. package/dist/nodes/Resend/actions/webhook/shared.js +27 -0
  127. package/dist/nodes/Resend/actions/webhook/update.operation.js +3 -3
  128. package/dist/nodes/Resend/transport/index.d.ts +8 -3
  129. package/dist/nodes/Resend/transport/index.js +27 -6
  130. package/package.json +7 -7
  131. package/dist/nodes/Resend/actions/domain/createTrackingDomain.operation.d.ts +0 -8
  132. package/dist/nodes/Resend/actions/domain/createTrackingDomain.operation.js +0 -50
  133. package/dist/nodes/Resend/actions/domain/deleteTrackingDomain.operation.d.ts +0 -8
  134. package/dist/nodes/Resend/actions/domain/deleteTrackingDomain.operation.js +0 -50
  135. package/dist/nodes/Resend/actions/domain/getTrackingDomain.operation.js +0 -50
  136. package/dist/nodes/Resend/actions/domain/listTrackingDomains.operation.js +0 -43
  137. package/dist/nodes/Resend/actions/domain/verifyTrackingDomain.operation.d.ts +0 -8
  138. package/dist/nodes/Resend/actions/domain/verifyTrackingDomain.operation.js +0 -50
  139. package/dist/nodes/Resend/actions/workflow/execute.d.ts +0 -4
  140. package/dist/nodes/Resend/actions/workflow/execute.js +0 -24
  141. package/dist/nodes/Resend/actions/workflow/getRunStep.operation.d.ts +0 -8
  142. package/dist/nodes/Resend/actions/workflow/getRunStep.operation.js +0 -67
  143. package/dist/nodes/Resend/actions/workflow/index.js +0 -167
  144. package/dist/nodes/Resend/actions/workflow/listRunSteps.operation.d.ts +0 -8
  145. package/dist/nodes/Resend/actions/workflow/listRunSteps.operation.js +0 -56
  146. package/dist/nodes/Resend/actions/workflow/listRuns.operation.js +0 -43
  147. package/dist/nodes/Resend/actions/workflow/update.operation.js +0 -56
  148. /package/dist/nodes/Resend/actions/{workflow → automation}/create.operation.d.ts +0 -0
  149. /package/dist/nodes/Resend/actions/{workflow → automation}/delete.operation.d.ts +0 -0
  150. /package/dist/nodes/Resend/actions/{workflow → automation}/get.operation.d.ts +0 -0
  151. /package/dist/nodes/Resend/actions/{workflow → automation}/getRun.operation.d.ts +0 -0
  152. /package/dist/nodes/Resend/actions/{workflow → automation}/list.operation.d.ts +0 -0
  153. /package/dist/nodes/Resend/actions/{workflow → automation}/listRuns.operation.d.ts +0 -0
  154. /package/dist/nodes/Resend/actions/{workflow → automation}/update.operation.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_nodes_Resend_transport_index = require("../../transport/index.js");
4
- //#region nodes/Resend/actions/workflow/create.operation.ts
4
+ //#region nodes/Resend/actions/automation/create.operation.ts
5
5
  var create_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
6
6
  description: () => description,
7
7
  execute: () => execute
@@ -9,40 +9,40 @@ var create_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
9
9
  const description = [
10
10
  {
11
11
  displayName: "Name",
12
- name: "workflowName",
12
+ name: "automationName",
13
13
  type: "string",
14
14
  required: true,
15
15
  default: "",
16
16
  placeholder: "Welcome series",
17
17
  displayOptions: { show: {
18
- resource: ["workflows"],
18
+ resource: ["automations"],
19
19
  operation: ["create"]
20
20
  } },
21
- description: "The name of the workflow"
21
+ description: "The name of the automation"
22
22
  },
23
23
  {
24
24
  displayName: "Steps (JSON)",
25
- name: "workflowSteps",
25
+ name: "automationSteps",
26
26
  type: "json",
27
27
  required: true,
28
- default: "[\n {\n \"ref\": \"trigger\",\n \"type\": \"trigger\",\n \"config\": { \"eventName\": \"user.created\" }\n }\n]",
28
+ default: "[\n {\n \"key\": \"trigger\",\n \"type\": \"trigger\",\n \"config\": { \"event_name\": \"user.created\" }\n }\n]",
29
29
  displayOptions: { show: {
30
- resource: ["workflows"],
30
+ resource: ["automations"],
31
31
  operation: ["create"]
32
32
  } },
33
- description: "An array of step objects that define the workflow's actions. Must include at least one trigger step. Step types: trigger, send_email, delay, wait_for_event, condition."
33
+ description: "An array of step objects that define the automation's actions. Must include at least one trigger step. Step types: trigger, send_email, delay, wait_for_event, condition, contact_update, contact_delete, add_to_segment."
34
34
  },
35
35
  {
36
- displayName: "Edges (JSON)",
37
- name: "workflowEdges",
36
+ displayName: "Connections (JSON)",
37
+ name: "automationConnections",
38
38
  type: "json",
39
39
  required: true,
40
40
  default: "[]",
41
41
  displayOptions: { show: {
42
- resource: ["workflows"],
42
+ resource: ["automations"],
43
43
  operation: ["create"]
44
44
  } },
45
- description: "An array of edge objects that define connections between steps. Can be an empty array for single-step workflows."
45
+ description: "An array of connection objects that define the links between steps. Can be an empty array for single-step automations."
46
46
  },
47
47
  {
48
48
  displayName: "Additional Options",
@@ -51,7 +51,7 @@ const description = [
51
51
  placeholder: "Add Option",
52
52
  default: {},
53
53
  displayOptions: { show: {
54
- resource: ["workflows"],
54
+ resource: ["automations"],
55
55
  operation: ["create"]
56
56
  } },
57
57
  options: [{
@@ -66,23 +66,23 @@ const description = [
66
66
  value: "disabled"
67
67
  }],
68
68
  default: "disabled",
69
- description: "The status of the workflow. Defaults to disabled."
69
+ description: "The status of the automation. Defaults to disabled."
70
70
  }]
71
71
  }
72
72
  ];
73
73
  async function execute(index) {
74
- const name = this.getNodeParameter("workflowName", index);
75
- const steps = this.getNodeParameter("workflowSteps", index);
76
- const edges = this.getNodeParameter("workflowEdges", index);
74
+ const name = this.getNodeParameter("automationName", index);
75
+ const steps = this.getNodeParameter("automationSteps", index);
76
+ const connections = this.getNodeParameter("automationConnections", index);
77
77
  const additionalOptions = this.getNodeParameter("additionalOptions", index, {});
78
78
  const body = {
79
79
  name,
80
80
  steps: typeof steps === "string" ? JSON.parse(steps) : steps,
81
- edges: typeof edges === "string" ? JSON.parse(edges) : edges
81
+ connections: typeof connections === "string" ? JSON.parse(connections) : connections
82
82
  };
83
83
  if (additionalOptions.status) body.status = additionalOptions.status;
84
84
  return [{
85
- json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", "/workflows", body),
85
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", "/automations", body),
86
86
  pairedItem: { item: index }
87
87
  }];
88
88
  }
@@ -1,28 +1,28 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_nodes_Resend_transport_index = require("../../transport/index.js");
4
- //#region nodes/Resend/actions/workflow/delete.operation.ts
4
+ //#region nodes/Resend/actions/automation/delete.operation.ts
5
5
  var delete_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
6
6
  description: () => description,
7
7
  execute: () => execute
8
8
  });
9
9
  const description = [{
10
- displayName: "Workflow ID",
11
- name: "workflowId",
10
+ displayName: "Automation ID",
11
+ name: "automationId",
12
12
  type: "string",
13
13
  required: true,
14
14
  default: "",
15
15
  placeholder: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
16
16
  displayOptions: { show: {
17
- resource: ["workflows"],
17
+ resource: ["automations"],
18
18
  operation: ["delete"]
19
19
  } },
20
- description: "The unique identifier of the workflow to delete"
20
+ description: "The unique identifier of the automation to delete"
21
21
  }];
22
22
  async function execute(index) {
23
- const workflowId = this.getNodeParameter("workflowId", index);
23
+ const automationId = this.getNodeParameter("automationId", index);
24
24
  return [{
25
- json: await require_nodes_Resend_transport_index.apiRequest.call(this, "DELETE", `/workflows/${encodeURIComponent(workflowId)}`),
25
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "DELETE", `/automations/${encodeURIComponent(automationId)}`),
26
26
  pairedItem: { item: index }
27
27
  }];
28
28
  }
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace duplicate_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, duplicate_operation_d_exports, 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
+ //#region nodes/Resend/actions/automation/duplicate.operation.ts
5
+ var duplicate_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: ["duplicate"]
19
+ } },
20
+ description: "The unique identifier of the automation to duplicate"
21
+ }];
22
+ async function execute(index) {
23
+ const automationId = this.getNodeParameter("automationId", index);
24
+ return [{
25
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", `/automations/${encodeURIComponent(automationId)}/duplicate`),
26
+ pairedItem: { item: index }
27
+ }];
28
+ }
29
+ //#endregion
30
+ exports.description = description;
31
+ Object.defineProperty(exports, "duplicate_operation_exports", {
32
+ enumerable: true,
33
+ get: function() {
34
+ return duplicate_operation_exports;
35
+ }
36
+ });
37
+ exports.execute = execute;
@@ -0,0 +1,5 @@
1
+ import { OperationRouter } from "../../transport/index.js";
2
+ //#region nodes/Resend/actions/automation/execute.d.ts
3
+ declare const execute: OperationRouter;
4
+ //#endregion
5
+ export { execute };
@@ -0,0 +1,24 @@
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_automation_create_operation = require("./create.operation.js");
4
+ const require_nodes_Resend_actions_automation_delete_operation = require("./delete.operation.js");
5
+ const require_nodes_Resend_actions_automation_duplicate_operation = require("./duplicate.operation.js");
6
+ const require_nodes_Resend_actions_automation_get_operation = require("./get.operation.js");
7
+ const require_nodes_Resend_actions_automation_getRun_operation = require("./getRun.operation.js");
8
+ const require_nodes_Resend_actions_automation_list_operation = require("./list.operation.js");
9
+ const require_nodes_Resend_actions_automation_listRuns_operation = require("./listRuns.operation.js");
10
+ const require_nodes_Resend_actions_automation_stop_operation = require("./stop.operation.js");
11
+ const require_nodes_Resend_actions_automation_update_operation = require("./update.operation.js");
12
+ //#region nodes/Resend/actions/automation/execute.ts
13
+ const execute = require_nodes_Resend_transport_index.createOperationRouter({
14
+ create: require_nodes_Resend_actions_automation_create_operation.create_operation_exports,
15
+ get: require_nodes_Resend_actions_automation_get_operation.get_operation_exports,
16
+ update: require_nodes_Resend_actions_automation_update_operation.update_operation_exports,
17
+ delete: require_nodes_Resend_actions_automation_delete_operation.delete_operation_exports,
18
+ duplicate: require_nodes_Resend_actions_automation_duplicate_operation.duplicate_operation_exports,
19
+ stop: require_nodes_Resend_actions_automation_stop_operation.stop_operation_exports,
20
+ listRuns: require_nodes_Resend_actions_automation_listRuns_operation.listRuns_operation_exports,
21
+ getRun: require_nodes_Resend_actions_automation_getRun_operation.getRun_operation_exports
22
+ }, { list: require_nodes_Resend_actions_automation_list_operation.list_operation_exports });
23
+ //#endregion
24
+ exports.execute = execute;
@@ -1,28 +1,28 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_nodes_Resend_transport_index = require("../../transport/index.js");
4
- //#region nodes/Resend/actions/workflow/get.operation.ts
4
+ //#region nodes/Resend/actions/automation/get.operation.ts
5
5
  var get_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
6
6
  description: () => description,
7
7
  execute: () => execute
8
8
  });
9
9
  const description = [{
10
- displayName: "Workflow ID",
11
- name: "workflowId",
10
+ displayName: "Automation ID",
11
+ name: "automationId",
12
12
  type: "string",
13
13
  required: true,
14
14
  default: "",
15
15
  placeholder: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
16
16
  displayOptions: { show: {
17
- resource: ["workflows"],
17
+ resource: ["automations"],
18
18
  operation: ["get"]
19
19
  } },
20
- description: "The unique identifier of the workflow to retrieve"
20
+ description: "The unique identifier of the automation to retrieve"
21
21
  }];
22
22
  async function execute(index) {
23
- const workflowId = this.getNodeParameter("workflowId", index);
23
+ const automationId = this.getNodeParameter("automationId", index);
24
24
  return [{
25
- json: await require_nodes_Resend_transport_index.apiRequest.call(this, "GET", `/workflows/${encodeURIComponent(workflowId)}`),
25
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "GET", `/automations/${encodeURIComponent(automationId)}`),
26
26
  pairedItem: { item: index }
27
27
  }];
28
28
  }
@@ -1,23 +1,23 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
3
3
  const require_nodes_Resend_transport_index = require("../../transport/index.js");
4
- //#region nodes/Resend/actions/workflow/getRun.operation.ts
4
+ //#region nodes/Resend/actions/automation/getRun.operation.ts
5
5
  var getRun_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
6
6
  description: () => description,
7
7
  execute: () => execute
8
8
  });
9
9
  const description = [{
10
- displayName: "Workflow ID",
11
- name: "workflowId",
10
+ displayName: "Automation ID",
11
+ name: "automationId",
12
12
  type: "string",
13
13
  required: true,
14
14
  default: "",
15
15
  placeholder: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
16
16
  displayOptions: { show: {
17
- resource: ["workflows"],
17
+ resource: ["automations"],
18
18
  operation: ["getRun"]
19
19
  } },
20
- description: "The unique identifier of the workflow"
20
+ description: "The unique identifier of the automation"
21
21
  }, {
22
22
  displayName: "Run ID",
23
23
  name: "runId",
@@ -26,16 +26,16 @@ const description = [{
26
26
  default: "",
27
27
  placeholder: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
28
28
  displayOptions: { show: {
29
- resource: ["workflows"],
29
+ resource: ["automations"],
30
30
  operation: ["getRun"]
31
31
  } },
32
- description: "The unique identifier of the workflow run"
32
+ description: "The unique identifier of the automation run"
33
33
  }];
34
34
  async function execute(index) {
35
- const workflowId = this.getNodeParameter("workflowId", index);
35
+ const automationId = this.getNodeParameter("automationId", index);
36
36
  const runId = this.getNodeParameter("runId", index);
37
37
  return [{
38
- json: await require_nodes_Resend_transport_index.apiRequest.call(this, "GET", `/workflows/${encodeURIComponent(workflowId)}/runs/${encodeURIComponent(runId)}`),
38
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "GET", `/automations/${encodeURIComponent(automationId)}/runs/${encodeURIComponent(runId)}`),
39
39
  pairedItem: { item: index }
40
40
  }];
41
41
  }
@@ -1,16 +1,16 @@
1
1
  import { create_operation_d_exports } from "./create.operation.js";
2
2
  import { delete_operation_d_exports } from "./delete.operation.js";
3
+ import { duplicate_operation_d_exports } from "./duplicate.operation.js";
3
4
  import { execute } from "./execute.js";
4
5
  import { get_operation_d_exports } from "./get.operation.js";
5
6
  import { getRun_operation_d_exports } from "./getRun.operation.js";
6
- import { getRunStep_operation_d_exports } from "./getRunStep.operation.js";
7
7
  import { list_operation_d_exports } from "./list.operation.js";
8
- import { listRunSteps_operation_d_exports } from "./listRunSteps.operation.js";
9
8
  import { listRuns_operation_d_exports } from "./listRuns.operation.js";
9
+ import { stop_operation_d_exports } from "./stop.operation.js";
10
10
  import { update_operation_d_exports } from "./update.operation.js";
11
11
  import { INodeProperties } from "n8n-workflow";
12
- //#region nodes/Resend/actions/workflow/index.d.ts
12
+ //#region nodes/Resend/actions/automation/index.d.ts
13
13
  declare const operations: INodeProperties[];
14
14
  declare const descriptions: INodeProperties[];
15
15
  //#endregion
16
- export { create_operation_d_exports as create, delete_operation_d_exports as delete, descriptions, execute, get_operation_d_exports as get, getRun_operation_d_exports as getRun, getRunStep_operation_d_exports as getRunStep, list_operation_d_exports as list, listRunSteps_operation_d_exports as listRunSteps, listRuns_operation_d_exports as listRuns, operations, update_operation_d_exports as update };
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 };
@@ -0,0 +1,167 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
3
+ const require_nodes_Resend_actions_automation_create_operation = require("./create.operation.js");
4
+ const require_nodes_Resend_actions_automation_delete_operation = require("./delete.operation.js");
5
+ const require_nodes_Resend_actions_automation_duplicate_operation = require("./duplicate.operation.js");
6
+ const require_nodes_Resend_actions_automation_get_operation = require("./get.operation.js");
7
+ const require_nodes_Resend_actions_automation_getRun_operation = require("./getRun.operation.js");
8
+ const require_nodes_Resend_actions_automation_list_operation = require("./list.operation.js");
9
+ const require_nodes_Resend_actions_automation_listRuns_operation = require("./listRuns.operation.js");
10
+ const require_nodes_Resend_actions_automation_stop_operation = require("./stop.operation.js");
11
+ const require_nodes_Resend_actions_automation_update_operation = require("./update.operation.js");
12
+ const require_nodes_Resend_actions_automation_execute = require("./execute.js");
13
+ //#region nodes/Resend/actions/automation/index.ts
14
+ var automation_exports = /* @__PURE__ */ require_runtime.__exportAll({
15
+ create: () => require_nodes_Resend_actions_automation_create_operation.create_operation_exports,
16
+ delete: () => require_nodes_Resend_actions_automation_delete_operation.delete_operation_exports,
17
+ descriptions: () => descriptions,
18
+ duplicate: () => require_nodes_Resend_actions_automation_duplicate_operation.duplicate_operation_exports,
19
+ execute: () => require_nodes_Resend_actions_automation_execute.execute,
20
+ get: () => require_nodes_Resend_actions_automation_get_operation.get_operation_exports,
21
+ getRun: () => require_nodes_Resend_actions_automation_getRun_operation.getRun_operation_exports,
22
+ list: () => require_nodes_Resend_actions_automation_list_operation.list_operation_exports,
23
+ listRuns: () => require_nodes_Resend_actions_automation_listRuns_operation.listRuns_operation_exports,
24
+ operations: () => operations,
25
+ stop: () => require_nodes_Resend_actions_automation_stop_operation.stop_operation_exports,
26
+ update: () => require_nodes_Resend_actions_automation_update_operation.update_operation_exports
27
+ });
28
+ const operations = [{
29
+ displayName: "Operation",
30
+ name: "operation",
31
+ type: "options",
32
+ noDataExpression: true,
33
+ displayOptions: { show: { resource: ["automations"] } },
34
+ options: [
35
+ {
36
+ name: "Create",
37
+ value: "create",
38
+ description: "Create a new automation to automate email sequences",
39
+ action: "Create an automation"
40
+ },
41
+ {
42
+ name: "Delete",
43
+ value: "delete",
44
+ description: "Remove an existing automation",
45
+ action: "Delete an automation"
46
+ },
47
+ {
48
+ name: "Duplicate",
49
+ value: "duplicate",
50
+ description: "Create a copy of an existing automation",
51
+ action: "Duplicate an automation"
52
+ },
53
+ {
54
+ name: "Get",
55
+ value: "get",
56
+ description: "Retrieve a single automation with its steps and connections",
57
+ action: "Get automation details"
58
+ },
59
+ {
60
+ name: "Get Run",
61
+ value: "getRun",
62
+ description: "Retrieve a single automation run",
63
+ action: "Get an automation run"
64
+ },
65
+ {
66
+ name: "List",
67
+ value: "list",
68
+ description: "Retrieve a list of automations",
69
+ action: "List all automations"
70
+ },
71
+ {
72
+ name: "List Runs",
73
+ value: "listRuns",
74
+ description: "Retrieve a list of automation runs",
75
+ action: "List automation runs"
76
+ },
77
+ {
78
+ name: "Stop",
79
+ value: "stop",
80
+ description: "Stop a running automation and disable it",
81
+ action: "Stop an automation"
82
+ },
83
+ {
84
+ name: "Update",
85
+ value: "update",
86
+ description: "Update an existing automation (enable or disable)",
87
+ action: "Update an automation"
88
+ }
89
+ ],
90
+ default: "list"
91
+ }];
92
+ const descriptions = [
93
+ ...operations,
94
+ ...require_nodes_Resend_actions_automation_create_operation.description,
95
+ ...require_nodes_Resend_actions_automation_get_operation.description,
96
+ ...require_nodes_Resend_actions_automation_list_operation.description,
97
+ ...require_nodes_Resend_actions_automation_update_operation.description,
98
+ ...require_nodes_Resend_actions_automation_delete_operation.description,
99
+ ...require_nodes_Resend_actions_automation_duplicate_operation.description,
100
+ ...require_nodes_Resend_actions_automation_stop_operation.description,
101
+ ...require_nodes_Resend_actions_automation_listRuns_operation.description,
102
+ ...require_nodes_Resend_actions_automation_getRun_operation.description
103
+ ];
104
+ //#endregion
105
+ Object.defineProperty(exports, "automation_exports", {
106
+ enumerable: true,
107
+ get: function() {
108
+ return automation_exports;
109
+ }
110
+ });
111
+ Object.defineProperty(exports, "create", {
112
+ enumerable: true,
113
+ get: function() {
114
+ return require_nodes_Resend_actions_automation_create_operation.create_operation_exports;
115
+ }
116
+ });
117
+ Object.defineProperty(exports, "delete", {
118
+ enumerable: true,
119
+ get: function() {
120
+ return require_nodes_Resend_actions_automation_delete_operation.delete_operation_exports;
121
+ }
122
+ });
123
+ exports.descriptions = descriptions;
124
+ Object.defineProperty(exports, "duplicate", {
125
+ enumerable: true,
126
+ get: function() {
127
+ return require_nodes_Resend_actions_automation_duplicate_operation.duplicate_operation_exports;
128
+ }
129
+ });
130
+ exports.execute = require_nodes_Resend_actions_automation_execute.execute;
131
+ Object.defineProperty(exports, "get", {
132
+ enumerable: true,
133
+ get: function() {
134
+ return require_nodes_Resend_actions_automation_get_operation.get_operation_exports;
135
+ }
136
+ });
137
+ Object.defineProperty(exports, "getRun", {
138
+ enumerable: true,
139
+ get: function() {
140
+ return require_nodes_Resend_actions_automation_getRun_operation.getRun_operation_exports;
141
+ }
142
+ });
143
+ Object.defineProperty(exports, "list", {
144
+ enumerable: true,
145
+ get: function() {
146
+ return require_nodes_Resend_actions_automation_list_operation.list_operation_exports;
147
+ }
148
+ });
149
+ Object.defineProperty(exports, "listRuns", {
150
+ enumerable: true,
151
+ get: function() {
152
+ return require_nodes_Resend_actions_automation_listRuns_operation.listRuns_operation_exports;
153
+ }
154
+ });
155
+ exports.operations = operations;
156
+ Object.defineProperty(exports, "stop", {
157
+ enumerable: true,
158
+ get: function() {
159
+ return require_nodes_Resend_actions_automation_stop_operation.stop_operation_exports;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "update", {
163
+ enumerable: true,
164
+ get: function() {
165
+ return require_nodes_Resend_actions_automation_update_operation.update_operation_exports;
166
+ }
167
+ });
@@ -0,0 +1,75 @@
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/list.operation.ts
5
+ var list_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
6
+ description: () => description,
7
+ execute: () => execute
8
+ });
9
+ const description = [
10
+ {
11
+ displayName: "Return All",
12
+ name: "returnAll",
13
+ type: "boolean",
14
+ default: false,
15
+ displayOptions: { show: {
16
+ resource: ["automations"],
17
+ operation: ["list"]
18
+ } },
19
+ description: "Whether to return all results or only up to a given limit"
20
+ },
21
+ {
22
+ displayName: "Limit",
23
+ name: "limit",
24
+ type: "number",
25
+ default: 50,
26
+ typeOptions: { minValue: 1 },
27
+ displayOptions: { show: {
28
+ resource: ["automations"],
29
+ operation: ["list"],
30
+ returnAll: [false]
31
+ } },
32
+ description: "Max number of results to return"
33
+ },
34
+ {
35
+ displayName: "Status",
36
+ name: "automationStatusFilter",
37
+ type: "options",
38
+ default: "",
39
+ displayOptions: { show: {
40
+ resource: ["automations"],
41
+ operation: ["list"]
42
+ } },
43
+ options: [
44
+ {
45
+ name: "Any",
46
+ value: ""
47
+ },
48
+ {
49
+ name: "Disabled",
50
+ value: "disabled"
51
+ },
52
+ {
53
+ name: "Enabled",
54
+ value: "enabled"
55
+ }
56
+ ],
57
+ description: "Only return automations with this status"
58
+ }
59
+ ];
60
+ async function execute() {
61
+ const status = this.getNodeParameter("automationStatusFilter", 0, "");
62
+ const extraQs = {};
63
+ if (status) extraQs.status = status;
64
+ const items = await require_nodes_Resend_transport_index.requestList.call(this, "/automations", extraQs);
65
+ return require_nodes_Resend_transport_index.createListExecutionData.call(this, items);
66
+ }
67
+ //#endregion
68
+ exports.description = description;
69
+ exports.execute = execute;
70
+ Object.defineProperty(exports, "list_operation_exports", {
71
+ enumerable: true,
72
+ get: function() {
73
+ return list_operation_exports;
74
+ }
75
+ });
@@ -0,0 +1,95 @@
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/listRuns.operation.ts
5
+ var listRuns_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
6
+ description: () => description,
7
+ execute: () => execute
8
+ });
9
+ const description = [
10
+ {
11
+ displayName: "Automation ID",
12
+ name: "automationId",
13
+ type: "string",
14
+ required: true,
15
+ default: "",
16
+ placeholder: "c9b16d4f-ba6c-4e2e-b044-6bf4404e57fd",
17
+ displayOptions: { show: {
18
+ resource: ["automations"],
19
+ operation: ["listRuns"]
20
+ } },
21
+ description: "The unique identifier of the automation to list runs for"
22
+ },
23
+ {
24
+ displayName: "Return All",
25
+ name: "returnAll",
26
+ type: "boolean",
27
+ default: false,
28
+ displayOptions: { show: {
29
+ resource: ["automations"],
30
+ operation: ["listRuns"]
31
+ } },
32
+ description: "Whether to return all results or only up to a given limit"
33
+ },
34
+ {
35
+ displayName: "Limit",
36
+ name: "limit",
37
+ type: "number",
38
+ default: 50,
39
+ typeOptions: { minValue: 1 },
40
+ displayOptions: { show: {
41
+ resource: ["automations"],
42
+ operation: ["listRuns"],
43
+ returnAll: [false]
44
+ } },
45
+ description: "Max number of results to return"
46
+ },
47
+ {
48
+ displayName: "Status",
49
+ name: "automationRunStatus",
50
+ type: "multiOptions",
51
+ default: [],
52
+ displayOptions: { show: {
53
+ resource: ["automations"],
54
+ operation: ["listRuns"]
55
+ } },
56
+ options: [
57
+ {
58
+ name: "Cancelled",
59
+ value: "cancelled"
60
+ },
61
+ {
62
+ name: "Completed",
63
+ value: "completed"
64
+ },
65
+ {
66
+ name: "Failed",
67
+ value: "failed"
68
+ },
69
+ {
70
+ name: "Running",
71
+ value: "running"
72
+ }
73
+ ],
74
+ description: "Only return runs with one of these statuses"
75
+ }
76
+ ];
77
+ async function execute(index) {
78
+ const automationId = this.getNodeParameter("automationId", index);
79
+ const statuses = this.getNodeParameter("automationRunStatus", index, []);
80
+ const extraQs = {};
81
+ if (statuses.length) extraQs.status = statuses.join(",");
82
+ return (await require_nodes_Resend_transport_index.requestList.call(this, `/automations/${encodeURIComponent(automationId)}/runs`, extraQs, index)).map((item) => ({
83
+ json: item,
84
+ pairedItem: { item: index }
85
+ }));
86
+ }
87
+ //#endregion
88
+ exports.description = description;
89
+ exports.execute = execute;
90
+ Object.defineProperty(exports, "listRuns_operation_exports", {
91
+ enumerable: true,
92
+ get: function() {
93
+ return listRuns_operation_exports;
94
+ }
95
+ });