n8n-nodes-qwease 0.3.9

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.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/dist/credentials/QweaseApi.credentials.d.ts +10 -0
  4. package/dist/credentials/QweaseApi.credentials.js +37 -0
  5. package/dist/credentials/qwease.png +0 -0
  6. package/dist/credentials/qwease.svg +4 -0
  7. package/dist/nodes/Qwease/FormFieldsHelper.d.ts +21 -0
  8. package/dist/nodes/Qwease/FormFieldsHelper.js +187 -0
  9. package/dist/nodes/Qwease/GenericFunctions.d.ts +4 -0
  10. package/dist/nodes/Qwease/GenericFunctions.js +30 -0
  11. package/dist/nodes/Qwease/KnowledgeTaskDescription.d.ts +5 -0
  12. package/dist/nodes/Qwease/KnowledgeTaskDescription.js +306 -0
  13. package/dist/nodes/Qwease/OtherResourcesDescription.d.ts +12 -0
  14. package/dist/nodes/Qwease/OtherResourcesDescription.js +444 -0
  15. package/dist/nodes/Qwease/Qwease.node.d.ts +32 -0
  16. package/dist/nodes/Qwease/Qwease.node.js +187 -0
  17. package/dist/nodes/Qwease/QweaseDescription.d.ts +3 -0
  18. package/dist/nodes/Qwease/QweaseDescription.js +390 -0
  19. package/dist/nodes/Qwease/QweaseMethods.d.ts +22 -0
  20. package/dist/nodes/Qwease/QweaseMethods.js +335 -0
  21. package/dist/nodes/Qwease/QweaseTrigger.node.d.ts +12 -0
  22. package/dist/nodes/Qwease/QweaseTrigger.node.js +152 -0
  23. package/dist/nodes/Qwease/TicketBody.d.ts +3 -0
  24. package/dist/nodes/Qwease/TicketBody.js +104 -0
  25. package/dist/nodes/Qwease/executeHelpers.d.ts +14 -0
  26. package/dist/nodes/Qwease/executeHelpers.js +66 -0
  27. package/dist/nodes/Qwease/executeKnowledgeTask.d.ts +3 -0
  28. package/dist/nodes/Qwease/executeKnowledgeTask.js +127 -0
  29. package/dist/nodes/Qwease/executeOtherResources.d.ts +7 -0
  30. package/dist/nodes/Qwease/executeOtherResources.js +256 -0
  31. package/dist/nodes/Qwease/qwease.png +0 -0
  32. package/dist/nodes/Qwease/qwease.svg +4 -0
  33. package/dist/nodes/Qwease/shared.d.ts +13 -0
  34. package/dist/nodes/Qwease/shared.js +155 -0
  35. package/package.json +54 -0
@@ -0,0 +1,390 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ticketFields = exports.ticketOperations = void 0;
4
+ const shared_1 = require("./shared");
5
+ exports.ticketOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['ticket'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Add Comment',
19
+ value: 'addComment',
20
+ action: 'Add a comment to a ticket',
21
+ },
22
+ {
23
+ name: 'Create',
24
+ value: 'create',
25
+ action: 'Create a ticket',
26
+ },
27
+ {
28
+ name: 'Get',
29
+ value: 'get',
30
+ action: 'Get a ticket',
31
+ },
32
+ {
33
+ name: 'Get Many',
34
+ value: 'getAll',
35
+ action: 'Get many tickets',
36
+ },
37
+ {
38
+ name: 'Update',
39
+ value: 'update',
40
+ action: 'Update a ticket',
41
+ },
42
+ ],
43
+ default: 'getAll',
44
+ },
45
+ ];
46
+ const idModeValidation = [
47
+ {
48
+ type: 'regex',
49
+ properties: {
50
+ regex: '^[0-9]+$',
51
+ errorMessage: 'ID must be a positive integer',
52
+ },
53
+ },
54
+ ];
55
+ const userResourceLocatorModes = [
56
+ {
57
+ displayName: 'From List',
58
+ name: 'list',
59
+ type: 'list',
60
+ placeholder: 'Select a user...',
61
+ typeOptions: {
62
+ searchListMethod: 'getUsers',
63
+ searchable: true,
64
+ },
65
+ },
66
+ {
67
+ displayName: 'By ID',
68
+ name: 'id',
69
+ type: 'string',
70
+ placeholder: '1',
71
+ validation: idModeValidation,
72
+ },
73
+ ];
74
+ const teamResourceLocatorModes = [
75
+ {
76
+ displayName: 'From List',
77
+ name: 'list',
78
+ type: 'list',
79
+ placeholder: 'Select a team...',
80
+ typeOptions: {
81
+ searchListMethod: 'getTeams',
82
+ searchable: true,
83
+ },
84
+ },
85
+ {
86
+ displayName: 'By ID',
87
+ name: 'id',
88
+ type: 'string',
89
+ placeholder: '1',
90
+ validation: idModeValidation,
91
+ },
92
+ ];
93
+ const priorityOptions = [
94
+ { name: 'Very High', value: 'very_high' },
95
+ { name: 'High', value: 'high' },
96
+ { name: 'Medium', value: 'medium' },
97
+ { name: 'Low', value: 'low' },
98
+ { name: 'Very Low', value: 'very_low' },
99
+ ];
100
+ const optionalTicketFields = [
101
+ {
102
+ displayName: 'Priority',
103
+ name: 'priority',
104
+ type: 'options',
105
+ options: priorityOptions,
106
+ default: '',
107
+ description: 'Ticket priority',
108
+ },
109
+ {
110
+ displayName: 'Requested By',
111
+ name: 'askedBy',
112
+ type: 'resourceLocator',
113
+ default: { mode: 'list', value: '' },
114
+ description: 'User who requested the ticket (asked_by)',
115
+ modes: userResourceLocatorModes,
116
+ },
117
+ {
118
+ displayName: 'Assigned To',
119
+ name: 'assignedTo',
120
+ type: 'resourceLocator',
121
+ default: { mode: 'list', value: '' },
122
+ description: 'Agent responsible for the ticket',
123
+ modes: userResourceLocatorModes,
124
+ },
125
+ {
126
+ displayName: 'Assigned Group',
127
+ name: 'assignedGroup',
128
+ type: 'resourceLocator',
129
+ default: { mode: 'list', value: '' },
130
+ description: 'Support team assigned to the ticket',
131
+ modes: teamResourceLocatorModes,
132
+ },
133
+ {
134
+ displayName: 'Status',
135
+ name: 'statusId',
136
+ type: 'resourceLocator',
137
+ default: { mode: 'list', value: '' },
138
+ description: 'Status from the form status model',
139
+ modes: [
140
+ {
141
+ displayName: 'From List',
142
+ name: 'list',
143
+ type: 'list',
144
+ placeholder: 'Select a status...',
145
+ typeOptions: {
146
+ searchListMethod: 'getFormStatuses',
147
+ searchable: true,
148
+ },
149
+ },
150
+ {
151
+ displayName: 'By ID',
152
+ name: 'id',
153
+ type: 'string',
154
+ placeholder: '1',
155
+ validation: idModeValidation,
156
+ },
157
+ ],
158
+ },
159
+ {
160
+ displayName: 'Desired Resolution Date',
161
+ name: 'desiredResolutionDate',
162
+ type: 'dateTime',
163
+ default: '',
164
+ },
165
+ (0, shared_1.customFieldsFixedCollectionWithList)('getFormCustomFields', 'Fields from the selected form (Create) or ticket form (Update).'),
166
+ ];
167
+ exports.ticketFields = [
168
+ {
169
+ displayName: 'Ticket',
170
+ name: 'ticketId',
171
+ type: 'resourceLocator',
172
+ default: { mode: 'list', value: '' },
173
+ required: true,
174
+ displayOptions: {
175
+ show: {
176
+ resource: ['ticket'],
177
+ operation: ['get', 'update', 'addComment'],
178
+ },
179
+ },
180
+ modes: [
181
+ {
182
+ displayName: 'From List',
183
+ name: 'list',
184
+ type: 'list',
185
+ placeholder: 'Select a ticket...',
186
+ typeOptions: {
187
+ searchListMethod: 'getTickets',
188
+ searchable: true,
189
+ },
190
+ },
191
+ {
192
+ displayName: 'By ID',
193
+ name: 'id',
194
+ type: 'string',
195
+ placeholder: '123',
196
+ validation: idModeValidation,
197
+ },
198
+ ],
199
+ },
200
+ {
201
+ displayName: 'Type',
202
+ name: 'type',
203
+ type: 'options',
204
+ options: [
205
+ { name: 'Incident (INC)', value: 'INC' },
206
+ { name: 'Request (REQ)', value: 'REQ' },
207
+ ],
208
+ displayOptions: {
209
+ show: {
210
+ resource: ['ticket'],
211
+ operation: ['create'],
212
+ },
213
+ },
214
+ default: 'INC',
215
+ description: 'Filters the form list below',
216
+ },
217
+ {
218
+ displayName: 'Form',
219
+ name: 'form',
220
+ type: 'resourceLocator',
221
+ default: { mode: 'list', value: '' },
222
+ required: true,
223
+ displayOptions: {
224
+ show: {
225
+ resource: ['ticket'],
226
+ operation: ['create'],
227
+ },
228
+ },
229
+ description: 'Ticket form from your Qwease tenant',
230
+ modes: [
231
+ {
232
+ displayName: 'From List',
233
+ name: 'list',
234
+ type: 'list',
235
+ placeholder: 'Select a form...',
236
+ typeOptions: {
237
+ searchListMethod: 'getForms',
238
+ searchable: true,
239
+ },
240
+ },
241
+ {
242
+ displayName: 'By ID',
243
+ name: 'id',
244
+ type: 'string',
245
+ placeholder: '1',
246
+ validation: idModeValidation,
247
+ },
248
+ ],
249
+ },
250
+ {
251
+ displayName: 'For User',
252
+ name: 'forUser',
253
+ type: 'resourceLocator',
254
+ default: { mode: 'list', value: '' },
255
+ required: true,
256
+ displayOptions: {
257
+ show: {
258
+ resource: ['ticket'],
259
+ operation: ['create'],
260
+ },
261
+ },
262
+ description: 'Impacted / requester user in Qwease',
263
+ modes: userResourceLocatorModes,
264
+ },
265
+ {
266
+ displayName: 'Subject',
267
+ name: 'resume',
268
+ type: 'string',
269
+ required: true,
270
+ displayOptions: {
271
+ show: {
272
+ resource: ['ticket'],
273
+ operation: ['create'],
274
+ },
275
+ },
276
+ default: '',
277
+ },
278
+ {
279
+ displayName: 'Description',
280
+ name: 'description',
281
+ type: 'string',
282
+ required: true,
283
+ typeOptions: { rows: 4 },
284
+ displayOptions: {
285
+ show: {
286
+ resource: ['ticket'],
287
+ operation: ['create'],
288
+ },
289
+ },
290
+ default: '',
291
+ },
292
+ {
293
+ displayName: 'Additional Fields',
294
+ name: 'additionalFields',
295
+ type: 'collection',
296
+ placeholder: 'Add Field',
297
+ default: {},
298
+ displayOptions: {
299
+ show: {
300
+ resource: ['ticket'],
301
+ operation: ['create'],
302
+ },
303
+ },
304
+ options: optionalTicketFields,
305
+ },
306
+ {
307
+ displayName: 'Update Fields',
308
+ name: 'updateFields',
309
+ type: 'collection',
310
+ placeholder: 'Add Field',
311
+ default: {},
312
+ displayOptions: {
313
+ show: {
314
+ resource: ['ticket'],
315
+ operation: ['update'],
316
+ },
317
+ },
318
+ options: [
319
+ {
320
+ displayName: 'Subject',
321
+ name: 'resume',
322
+ type: 'string',
323
+ default: '',
324
+ },
325
+ {
326
+ displayName: 'Description',
327
+ name: 'description',
328
+ type: 'string',
329
+ typeOptions: { rows: 4 },
330
+ default: '',
331
+ },
332
+ ...optionalTicketFields,
333
+ ],
334
+ },
335
+ {
336
+ displayName: 'Comment',
337
+ name: 'comment',
338
+ type: 'string',
339
+ required: true,
340
+ typeOptions: { rows: 4 },
341
+ displayOptions: {
342
+ show: {
343
+ resource: ['ticket'],
344
+ operation: ['addComment'],
345
+ },
346
+ },
347
+ default: '',
348
+ },
349
+ {
350
+ displayName: 'Internal Comment',
351
+ name: 'commentPrivate',
352
+ type: 'boolean',
353
+ displayOptions: {
354
+ show: {
355
+ resource: ['ticket'],
356
+ operation: ['addComment'],
357
+ },
358
+ },
359
+ default: false,
360
+ description: 'Whether the comment is internal (not visible to requester)',
361
+ },
362
+ {
363
+ displayName: 'Return All',
364
+ name: 'returnAll',
365
+ type: 'boolean',
366
+ description: 'Whether to return all results or only up to a given limit',
367
+ displayOptions: {
368
+ show: {
369
+ resource: ['ticket'],
370
+ operation: ['getAll'],
371
+ },
372
+ },
373
+ default: false,
374
+ },
375
+ {
376
+ displayName: 'Limit',
377
+ name: 'limit',
378
+ type: 'number',
379
+ description: 'Max number of results to return',
380
+ typeOptions: { minValue: 1 },
381
+ displayOptions: {
382
+ show: {
383
+ resource: ['ticket'],
384
+ operation: ['getAll'],
385
+ returnAll: [false],
386
+ },
387
+ },
388
+ default: 50,
389
+ },
390
+ ];
@@ -0,0 +1,22 @@
1
+ import type { ILoadOptionsFunctions, INodeListSearchResult, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare function getForms(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
3
+ export declare function getUsers(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
4
+ export declare function getTeams(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
5
+ export declare function getTickets(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
6
+ export declare function getFormStatuses(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
7
+ export declare function getFormCustomFields(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
8
+ export declare function getUserCustomFields(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
9
+ export declare function getClientCustomFields(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
10
+ export declare function getDeviceCustomFields(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
11
+ export declare function getCustomFieldOptions(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
12
+ export declare function getClients(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
13
+ export declare function getDevices(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
14
+ export declare function getPages(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
15
+ export declare function getTasks(this: ILoadOptionsFunctions, filter?: string): Promise<INodeListSearchResult>;
16
+ /** multiOptions loaders (pick several related objects) */
17
+ export declare function getUsersLoad(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
18
+ export declare function getClientsLoad(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
19
+ export declare function getTeamsLoad(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
20
+ export declare function getDevicesLoad(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
21
+ export declare function getTicketsLoad(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
22
+ export declare function getPagesLoad(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;