n8n-nodes-vendschat 1.0.0 → 1.0.3
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/package.json +8 -3
- package/dist/lib/adapters/baseAdapter.d.ts +0 -3
- package/dist/lib/adapters/baseAdapter.js +0 -14
- package/dist/lib/adapters/baseAdapter.js.map +0 -1
- package/dist/lib/adapters/index.d.ts +0 -2
- package/dist/lib/adapters/index.js +0 -21
- package/dist/lib/adapters/index.js.map +0 -1
- package/dist/lib/adapters/instagramAdapter.d.ts +0 -2
- package/dist/lib/adapters/instagramAdapter.js +0 -6
- package/dist/lib/adapters/instagramAdapter.js.map +0 -1
- package/dist/lib/adapters/lineAdapter.d.ts +0 -2
- package/dist/lib/adapters/lineAdapter.js +0 -6
- package/dist/lib/adapters/lineAdapter.js.map +0 -1
- package/dist/lib/adapters/messengerAdapter.d.ts +0 -2
- package/dist/lib/adapters/messengerAdapter.js +0 -6
- package/dist/lib/adapters/messengerAdapter.js.map +0 -1
- package/dist/lib/adapters/telegramAdapter.d.ts +0 -2
- package/dist/lib/adapters/telegramAdapter.js +0 -6
- package/dist/lib/adapters/telegramAdapter.js.map +0 -1
- package/dist/lib/adapters/types.d.ts +0 -6
- package/dist/lib/adapters/types.js +0 -3
- package/dist/lib/adapters/types.js.map +0 -1
- package/dist/lib/adapters/whatsappAdapter.d.ts +0 -2
- package/dist/lib/adapters/whatsappAdapter.js +0 -15
- package/dist/lib/adapters/whatsappAdapter.js.map +0 -1
- package/dist/lib/buildSendMessageRequest.d.ts +0 -19
- package/dist/lib/buildSendMessageRequest.js +0 -125
- package/dist/lib/buildSendMessageRequest.js.map +0 -1
- package/dist/lib/types.d.ts +0 -26
- package/dist/lib/types.js +0 -3
- package/dist/lib/types.js.map +0 -1
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.d.ts +0 -17
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.js +0 -130
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.js.map +0 -1
- package/dist/nodes/VendsChat/VendsChatSendMessage.node.json +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-vendschat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Vendschat for n8n: webhook trigger and send message action for WhatsApp, Instagram, and Messenger via the Vendschat integrations API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -11,11 +11,16 @@
|
|
|
11
11
|
"messenger",
|
|
12
12
|
"messaging"
|
|
13
13
|
],
|
|
14
|
-
"author":
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Vendschat",
|
|
16
|
+
"email": "vendschat@gmail.com",
|
|
17
|
+
"url": "https://vendschat.com"
|
|
18
|
+
},
|
|
15
19
|
"repository": {
|
|
16
20
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/
|
|
21
|
+
"url": "https://github.com/Vendschat/n8n-nodes-vendschat.git"
|
|
18
22
|
},
|
|
23
|
+
"homepage": "https://github.com/Vendschat/n8n-nodes-vendschat#readme",
|
|
19
24
|
"main": "index.js",
|
|
20
25
|
"files": [
|
|
21
26
|
"dist"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.baseAdapter = void 0;
|
|
4
|
-
exports.createNoopAdapter = createNoopAdapter;
|
|
5
|
-
const noop = () => {
|
|
6
|
-
};
|
|
7
|
-
exports.baseAdapter = {
|
|
8
|
-
id: 'base',
|
|
9
|
-
validateOrNormalizeContent: noop,
|
|
10
|
-
};
|
|
11
|
-
function createNoopAdapter(id) {
|
|
12
|
-
return { id, validateOrNormalizeContent: noop };
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=baseAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"baseAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/baseAdapter.ts"],"names":[],"mappings":";;;AAcA,8CAEC;AAdD,MAAM,IAAI,GAAmD,GAAG,EAAE;AAElE,CAAC,CAAC;AAKW,QAAA,WAAW,GAAqB;IAC5C,EAAE,EAAE,MAAM;IACV,0BAA0B,EAAE,IAAI;CAChC,CAAC;AAEF,SAAgB,iBAAiB,CAAC,EAAU;IAC3C,OAAO,EAAE,EAAE,EAAE,0BAA0B,EAAE,IAAI,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAdapter = getAdapter;
|
|
4
|
-
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
-
const instagramAdapter_1 = require("./instagramAdapter");
|
|
6
|
-
const lineAdapter_1 = require("./lineAdapter");
|
|
7
|
-
const messengerAdapter_1 = require("./messengerAdapter");
|
|
8
|
-
const telegramAdapter_1 = require("./telegramAdapter");
|
|
9
|
-
const whatsappAdapter_1 = require("./whatsappAdapter");
|
|
10
|
-
const byId = {
|
|
11
|
-
whatsapp: whatsappAdapter_1.whatsappAdapter,
|
|
12
|
-
instagram: instagramAdapter_1.instagramAdapter,
|
|
13
|
-
messenger: messengerAdapter_1.messengerAdapter,
|
|
14
|
-
telegram: telegramAdapter_1.telegramAdapter,
|
|
15
|
-
line: lineAdapter_1.lineAdapter,
|
|
16
|
-
};
|
|
17
|
-
function getAdapter(platform) {
|
|
18
|
-
var _a;
|
|
19
|
-
return (_a = byId[platform]) !== null && _a !== void 0 ? _a : baseAdapter_1.baseAdapter;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/adapters/index.ts"],"names":[],"mappings":";;AAgBA,gCAEC;AAjBD,+CAA4C;AAC5C,yDAAsD;AACtD,+CAA4C;AAC5C,yDAAsD;AACtD,uDAAoD;AACpD,uDAAoD;AAEpD,MAAM,IAAI,GAAqC;IAC9C,QAAQ,EAAE,iCAAe;IACzB,SAAS,EAAE,mCAAgB;IAC3B,SAAS,EAAE,mCAAgB;IAC3B,QAAQ,EAAE,iCAAe;IACzB,IAAI,EAAE,yBAAW;CACjB,CAAC;AAEF,SAAgB,UAAU,CAAC,QAAgB;;IAC1C,OAAO,MAAA,IAAI,CAAC,QAAQ,CAAC,mCAAI,yBAAW,CAAC;AACtC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.instagramAdapter = void 0;
|
|
4
|
-
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
-
exports.instagramAdapter = (0, baseAdapter_1.createNoopAdapter)('instagram');
|
|
6
|
-
//# sourceMappingURL=instagramAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instagramAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/instagramAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAErC,QAAA,gBAAgB,GAAqB,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lineAdapter = void 0;
|
|
4
|
-
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
-
exports.lineAdapter = (0, baseAdapter_1.createNoopAdapter)('line');
|
|
6
|
-
//# sourceMappingURL=lineAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lineAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/lineAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAGrC,QAAA,WAAW,GAAqB,IAAA,+BAAiB,EAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.messengerAdapter = void 0;
|
|
4
|
-
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
-
exports.messengerAdapter = (0, baseAdapter_1.createNoopAdapter)('messenger');
|
|
6
|
-
//# sourceMappingURL=messengerAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messengerAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/messengerAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAErC,QAAA,gBAAgB,GAAqB,IAAA,+BAAiB,EAAC,WAAW,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.telegramAdapter = void 0;
|
|
4
|
-
const baseAdapter_1 = require("./baseAdapter");
|
|
5
|
-
exports.telegramAdapter = (0, baseAdapter_1.createNoopAdapter)('telegram');
|
|
6
|
-
//# sourceMappingURL=telegramAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"telegramAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/telegramAdapter.ts"],"names":[],"mappings":";;;AACA,+CAAkD;AAGrC,QAAA,eAAe,GAAqB,IAAA,+BAAiB,EAAC,UAAU,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/adapters/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.whatsappAdapter = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const baseAdapter_1 = require("./baseAdapter");
|
|
6
|
-
exports.whatsappAdapter = {
|
|
7
|
-
...baseAdapter_1.baseAdapter,
|
|
8
|
-
id: 'whatsapp',
|
|
9
|
-
validateOrNormalizeContent: (messageType, content) => {
|
|
10
|
-
if (messageType === 'text' && content.text === undefined) {
|
|
11
|
-
throw new n8n_workflow_1.ApplicationError('WhatsApp text messages require content.text');
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=whatsappAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whatsappAdapter.js","sourceRoot":"","sources":["../../../lib/adapters/whatsappAdapter.ts"],"names":[],"mappings":";;;AAAA,+CAAkE;AAElE,+CAA4C;AAM/B,QAAA,eAAe,GAAqB;IAChD,GAAG,yBAAW;IACd,EAAE,EAAE,UAAU;IACd,0BAA0B,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE;QACpD,IAAI,WAAW,KAAK,MAAM,IAAK,OAAuB,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC3E,MAAM,IAAI,+BAAgB,CAAC,6CAA6C,CAAC,CAAC;QAC3E,CAAC;IACF,CAAC;CACD,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { VendsChatSendBody } from './types';
|
|
2
|
-
export type BuildBodyOptions = {
|
|
3
|
-
platform: string;
|
|
4
|
-
recipient: string;
|
|
5
|
-
messageType: 'text' | 'template' | 'image' | 'video' | 'audio' | 'location';
|
|
6
|
-
textMessage?: string;
|
|
7
|
-
templateName?: string;
|
|
8
|
-
templateLanguage?: string;
|
|
9
|
-
templateVariablesJson?: string;
|
|
10
|
-
mediaUrl?: string;
|
|
11
|
-
mediaCaption?: string;
|
|
12
|
-
latitude?: number;
|
|
13
|
-
longitude?: number;
|
|
14
|
-
locationName?: string;
|
|
15
|
-
locationAddress?: string;
|
|
16
|
-
contentOverrideJson?: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function buildSendMessageRequestBody(options: BuildBodyOptions): VendsChatSendBody;
|
|
19
|
-
export declare function parseAndValidateSendBodyFromJsonString(json: string): VendsChatSendBody;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildSendMessageRequestBody = buildSendMessageRequestBody;
|
|
4
|
-
exports.parseAndValidateSendBodyFromJsonString = parseAndValidateSendBodyFromJsonString;
|
|
5
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
-
const adapters_1 = require("./adapters");
|
|
7
|
-
function buildSendMessageRequestBody(options) {
|
|
8
|
-
var _a, _b, _c, _d;
|
|
9
|
-
const adapter = (0, adapters_1.getAdapter)(options.platform);
|
|
10
|
-
const { messageType, platform, recipient } = options;
|
|
11
|
-
const to = recipient.trim();
|
|
12
|
-
if (!to) {
|
|
13
|
-
throw new n8n_workflow_1.ApplicationError('Recipient (to) is required');
|
|
14
|
-
}
|
|
15
|
-
if (messageType === 'template') {
|
|
16
|
-
if (!((_a = options.templateName) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
17
|
-
throw new n8n_workflow_1.ApplicationError('Template name is required for template messages');
|
|
18
|
-
}
|
|
19
|
-
if (!((_b = options.templateLanguage) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
20
|
-
throw new n8n_workflow_1.ApplicationError('Template language (e.g. en_US) is required');
|
|
21
|
-
}
|
|
22
|
-
let variables;
|
|
23
|
-
if ((_c = options.templateVariablesJson) === null || _c === void 0 ? void 0 : _c.trim()) {
|
|
24
|
-
variables = parseJsonObject(options.templateVariablesJson, 'Template variables (JSON)');
|
|
25
|
-
}
|
|
26
|
-
const body = {
|
|
27
|
-
platform,
|
|
28
|
-
to,
|
|
29
|
-
type: 'template',
|
|
30
|
-
template: {
|
|
31
|
-
name: options.templateName.trim(),
|
|
32
|
-
language: options.templateLanguage.trim(),
|
|
33
|
-
...(variables && Object.keys(variables).length > 0 ? { variables } : {}),
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
return body;
|
|
37
|
-
}
|
|
38
|
-
if ((_d = options.contentOverrideJson) === null || _d === void 0 ? void 0 : _d.trim()) {
|
|
39
|
-
const content = parseJsonObject(options.contentOverrideJson, 'Content (JSON object)');
|
|
40
|
-
adapter.validateOrNormalizeContent(messageType, content);
|
|
41
|
-
return { platform, to, type: messageType, content };
|
|
42
|
-
}
|
|
43
|
-
const content = buildStructuredContent(messageType, options);
|
|
44
|
-
adapter.validateOrNormalizeContent(messageType, content);
|
|
45
|
-
return { platform, to, type: messageType, content };
|
|
46
|
-
}
|
|
47
|
-
function buildStructuredContent(messageType, options) {
|
|
48
|
-
var _a, _b, _c, _d, _e;
|
|
49
|
-
switch (messageType) {
|
|
50
|
-
case 'text':
|
|
51
|
-
if (!((_a = options.textMessage) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
52
|
-
throw new n8n_workflow_1.ApplicationError('Text is required for text messages, or set the Content (JSON) override');
|
|
53
|
-
}
|
|
54
|
-
return { text: options.textMessage };
|
|
55
|
-
case 'image':
|
|
56
|
-
case 'video':
|
|
57
|
-
case 'audio':
|
|
58
|
-
if (!((_b = options.mediaUrl) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
59
|
-
throw new n8n_workflow_1.ApplicationError('Media URL is required for this message type, or set the Content (JSON) override');
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
url: options.mediaUrl.trim(),
|
|
63
|
-
...(((_c = options.mediaCaption) === null || _c === void 0 ? void 0 : _c.trim()) ? { caption: options.mediaCaption.trim() } : {}),
|
|
64
|
-
};
|
|
65
|
-
case 'location':
|
|
66
|
-
if (options.latitude === undefined || options.longitude === undefined) {
|
|
67
|
-
throw new n8n_workflow_1.ApplicationError('Latitude and longitude are required, or set the Content (JSON) override');
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
latitude: options.latitude,
|
|
71
|
-
longitude: options.longitude,
|
|
72
|
-
...(((_d = options.locationName) === null || _d === void 0 ? void 0 : _d.trim()) ? { name: options.locationName.trim() } : {}),
|
|
73
|
-
...(((_e = options.locationAddress) === null || _e === void 0 ? void 0 : _e.trim()) ? { address: options.locationAddress.trim() } : {}),
|
|
74
|
-
};
|
|
75
|
-
default: {
|
|
76
|
-
const m = messageType;
|
|
77
|
-
throw new n8n_workflow_1.ApplicationError(`Unsupported type: ${m}`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function parseJsonObject(json, label) {
|
|
82
|
-
try {
|
|
83
|
-
const v = JSON.parse(json);
|
|
84
|
-
if (v === null || typeof v !== 'object' || Array.isArray(v)) {
|
|
85
|
-
throw new n8n_workflow_1.ApplicationError('Invalid');
|
|
86
|
-
}
|
|
87
|
-
return v;
|
|
88
|
-
}
|
|
89
|
-
catch {
|
|
90
|
-
throw new n8n_workflow_1.ApplicationError(`${label} must be a JSON object`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function parseAndValidateSendBodyFromJsonString(json) {
|
|
94
|
-
const o = parseJsonObject(json, 'Request body (JSON object)');
|
|
95
|
-
if (typeof o.platform !== 'string' || !o.platform.trim()) {
|
|
96
|
-
throw new n8n_workflow_1.ApplicationError('platform is required in the JSON body (unified schema)');
|
|
97
|
-
}
|
|
98
|
-
if (typeof o.to !== 'string' || !o.to.trim()) {
|
|
99
|
-
throw new n8n_workflow_1.ApplicationError('to (recipient) is required in the JSON body (unified schema)');
|
|
100
|
-
}
|
|
101
|
-
if (typeof o.type !== 'string' || !o.type.trim()) {
|
|
102
|
-
throw new n8n_workflow_1.ApplicationError('type is required in the JSON body (unified schema)');
|
|
103
|
-
}
|
|
104
|
-
const t = o.type;
|
|
105
|
-
if (t === 'template') {
|
|
106
|
-
if (!o.template || typeof o.template !== 'object' || Array.isArray(o.template)) {
|
|
107
|
-
throw new n8n_workflow_1.ApplicationError('type "template" requires a "template" object in the body');
|
|
108
|
-
}
|
|
109
|
-
const tpl = o.template;
|
|
110
|
-
if (typeof tpl.name !== 'string' || !String(tpl.name).trim()) {
|
|
111
|
-
throw new n8n_workflow_1.ApplicationError('template.name is required');
|
|
112
|
-
}
|
|
113
|
-
if (typeof tpl.language !== 'string' || !String(tpl.language).trim()) {
|
|
114
|
-
throw new n8n_workflow_1.ApplicationError('template.language is required (e.g. en_US)');
|
|
115
|
-
}
|
|
116
|
-
return o;
|
|
117
|
-
}
|
|
118
|
-
if (!o.content || typeof o.content !== 'object' || Array.isArray(o.content)) {
|
|
119
|
-
throw new n8n_workflow_1.ApplicationError(`type "${t}" requires a "content" object in the body (or use type "template" with a "template" object)`);
|
|
120
|
-
}
|
|
121
|
-
const adapter = (0, adapters_1.getAdapter)(String(o.platform));
|
|
122
|
-
adapter.validateOrNormalizeContent(t, o.content);
|
|
123
|
-
return o;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=buildSendMessageRequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildSendMessageRequest.js","sourceRoot":"","sources":["../../lib/buildSendMessageRequest.ts"],"names":[],"mappings":";;AA2BA,kEA2CC;AA4DD,wFAmCC;AArKD,+CAAkE;AAClE,yCAAwC;AA0BxC,SAAgB,2BAA2B,CAC1C,OAAyB;;IAEzB,MAAM,OAAO,GAAG,IAAA,qBAAU,EAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IACrD,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,EAAE,CAAC;QACT,MAAM,IAAI,+BAAgB,CAAC,4BAA4B,CAAC,CAAC;IAC1D,CAAC;IAED,IAAI,WAAW,KAAK,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,YAAY,0CAAE,IAAI,EAAE,CAAA,EAAE,CAAC;YACnC,MAAM,IAAI,+BAAgB,CA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AS,CAAC,6FAA6F,CACvG,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,IAAA,qBAAU,EAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/C,OAAO,CAAC,0BAA0B,CAAC,CAAoC,EAAE,CAAC,CAAC,OAAsB,CAAC,CAAC;IACnG,OAAO,CAAsB,CAAC;AAC/B,CAAC"}
|
package/dist/lib/types.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
-
export type VendsChatErrorBody = {
|
|
3
|
-
success: false;
|
|
4
|
-
error: {
|
|
5
|
-
code: string;
|
|
6
|
-
message: string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
type TextualBody = {
|
|
10
|
-
platform: string;
|
|
11
|
-
to: string;
|
|
12
|
-
type: 'text' | 'image' | 'video' | 'audio' | 'location';
|
|
13
|
-
content: IDataObject;
|
|
14
|
-
};
|
|
15
|
-
type TemplateBody = {
|
|
16
|
-
platform: string;
|
|
17
|
-
to: string;
|
|
18
|
-
type: 'template';
|
|
19
|
-
template: {
|
|
20
|
-
name: string;
|
|
21
|
-
language: string;
|
|
22
|
-
variables?: IDataObject;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export type VendsChatSendBody = TextualBody | TemplateBody;
|
|
26
|
-
export {};
|
package/dist/lib/types.js
DELETED
package/dist/lib/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
-
export declare class VendsChatSendMessage implements INodeType {
|
|
3
|
-
description: INodeTypeDescription;
|
|
4
|
-
methods: {
|
|
5
|
-
loadOptions: {
|
|
6
|
-
getChannels(this: ILoadOptionsFunctions): Promise<{
|
|
7
|
-
name: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}[]>;
|
|
10
|
-
getTemplates(this: ILoadOptionsFunctions): Promise<{
|
|
11
|
-
name: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}[]>;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
17
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VendsChatSendMessage = void 0;
|
|
4
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const integrationApi_1 = require("../../lib/integrationApi");
|
|
6
|
-
const productCopy_1 = require("../../lib/productCopy");
|
|
7
|
-
const sendMessageFields_1 = require("../../lib/sendMessageFields");
|
|
8
|
-
const vendsChatCodex_1 = require("../../lib/vendsChatCodex");
|
|
9
|
-
function buildPayload(item) {
|
|
10
|
-
var _a;
|
|
11
|
-
const templateVars = {};
|
|
12
|
-
const rawVars = item.templateVariables;
|
|
13
|
-
for (const row of (_a = rawVars === null || rawVars === void 0 ? void 0 : rawVars.variable) !== null && _a !== void 0 ? _a : []) {
|
|
14
|
-
if (row.key)
|
|
15
|
-
templateVars[row.key] = row.value;
|
|
16
|
-
}
|
|
17
|
-
const channelMode = item.channelMode;
|
|
18
|
-
return {
|
|
19
|
-
identifier_type: item.identifierType,
|
|
20
|
-
identifier_value: item.identifierValue,
|
|
21
|
-
channel_mode: channelMode,
|
|
22
|
-
channel_id: item.channelId ? Number(item.channelId) : undefined,
|
|
23
|
-
content_mode: item.contentMode,
|
|
24
|
-
message_type: item.messageType,
|
|
25
|
-
attachment_type: item.attachmentType,
|
|
26
|
-
text: channelMode === 'specific'
|
|
27
|
-
? item.specificText || undefined
|
|
28
|
-
: item.text || undefined,
|
|
29
|
-
media_url: channelMode === 'specific'
|
|
30
|
-
? item.specificMediaUrl || undefined
|
|
31
|
-
: item.mediaUrl || undefined,
|
|
32
|
-
caption: channelMode === 'specific'
|
|
33
|
-
? item.specificCaption || undefined
|
|
34
|
-
: item.caption || undefined,
|
|
35
|
-
filename: channelMode === 'specific'
|
|
36
|
-
? item.specificFilename || undefined
|
|
37
|
-
: item.filename || undefined,
|
|
38
|
-
template_id: item.templateId ? Number(item.templateId) : undefined,
|
|
39
|
-
template_variables: Object.keys(templateVars).length > 0 ? templateVars : undefined,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
class VendsChatSendMessage {
|
|
43
|
-
constructor() {
|
|
44
|
-
this.description = {
|
|
45
|
-
displayName: productCopy_1.displayNameSendMessage,
|
|
46
|
-
name: 'vendsChatSendMessage',
|
|
47
|
-
icon: 'file:vendschat.svg',
|
|
48
|
-
group: ['transform'],
|
|
49
|
-
version: 1,
|
|
50
|
-
subtitle: productCopy_1.subtitleSendMessage,
|
|
51
|
-
description: productCopy_1.descriptionSendMessage,
|
|
52
|
-
defaults: { name: productCopy_1.displayNameSendMessage },
|
|
53
|
-
inputs: ['main'],
|
|
54
|
-
outputs: ['main'],
|
|
55
|
-
usableAsTool: true,
|
|
56
|
-
credentials: [{ name: 'vendsChatApi', required: true }],
|
|
57
|
-
properties: sendMessageFields_1.sendMessageFields,
|
|
58
|
-
codex: vendsChatCodex_1.vendsChatCodex,
|
|
59
|
-
};
|
|
60
|
-
this.methods = {
|
|
61
|
-
loadOptions: {
|
|
62
|
-
async getChannels() {
|
|
63
|
-
var _a;
|
|
64
|
-
const cred = (await this.getCredentials('vendsChatApi'));
|
|
65
|
-
const res = await (0, integrationApi_1.vendsChatIntegrationRequest)(this, cred, '/integrations/messages/channels');
|
|
66
|
-
const channels = (_a = res.channels) !== null && _a !== void 0 ? _a : [];
|
|
67
|
-
return channels.map((ch) => ({
|
|
68
|
-
name: `${ch.display_name} (${ch.channel_type})`,
|
|
69
|
-
value: String(ch.id),
|
|
70
|
-
}));
|
|
71
|
-
},
|
|
72
|
-
async getTemplates() {
|
|
73
|
-
var _a;
|
|
74
|
-
const cred = (await this.getCredentials('vendsChatApi'));
|
|
75
|
-
const channelId = this.getNodeParameter('channelId', 0);
|
|
76
|
-
const res = await (0, integrationApi_1.vendsChatIntegrationRequest)(this, cred, `/integrations/messages/templates?channel_id=${channelId}`);
|
|
77
|
-
const templates = (_a = res.templates) !== null && _a !== void 0 ? _a : [];
|
|
78
|
-
return templates.map((t) => {
|
|
79
|
-
var _a;
|
|
80
|
-
return ({
|
|
81
|
-
name: String((_a = t.label) !== null && _a !== void 0 ? _a : t.name),
|
|
82
|
-
value: String(t.id),
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
async execute() {
|
|
90
|
-
const cred = (await this.getCredentials('vendsChatApi'));
|
|
91
|
-
const items = this.getInputData();
|
|
92
|
-
const out = [];
|
|
93
|
-
for (let i = 0; i < items.length; i++) {
|
|
94
|
-
try {
|
|
95
|
-
const payload = buildPayload({
|
|
96
|
-
identifierType: this.getNodeParameter('identifierType', i),
|
|
97
|
-
identifierValue: this.getNodeParameter('identifierValue', i),
|
|
98
|
-
channelMode: this.getNodeParameter('channelMode', i),
|
|
99
|
-
contentMode: this.getNodeParameter('contentMode', i),
|
|
100
|
-
text: this.getNodeParameter('text', i),
|
|
101
|
-
attachmentType: this.getNodeParameter('attachmentType', i),
|
|
102
|
-
channelId: this.getNodeParameter('channelId', i, ''),
|
|
103
|
-
messageType: this.getNodeParameter('messageType', i, ''),
|
|
104
|
-
templateId: this.getNodeParameter('templateId', i, ''),
|
|
105
|
-
templateVariables: this.getNodeParameter('templateVariables', i, {}),
|
|
106
|
-
specificText: this.getNodeParameter('specificText', i, ''),
|
|
107
|
-
mediaUrl: this.getNodeParameter('mediaUrl', i, ''),
|
|
108
|
-
specificMediaUrl: this.getNodeParameter('specificMediaUrl', i, ''),
|
|
109
|
-
caption: this.getNodeParameter('caption', i, ''),
|
|
110
|
-
specificCaption: this.getNodeParameter('specificCaption', i, ''),
|
|
111
|
-
filename: this.getNodeParameter('filename', i, ''),
|
|
112
|
-
specificFilename: this.getNodeParameter('specificFilename', i, ''),
|
|
113
|
-
});
|
|
114
|
-
const response = await (0, integrationApi_1.vendsChatIntegrationRequest)(this, cred, '/integrations/messages/send', 'POST', payload);
|
|
115
|
-
out.push({ json: response, pairedItem: { item: i } });
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
if (this.continueOnFail()) {
|
|
119
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
120
|
-
out.push({ json: { success: false, error: message }, pairedItem: { item: i } });
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return [out];
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.VendsChatSendMessage = VendsChatSendMessage;
|
|
130
|
-
//# sourceMappingURL=VendsChatSendMessage.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VendsChatSendMessage.node.js","sourceRoot":"","sources":["../../../nodes/VendsChat/VendsChatSendMessage.node.ts"],"names":[],"mappings":";;;AAQA,+CAAkD;AAElD,6DAAuE;AACvE,uDAI+B;AAC/B,mEAAgE;AAChE,6DAA0D;AAE1D,SAAS,YAAY,CAAC,IAAiB;;IACtC,MAAM,YAAY,GAA2B,EAAE,CAAC;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAyE,CAAC;IAC/F,KAAK,MAAM,GAAG,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE,EAAE,CAAC;QAC3C,IAAI,GAAG,CAAC,GAAG;YAAE,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC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CAAC,EAAE,EAAE,CAAC,CAAC;YACvD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oBACvE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAChF,SAAS;gBACV,CAAC;gBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAc,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;YAChF,CAAC;QACF,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;CACD;AA9FD,oDA8FC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"node": "n8n-nodes-vendschat",
|
|
3
|
-
"nodeVersion": "1.0",
|
|
4
|
-
"codexVersion": "1.0",
|
|
5
|
-
"categories": ["Communication"],
|
|
6
|
-
"resources": {
|
|
7
|
-
"credentialDocumentation": [
|
|
8
|
-
{
|
|
9
|
-
"url": "https://docs.vendschat.com/docs/auth"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"primaryDocumentation": [
|
|
13
|
-
{
|
|
14
|
-
"url": "https://docs.vendschat.com"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|