n8n-nodes-perfexcrm 0.1.7 → 0.1.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.
- package/dist/nodes/PerfexCrm/PerfexCrm.node.js +251 -2
- package/dist/nodes/PerfexCrm/PerfexCrmTrigger.node.js +1 -1
- package/dist/nodes/PerfexCrm/descriptions/ContractDescription.js +412 -2
- package/dist/nodes/PerfexCrm/descriptions/CustomerDescription.js +115 -0
- package/dist/nodes/PerfexCrm/descriptions/InvoiceDescription.js +456 -2
- package/dist/nodes/PerfexCrm/descriptions/LeadDescription.js +426 -2
- package/dist/nodes/PerfexCrm/descriptions/ProjectDescription.js +492 -2
- package/dist/nodes/PerfexCrm/descriptions/TicketDescription.js +159 -0
- package/dist/nodes/PerfexCrm/perfexcrm.svg +9 -5
- package/package.json +4 -3
|
@@ -1,5 +1,415 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.contractFields = exports.contractOperations = void 0;
|
|
4
|
-
exports.contractOperations = [
|
|
5
|
-
|
|
4
|
+
exports.contractOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['contract'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Create',
|
|
18
|
+
value: 'create',
|
|
19
|
+
description: 'Create a new contract',
|
|
20
|
+
action: 'Create a contract',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Delete',
|
|
24
|
+
value: 'delete',
|
|
25
|
+
description: 'Delete a contract',
|
|
26
|
+
action: 'Delete a contract',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get',
|
|
30
|
+
value: 'get',
|
|
31
|
+
description: 'Get a contract',
|
|
32
|
+
action: 'Get a contract',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get Many',
|
|
36
|
+
value: 'getAll',
|
|
37
|
+
description: 'Get many contracts',
|
|
38
|
+
action: 'Get many contracts',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Sign',
|
|
42
|
+
value: 'sign',
|
|
43
|
+
description: 'Sign a contract',
|
|
44
|
+
action: 'Sign a contract',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Update',
|
|
48
|
+
value: 'update',
|
|
49
|
+
description: 'Update a contract',
|
|
50
|
+
action: 'Update a contract',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
default: 'create',
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
exports.contractFields = [
|
|
57
|
+
/* -------------------------------------------------------------------------- */
|
|
58
|
+
/* contract:create */
|
|
59
|
+
/* -------------------------------------------------------------------------- */
|
|
60
|
+
{
|
|
61
|
+
displayName: 'Subject',
|
|
62
|
+
name: 'subject',
|
|
63
|
+
type: 'string',
|
|
64
|
+
required: true,
|
|
65
|
+
default: '',
|
|
66
|
+
displayOptions: {
|
|
67
|
+
show: {
|
|
68
|
+
resource: ['contract'],
|
|
69
|
+
operation: ['create'],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
description: 'Contract subject',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
displayName: 'Client ID',
|
|
76
|
+
name: 'client',
|
|
77
|
+
type: 'string',
|
|
78
|
+
required: true,
|
|
79
|
+
default: '',
|
|
80
|
+
displayOptions: {
|
|
81
|
+
show: {
|
|
82
|
+
resource: ['contract'],
|
|
83
|
+
operation: ['create'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
description: 'Client ID',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Start Date',
|
|
90
|
+
name: 'datestart',
|
|
91
|
+
type: 'dateTime',
|
|
92
|
+
required: true,
|
|
93
|
+
default: '',
|
|
94
|
+
displayOptions: {
|
|
95
|
+
show: {
|
|
96
|
+
resource: ['contract'],
|
|
97
|
+
operation: ['create'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
description: 'Contract start date',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
displayName: 'End Date',
|
|
104
|
+
name: 'dateend',
|
|
105
|
+
type: 'dateTime',
|
|
106
|
+
required: true,
|
|
107
|
+
default: '',
|
|
108
|
+
displayOptions: {
|
|
109
|
+
show: {
|
|
110
|
+
resource: ['contract'],
|
|
111
|
+
operation: ['create'],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
description: 'Contract end date',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'Additional Fields',
|
|
118
|
+
name: 'additionalFields',
|
|
119
|
+
type: 'collection',
|
|
120
|
+
placeholder: 'Add Field',
|
|
121
|
+
default: {},
|
|
122
|
+
displayOptions: {
|
|
123
|
+
show: {
|
|
124
|
+
resource: ['contract'],
|
|
125
|
+
operation: ['create'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
options: [
|
|
129
|
+
{
|
|
130
|
+
displayName: 'Contract Type',
|
|
131
|
+
name: 'contract_type',
|
|
132
|
+
type: 'string',
|
|
133
|
+
default: '',
|
|
134
|
+
description: 'Contract type ID',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Contract Value',
|
|
138
|
+
name: 'contract_value',
|
|
139
|
+
type: 'number',
|
|
140
|
+
default: 0,
|
|
141
|
+
description: 'Contract value',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: 'Description',
|
|
145
|
+
name: 'description',
|
|
146
|
+
type: 'string',
|
|
147
|
+
typeOptions: {
|
|
148
|
+
alwaysOpenEditWindow: true,
|
|
149
|
+
},
|
|
150
|
+
default: '',
|
|
151
|
+
description: 'Contract description',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
displayName: 'Content',
|
|
155
|
+
name: 'content',
|
|
156
|
+
type: 'string',
|
|
157
|
+
typeOptions: {
|
|
158
|
+
alwaysOpenEditWindow: true,
|
|
159
|
+
},
|
|
160
|
+
default: '',
|
|
161
|
+
description: 'Contract content/body',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
/* -------------------------------------------------------------------------- */
|
|
166
|
+
/* contract:get */
|
|
167
|
+
/* -------------------------------------------------------------------------- */
|
|
168
|
+
{
|
|
169
|
+
displayName: 'Contract ID',
|
|
170
|
+
name: 'contractId',
|
|
171
|
+
type: 'string',
|
|
172
|
+
required: true,
|
|
173
|
+
default: '',
|
|
174
|
+
displayOptions: {
|
|
175
|
+
show: {
|
|
176
|
+
resource: ['contract'],
|
|
177
|
+
operation: ['get'],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
description: 'The ID of the contract',
|
|
181
|
+
},
|
|
182
|
+
/* -------------------------------------------------------------------------- */
|
|
183
|
+
/* contract:getAll */
|
|
184
|
+
/* -------------------------------------------------------------------------- */
|
|
185
|
+
{
|
|
186
|
+
displayName: 'Return All',
|
|
187
|
+
name: 'returnAll',
|
|
188
|
+
type: 'boolean',
|
|
189
|
+
displayOptions: {
|
|
190
|
+
show: {
|
|
191
|
+
resource: ['contract'],
|
|
192
|
+
operation: ['getAll'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
default: false,
|
|
196
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
displayName: 'Limit',
|
|
200
|
+
name: 'limit',
|
|
201
|
+
type: 'number',
|
|
202
|
+
displayOptions: {
|
|
203
|
+
show: {
|
|
204
|
+
resource: ['contract'],
|
|
205
|
+
operation: ['getAll'],
|
|
206
|
+
returnAll: [false],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
typeOptions: {
|
|
210
|
+
minValue: 1,
|
|
211
|
+
},
|
|
212
|
+
default: 50,
|
|
213
|
+
description: 'Max number of results to return',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
displayName: 'Filters',
|
|
217
|
+
name: 'filters',
|
|
218
|
+
type: 'collection',
|
|
219
|
+
placeholder: 'Add Filter',
|
|
220
|
+
default: {},
|
|
221
|
+
displayOptions: {
|
|
222
|
+
show: {
|
|
223
|
+
resource: ['contract'],
|
|
224
|
+
operation: ['getAll'],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
options: [
|
|
228
|
+
{
|
|
229
|
+
displayName: 'Client ID',
|
|
230
|
+
name: 'client',
|
|
231
|
+
type: 'string',
|
|
232
|
+
default: '',
|
|
233
|
+
description: 'Filter by client ID',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
displayName: 'Contract Type',
|
|
237
|
+
name: 'contract_type',
|
|
238
|
+
type: 'string',
|
|
239
|
+
default: '',
|
|
240
|
+
description: 'Filter by contract type ID',
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
/* -------------------------------------------------------------------------- */
|
|
245
|
+
/* contract:update */
|
|
246
|
+
/* -------------------------------------------------------------------------- */
|
|
247
|
+
{
|
|
248
|
+
displayName: 'Contract ID',
|
|
249
|
+
name: 'contractId',
|
|
250
|
+
type: 'string',
|
|
251
|
+
required: true,
|
|
252
|
+
default: '',
|
|
253
|
+
displayOptions: {
|
|
254
|
+
show: {
|
|
255
|
+
resource: ['contract'],
|
|
256
|
+
operation: ['update'],
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
description: 'The ID of the contract',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
displayName: 'Update Fields',
|
|
263
|
+
name: 'updateFields',
|
|
264
|
+
type: 'collection',
|
|
265
|
+
placeholder: 'Add Field',
|
|
266
|
+
default: {},
|
|
267
|
+
displayOptions: {
|
|
268
|
+
show: {
|
|
269
|
+
resource: ['contract'],
|
|
270
|
+
operation: ['update'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
options: [
|
|
274
|
+
{
|
|
275
|
+
displayName: 'Subject',
|
|
276
|
+
name: 'subject',
|
|
277
|
+
type: 'string',
|
|
278
|
+
default: '',
|
|
279
|
+
description: 'Contract subject',
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
displayName: 'Client ID',
|
|
283
|
+
name: 'client',
|
|
284
|
+
type: 'string',
|
|
285
|
+
default: '',
|
|
286
|
+
description: 'Client ID',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
displayName: 'Start Date',
|
|
290
|
+
name: 'datestart',
|
|
291
|
+
type: 'dateTime',
|
|
292
|
+
default: '',
|
|
293
|
+
description: 'Contract start date',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
displayName: 'End Date',
|
|
297
|
+
name: 'dateend',
|
|
298
|
+
type: 'dateTime',
|
|
299
|
+
default: '',
|
|
300
|
+
description: 'Contract end date',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
displayName: 'Contract Type',
|
|
304
|
+
name: 'contract_type',
|
|
305
|
+
type: 'string',
|
|
306
|
+
default: '',
|
|
307
|
+
description: 'Contract type ID',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
displayName: 'Contract Value',
|
|
311
|
+
name: 'contract_value',
|
|
312
|
+
type: 'number',
|
|
313
|
+
default: 0,
|
|
314
|
+
description: 'Contract value',
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
displayName: 'Description',
|
|
318
|
+
name: 'description',
|
|
319
|
+
type: 'string',
|
|
320
|
+
typeOptions: {
|
|
321
|
+
alwaysOpenEditWindow: true,
|
|
322
|
+
},
|
|
323
|
+
default: '',
|
|
324
|
+
description: 'Contract description',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
displayName: 'Content',
|
|
328
|
+
name: 'content',
|
|
329
|
+
type: 'string',
|
|
330
|
+
typeOptions: {
|
|
331
|
+
alwaysOpenEditWindow: true,
|
|
332
|
+
},
|
|
333
|
+
default: '',
|
|
334
|
+
description: 'Contract content/body',
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
/* -------------------------------------------------------------------------- */
|
|
339
|
+
/* contract:delete */
|
|
340
|
+
/* -------------------------------------------------------------------------- */
|
|
341
|
+
{
|
|
342
|
+
displayName: 'Contract ID',
|
|
343
|
+
name: 'contractId',
|
|
344
|
+
type: 'string',
|
|
345
|
+
required: true,
|
|
346
|
+
default: '',
|
|
347
|
+
displayOptions: {
|
|
348
|
+
show: {
|
|
349
|
+
resource: ['contract'],
|
|
350
|
+
operation: ['delete'],
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
description: 'The ID of the contract',
|
|
354
|
+
},
|
|
355
|
+
/* -------------------------------------------------------------------------- */
|
|
356
|
+
/* contract:sign */
|
|
357
|
+
/* -------------------------------------------------------------------------- */
|
|
358
|
+
{
|
|
359
|
+
displayName: 'Contract ID',
|
|
360
|
+
name: 'contractId',
|
|
361
|
+
type: 'string',
|
|
362
|
+
required: true,
|
|
363
|
+
default: '',
|
|
364
|
+
displayOptions: {
|
|
365
|
+
show: {
|
|
366
|
+
resource: ['contract'],
|
|
367
|
+
operation: ['sign'],
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
description: 'The ID of the contract to sign',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
displayName: 'Signature',
|
|
374
|
+
name: 'signature',
|
|
375
|
+
type: 'string',
|
|
376
|
+
required: true,
|
|
377
|
+
default: '',
|
|
378
|
+
displayOptions: {
|
|
379
|
+
show: {
|
|
380
|
+
resource: ['contract'],
|
|
381
|
+
operation: ['sign'],
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
description: 'Signature data (base64 encoded image or text)',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
displayName: 'Additional Fields',
|
|
388
|
+
name: 'additionalFields',
|
|
389
|
+
type: 'collection',
|
|
390
|
+
placeholder: 'Add Field',
|
|
391
|
+
default: {},
|
|
392
|
+
displayOptions: {
|
|
393
|
+
show: {
|
|
394
|
+
resource: ['contract'],
|
|
395
|
+
operation: ['sign'],
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
options: [
|
|
399
|
+
{
|
|
400
|
+
displayName: 'Signer Name',
|
|
401
|
+
name: 'signer_name',
|
|
402
|
+
type: 'string',
|
|
403
|
+
default: '',
|
|
404
|
+
description: 'Name of the person signing',
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
displayName: 'Signer Email',
|
|
408
|
+
name: 'signer_email',
|
|
409
|
+
type: 'string',
|
|
410
|
+
default: '',
|
|
411
|
+
description: 'Email of the person signing',
|
|
412
|
+
},
|
|
413
|
+
],
|
|
414
|
+
},
|
|
415
|
+
];
|
|
@@ -43,6 +43,36 @@ exports.customerOperations = [
|
|
|
43
43
|
description: 'Update a customer',
|
|
44
44
|
action: 'Update a customer',
|
|
45
45
|
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Get Contacts',
|
|
48
|
+
value: 'getContacts',
|
|
49
|
+
description: 'Get contacts for a customer',
|
|
50
|
+
action: 'Get contacts for a customer',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Get Contracts',
|
|
54
|
+
value: 'getContracts',
|
|
55
|
+
description: 'Get contracts for a customer',
|
|
56
|
+
action: 'Get contracts for a customer',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Get Invoices',
|
|
60
|
+
value: 'getInvoices',
|
|
61
|
+
description: 'Get invoices for a customer',
|
|
62
|
+
action: 'Get invoices for a customer',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Get Projects',
|
|
66
|
+
value: 'getProjects',
|
|
67
|
+
description: 'Get projects for a customer',
|
|
68
|
+
action: 'Get projects for a customer',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Get Tickets',
|
|
72
|
+
value: 'getTickets',
|
|
73
|
+
description: 'Get tickets for a customer',
|
|
74
|
+
action: 'Get tickets for a customer',
|
|
75
|
+
},
|
|
46
76
|
],
|
|
47
77
|
default: 'create',
|
|
48
78
|
},
|
|
@@ -418,4 +448,89 @@ exports.customerFields = [
|
|
|
418
448
|
},
|
|
419
449
|
description: 'The ID of the customer',
|
|
420
450
|
},
|
|
451
|
+
/* -------------------------------------------------------------------------- */
|
|
452
|
+
/* customer:getContacts */
|
|
453
|
+
/* -------------------------------------------------------------------------- */
|
|
454
|
+
{
|
|
455
|
+
displayName: 'Customer ID',
|
|
456
|
+
name: 'customerId',
|
|
457
|
+
type: 'string',
|
|
458
|
+
required: true,
|
|
459
|
+
default: '',
|
|
460
|
+
displayOptions: {
|
|
461
|
+
show: {
|
|
462
|
+
resource: ['customer'],
|
|
463
|
+
operation: ['getContacts'],
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
description: 'The ID of the customer',
|
|
467
|
+
},
|
|
468
|
+
/* -------------------------------------------------------------------------- */
|
|
469
|
+
/* customer:getContracts */
|
|
470
|
+
/* -------------------------------------------------------------------------- */
|
|
471
|
+
{
|
|
472
|
+
displayName: 'Customer ID',
|
|
473
|
+
name: 'customerId',
|
|
474
|
+
type: 'string',
|
|
475
|
+
required: true,
|
|
476
|
+
default: '',
|
|
477
|
+
displayOptions: {
|
|
478
|
+
show: {
|
|
479
|
+
resource: ['customer'],
|
|
480
|
+
operation: ['getContracts'],
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
description: 'The ID of the customer',
|
|
484
|
+
},
|
|
485
|
+
/* -------------------------------------------------------------------------- */
|
|
486
|
+
/* customer:getInvoices */
|
|
487
|
+
/* -------------------------------------------------------------------------- */
|
|
488
|
+
{
|
|
489
|
+
displayName: 'Customer ID',
|
|
490
|
+
name: 'customerId',
|
|
491
|
+
type: 'string',
|
|
492
|
+
required: true,
|
|
493
|
+
default: '',
|
|
494
|
+
displayOptions: {
|
|
495
|
+
show: {
|
|
496
|
+
resource: ['customer'],
|
|
497
|
+
operation: ['getInvoices'],
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
description: 'The ID of the customer',
|
|
501
|
+
},
|
|
502
|
+
/* -------------------------------------------------------------------------- */
|
|
503
|
+
/* customer:getProjects */
|
|
504
|
+
/* -------------------------------------------------------------------------- */
|
|
505
|
+
{
|
|
506
|
+
displayName: 'Customer ID',
|
|
507
|
+
name: 'customerId',
|
|
508
|
+
type: 'string',
|
|
509
|
+
required: true,
|
|
510
|
+
default: '',
|
|
511
|
+
displayOptions: {
|
|
512
|
+
show: {
|
|
513
|
+
resource: ['customer'],
|
|
514
|
+
operation: ['getProjects'],
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
description: 'The ID of the customer',
|
|
518
|
+
},
|
|
519
|
+
/* -------------------------------------------------------------------------- */
|
|
520
|
+
/* customer:getTickets */
|
|
521
|
+
/* -------------------------------------------------------------------------- */
|
|
522
|
+
{
|
|
523
|
+
displayName: 'Customer ID',
|
|
524
|
+
name: 'customerId',
|
|
525
|
+
type: 'string',
|
|
526
|
+
required: true,
|
|
527
|
+
default: '',
|
|
528
|
+
displayOptions: {
|
|
529
|
+
show: {
|
|
530
|
+
resource: ['customer'],
|
|
531
|
+
operation: ['getTickets'],
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
description: 'The ID of the customer',
|
|
535
|
+
},
|
|
421
536
|
];
|