n8n-nodes-cakemail 1.6.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/SECURITY.md +91 -0
  2. package/credentials/CakemailApi.credentials.ts +47 -0
  3. package/dist/credentials/CakemailApi.credentials.d.ts +1 -10
  4. package/dist/credentials/CakemailApi.credentials.js +41 -63
  5. package/dist/nodes/Cakemail/Cakemail.node.d.ts +1 -98
  6. package/dist/nodes/Cakemail/Cakemail.node.js +1284 -3761
  7. package/dist/nodes/Cakemail/__tests__/Cakemail.node.test.js +4 -6
  8. package/dist/nodes/Cakemail/resources/account.operations.d.ts +2 -0
  9. package/dist/nodes/Cakemail/resources/account.operations.js +37 -0
  10. package/dist/nodes/Cakemail/resources/action.operations.d.ts +2 -0
  11. package/dist/nodes/Cakemail/resources/action.operations.js +463 -0
  12. package/dist/nodes/Cakemail/resources/campaign.operations.d.ts +2 -0
  13. package/dist/nodes/Cakemail/resources/campaign.operations.js +652 -0
  14. package/dist/nodes/Cakemail/resources/campaign_blueprint.operations.d.ts +2 -0
  15. package/dist/nodes/Cakemail/resources/campaign_blueprint.operations.js +111 -0
  16. package/dist/nodes/Cakemail/resources/contact.operations.d.ts +2 -0
  17. package/dist/nodes/Cakemail/resources/contact.operations.js +784 -0
  18. package/dist/nodes/Cakemail/resources/custom_attribute.operations.d.ts +2 -0
  19. package/dist/nodes/Cakemail/resources/custom_attribute.operations.js +163 -0
  20. package/dist/nodes/Cakemail/resources/dkim.operations.d.ts +1 -1
  21. package/dist/nodes/Cakemail/resources/dkim.operations.js +45 -53
  22. package/dist/nodes/Cakemail/resources/domain.operations.d.ts +1 -1
  23. package/dist/nodes/Cakemail/resources/domain.operations.js +28 -81
  24. package/dist/nodes/Cakemail/resources/email_api.operations.d.ts +2 -0
  25. package/dist/nodes/Cakemail/resources/email_api.operations.js +430 -0
  26. package/dist/nodes/Cakemail/resources/form.operations.d.ts +1 -1
  27. package/dist/nodes/Cakemail/resources/form.operations.js +171 -186
  28. package/dist/nodes/Cakemail/resources/index.d.ts +30 -13
  29. package/dist/nodes/Cakemail/resources/index.js +32 -29
  30. package/dist/nodes/Cakemail/resources/interest.operations.d.ts +1 -1
  31. package/dist/nodes/Cakemail/resources/interest.operations.js +115 -94
  32. package/dist/nodes/Cakemail/resources/links.operations.d.ts +1 -1
  33. package/dist/nodes/Cakemail/resources/links.operations.js +18 -18
  34. package/dist/nodes/Cakemail/resources/list.operations.d.ts +2 -0
  35. package/dist/nodes/Cakemail/resources/list.operations.js +528 -0
  36. package/dist/nodes/Cakemail/resources/log.operations.d.ts +1 -1
  37. package/dist/nodes/Cakemail/resources/log.operations.js +452 -87
  38. package/dist/nodes/Cakemail/resources/logo.operations.d.ts +2 -0
  39. package/dist/nodes/Cakemail/resources/logo.operations.js +54 -0
  40. package/dist/nodes/Cakemail/resources/report.operations.d.ts +2 -0
  41. package/dist/nodes/Cakemail/resources/report.operations.js +397 -0
  42. package/dist/nodes/Cakemail/resources/segment.operations.d.ts +2 -0
  43. package/dist/nodes/Cakemail/resources/segment.operations.js +207 -0
  44. package/dist/nodes/Cakemail/resources/sender.operations.d.ts +1 -1
  45. package/dist/nodes/Cakemail/resources/sender.operations.js +124 -110
  46. package/dist/nodes/Cakemail/resources/sub-account.operations.d.ts +1 -0
  47. package/dist/nodes/Cakemail/resources/sub-account.operations.js +311 -0
  48. package/dist/nodes/Cakemail/resources/subAccount.operations.js +1 -4
  49. package/dist/nodes/Cakemail/resources/sub_account.operations.d.ts +2 -0
  50. package/dist/nodes/Cakemail/resources/sub_account.operations.js +309 -0
  51. package/dist/nodes/Cakemail/resources/suppressedEmail.operations.js +1 -4
  52. package/dist/nodes/Cakemail/resources/suppressed_email.operations.d.ts +2 -0
  53. package/dist/nodes/Cakemail/resources/suppressed_email.operations.js +239 -0
  54. package/dist/nodes/Cakemail/resources/system_email.operations.d.ts +2 -0
  55. package/dist/nodes/Cakemail/resources/system_email.operations.js +37 -0
  56. package/dist/nodes/Cakemail/resources/tags.operations.d.ts +1 -1
  57. package/dist/nodes/Cakemail/resources/tags.operations.js +84 -146
  58. package/dist/nodes/Cakemail/resources/task.operations.d.ts +2 -0
  59. package/dist/nodes/Cakemail/resources/task.operations.js +157 -0
  60. package/dist/nodes/Cakemail/resources/template.operations.d.ts +1 -1
  61. package/dist/nodes/Cakemail/resources/template.operations.js +58 -216
  62. package/dist/nodes/Cakemail/resources/token.operations.d.ts +1 -1
  63. package/dist/nodes/Cakemail/resources/token.operations.js +50 -71
  64. package/dist/nodes/Cakemail/resources/transactional_email.operations.d.ts +2 -0
  65. package/dist/nodes/Cakemail/resources/transactional_email.operations.js +425 -0
  66. package/dist/nodes/Cakemail/resources/user.operations.d.ts +1 -1
  67. package/dist/nodes/Cakemail/resources/user.operations.js +441 -204
  68. package/dist/nodes/Cakemail/resources/webhook.operations.d.ts +2 -0
  69. package/dist/nodes/Cakemail/resources/webhook.operations.js +279 -0
  70. package/dist/nodes/Cakemail/resources/workflow.operations.d.ts +2 -0
  71. package/dist/nodes/Cakemail/resources/workflow.operations.js +432 -0
  72. package/dist/nodes/Cakemail/resources/workflow_blueprint.operations.d.ts +2 -0
  73. package/dist/nodes/Cakemail/resources/workflow_blueprint.operations.js +162 -0
  74. package/dist/nodes/CakemailTrigger/CakemailTrigger.node.d.ts +1 -1
  75. package/dist/nodes/CakemailTrigger/CakemailTrigger.node.js +302 -308
  76. package/jest.config.js +15 -0
  77. package/nodes/Cakemail/Cakemail.node.ts +1247 -4492
  78. package/nodes/Cakemail/resources/account.operations.ts +40 -0
  79. package/nodes/Cakemail/resources/action.operations.ts +483 -0
  80. package/nodes/Cakemail/resources/campaign.operations.ts +680 -0
  81. package/nodes/Cakemail/resources/campaign_blueprint.operations.ts +117 -0
  82. package/nodes/Cakemail/resources/contact.operations.ts +814 -0
  83. package/nodes/Cakemail/resources/custom_attribute.operations.ts +173 -0
  84. package/nodes/Cakemail/resources/dkim.operations.ts +143 -145
  85. package/nodes/Cakemail/resources/domain.operations.ts +83 -133
  86. package/nodes/Cakemail/resources/email_api.operations.ts +440 -0
  87. package/nodes/Cakemail/resources/form.operations.ts +326 -330
  88. package/nodes/Cakemail/resources/index.ts +33 -13
  89. package/nodes/Cakemail/resources/interest.operations.ts +281 -250
  90. package/nodes/Cakemail/resources/links.operations.ts +64 -59
  91. package/nodes/Cakemail/resources/list.operations.ts +551 -0
  92. package/nodes/Cakemail/resources/log.operations.ts +570 -186
  93. package/nodes/Cakemail/resources/logo.operations.ts +58 -0
  94. package/nodes/Cakemail/resources/report.operations.ts +413 -0
  95. package/nodes/Cakemail/resources/segment.operations.ts +218 -0
  96. package/nodes/Cakemail/resources/sender.operations.ts +315 -291
  97. package/nodes/Cakemail/resources/sub_account.operations.ts +323 -0
  98. package/nodes/Cakemail/resources/suppressed_email.operations.ts +250 -0
  99. package/nodes/Cakemail/resources/system_email.operations.ts +40 -0
  100. package/nodes/Cakemail/resources/tags.operations.ts +211 -266
  101. package/nodes/Cakemail/resources/task.operations.ts +165 -0
  102. package/nodes/Cakemail/resources/template.operations.ts +206 -359
  103. package/nodes/Cakemail/resources/token.operations.ts +97 -115
  104. package/nodes/Cakemail/resources/transactional_email.operations.ts +443 -0
  105. package/nodes/Cakemail/resources/user.operations.ts +677 -416
  106. package/nodes/Cakemail/resources/webhook.operations.ts +292 -0
  107. package/nodes/Cakemail/resources/workflow.operations.ts +451 -0
  108. package/nodes/Cakemail/resources/workflow_blueprint.operations.ts +170 -0
  109. package/package.json +19 -41
  110. package/test-webhook.js +32 -0
  111. package/tsconfig.json +15 -0
  112. package/nodes/Cakemail/__tests__/Cakemail.node.test.ts +0 -467
  113. package/nodes/Cakemail/cakemail.svg +0 -365
  114. package/nodes/Cakemail/resources/subAccount.operations.ts +0 -393
  115. package/nodes/Cakemail/resources/suppressedEmail.operations.ts +0 -338
  116. package/nodes/CakemailTrigger/CakemailTrigger.node.ts +0 -424
package/SECURITY.md ADDED
@@ -0,0 +1,91 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We release patches for security vulnerabilities in the following versions:
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | 1.6.x | :white_check_mark: |
10
+ | < 1.6 | :x: |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ We take the security of n8n-nodes-cakemail seriously. If you believe you have found a security vulnerability, please report it to us as described below.
15
+
16
+ ### How to Report
17
+
18
+ **Please do not report security vulnerabilities through public GitHub issues.**
19
+
20
+ Instead, please report them via email to:
21
+
22
+ - **Email**: security@cakemail.com
23
+ - **Subject**: [SECURITY] n8n-nodes-cakemail vulnerability report
24
+
25
+ ### What to Include
26
+
27
+ Please include the following information in your report:
28
+
29
+ - Type of vulnerability
30
+ - Full paths of source file(s) related to the manifestation of the vulnerability
31
+ - The location of the affected source code (tag/branch/commit or direct URL)
32
+ - Step-by-step instructions to reproduce the issue
33
+ - Proof-of-concept or exploit code (if possible)
34
+ - Impact of the issue, including how an attacker might exploit it
35
+
36
+ ### What to Expect
37
+
38
+ - You should receive an acknowledgment within 48 hours
39
+ - We will investigate and provide an initial assessment within 7 days
40
+ - We will keep you informed about our progress toward a fix
41
+ - We will publicly acknowledge your responsible disclosure, unless you prefer to remain anonymous
42
+
43
+ ## Security Best Practices
44
+
45
+ When using this package:
46
+
47
+ 1. **Keep your credentials secure**: Never commit credentials to version control
48
+ 2. **Use environment variables**: Store sensitive data like API keys in environment variables
49
+ 3. **Update regularly**: Keep the package updated to receive security patches
50
+ 4. **Validate webhook signatures**: The webhook trigger node validates signatures to prevent unauthorized requests
51
+ 5. **Use HTTPS**: Always use HTTPS URLs for webhook endpoints in production
52
+
53
+ ## Known Security Considerations
54
+
55
+ ### Webhook Signature Verification
56
+
57
+ The Cakemail Trigger node implements HMAC SHA256 signature verification for incoming webhooks. However, in some n8n hosting environments where `rawBody` is not available, signature verification may be skipped. We recommend:
58
+
59
+ - Hosting n8n in environments that support `rawBody` access
60
+ - Implementing additional security measures like IP allowlisting
61
+ - Using rate limiting to prevent abuse
62
+
63
+ ### Dependencies
64
+
65
+ This package relies on:
66
+
67
+ - `@cakemail-org/cakemail-sdk` - Official Cakemail SDK
68
+ - `n8n-workflow` - n8n workflow library (dev dependency)
69
+
70
+ We regularly monitor and update dependencies to address security vulnerabilities.
71
+
72
+ ## Security Updates
73
+
74
+ Security updates will be released as patch versions and announced through:
75
+
76
+ - GitHub Security Advisories
77
+ - Release notes
78
+ - npm package updates
79
+
80
+ Subscribe to releases and security advisories on our [GitHub repository](https://github.com/cakemail/n8n-nodes-cakemail) to stay informed.
81
+
82
+ ## Contact
83
+
84
+ For general security questions or concerns, please contact:
85
+
86
+ - **Email**: security@cakemail.com
87
+ - **Website**: https://www.cakemail.com/security
88
+
89
+ ---
90
+
91
+ Thank you for helping keep n8n-nodes-cakemail and its users safe!
@@ -0,0 +1,47 @@
1
+ // ABOUTME: n8n credentials for the Cakemail API.
2
+ // ABOUTME: Generated by api-kit from the OpenAPI spec.
3
+
4
+ import type { ICredentialType, INodeProperties, ICredentialTestRequest } from 'n8n-workflow';
5
+
6
+ export class CakemailApi implements ICredentialType {
7
+ name = 'cakemailApi';
8
+ displayName = 'Cakemail API';
9
+ documentationUrl = 'https://dev.cakemail.com';
10
+
11
+ properties: INodeProperties[] = [
12
+ {
13
+ displayName: 'Email',
14
+ name: 'email',
15
+ type: 'string',
16
+ default: '',
17
+ required: true,
18
+ placeholder: 'your-email@example.com',
19
+ },
20
+ {
21
+ displayName: 'Password',
22
+ name: 'password',
23
+ type: 'string',
24
+ typeOptions: { password: true },
25
+ default: '',
26
+ required: true,
27
+ },
28
+ {
29
+ displayName: 'API Base URL',
30
+ name: 'baseURL',
31
+ type: 'string',
32
+ default: 'https://api.cakemail.dev',
33
+ required: false,
34
+ description: 'API base URL (advanced)',
35
+ },
36
+ ];
37
+
38
+ test: ICredentialTestRequest = {
39
+ request: {
40
+ baseURL: '={{$credentials.baseURL || "https://api.cakemail.dev"}}',
41
+ url: '/token',
42
+ method: 'POST',
43
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
44
+ body: '=grant_type=password&username={{encodeURIComponent($credentials.email)}}&password={{encodeURIComponent($credentials.password)}}',
45
+ },
46
+ };
47
+ }
@@ -1,17 +1,8 @@
1
- import { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
- /**
3
- * Cakemail API credentials
4
- */
1
+ import type { ICredentialType, INodeProperties, ICredentialTestRequest } from 'n8n-workflow';
5
2
  export declare class CakemailApi implements ICredentialType {
6
3
  name: string;
7
4
  displayName: string;
8
5
  documentationUrl: string;
9
6
  properties: INodeProperties[];
10
- /**
11
- * Test the credentials by attempting to authenticate
12
- *
13
- * Note: We don't use the 'authenticate' property because the Cakemail SDK
14
- * handles OAuth2 authentication internally using the email and password.
15
- */
16
7
  test: ICredentialTestRequest;
17
8
  }
@@ -1,64 +1,42 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CakemailApi = void 0;
4
- /**
5
- * Cakemail API credentials
6
- */
7
- class CakemailApi {
8
- constructor() {
9
- this.name = 'cakemailApi';
10
- this.displayName = 'Cakemail API';
11
- this.documentationUrl = 'https://docs.cakemail.com';
12
- this.properties = [
13
- {
14
- displayName: 'Email',
15
- name: 'email',
16
- type: 'string',
17
- typeOptions: {
18
- password: false,
19
- },
20
- default: '',
21
- required: true,
22
- placeholder: 'your-email@example.com',
23
- description: 'Your Cakemail account email address',
24
- },
25
- {
26
- displayName: 'Password',
27
- name: 'password',
28
- type: 'string',
29
- typeOptions: {
30
- password: true,
31
- },
32
- default: '',
33
- required: true,
34
- description: 'Your Cakemail account password',
35
- },
36
- {
37
- displayName: 'API Base URL',
38
- name: 'baseURL',
39
- type: 'string',
40
- default: 'https://api.cakemail.dev',
41
- required: false,
42
- description: 'Cakemail API base URL (advanced users only)',
43
- },
44
- ];
45
- /**
46
- * Test the credentials by attempting to authenticate
47
- *
48
- * Note: We don't use the 'authenticate' property because the Cakemail SDK
49
- * handles OAuth2 authentication internally using the email and password.
50
- */
51
- this.test = {
52
- request: {
53
- baseURL: '={{$credentials.baseURL || "https://api.cakemail.dev"}}',
54
- url: '/token',
55
- method: 'POST',
56
- headers: {
57
- 'Content-Type': 'application/x-www-form-urlencoded',
58
- },
59
- body: '=grant_type=password&username={{encodeURIComponent($credentials.email)}}&password={{encodeURIComponent($credentials.password)}}',
60
- },
61
- };
62
- }
1
+ // ABOUTME: n8n credentials for the Cakemail API.
2
+ // ABOUTME: Generated by api-kit from the OpenAPI spec.
3
+ export class CakemailApi {
4
+ name = 'cakemailApi';
5
+ displayName = 'Cakemail API';
6
+ documentationUrl = 'https://dev.cakemail.com';
7
+ properties = [
8
+ {
9
+ displayName: 'Email',
10
+ name: 'email',
11
+ type: 'string',
12
+ default: '',
13
+ required: true,
14
+ placeholder: 'your-email@example.com',
15
+ },
16
+ {
17
+ displayName: 'Password',
18
+ name: 'password',
19
+ type: 'string',
20
+ typeOptions: { password: true },
21
+ default: '',
22
+ required: true,
23
+ },
24
+ {
25
+ displayName: 'API Base URL',
26
+ name: 'baseURL',
27
+ type: 'string',
28
+ default: 'https://api.cakemail.dev',
29
+ required: false,
30
+ description: 'API base URL (advanced)',
31
+ },
32
+ ];
33
+ test = {
34
+ request: {
35
+ baseURL: '={{$credentials.baseURL || "https://api.cakemail.dev"}}',
36
+ url: '/token',
37
+ method: 'POST',
38
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
39
+ body: '=grant_type=password&username={{encodeURIComponent($credentials.email)}}&password={{encodeURIComponent($credentials.password)}}',
40
+ },
41
+ };
63
42
  }
64
- exports.CakemailApi = CakemailApi;
@@ -1,102 +1,5 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- /**
3
- * Cakemail n8n node
4
- */
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
5
2
  export declare class Cakemail implements INodeType {
6
3
  description: INodeTypeDescription;
7
4
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
8
- /**
9
- * Execute account operations
10
- */
11
- private executeAccountOperation;
12
- /**
13
- * Execute contact operations
14
- */
15
- private executeContactOperation;
16
- /**
17
- * Execute list operations
18
- */
19
- private executeListOperation;
20
- /**
21
- * Execute campaign operations
22
- */
23
- private executeCampaignOperation;
24
- /**
25
- * Execute email operations
26
- */
27
- private executeEmailOperation;
28
- /**
29
- * Execute custom attribute operations
30
- */
31
- private executeCustomAttributeOperation;
32
- /**
33
- * Execute webhook operations
34
- */
35
- private executeWebhookOperation;
36
- /**
37
- * Execute report operations
38
- */
39
- private executeReportOperation;
40
- /**
41
- * Execute segment operations
42
- */
43
- private executeSegmentOperation;
44
- /**
45
- * Execute sender operations
46
- */
47
- private executeSenderOperation;
48
- /**
49
- * Execute template operations
50
- */
51
- private executeTemplateOperation;
52
- /**
53
- * Execute sub-account operations
54
- */
55
- private executeSubAccountOperation;
56
- /**
57
- * Execute log operations
58
- * Note: The SDK v2.0.0 LogService provides context-specific log methods
59
- * (getCampaignLogs, getListLogs, getActionLogs) instead of generic log operations.
60
- * This implementation is a placeholder that throws an error directing users
61
- * to use the appropriate resource (Campaign, List, or Workflow) for log access.
62
- */
63
- private executeLogOperation;
64
- /**
65
- * Execute user operations
66
- */
67
- private executeUserOperation;
68
- /**
69
- * Execute domain operations
70
- * Note: The SDK v2.0.0 DomainService handles Tracking and Bounce domains,
71
- * not custom sender domains. Available operations: show, patch, validate.
72
- */
73
- private executeDomainOperation;
74
- /**
75
- * Execute DKIM operations
76
- */
77
- private executeDkimOperation;
78
- /**
79
- * Execute form operations
80
- */
81
- private executeFormOperation;
82
- /**
83
- * Execute token operations
84
- */
85
- private executeTokenOperation;
86
- /**
87
- * Execute interest operations
88
- */
89
- private executeInterestOperation;
90
- /**
91
- * Execute tags operations
92
- */
93
- private executeTagsOperation;
94
- /**
95
- * Execute suppressed email operations
96
- */
97
- private executeSuppressedEmailOperation;
98
- /**
99
- * Execute links operations
100
- */
101
- private executeLinksOperation;
102
5
  }