n8n-nodes-cakemail 1.3.3 → 1.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 (54) hide show
  1. package/dist/credentials/CakemailApi.credentials.d.ts +9 -0
  2. package/dist/credentials/CakemailApi.credentials.js +55 -44
  3. package/dist/nodes/Cakemail/Cakemail.node.d.ts +88 -0
  4. package/dist/nodes/Cakemail/Cakemail.node.js +3126 -2108
  5. package/dist/nodes/Cakemail/__tests__/Cakemail.node.test.d.ts +1 -0
  6. package/dist/nodes/Cakemail/__tests__/Cakemail.node.test.js +422 -0
  7. package/dist/nodes/Cakemail/resources/dkim.operations.d.ts +2 -0
  8. package/dist/nodes/Cakemail/resources/dkim.operations.js +149 -0
  9. package/dist/nodes/Cakemail/resources/domain.operations.d.ts +2 -0
  10. package/dist/nodes/Cakemail/resources/domain.operations.js +136 -0
  11. package/dist/nodes/Cakemail/resources/form.operations.d.ts +2 -0
  12. package/dist/nodes/Cakemail/resources/form.operations.js +334 -0
  13. package/dist/nodes/Cakemail/resources/index.d.ts +13 -0
  14. package/dist/nodes/Cakemail/resources/index.js +29 -0
  15. package/dist/nodes/Cakemail/resources/interest.operations.d.ts +2 -0
  16. package/dist/nodes/Cakemail/resources/interest.operations.js +254 -0
  17. package/dist/nodes/Cakemail/resources/links.operations.d.ts +2 -0
  18. package/dist/nodes/Cakemail/resources/links.operations.js +63 -0
  19. package/dist/nodes/Cakemail/resources/log.operations.d.ts +2 -0
  20. package/dist/nodes/Cakemail/resources/log.operations.js +188 -0
  21. package/dist/nodes/Cakemail/resources/sender.operations.d.ts +2 -0
  22. package/dist/nodes/Cakemail/resources/sender.operations.js +295 -0
  23. package/dist/nodes/Cakemail/resources/subAccount.operations.d.ts +2 -0
  24. package/dist/nodes/Cakemail/resources/subAccount.operations.js +390 -0
  25. package/dist/nodes/Cakemail/resources/suppressedEmail.operations.d.ts +2 -0
  26. package/dist/nodes/Cakemail/resources/suppressedEmail.operations.js +333 -0
  27. package/dist/nodes/Cakemail/resources/tags.operations.d.ts +2 -0
  28. package/dist/nodes/Cakemail/resources/tags.operations.js +270 -0
  29. package/dist/nodes/Cakemail/resources/template.operations.d.ts +2 -0
  30. package/dist/nodes/Cakemail/resources/template.operations.js +363 -0
  31. package/dist/nodes/Cakemail/resources/token.operations.d.ts +2 -0
  32. package/dist/nodes/Cakemail/resources/token.operations.js +118 -0
  33. package/dist/nodes/Cakemail/resources/user.operations.d.ts +2 -0
  34. package/dist/nodes/Cakemail/resources/user.operations.js +420 -0
  35. package/dist/nodes/CakemailTrigger/CakemailTrigger.node.d.ts +3 -0
  36. package/dist/nodes/CakemailTrigger/CakemailTrigger.node.js +313 -291
  37. package/nodes/Cakemail/Cakemail.node.ts +1311 -0
  38. package/nodes/Cakemail/resources/dkim.operations.ts +151 -0
  39. package/nodes/Cakemail/resources/domain.operations.ts +138 -0
  40. package/nodes/Cakemail/resources/form.operations.ts +338 -0
  41. package/nodes/Cakemail/resources/index.ts +13 -0
  42. package/nodes/Cakemail/resources/interest.operations.ts +258 -0
  43. package/nodes/Cakemail/resources/links.operations.ts +63 -0
  44. package/nodes/Cakemail/resources/log.operations.ts +189 -0
  45. package/nodes/Cakemail/resources/sender.operations.ts +300 -0
  46. package/nodes/Cakemail/resources/subAccount.operations.ts +393 -0
  47. package/nodes/Cakemail/resources/suppressedEmail.operations.ts +338 -0
  48. package/nodes/Cakemail/resources/tags.operations.ts +274 -0
  49. package/nodes/Cakemail/resources/template.operations.ts +368 -0
  50. package/nodes/Cakemail/resources/token.operations.ts +120 -0
  51. package/nodes/Cakemail/resources/user.operations.ts +425 -0
  52. package/package.json +4 -5
  53. package/dist/index.d.ts +0 -2
  54. package/dist/index.js +0 -2
@@ -1,8 +1,17 @@
1
1
  import { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ /**
3
+ * Cakemail API credentials
4
+ */
2
5
  export declare class CakemailApi implements ICredentialType {
3
6
  name: string;
4
7
  displayName: string;
5
8
  documentationUrl: string;
6
9
  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
+ */
7
16
  test: ICredentialTestRequest;
8
17
  }
@@ -1,53 +1,64 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CakemailApi = void 0;
4
+ /**
5
+ * Cakemail API credentials
6
+ */
4
7
  class CakemailApi {
5
- name = 'cakemailApi';
6
- displayName = 'Cakemail API';
7
- documentationUrl = 'https://docs.cakemail.com';
8
- properties = [
9
- {
10
- displayName: 'Email',
11
- name: 'email',
12
- type: 'string',
13
- typeOptions: {
14
- password: false,
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',
15
24
  },
16
- default: '',
17
- required: true,
18
- placeholder: 'your-email@example.com',
19
- description: 'Your Cakemail account email address',
20
- },
21
- {
22
- displayName: 'Password',
23
- name: 'password',
24
- type: 'string',
25
- typeOptions: {
26
- password: true,
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',
27
35
  },
28
- default: '',
29
- required: true,
30
- description: 'Your Cakemail account password',
31
- },
32
- {
33
- displayName: 'API Base URL',
34
- name: 'baseURL',
35
- type: 'string',
36
- default: 'https://api.cakemail.dev',
37
- required: false,
38
- description: 'Cakemail API base URL (advanced users only)',
39
- },
40
- ];
41
- test = {
42
- request: {
43
- baseURL: '={{$credentials.baseURL || "https://api.cakemail.dev"}}',
44
- url: '/token',
45
- method: 'POST',
46
- headers: {
47
- 'Content-Type': 'application/x-www-form-urlencoded',
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)',
48
43
  },
49
- body: '=grant_type=password&username={{encodeURIComponent($credentials.email)}}&password={{encodeURIComponent($credentials.password)}}',
50
- },
51
- };
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
+ }
52
63
  }
53
64
  exports.CakemailApi = CakemailApi;
@@ -1,14 +1,102 @@
1
1
  import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ /**
3
+ * Cakemail n8n node
4
+ */
2
5
  export declare class Cakemail implements INodeType {
3
6
  description: INodeTypeDescription;
4
7
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
8
+ /**
9
+ * Execute account operations
10
+ */
5
11
  private executeAccountOperation;
12
+ /**
13
+ * Execute contact operations
14
+ */
6
15
  private executeContactOperation;
16
+ /**
17
+ * Execute list operations
18
+ */
7
19
  private executeListOperation;
20
+ /**
21
+ * Execute campaign operations
22
+ */
8
23
  private executeCampaignOperation;
24
+ /**
25
+ * Execute email operations
26
+ */
9
27
  private executeEmailOperation;
28
+ /**
29
+ * Execute custom attribute operations
30
+ */
10
31
  private executeCustomAttributeOperation;
32
+ /**
33
+ * Execute webhook operations
34
+ */
11
35
  private executeWebhookOperation;
36
+ /**
37
+ * Execute report operations
38
+ */
12
39
  private executeReportOperation;
40
+ /**
41
+ * Execute segment operations
42
+ */
13
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;
14
102
  }