n8n-nodes-cakemail 1.0.6 → 1.0.7
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class CakemailApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
6
|
properties: INodeProperties[];
|
|
7
|
+
authenticate: IAuthenticateGeneric;
|
|
7
8
|
test: ICredentialTestRequest;
|
|
8
9
|
}
|
|
@@ -38,11 +38,33 @@ class CakemailApi {
|
|
|
38
38
|
description: 'Cakemail API base URL (advanced users only)',
|
|
39
39
|
},
|
|
40
40
|
];
|
|
41
|
+
authenticate = {
|
|
42
|
+
type: 'generic',
|
|
43
|
+
properties: {
|
|
44
|
+
body: {
|
|
45
|
+
grant_type: 'password',
|
|
46
|
+
username: '={{$credentials.email}}',
|
|
47
|
+
password: '={{$credentials.password}}',
|
|
48
|
+
},
|
|
49
|
+
headers: {
|
|
50
|
+
'Content-Type': 'application/json',
|
|
51
|
+
},
|
|
52
|
+
qs: {},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
41
55
|
test = {
|
|
42
56
|
request: {
|
|
43
57
|
baseURL: '={{$credentials.baseURL || "https://api.cakemail.dev"}}',
|
|
44
|
-
url: '/
|
|
45
|
-
method: '
|
|
58
|
+
url: '/oauth/token',
|
|
59
|
+
method: 'POST',
|
|
60
|
+
body: {
|
|
61
|
+
grant_type: 'password',
|
|
62
|
+
username: '={{$credentials.email}}',
|
|
63
|
+
password: '={{$credentials.password}}',
|
|
64
|
+
},
|
|
65
|
+
headers: {
|
|
66
|
+
'Content-Type': 'application/json',
|
|
67
|
+
},
|
|
46
68
|
},
|
|
47
69
|
};
|
|
48
70
|
}
|