n8n-nodes-resend 2.5.3 → 2.6.1

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