@disruptive-learning/n8n-nodes-gigstack 1.1.5 → 1.1.7
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/Gigstack/GenericFunctions.js +17 -0
- package/dist/nodes/Gigstack/Gigstack.node.js +12 -0
- package/dist/nodes/Gigstack/descriptions/InvoiceDescription.js +19 -0
- package/dist/nodes/Gigstack/descriptions/PaymentDescription.js +68 -0
- package/dist/nodes/Gigstack/descriptions/ReceiptDescription.js +19 -0
- package/package.json +1 -1
|
@@ -68,6 +68,23 @@ function buildFilterQuery(filters) {
|
|
|
68
68
|
if (filters.team) {
|
|
69
69
|
qs.team = filters.team;
|
|
70
70
|
}
|
|
71
|
+
// Status filter (payments, invoices, receipts)
|
|
72
|
+
if (filters.status) {
|
|
73
|
+
qs.status = filters.status;
|
|
74
|
+
}
|
|
75
|
+
// Client filter
|
|
76
|
+
if (filters.client_id) {
|
|
77
|
+
qs.client_id = filters.client_id;
|
|
78
|
+
}
|
|
79
|
+
// Email filter (payments)
|
|
80
|
+
if (filters.email) {
|
|
81
|
+
qs.email = filters.email;
|
|
82
|
+
}
|
|
83
|
+
// Currency filter (payments)
|
|
84
|
+
if (filters.currency) {
|
|
85
|
+
qs.currency = filters.currency;
|
|
86
|
+
}
|
|
87
|
+
// Date filters
|
|
71
88
|
if (filters.createdAfter) {
|
|
72
89
|
qs['created[gte]'] = Math.floor(new Date(filters.createdAfter).getTime() / 1000);
|
|
73
90
|
}
|
|
@@ -512,6 +512,18 @@ class Gigstack {
|
|
|
512
512
|
if (additionalFields.metadata) {
|
|
513
513
|
body.metadata = JSON.parse(additionalFields.metadata);
|
|
514
514
|
}
|
|
515
|
+
// Handle invoice_config
|
|
516
|
+
const invoiceConfig = this.getNodeParameter('invoiceConfig', i, {});
|
|
517
|
+
if (invoiceConfig && Object.keys(invoiceConfig).length > 0) {
|
|
518
|
+
const config = {};
|
|
519
|
+
if (invoiceConfig.serie)
|
|
520
|
+
config.serie = invoiceConfig.serie;
|
|
521
|
+
if (invoiceConfig.folio && invoiceConfig.folio !== 0)
|
|
522
|
+
config.folio = invoiceConfig.folio;
|
|
523
|
+
if (Object.keys(config).length > 0) {
|
|
524
|
+
body.invoice_config = config;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
515
527
|
responseData = await GenericFunctions_1.gigstackApiRequest.call(this, 'POST', '/payments/register', body, qs);
|
|
516
528
|
responseData = (0, GenericFunctions_1.simplifyResponse)(responseData);
|
|
517
529
|
}
|
|
@@ -447,6 +447,25 @@ exports.invoiceFields = [
|
|
|
447
447
|
},
|
|
448
448
|
},
|
|
449
449
|
options: [
|
|
450
|
+
{
|
|
451
|
+
displayName: 'Status',
|
|
452
|
+
name: 'status',
|
|
453
|
+
type: 'options',
|
|
454
|
+
options: [
|
|
455
|
+
{ name: 'Valid', value: 'valid' },
|
|
456
|
+
{ name: 'Canceled', value: 'canceled' },
|
|
457
|
+
{ name: 'Pending', value: 'pending' },
|
|
458
|
+
],
|
|
459
|
+
default: '',
|
|
460
|
+
description: 'Filter invoices by status',
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
displayName: 'Client ID',
|
|
464
|
+
name: 'client_id',
|
|
465
|
+
type: 'string',
|
|
466
|
+
default: '',
|
|
467
|
+
description: 'Filter invoices by client ID',
|
|
468
|
+
},
|
|
450
469
|
{
|
|
451
470
|
displayName: 'Order By',
|
|
452
471
|
name: 'orderBy',
|
|
@@ -250,6 +250,36 @@ exports.paymentFields = [
|
|
|
250
250
|
},
|
|
251
251
|
description: 'SAT payment form code',
|
|
252
252
|
},
|
|
253
|
+
{
|
|
254
|
+
displayName: 'Invoice Config',
|
|
255
|
+
name: 'invoiceConfig',
|
|
256
|
+
type: 'collection',
|
|
257
|
+
placeholder: 'Add Invoice Config',
|
|
258
|
+
default: {},
|
|
259
|
+
displayOptions: {
|
|
260
|
+
show: {
|
|
261
|
+
resource: ['payment'],
|
|
262
|
+
operation: ['register'],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
description: 'Configure invoice serie and folio for the generated invoice',
|
|
266
|
+
options: [
|
|
267
|
+
{
|
|
268
|
+
displayName: 'Serie',
|
|
269
|
+
name: 'serie',
|
|
270
|
+
type: 'string',
|
|
271
|
+
default: '',
|
|
272
|
+
description: 'Invoice serie (e.g., "A", "B"). Leave empty for default.',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
displayName: 'Folio',
|
|
276
|
+
name: 'folio',
|
|
277
|
+
type: 'number',
|
|
278
|
+
default: 0,
|
|
279
|
+
description: 'Invoice folio number. Leave 0 for automatic increment.',
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
253
283
|
// ----------------------------------
|
|
254
284
|
// payment: get, cancel, markAsPaid, refund
|
|
255
285
|
// ----------------------------------
|
|
@@ -398,6 +428,44 @@ exports.paymentFields = [
|
|
|
398
428
|
},
|
|
399
429
|
},
|
|
400
430
|
options: [
|
|
431
|
+
{
|
|
432
|
+
displayName: 'Status',
|
|
433
|
+
name: 'status',
|
|
434
|
+
type: 'options',
|
|
435
|
+
options: [
|
|
436
|
+
{ name: 'Requires Payment Method', value: 'requires_payment_method' },
|
|
437
|
+
{ name: 'Succeeded', value: 'succeeded' },
|
|
438
|
+
{ name: 'Canceled', value: 'canceled' },
|
|
439
|
+
],
|
|
440
|
+
default: '',
|
|
441
|
+
description: 'Filter payments by status',
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
displayName: 'Client ID',
|
|
445
|
+
name: 'client_id',
|
|
446
|
+
type: 'string',
|
|
447
|
+
default: '',
|
|
448
|
+
description: 'Filter payments by client ID',
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
displayName: 'Client Email',
|
|
452
|
+
name: 'email',
|
|
453
|
+
type: 'string',
|
|
454
|
+
default: '',
|
|
455
|
+
placeholder: 'name@email.com',
|
|
456
|
+
description: 'Filter payments by client email address',
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
displayName: 'Currency',
|
|
460
|
+
name: 'currency',
|
|
461
|
+
type: 'options',
|
|
462
|
+
options: [
|
|
463
|
+
{ name: 'MXN - Mexican Peso', value: 'MXN' },
|
|
464
|
+
{ name: 'USD - US Dollar', value: 'USD' },
|
|
465
|
+
],
|
|
466
|
+
default: '',
|
|
467
|
+
description: 'Filter payments by currency',
|
|
468
|
+
},
|
|
401
469
|
{
|
|
402
470
|
displayName: 'Order By',
|
|
403
471
|
name: 'orderBy',
|
|
@@ -313,6 +313,25 @@ exports.receiptFields = [
|
|
|
313
313
|
},
|
|
314
314
|
},
|
|
315
315
|
options: [
|
|
316
|
+
{
|
|
317
|
+
displayName: 'Status',
|
|
318
|
+
name: 'status',
|
|
319
|
+
type: 'options',
|
|
320
|
+
options: [
|
|
321
|
+
{ name: 'Pending', value: 'pending' },
|
|
322
|
+
{ name: 'Stamped', value: 'stamped' },
|
|
323
|
+
{ name: 'Canceled', value: 'canceled' },
|
|
324
|
+
],
|
|
325
|
+
default: '',
|
|
326
|
+
description: 'Filter receipts by status',
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
displayName: 'Client ID',
|
|
330
|
+
name: 'client_id',
|
|
331
|
+
type: 'string',
|
|
332
|
+
default: '',
|
|
333
|
+
description: 'Filter receipts by client ID',
|
|
334
|
+
},
|
|
316
335
|
{
|
|
317
336
|
displayName: 'Order By',
|
|
318
337
|
name: 'orderBy',
|
package/package.json
CHANGED