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.
- package/dist/credentials/CakemailApi.credentials.d.ts +9 -0
- package/dist/credentials/CakemailApi.credentials.js +55 -44
- package/dist/nodes/Cakemail/Cakemail.node.d.ts +88 -0
- package/dist/nodes/Cakemail/Cakemail.node.js +3126 -2108
- package/dist/nodes/Cakemail/__tests__/Cakemail.node.test.d.ts +1 -0
- package/dist/nodes/Cakemail/__tests__/Cakemail.node.test.js +422 -0
- package/dist/nodes/Cakemail/resources/dkim.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/dkim.operations.js +149 -0
- package/dist/nodes/Cakemail/resources/domain.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/domain.operations.js +136 -0
- package/dist/nodes/Cakemail/resources/form.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/form.operations.js +334 -0
- package/dist/nodes/Cakemail/resources/index.d.ts +13 -0
- package/dist/nodes/Cakemail/resources/index.js +29 -0
- package/dist/nodes/Cakemail/resources/interest.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/interest.operations.js +254 -0
- package/dist/nodes/Cakemail/resources/links.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/links.operations.js +63 -0
- package/dist/nodes/Cakemail/resources/log.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/log.operations.js +188 -0
- package/dist/nodes/Cakemail/resources/sender.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/sender.operations.js +295 -0
- package/dist/nodes/Cakemail/resources/subAccount.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/subAccount.operations.js +390 -0
- package/dist/nodes/Cakemail/resources/suppressedEmail.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/suppressedEmail.operations.js +333 -0
- package/dist/nodes/Cakemail/resources/tags.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/tags.operations.js +270 -0
- package/dist/nodes/Cakemail/resources/template.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/template.operations.js +363 -0
- package/dist/nodes/Cakemail/resources/token.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/token.operations.js +118 -0
- package/dist/nodes/Cakemail/resources/user.operations.d.ts +2 -0
- package/dist/nodes/Cakemail/resources/user.operations.js +420 -0
- package/dist/nodes/CakemailTrigger/CakemailTrigger.node.d.ts +3 -0
- package/dist/nodes/CakemailTrigger/CakemailTrigger.node.js +313 -291
- package/nodes/Cakemail/Cakemail.node.ts +1311 -0
- package/nodes/Cakemail/resources/dkim.operations.ts +151 -0
- package/nodes/Cakemail/resources/domain.operations.ts +138 -0
- package/nodes/Cakemail/resources/form.operations.ts +338 -0
- package/nodes/Cakemail/resources/index.ts +13 -0
- package/nodes/Cakemail/resources/interest.operations.ts +258 -0
- package/nodes/Cakemail/resources/links.operations.ts +63 -0
- package/nodes/Cakemail/resources/log.operations.ts +189 -0
- package/nodes/Cakemail/resources/sender.operations.ts +300 -0
- package/nodes/Cakemail/resources/subAccount.operations.ts +393 -0
- package/nodes/Cakemail/resources/suppressedEmail.operations.ts +338 -0
- package/nodes/Cakemail/resources/tags.operations.ts +274 -0
- package/nodes/Cakemail/resources/template.operations.ts +368 -0
- package/nodes/Cakemail/resources/token.operations.ts +120 -0
- package/nodes/Cakemail/resources/user.operations.ts +425 -0
- package/package.json +4 -5
- package/dist/index.d.ts +0 -2
- 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
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
|
}
|