n8n-nodes-hostinger-mail 0.1.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.
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/credentials/HostingerMailApi.credentials.d.ts +10 -0
- package/dist/credentials/HostingerMailApi.credentials.js +39 -0
- package/dist/credentials/HostingerMailApi.credentials.js.map +1 -0
- package/dist/nodes/HostingerMail/GenericFunctions.d.ts +6 -0
- package/dist/nodes/HostingerMail/GenericFunctions.js +56 -0
- package/dist/nodes/HostingerMail/GenericFunctions.js.map +1 -0
- package/dist/nodes/HostingerMail/HostingerMail.node.d.ts +11 -0
- package/dist/nodes/HostingerMail/HostingerMail.node.js +445 -0
- package/dist/nodes/HostingerMail/HostingerMail.node.js.map +1 -0
- package/dist/nodes/HostingerMail/HostingerMail.node.json +18 -0
- package/dist/nodes/HostingerMail/descriptions/EmailDescription.d.ts +3 -0
- package/dist/nodes/HostingerMail/descriptions/EmailDescription.js +182 -0
- package/dist/nodes/HostingerMail/descriptions/EmailDescription.js.map +1 -0
- package/dist/nodes/HostingerMail/descriptions/FolderDescription.d.ts +3 -0
- package/dist/nodes/HostingerMail/descriptions/FolderDescription.js +92 -0
- package/dist/nodes/HostingerMail/descriptions/FolderDescription.js.map +1 -0
- package/dist/nodes/HostingerMail/descriptions/MessageDescription.d.ts +3 -0
- package/dist/nodes/HostingerMail/descriptions/MessageDescription.js +399 -0
- package/dist/nodes/HostingerMail/descriptions/MessageDescription.js.map +1 -0
- package/dist/nodes/HostingerMail/descriptions/WebhookDescription.d.ts +3 -0
- package/dist/nodes/HostingerMail/descriptions/WebhookDescription.js +238 -0
- package/dist/nodes/HostingerMail/descriptions/WebhookDescription.js.map +1 -0
- package/dist/nodes/HostingerMail/hostingerMail.svg +5 -0
- package/dist/nodes/HostingerMailTrigger/HostingerMailTrigger.node.d.ts +17 -0
- package/dist/nodes/HostingerMailTrigger/HostingerMailTrigger.node.js +135 -0
- package/dist/nodes/HostingerMailTrigger/HostingerMailTrigger.node.js.map +1 -0
- package/dist/nodes/HostingerMailTrigger/HostingerMailTrigger.node.json +18 -0
- package/dist/nodes/HostingerMailTrigger/hostingerMail.svg +5 -0
- package/dist/package.json +54 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HostingerMail = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const EmailDescription_1 = require("./descriptions/EmailDescription");
|
|
6
|
+
const FolderDescription_1 = require("./descriptions/FolderDescription");
|
|
7
|
+
const MessageDescription_1 = require("./descriptions/MessageDescription");
|
|
8
|
+
const WebhookDescription_1 = require("./descriptions/WebhookDescription");
|
|
9
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
10
|
+
class HostingerMail {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.description = {
|
|
13
|
+
displayName: 'Hostinger Mail',
|
|
14
|
+
name: 'hostingerMail',
|
|
15
|
+
icon: 'file:hostingerMail.svg',
|
|
16
|
+
group: ['output'],
|
|
17
|
+
version: 1,
|
|
18
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
19
|
+
description: 'Consume the Hostinger Email API',
|
|
20
|
+
defaults: {
|
|
21
|
+
name: 'Hostinger Mail',
|
|
22
|
+
},
|
|
23
|
+
usableAsTool: true,
|
|
24
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
25
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
26
|
+
credentials: [
|
|
27
|
+
{
|
|
28
|
+
name: 'hostingerMailApi',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
properties: [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Resource',
|
|
35
|
+
name: 'resource',
|
|
36
|
+
type: 'options',
|
|
37
|
+
noDataExpression: true,
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
name: 'Account',
|
|
41
|
+
value: 'account',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Email',
|
|
45
|
+
value: 'email',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Folder',
|
|
49
|
+
value: 'folder',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Message',
|
|
53
|
+
value: 'message',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Webhook',
|
|
57
|
+
value: 'webhook',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
default: 'email',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Operation',
|
|
64
|
+
name: 'operation',
|
|
65
|
+
type: 'options',
|
|
66
|
+
noDataExpression: true,
|
|
67
|
+
displayOptions: {
|
|
68
|
+
show: {
|
|
69
|
+
resource: ['account'],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
options: [
|
|
73
|
+
{
|
|
74
|
+
name: 'Get',
|
|
75
|
+
value: 'get',
|
|
76
|
+
description: 'Get the authenticated account and the mailboxes the API token can manage',
|
|
77
|
+
action: 'Get the authenticated account',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
default: 'get',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
displayName: 'Mailbox Name or ID',
|
|
84
|
+
name: 'mailboxId',
|
|
85
|
+
type: 'options',
|
|
86
|
+
typeOptions: {
|
|
87
|
+
loadOptionsMethod: 'getMailboxes',
|
|
88
|
+
},
|
|
89
|
+
required: true,
|
|
90
|
+
default: '',
|
|
91
|
+
description: 'Mailbox to operate on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
92
|
+
displayOptions: {
|
|
93
|
+
hide: {
|
|
94
|
+
resource: ['account'],
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
...EmailDescription_1.emailOperations,
|
|
99
|
+
...EmailDescription_1.emailFields,
|
|
100
|
+
...MessageDescription_1.messageOperations,
|
|
101
|
+
...MessageDescription_1.messageFields,
|
|
102
|
+
...FolderDescription_1.folderOperations,
|
|
103
|
+
...FolderDescription_1.folderFields,
|
|
104
|
+
...WebhookDescription_1.webhookOperations,
|
|
105
|
+
...WebhookDescription_1.webhookFields,
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
this.methods = {
|
|
109
|
+
loadOptions: {
|
|
110
|
+
async getMailboxes() {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', '/me'));
|
|
113
|
+
const data = (_a = response.data) !== null && _a !== void 0 ? _a : {};
|
|
114
|
+
const mailboxes = (_b = data.mailboxes) !== null && _b !== void 0 ? _b : [];
|
|
115
|
+
return mailboxes.map((mailbox) => ({
|
|
116
|
+
name: mailbox.address,
|
|
117
|
+
value: mailbox.resourceId,
|
|
118
|
+
}));
|
|
119
|
+
},
|
|
120
|
+
async getFolders() {
|
|
121
|
+
var _a;
|
|
122
|
+
const mailboxId = this.getCurrentNodeParameter('mailboxId');
|
|
123
|
+
if (!mailboxId)
|
|
124
|
+
return [];
|
|
125
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', `/mailboxes/${mailboxId}/folders`));
|
|
126
|
+
const folders = (_a = response.data) !== null && _a !== void 0 ? _a : [];
|
|
127
|
+
return folders.map((folder) => ({
|
|
128
|
+
name: folder.path,
|
|
129
|
+
value: folder.path,
|
|
130
|
+
}));
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
async execute() {
|
|
136
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
137
|
+
const items = this.getInputData();
|
|
138
|
+
const returnData = [];
|
|
139
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
140
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
141
|
+
for (let i = 0; i < items.length; i++) {
|
|
142
|
+
try {
|
|
143
|
+
let responseData;
|
|
144
|
+
let binaryOutput;
|
|
145
|
+
if (resource === 'account') {
|
|
146
|
+
if (operation === 'get') {
|
|
147
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', '/me'));
|
|
148
|
+
responseData = response.data;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
const mailboxId = this.getNodeParameter('mailboxId', i);
|
|
153
|
+
const mailboxBase = `/mailboxes/${mailboxId}`;
|
|
154
|
+
if (resource === 'email') {
|
|
155
|
+
if (operation === 'send') {
|
|
156
|
+
const to = (0, GenericFunctions_1.parseStringList)(this.getNodeParameter('to', i));
|
|
157
|
+
const subject = this.getNodeParameter('subject', i);
|
|
158
|
+
const emailFormat = this.getNodeParameter('emailFormat', i);
|
|
159
|
+
const additionalOptions = this.getNodeParameter('additionalOptions', i, {});
|
|
160
|
+
const cc = (0, GenericFunctions_1.parseStringList)((_a = additionalOptions.cc) !== null && _a !== void 0 ? _a : '');
|
|
161
|
+
const bcc = (0, GenericFunctions_1.parseStringList)((_b = additionalOptions.bcc) !== null && _b !== void 0 ? _b : '');
|
|
162
|
+
if (!to.length && !cc.length && !bcc.length) {
|
|
163
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one recipient must be set in "To", "CC" or "BCC"', { itemIndex: i });
|
|
164
|
+
}
|
|
165
|
+
const body = { subject };
|
|
166
|
+
if (to.length)
|
|
167
|
+
body.to = to;
|
|
168
|
+
if (cc.length)
|
|
169
|
+
body.cc = cc;
|
|
170
|
+
if (bcc.length)
|
|
171
|
+
body.bcc = bcc;
|
|
172
|
+
if (emailFormat === 'text' || emailFormat === 'both') {
|
|
173
|
+
body.text = this.getNodeParameter('text', i);
|
|
174
|
+
}
|
|
175
|
+
if (emailFormat === 'html' || emailFormat === 'both') {
|
|
176
|
+
body.html = this.getNodeParameter('html', i);
|
|
177
|
+
}
|
|
178
|
+
const attachmentsUi = this.getNodeParameter('attachmentsUi', i, {});
|
|
179
|
+
const attachmentValues = (_c = attachmentsUi.attachmentValues) !== null && _c !== void 0 ? _c : [];
|
|
180
|
+
if (attachmentValues.length) {
|
|
181
|
+
const attachments = [];
|
|
182
|
+
for (const attachment of attachmentValues) {
|
|
183
|
+
const binaryPropertyName = attachment.binaryPropertyName;
|
|
184
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
|
185
|
+
const buffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
|
186
|
+
const attachmentPayload = {
|
|
187
|
+
filename: (_d = binaryData.fileName) !== null && _d !== void 0 ? _d : 'attachment',
|
|
188
|
+
content: buffer.toString('base64'),
|
|
189
|
+
encoding: 'base64',
|
|
190
|
+
};
|
|
191
|
+
if (binaryData.mimeType) {
|
|
192
|
+
attachmentPayload.contentType = binaryData.mimeType;
|
|
193
|
+
}
|
|
194
|
+
if (attachment.cid) {
|
|
195
|
+
attachmentPayload.cid = attachment.cid;
|
|
196
|
+
}
|
|
197
|
+
attachments.push(attachmentPayload);
|
|
198
|
+
}
|
|
199
|
+
body.attachments = attachments;
|
|
200
|
+
}
|
|
201
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${mailboxBase}/send`, body);
|
|
202
|
+
responseData = { success: true };
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else if (resource === 'message') {
|
|
206
|
+
const folder = (0, GenericFunctions_1.encodeFolderPath)(this.getNodeParameter('folder', i));
|
|
207
|
+
const messagesBase = `${mailboxBase}/folders/${folder}/messages`;
|
|
208
|
+
if (operation === 'getAll' || operation === 'search') {
|
|
209
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
210
|
+
const listOptions = this.getNodeParameter('listOptions', i, {});
|
|
211
|
+
const qs = {};
|
|
212
|
+
if (listOptions.sort)
|
|
213
|
+
qs.sort = listOptions.sort;
|
|
214
|
+
let endpoint = messagesBase;
|
|
215
|
+
let method = 'GET';
|
|
216
|
+
let body = {};
|
|
217
|
+
if (operation === 'search') {
|
|
218
|
+
endpoint = `${messagesBase}/search`;
|
|
219
|
+
method = 'POST';
|
|
220
|
+
const searchFilters = this.getNodeParameter('searchFilters', i, {});
|
|
221
|
+
body = { ...searchFilters };
|
|
222
|
+
if (typeof body.flags === 'string') {
|
|
223
|
+
const flags = (0, GenericFunctions_1.parseStringList)(body.flags);
|
|
224
|
+
if (flags.length)
|
|
225
|
+
body.flags = flags;
|
|
226
|
+
else
|
|
227
|
+
delete body.flags;
|
|
228
|
+
}
|
|
229
|
+
for (const key of Object.keys(body)) {
|
|
230
|
+
if (body[key] === '' || body[key] === 0)
|
|
231
|
+
delete body[key];
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
const limit = returnAll ? undefined : this.getNodeParameter('limit', i);
|
|
235
|
+
responseData = await GenericFunctions_1.hostingerMailApiRequestAllItems.call(this, method, endpoint, body, qs, limit);
|
|
236
|
+
}
|
|
237
|
+
else if (operation === 'get') {
|
|
238
|
+
const uid = this.getNodeParameter('uid', i);
|
|
239
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', `${messagesBase}/${uid}`));
|
|
240
|
+
responseData = response.data;
|
|
241
|
+
}
|
|
242
|
+
else if (operation === 'getText') {
|
|
243
|
+
const uid = this.getNodeParameter('uid', i);
|
|
244
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', `${messagesBase}/${uid}/text`));
|
|
245
|
+
responseData = response.data;
|
|
246
|
+
}
|
|
247
|
+
else if (operation === 'getSource') {
|
|
248
|
+
const uid = this.getNodeParameter('uid', i);
|
|
249
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
250
|
+
const response = await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', `${messagesBase}/${uid}/source`, {}, {}, { json: false, encoding: 'arraybuffer', returnFullResponse: true });
|
|
251
|
+
const binaryData = await this.helpers.prepareBinaryData(Buffer.from(response.body), `message-${uid}.eml`, 'message/rfc822');
|
|
252
|
+
binaryOutput = { [binaryPropertyName]: binaryData };
|
|
253
|
+
responseData = { uid };
|
|
254
|
+
}
|
|
255
|
+
else if (operation === 'downloadAttachment') {
|
|
256
|
+
const uid = this.getNodeParameter('uid', i);
|
|
257
|
+
const attachmentId = this.getNodeParameter('attachmentId', i);
|
|
258
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
|
259
|
+
const response = await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', `${messagesBase}/${uid}/attachments/${encodeURIComponent(attachmentId)}`, {}, {}, { json: false, encoding: 'arraybuffer', returnFullResponse: true });
|
|
260
|
+
const headers = ((_e = response.headers) !== null && _e !== void 0 ? _e : {});
|
|
261
|
+
const contentType = (_f = headers['content-type']) !== null && _f !== void 0 ? _f : undefined;
|
|
262
|
+
const contentDisposition = (_g = headers['content-disposition']) !== null && _g !== void 0 ? _g : '';
|
|
263
|
+
const filenameMatch = contentDisposition.match(/filename="?([^";]+)"?/);
|
|
264
|
+
const filename = filenameMatch ? filenameMatch[1] : 'attachment';
|
|
265
|
+
const binaryData = await this.helpers.prepareBinaryData(Buffer.from(response.body), filename, contentType);
|
|
266
|
+
binaryOutput = { [binaryPropertyName]: binaryData };
|
|
267
|
+
responseData = { uid, attachmentId };
|
|
268
|
+
}
|
|
269
|
+
else if (operation === 'move') {
|
|
270
|
+
const uid = this.getNodeParameter('uid', i);
|
|
271
|
+
const targetFolder = this.getNodeParameter('targetFolder', i);
|
|
272
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${messagesBase}/${uid}/move`, {
|
|
273
|
+
targetFolder,
|
|
274
|
+
});
|
|
275
|
+
responseData = { success: true, uid, targetFolder };
|
|
276
|
+
}
|
|
277
|
+
else if (operation === 'moveMany') {
|
|
278
|
+
const uids = parseUids.call(this, i);
|
|
279
|
+
const targetFolder = this.getNodeParameter('targetFolder', i);
|
|
280
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${messagesBase}/move`, {
|
|
281
|
+
uids,
|
|
282
|
+
targetFolder,
|
|
283
|
+
});
|
|
284
|
+
responseData = { success: true, uids, targetFolder };
|
|
285
|
+
}
|
|
286
|
+
else if (operation === 'delete') {
|
|
287
|
+
const uid = this.getNodeParameter('uid', i);
|
|
288
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'DELETE', `${messagesBase}/${uid}`);
|
|
289
|
+
responseData = { success: true, uid };
|
|
290
|
+
}
|
|
291
|
+
else if (operation === 'deleteMany') {
|
|
292
|
+
const uids = parseUids.call(this, i);
|
|
293
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${messagesBase}/delete`, {
|
|
294
|
+
uids,
|
|
295
|
+
});
|
|
296
|
+
responseData = { success: true, uids };
|
|
297
|
+
}
|
|
298
|
+
else if (operation === 'deleteAll') {
|
|
299
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'DELETE', messagesBase);
|
|
300
|
+
responseData = { success: true };
|
|
301
|
+
}
|
|
302
|
+
else if (operation === 'updateFlags') {
|
|
303
|
+
const uid = this.getNodeParameter('uid', i);
|
|
304
|
+
const body = buildFlagsBody.call(this, i);
|
|
305
|
+
responseData = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'PATCH', `${messagesBase}/${uid}`, body));
|
|
306
|
+
}
|
|
307
|
+
else if (operation === 'updateFlagsMany') {
|
|
308
|
+
const uids = parseUids.call(this, i);
|
|
309
|
+
const body = { uids, ...buildFlagsBody.call(this, i) };
|
|
310
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${messagesBase}/flags`, body));
|
|
311
|
+
responseData = response.data;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
else if (resource === 'folder') {
|
|
315
|
+
const foldersBase = `${mailboxBase}/folders`;
|
|
316
|
+
if (operation === 'getAll') {
|
|
317
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', foldersBase));
|
|
318
|
+
responseData = response.data;
|
|
319
|
+
}
|
|
320
|
+
else if (operation === 'create') {
|
|
321
|
+
const name = this.getNodeParameter('name', i);
|
|
322
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', foldersBase, {
|
|
323
|
+
name,
|
|
324
|
+
}));
|
|
325
|
+
responseData = (_h = response.data) !== null && _h !== void 0 ? _h : { success: true };
|
|
326
|
+
}
|
|
327
|
+
else if (operation === 'update') {
|
|
328
|
+
const folder = (0, GenericFunctions_1.encodeFolderPath)(this.getNodeParameter('folder', i));
|
|
329
|
+
const newName = this.getNodeParameter('newName', i);
|
|
330
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'PUT', `${foldersBase}/${folder}`, { name: newName }));
|
|
331
|
+
responseData = (_j = response === null || response === void 0 ? void 0 : response.data) !== null && _j !== void 0 ? _j : { success: true };
|
|
332
|
+
}
|
|
333
|
+
else if (operation === 'delete') {
|
|
334
|
+
const folder = (0, GenericFunctions_1.encodeFolderPath)(this.getNodeParameter('folder', i));
|
|
335
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'DELETE', `${foldersBase}/${folder}`);
|
|
336
|
+
responseData = { success: true };
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
else if (resource === 'webhook') {
|
|
340
|
+
const webhooksBase = `${mailboxBase}/webhooks`;
|
|
341
|
+
if (operation === 'getAll') {
|
|
342
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', webhooksBase));
|
|
343
|
+
responseData = response.data;
|
|
344
|
+
}
|
|
345
|
+
else if (operation === 'get') {
|
|
346
|
+
const webhookId = this.getNodeParameter('webhookId', i);
|
|
347
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'GET', `${webhooksBase}/${webhookId}`));
|
|
348
|
+
responseData = response.data;
|
|
349
|
+
}
|
|
350
|
+
else if (operation === 'create') {
|
|
351
|
+
const body = {
|
|
352
|
+
name: this.getNodeParameter('name', i),
|
|
353
|
+
url: this.getNodeParameter('url', i),
|
|
354
|
+
events: this.getNodeParameter('events', i),
|
|
355
|
+
status: this.getNodeParameter('status', i),
|
|
356
|
+
};
|
|
357
|
+
const description = this.getNodeParameter('description', i);
|
|
358
|
+
if (description)
|
|
359
|
+
body.description = description;
|
|
360
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', webhooksBase, body));
|
|
361
|
+
responseData = response.data;
|
|
362
|
+
}
|
|
363
|
+
else if (operation === 'update') {
|
|
364
|
+
const webhookId = this.getNodeParameter('webhookId', i);
|
|
365
|
+
const updateFields = this.getNodeParameter('updateFields', i, {});
|
|
366
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'PATCH', `${webhooksBase}/${webhookId}`, updateFields));
|
|
367
|
+
responseData = response.data;
|
|
368
|
+
}
|
|
369
|
+
else if (operation === 'delete') {
|
|
370
|
+
const webhookId = this.getNodeParameter('webhookId', i);
|
|
371
|
+
await GenericFunctions_1.hostingerMailApiRequest.call(this, 'DELETE', `${webhooksBase}/${webhookId}`);
|
|
372
|
+
responseData = { success: true };
|
|
373
|
+
}
|
|
374
|
+
else if (operation === 'regenerateSecret') {
|
|
375
|
+
const webhookId = this.getNodeParameter('webhookId', i);
|
|
376
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${webhooksBase}/${webhookId}/regenerate-secret`));
|
|
377
|
+
responseData = response.data;
|
|
378
|
+
}
|
|
379
|
+
else if (operation === 'test') {
|
|
380
|
+
const webhookId = this.getNodeParameter('webhookId', i);
|
|
381
|
+
const response = (await GenericFunctions_1.hostingerMailApiRequest.call(this, 'POST', `${webhooksBase}/${webhookId}/test`));
|
|
382
|
+
responseData = (_k = response.data) !== null && _k !== void 0 ? _k : response;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
if (responseData === undefined) {
|
|
387
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported for resource "${resource}"`, { itemIndex: i });
|
|
388
|
+
}
|
|
389
|
+
if (Array.isArray(responseData)) {
|
|
390
|
+
for (const entry of responseData) {
|
|
391
|
+
returnData.push({ json: entry, pairedItem: { item: i } });
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
returnData.push({
|
|
396
|
+
json: responseData,
|
|
397
|
+
...(binaryOutput ? { binary: binaryOutput } : {}),
|
|
398
|
+
pairedItem: { item: i },
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
catch (error) {
|
|
403
|
+
if (this.continueOnFail()) {
|
|
404
|
+
returnData.push({
|
|
405
|
+
json: { error: error.message },
|
|
406
|
+
pairedItem: { item: i },
|
|
407
|
+
});
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
const wrappedError = error instanceof n8n_workflow_1.NodeApiError || error instanceof n8n_workflow_1.NodeOperationError
|
|
411
|
+
? error
|
|
412
|
+
: new n8n_workflow_1.NodeApiError(this.getNode(), error, { itemIndex: i });
|
|
413
|
+
throw wrappedError;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return [returnData];
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
exports.HostingerMail = HostingerMail;
|
|
420
|
+
function parseUids(itemIndex) {
|
|
421
|
+
const raw = this.getNodeParameter('uids', itemIndex);
|
|
422
|
+
const uids = raw
|
|
423
|
+
.split(',')
|
|
424
|
+
.map((entry) => entry.trim())
|
|
425
|
+
.filter((entry) => entry !== '')
|
|
426
|
+
.map((entry) => Number(entry));
|
|
427
|
+
if (!uids.length || uids.some((uid) => !Number.isInteger(uid) || uid < 1)) {
|
|
428
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), '"Message UIDs" must be a comma-separated list of positive integers', { itemIndex });
|
|
429
|
+
}
|
|
430
|
+
return uids;
|
|
431
|
+
}
|
|
432
|
+
function buildFlagsBody(itemIndex) {
|
|
433
|
+
const addFlags = (0, GenericFunctions_1.parseStringList)(this.getNodeParameter('addFlags', itemIndex, ''));
|
|
434
|
+
const removeFlags = (0, GenericFunctions_1.parseStringList)(this.getNodeParameter('removeFlags', itemIndex, ''));
|
|
435
|
+
if (!addFlags.length && !removeFlags.length) {
|
|
436
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one of "Add Flags" or "Remove Flags" must be set', { itemIndex });
|
|
437
|
+
}
|
|
438
|
+
const body = {};
|
|
439
|
+
if (addFlags.length)
|
|
440
|
+
body.addFlags = addFlags;
|
|
441
|
+
if (removeFlags.length)
|
|
442
|
+
body.removeFlags = removeFlags;
|
|
443
|
+
return body;
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=HostingerMail.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HostingerMail.node.js","sourceRoot":"","sources":["../../../nodes/HostingerMail/HostingerMail.node.ts"],"names":[],"mappings":";;;AAWA,+CAAqF;AAErF,sEAA+E;AAC/E,wEAAkF;AAClF,0EAAqF;AACrF,0EAAqF;AACrF,yDAK4B;AAE5B,MAAa,aAAa;IAA1B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE;gBACT,IAAI,EAAE,gBAAgB;aACtB;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oB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IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QAC7C,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,2DAA2D,EAC3D,EAAE,SAAS,EAAE,CACb,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAgB,EAAE,CAAC;IAC7B,IAAI,QAAQ,CAAC,MAAM;QAAE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC9C,IAAI,WAAW,CAAC,MAAM;QAAE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACvD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-hostinger-mail.hostingerMail",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Communication"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://api.mail.hostinger.com/"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://api.mail.hostinger.com/"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|