@mspcopilot/n8n-nodes-connectwise 0.1.1
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/README.md +59 -0
- package/dist-community/LICENSE.md +21 -0
- package/dist-community/credentials/ConnectWisePsaApi.credentials.js +142 -0
- package/dist-community/credentials/connectwise.svg +1 -0
- package/dist-community/nodes/ConnectWise/PSA/ConnectWisePsa.node.js +180 -0
- package/dist-community/nodes/ConnectWise/PSA/connectwise.svg +1 -0
- package/dist-community/nodes/ConnectWise/PSA/descriptions/common.descriptions.js +46 -0
- package/dist-community/nodes/ConnectWise/PSA/descriptions/common.properties.js +353 -0
- package/dist-community/nodes/ConnectWise/PSA/descriptions/index.js +30 -0
- package/dist-community/nodes/ConnectWise/PSA/helpers/customFields.js +116 -0
- package/dist-community/nodes/ConnectWise/PSA/helpers/field-collector.js +83 -0
- package/dist-community/nodes/ConnectWise/PSA/helpers/field-conditions.js +86 -0
- package/dist-community/nodes/ConnectWise/PSA/helpers/index.js +33 -0
- package/dist-community/nodes/ConnectWise/PSA/helpers/logging.js +61 -0
- package/dist-community/nodes/ConnectWise/PSA/helpers/utils.js +128 -0
- package/dist-community/nodes/ConnectWise/PSA/methods/fieldOptions.js +223 -0
- package/dist-community/nodes/ConnectWise/PSA/methods/generated.js +53 -0
- package/dist-community/nodes/ConnectWise/PSA/methods/index.js +40 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/converter/index.js +66 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/converter/reference.generator.js +178 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/index.js +39 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/references.js +293 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/reports-descriptions.js +300 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/activity.schema.js +413 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/alert-consolidation.js +42 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/company.schema.js +720 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/contact.schema.js +461 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/custom.schema.js +163 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/index.js +72 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/members.schema.js +361 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/reports.schema.js +177 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/ticket.schema.js +983 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/ticketNote.schema.js +289 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/resources/timeEntry.schema.js +407 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/static-fields.js +1813 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/transformer.js +126 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/types/index.js +33 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/types/reference.types.js +23 -0
- package/dist-community/nodes/ConnectWise/PSA/schema/types/resource.types.js +23 -0
- package/dist-community/nodes/ConnectWise/PSA/transport/cache.js +81 -0
- package/dist-community/nodes/ConnectWise/PSA/transport/client.js +200 -0
- package/dist-community/nodes/ConnectWise/PSA/transport/index.js +105 -0
- package/dist-community/nodes/ConnectWise/PSA/transport/operations.js +167 -0
- package/dist-community/nodes/ConnectWise/PSA/transport/response-transformer.js +123 -0
- package/dist-community/nodes/ConnectWise/PSA/transport/version-check.js +128 -0
- package/dist-community/nodes/ConnectWise/PSA/types/n8n-augmentation.d.js +1 -0
- package/dist-community/nodes/ConnectWisePsa.node.json +25 -0
- package/docs/assets/screenshots/create-ticket.png +0 -0
- package/docs/assets/screenshots/field-list.png +0 -0
- package/docs/assets/screenshots/field-sort.png +0 -0
- package/index.js +0 -0
- package/package.json +73 -0
|
@@ -0,0 +1,983 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
|
|
11
|
+
var __export = (target, all) => {
|
|
12
|
+
for (var name in all) __defProp(target, name, {
|
|
13
|
+
get: all[name],
|
|
14
|
+
enumerable: !0
|
|
15
|
+
});
|
|
16
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {},
|
|
25
|
+
__copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)), __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
29
|
+
value: !0
|
|
30
|
+
}), mod);
|
|
31
|
+
|
|
32
|
+
var ticket_schema_exports = {};
|
|
33
|
+
|
|
34
|
+
__export(ticket_schema_exports, {
|
|
35
|
+
execute: () => execute,
|
|
36
|
+
ticketSchema: () => ticketSchema
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
module.exports = __toCommonJS(ticket_schema_exports);
|
|
40
|
+
|
|
41
|
+
var import_transport = require("../../transport"), import_utils = require("../../helpers/utils"), import_common = require("../../descriptions/common.properties");
|
|
42
|
+
|
|
43
|
+
const ticketFields = [ {
|
|
44
|
+
displayName: "Operation",
|
|
45
|
+
name: "operation",
|
|
46
|
+
type: "options",
|
|
47
|
+
noDataExpression: !0,
|
|
48
|
+
displayOptions: {
|
|
49
|
+
show: {
|
|
50
|
+
resource: [ "ticket" ]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
options: [ {
|
|
54
|
+
name: "Create",
|
|
55
|
+
value: "create",
|
|
56
|
+
description: "Create a ticket",
|
|
57
|
+
action: "Create a ticket"
|
|
58
|
+
}, {
|
|
59
|
+
name: "Delete",
|
|
60
|
+
value: "delete",
|
|
61
|
+
description: "Delete a ticket",
|
|
62
|
+
action: "Delete a ticket"
|
|
63
|
+
}, {
|
|
64
|
+
name: "Get",
|
|
65
|
+
value: "get",
|
|
66
|
+
description: "Retrieve a ticket",
|
|
67
|
+
action: "Get a ticket"
|
|
68
|
+
}, {
|
|
69
|
+
name: "Get Many",
|
|
70
|
+
value: "getAll",
|
|
71
|
+
description: "Retrieve many tickets",
|
|
72
|
+
action: "Get many tickets"
|
|
73
|
+
}, {
|
|
74
|
+
name: "Update",
|
|
75
|
+
value: "update",
|
|
76
|
+
description: "Update a ticket",
|
|
77
|
+
action: "Update a ticket"
|
|
78
|
+
} ],
|
|
79
|
+
default: "create"
|
|
80
|
+
}, {
|
|
81
|
+
displayName: "Ticket Type",
|
|
82
|
+
name: "ticketType",
|
|
83
|
+
type: "options",
|
|
84
|
+
required: !0,
|
|
85
|
+
default: "service",
|
|
86
|
+
description: "Type of ticket to work with",
|
|
87
|
+
options: [ {
|
|
88
|
+
name: "Service Ticket",
|
|
89
|
+
value: "service"
|
|
90
|
+
}, {
|
|
91
|
+
name: "Project Ticket",
|
|
92
|
+
value: "project"
|
|
93
|
+
} ],
|
|
94
|
+
displayOptions: {
|
|
95
|
+
show: {
|
|
96
|
+
resource: [ "ticket" ],
|
|
97
|
+
operation: [ "get" ]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
displayName: "Ticket Type",
|
|
102
|
+
name: "ticketType",
|
|
103
|
+
type: "options",
|
|
104
|
+
required: !0,
|
|
105
|
+
default: "service",
|
|
106
|
+
description: "Type of ticket to work with",
|
|
107
|
+
options: [ {
|
|
108
|
+
name: "Service Ticket",
|
|
109
|
+
value: "service"
|
|
110
|
+
}, {
|
|
111
|
+
name: "Project Ticket",
|
|
112
|
+
value: "project"
|
|
113
|
+
} ],
|
|
114
|
+
displayOptions: {
|
|
115
|
+
show: {
|
|
116
|
+
resource: [ "ticket" ],
|
|
117
|
+
operation: [ "create", "update", "getAll", "delete" ]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
displayName: "Ticket ID",
|
|
122
|
+
name: "id",
|
|
123
|
+
type: "number",
|
|
124
|
+
default: null,
|
|
125
|
+
required: !0,
|
|
126
|
+
description: "The ID of the ticket",
|
|
127
|
+
displayOptions: {
|
|
128
|
+
show: {
|
|
129
|
+
operation: [ "update", "delete", "get" ]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
displayName: "Summary",
|
|
134
|
+
name: "summary",
|
|
135
|
+
type: "string",
|
|
136
|
+
x_requiredOnCreate: !0,
|
|
137
|
+
default: "",
|
|
138
|
+
description: "Brief description of the ticket (max 100 characters)",
|
|
139
|
+
displayOptions: {
|
|
140
|
+
show: {
|
|
141
|
+
operation: [ "create", "update" ]
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
typeOptions: {
|
|
145
|
+
maxLength: 100
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
displayName: "Company",
|
|
149
|
+
name: "company",
|
|
150
|
+
type: "options",
|
|
151
|
+
default: "",
|
|
152
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
153
|
+
typeOptions: {
|
|
154
|
+
loadOptionsMethod: "loadOptions_company_companies"
|
|
155
|
+
},
|
|
156
|
+
displayOptions: {
|
|
157
|
+
show: {
|
|
158
|
+
operation: [ "create", "update" ],
|
|
159
|
+
ticketType: [ "service" ]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
x_submitAs: "company.id"
|
|
163
|
+
}, {
|
|
164
|
+
displayName: "Board ID or Name",
|
|
165
|
+
name: "board",
|
|
166
|
+
type: "options",
|
|
167
|
+
default: "",
|
|
168
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
169
|
+
typeOptions: {
|
|
170
|
+
loadOptionsMethod: "loadOptions_service_boards",
|
|
171
|
+
loadOptionsDependsOn: [ "ticketType" ]
|
|
172
|
+
},
|
|
173
|
+
displayOptions: {
|
|
174
|
+
show: {
|
|
175
|
+
operation: [ "create", "update" ]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
x_detectField: "auto"
|
|
179
|
+
}, {
|
|
180
|
+
displayName: "Project",
|
|
181
|
+
name: "project",
|
|
182
|
+
type: "options",
|
|
183
|
+
default: "",
|
|
184
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
185
|
+
typeOptions: {
|
|
186
|
+
loadOptionsMethod: "loadOptions_project_projects"
|
|
187
|
+
},
|
|
188
|
+
displayOptions: {
|
|
189
|
+
show: {
|
|
190
|
+
operation: [ "create", "update" ],
|
|
191
|
+
ticketType: [ "project" ]
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, {
|
|
195
|
+
displayName: "Phase",
|
|
196
|
+
name: "phase",
|
|
197
|
+
type: "options",
|
|
198
|
+
required: !0,
|
|
199
|
+
default: "",
|
|
200
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
201
|
+
typeOptions: {
|
|
202
|
+
loadOptionsMethod: "loadOptions_project_projects_phases",
|
|
203
|
+
loadOptionsDependsOn: [ "project" ]
|
|
204
|
+
},
|
|
205
|
+
displayOptions: {
|
|
206
|
+
show: {
|
|
207
|
+
operation: [ "create" ],
|
|
208
|
+
ticketType: [ "project" ],
|
|
209
|
+
project: [ {
|
|
210
|
+
_cnd: {
|
|
211
|
+
exists: !0
|
|
212
|
+
}
|
|
213
|
+
} ]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
displayName: "Phase",
|
|
218
|
+
name: "phase",
|
|
219
|
+
type: "options",
|
|
220
|
+
default: "",
|
|
221
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
222
|
+
typeOptions: {
|
|
223
|
+
loadOptionsMethod: "loadOptions_project_projects_phases",
|
|
224
|
+
loadOptionsDependsOn: [ "project" ]
|
|
225
|
+
},
|
|
226
|
+
displayOptions: {
|
|
227
|
+
show: {
|
|
228
|
+
operation: [ "update" ],
|
|
229
|
+
ticketType: [ "project" ],
|
|
230
|
+
project: [ {
|
|
231
|
+
_cnd: {
|
|
232
|
+
exists: !0
|
|
233
|
+
}
|
|
234
|
+
} ]
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
displayName: "Status ID or Name",
|
|
239
|
+
name: "status",
|
|
240
|
+
type: "options",
|
|
241
|
+
default: "",
|
|
242
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
243
|
+
typeOptions: {
|
|
244
|
+
loadOptionsMethod: "loadOptions_service_boards_statuses",
|
|
245
|
+
loadOptionsDependsOn: [ "board" ]
|
|
246
|
+
},
|
|
247
|
+
displayOptions: {
|
|
248
|
+
show: {
|
|
249
|
+
operation: [ "create", "update" ],
|
|
250
|
+
board: [ {
|
|
251
|
+
_cnd: {
|
|
252
|
+
exists: !0
|
|
253
|
+
}
|
|
254
|
+
} ]
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
x_detectField: "auto"
|
|
258
|
+
}, {
|
|
259
|
+
displayName: "Priority ID or Name",
|
|
260
|
+
name: "priority",
|
|
261
|
+
type: "options",
|
|
262
|
+
default: "",
|
|
263
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
264
|
+
typeOptions: {
|
|
265
|
+
loadOptionsMethod: "loadOptions_service_priorities"
|
|
266
|
+
},
|
|
267
|
+
displayOptions: {
|
|
268
|
+
show: {
|
|
269
|
+
operation: [ "create", "update" ]
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
x_detectField: "auto"
|
|
273
|
+
}, {
|
|
274
|
+
displayName: "Type",
|
|
275
|
+
name: "type",
|
|
276
|
+
type: "options",
|
|
277
|
+
default: "",
|
|
278
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
279
|
+
typeOptions: {
|
|
280
|
+
loadOptionsMethod: "loadOptions_service_boards_types",
|
|
281
|
+
loadOptionsDependsOn: [ "board" ]
|
|
282
|
+
},
|
|
283
|
+
displayOptions: {
|
|
284
|
+
show: {
|
|
285
|
+
operation: [ "create", "update" ],
|
|
286
|
+
board: [ {
|
|
287
|
+
_cnd: {
|
|
288
|
+
exists: !0
|
|
289
|
+
}
|
|
290
|
+
} ]
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}, {
|
|
294
|
+
displayName: "Sub Type",
|
|
295
|
+
name: "subType",
|
|
296
|
+
type: "options",
|
|
297
|
+
default: "",
|
|
298
|
+
hint: "Ensure the Type, SubType, and Item combo you select is valid.",
|
|
299
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
300
|
+
typeOptions: {
|
|
301
|
+
loadOptionsMethod: "loadOptions_service_boards_subtypes",
|
|
302
|
+
loadOptionsDependsOn: [ "board" ]
|
|
303
|
+
},
|
|
304
|
+
displayOptions: {
|
|
305
|
+
show: {
|
|
306
|
+
operation: [ "create", "update" ],
|
|
307
|
+
type: [ {
|
|
308
|
+
_cnd: {
|
|
309
|
+
exists: !0
|
|
310
|
+
}
|
|
311
|
+
} ]
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}, {
|
|
315
|
+
displayName: "Item",
|
|
316
|
+
name: "item",
|
|
317
|
+
type: "options",
|
|
318
|
+
default: "",
|
|
319
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
320
|
+
typeOptions: {
|
|
321
|
+
loadOptionsMethod: "loadOptions_service_boards_items",
|
|
322
|
+
loadOptionsDependsOn: [ "board" ]
|
|
323
|
+
},
|
|
324
|
+
displayOptions: {
|
|
325
|
+
show: {
|
|
326
|
+
operation: [ "create", "update" ],
|
|
327
|
+
subType: [ {
|
|
328
|
+
_cnd: {
|
|
329
|
+
exists: !0
|
|
330
|
+
}
|
|
331
|
+
} ]
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}, {
|
|
335
|
+
displayName: "Initial Description",
|
|
336
|
+
name: "initialDescription",
|
|
337
|
+
type: "string",
|
|
338
|
+
typeOptions: {
|
|
339
|
+
rows: 4
|
|
340
|
+
},
|
|
341
|
+
default: "",
|
|
342
|
+
description: "Initial description of the ticket. Will not be returned in the response.",
|
|
343
|
+
displayOptions: {
|
|
344
|
+
show: {
|
|
345
|
+
operation: [ "create" ]
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}, {
|
|
349
|
+
displayName: "Initial Internal Analysis",
|
|
350
|
+
name: "initialInternalAnalysis",
|
|
351
|
+
type: "string",
|
|
352
|
+
typeOptions: {
|
|
353
|
+
rows: 3
|
|
354
|
+
},
|
|
355
|
+
default: "",
|
|
356
|
+
description: "Initial internal analysis of the ticket. Will not be returned in the response.",
|
|
357
|
+
displayOptions: {
|
|
358
|
+
show: {
|
|
359
|
+
operation: [ "create" ]
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}, {
|
|
363
|
+
displayName: "Additional Ticket Fields",
|
|
364
|
+
name: "additionalTicketFields",
|
|
365
|
+
type: "collection",
|
|
366
|
+
placeholder: "Add Field",
|
|
367
|
+
default: {},
|
|
368
|
+
displayOptions: {
|
|
369
|
+
show: {
|
|
370
|
+
operation: [ "create", "update" ]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
options: [ {
|
|
374
|
+
displayName: "Service Location",
|
|
375
|
+
name: "serviceLocation",
|
|
376
|
+
type: "options",
|
|
377
|
+
default: "",
|
|
378
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
379
|
+
typeOptions: {
|
|
380
|
+
loadOptionsMethod: "loadOptions_service_locations",
|
|
381
|
+
loadOptionsDependsOn: [ "company" ]
|
|
382
|
+
},
|
|
383
|
+
x_submitAs: "serviceLocation.id"
|
|
384
|
+
}, {
|
|
385
|
+
displayName: "Agreement ID",
|
|
386
|
+
name: "agreement",
|
|
387
|
+
type: "number",
|
|
388
|
+
default: null,
|
|
389
|
+
description: "ID of related agreement",
|
|
390
|
+
x_submitAs: "agreement.id"
|
|
391
|
+
}, {
|
|
392
|
+
displayName: "Work Role",
|
|
393
|
+
name: "workRole",
|
|
394
|
+
type: "options",
|
|
395
|
+
default: "",
|
|
396
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
397
|
+
typeOptions: {
|
|
398
|
+
loadOptionsMethod: "loadOptions_time_workRoles",
|
|
399
|
+
loadOptionsDependsOn: [ "board" ]
|
|
400
|
+
},
|
|
401
|
+
x_submitAs: "workRole.id"
|
|
402
|
+
}, {
|
|
403
|
+
displayName: "Work Type",
|
|
404
|
+
name: "workType",
|
|
405
|
+
type: "options",
|
|
406
|
+
default: "",
|
|
407
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
408
|
+
typeOptions: {
|
|
409
|
+
loadOptionsMethod: "loadOptions_time_workTypes",
|
|
410
|
+
loadOptionsDependsOn: [ "board" ]
|
|
411
|
+
},
|
|
412
|
+
x_submitAs: "workType.id"
|
|
413
|
+
}, {
|
|
414
|
+
displayName: "Automatic Email Contact Flag",
|
|
415
|
+
name: "automaticEmailContactFlag",
|
|
416
|
+
type: "boolean",
|
|
417
|
+
default: !1,
|
|
418
|
+
description: "Whether to automatically email the contact",
|
|
419
|
+
x_submitAs: "automaticEmailContactFlag"
|
|
420
|
+
}, {
|
|
421
|
+
displayName: "Automatic Email Resource Flag",
|
|
422
|
+
name: "automaticEmailResourceFlag",
|
|
423
|
+
type: "boolean",
|
|
424
|
+
default: !1,
|
|
425
|
+
description: "Whether to automatically email the assigned resource",
|
|
426
|
+
x_submitAs: "automaticEmailResourceFlag"
|
|
427
|
+
}, {
|
|
428
|
+
displayName: "Automatic Email CC Flag",
|
|
429
|
+
name: "automaticEmailCcFlag",
|
|
430
|
+
type: "boolean",
|
|
431
|
+
default: !1,
|
|
432
|
+
description: "Whether to automatically email the CC",
|
|
433
|
+
x_submitAs: "automaticEmailCcFlag"
|
|
434
|
+
}, {
|
|
435
|
+
displayName: "Automatic Email CC",
|
|
436
|
+
name: "automaticEmailCc",
|
|
437
|
+
type: "string",
|
|
438
|
+
default: "",
|
|
439
|
+
description: "Email addresses to CC on automatic emails",
|
|
440
|
+
x_submitAs: "automaticEmailCc"
|
|
441
|
+
}, {
|
|
442
|
+
displayName: "Customer Updated Flag",
|
|
443
|
+
name: "customerUpdatedFlag",
|
|
444
|
+
type: "boolean",
|
|
445
|
+
default: !1,
|
|
446
|
+
description: "Whether the customer has updated the ticket",
|
|
447
|
+
x_submitAs: "customerUpdatedFlag"
|
|
448
|
+
}, {
|
|
449
|
+
displayName: "Request for Change Flag",
|
|
450
|
+
name: "requestForChangeFlag",
|
|
451
|
+
type: "boolean",
|
|
452
|
+
default: !1,
|
|
453
|
+
description: "Whether this is a change request",
|
|
454
|
+
hint: "Only for project tickets",
|
|
455
|
+
x_submitAs: "requestForChangeFlag"
|
|
456
|
+
}, {
|
|
457
|
+
displayName: "Is Issue Flag",
|
|
458
|
+
name: "isIssueFlag",
|
|
459
|
+
type: "boolean",
|
|
460
|
+
default: !1,
|
|
461
|
+
description: "Whether this project ticket is an issue",
|
|
462
|
+
x_submitAs: "isIssueFlag"
|
|
463
|
+
} ]
|
|
464
|
+
}, {
|
|
465
|
+
displayName: "Schedule Start Date",
|
|
466
|
+
name: "scheduleStartDate",
|
|
467
|
+
type: "dateTime",
|
|
468
|
+
default: "",
|
|
469
|
+
description: "Scheduled start date for the project ticket",
|
|
470
|
+
displayOptions: {
|
|
471
|
+
show: {
|
|
472
|
+
operation: [ "create", "update" ],
|
|
473
|
+
ticketType: [ "project" ]
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}, {
|
|
477
|
+
displayName: "Schedule End Date",
|
|
478
|
+
name: "scheduleEndDate",
|
|
479
|
+
type: "dateTime",
|
|
480
|
+
default: "",
|
|
481
|
+
description: "Scheduled end date for the project ticket",
|
|
482
|
+
displayOptions: {
|
|
483
|
+
show: {
|
|
484
|
+
operation: [ "create", "update" ],
|
|
485
|
+
ticketType: [ "project" ]
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}, ...(0, import_common.getCommonFields)("tickets"), {
|
|
489
|
+
displayName: "Company",
|
|
490
|
+
name: "company",
|
|
491
|
+
type: "options",
|
|
492
|
+
required: !0,
|
|
493
|
+
default: "",
|
|
494
|
+
description: 'Company to associate with the alert. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
495
|
+
typeOptions: {
|
|
496
|
+
loadOptionsMethod: "loadOptions_company_companies"
|
|
497
|
+
},
|
|
498
|
+
displayOptions: {
|
|
499
|
+
show: {
|
|
500
|
+
resource: [ "ticket" ],
|
|
501
|
+
operation: [ "smartAlertConsolidation" ]
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
x_submitAs: "company.id"
|
|
505
|
+
}, {
|
|
506
|
+
displayName: "Alert Name",
|
|
507
|
+
name: "alertName",
|
|
508
|
+
type: "string",
|
|
509
|
+
required: !0,
|
|
510
|
+
default: "",
|
|
511
|
+
description: "Category for alert/deduplication",
|
|
512
|
+
typeOptions: {
|
|
513
|
+
maxLength: 40
|
|
514
|
+
},
|
|
515
|
+
displayOptions: {
|
|
516
|
+
show: {
|
|
517
|
+
resource: [ "ticket" ],
|
|
518
|
+
operation: [ "smartAlertConsolidation" ]
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}, {
|
|
522
|
+
displayName: "Alert ID",
|
|
523
|
+
name: "alertId",
|
|
524
|
+
type: "string",
|
|
525
|
+
required: !0,
|
|
526
|
+
default: "",
|
|
527
|
+
hint: "Unique ID for the entity we are alerting on. This is used to deduplicate tickets.",
|
|
528
|
+
typeOptions: {
|
|
529
|
+
maxLength: 50
|
|
530
|
+
},
|
|
531
|
+
displayOptions: {
|
|
532
|
+
show: {
|
|
533
|
+
resource: [ "ticket" ],
|
|
534
|
+
operation: [ "smartAlertConsolidation" ]
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}, {
|
|
538
|
+
displayName: "Alert Status",
|
|
539
|
+
name: "alertSuccess",
|
|
540
|
+
type: "boolean",
|
|
541
|
+
required: !0,
|
|
542
|
+
default: !1,
|
|
543
|
+
hint: "Use an expression to set if we are in a success or fail state. FALSE = open ticket, TRUE = resolve ticket.",
|
|
544
|
+
displayOptions: {
|
|
545
|
+
show: {
|
|
546
|
+
resource: [ "ticket" ],
|
|
547
|
+
operation: [ "smartAlertConsolidation" ]
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}, {
|
|
551
|
+
displayName: "Board ID or Name",
|
|
552
|
+
name: "board",
|
|
553
|
+
type: "options",
|
|
554
|
+
required: !0,
|
|
555
|
+
default: "",
|
|
556
|
+
description: 'Service board for the ticket. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
557
|
+
typeOptions: {
|
|
558
|
+
loadOptionsMethod: "loadOptions_service_boards"
|
|
559
|
+
},
|
|
560
|
+
displayOptions: {
|
|
561
|
+
show: {
|
|
562
|
+
resource: [ "ticket" ],
|
|
563
|
+
operation: [ "smartAlertConsolidation" ]
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}, {
|
|
567
|
+
displayName: "Failure Status Name or ID",
|
|
568
|
+
name: "failStatus",
|
|
569
|
+
type: "options",
|
|
570
|
+
default: "",
|
|
571
|
+
description: 'Status to set when alert fails. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
572
|
+
typeOptions: {
|
|
573
|
+
loadOptionsMethod: "loadOptions_service_boards_statuses",
|
|
574
|
+
loadOptionsDependsOn: [ "board" ]
|
|
575
|
+
},
|
|
576
|
+
displayOptions: {
|
|
577
|
+
show: {
|
|
578
|
+
resource: [ "ticket" ],
|
|
579
|
+
operation: [ "smartAlertConsolidation" ],
|
|
580
|
+
board: [ {
|
|
581
|
+
_cnd: {
|
|
582
|
+
exists: !0
|
|
583
|
+
}
|
|
584
|
+
} ]
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}, {
|
|
588
|
+
displayName: "Success Status Name or ID",
|
|
589
|
+
name: "successStatus",
|
|
590
|
+
type: "options",
|
|
591
|
+
default: "",
|
|
592
|
+
description: 'Status to set when alert succeeds. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
593
|
+
typeOptions: {
|
|
594
|
+
loadOptionsMethod: "loadOptions_service_boards_statuses",
|
|
595
|
+
loadOptionsDependsOn: [ "board" ]
|
|
596
|
+
},
|
|
597
|
+
displayOptions: {
|
|
598
|
+
show: {
|
|
599
|
+
resource: [ "ticket" ],
|
|
600
|
+
operation: [ "smartAlertConsolidation" ],
|
|
601
|
+
board: [ {
|
|
602
|
+
_cnd: {
|
|
603
|
+
exists: !0
|
|
604
|
+
}
|
|
605
|
+
} ]
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}, {
|
|
609
|
+
displayName: "Priority Name or ID",
|
|
610
|
+
name: "priority",
|
|
611
|
+
type: "options",
|
|
612
|
+
default: "",
|
|
613
|
+
description: 'Priority for new tickets. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
614
|
+
typeOptions: {
|
|
615
|
+
loadOptionsMethod: "loadOptions_service_priorities"
|
|
616
|
+
},
|
|
617
|
+
displayOptions: {
|
|
618
|
+
show: {
|
|
619
|
+
resource: [ "ticket" ],
|
|
620
|
+
operation: [ "smartAlertConsolidation" ]
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}, {
|
|
624
|
+
displayName: "Summary",
|
|
625
|
+
name: "summary",
|
|
626
|
+
type: "string",
|
|
627
|
+
required: !0,
|
|
628
|
+
default: "",
|
|
629
|
+
description: "Summary for new tickets (max 100 characters)",
|
|
630
|
+
placeholder: "SERVER is not responding to pings",
|
|
631
|
+
typeOptions: {
|
|
632
|
+
maxLength: 100
|
|
633
|
+
},
|
|
634
|
+
displayOptions: {
|
|
635
|
+
show: {
|
|
636
|
+
resource: [ "ticket" ],
|
|
637
|
+
operation: [ "smartAlertConsolidation" ]
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}, {
|
|
641
|
+
displayName: "Failure Message (Detailed)",
|
|
642
|
+
name: "failMessageDetailed",
|
|
643
|
+
type: "string",
|
|
644
|
+
typeOptions: {
|
|
645
|
+
rows: 6
|
|
646
|
+
},
|
|
647
|
+
default: "",
|
|
648
|
+
placeholder: `SERVER01.example.com (10.0.0.21) is down:\n- Server is not responding to pings\nCheck [device history](https://rmm.mymonitor.com/server/123).\nFollow [Troubleshooting Guide](https://kb.mymsp.com/article/123).`,
|
|
649
|
+
description: "Detailed message for initial ticket and failure notes",
|
|
650
|
+
displayOptions: {
|
|
651
|
+
show: {
|
|
652
|
+
resource: [ "ticket" ],
|
|
653
|
+
operation: [ "smartAlertConsolidation" ]
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}, {
|
|
657
|
+
displayName: "Success Message (Detailed)",
|
|
658
|
+
name: "successMessageDetailed",
|
|
659
|
+
type: "string",
|
|
660
|
+
typeOptions: {
|
|
661
|
+
rows: 3
|
|
662
|
+
},
|
|
663
|
+
default: "",
|
|
664
|
+
description: "Detailed message for success notes",
|
|
665
|
+
displayOptions: {
|
|
666
|
+
show: {
|
|
667
|
+
resource: [ "ticket" ],
|
|
668
|
+
operation: [ "smartAlertConsolidation" ]
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}, {
|
|
672
|
+
displayName: "Internal Note",
|
|
673
|
+
name: "internalNote",
|
|
674
|
+
type: "boolean",
|
|
675
|
+
default: !1,
|
|
676
|
+
description: "Whether all notes be marked internal",
|
|
677
|
+
displayOptions: {
|
|
678
|
+
show: {
|
|
679
|
+
resource: [ "ticket" ],
|
|
680
|
+
operation: [ "smartAlertConsolidation" ]
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}, {
|
|
684
|
+
displayName: "Failure Message (Short)",
|
|
685
|
+
name: "failMessageShort",
|
|
686
|
+
type: "string",
|
|
687
|
+
placeholder: "DOWN: Service is offline",
|
|
688
|
+
default: "",
|
|
689
|
+
description: "Short message for failure alerts",
|
|
690
|
+
hint: "Optional short messages to use when reopening tickets",
|
|
691
|
+
displayOptions: {
|
|
692
|
+
show: {
|
|
693
|
+
resource: [ "ticket" ],
|
|
694
|
+
operation: [ "smartAlertConsolidation" ]
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}, {
|
|
698
|
+
displayName: "Success Message (Short)",
|
|
699
|
+
name: "successMessageShort",
|
|
700
|
+
type: "string",
|
|
701
|
+
placeholder: "UP: Service is back online",
|
|
702
|
+
default: "",
|
|
703
|
+
description: "Short message for success alerts",
|
|
704
|
+
displayOptions: {
|
|
705
|
+
show: {
|
|
706
|
+
resource: [ "ticket" ],
|
|
707
|
+
operation: [ "smartAlertConsolidation" ]
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}, {
|
|
711
|
+
displayName: "Reopen Closed Tickets",
|
|
712
|
+
name: "reopenClosedTicket",
|
|
713
|
+
type: "boolean",
|
|
714
|
+
default: !1,
|
|
715
|
+
description: "Whether to reopen closed tickets on new failure",
|
|
716
|
+
displayOptions: {
|
|
717
|
+
show: {
|
|
718
|
+
resource: [ "ticket" ],
|
|
719
|
+
operation: [ "smartAlertConsolidation" ]
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}, {
|
|
723
|
+
displayName: "Reopen on Same Board Only",
|
|
724
|
+
name: "reopenSameBoardOnly",
|
|
725
|
+
type: "boolean",
|
|
726
|
+
default: !0,
|
|
727
|
+
description: "Whether to only reopen tickets only on the original board. If disabled, you must change your success and failure statuses to strings using the expression option.",
|
|
728
|
+
displayOptions: {
|
|
729
|
+
show: {
|
|
730
|
+
resource: [ "ticket" ],
|
|
731
|
+
operation: [ "smartAlertConsolidation" ],
|
|
732
|
+
reopenClosedTicket: [ !0 ]
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}, {
|
|
736
|
+
displayName: "Reopen Status Name or ID",
|
|
737
|
+
name: "reopenStatus",
|
|
738
|
+
type: "options",
|
|
739
|
+
default: "",
|
|
740
|
+
description: 'Status to set when reopening a closed ticket. If not set, uses the Failure Status. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
741
|
+
typeOptions: {
|
|
742
|
+
loadOptionsMethod: "loadOptions_service_boards_statuses",
|
|
743
|
+
loadOptionsDependsOn: [ "board" ]
|
|
744
|
+
},
|
|
745
|
+
displayOptions: {
|
|
746
|
+
show: {
|
|
747
|
+
resource: [ "ticket" ],
|
|
748
|
+
operation: [ "smartAlertConsolidation" ],
|
|
749
|
+
reopenClosedTicket: [ !0 ],
|
|
750
|
+
board: [ {
|
|
751
|
+
_cnd: {
|
|
752
|
+
exists: !0
|
|
753
|
+
}
|
|
754
|
+
} ]
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
x_detectField: "auto"
|
|
758
|
+
}, {
|
|
759
|
+
displayName: "Max Creation Age for Reopening Ticket",
|
|
760
|
+
name: "reopenTicketMaxAge",
|
|
761
|
+
type: "string",
|
|
762
|
+
default: "",
|
|
763
|
+
description: "Only reopen tickets that have been created in the timeframe. Duration can be 45s, 2m, 1.5h, 1h30m, 1 day, or 3w.",
|
|
764
|
+
placeholder: "eg: 15 days",
|
|
765
|
+
displayOptions: {
|
|
766
|
+
show: {
|
|
767
|
+
resource: [ "ticket" ],
|
|
768
|
+
operation: [ "smartAlertConsolidation" ],
|
|
769
|
+
reopenClosedTicket: [ !0 ]
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}, {
|
|
773
|
+
displayName: "Max Last Updated Time for Reopening Ticket",
|
|
774
|
+
name: "reopenTicketLastUpdateAge",
|
|
775
|
+
type: "string",
|
|
776
|
+
default: "",
|
|
777
|
+
description: "Only reopen tickets that have been updated in the timeframe",
|
|
778
|
+
displayOptions: {
|
|
779
|
+
show: {
|
|
780
|
+
resource: [ "ticket" ],
|
|
781
|
+
operation: [ "smartAlertConsolidation" ],
|
|
782
|
+
reopenClosedTicket: [ !0 ]
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}, {
|
|
786
|
+
displayName: "Max Comments",
|
|
787
|
+
name: "maxComments",
|
|
788
|
+
type: "number",
|
|
789
|
+
default: 20,
|
|
790
|
+
required: !0,
|
|
791
|
+
description: "Maximum number of comments to allow on the ticket before updating last comment instead to prevent PSA slowdown",
|
|
792
|
+
displayOptions: {
|
|
793
|
+
show: {
|
|
794
|
+
resource: [ "ticket" ],
|
|
795
|
+
operation: [ "smartAlertConsolidation" ],
|
|
796
|
+
reopenClosedTicket: [ !0 ]
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}, {
|
|
800
|
+
displayName: "Append to Previous Note",
|
|
801
|
+
name: "appendPreviousNote",
|
|
802
|
+
type: "boolean",
|
|
803
|
+
default: !1,
|
|
804
|
+
description: "Whether to append to previous note when reopening a closed ticket",
|
|
805
|
+
hint: "Will use the short message if available",
|
|
806
|
+
displayOptions: {
|
|
807
|
+
show: {
|
|
808
|
+
resource: [ "ticket" ],
|
|
809
|
+
operation: [ "smartAlertConsolidation" ],
|
|
810
|
+
reopenClosedTicket: [ !0 ]
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}, {
|
|
814
|
+
displayName: "Append Timeframe",
|
|
815
|
+
name: "appendPreviousNoteTimeframe",
|
|
816
|
+
type: "string",
|
|
817
|
+
default: "",
|
|
818
|
+
placeholder: "eg: 2 days",
|
|
819
|
+
hint: "How old a note to update before creating a new one",
|
|
820
|
+
displayOptions: {
|
|
821
|
+
show: {
|
|
822
|
+
resource: [ "ticket" ],
|
|
823
|
+
operation: [ "smartAlertConsolidation" ],
|
|
824
|
+
appendPreviousNote: [ !0 ]
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}, {
|
|
828
|
+
displayName: "Append Only If Last Note",
|
|
829
|
+
name: "appendPreviousNoteOnlyIfLastNote",
|
|
830
|
+
type: "boolean",
|
|
831
|
+
default: !0,
|
|
832
|
+
description: "Whether to only append if our note is the last one",
|
|
833
|
+
hint: "Only modify the last note if the last one was automated. This helps keep it inline with work done by technicians.",
|
|
834
|
+
displayOptions: {
|
|
835
|
+
show: {
|
|
836
|
+
resource: [ "ticket" ],
|
|
837
|
+
operation: [ "smartAlertConsolidation" ],
|
|
838
|
+
appendPreviousNote: [ !0 ]
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}, {
|
|
842
|
+
displayName: "Prepend to Note",
|
|
843
|
+
name: "prependToNote",
|
|
844
|
+
type: "boolean",
|
|
845
|
+
default: !0,
|
|
846
|
+
description: "Whether to add new content at top of comment in descending order (recommended)",
|
|
847
|
+
displayOptions: {
|
|
848
|
+
show: {
|
|
849
|
+
resource: [ "ticket" ],
|
|
850
|
+
operation: [ "smartAlertConsolidation" ],
|
|
851
|
+
appendPreviousNote: [ !0 ]
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}, {
|
|
855
|
+
displayName: "Configuration Attachment",
|
|
856
|
+
name: "configAttachment",
|
|
857
|
+
type: "collection",
|
|
858
|
+
placeholder: "Auto-attach configuration by identifiers",
|
|
859
|
+
description: "If multiple options, will priority MAC > IP > Full Hostname > Smart Match",
|
|
860
|
+
default: {},
|
|
861
|
+
displayOptions: {
|
|
862
|
+
show: {
|
|
863
|
+
resource: [ "ticket" ],
|
|
864
|
+
operation: [ "smartAlertConsolidation" ]
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
options: [ {
|
|
868
|
+
displayName: "Configuration Type",
|
|
869
|
+
name: "configurationTypeId",
|
|
870
|
+
type: "options",
|
|
871
|
+
default: "",
|
|
872
|
+
description: 'Filter configurations by type. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
873
|
+
typeOptions: {
|
|
874
|
+
loadOptionsMethod: "loadOptions_company_configurations_types"
|
|
875
|
+
}
|
|
876
|
+
}, {
|
|
877
|
+
displayName: "MAC Address",
|
|
878
|
+
name: "macAddress",
|
|
879
|
+
type: "string",
|
|
880
|
+
default: "",
|
|
881
|
+
description: "MAC address to match configuration",
|
|
882
|
+
hint: "MAC address can accept multiple formats and accepts * as a wildcard",
|
|
883
|
+
placeholder: "00:11:22:33:44:55"
|
|
884
|
+
}, {
|
|
885
|
+
displayName: "IP Address",
|
|
886
|
+
name: "ipAddress",
|
|
887
|
+
type: "string",
|
|
888
|
+
default: "",
|
|
889
|
+
description: "IP address to match configuration",
|
|
890
|
+
placeholder: "192.168.1.100"
|
|
891
|
+
}, {
|
|
892
|
+
displayName: "Hostname Full Match",
|
|
893
|
+
name: "hostnameFull",
|
|
894
|
+
type: "string",
|
|
895
|
+
default: "",
|
|
896
|
+
placeholder: "server01.example.com",
|
|
897
|
+
hint: "Looks for an exact match, but accepts * as a wildcard",
|
|
898
|
+
description: "Matches the full hostname only. Case insensitive."
|
|
899
|
+
}, {
|
|
900
|
+
displayName: "Hostname Smart Match",
|
|
901
|
+
name: "hostnameSearch",
|
|
902
|
+
type: "string",
|
|
903
|
+
default: "",
|
|
904
|
+
placeholder: "server01",
|
|
905
|
+
description: "Hostname to match",
|
|
906
|
+
hint: 'Example: "server01" will match server01.example.com, server01.internal, or SERVER01'
|
|
907
|
+
}, {
|
|
908
|
+
displayName: "Skip If No Configuration",
|
|
909
|
+
name: "skipIfNoConfiguration",
|
|
910
|
+
type: "boolean",
|
|
911
|
+
default: !1,
|
|
912
|
+
description: "Whether to skip ticket creation if no configuration is found"
|
|
913
|
+
}, {
|
|
914
|
+
displayName: "Append Configuration Details to Initial Description",
|
|
915
|
+
name: "appendConfigurationDetails",
|
|
916
|
+
type: "boolean",
|
|
917
|
+
default: !1,
|
|
918
|
+
description: "Whether to append configuration details (serial, model, tag, notes) to the ticket description"
|
|
919
|
+
} ]
|
|
920
|
+
}, {
|
|
921
|
+
displayName: "Preview Mode",
|
|
922
|
+
name: "previewMode",
|
|
923
|
+
type: "boolean",
|
|
924
|
+
default: !1,
|
|
925
|
+
description: "Whether to perform a dry run without making any changes",
|
|
926
|
+
displayOptions: {
|
|
927
|
+
show: {
|
|
928
|
+
resource: [ "ticket" ],
|
|
929
|
+
operation: [ "smartAlertConsolidation" ]
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
} ], ticketSchema = {
|
|
933
|
+
resource: "ticket",
|
|
934
|
+
displayName: "Ticket",
|
|
935
|
+
pluralDisplayName: "Tickets",
|
|
936
|
+
description: "Manage ConnectWise service and project tickets",
|
|
937
|
+
identifierField: "id",
|
|
938
|
+
nameField: "summary",
|
|
939
|
+
fieldDetection: {
|
|
940
|
+
endpoint: "/service/tickets",
|
|
941
|
+
sampleSize: 3
|
|
942
|
+
},
|
|
943
|
+
endpoints: {
|
|
944
|
+
create: {
|
|
945
|
+
method: "POST",
|
|
946
|
+
path: params => `/${params.ticketType}/tickets`
|
|
947
|
+
},
|
|
948
|
+
update: {
|
|
949
|
+
method: "PATCH",
|
|
950
|
+
path: params => `/${params.ticketType}/tickets/${params.id}`
|
|
951
|
+
},
|
|
952
|
+
get: {
|
|
953
|
+
method: "GET",
|
|
954
|
+
path: params => `/${params.ticketType}/tickets/${params.id}`
|
|
955
|
+
},
|
|
956
|
+
getAll: {
|
|
957
|
+
method: "GET",
|
|
958
|
+
path: params => `/${params.ticketType}/tickets`
|
|
959
|
+
},
|
|
960
|
+
delete: {
|
|
961
|
+
method: "DELETE",
|
|
962
|
+
path: params => `/${params.ticketType}/tickets/${params.id}`
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
fields: ticketFields,
|
|
966
|
+
hints: [ {
|
|
967
|
+
message: "To reopen tickets on other boards, you must change your success, failure, and reopen statuses to strings using the expression option.",
|
|
968
|
+
type: "danger",
|
|
969
|
+
location: "outputPane",
|
|
970
|
+
whenToDisplay: "always",
|
|
971
|
+
displayCondition: '={{ $parameter["resource"] === "ticket" && $parameter["operation"] === "smartAlertConsolidation" && $parameter["reopenSameBoardOnly"] === false && (typeof $parameter["successStatus"] === "number" || typeof $parameter["failStatus"] === "number" || (typeof $parameter["reopenStatus"] === "number" && $parameter["reopenStatus"] !== "")) }}'
|
|
972
|
+
} ]
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
async function execute(operation, i) {
|
|
976
|
+
return operation === "smartAlertConsolidation" ? (0, import_utils.returnProOnlyMessage)(this, i) : operation === "get" && this.getNodeParameter("ticketType", i) === "auto" ? (0,
|
|
977
|
+
import_utils.returnProOnlyMessage)(this, i) : import_transport.executeResourceOperation.call(this, ticketSchema, operation, i);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
0 && (module.exports = {
|
|
981
|
+
execute: execute,
|
|
982
|
+
ticketSchema: ticketSchema
|
|
983
|
+
});
|