n8n-nodes-linq 0.1.14 → 0.1.16
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.
|
@@ -2,24 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Linq = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
// Helper function to
|
|
5
|
+
// Helper function to minimally normalize phone numbers: remove spaces only (user supplies E.164)
|
|
6
6
|
function formatPhoneNumber(phoneNumber) {
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
// If it already starts with +, return as is
|
|
10
|
-
if (cleaned.startsWith('+')) {
|
|
11
|
-
return cleaned;
|
|
12
|
-
}
|
|
13
|
-
// If it starts with 00, replace with +
|
|
14
|
-
if (cleaned.startsWith('00')) {
|
|
15
|
-
return '+' + cleaned.substring(2);
|
|
16
|
-
}
|
|
17
|
-
// If it's all digits and doesn't start with +, assume it needs a +
|
|
18
|
-
if (/^\d+$/.test(cleaned)) {
|
|
19
|
-
return '+' + cleaned;
|
|
20
|
-
}
|
|
21
|
-
// For other cases, just return the cleaned number
|
|
22
|
-
return cleaned;
|
|
7
|
+
// Only remove space characters; do not modify digits/symbols or add prefixes
|
|
8
|
+
return phoneNumber.trim().replace(/ /g, '');
|
|
23
9
|
}
|
|
24
10
|
class Linq {
|
|
25
11
|
constructor() {
|
|
@@ -36,6 +22,8 @@ class Linq {
|
|
|
36
22
|
credentials: [
|
|
37
23
|
{ name: 'linqApi', required: true },
|
|
38
24
|
],
|
|
25
|
+
// Add the usableAsTool property here
|
|
26
|
+
usableAsTool: true,
|
|
39
27
|
properties: [
|
|
40
28
|
{
|
|
41
29
|
displayName: 'Resource',
|
|
@@ -10,7 +10,7 @@ class LinqTrigger {
|
|
|
10
10
|
icon: 'file:linq.svg',
|
|
11
11
|
group: ['trigger'],
|
|
12
12
|
version: 1,
|
|
13
|
-
description: 'Handle Linq
|
|
13
|
+
description: 'Handle Linq events via webhooks',
|
|
14
14
|
defaults: {
|
|
15
15
|
name: 'Linq Trigger',
|
|
16
16
|
},
|
|
@@ -26,10 +26,12 @@ class LinqTrigger {
|
|
|
26
26
|
{
|
|
27
27
|
name: 'default',
|
|
28
28
|
httpMethod: 'POST',
|
|
29
|
-
|
|
29
|
+
responseMode: 'onReceived',
|
|
30
30
|
path: 'webhook',
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
|
+
// Add the usableAsTool property here
|
|
34
|
+
usableAsTool: true,
|
|
33
35
|
properties: [
|
|
34
36
|
{
|
|
35
37
|
displayName: 'Events',
|