@mspcopilot/n8n-nodes-connectwise 0.1.7 → 0.1.8
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-community/credentials/ConnectWisePsaApi.credentials.js +2 -2
- package/dist-community/nodes/ConnectWise/PSA/ConnectWisePsa.node.js +1 -1
- package/dist-community/nodes/ConnectWise/PSA/descriptions/common.descriptions.js +1 -1
- package/dist-community/nodes/ConnectWise/PSA/helpers/field-collector.js +4 -4
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/ticket.schema.js +20 -8
- package/dist-community/nodes/ConnectWise/PSA/schema/static-fields.js +1 -1
- package/dist-community/nodes/ConnectWise/PSA/transport/version-check.js +1 -1
- package/package.json +2 -2
|
@@ -116,8 +116,8 @@ class ConnectWisePsaApi {
|
|
|
116
116
|
displayName: "Check for Updates",
|
|
117
117
|
name: "checkForUpdates",
|
|
118
118
|
type: "boolean",
|
|
119
|
-
default: !
|
|
120
|
-
hint: "Current version: 0.1.
|
|
119
|
+
default: !0,
|
|
120
|
+
hint: "Current version: 0.1.8 (community edition)",
|
|
121
121
|
description: "Check for new versions of this node package and show notifications when updates are available"
|
|
122
122
|
} ];
|
|
123
123
|
async authenticate(credentials, requestOptions) {
|
|
@@ -74,7 +74,7 @@ const resources = {
|
|
|
74
74
|
|
|
75
75
|
class ConnectWisePsa {
|
|
76
76
|
constructor() {
|
|
77
|
-
console.log(`🔌 ConnectWise PSA Node Loaded | 🏗️ Build: ${"community".toUpperCase()} (${"prod".toUpperCase()} mode)`);
|
|
77
|
+
console.log(`🔌 ConnectWise PSA Node Loaded | 📦 v0.1.8 | 🏗️ Build: ${"community".toUpperCase()} (${"prod".toUpperCase()} mode)`);
|
|
78
78
|
}
|
|
79
79
|
description={
|
|
80
80
|
displayName: "ConnectWise PSA",
|
|
@@ -35,7 +35,7 @@ __export(common_descriptions_exports, {
|
|
|
35
35
|
|
|
36
36
|
module.exports = __toCommonJS(common_descriptions_exports);
|
|
37
37
|
|
|
38
|
-
const DOCURL_PREFIX = "mspcopilot.io/docs", DOCURL_SUFFIX = "?utm_source=n8n_node_connectwise", CHANGELOG_URL = "mspcopilot.io/changelog${DOCURL_SUFFIX}", VERSION_CHECK_URL = "https://djstgzbunlbcnghwfzja.supabase.co/functions/v1/version-check/n8n-nodes-connectwise", VERSION_CHECK_CACHE_TTL =
|
|
38
|
+
const DOCURL_PREFIX = "mspcopilot.io/docs", DOCURL_SUFFIX = "?utm_source=n8n_node_connectwise", CHANGELOG_URL = "mspcopilot.io/changelog${DOCURL_SUFFIX}", VERSION_CHECK_URL = "https://djstgzbunlbcnghwfzja.supabase.co/functions/v1/version-check/n8n-nodes-connectwise", VERSION_CHECK_CACHE_TTL = 36e5;
|
|
39
39
|
|
|
40
40
|
0 && (module.exports = {
|
|
41
41
|
CHANGELOG_URL: CHANGELOG_URL,
|
|
@@ -46,10 +46,10 @@ function collectFieldData(context, schema, operation, index) {
|
|
|
46
46
|
for (const field of schema.fields) if (!UI_CONTROL_FIELDS.includes(field.name) && field.x_noSubmit !== !0 && isPropertyShown(field)) if (relevantProperties.push(field),
|
|
47
47
|
field.type === "resourceLocator") try {
|
|
48
48
|
const value = context.getNodeParameter(field.name, index);
|
|
49
|
-
if (value != null
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
}
|
|
49
|
+
if (value != null) if (typeof value == "object" && "value" in value) {
|
|
50
|
+
const inner = value.value;
|
|
51
|
+
schemaFields[field.name] = typeof inner == "object" ? inner.value : inner;
|
|
52
|
+
} else schemaFields[field.name] = value;
|
|
53
53
|
} catch {} else collectFromProperty(field, schemaFields);
|
|
54
54
|
try {
|
|
55
55
|
const additionalFieldsParam = context.getNodeParameter("additionalFields", index, {});
|
|
@@ -147,18 +147,27 @@ const ticketFields = [ {
|
|
|
147
147
|
}, {
|
|
148
148
|
displayName: "Company",
|
|
149
149
|
name: "company",
|
|
150
|
-
type: "
|
|
151
|
-
default:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
loadOptionsMethod: "loadOptions_company_companies"
|
|
150
|
+
type: "resourceLocator",
|
|
151
|
+
default: {
|
|
152
|
+
mode: "list",
|
|
153
|
+
value: ""
|
|
155
154
|
},
|
|
155
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
156
156
|
displayOptions: {
|
|
157
157
|
show: {
|
|
158
158
|
operation: [ "create", "update" ],
|
|
159
159
|
ticketType: [ "service" ]
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
+
modes: [ {
|
|
163
|
+
displayName: "From List",
|
|
164
|
+
name: "list",
|
|
165
|
+
type: "list",
|
|
166
|
+
typeOptions: {
|
|
167
|
+
searchListMethod: "searchList_company_companies",
|
|
168
|
+
searchable: !0
|
|
169
|
+
}
|
|
170
|
+
} ],
|
|
162
171
|
x_submitAs: "company.id"
|
|
163
172
|
}, {
|
|
164
173
|
displayName: "Board ID or Name",
|
|
@@ -285,7 +294,8 @@ const ticketFields = [ {
|
|
|
285
294
|
}
|
|
286
295
|
} ]
|
|
287
296
|
}
|
|
288
|
-
}
|
|
297
|
+
},
|
|
298
|
+
x_submitAs: "type.id"
|
|
289
299
|
}, {
|
|
290
300
|
displayName: "Sub Type",
|
|
291
301
|
name: "subType",
|
|
@@ -306,7 +316,8 @@ const ticketFields = [ {
|
|
|
306
316
|
}
|
|
307
317
|
} ]
|
|
308
318
|
}
|
|
309
|
-
}
|
|
319
|
+
},
|
|
320
|
+
x_submitAs: "subType.id"
|
|
310
321
|
}, {
|
|
311
322
|
displayName: "Item",
|
|
312
323
|
name: "item",
|
|
@@ -326,7 +337,8 @@ const ticketFields = [ {
|
|
|
326
337
|
}
|
|
327
338
|
} ]
|
|
328
339
|
}
|
|
329
|
-
}
|
|
340
|
+
},
|
|
341
|
+
x_submitAs: "item.id"
|
|
330
342
|
}, {
|
|
331
343
|
displayName: "Initial Description",
|
|
332
344
|
name: "initialDescription",
|
|
@@ -1440,7 +1440,7 @@ const COMMON_FIELDS_NAME = "Common Fields", staticFieldDefinitions = {
|
|
|
1440
1440
|
value: "__ALL_FIELDS_OVERRIDE__"
|
|
1441
1441
|
}, {
|
|
1442
1442
|
name: COMMON_FIELDS_NAME,
|
|
1443
|
-
value: "id,ticket/id,ticket/summary,text,detailDescriptionFlag,internalAnalysisFlag,resolutionFlag,issueFlag,member/id,member/identifier,member/name,contact/id,contact/name,dateCreated,createdBy,_info"
|
|
1443
|
+
value: "id,ticketId,ticket/id,ticket/summary,text,detailDescriptionFlag,internalAnalysisFlag,resolutionFlag,issueFlag,member/id,member/identifier,member/name,contact/id,contact/name,dateCreated,createdBy,_info"
|
|
1444
1444
|
}, {
|
|
1445
1445
|
name: "ID",
|
|
1446
1446
|
value: "id"
|
|
@@ -39,7 +39,7 @@ module.exports = __toCommonJS(version_check_exports);
|
|
|
39
39
|
|
|
40
40
|
var fs = __toESM(require("fs/promises")), path = __toESM(require("path")), os = __toESM(require("os")), import_common = require("../descriptions/common.descriptions");
|
|
41
41
|
|
|
42
|
-
const CACHE_FILE_PATH = path.join(os.tmpdir(), "connectwise-n8n-version-cache.json"), CURRENT_VERSION = "0.1.
|
|
42
|
+
const CACHE_FILE_PATH = path.join(os.tmpdir(), "connectwise-n8n-version-cache.json"), CURRENT_VERSION = "0.1.8";
|
|
43
43
|
|
|
44
44
|
let inMemoryCache = null, cacheLoadPromise = null, fetchInProgress = !1;
|
|
45
45
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mspcopilot/n8n-nodes-connectwise",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "n8n node to integrate with ConnectWise PSA",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package"
|
|
7
7
|
],
|
|
8
8
|
"license": "SUL-1.0",
|
|
9
|
-
"homepage": "https://mspcopilot.io
|
|
9
|
+
"homepage": "https://mspcopilot.io",
|
|
10
10
|
"author": {
|
|
11
11
|
"name": "Dan Buhler (j0dan)",
|
|
12
12
|
"email": "dan.buhler@mspcopilot.io"
|