n8n-nodes-resend 2.4.0 → 2.5.2

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 (32) hide show
  1. package/LICENSE.md +19 -19
  2. package/dist/nodes/Resend/Resend.node.js +8 -1
  3. package/dist/nodes/Resend/Resend.node.js.map +1 -1
  4. package/dist/nodes/Resend/actions/log/execute.d.ts +1 -0
  5. package/dist/nodes/Resend/actions/log/execute.js +41 -0
  6. package/dist/nodes/Resend/actions/log/execute.js.map +1 -0
  7. package/dist/nodes/Resend/actions/log/index.d.ts +7 -0
  8. package/dist/nodes/Resend/actions/log/index.js +76 -0
  9. package/dist/nodes/Resend/actions/log/index.js.map +1 -0
  10. package/dist/nodes/Resend/actions/log/list.operation.d.ts +3 -0
  11. package/dist/nodes/Resend/actions/log/list.operation.js +42 -0
  12. package/dist/nodes/Resend/actions/log/list.operation.js.map +1 -0
  13. package/dist/nodes/Resend/actions/log/retrieve.operation.d.ts +3 -0
  14. package/dist/nodes/Resend/actions/log/retrieve.operation.js +28 -0
  15. package/dist/nodes/Resend/actions/log/retrieve.operation.js.map +1 -0
  16. package/dist/nodes/Resend/actions/router.js +2 -0
  17. package/dist/nodes/Resend/actions/router.js.map +1 -1
  18. package/dist/nodes/Resend/actions/segment/execute.js +2 -1
  19. package/dist/nodes/Resend/actions/segment/execute.js.map +1 -1
  20. package/dist/nodes/Resend/actions/segment/index.d.ts +2 -1
  21. package/dist/nodes/Resend/actions/segment/index.js +10 -1
  22. package/dist/nodes/Resend/actions/segment/index.js.map +1 -1
  23. package/dist/nodes/Resend/actions/segment/listContacts.operation.d.ts +3 -0
  24. package/dist/nodes/Resend/actions/segment/listContacts.operation.js +58 -0
  25. package/dist/nodes/Resend/actions/segment/listContacts.operation.js.map +1 -0
  26. package/dist/nodes/Resend/resend-icon-black.svg +3 -3
  27. package/dist/nodes/Resend/resend-icon-white.svg +3 -3
  28. package/dist/nodes/Resend/utils/sendAndWait/utils.js +99 -100
  29. package/dist/nodes/Resend/utils/sendAndWait/utils.js.map +1 -1
  30. package/dist/package.json +6 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +6 -1
package/LICENSE.md CHANGED
@@ -1,19 +1,19 @@
1
- Copyright 2022 n8n
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- this software and associated documentation files (the "Software"), to deal in
5
- the Software without restriction, including without limitation the rights to
6
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
- of the Software, and to permit persons to whom the Software is furnished to do
8
- so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in all
11
- copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- SOFTWARE.
1
+ Copyright 2022 n8n
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -48,6 +48,7 @@ const webhooks = __importStar(require("./actions/webhook"));
48
48
  const receivingEmails = __importStar(require("./actions/receivingEmail"));
49
49
  const workflows = __importStar(require("./actions/workflow"));
50
50
  const events = __importStar(require("./actions/event"));
51
+ const logs = __importStar(require("./actions/log"));
51
52
  const methods_1 = require("./methods");
52
53
  const sendAndWait_1 = require("./utils/sendAndWait");
53
54
  class Resend {
@@ -63,7 +64,7 @@ class Resend {
63
64
  version: 1,
64
65
  usableAsTool: true,
65
66
  description: 'Send emails, manage contacts, create broadcasts, handle templates, domains, segments, topics, and webhooks using the Resend email platform',
66
- subtitle: '={{(() => { const resourceLabels = { broadcasts: "broadcast", contacts: "contact", contactProperties: "contact property", domains: "domain", email: "email", 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; })() }}',
67
+ 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; })() }}',
67
68
  defaults: {
68
69
  name: 'Resend',
69
70
  },
@@ -114,6 +115,11 @@ class Resend {
114
115
  value: 'events',
115
116
  description: 'Create, send, retrieve, update, or delete events for triggering workflows (private alpha)',
116
117
  },
118
+ {
119
+ name: 'Log',
120
+ value: 'logs',
121
+ description: 'List and retrieve API request logs including request bodies, response bodies, and status codes',
122
+ },
117
123
  {
118
124
  name: 'Receiving Email',
119
125
  value: 'receivingEmails',
@@ -159,6 +165,7 @@ class Resend {
159
165
  ...receivingEmails.descriptions,
160
166
  ...workflows.descriptions,
161
167
  ...events.descriptions,
168
+ ...logs.descriptions,
162
169
  ],
163
170
  };
164
171
  this.methods = {
@@ -1 +1 @@
1
- {"version":3,"file":"Resend.node.js","sourceRoot":"","sources":["../../../nodes/Resend/Resend.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAAmD;AAEnD,6CAA0C;AAC1C,uDAAyC;AACzC,8DAAgD;AAChD,0DAA4C;AAC5C,gEAAkD;AAClD,4DAA8C;AAC9C,wDAA0C;AAC1C,4DAA8C;AAC9C,6EAA+D;AAC/D,4DAA8C;AAC9C,0EAA4D;AAC5D,8DAAgD;AAChD,wDAA0C;AAC1C,uCAuBmB;AACnB,qDAI6B;AAE7B,MAAa,MAAM;IAAnB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,QAAQ;YACrB,IAAI,EAAE,QAAQ;YACd,IAA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AAoB,EAAE,wCAA8B;gBACpD,WAAW,EAAE,+BAAqB;gBAClC,UAAU,EAAE,8BAAoB;gBAChC,SAAS,EAAE,6BAAmB;gBAC9B,iBAAiB,EAAE,qCAA2B;gBAC9C,WAAW,EAAE,+BAAqB;gBAClC,YAAY,EAAE,gCAAsB;gBACpC,oBAAoB,EAAE,wCAA8B;gBACpD,SAAS,EAAE,6BAAmB;gBAC9B,WAAW,EAAE,+BAAqB;aAClC;SACD,CAAC;QAEF,YAAO,GAAG,KAAK;YACd,OAAO,gCAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,CAAC,CAAC;QAEF,YAAO,GAAG,eAAM,CAAC;IAClB,CAAC;CAAA;AAxKD,wBAwKC"}
@@ -0,0 +1 @@
1
+ export declare const execute: (this: import("n8n-workflow").IExecuteFunctions, index: number, operation: string) => Promise<import("n8n-workflow").INodeExecutionData[]>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.execute = void 0;
37
+ const transport_1 = require("../../transport");
38
+ const list = __importStar(require("./list.operation"));
39
+ const retrieve = __importStar(require("./retrieve.operation"));
40
+ exports.execute = (0, transport_1.createOperationRouter)({ retrieve }, { list });
41
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/log/execute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwD;AAExD,uDAAyC;AACzC,+DAAiD;AAEpC,QAAA,OAAO,GAAG,IAAA,iCAAqB,EAC3C,EAAE,QAAQ,EAAE,EACZ,EAAE,IAAI,EAAE,CACR,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ import * as list from './list.operation';
3
+ import * as retrieve from './retrieve.operation';
4
+ export { list, retrieve };
5
+ export { execute } from './execute';
6
+ export declare const operations: INodeProperties[];
7
+ export declare const descriptions: INodeProperties[];
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.descriptions = exports.operations = exports.execute = exports.retrieve = exports.list = void 0;
37
+ const list = __importStar(require("./list.operation"));
38
+ exports.list = list;
39
+ const retrieve = __importStar(require("./retrieve.operation"));
40
+ exports.retrieve = retrieve;
41
+ var execute_1 = require("./execute");
42
+ Object.defineProperty(exports, "execute", { enumerable: true, get: function () { return execute_1.execute; } });
43
+ exports.operations = [
44
+ {
45
+ displayName: 'Operation',
46
+ name: 'operation',
47
+ type: 'options',
48
+ noDataExpression: true,
49
+ displayOptions: {
50
+ show: {
51
+ resource: ['logs'],
52
+ },
53
+ },
54
+ options: [
55
+ {
56
+ name: 'List',
57
+ value: 'list',
58
+ description: 'Get all API request logs for the account including request and response details',
59
+ action: 'List all logs',
60
+ },
61
+ {
62
+ name: 'Retrieve',
63
+ value: 'retrieve',
64
+ description: 'Retrieve details of a specific log entry including the request body, response body, and response status',
65
+ action: 'Retrieve a log entry',
66
+ },
67
+ ],
68
+ default: 'list',
69
+ },
70
+ ];
71
+ exports.descriptions = [
72
+ ...exports.operations,
73
+ ...list.description,
74
+ ...retrieve.description,
75
+ ];
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/log/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uDAAyC;AAGhC,oBAAI;AAFb,+DAAiD;AAElC,4BAAQ;AACvB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAEH,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,iFAAiF;gBAC9F,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,yGAAyG;gBACtH,MAAM,EAAE,sBAAsB;aAC9B;SACD;QACD,OAAO,EAAE,MAAM;KACf;CACD,CAAC;AAEW,QAAA,YAAY,GAAsB;IAC9C,GAAG,kBAAU;IACb,GAAG,IAAI,CAAC,WAAW;IACnB,GAAG,QAAQ,CAAC,WAAW;CACvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../transport");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Return All',
9
+ name: 'returnAll',
10
+ type: 'boolean',
11
+ default: false,
12
+ displayOptions: {
13
+ show: {
14
+ resource: ['logs'],
15
+ operation: ['list'],
16
+ },
17
+ },
18
+ description: 'Whether to return all results or only up to a given limit',
19
+ },
20
+ {
21
+ displayName: 'Limit',
22
+ name: 'limit',
23
+ type: 'number',
24
+ default: 50,
25
+ typeOptions: {
26
+ minValue: 1,
27
+ },
28
+ displayOptions: {
29
+ show: {
30
+ resource: ['logs'],
31
+ operation: ['list'],
32
+ returnAll: [false],
33
+ },
34
+ },
35
+ description: 'Max number of results to return',
36
+ },
37
+ ];
38
+ async function execute() {
39
+ const items = await transport_1.requestList.call(this, '/logs');
40
+ return transport_1.createListExecutionData.call(this, items);
41
+ }
42
+ //# sourceMappingURL=list.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.operation.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/log/list.operation.ts"],"names":[],"mappings":";;;AAoCA,0BAGC;AAtCD,+CAAuE;AAE1D,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,MAAM,CAAC;aACnB;SACD;QACD,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;SACX;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,MAAM,CAAC;gBACnB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,iCAAiC;KAC9C;CACD,CAAC;AAEK,KAAK,UAAU,OAAO;IAC5B,MAAM,KAAK,GAAG,MAAM,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,mCAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../transport");
6
+ exports.description = [
7
+ {
8
+ displayName: 'Log ID',
9
+ name: 'logId',
10
+ type: 'string',
11
+ required: true,
12
+ default: '',
13
+ placeholder: 'log_abc123',
14
+ displayOptions: {
15
+ show: {
16
+ resource: ['logs'],
17
+ operation: ['retrieve'],
18
+ },
19
+ },
20
+ description: 'The unique identifier of the log entry to retrieve',
21
+ },
22
+ ];
23
+ async function execute(index) {
24
+ const logId = this.getNodeParameter('logId', index);
25
+ const response = await transport_1.apiRequest.call(this, 'GET', `/logs/${encodeURIComponent(logId)}`);
26
+ return [{ json: response, pairedItem: { item: index } }];
27
+ }
28
+ //# sourceMappingURL=retrieve.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieve.operation.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/log/retrieve.operation.ts"],"names":[],"mappings":";;;AAqBA,0BASC;AA7BD,+CAA6C;AAEhC,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,UAAU,CAAC;aACvB;SACD;QACD,WAAW,EAAE,oDAAoD;KACjE;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,KAAa;IAEb,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAW,CAAC;IAE9D,MAAM,QAAQ,GAAG,MAAM,sBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE1F,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC"}
@@ -47,6 +47,7 @@ const webhooks = __importStar(require("./webhook"));
47
47
  const receivingEmails = __importStar(require("./receivingEmail"));
48
48
  const workflows = __importStar(require("./workflow"));
49
49
  const events = __importStar(require("./event"));
50
+ const logs = __importStar(require("./log"));
50
51
  const resourceModules = {
51
52
  email,
52
53
  templates,
@@ -60,6 +61,7 @@ const resourceModules = {
60
61
  receivingEmails,
61
62
  workflows,
62
63
  events,
64
+ logs,
63
65
  };
64
66
  async function router() {
65
67
  const items = this.getInputData();
@@ -1 +1 @@
1
- {"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../nodes/Resend/actions/router.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,wBAuCC;AArED,+CAAgE;AAEhE,+CAAiC;AACjC,sDAAwC;AACxC,kDAAoC;AACpC,wDAA0C;AAC1C,oDAAsC;AACtC,gDAAkC;AAClC,oDAAsC;AACtC,qEAAuD;AACvD,oDAAsC;AACtC,kEAAoD;AACpD,sDAAwC;AACxC,gDAAkC;AAElC,MAAM,eAAe,GAAsD;IAC1E,KAAK;IACL,SAAS;IACT,OAAO;IACP,UAAU;IACV,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,iBAAiB;IACjB,QAAQ;IACR,eAAe;IACf,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;YACtC,IAAI,CAAC,GAAG,EAAE,CAAC;gBACV,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,qBAAqB,QAAQ,EAAE,CAAC,CAAC;YAC/E,CAAC;YAED,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YACjE,UAAU,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,MAAM,SAAS,GAAgB;oBAC9B,KAAK,EAAG,KAAe,CAAC,OAAO;iBAC/B,CAAC;gBAEF,IAAI,KAAK,YAAY,2BAAY,EAAE,CAAC;oBACnC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;wBACpB,SAAS,CAAC,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC;oBACvC,CAAC;oBACD,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;wBACvB,SAAS,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;oBAC3C,CAAC;gBACF,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9D,SAAS;YACV,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAC;AACrB,CAAC"}
@@ -38,10 +38,11 @@ const transport_1 = require("../../transport");
38
38
  const create = __importStar(require("./create.operation"));
39
39
  const get = __importStar(require("./get.operation"));
40
40
  const list = __importStar(require("./list.operation"));
41
+ const listContacts = __importStar(require("./listContacts.operation"));
41
42
  const del = __importStar(require("./delete.operation"));
42
43
  exports.execute = (0, transport_1.createOperationRouter)({
43
44
  create,
44
45
  get,
45
46
  delete: del,
46
- }, { list });
47
+ }, { list, listContacts });
47
48
  //# sourceMappingURL=execute.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/segment/execute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwD;AAExD,2DAA6C;AAC7C,qDAAuC;AACvC,uDAAyC;AACzC,wDAA0C;AAE7B,QAAA,OAAO,GAAG,IAAA,iCAAqB,EAC3C;IACC,MAAM;IACN,GAAG;IACH,MAAM,EAAE,GAAG;CACX,EACD,EAAE,IAAI,EAAE,CACR,CAAC"}
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/segment/execute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwD;AAExD,2DAA6C;AAC7C,qDAAuC;AACvC,uDAAyC;AACzC,uEAAyD;AACzD,wDAA0C;AAE7B,QAAA,OAAO,GAAG,IAAA,iCAAqB,EAC3C;IACC,MAAM;IACN,GAAG;IACH,MAAM,EAAE,GAAG;CACX,EACD,EAAE,IAAI,EAAE,YAAY,EAAE,CACtB,CAAC"}
@@ -2,8 +2,9 @@ import { INodeProperties } from 'n8n-workflow';
2
2
  import * as create from './create.operation';
3
3
  import * as get from './get.operation';
4
4
  import * as list from './list.operation';
5
+ import * as listContacts from './listContacts.operation';
5
6
  import * as del from './delete.operation';
6
- export { create, get, list, del as delete };
7
+ export { create, get, list, listContacts, del as delete };
7
8
  export { execute } from './execute';
8
9
  export declare const operations: INodeProperties[];
9
10
  export declare const descriptions: INodeProperties[];
@@ -33,13 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.descriptions = exports.operations = exports.execute = exports.delete = exports.list = exports.get = exports.create = void 0;
36
+ exports.descriptions = exports.operations = exports.execute = exports.delete = exports.listContacts = exports.list = exports.get = exports.create = void 0;
37
37
  const create = __importStar(require("./create.operation"));
38
38
  exports.create = create;
39
39
  const get = __importStar(require("./get.operation"));
40
40
  exports.get = get;
41
41
  const list = __importStar(require("./list.operation"));
42
42
  exports.list = list;
43
+ const listContacts = __importStar(require("./listContacts.operation"));
44
+ exports.listContacts = listContacts;
43
45
  const del = __importStar(require("./delete.operation"));
44
46
  exports.delete = del;
45
47
  var execute_1 = require("./execute");
@@ -80,6 +82,12 @@ exports.operations = [
80
82
  description: 'Get all segments in the account with their names, IDs, and contact counts',
81
83
  action: 'List all segments',
82
84
  },
85
+ {
86
+ name: 'List Contacts',
87
+ value: 'listContacts',
88
+ description: 'Get all contacts belonging to a specific segment',
89
+ action: 'List segment contacts',
90
+ },
83
91
  ],
84
92
  default: 'list',
85
93
  },
@@ -89,6 +97,7 @@ exports.descriptions = [
89
97
  ...create.description,
90
98
  ...get.description,
91
99
  ...list.description,
100
+ ...listContacts.description,
92
101
  ...del.description,
93
102
  ];
94
103
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/segment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2DAA6C;AAKpC,wBAAM;AAJf,qDAAuC;AAItB,kBAAG;AAHpB,uDAAyC;AAGnB,oBAAI;AAF1B,wDAA0C;AAEP,qBAAM;AACzC,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAEH,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,2FAA2F;gBACxG,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0FAA0F;gBACvG,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,6FAA6F;gBAC1G,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,2EAA2E;gBACxF,MAAM,EAAE,mBAAmB;aAC3B;SACD;QACD,OAAO,EAAE,MAAM;KACf;CACD,CAAC;AAEW,QAAA,YAAY,GAAsB;IAC9C,GAAG,kBAAU;IACb,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,GAAG,CAAC,WAAW;IAClB,GAAG,IAAI,CAAC,WAAW;IACnB,GAAG,GAAG,CAAC,WAAW;CAClB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/segment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2DAA6C;AAMpC,wBAAM;AALf,qDAAuC;AAKtB,kBAAG;AAJpB,uDAAyC;AAInB,oBAAI;AAH1B,uEAAyD;AAG7B,oCAAY;AAFxC,wDAA0C;AAEO,qBAAM;AACvD,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAEH,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,2FAA2F;gBACxG,MAAM,EAAE,0BAA0B;aAClC;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,0FAA0F;gBACvG,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,6FAA6F;gBAC1G,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,MAAM;gBACb,WAAW,EAAE,2EAA2E;gBACxF,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,kDAAkD;gBAC/D,MAAM,EAAE,uBAAuB;aAC/B;SACD;QACD,OAAO,EAAE,MAAM;KACf;CACD,CAAC;AAEW,QAAA,YAAY,GAAsB;IAC9C,GAAG,kBAAU;IACb,GAAG,MAAM,CAAC,WAAW;IACrB,GAAG,GAAG,CAAC,WAAW;IAClB,GAAG,IAAI,CAAC,WAAW;IACnB,GAAG,YAAY,CAAC,WAAW;IAC3B,GAAG,GAAG,CAAC,WAAW;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare const description: INodeProperties[];
3
+ export declare function execute(this: IExecuteFunctions): Promise<INodeExecutionData[]>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.description = void 0;
4
+ exports.execute = execute;
5
+ const transport_1 = require("../../transport");
6
+ const dynamicFields_1 = require("../../utils/dynamicFields");
7
+ exports.description = [
8
+ (0, dynamicFields_1.createDynamicIdField)({
9
+ fieldName: 'segmentId',
10
+ resourceName: 'segment',
11
+ displayName: 'Segment',
12
+ required: true,
13
+ placeholder: 'seg_123456',
14
+ description: 'Select a segment or enter an ID using an expression. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
15
+ displayOptions: {
16
+ show: {
17
+ resource: ['segments'],
18
+ operation: ['listContacts'],
19
+ },
20
+ },
21
+ }),
22
+ {
23
+ displayName: 'Return All',
24
+ name: 'returnAll',
25
+ type: 'boolean',
26
+ default: false,
27
+ displayOptions: {
28
+ show: {
29
+ resource: ['segments'],
30
+ operation: ['listContacts'],
31
+ },
32
+ },
33
+ description: 'Whether to return all results or only up to a given limit',
34
+ },
35
+ {
36
+ displayName: 'Limit',
37
+ name: 'limit',
38
+ type: 'number',
39
+ default: 50,
40
+ typeOptions: {
41
+ minValue: 1,
42
+ },
43
+ displayOptions: {
44
+ show: {
45
+ resource: ['segments'],
46
+ operation: ['listContacts'],
47
+ returnAll: [false],
48
+ },
49
+ },
50
+ description: 'Max number of results to return',
51
+ },
52
+ ];
53
+ async function execute() {
54
+ const segmentId = (0, dynamicFields_1.resolveDynamicIdValue)(this, 'segmentId', 0);
55
+ const items = await transport_1.requestList.call(this, `/segments/${encodeURIComponent(segmentId)}/contacts`);
56
+ return transport_1.createListExecutionData.call(this, items);
57
+ }
58
+ //# sourceMappingURL=listContacts.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listContacts.operation.js","sourceRoot":"","sources":["../../../../../nodes/Resend/actions/segment/listContacts.operation.ts"],"names":[],"mappings":";;;AAmDA,0BAOC;AAzDD,+CAAuE;AACvE,6DAAwF;AAE3E,QAAA,WAAW,GAAsB;IAC7C,IAAA,oCAAoB,EAAC;QACpB,SAAS,EAAE,WAAW;QACtB,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,SAAS;QACtB,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,sKAAsK;QACnL,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,cAAc,CAAC;aAC3B;SACD;KACD,CAAC;IACF;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,cAAc,CAAC;aAC3B;SACD;QACD,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;SACX;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,cAAc,CAAC;gBAC3B,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE,iCAAiC;KAC9C;CACD,CAAC;AAEK,KAAK,UAAU,OAAO;IAG5B,MAAM,SAAS,GAAG,IAAA,qCAAqB,EAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;IAE9D,MAAM,KAAK,GAAG,MAAM,uBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,kBAAkB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAClG,OAAO,mCAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC"}
@@ -1,3 +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>
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>
@@ -1,3 +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
+ <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>