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.
@@ -1,5 +1,459 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.invoiceFields = exports.invoiceOperations = void 0;
4
- exports.invoiceOperations = [];
5
- exports.invoiceFields = [];
4
+ exports.invoiceOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['invoice'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Create',
18
+ value: 'create',
19
+ description: 'Create a new invoice',
20
+ action: 'Create an invoice',
21
+ },
22
+ {
23
+ name: 'Delete',
24
+ value: 'delete',
25
+ description: 'Delete an invoice',
26
+ action: 'Delete an invoice',
27
+ },
28
+ {
29
+ name: 'Get',
30
+ value: 'get',
31
+ description: 'Get an invoice',
32
+ action: 'Get an invoice',
33
+ },
34
+ {
35
+ name: 'Get Many',
36
+ value: 'getAll',
37
+ description: 'Get many invoices',
38
+ action: 'Get many invoices',
39
+ },
40
+ {
41
+ name: 'Update',
42
+ value: 'update',
43
+ description: 'Update an invoice',
44
+ action: 'Update an invoice',
45
+ },
46
+ ],
47
+ default: 'create',
48
+ },
49
+ ];
50
+ exports.invoiceFields = [
51
+ /* -------------------------------------------------------------------------- */
52
+ /* invoice:create */
53
+ /* -------------------------------------------------------------------------- */
54
+ {
55
+ displayName: 'Client ID',
56
+ name: 'clientId',
57
+ type: 'string',
58
+ required: true,
59
+ default: '',
60
+ displayOptions: {
61
+ show: {
62
+ resource: ['invoice'],
63
+ operation: ['create'],
64
+ },
65
+ },
66
+ description: 'Client ID',
67
+ },
68
+ {
69
+ displayName: 'Invoice Number',
70
+ name: 'number',
71
+ type: 'string',
72
+ required: true,
73
+ default: '',
74
+ displayOptions: {
75
+ show: {
76
+ resource: ['invoice'],
77
+ operation: ['create'],
78
+ },
79
+ },
80
+ description: 'Invoice number',
81
+ },
82
+ {
83
+ displayName: 'Date',
84
+ name: 'date',
85
+ type: 'dateTime',
86
+ required: true,
87
+ default: '',
88
+ displayOptions: {
89
+ show: {
90
+ resource: ['invoice'],
91
+ operation: ['create'],
92
+ },
93
+ },
94
+ description: 'Invoice date',
95
+ },
96
+ {
97
+ displayName: 'Due Date',
98
+ name: 'duedate',
99
+ type: 'dateTime',
100
+ required: true,
101
+ default: '',
102
+ displayOptions: {
103
+ show: {
104
+ resource: ['invoice'],
105
+ operation: ['create'],
106
+ },
107
+ },
108
+ description: 'Invoice due date',
109
+ },
110
+ {
111
+ displayName: 'Additional Fields',
112
+ name: 'additionalFields',
113
+ type: 'collection',
114
+ placeholder: 'Add Field',
115
+ default: {},
116
+ displayOptions: {
117
+ show: {
118
+ resource: ['invoice'],
119
+ operation: ['create'],
120
+ },
121
+ },
122
+ options: [
123
+ {
124
+ displayName: 'Currency',
125
+ name: 'currency',
126
+ type: 'string',
127
+ default: '',
128
+ description: 'Currency code (e.g., USD, EUR)',
129
+ },
130
+ {
131
+ displayName: 'Subtotal',
132
+ name: 'subtotal',
133
+ type: 'number',
134
+ default: 0,
135
+ description: 'Invoice subtotal',
136
+ },
137
+ {
138
+ displayName: 'Total',
139
+ name: 'total',
140
+ type: 'number',
141
+ default: 0,
142
+ description: 'Invoice total',
143
+ },
144
+ {
145
+ displayName: 'Status',
146
+ name: 'status',
147
+ type: 'options',
148
+ options: [
149
+ {
150
+ name: 'Unpaid',
151
+ value: 1,
152
+ },
153
+ {
154
+ name: 'Paid',
155
+ value: 2,
156
+ },
157
+ {
158
+ name: 'Partially Paid',
159
+ value: 3,
160
+ },
161
+ {
162
+ name: 'Overdue',
163
+ value: 4,
164
+ },
165
+ {
166
+ name: 'Cancelled',
167
+ value: 5,
168
+ },
169
+ {
170
+ name: 'Draft',
171
+ value: 6,
172
+ },
173
+ ],
174
+ default: 1,
175
+ description: 'Invoice status',
176
+ },
177
+ {
178
+ displayName: 'Admin Note',
179
+ name: 'adminnote',
180
+ type: 'string',
181
+ typeOptions: {
182
+ alwaysOpenEditWindow: true,
183
+ },
184
+ default: '',
185
+ description: 'Admin note (internal)',
186
+ },
187
+ {
188
+ displayName: 'Client Note',
189
+ name: 'clientnote',
190
+ type: 'string',
191
+ typeOptions: {
192
+ alwaysOpenEditWindow: true,
193
+ },
194
+ default: '',
195
+ description: 'Client note (visible to client)',
196
+ },
197
+ {
198
+ displayName: 'Allowed Payment Modes',
199
+ name: 'allowed_payment_modes',
200
+ type: 'string',
201
+ default: '',
202
+ description: 'Comma-separated list of allowed payment mode IDs',
203
+ },
204
+ ],
205
+ },
206
+ /* -------------------------------------------------------------------------- */
207
+ /* invoice:get */
208
+ /* -------------------------------------------------------------------------- */
209
+ {
210
+ displayName: 'Invoice ID',
211
+ name: 'invoiceId',
212
+ type: 'string',
213
+ required: true,
214
+ default: '',
215
+ displayOptions: {
216
+ show: {
217
+ resource: ['invoice'],
218
+ operation: ['get'],
219
+ },
220
+ },
221
+ description: 'The ID of the invoice',
222
+ },
223
+ /* -------------------------------------------------------------------------- */
224
+ /* invoice:getAll */
225
+ /* -------------------------------------------------------------------------- */
226
+ {
227
+ displayName: 'Return All',
228
+ name: 'returnAll',
229
+ type: 'boolean',
230
+ displayOptions: {
231
+ show: {
232
+ resource: ['invoice'],
233
+ operation: ['getAll'],
234
+ },
235
+ },
236
+ default: false,
237
+ description: 'Whether to return all results or only up to a given limit',
238
+ },
239
+ {
240
+ displayName: 'Limit',
241
+ name: 'limit',
242
+ type: 'number',
243
+ displayOptions: {
244
+ show: {
245
+ resource: ['invoice'],
246
+ operation: ['getAll'],
247
+ returnAll: [false],
248
+ },
249
+ },
250
+ typeOptions: {
251
+ minValue: 1,
252
+ },
253
+ default: 50,
254
+ description: 'Max number of results to return',
255
+ },
256
+ {
257
+ displayName: 'Filters',
258
+ name: 'filters',
259
+ type: 'collection',
260
+ placeholder: 'Add Filter',
261
+ default: {},
262
+ displayOptions: {
263
+ show: {
264
+ resource: ['invoice'],
265
+ operation: ['getAll'],
266
+ },
267
+ },
268
+ options: [
269
+ {
270
+ displayName: 'Client ID',
271
+ name: 'clientid',
272
+ type: 'string',
273
+ default: '',
274
+ description: 'Filter by client ID',
275
+ },
276
+ {
277
+ displayName: 'Status',
278
+ name: 'status',
279
+ type: 'options',
280
+ options: [
281
+ {
282
+ name: 'All',
283
+ value: '',
284
+ },
285
+ {
286
+ name: 'Unpaid',
287
+ value: '1',
288
+ },
289
+ {
290
+ name: 'Paid',
291
+ value: '2',
292
+ },
293
+ {
294
+ name: 'Partially Paid',
295
+ value: '3',
296
+ },
297
+ {
298
+ name: 'Overdue',
299
+ value: '4',
300
+ },
301
+ {
302
+ name: 'Cancelled',
303
+ value: '5',
304
+ },
305
+ {
306
+ name: 'Draft',
307
+ value: '6',
308
+ },
309
+ ],
310
+ default: '',
311
+ description: 'Filter by status',
312
+ },
313
+ ],
314
+ },
315
+ /* -------------------------------------------------------------------------- */
316
+ /* invoice:update */
317
+ /* -------------------------------------------------------------------------- */
318
+ {
319
+ displayName: 'Invoice ID',
320
+ name: 'invoiceId',
321
+ type: 'string',
322
+ required: true,
323
+ default: '',
324
+ displayOptions: {
325
+ show: {
326
+ resource: ['invoice'],
327
+ operation: ['update'],
328
+ },
329
+ },
330
+ description: 'The ID of the invoice',
331
+ },
332
+ {
333
+ displayName: 'Update Fields',
334
+ name: 'updateFields',
335
+ type: 'collection',
336
+ placeholder: 'Add Field',
337
+ default: {},
338
+ displayOptions: {
339
+ show: {
340
+ resource: ['invoice'],
341
+ operation: ['update'],
342
+ },
343
+ },
344
+ options: [
345
+ {
346
+ displayName: 'Invoice Number',
347
+ name: 'number',
348
+ type: 'string',
349
+ default: '',
350
+ description: 'Invoice number',
351
+ },
352
+ {
353
+ displayName: 'Date',
354
+ name: 'date',
355
+ type: 'dateTime',
356
+ default: '',
357
+ description: 'Invoice date',
358
+ },
359
+ {
360
+ displayName: 'Due Date',
361
+ name: 'duedate',
362
+ type: 'dateTime',
363
+ default: '',
364
+ description: 'Invoice due date',
365
+ },
366
+ {
367
+ displayName: 'Currency',
368
+ name: 'currency',
369
+ type: 'string',
370
+ default: '',
371
+ description: 'Currency code (e.g., USD, EUR)',
372
+ },
373
+ {
374
+ displayName: 'Subtotal',
375
+ name: 'subtotal',
376
+ type: 'number',
377
+ default: 0,
378
+ description: 'Invoice subtotal',
379
+ },
380
+ {
381
+ displayName: 'Total',
382
+ name: 'total',
383
+ type: 'number',
384
+ default: 0,
385
+ description: 'Invoice total',
386
+ },
387
+ {
388
+ displayName: 'Status',
389
+ name: 'status',
390
+ type: 'options',
391
+ options: [
392
+ {
393
+ name: 'Unpaid',
394
+ value: 1,
395
+ },
396
+ {
397
+ name: 'Paid',
398
+ value: 2,
399
+ },
400
+ {
401
+ name: 'Partially Paid',
402
+ value: 3,
403
+ },
404
+ {
405
+ name: 'Overdue',
406
+ value: 4,
407
+ },
408
+ {
409
+ name: 'Cancelled',
410
+ value: 5,
411
+ },
412
+ {
413
+ name: 'Draft',
414
+ value: 6,
415
+ },
416
+ ],
417
+ default: 1,
418
+ description: 'Invoice status',
419
+ },
420
+ {
421
+ displayName: 'Admin Note',
422
+ name: 'adminnote',
423
+ type: 'string',
424
+ typeOptions: {
425
+ alwaysOpenEditWindow: true,
426
+ },
427
+ default: '',
428
+ description: 'Admin note (internal)',
429
+ },
430
+ {
431
+ displayName: 'Client Note',
432
+ name: 'clientnote',
433
+ type: 'string',
434
+ typeOptions: {
435
+ alwaysOpenEditWindow: true,
436
+ },
437
+ default: '',
438
+ description: 'Client note (visible to client)',
439
+ },
440
+ ],
441
+ },
442
+ /* -------------------------------------------------------------------------- */
443
+ /* invoice:delete */
444
+ /* -------------------------------------------------------------------------- */
445
+ {
446
+ displayName: 'Invoice ID',
447
+ name: 'invoiceId',
448
+ type: 'string',
449
+ required: true,
450
+ default: '',
451
+ displayOptions: {
452
+ show: {
453
+ resource: ['invoice'],
454
+ operation: ['delete'],
455
+ },
456
+ },
457
+ description: 'The ID of the invoice',
458
+ },
459
+ ];