n8n-nodes-resend 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +3 -0
  2. package/dist/nodes/Resend/Resend.node.d.ts +5 -1
  3. package/dist/nodes/Resend/Resend.node.js +26 -1
  4. package/dist/nodes/Resend/ResendTrigger.node.js +1 -1
  5. package/dist/nodes/Resend/actions/inbox/create.operation.d.ts +8 -0
  6. package/dist/nodes/Resend/actions/inbox/create.operation.js +80 -0
  7. package/dist/nodes/Resend/actions/inbox/createLabel.operation.d.ts +8 -0
  8. package/dist/nodes/Resend/actions/inbox/createLabel.operation.js +57 -0
  9. package/dist/nodes/Resend/actions/inbox/delete.operation.d.ts +8 -0
  10. package/dist/nodes/Resend/actions/inbox/delete.operation.js +25 -0
  11. package/dist/nodes/Resend/actions/inbox/deleteLabel.operation.d.ts +8 -0
  12. package/dist/nodes/Resend/actions/inbox/deleteLabel.operation.js +25 -0
  13. package/dist/nodes/Resend/actions/inbox/execute.d.ts +5 -0
  14. package/dist/nodes/Resend/actions/inbox/execute.js +28 -0
  15. package/dist/nodes/Resend/actions/inbox/fields.d.ts +10 -0
  16. package/dist/nodes/Resend/actions/inbox/fields.js +70 -0
  17. package/dist/nodes/Resend/actions/inbox/get.operation.d.ts +8 -0
  18. package/dist/nodes/Resend/actions/inbox/get.operation.js +25 -0
  19. package/dist/nodes/Resend/actions/inbox/getAgent.operation.d.ts +8 -0
  20. package/dist/nodes/Resend/actions/inbox/getAgent.operation.js +25 -0
  21. package/dist/nodes/Resend/actions/inbox/index.d.ts +18 -0
  22. package/dist/nodes/Resend/actions/inbox/index.js +197 -0
  23. package/dist/nodes/Resend/actions/inbox/list.operation.d.ts +8 -0
  24. package/dist/nodes/Resend/actions/inbox/list.operation.js +44 -0
  25. package/dist/nodes/Resend/actions/inbox/listLabels.operation.d.ts +8 -0
  26. package/dist/nodes/Resend/actions/inbox/listLabels.operation.js +26 -0
  27. package/dist/nodes/Resend/actions/inbox/update.operation.d.ts +8 -0
  28. package/dist/nodes/Resend/actions/inbox/update.operation.js +67 -0
  29. package/dist/nodes/Resend/actions/inbox/updateAgent.operation.d.ts +8 -0
  30. package/dist/nodes/Resend/actions/inbox/updateAgent.operation.js +137 -0
  31. package/dist/nodes/Resend/actions/inbox/updateLabel.operation.d.ts +8 -0
  32. package/dist/nodes/Resend/actions/inbox/updateLabel.operation.js +53 -0
  33. package/dist/nodes/Resend/actions/inboxDraft/create.operation.d.ts +8 -0
  34. package/dist/nodes/Resend/actions/inboxDraft/create.operation.js +96 -0
  35. package/dist/nodes/Resend/actions/inboxDraft/delete.operation.d.ts +8 -0
  36. package/dist/nodes/Resend/actions/inboxDraft/delete.operation.js +25 -0
  37. package/dist/nodes/Resend/actions/inboxDraft/execute.d.ts +5 -0
  38. package/dist/nodes/Resend/actions/inboxDraft/execute.js +19 -0
  39. package/dist/nodes/Resend/actions/inboxDraft/get.operation.d.ts +8 -0
  40. package/dist/nodes/Resend/actions/inboxDraft/get.operation.js +25 -0
  41. package/dist/nodes/Resend/actions/inboxDraft/index.d.ts +13 -0
  42. package/dist/nodes/Resend/actions/inboxDraft/index.js +122 -0
  43. package/dist/nodes/Resend/actions/inboxDraft/list.operation.d.ts +8 -0
  44. package/dist/nodes/Resend/actions/inboxDraft/list.operation.js +25 -0
  45. package/dist/nodes/Resend/actions/inboxDraft/send.operation.d.ts +8 -0
  46. package/dist/nodes/Resend/actions/inboxDraft/send.operation.js +42 -0
  47. package/dist/nodes/Resend/actions/inboxDraft/update.operation.d.ts +8 -0
  48. package/dist/nodes/Resend/actions/inboxDraft/update.operation.js +118 -0
  49. package/dist/nodes/Resend/actions/inboxThread/addLabels.operation.d.ts +8 -0
  50. package/dist/nodes/Resend/actions/inboxThread/addLabels.operation.js +33 -0
  51. package/dist/nodes/Resend/actions/inboxThread/delete.operation.d.ts +8 -0
  52. package/dist/nodes/Resend/actions/inboxThread/delete.operation.js +25 -0
  53. package/dist/nodes/Resend/actions/inboxThread/execute.d.ts +5 -0
  54. package/dist/nodes/Resend/actions/inboxThread/execute.js +31 -0
  55. package/dist/nodes/Resend/actions/inboxThread/forward.operation.d.ts +8 -0
  56. package/dist/nodes/Resend/actions/inboxThread/forward.operation.js +97 -0
  57. package/dist/nodes/Resend/actions/inboxThread/get.operation.d.ts +8 -0
  58. package/dist/nodes/Resend/actions/inboxThread/get.operation.js +25 -0
  59. package/dist/nodes/Resend/actions/inboxThread/getEmail.operation.d.ts +8 -0
  60. package/dist/nodes/Resend/actions/inboxThread/getEmail.operation.js +29 -0
  61. package/dist/nodes/Resend/actions/inboxThread/index.d.ts +19 -0
  62. package/dist/nodes/Resend/actions/inboxThread/index.js +212 -0
  63. package/dist/nodes/Resend/actions/inboxThread/list.operation.d.ts +8 -0
  64. package/dist/nodes/Resend/actions/inboxThread/list.operation.js +41 -0
  65. package/dist/nodes/Resend/actions/inboxThread/listEmails.operation.d.ts +8 -0
  66. package/dist/nodes/Resend/actions/inboxThread/listEmails.operation.js +29 -0
  67. package/dist/nodes/Resend/actions/inboxThread/removeLabel.operation.d.ts +8 -0
  68. package/dist/nodes/Resend/actions/inboxThread/removeLabel.operation.js +45 -0
  69. package/dist/nodes/Resend/actions/inboxThread/reply.operation.d.ts +8 -0
  70. package/dist/nodes/Resend/actions/inboxThread/reply.operation.js +99 -0
  71. package/dist/nodes/Resend/actions/inboxThread/search.operation.d.ts +8 -0
  72. package/dist/nodes/Resend/actions/inboxThread/search.operation.js +131 -0
  73. package/dist/nodes/Resend/actions/inboxThread/setLabels.operation.d.ts +8 -0
  74. package/dist/nodes/Resend/actions/inboxThread/setLabels.operation.js +33 -0
  75. package/dist/nodes/Resend/actions/inboxThread/shared.d.ts +45 -0
  76. package/dist/nodes/Resend/actions/inboxThread/shared.js +485 -0
  77. package/dist/nodes/Resend/actions/inboxThread/update.operation.d.ts +8 -0
  78. package/dist/nodes/Resend/actions/inboxThread/update.operation.js +77 -0
  79. package/dist/nodes/Resend/actions/router.js +6 -0
  80. package/dist/nodes/Resend/actions/webhook/events.js +56 -0
  81. package/dist/nodes/Resend/methods/index.d.ts +5 -1
  82. package/dist/nodes/Resend/methods/index.js +50 -2
  83. package/dist/nodes/Resend/transport/index.d.ts +1 -1
  84. package/dist/nodes/Resend/transport/index.js +3 -2
  85. package/dist/nodes/Resend/utils/dynamicFields.d.ts +4 -0
  86. package/dist/nodes/Resend/utils/dynamicFields.js +4 -0
  87. package/package.json +1 -1
package/README.md CHANGED
@@ -51,6 +51,9 @@ The table below shows which endpoints are currently implemented:
51
51
  | **Contact Properties** | `/contact-properties` | ✅ Full | Create, List, Get, Update, Delete |
52
52
  | **Webhooks** | `/webhooks` | ✅ Full | Create, List, Get, Update, Delete, Rotate Signing Secret, List Events, Get Event, Replay Event, List Event Attempts |
53
53
  | **Events** | `/events` | ✅ Full | Create, List, Get, Update, Delete, Send |
54
+ | **Inboxes** | `/inboxes` | ✅ Full | Create, List, Get, Update, Delete, Get Agent Settings, Update Agent Settings, Create Label, List Labels, Update Label, Delete Label |
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
+ | **Inbox Drafts** | `/inboxes/{id}/drafts` | ✅ Full | Create, List, Get, Update, Delete, Send |
54
57
  | **Automations** | `/automations` | ✅ Full | Create, List, Get, Update, Delete, Duplicate, Stop, List Runs, Get Run |
55
58
  | **Logs** | `/logs` | ✅ Full | List, Retrieve |
56
59
 
@@ -1,5 +1,5 @@
1
1
  import { router } from "./actions/router.js";
2
- import { getBroadcasts, getContactProperties, getContacts, getDomains, getEmails, getReceivedEmails, getSegments, getSuppressions, getTemplateVariables, getTemplates, getTopics, getWebhooks } from "./methods/index.js";
2
+ import { getBroadcasts, getContactProperties, getContacts, getDomains, getEmails, getInboxLabels, getInboxes, getReceivedEmails, getSegments, getSuppressions, getTemplateVariables, getTemplates, getTopics, getWebhooks } from "./methods/index.js";
3
3
  import { INodeType, INodeTypeDescription, IWebhookFunctions } from "n8n-workflow";
4
4
  //#region nodes/Resend/Resend.node.d.ts
5
5
  declare class Resend implements INodeType {
@@ -11,6 +11,8 @@ declare class Resend implements INodeType {
11
11
  getContacts: typeof getContacts;
12
12
  getDomains: typeof getDomains;
13
13
  getEmails: typeof getEmails;
14
+ getInboxes: typeof getInboxes;
15
+ getInboxLabels: typeof getInboxLabels;
14
16
  getReceivedEmails: typeof getReceivedEmails;
15
17
  getSegments: typeof getSegments;
16
18
  getSuppressions: typeof getSuppressions;
@@ -25,6 +27,8 @@ declare class Resend implements INodeType {
25
27
  getContacts: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
26
28
  getDomains: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
27
29
  getEmails: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
30
+ getInboxes: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
31
+ getInboxLabels: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
28
32
  getReceivedEmails: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
29
33
  getSegments: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
30
34
  getSuppressions: (this: import("n8n-workflow").ILoadOptionsFunctions, filter?: string) => Promise<import("n8n-workflow").INodeListSearchResult>;
@@ -10,6 +10,9 @@ const require_nodes_Resend_utils_sendAndWait_utils = require("./utils/sendAndWai
10
10
  require("./utils/sendAndWait/index.js");
11
11
  const require_nodes_Resend_actions_email_index = require("./actions/email/index.js");
12
12
  const require_nodes_Resend_actions_event_index = require("./actions/event/index.js");
13
+ const require_nodes_Resend_actions_inbox_index = require("./actions/inbox/index.js");
14
+ const require_nodes_Resend_actions_inboxDraft_index = require("./actions/inboxDraft/index.js");
15
+ const require_nodes_Resend_actions_inboxThread_index = require("./actions/inboxThread/index.js");
13
16
  const require_nodes_Resend_actions_log_index = require("./actions/log/index.js");
14
17
  const require_nodes_Resend_actions_receivingEmail_index = require("./actions/receivingEmail/index.js");
15
18
  const require_nodes_Resend_actions_segment_index = require("./actions/segment/index.js");
@@ -34,7 +37,7 @@ var Resend = class {
34
37
  version: [1, 2],
35
38
  usableAsTool: true,
36
39
  description: "Send emails, manage contacts, create broadcasts, handle templates, domains, segments, topics, and webhooks using the Resend email platform",
37
- subtitle: "={{(() => { const resourceLabels = { account: \"account\", automations: \"automation\", broadcasts: \"broadcast\", contacts: \"contact\", contactProperties: \"contact property\", domains: \"domain\", email: \"email\", logs: \"log\", receivingEmails: \"received email\", 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\" }; 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\", 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; })() }}",
38
41
  defaults: { name: "Resend" },
39
42
  credentials: [{
40
43
  name: "resendOAuth2Api",
@@ -118,6 +121,21 @@ var Resend = class {
118
121
  value: "events",
119
122
  description: "Create, send, retrieve, update, or delete events for triggering automations (private alpha)"
120
123
  },
124
+ {
125
+ name: "Inbox",
126
+ value: "inboxes",
127
+ description: "Create, update, delete, or list inboxes, manage their labels, and configure the inbox AI agent"
128
+ },
129
+ {
130
+ name: "Inbox Draft",
131
+ value: "inboxDrafts",
132
+ description: "Create, edit, and send unsent inbox drafts"
133
+ },
134
+ {
135
+ name: "Inbox Thread",
136
+ value: "inboxThreads",
137
+ description: "Read, organize, reply to, and forward inbox conversation threads"
138
+ },
121
139
  {
122
140
  name: "Log",
123
141
  value: "logs",
@@ -170,6 +188,9 @@ var Resend = class {
170
188
  ...require_nodes_Resend_actions_webhook_index.descriptions,
171
189
  ...require_nodes_Resend_actions_receivingEmail_index.descriptions,
172
190
  ...require_nodes_Resend_actions_event_index.descriptions,
191
+ ...require_nodes_Resend_actions_inbox_index.descriptions,
192
+ ...require_nodes_Resend_actions_inboxThread_index.descriptions,
193
+ ...require_nodes_Resend_actions_inboxDraft_index.descriptions,
173
194
  ...require_nodes_Resend_actions_log_index.descriptions
174
195
  ]
175
196
  };
@@ -180,6 +201,8 @@ var Resend = class {
180
201
  getContacts: require_nodes_Resend_methods_index.getContacts,
181
202
  getDomains: require_nodes_Resend_methods_index.getDomains,
182
203
  getEmails: require_nodes_Resend_methods_index.getEmails,
204
+ getInboxes: require_nodes_Resend_methods_index.getInboxes,
205
+ getInboxLabels: require_nodes_Resend_methods_index.getInboxLabels,
183
206
  getReceivedEmails: require_nodes_Resend_methods_index.getReceivedEmails,
184
207
  getSegments: require_nodes_Resend_methods_index.getSegments,
185
208
  getSuppressions: require_nodes_Resend_methods_index.getSuppressions,
@@ -194,6 +217,8 @@ var Resend = class {
194
217
  getContacts: require_nodes_Resend_methods_index.getContactsListSearch,
195
218
  getDomains: require_nodes_Resend_methods_index.getDomainsListSearch,
196
219
  getEmails: require_nodes_Resend_methods_index.getEmailsListSearch,
220
+ getInboxes: require_nodes_Resend_methods_index.getInboxesListSearch,
221
+ getInboxLabels: require_nodes_Resend_methods_index.getInboxLabelsListSearch,
197
222
  getReceivedEmails: require_nodes_Resend_methods_index.getReceivedEmailsListSearch,
198
223
  getSegments: require_nodes_Resend_methods_index.getSegmentsListSearch,
199
224
  getSuppressions: require_nodes_Resend_methods_index.getSuppressionsListSearch,
@@ -70,7 +70,7 @@ var ResendTrigger = class {
70
70
  group: ["trigger"],
71
71
  version: 1,
72
72
  description: "Triggers workflows when Resend events occur, such as emails being sent, delivered, opened, or bounced or contacts and domains changing. Includes secure webhook signature verification.",
73
- 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\", added: \"add\", removed: \"remove\" }; 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
+ 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\", added: \"add\", removed: \"remove\", assigned: \"assign\", unassigned: \"unassign\" }; 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(\", \"); })() }}",
74
74
  defaults: { name: "Resend Trigger" },
75
75
  credentials: [{
76
76
  name: "resendWebhookSigningSecretApi",
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace create_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 { create_operation_d_exports, description, execute };
@@ -0,0 +1,80 @@
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/inbox/create.operation.ts
6
+ var create_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [{
11
+ displayName: "Email Address",
12
+ name: "inboxEmailAddress",
13
+ type: "string",
14
+ required: true,
15
+ default: "",
16
+ placeholder: "support@example.com",
17
+ displayOptions: { show: {
18
+ resource: ["inboxes"],
19
+ operation: ["create"]
20
+ } },
21
+ description: "The inbox address on one of your domains. The domain must be verified for sending, and for receiving unless forwarding is enabled."
22
+ }, {
23
+ displayName: "Additional Fields",
24
+ name: "inboxCreateFields",
25
+ type: "collection",
26
+ placeholder: "Add Field",
27
+ default: {},
28
+ displayOptions: { show: {
29
+ resource: ["inboxes"],
30
+ operation: ["create"]
31
+ } },
32
+ options: [
33
+ {
34
+ displayName: "Forwarding",
35
+ name: "forwarding",
36
+ type: "boolean",
37
+ default: false,
38
+ description: "Whether Resend should provision a receiving address so mail can be received without adding an MX record"
39
+ },
40
+ {
41
+ displayName: "From Name",
42
+ name: "fromName",
43
+ type: "string",
44
+ default: "",
45
+ placeholder: "Ada from Support",
46
+ description: "The name recipients see when mail is sent from this inbox. Use a plain name, not a full \"Name and address\" sender."
47
+ },
48
+ {
49
+ displayName: "Name",
50
+ name: "name",
51
+ type: "string",
52
+ default: "",
53
+ placeholder: "Customer Support",
54
+ description: "Internal name for the inbox. Recipients do not see it. Defaults to the email address."
55
+ }
56
+ ]
57
+ }];
58
+ async function execute(index) {
59
+ var _this$getNodeParamete;
60
+ const emailAddress = String((_this$getNodeParamete = this.getNodeParameter("inboxEmailAddress", index, "")) !== null && _this$getNodeParamete !== void 0 ? _this$getNodeParamete : "").trim();
61
+ if (!emailAddress) throw new n8n_workflow.NodeOperationError(this.getNode(), "Email Address is required", { itemIndex: index });
62
+ const fields = this.getNodeParameter("inboxCreateFields", index, {});
63
+ const body = { email_address: emailAddress };
64
+ if (fields.name) body.name = fields.name;
65
+ if (fields.fromName) body.from_name = fields.fromName;
66
+ if (fields.forwarding !== void 0) body.forwarding = fields.forwarding;
67
+ return [{
68
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", "/inboxes", body),
69
+ pairedItem: { item: index }
70
+ }];
71
+ }
72
+ //#endregion
73
+ Object.defineProperty(exports, "create_operation_exports", {
74
+ enumerable: true,
75
+ get: function() {
76
+ return create_operation_exports;
77
+ }
78
+ });
79
+ exports.description = description;
80
+ exports.execute = execute;
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace createLabel_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 { createLabel_operation_d_exports, description, execute };
@@ -0,0 +1,57 @@
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_actions_inbox_fields = require("./fields.js");
5
+ //#region nodes/Resend/actions/inbox/createLabel.operation.ts
6
+ var createLabel_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [
11
+ require_nodes_Resend_actions_inbox_fields.inboxIdField("createLabel", "The inbox to create the label in"),
12
+ {
13
+ displayName: "Label Name",
14
+ name: "inboxLabelName",
15
+ type: "string",
16
+ required: true,
17
+ default: "",
18
+ placeholder: "Urgent",
19
+ displayOptions: { show: {
20
+ resource: ["inboxes"],
21
+ operation: ["createLabel"]
22
+ } },
23
+ description: "The name of the label"
24
+ },
25
+ {
26
+ displayName: "Additional Fields",
27
+ name: "inboxLabelCreateFields",
28
+ type: "collection",
29
+ placeholder: "Add Field",
30
+ default: {},
31
+ displayOptions: { show: {
32
+ resource: ["inboxes"],
33
+ operation: ["createLabel"]
34
+ } },
35
+ options: [require_nodes_Resend_actions_inbox_fields.labelColorOption("The color of the label, as a #RRGGBB hex color. It is stored in uppercase. When omitted, a random color from the dashboard palette is used.")]
36
+ }
37
+ ];
38
+ async function execute(index) {
39
+ const name = this.getNodeParameter("inboxLabelName", index);
40
+ const fields = this.getNodeParameter("inboxLabelCreateFields", index, {});
41
+ const body = { name };
42
+ const color = require_nodes_Resend_actions_inbox_fields.readLabelColor(this, fields.color, index);
43
+ if (color) body.color = color;
44
+ return [{
45
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "POST", require_nodes_Resend_actions_inbox_fields.inboxPath(this, index, "/labels"), body),
46
+ pairedItem: { item: index }
47
+ }];
48
+ }
49
+ //#endregion
50
+ Object.defineProperty(exports, "createLabel_operation_exports", {
51
+ enumerable: true,
52
+ get: function() {
53
+ return createLabel_operation_exports;
54
+ }
55
+ });
56
+ exports.description = description;
57
+ exports.execute = execute;
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace delete_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 { delete_operation_d_exports, description, execute };
@@ -0,0 +1,25 @@
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_actions_inbox_fields = require("./fields.js");
5
+ //#region nodes/Resend/actions/inbox/delete.operation.ts
6
+ var delete_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [require_nodes_Resend_actions_inbox_fields.inboxIdField("delete", "The inbox to delete. This action is permanent and cannot be undone.")];
11
+ async function execute(index) {
12
+ return [{
13
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "DELETE", require_nodes_Resend_actions_inbox_fields.inboxPath(this, index)),
14
+ pairedItem: { item: index }
15
+ }];
16
+ }
17
+ //#endregion
18
+ Object.defineProperty(exports, "delete_operation_exports", {
19
+ enumerable: true,
20
+ get: function() {
21
+ return delete_operation_exports;
22
+ }
23
+ });
24
+ exports.description = description;
25
+ exports.execute = execute;
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace deleteLabel_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 { deleteLabel_operation_d_exports, description, execute };
@@ -0,0 +1,25 @@
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_actions_inbox_fields = require("./fields.js");
5
+ //#region nodes/Resend/actions/inbox/deleteLabel.operation.ts
6
+ var deleteLabel_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [require_nodes_Resend_actions_inbox_fields.inboxIdField("deleteLabel", "The inbox the label belongs to"), require_nodes_Resend_actions_inbox_fields.labelIdField("deleteLabel", "The label to delete. This action is permanent and cannot be undone.")];
11
+ async function execute(index) {
12
+ return [{
13
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "DELETE", require_nodes_Resend_actions_inbox_fields.labelPath(this, index)),
14
+ pairedItem: { item: index }
15
+ }];
16
+ }
17
+ //#endregion
18
+ Object.defineProperty(exports, "deleteLabel_operation_exports", {
19
+ enumerable: true,
20
+ get: function() {
21
+ return deleteLabel_operation_exports;
22
+ }
23
+ });
24
+ exports.description = description;
25
+ exports.execute = execute;
@@ -0,0 +1,5 @@
1
+ import { OperationRouter } from "../../transport/index.js";
2
+ //#region nodes/Resend/actions/inbox/execute.d.ts
3
+ declare const execute: OperationRouter;
4
+ //#endregion
5
+ export { execute };
@@ -0,0 +1,28 @@
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_inbox_create_operation = require("./create.operation.js");
4
+ const require_nodes_Resend_actions_inbox_createLabel_operation = require("./createLabel.operation.js");
5
+ const require_nodes_Resend_actions_inbox_delete_operation = require("./delete.operation.js");
6
+ const require_nodes_Resend_actions_inbox_deleteLabel_operation = require("./deleteLabel.operation.js");
7
+ const require_nodes_Resend_actions_inbox_get_operation = require("./get.operation.js");
8
+ const require_nodes_Resend_actions_inbox_getAgent_operation = require("./getAgent.operation.js");
9
+ const require_nodes_Resend_actions_inbox_list_operation = require("./list.operation.js");
10
+ const require_nodes_Resend_actions_inbox_listLabels_operation = require("./listLabels.operation.js");
11
+ const require_nodes_Resend_actions_inbox_update_operation = require("./update.operation.js");
12
+ const require_nodes_Resend_actions_inbox_updateAgent_operation = require("./updateAgent.operation.js");
13
+ const require_nodes_Resend_actions_inbox_updateLabel_operation = require("./updateLabel.operation.js");
14
+ //#region nodes/Resend/actions/inbox/execute.ts
15
+ const execute = require_nodes_Resend_transport_index.createOperationRouter({
16
+ create: require_nodes_Resend_actions_inbox_create_operation.create_operation_exports,
17
+ get: require_nodes_Resend_actions_inbox_get_operation.get_operation_exports,
18
+ update: require_nodes_Resend_actions_inbox_update_operation.update_operation_exports,
19
+ delete: require_nodes_Resend_actions_inbox_delete_operation.delete_operation_exports,
20
+ getAgent: require_nodes_Resend_actions_inbox_getAgent_operation.getAgent_operation_exports,
21
+ updateAgent: require_nodes_Resend_actions_inbox_updateAgent_operation.updateAgent_operation_exports,
22
+ createLabel: require_nodes_Resend_actions_inbox_createLabel_operation.createLabel_operation_exports,
23
+ listLabels: require_nodes_Resend_actions_inbox_listLabels_operation.listLabels_operation_exports,
24
+ updateLabel: require_nodes_Resend_actions_inbox_updateLabel_operation.updateLabel_operation_exports,
25
+ deleteLabel: require_nodes_Resend_actions_inbox_deleteLabel_operation.deleteLabel_operation_exports
26
+ }, { list: require_nodes_Resend_actions_inbox_list_operation.list_operation_exports });
27
+ //#endregion
28
+ exports.execute = execute;
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeProperties } from "n8n-workflow";
2
+ //#region nodes/Resend/actions/inbox/fields.d.ts
3
+ declare function labelColorOption(description: string): INodeProperties;
4
+ declare function readLabelColor(context: IExecuteFunctions, value: unknown, index: number): string | undefined;
5
+ declare function inboxIdField(operation: string, description: string): INodeProperties;
6
+ declare function labelIdField(operation: string, description: string): INodeProperties;
7
+ declare function inboxPath(context: IExecuteFunctions, index: number, suffix?: string): string;
8
+ declare function labelPath(context: IExecuteFunctions, index: number): string;
9
+ //#endregion
10
+ export { inboxIdField, inboxPath, labelColorOption, labelIdField, labelPath, readLabelColor };
@@ -0,0 +1,70 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_nodes_Resend_utils_dynamicFields = require("../../utils/dynamicFields.js");
3
+ let n8n_workflow = require("n8n-workflow");
4
+ //#region nodes/Resend/actions/inbox/fields.ts
5
+ const LABEL_COLOR_PATTERN = /^#[0-9A-Fa-f]{6}$/;
6
+ function labelColorOption(description) {
7
+ return {
8
+ displayName: "Color",
9
+ name: "color",
10
+ type: "color",
11
+ default: "",
12
+ placeholder: "#E5484D",
13
+ description
14
+ };
15
+ }
16
+ function readLabelColor(context, value, index) {
17
+ const color = typeof value === "string" ? value.trim() : "";
18
+ if (!color) return;
19
+ if (!LABEL_COLOR_PATTERN.test(color)) throw new n8n_workflow.NodeOperationError(context.getNode(), `Color must be a #RRGGBB hex color, such as #E5484D (got "${color}")`, { itemIndex: index });
20
+ return color;
21
+ }
22
+ function inboxIdField(operation, description) {
23
+ return require_nodes_Resend_utils_dynamicFields.createDynamicIdField({
24
+ fieldName: "inboxId",
25
+ resourceName: "inbox",
26
+ displayName: "Inbox",
27
+ required: true,
28
+ placeholder: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
29
+ description,
30
+ displayOptions: { show: {
31
+ resource: ["inboxes"],
32
+ operation: [operation]
33
+ } }
34
+ });
35
+ }
36
+ function labelIdField(operation, description) {
37
+ return require_nodes_Resend_utils_dynamicFields.createDynamicIdField({
38
+ fieldName: "inboxLabelId",
39
+ resourceName: "inboxLabel",
40
+ displayName: "Label",
41
+ required: true,
42
+ placeholder: "7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34",
43
+ description,
44
+ displayOptions: { show: {
45
+ resource: ["inboxes"],
46
+ operation: [operation]
47
+ } }
48
+ });
49
+ }
50
+ function requireId(context, fieldName, label, index) {
51
+ var _resolveDynamicIdValu;
52
+ const value = String((_resolveDynamicIdValu = require_nodes_Resend_utils_dynamicFields.resolveDynamicIdValue(context, fieldName, index)) !== null && _resolveDynamicIdValu !== void 0 ? _resolveDynamicIdValu : "").trim();
53
+ if (!value) throw new n8n_workflow.NodeOperationError(context.getNode(), `${label} is required`, { itemIndex: index });
54
+ return value;
55
+ }
56
+ function inboxPath(context, index, suffix = "") {
57
+ const inboxId = requireId(context, "inboxId", "Inbox", index);
58
+ return `/inboxes/${encodeURIComponent(inboxId)}${suffix}`;
59
+ }
60
+ function labelPath(context, index) {
61
+ const labelId = requireId(context, "inboxLabelId", "Label", index);
62
+ return inboxPath(context, index, `/labels/${encodeURIComponent(labelId)}`);
63
+ }
64
+ //#endregion
65
+ exports.inboxIdField = inboxIdField;
66
+ exports.inboxPath = inboxPath;
67
+ exports.labelColorOption = labelColorOption;
68
+ exports.labelIdField = labelIdField;
69
+ exports.labelPath = labelPath;
70
+ exports.readLabelColor = readLabelColor;
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace get_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, execute, get_operation_d_exports };
@@ -0,0 +1,25 @@
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_actions_inbox_fields = require("./fields.js");
5
+ //#region nodes/Resend/actions/inbox/get.operation.ts
6
+ var get_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [require_nodes_Resend_actions_inbox_fields.inboxIdField("get", "The inbox to retrieve, by ID or by email address (e.g. support@example.com)")];
11
+ async function execute(index) {
12
+ return [{
13
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "GET", require_nodes_Resend_actions_inbox_fields.inboxPath(this, index)),
14
+ pairedItem: { item: index }
15
+ }];
16
+ }
17
+ //#endregion
18
+ exports.description = description;
19
+ exports.execute = execute;
20
+ Object.defineProperty(exports, "get_operation_exports", {
21
+ enumerable: true,
22
+ get: function() {
23
+ return get_operation_exports;
24
+ }
25
+ });
@@ -0,0 +1,8 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
2
+ declare namespace getAgent_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, execute, getAgent_operation_d_exports };
@@ -0,0 +1,25 @@
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_actions_inbox_fields = require("./fields.js");
5
+ //#region nodes/Resend/actions/inbox/getAgent.operation.ts
6
+ var getAgent_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
7
+ description: () => description,
8
+ execute: () => execute
9
+ });
10
+ const description = [require_nodes_Resend_actions_inbox_fields.inboxIdField("getAgent", "The inbox whose agent settings to retrieve")];
11
+ async function execute(index) {
12
+ return [{
13
+ json: await require_nodes_Resend_transport_index.apiRequest.call(this, "GET", require_nodes_Resend_actions_inbox_fields.inboxPath(this, index, "/agent")),
14
+ pairedItem: { item: index }
15
+ }];
16
+ }
17
+ //#endregion
18
+ exports.description = description;
19
+ exports.execute = execute;
20
+ Object.defineProperty(exports, "getAgent_operation_exports", {
21
+ enumerable: true,
22
+ get: function() {
23
+ return getAgent_operation_exports;
24
+ }
25
+ });
@@ -0,0 +1,18 @@
1
+ import { create_operation_d_exports } from "./create.operation.js";
2
+ import { createLabel_operation_d_exports } from "./createLabel.operation.js";
3
+ import { delete_operation_d_exports } from "./delete.operation.js";
4
+ import { deleteLabel_operation_d_exports } from "./deleteLabel.operation.js";
5
+ import { execute } from "./execute.js";
6
+ import { get_operation_d_exports } from "./get.operation.js";
7
+ import { getAgent_operation_d_exports } from "./getAgent.operation.js";
8
+ import { list_operation_d_exports } from "./list.operation.js";
9
+ import { listLabels_operation_d_exports } from "./listLabels.operation.js";
10
+ import { update_operation_d_exports } from "./update.operation.js";
11
+ import { updateAgent_operation_d_exports } from "./updateAgent.operation.js";
12
+ import { updateLabel_operation_d_exports } from "./updateLabel.operation.js";
13
+ import { INodeProperties } from "n8n-workflow";
14
+ //#region nodes/Resend/actions/inbox/index.d.ts
15
+ declare const operations: INodeProperties[];
16
+ declare const descriptions: INodeProperties[];
17
+ //#endregion
18
+ export { create_operation_d_exports as create, createLabel_operation_d_exports as createLabel, delete_operation_d_exports as delete, deleteLabel_operation_d_exports as deleteLabel, descriptions, execute, get_operation_d_exports as get, getAgent_operation_d_exports as getAgent, list_operation_d_exports as list, listLabels_operation_d_exports as listLabels, operations, update_operation_d_exports as update, updateAgent_operation_d_exports as updateAgent, updateLabel_operation_d_exports as updateLabel };