n8n-nodes-aivencerealtycrm 2.1.0 → 2.3.0
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.
|
@@ -68,21 +68,37 @@ class AivenceRealty {
|
|
|
68
68
|
name: 'Agent',
|
|
69
69
|
value: 'agent',
|
|
70
70
|
},
|
|
71
|
+
// ═══════ SPRINT DOCUMENTOS ═══════
|
|
71
72
|
{
|
|
72
|
-
name: 'Owner
|
|
73
|
-
value: '
|
|
73
|
+
name: 'Owner Expense',
|
|
74
|
+
value: 'ownerExpense',
|
|
75
|
+
description: 'Gastos de propietarios',
|
|
74
76
|
},
|
|
75
77
|
{
|
|
76
|
-
name: '
|
|
77
|
-
value: '
|
|
78
|
+
name: 'Contractor Invoice',
|
|
79
|
+
value: 'contractorInvoice',
|
|
80
|
+
description: 'Facturas de contratistas',
|
|
78
81
|
},
|
|
82
|
+
// ═══════ V2.3.0 - AUTOMATION & POLICIES ═══════
|
|
79
83
|
{
|
|
80
|
-
name: '
|
|
81
|
-
value: '
|
|
84
|
+
name: 'Payment Proof',
|
|
85
|
+
value: 'paymentProof',
|
|
86
|
+
description: 'Procesamiento de comprobantes de pago',
|
|
82
87
|
},
|
|
83
88
|
{
|
|
84
|
-
name: '
|
|
85
|
-
value: '
|
|
89
|
+
name: 'Automation',
|
|
90
|
+
value: 'automation',
|
|
91
|
+
description: 'Registro de ejecuciones y logs',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'Policy',
|
|
95
|
+
value: 'policy',
|
|
96
|
+
description: 'Evaluación de políticas y aprobaciones',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Notification',
|
|
100
|
+
value: 'notification',
|
|
101
|
+
description: 'Envío de notificaciones multi-canal',
|
|
86
102
|
},
|
|
87
103
|
],
|
|
88
104
|
default: 'lead',
|
|
@@ -1497,6 +1513,12 @@ class AivenceRealty {
|
|
|
1497
1513
|
description: 'Crear inquilino',
|
|
1498
1514
|
action: 'Crear inquilino',
|
|
1499
1515
|
},
|
|
1516
|
+
{
|
|
1517
|
+
name: 'Validate Exists',
|
|
1518
|
+
value: 'validateExists',
|
|
1519
|
+
description: 'Validar si el inquilino existe',
|
|
1520
|
+
action: 'Validar inquilino',
|
|
1521
|
+
},
|
|
1500
1522
|
],
|
|
1501
1523
|
default: 'list',
|
|
1502
1524
|
},
|
|
@@ -1509,11 +1531,11 @@ class AivenceRealty {
|
|
|
1509
1531
|
displayOptions: {
|
|
1510
1532
|
show: {
|
|
1511
1533
|
resource: ['tenant'],
|
|
1512
|
-
operation: ['get'],
|
|
1534
|
+
operation: ['get', 'validateExists'],
|
|
1513
1535
|
},
|
|
1514
1536
|
},
|
|
1515
1537
|
default: '',
|
|
1516
|
-
description: 'ID del inquilino',
|
|
1538
|
+
description: 'ID del inquilino a consultar o validar',
|
|
1517
1539
|
},
|
|
1518
1540
|
// Tenant Create: JSON from previous node
|
|
1519
1541
|
{
|
|
@@ -2478,7 +2500,7 @@ class AivenceRealty {
|
|
|
2478
2500
|
description: 'Filtrar agentes por zona (opcional)',
|
|
2479
2501
|
},
|
|
2480
2502
|
// ============================================
|
|
2481
|
-
// OWNER
|
|
2503
|
+
// OWNER EXPENSE OPERATIONS
|
|
2482
2504
|
// ============================================
|
|
2483
2505
|
{
|
|
2484
2506
|
displayName: 'Operación',
|
|
@@ -2487,274 +2509,270 @@ class AivenceRealty {
|
|
|
2487
2509
|
noDataExpression: true,
|
|
2488
2510
|
displayOptions: {
|
|
2489
2511
|
show: {
|
|
2490
|
-
resource: ['
|
|
2512
|
+
resource: ['ownerExpense'],
|
|
2491
2513
|
},
|
|
2492
2514
|
},
|
|
2493
2515
|
options: [
|
|
2494
2516
|
{
|
|
2495
2517
|
name: 'Create',
|
|
2496
2518
|
value: 'create',
|
|
2497
|
-
description: 'Crear
|
|
2498
|
-
action: 'Crear propietario',
|
|
2519
|
+
description: 'Crear gasto de propietario',
|
|
2520
|
+
action: 'Crear gasto de propietario',
|
|
2499
2521
|
},
|
|
2500
2522
|
{
|
|
2501
|
-
name: '
|
|
2502
|
-
value: '
|
|
2503
|
-
description: '
|
|
2504
|
-
action: '
|
|
2523
|
+
name: 'List',
|
|
2524
|
+
value: 'list',
|
|
2525
|
+
description: 'Listar gastos de propietario',
|
|
2526
|
+
action: 'Listar gastos de propietario',
|
|
2505
2527
|
},
|
|
2506
2528
|
{
|
|
2507
|
-
name: '
|
|
2508
|
-
value: '
|
|
2509
|
-
description: '
|
|
2510
|
-
action: '
|
|
2529
|
+
name: 'Get',
|
|
2530
|
+
value: 'get',
|
|
2531
|
+
description: 'Obtener gasto por ID',
|
|
2532
|
+
action: 'Obtener gasto de propietario',
|
|
2511
2533
|
},
|
|
2512
2534
|
{
|
|
2513
|
-
name: '
|
|
2514
|
-
value: '
|
|
2515
|
-
description: '
|
|
2516
|
-
action: '
|
|
2535
|
+
name: 'Approve',
|
|
2536
|
+
value: 'approve',
|
|
2537
|
+
description: 'Aprobar gasto de propietario',
|
|
2538
|
+
action: 'Aprobar gasto de propietario',
|
|
2517
2539
|
},
|
|
2518
2540
|
{
|
|
2519
|
-
name: '
|
|
2520
|
-
value: '
|
|
2521
|
-
description: '
|
|
2522
|
-
action: '
|
|
2541
|
+
name: 'Reject',
|
|
2542
|
+
value: 'reject',
|
|
2543
|
+
description: 'Rechazar gasto de propietario',
|
|
2544
|
+
action: 'Rechazar gasto de propietario',
|
|
2523
2545
|
},
|
|
2524
2546
|
],
|
|
2525
|
-
default: '
|
|
2547
|
+
default: 'list',
|
|
2526
2548
|
},
|
|
2527
|
-
// Owner ID
|
|
2549
|
+
// Owner Expense ID
|
|
2528
2550
|
{
|
|
2529
|
-
displayName: '
|
|
2530
|
-
name: '
|
|
2551
|
+
displayName: 'Expense ID',
|
|
2552
|
+
name: 'ownerExpenseId',
|
|
2531
2553
|
type: 'number',
|
|
2532
2554
|
required: true,
|
|
2533
2555
|
displayOptions: {
|
|
2534
2556
|
show: {
|
|
2535
|
-
resource: ['
|
|
2536
|
-
operation: ['get', '
|
|
2557
|
+
resource: ['ownerExpense'],
|
|
2558
|
+
operation: ['get', 'approve', 'reject'],
|
|
2537
2559
|
},
|
|
2538
2560
|
},
|
|
2539
2561
|
default: 0,
|
|
2540
|
-
description: 'ID del propietario',
|
|
2562
|
+
description: 'ID del gasto de propietario',
|
|
2541
2563
|
},
|
|
2542
|
-
// Owner Create
|
|
2564
|
+
// Owner Expense Create Fields
|
|
2543
2565
|
{
|
|
2544
|
-
displayName: '
|
|
2545
|
-
name: '
|
|
2546
|
-
type: '
|
|
2566
|
+
displayName: 'Owner ID',
|
|
2567
|
+
name: 'ownerIdExpense',
|
|
2568
|
+
type: 'number',
|
|
2547
2569
|
required: true,
|
|
2548
2570
|
displayOptions: {
|
|
2549
2571
|
show: {
|
|
2550
|
-
resource: ['
|
|
2572
|
+
resource: ['ownerExpense'],
|
|
2551
2573
|
operation: ['create'],
|
|
2552
2574
|
},
|
|
2553
2575
|
},
|
|
2554
|
-
default:
|
|
2555
|
-
|
|
2556
|
-
description: 'Nombre completo del propietario',
|
|
2576
|
+
default: 0,
|
|
2577
|
+
description: 'ID del propietario',
|
|
2557
2578
|
},
|
|
2558
|
-
// Owner Create - Email
|
|
2559
2579
|
{
|
|
2560
|
-
displayName: '
|
|
2561
|
-
name: '
|
|
2562
|
-
type: '
|
|
2580
|
+
displayName: 'Tipo de Gasto',
|
|
2581
|
+
name: 'expenseType',
|
|
2582
|
+
type: 'options',
|
|
2563
2583
|
required: true,
|
|
2564
2584
|
displayOptions: {
|
|
2565
2585
|
show: {
|
|
2566
|
-
resource: ['
|
|
2586
|
+
resource: ['ownerExpense'],
|
|
2567
2587
|
operation: ['create'],
|
|
2568
2588
|
},
|
|
2569
2589
|
},
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2590
|
+
options: [
|
|
2591
|
+
{ name: 'Reparación', value: 'repair' },
|
|
2592
|
+
{ name: 'Mantenimiento', value: 'maintenance' },
|
|
2593
|
+
{ name: 'Impuesto', value: 'tax' },
|
|
2594
|
+
{ name: 'Servicio', value: 'service' },
|
|
2595
|
+
{ name: 'Seguro', value: 'insurance' },
|
|
2596
|
+
{ name: 'Otro', value: 'other' },
|
|
2597
|
+
],
|
|
2598
|
+
default: 'repair',
|
|
2599
|
+
description: 'Tipo de gasto',
|
|
2573
2600
|
},
|
|
2574
|
-
// Owner Create - Teléfono
|
|
2575
2601
|
{
|
|
2576
|
-
displayName: '
|
|
2577
|
-
name: '
|
|
2602
|
+
displayName: 'Descripción',
|
|
2603
|
+
name: 'expenseDescription',
|
|
2578
2604
|
type: 'string',
|
|
2579
2605
|
required: true,
|
|
2580
2606
|
displayOptions: {
|
|
2581
2607
|
show: {
|
|
2582
|
-
resource: ['
|
|
2608
|
+
resource: ['ownerExpense'],
|
|
2583
2609
|
operation: ['create'],
|
|
2584
2610
|
},
|
|
2585
2611
|
},
|
|
2586
2612
|
default: '',
|
|
2587
|
-
|
|
2588
|
-
description: 'Teléfono del propietario',
|
|
2613
|
+
description: 'Descripción del gasto',
|
|
2589
2614
|
},
|
|
2590
|
-
// Owner Create - CUIT/CUIL
|
|
2591
2615
|
{
|
|
2592
|
-
displayName: '
|
|
2593
|
-
name: '
|
|
2594
|
-
type: '
|
|
2616
|
+
displayName: 'Monto',
|
|
2617
|
+
name: 'expenseAmount',
|
|
2618
|
+
type: 'number',
|
|
2619
|
+
required: true,
|
|
2595
2620
|
displayOptions: {
|
|
2596
2621
|
show: {
|
|
2597
|
-
resource: ['
|
|
2598
|
-
operation: ['create'
|
|
2622
|
+
resource: ['ownerExpense'],
|
|
2623
|
+
operation: ['create'],
|
|
2599
2624
|
},
|
|
2600
2625
|
},
|
|
2601
|
-
default:
|
|
2602
|
-
|
|
2603
|
-
description: 'CUIT o CUIL del propietario (opcional)',
|
|
2626
|
+
default: 0,
|
|
2627
|
+
description: 'Monto del gasto',
|
|
2604
2628
|
},
|
|
2605
|
-
// Owner Create - Tipo Persona
|
|
2606
2629
|
{
|
|
2607
|
-
displayName: '
|
|
2608
|
-
name: '
|
|
2609
|
-
type: '
|
|
2630
|
+
displayName: 'Fecha del Gasto',
|
|
2631
|
+
name: 'expenseDate',
|
|
2632
|
+
type: 'string',
|
|
2633
|
+
required: true,
|
|
2610
2634
|
displayOptions: {
|
|
2611
2635
|
show: {
|
|
2612
|
-
resource: ['
|
|
2613
|
-
operation: ['create'
|
|
2636
|
+
resource: ['ownerExpense'],
|
|
2637
|
+
operation: ['create'],
|
|
2614
2638
|
},
|
|
2615
2639
|
},
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
],
|
|
2620
|
-
default: 'fisica',
|
|
2621
|
-
description: 'Tipo de persona',
|
|
2640
|
+
default: '',
|
|
2641
|
+
placeholder: '2025-01-15',
|
|
2642
|
+
description: 'Fecha del gasto (YYYY-MM-DD)',
|
|
2622
2643
|
},
|
|
2623
|
-
// Owner Create - Dirección
|
|
2624
2644
|
{
|
|
2625
|
-
displayName: '
|
|
2626
|
-
name: '
|
|
2627
|
-
type: '
|
|
2645
|
+
displayName: 'Property ID (Opcional)',
|
|
2646
|
+
name: 'propertyIdExpense',
|
|
2647
|
+
type: 'number',
|
|
2628
2648
|
displayOptions: {
|
|
2629
2649
|
show: {
|
|
2630
|
-
resource: ['
|
|
2631
|
-
operation: ['create'
|
|
2650
|
+
resource: ['ownerExpense'],
|
|
2651
|
+
operation: ['create'],
|
|
2632
2652
|
},
|
|
2633
2653
|
},
|
|
2634
|
-
default:
|
|
2635
|
-
|
|
2636
|
-
description: 'Dirección del propietario (opcional)',
|
|
2654
|
+
default: 0,
|
|
2655
|
+
description: 'ID de la propiedad asociada (opcional)',
|
|
2637
2656
|
},
|
|
2638
|
-
// Owner Create - Notas
|
|
2639
2657
|
{
|
|
2640
|
-
displayName: '
|
|
2641
|
-
name: '
|
|
2658
|
+
displayName: 'File Path (Opcional)',
|
|
2659
|
+
name: 'expenseFilePath',
|
|
2642
2660
|
type: 'string',
|
|
2643
|
-
typeOptions: {
|
|
2644
|
-
rows: 3,
|
|
2645
|
-
},
|
|
2646
2661
|
displayOptions: {
|
|
2647
2662
|
show: {
|
|
2648
|
-
resource: ['
|
|
2649
|
-
operation: ['create'
|
|
2663
|
+
resource: ['ownerExpense'],
|
|
2664
|
+
operation: ['create'],
|
|
2650
2665
|
},
|
|
2651
2666
|
},
|
|
2652
2667
|
default: '',
|
|
2653
|
-
description: '
|
|
2668
|
+
description: 'Ruta del archivo adjunto (opcional)',
|
|
2654
2669
|
},
|
|
2655
|
-
// Owner Search - Email
|
|
2656
2670
|
{
|
|
2657
|
-
displayName: '
|
|
2658
|
-
name: '
|
|
2659
|
-
type: '
|
|
2671
|
+
displayName: 'OCR Data (Opcional)',
|
|
2672
|
+
name: 'expenseOcrData',
|
|
2673
|
+
type: 'json',
|
|
2660
2674
|
displayOptions: {
|
|
2661
2675
|
show: {
|
|
2662
|
-
resource: ['
|
|
2663
|
-
operation: ['
|
|
2676
|
+
resource: ['ownerExpense'],
|
|
2677
|
+
operation: ['create'],
|
|
2664
2678
|
},
|
|
2665
2679
|
},
|
|
2666
|
-
default: '',
|
|
2667
|
-
|
|
2668
|
-
description: 'Email a buscar (opcional)',
|
|
2680
|
+
default: '{}',
|
|
2681
|
+
description: 'Datos extraídos por OCR (opcional)',
|
|
2669
2682
|
},
|
|
2670
|
-
// Owner Search - Teléfono
|
|
2671
2683
|
{
|
|
2672
|
-
displayName: '
|
|
2673
|
-
name: '
|
|
2684
|
+
displayName: 'Notas (Opcional)',
|
|
2685
|
+
name: 'expenseNotes',
|
|
2674
2686
|
type: 'string',
|
|
2675
2687
|
displayOptions: {
|
|
2676
2688
|
show: {
|
|
2677
|
-
resource: ['
|
|
2678
|
-
operation: ['
|
|
2689
|
+
resource: ['ownerExpense'],
|
|
2690
|
+
operation: ['create'],
|
|
2679
2691
|
},
|
|
2680
2692
|
},
|
|
2681
2693
|
default: '',
|
|
2682
|
-
|
|
2683
|
-
description: 'Teléfono a buscar (opcional)',
|
|
2694
|
+
description: 'Notas adicionales (opcional)',
|
|
2684
2695
|
},
|
|
2685
|
-
// Owner
|
|
2696
|
+
// Owner Expense Approve Fields
|
|
2686
2697
|
{
|
|
2687
|
-
displayName: '
|
|
2688
|
-
name: '
|
|
2689
|
-
type: '
|
|
2698
|
+
displayName: 'Approved By (User ID)',
|
|
2699
|
+
name: 'expenseApprovedBy',
|
|
2700
|
+
type: 'number',
|
|
2701
|
+
required: true,
|
|
2690
2702
|
displayOptions: {
|
|
2691
2703
|
show: {
|
|
2692
|
-
resource: ['
|
|
2693
|
-
operation: ['
|
|
2704
|
+
resource: ['ownerExpense'],
|
|
2705
|
+
operation: ['approve'],
|
|
2694
2706
|
},
|
|
2695
2707
|
},
|
|
2696
|
-
default:
|
|
2697
|
-
|
|
2698
|
-
description: 'CUIT a buscar (opcional)',
|
|
2708
|
+
default: 0,
|
|
2709
|
+
description: 'ID del usuario que aprueba',
|
|
2699
2710
|
},
|
|
2700
|
-
// Owner
|
|
2711
|
+
// Owner Expense Reject Fields
|
|
2701
2712
|
{
|
|
2702
|
-
displayName: '
|
|
2703
|
-
name: '
|
|
2704
|
-
type: '
|
|
2713
|
+
displayName: 'Rejected By (User ID)',
|
|
2714
|
+
name: 'expenseRejectedBy',
|
|
2715
|
+
type: 'number',
|
|
2716
|
+
required: true,
|
|
2705
2717
|
displayOptions: {
|
|
2706
2718
|
show: {
|
|
2707
|
-
resource: ['
|
|
2708
|
-
operation: ['
|
|
2719
|
+
resource: ['ownerExpense'],
|
|
2720
|
+
operation: ['reject'],
|
|
2709
2721
|
},
|
|
2710
2722
|
},
|
|
2711
|
-
default:
|
|
2712
|
-
description: '
|
|
2723
|
+
default: 0,
|
|
2724
|
+
description: 'ID del usuario que rechaza',
|
|
2713
2725
|
},
|
|
2714
|
-
// Owner Update - Email
|
|
2715
2726
|
{
|
|
2716
|
-
displayName: '
|
|
2717
|
-
name: '
|
|
2727
|
+
displayName: 'Razón del Rechazo',
|
|
2728
|
+
name: 'expenseRejectionReason',
|
|
2718
2729
|
type: 'string',
|
|
2730
|
+
required: true,
|
|
2719
2731
|
displayOptions: {
|
|
2720
2732
|
show: {
|
|
2721
|
-
resource: ['
|
|
2722
|
-
operation: ['
|
|
2733
|
+
resource: ['ownerExpense'],
|
|
2734
|
+
operation: ['reject'],
|
|
2723
2735
|
},
|
|
2724
2736
|
},
|
|
2725
2737
|
default: '',
|
|
2726
|
-
description: '
|
|
2738
|
+
description: 'Razón por la cual se rechaza el gasto',
|
|
2727
2739
|
},
|
|
2728
|
-
// Owner
|
|
2740
|
+
// Owner Expense List Filters
|
|
2729
2741
|
{
|
|
2730
|
-
displayName: '
|
|
2731
|
-
name: '
|
|
2732
|
-
type: '
|
|
2742
|
+
displayName: 'Filtrar por Owner ID',
|
|
2743
|
+
name: 'expenseOwnerFilter',
|
|
2744
|
+
type: 'number',
|
|
2733
2745
|
displayOptions: {
|
|
2734
2746
|
show: {
|
|
2735
|
-
resource: ['
|
|
2736
|
-
operation: ['
|
|
2747
|
+
resource: ['ownerExpense'],
|
|
2748
|
+
operation: ['list'],
|
|
2737
2749
|
},
|
|
2738
2750
|
},
|
|
2739
|
-
default:
|
|
2740
|
-
description: '
|
|
2751
|
+
default: 0,
|
|
2752
|
+
description: 'Filtrar por propietario (0 = todos)',
|
|
2741
2753
|
},
|
|
2742
|
-
// Owner List - Paginación
|
|
2743
2754
|
{
|
|
2744
|
-
displayName: '
|
|
2745
|
-
name: '
|
|
2746
|
-
type: '
|
|
2755
|
+
displayName: 'Filtrar por Estado',
|
|
2756
|
+
name: 'expenseStatusFilter',
|
|
2757
|
+
type: 'options',
|
|
2747
2758
|
displayOptions: {
|
|
2748
2759
|
show: {
|
|
2749
|
-
resource: ['
|
|
2760
|
+
resource: ['ownerExpense'],
|
|
2750
2761
|
operation: ['list'],
|
|
2751
2762
|
},
|
|
2752
2763
|
},
|
|
2753
|
-
|
|
2754
|
-
|
|
2764
|
+
options: [
|
|
2765
|
+
{ name: 'Todos', value: '' },
|
|
2766
|
+
{ name: 'Pendiente', value: 'pending' },
|
|
2767
|
+
{ name: 'Aprobado', value: 'approved' },
|
|
2768
|
+
{ name: 'Rechazado', value: 'rejected' },
|
|
2769
|
+
{ name: 'Reembolsado', value: 'reimbursed' },
|
|
2770
|
+
],
|
|
2771
|
+
default: '',
|
|
2772
|
+
description: 'Filtrar por estado',
|
|
2755
2773
|
},
|
|
2756
2774
|
// ============================================
|
|
2757
|
-
//
|
|
2775
|
+
// CONTRACTOR INVOICE OPERATIONS
|
|
2758
2776
|
// ============================================
|
|
2759
2777
|
{
|
|
2760
2778
|
displayName: 'Operación',
|
|
@@ -2763,224 +2781,305 @@ class AivenceRealty {
|
|
|
2763
2781
|
noDataExpression: true,
|
|
2764
2782
|
displayOptions: {
|
|
2765
2783
|
show: {
|
|
2766
|
-
resource: ['
|
|
2784
|
+
resource: ['contractorInvoice'],
|
|
2767
2785
|
},
|
|
2768
2786
|
},
|
|
2769
2787
|
options: [
|
|
2770
2788
|
{
|
|
2771
|
-
name: '
|
|
2772
|
-
value: '
|
|
2773
|
-
description: '
|
|
2774
|
-
action: '
|
|
2789
|
+
name: 'Create',
|
|
2790
|
+
value: 'create',
|
|
2791
|
+
description: 'Crear factura de contratista',
|
|
2792
|
+
action: 'Crear factura de contratista',
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
name: 'List',
|
|
2796
|
+
value: 'list',
|
|
2797
|
+
description: 'Listar facturas de contratista',
|
|
2798
|
+
action: 'Listar facturas de contratista',
|
|
2775
2799
|
},
|
|
2776
2800
|
{
|
|
2777
2801
|
name: 'Get',
|
|
2778
2802
|
value: 'get',
|
|
2779
|
-
description: 'Obtener
|
|
2780
|
-
action: 'Obtener
|
|
2803
|
+
description: 'Obtener factura por ID',
|
|
2804
|
+
action: 'Obtener factura de contratista',
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
name: 'Approve',
|
|
2808
|
+
value: 'approve',
|
|
2809
|
+
description: 'Aprobar factura de contratista',
|
|
2810
|
+
action: 'Aprobar factura de contratista',
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
name: 'Reject',
|
|
2814
|
+
value: 'reject',
|
|
2815
|
+
description: 'Rechazar factura de contratista',
|
|
2816
|
+
action: 'Rechazar factura de contratista',
|
|
2781
2817
|
},
|
|
2782
2818
|
{
|
|
2783
|
-
name: '
|
|
2784
|
-
value: '
|
|
2785
|
-
description: '
|
|
2786
|
-
action: '
|
|
2819
|
+
name: 'Mark Paid',
|
|
2820
|
+
value: 'markPaid',
|
|
2821
|
+
description: 'Marcar factura como pagada',
|
|
2822
|
+
action: 'Marcar factura como pagada',
|
|
2787
2823
|
},
|
|
2788
2824
|
],
|
|
2789
|
-
default: '
|
|
2825
|
+
default: 'list',
|
|
2790
2826
|
},
|
|
2791
|
-
//
|
|
2827
|
+
// Contractor Invoice ID
|
|
2792
2828
|
{
|
|
2793
|
-
displayName: '
|
|
2794
|
-
name: '
|
|
2829
|
+
displayName: 'Invoice ID',
|
|
2830
|
+
name: 'contractorInvoiceId',
|
|
2795
2831
|
type: 'number',
|
|
2796
2832
|
required: true,
|
|
2797
2833
|
displayOptions: {
|
|
2798
2834
|
show: {
|
|
2799
|
-
resource: ['
|
|
2800
|
-
operation: ['get'],
|
|
2835
|
+
resource: ['contractorInvoice'],
|
|
2836
|
+
operation: ['get', 'approve', 'reject', 'markPaid'],
|
|
2801
2837
|
},
|
|
2802
2838
|
},
|
|
2803
2839
|
default: 0,
|
|
2804
|
-
description: 'ID de la
|
|
2840
|
+
description: 'ID de la factura de contratista',
|
|
2805
2841
|
},
|
|
2806
|
-
//
|
|
2842
|
+
// Contractor Invoice Create Fields
|
|
2807
2843
|
{
|
|
2808
|
-
displayName: '
|
|
2809
|
-
name: '
|
|
2844
|
+
displayName: 'Contractor ID',
|
|
2845
|
+
name: 'contractorIdInvoice',
|
|
2810
2846
|
type: 'number',
|
|
2811
2847
|
required: true,
|
|
2812
2848
|
displayOptions: {
|
|
2813
2849
|
show: {
|
|
2814
|
-
resource: ['
|
|
2815
|
-
operation: ['
|
|
2850
|
+
resource: ['contractorInvoice'],
|
|
2851
|
+
operation: ['create'],
|
|
2816
2852
|
},
|
|
2817
2853
|
},
|
|
2818
2854
|
default: 0,
|
|
2819
|
-
description: 'ID del
|
|
2855
|
+
description: 'ID del contratista',
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
displayName: 'Tipo de Factura',
|
|
2859
|
+
name: 'invoiceType',
|
|
2860
|
+
type: 'options',
|
|
2861
|
+
required: true,
|
|
2862
|
+
displayOptions: {
|
|
2863
|
+
show: {
|
|
2864
|
+
resource: ['contractorInvoice'],
|
|
2865
|
+
operation: ['create'],
|
|
2866
|
+
},
|
|
2867
|
+
},
|
|
2868
|
+
options: [
|
|
2869
|
+
{ name: 'Servicio', value: 'service' },
|
|
2870
|
+
{ name: 'Materiales', value: 'materials' },
|
|
2871
|
+
{ name: 'Presupuesto', value: 'quote' },
|
|
2872
|
+
],
|
|
2873
|
+
default: 'service',
|
|
2874
|
+
description: 'Tipo de factura',
|
|
2875
|
+
},
|
|
2876
|
+
{
|
|
2877
|
+
displayName: 'Número de Factura',
|
|
2878
|
+
name: 'invoiceNumber',
|
|
2879
|
+
type: 'string',
|
|
2880
|
+
required: true,
|
|
2881
|
+
displayOptions: {
|
|
2882
|
+
show: {
|
|
2883
|
+
resource: ['contractorInvoice'],
|
|
2884
|
+
operation: ['create'],
|
|
2885
|
+
},
|
|
2886
|
+
},
|
|
2887
|
+
default: '',
|
|
2888
|
+
description: 'Número único de la factura',
|
|
2820
2889
|
},
|
|
2821
|
-
// Tasación Generate - Owner ID (opcional)
|
|
2822
2890
|
{
|
|
2823
|
-
displayName: '
|
|
2824
|
-
name: '
|
|
2891
|
+
displayName: 'Monto',
|
|
2892
|
+
name: 'invoiceAmount',
|
|
2825
2893
|
type: 'number',
|
|
2894
|
+
required: true,
|
|
2826
2895
|
displayOptions: {
|
|
2827
2896
|
show: {
|
|
2828
|
-
resource: ['
|
|
2829
|
-
operation: ['
|
|
2897
|
+
resource: ['contractorInvoice'],
|
|
2898
|
+
operation: ['create'],
|
|
2830
2899
|
},
|
|
2831
2900
|
},
|
|
2832
2901
|
default: 0,
|
|
2833
|
-
description: '
|
|
2902
|
+
description: 'Monto de la factura',
|
|
2834
2903
|
},
|
|
2835
|
-
// Tasación Generate - Tipo Propiedad
|
|
2836
2904
|
{
|
|
2837
|
-
displayName: '
|
|
2838
|
-
name: '
|
|
2839
|
-
type: '
|
|
2905
|
+
displayName: 'Fecha de Emisión',
|
|
2906
|
+
name: 'invoiceIssueDate',
|
|
2907
|
+
type: 'string',
|
|
2840
2908
|
required: true,
|
|
2841
2909
|
displayOptions: {
|
|
2842
2910
|
show: {
|
|
2843
|
-
resource: ['
|
|
2844
|
-
operation: ['
|
|
2911
|
+
resource: ['contractorInvoice'],
|
|
2912
|
+
operation: ['create'],
|
|
2845
2913
|
},
|
|
2846
2914
|
},
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
{ name: 'PH', value: 'ph' },
|
|
2851
|
-
{ name: 'Local Comercial', value: 'local' },
|
|
2852
|
-
{ name: 'Oficina', value: 'oficina' },
|
|
2853
|
-
{ name: 'Terreno', value: 'terreno' },
|
|
2854
|
-
{ name: 'Cochera', value: 'cochera' },
|
|
2855
|
-
],
|
|
2856
|
-
default: 'departamento',
|
|
2857
|
-
description: 'Tipo de propiedad a tasar',
|
|
2915
|
+
default: '',
|
|
2916
|
+
placeholder: '2025-01-15',
|
|
2917
|
+
description: 'Fecha de emisión de la factura (YYYY-MM-DD)',
|
|
2858
2918
|
},
|
|
2859
|
-
// Tasación Generate - Barrio
|
|
2860
2919
|
{
|
|
2861
|
-
displayName: '
|
|
2862
|
-
name: '
|
|
2920
|
+
displayName: 'Fecha de Vencimiento (Opcional)',
|
|
2921
|
+
name: 'invoiceDueDate',
|
|
2863
2922
|
type: 'string',
|
|
2864
|
-
required: true,
|
|
2865
2923
|
displayOptions: {
|
|
2866
2924
|
show: {
|
|
2867
|
-
resource: ['
|
|
2868
|
-
operation: ['
|
|
2925
|
+
resource: ['contractorInvoice'],
|
|
2926
|
+
operation: ['create'],
|
|
2869
2927
|
},
|
|
2870
2928
|
},
|
|
2871
2929
|
default: '',
|
|
2872
|
-
placeholder: '
|
|
2873
|
-
description: '
|
|
2930
|
+
placeholder: '2025-02-15',
|
|
2931
|
+
description: 'Fecha de vencimiento (YYYY-MM-DD)',
|
|
2874
2932
|
},
|
|
2875
|
-
// Tasación Generate - Metros Cuadrados
|
|
2876
2933
|
{
|
|
2877
|
-
displayName: '
|
|
2878
|
-
name: '
|
|
2934
|
+
displayName: 'Maintenance Request ID (Opcional)',
|
|
2935
|
+
name: 'maintenanceRequestIdInvoice',
|
|
2879
2936
|
type: 'number',
|
|
2880
|
-
required: true,
|
|
2881
2937
|
displayOptions: {
|
|
2882
2938
|
show: {
|
|
2883
|
-
resource: ['
|
|
2884
|
-
operation: ['
|
|
2939
|
+
resource: ['contractorInvoice'],
|
|
2940
|
+
operation: ['create'],
|
|
2885
2941
|
},
|
|
2886
2942
|
},
|
|
2887
|
-
default:
|
|
2888
|
-
description: '
|
|
2943
|
+
default: 0,
|
|
2944
|
+
description: 'ID de la solicitud de mantenimiento asociada (opcional)',
|
|
2889
2945
|
},
|
|
2890
|
-
// Tasación Generate - Ambientes
|
|
2891
2946
|
{
|
|
2892
|
-
displayName: '
|
|
2893
|
-
name: '
|
|
2894
|
-
type: '
|
|
2947
|
+
displayName: 'File Path (Opcional)',
|
|
2948
|
+
name: 'invoiceFilePath',
|
|
2949
|
+
type: 'string',
|
|
2895
2950
|
displayOptions: {
|
|
2896
2951
|
show: {
|
|
2897
|
-
resource: ['
|
|
2898
|
-
operation: ['
|
|
2952
|
+
resource: ['contractorInvoice'],
|
|
2953
|
+
operation: ['create'],
|
|
2899
2954
|
},
|
|
2900
2955
|
},
|
|
2901
|
-
default:
|
|
2902
|
-
description: '
|
|
2956
|
+
default: '',
|
|
2957
|
+
description: 'Ruta del archivo de la factura (opcional)',
|
|
2903
2958
|
},
|
|
2904
|
-
// Tasación Generate - Dormitorios
|
|
2905
2959
|
{
|
|
2906
|
-
displayName: '
|
|
2907
|
-
name: '
|
|
2908
|
-
type: '
|
|
2960
|
+
displayName: 'OCR Data (Opcional)',
|
|
2961
|
+
name: 'invoiceOcrData',
|
|
2962
|
+
type: 'json',
|
|
2909
2963
|
displayOptions: {
|
|
2910
2964
|
show: {
|
|
2911
|
-
resource: ['
|
|
2912
|
-
operation: ['
|
|
2965
|
+
resource: ['contractorInvoice'],
|
|
2966
|
+
operation: ['create'],
|
|
2913
2967
|
},
|
|
2914
2968
|
},
|
|
2915
|
-
default:
|
|
2916
|
-
description: '
|
|
2969
|
+
default: '{}',
|
|
2970
|
+
description: 'Datos extraídos por OCR (opcional)',
|
|
2917
2971
|
},
|
|
2918
|
-
// Tasación Generate - Baños
|
|
2919
2972
|
{
|
|
2920
|
-
displayName: '
|
|
2921
|
-
name: '
|
|
2922
|
-
type: '
|
|
2973
|
+
displayName: 'Notas (Opcional)',
|
|
2974
|
+
name: 'invoiceNotes',
|
|
2975
|
+
type: 'string',
|
|
2923
2976
|
displayOptions: {
|
|
2924
2977
|
show: {
|
|
2925
|
-
resource: ['
|
|
2926
|
-
operation: ['
|
|
2978
|
+
resource: ['contractorInvoice'],
|
|
2979
|
+
operation: ['create'],
|
|
2927
2980
|
},
|
|
2928
2981
|
},
|
|
2929
|
-
default:
|
|
2930
|
-
description: '
|
|
2982
|
+
default: '',
|
|
2983
|
+
description: 'Notas adicionales (opcional)',
|
|
2931
2984
|
},
|
|
2932
|
-
//
|
|
2985
|
+
// Contractor Invoice Reject Fields
|
|
2933
2986
|
{
|
|
2934
|
-
displayName: '
|
|
2935
|
-
name: '
|
|
2987
|
+
displayName: 'Razón del Rechazo',
|
|
2988
|
+
name: 'invoiceRejectionReason',
|
|
2989
|
+
type: 'string',
|
|
2990
|
+
required: true,
|
|
2991
|
+
displayOptions: {
|
|
2992
|
+
show: {
|
|
2993
|
+
resource: ['contractorInvoice'],
|
|
2994
|
+
operation: ['reject'],
|
|
2995
|
+
},
|
|
2996
|
+
},
|
|
2997
|
+
default: '',
|
|
2998
|
+
description: 'Razón por la cual se rechaza la factura',
|
|
2999
|
+
},
|
|
3000
|
+
// Contractor Invoice Mark Paid Fields
|
|
3001
|
+
{
|
|
3002
|
+
displayName: 'Referencia de Pago (Opcional)',
|
|
3003
|
+
name: 'invoicePaymentReference',
|
|
3004
|
+
type: 'string',
|
|
3005
|
+
displayOptions: {
|
|
3006
|
+
show: {
|
|
3007
|
+
resource: ['contractorInvoice'],
|
|
3008
|
+
operation: ['markPaid'],
|
|
3009
|
+
},
|
|
3010
|
+
},
|
|
3011
|
+
default: '',
|
|
3012
|
+
description: 'Número de referencia del pago (opcional)',
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
displayName: 'Fecha de Pago (Opcional)',
|
|
3016
|
+
name: 'invoicePaidAt',
|
|
3017
|
+
type: 'string',
|
|
3018
|
+
displayOptions: {
|
|
3019
|
+
show: {
|
|
3020
|
+
resource: ['contractorInvoice'],
|
|
3021
|
+
operation: ['markPaid'],
|
|
3022
|
+
},
|
|
3023
|
+
},
|
|
3024
|
+
default: '',
|
|
3025
|
+
placeholder: '2025-01-20',
|
|
3026
|
+
description: 'Fecha del pago (YYYY-MM-DD), por defecto hoy',
|
|
3027
|
+
},
|
|
3028
|
+
// Contractor Invoice List Filters
|
|
3029
|
+
{
|
|
3030
|
+
displayName: 'Filtrar por Contractor ID',
|
|
3031
|
+
name: 'invoiceContractorFilter',
|
|
2936
3032
|
type: 'number',
|
|
2937
3033
|
displayOptions: {
|
|
2938
3034
|
show: {
|
|
2939
|
-
resource: ['
|
|
2940
|
-
operation: ['
|
|
3035
|
+
resource: ['contractorInvoice'],
|
|
3036
|
+
operation: ['list'],
|
|
2941
3037
|
},
|
|
2942
3038
|
},
|
|
2943
|
-
default:
|
|
2944
|
-
description: '
|
|
3039
|
+
default: 0,
|
|
3040
|
+
description: 'Filtrar por contratista (0 = todos)',
|
|
2945
3041
|
},
|
|
2946
|
-
// Tasación Generate - Estado
|
|
2947
3042
|
{
|
|
2948
|
-
displayName: 'Estado',
|
|
2949
|
-
name: '
|
|
3043
|
+
displayName: 'Filtrar por Estado',
|
|
3044
|
+
name: 'invoiceStatusFilter',
|
|
2950
3045
|
type: 'options',
|
|
2951
3046
|
displayOptions: {
|
|
2952
3047
|
show: {
|
|
2953
|
-
resource: ['
|
|
2954
|
-
operation: ['
|
|
3048
|
+
resource: ['contractorInvoice'],
|
|
3049
|
+
operation: ['list'],
|
|
2955
3050
|
},
|
|
2956
3051
|
},
|
|
2957
3052
|
options: [
|
|
2958
|
-
{ name: '
|
|
2959
|
-
{ name: '
|
|
2960
|
-
{ name: '
|
|
2961
|
-
{ name: '
|
|
2962
|
-
{ name: '
|
|
3053
|
+
{ name: 'Todos', value: '' },
|
|
3054
|
+
{ name: 'Pendiente', value: 'pending' },
|
|
3055
|
+
{ name: 'Aprobada', value: 'approved' },
|
|
3056
|
+
{ name: 'Rechazada', value: 'rejected' },
|
|
3057
|
+
{ name: 'Pagada', value: 'paid' },
|
|
2963
3058
|
],
|
|
2964
|
-
default: '
|
|
2965
|
-
description: '
|
|
3059
|
+
default: '',
|
|
3060
|
+
description: 'Filtrar por estado',
|
|
2966
3061
|
},
|
|
2967
|
-
// Tasación Generate - Amenidades
|
|
2968
3062
|
{
|
|
2969
|
-
displayName: '
|
|
2970
|
-
name: '
|
|
2971
|
-
type: '
|
|
3063
|
+
displayName: 'Filtrar por Tipo',
|
|
3064
|
+
name: 'invoiceTypeFilter',
|
|
3065
|
+
type: 'options',
|
|
2972
3066
|
displayOptions: {
|
|
2973
3067
|
show: {
|
|
2974
|
-
resource: ['
|
|
2975
|
-
operation: ['
|
|
3068
|
+
resource: ['contractorInvoice'],
|
|
3069
|
+
operation: ['list'],
|
|
2976
3070
|
},
|
|
2977
3071
|
},
|
|
3072
|
+
options: [
|
|
3073
|
+
{ name: 'Todos', value: '' },
|
|
3074
|
+
{ name: 'Servicio', value: 'service' },
|
|
3075
|
+
{ name: 'Materiales', value: 'materials' },
|
|
3076
|
+
{ name: 'Presupuesto', value: 'quote' },
|
|
3077
|
+
],
|
|
2978
3078
|
default: '',
|
|
2979
|
-
|
|
2980
|
-
description: 'Amenidades separadas por coma (aumentan el valor)',
|
|
3079
|
+
description: 'Filtrar por tipo de factura',
|
|
2981
3080
|
},
|
|
2982
3081
|
// ============================================
|
|
2983
|
-
//
|
|
3082
|
+
// PAYMENT PROOF OPERATIONS
|
|
2984
3083
|
// ============================================
|
|
2985
3084
|
{
|
|
2986
3085
|
displayName: 'Operación',
|
|
@@ -2989,144 +3088,168 @@ class AivenceRealty {
|
|
|
2989
3088
|
noDataExpression: true,
|
|
2990
3089
|
displayOptions: {
|
|
2991
3090
|
show: {
|
|
2992
|
-
resource: ['
|
|
3091
|
+
resource: ['paymentProof'],
|
|
2993
3092
|
},
|
|
2994
3093
|
},
|
|
2995
3094
|
options: [
|
|
2996
3095
|
{
|
|
2997
|
-
name: '
|
|
2998
|
-
value: '
|
|
2999
|
-
description: '
|
|
3000
|
-
action: '
|
|
3001
|
-
},
|
|
3002
|
-
{
|
|
3003
|
-
name: 'Get Status',
|
|
3004
|
-
value: 'getStatus',
|
|
3005
|
-
description: 'Verificar estado de firma',
|
|
3006
|
-
action: 'Verificar estado de firma',
|
|
3007
|
-
},
|
|
3008
|
-
{
|
|
3009
|
-
name: 'List Templates',
|
|
3010
|
-
value: 'listTemplates',
|
|
3011
|
-
description: 'Listar templates disponibles',
|
|
3012
|
-
action: 'Listar templates',
|
|
3013
|
-
},
|
|
3014
|
-
{
|
|
3015
|
-
name: 'Health Check',
|
|
3016
|
-
value: 'health',
|
|
3017
|
-
description: 'Verificar conexión con DocuSeal',
|
|
3018
|
-
action: 'Health check DocuSeal',
|
|
3096
|
+
name: 'Process',
|
|
3097
|
+
value: 'process',
|
|
3098
|
+
description: 'Procesar comprobante de pago',
|
|
3099
|
+
action: 'Procesar comprobante',
|
|
3019
3100
|
},
|
|
3020
3101
|
],
|
|
3021
|
-
default: '
|
|
3102
|
+
default: 'process',
|
|
3022
3103
|
},
|
|
3023
|
-
// DocuSeal - Submission ID
|
|
3024
3104
|
{
|
|
3025
|
-
displayName: '
|
|
3026
|
-
name: '
|
|
3027
|
-
type: '
|
|
3105
|
+
displayName: 'ID del Inquilino',
|
|
3106
|
+
name: 'ppTenantId',
|
|
3107
|
+
type: 'string',
|
|
3028
3108
|
required: true,
|
|
3029
3109
|
displayOptions: {
|
|
3030
3110
|
show: {
|
|
3031
|
-
resource: ['
|
|
3032
|
-
operation: ['
|
|
3111
|
+
resource: ['paymentProof'],
|
|
3112
|
+
operation: ['process'],
|
|
3033
3113
|
},
|
|
3034
3114
|
},
|
|
3035
|
-
default:
|
|
3036
|
-
|
|
3115
|
+
default: '',
|
|
3116
|
+
placeholder: '123',
|
|
3117
|
+
description: 'ID del inquilino que realiza el pago',
|
|
3037
3118
|
},
|
|
3038
|
-
// DocuSeal - Tipo Mandato
|
|
3039
3119
|
{
|
|
3040
|
-
displayName: '
|
|
3041
|
-
name: '
|
|
3042
|
-
type: '
|
|
3120
|
+
displayName: 'Datos OCR del Comprobante',
|
|
3121
|
+
name: 'ppOcrData',
|
|
3122
|
+
type: 'json',
|
|
3043
3123
|
required: true,
|
|
3044
3124
|
displayOptions: {
|
|
3045
3125
|
show: {
|
|
3046
|
-
resource: ['
|
|
3047
|
-
operation: ['
|
|
3126
|
+
resource: ['paymentProof'],
|
|
3127
|
+
operation: ['process'],
|
|
3128
|
+
},
|
|
3129
|
+
},
|
|
3130
|
+
default: '{"amount": 45000, "date": "2026-01-26", "reference": "REF123"}',
|
|
3131
|
+
description: 'Datos extraídos del comprobante por OCR (amount, date, reference)',
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
displayName: 'URL del Archivo (Opcional)',
|
|
3135
|
+
name: 'ppFileUrl',
|
|
3136
|
+
type: 'string',
|
|
3137
|
+
displayOptions: {
|
|
3138
|
+
show: {
|
|
3139
|
+
resource: ['paymentProof'],
|
|
3140
|
+
operation: ['process'],
|
|
3141
|
+
},
|
|
3142
|
+
},
|
|
3143
|
+
default: '',
|
|
3144
|
+
placeholder: 'https://storage.ejemplo.com/comprobante.pdf',
|
|
3145
|
+
description: 'URL del comprobante escaneado',
|
|
3146
|
+
},
|
|
3147
|
+
// ============================================
|
|
3148
|
+
// AUTOMATION OPERATIONS
|
|
3149
|
+
// ============================================
|
|
3150
|
+
{
|
|
3151
|
+
displayName: 'Operación',
|
|
3152
|
+
name: 'operation',
|
|
3153
|
+
type: 'options',
|
|
3154
|
+
noDataExpression: true,
|
|
3155
|
+
displayOptions: {
|
|
3156
|
+
show: {
|
|
3157
|
+
resource: ['automation'],
|
|
3048
3158
|
},
|
|
3049
3159
|
},
|
|
3050
3160
|
options: [
|
|
3051
|
-
{
|
|
3052
|
-
|
|
3161
|
+
{
|
|
3162
|
+
name: 'Log Execution',
|
|
3163
|
+
value: 'logExecution',
|
|
3164
|
+
description: 'Registrar ejecución de workflow',
|
|
3165
|
+
action: 'Registrar ejecución',
|
|
3166
|
+
},
|
|
3053
3167
|
],
|
|
3054
|
-
default: '
|
|
3055
|
-
description: 'Tipo de mandato a crear',
|
|
3168
|
+
default: 'logExecution',
|
|
3056
3169
|
},
|
|
3057
|
-
// DocuSeal - Owner ID
|
|
3058
3170
|
{
|
|
3059
|
-
displayName: '
|
|
3060
|
-
name: '
|
|
3061
|
-
type: '
|
|
3171
|
+
displayName: 'Nombre del Workflow',
|
|
3172
|
+
name: 'autoWorkflowName',
|
|
3173
|
+
type: 'string',
|
|
3062
3174
|
required: true,
|
|
3063
3175
|
displayOptions: {
|
|
3064
3176
|
show: {
|
|
3065
|
-
resource: ['
|
|
3066
|
-
operation: ['
|
|
3177
|
+
resource: ['automation'],
|
|
3178
|
+
operation: ['logExecution'],
|
|
3067
3179
|
},
|
|
3068
3180
|
},
|
|
3069
|
-
default:
|
|
3070
|
-
|
|
3181
|
+
default: '',
|
|
3182
|
+
placeholder: 'ProcessPaymentProof',
|
|
3183
|
+
description: 'Nombre identificador del workflow ejecutado',
|
|
3071
3184
|
},
|
|
3072
|
-
// DocuSeal - Property ID
|
|
3073
3185
|
{
|
|
3074
|
-
displayName: '
|
|
3075
|
-
name: '
|
|
3076
|
-
type: '
|
|
3186
|
+
displayName: 'ID de Ejecución',
|
|
3187
|
+
name: 'autoExecutionId',
|
|
3188
|
+
type: 'string',
|
|
3189
|
+
required: true,
|
|
3077
3190
|
displayOptions: {
|
|
3078
3191
|
show: {
|
|
3079
|
-
resource: ['
|
|
3080
|
-
operation: ['
|
|
3192
|
+
resource: ['automation'],
|
|
3193
|
+
operation: ['logExecution'],
|
|
3081
3194
|
},
|
|
3082
3195
|
},
|
|
3083
|
-
default:
|
|
3084
|
-
|
|
3196
|
+
default: '',
|
|
3197
|
+
placeholder: 'exec_123456',
|
|
3198
|
+
description: 'ID único de la ejecución (execution ID de N8N)',
|
|
3085
3199
|
},
|
|
3086
|
-
// DocuSeal - Duración
|
|
3087
3200
|
{
|
|
3088
|
-
displayName: '
|
|
3089
|
-
name: '
|
|
3090
|
-
type: '
|
|
3201
|
+
displayName: 'Estado',
|
|
3202
|
+
name: 'autoStatus',
|
|
3203
|
+
type: 'options',
|
|
3204
|
+
required: true,
|
|
3091
3205
|
displayOptions: {
|
|
3092
3206
|
show: {
|
|
3093
|
-
resource: ['
|
|
3094
|
-
operation: ['
|
|
3207
|
+
resource: ['automation'],
|
|
3208
|
+
operation: ['logExecution'],
|
|
3095
3209
|
},
|
|
3096
3210
|
},
|
|
3097
|
-
|
|
3098
|
-
|
|
3211
|
+
options: [
|
|
3212
|
+
{ name: 'Success', value: 'success' },
|
|
3213
|
+
{ name: 'Failed', value: 'failed' },
|
|
3214
|
+
{ name: 'Pending', value: 'pending' },
|
|
3215
|
+
],
|
|
3216
|
+
default: 'success',
|
|
3217
|
+
description: 'Estado de la ejecución',
|
|
3099
3218
|
},
|
|
3100
|
-
// DocuSeal - Comisión
|
|
3101
3219
|
{
|
|
3102
|
-
displayName: '
|
|
3103
|
-
name: '
|
|
3104
|
-
type: '
|
|
3220
|
+
displayName: 'Tipo de Documento',
|
|
3221
|
+
name: 'autoDocumentType',
|
|
3222
|
+
type: 'options',
|
|
3105
3223
|
displayOptions: {
|
|
3106
3224
|
show: {
|
|
3107
|
-
resource: ['
|
|
3108
|
-
operation: ['
|
|
3225
|
+
resource: ['automation'],
|
|
3226
|
+
operation: ['logExecution'],
|
|
3109
3227
|
},
|
|
3110
3228
|
},
|
|
3111
|
-
|
|
3112
|
-
|
|
3229
|
+
options: [
|
|
3230
|
+
{ name: 'Payment Proof', value: 'payment_proof' },
|
|
3231
|
+
{ name: 'Contractor Invoice', value: 'contractor_invoice' },
|
|
3232
|
+
{ name: 'Owner Expense', value: 'owner_expense' },
|
|
3233
|
+
{ name: 'Other', value: 'other' },
|
|
3234
|
+
],
|
|
3235
|
+
default: 'payment_proof',
|
|
3236
|
+
description: 'Tipo de documento procesado (opcional)',
|
|
3113
3237
|
},
|
|
3114
|
-
// DocuSeal - Precio
|
|
3115
3238
|
{
|
|
3116
|
-
displayName: '
|
|
3117
|
-
name: '
|
|
3118
|
-
type: '
|
|
3239
|
+
displayName: 'Metadata (JSON)',
|
|
3240
|
+
name: 'autoMetadata',
|
|
3241
|
+
type: 'json',
|
|
3119
3242
|
displayOptions: {
|
|
3120
3243
|
show: {
|
|
3121
|
-
resource: ['
|
|
3122
|
-
operation: ['
|
|
3244
|
+
resource: ['automation'],
|
|
3245
|
+
operation: ['logExecution'],
|
|
3123
3246
|
},
|
|
3124
3247
|
},
|
|
3125
|
-
default:
|
|
3126
|
-
description: '
|
|
3248
|
+
default: '{}',
|
|
3249
|
+
description: 'Datos adicionales de la ejecución (opcional)',
|
|
3127
3250
|
},
|
|
3128
3251
|
// ============================================
|
|
3129
|
-
//
|
|
3252
|
+
// POLICY OPERATIONS
|
|
3130
3253
|
// ============================================
|
|
3131
3254
|
{
|
|
3132
3255
|
displayName: 'Operación',
|
|
@@ -3135,148 +3258,171 @@ class AivenceRealty {
|
|
|
3135
3258
|
noDataExpression: true,
|
|
3136
3259
|
displayOptions: {
|
|
3137
3260
|
show: {
|
|
3138
|
-
resource: ['
|
|
3261
|
+
resource: ['policy'],
|
|
3139
3262
|
},
|
|
3140
3263
|
},
|
|
3141
3264
|
options: [
|
|
3142
3265
|
{
|
|
3143
|
-
name: '
|
|
3144
|
-
value: '
|
|
3145
|
-
description: '
|
|
3146
|
-
action: '
|
|
3266
|
+
name: 'Evaluate',
|
|
3267
|
+
value: 'evaluate',
|
|
3268
|
+
description: 'Evaluar política de aprobación',
|
|
3269
|
+
action: 'Evaluar política',
|
|
3147
3270
|
},
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3271
|
+
],
|
|
3272
|
+
default: 'evaluate',
|
|
3273
|
+
},
|
|
3274
|
+
{
|
|
3275
|
+
displayName: 'Tipo de Política',
|
|
3276
|
+
name: 'policyType',
|
|
3277
|
+
type: 'options',
|
|
3278
|
+
required: true,
|
|
3279
|
+
displayOptions: {
|
|
3280
|
+
show: {
|
|
3281
|
+
resource: ['policy'],
|
|
3282
|
+
operation: ['evaluate'],
|
|
3153
3283
|
},
|
|
3284
|
+
},
|
|
3285
|
+
options: [
|
|
3286
|
+
{ name: 'Payment Proof', value: 'payment_proof' },
|
|
3287
|
+
{ name: 'Contractor Invoice', value: 'contractor_invoice' },
|
|
3288
|
+
{ name: 'Owner Expense', value: 'owner_expense' },
|
|
3154
3289
|
],
|
|
3155
|
-
default: '
|
|
3290
|
+
default: 'payment_proof',
|
|
3291
|
+
description: 'Tipo de documento a evaluar',
|
|
3156
3292
|
},
|
|
3157
|
-
// Mariana - Lead ID
|
|
3158
3293
|
{
|
|
3159
|
-
displayName: '
|
|
3160
|
-
name: '
|
|
3294
|
+
displayName: 'Monto',
|
|
3295
|
+
name: 'policyAmount',
|
|
3161
3296
|
type: 'number',
|
|
3162
3297
|
required: true,
|
|
3163
3298
|
displayOptions: {
|
|
3164
3299
|
show: {
|
|
3165
|
-
resource: ['
|
|
3166
|
-
operation: ['
|
|
3300
|
+
resource: ['policy'],
|
|
3301
|
+
operation: ['evaluate'],
|
|
3167
3302
|
},
|
|
3168
3303
|
},
|
|
3169
3304
|
default: 0,
|
|
3170
|
-
|
|
3305
|
+
placeholder: '45000',
|
|
3306
|
+
description: 'Monto total del documento. Ej: 45000.50',
|
|
3171
3307
|
},
|
|
3172
|
-
// Mariana - Conversation ID
|
|
3173
3308
|
{
|
|
3174
|
-
displayName: '
|
|
3175
|
-
name: '
|
|
3176
|
-
type: '
|
|
3309
|
+
displayName: 'Datos del Documento (JSON)',
|
|
3310
|
+
name: 'policyDocumentData',
|
|
3311
|
+
type: 'json',
|
|
3312
|
+
required: true,
|
|
3177
3313
|
displayOptions: {
|
|
3178
3314
|
show: {
|
|
3179
|
-
resource: ['
|
|
3180
|
-
operation: ['
|
|
3315
|
+
resource: ['policy'],
|
|
3316
|
+
operation: ['evaluate'],
|
|
3181
3317
|
},
|
|
3182
3318
|
},
|
|
3183
|
-
default:
|
|
3184
|
-
description: '
|
|
3319
|
+
default: '{"amount": 45000, "date": "2026-01-26", "tenant_id": 123}',
|
|
3320
|
+
description: 'Datos extraídos del documento para evaluación',
|
|
3321
|
+
},
|
|
3322
|
+
// ============================================
|
|
3323
|
+
// NOTIFICATION OPERATIONS
|
|
3324
|
+
// ============================================
|
|
3325
|
+
{
|
|
3326
|
+
displayName: 'Operación',
|
|
3327
|
+
name: 'operation',
|
|
3328
|
+
type: 'options',
|
|
3329
|
+
noDataExpression: true,
|
|
3330
|
+
displayOptions: {
|
|
3331
|
+
show: {
|
|
3332
|
+
resource: ['notification'],
|
|
3333
|
+
},
|
|
3334
|
+
},
|
|
3335
|
+
options: [
|
|
3336
|
+
{
|
|
3337
|
+
name: 'Send',
|
|
3338
|
+
value: 'send',
|
|
3339
|
+
description: 'Enviar notificación',
|
|
3340
|
+
action: 'Enviar notificación',
|
|
3341
|
+
},
|
|
3342
|
+
],
|
|
3343
|
+
default: 'send',
|
|
3185
3344
|
},
|
|
3186
|
-
// Mariana - Motivo
|
|
3187
3345
|
{
|
|
3188
|
-
displayName: '
|
|
3189
|
-
name: '
|
|
3346
|
+
displayName: 'Tipo de Destinatario',
|
|
3347
|
+
name: 'notifRecipientType',
|
|
3190
3348
|
type: 'options',
|
|
3191
3349
|
required: true,
|
|
3192
3350
|
displayOptions: {
|
|
3193
3351
|
show: {
|
|
3194
|
-
resource: ['
|
|
3195
|
-
operation: ['
|
|
3352
|
+
resource: ['notification'],
|
|
3353
|
+
operation: ['send'],
|
|
3196
3354
|
},
|
|
3197
3355
|
},
|
|
3198
3356
|
options: [
|
|
3199
|
-
{ name: '
|
|
3200
|
-
{ name: '
|
|
3201
|
-
{ name: '
|
|
3202
|
-
{ name: '
|
|
3203
|
-
{ name: 'Consulta Específica', value: 'consulta' },
|
|
3204
|
-
{ name: 'Otro', value: 'otro' },
|
|
3357
|
+
{ name: 'Tenant', value: 'tenant' },
|
|
3358
|
+
{ name: 'Owner', value: 'owner' },
|
|
3359
|
+
{ name: 'Contractor', value: 'contractor' },
|
|
3360
|
+
{ name: 'Admin', value: 'admin' },
|
|
3205
3361
|
],
|
|
3206
|
-
default: '
|
|
3207
|
-
description: '
|
|
3362
|
+
default: 'tenant',
|
|
3363
|
+
description: 'Tipo de destinatario de la notificación',
|
|
3208
3364
|
},
|
|
3209
|
-
// Mariana - Notas
|
|
3210
3365
|
{
|
|
3211
|
-
displayName: '
|
|
3212
|
-
name: '
|
|
3366
|
+
displayName: 'ID del Destinatario',
|
|
3367
|
+
name: 'notifRecipientId',
|
|
3213
3368
|
type: 'string',
|
|
3214
|
-
|
|
3215
|
-
rows: 3,
|
|
3216
|
-
},
|
|
3369
|
+
required: true,
|
|
3217
3370
|
displayOptions: {
|
|
3218
3371
|
show: {
|
|
3219
|
-
resource: ['
|
|
3220
|
-
operation: ['
|
|
3372
|
+
resource: ['notification'],
|
|
3373
|
+
operation: ['send'],
|
|
3221
3374
|
},
|
|
3222
3375
|
},
|
|
3223
3376
|
default: '',
|
|
3224
|
-
placeholder: '
|
|
3225
|
-
description: '
|
|
3377
|
+
placeholder: '123',
|
|
3378
|
+
description: 'ID del usuario destinatario',
|
|
3226
3379
|
},
|
|
3227
|
-
// Mariana - Urgencia
|
|
3228
3380
|
{
|
|
3229
|
-
displayName: '
|
|
3230
|
-
name: '
|
|
3381
|
+
displayName: 'Canal',
|
|
3382
|
+
name: 'notifChannel',
|
|
3231
3383
|
type: 'options',
|
|
3384
|
+
required: true,
|
|
3232
3385
|
displayOptions: {
|
|
3233
3386
|
show: {
|
|
3234
|
-
resource: ['
|
|
3235
|
-
operation: ['
|
|
3387
|
+
resource: ['notification'],
|
|
3388
|
+
operation: ['send'],
|
|
3236
3389
|
},
|
|
3237
3390
|
},
|
|
3238
3391
|
options: [
|
|
3239
|
-
{ name: '
|
|
3240
|
-
{ name: '
|
|
3241
|
-
{ name: '
|
|
3392
|
+
{ name: 'Database (In-App)', value: 'database' },
|
|
3393
|
+
{ name: 'WhatsApp', value: 'whatsapp' },
|
|
3394
|
+
{ name: 'Email', value: 'email' },
|
|
3242
3395
|
],
|
|
3243
|
-
default: '
|
|
3244
|
-
description: '
|
|
3396
|
+
default: 'database',
|
|
3397
|
+
description: 'Canal de envío de la notificación',
|
|
3245
3398
|
},
|
|
3246
|
-
// Mariana - Datos de Propiedad
|
|
3247
3399
|
{
|
|
3248
|
-
displayName: '
|
|
3249
|
-
name: '
|
|
3400
|
+
displayName: 'Clave de Template',
|
|
3401
|
+
name: 'notifTemplateKey',
|
|
3250
3402
|
type: 'string',
|
|
3403
|
+
required: true,
|
|
3251
3404
|
displayOptions: {
|
|
3252
3405
|
show: {
|
|
3253
|
-
resource: ['
|
|
3254
|
-
operation: ['
|
|
3406
|
+
resource: ['notification'],
|
|
3407
|
+
operation: ['send'],
|
|
3255
3408
|
},
|
|
3256
3409
|
},
|
|
3257
3410
|
default: '',
|
|
3258
|
-
placeholder: '
|
|
3259
|
-
description: '
|
|
3411
|
+
placeholder: 'payment_received',
|
|
3412
|
+
description: 'Clave del template de notificación. Ej: payment_received, invoice_approved',
|
|
3260
3413
|
},
|
|
3261
|
-
// Mariana - Tipo Operación
|
|
3262
3414
|
{
|
|
3263
|
-
displayName: '
|
|
3264
|
-
name: '
|
|
3265
|
-
type: '
|
|
3415
|
+
displayName: 'Variables del Template (JSON)',
|
|
3416
|
+
name: 'notifVariables',
|
|
3417
|
+
type: 'json',
|
|
3266
3418
|
displayOptions: {
|
|
3267
3419
|
show: {
|
|
3268
|
-
resource: ['
|
|
3269
|
-
operation: ['
|
|
3420
|
+
resource: ['notification'],
|
|
3421
|
+
operation: ['send'],
|
|
3270
3422
|
},
|
|
3271
3423
|
},
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
{ name: 'Alquiler', value: 'alquiler' },
|
|
3275
|
-
{ name: 'Ambas', value: 'ambas' },
|
|
3276
|
-
{ name: 'No Definido', value: 'undefined' },
|
|
3277
|
-
],
|
|
3278
|
-
default: 'undefined',
|
|
3279
|
-
description: 'Tipo de operación que busca el propietario',
|
|
3424
|
+
default: '{"amount": 45000, "property_address": "Av. Corrientes 1234"}',
|
|
3425
|
+
description: 'Variables para reemplazar en el template (opcional)',
|
|
3280
3426
|
},
|
|
3281
3427
|
],
|
|
3282
3428
|
};
|
|
@@ -3955,11 +4101,19 @@ class AivenceRealty {
|
|
|
3955
4101
|
json: true,
|
|
3956
4102
|
});
|
|
3957
4103
|
}
|
|
4104
|
+
else if (operation === 'validateExists') {
|
|
4105
|
+
const tenantId = this.getNodeParameter('tenantId', i);
|
|
4106
|
+
responseData = await this.helpers.httpRequest({
|
|
4107
|
+
method: 'GET',
|
|
4108
|
+
url: `${baseUrl}/api/v1/tenants/${tenantId}/exists`,
|
|
4109
|
+
json: true,
|
|
4110
|
+
});
|
|
4111
|
+
}
|
|
3958
4112
|
}
|
|
3959
4113
|
// ============================================
|
|
3960
4114
|
// APPOINTMENT RESOURCE
|
|
3961
4115
|
// ============================================
|
|
3962
|
-
else if (resource
|
|
4116
|
+
else if (resource == 'appointment') {
|
|
3963
4117
|
if (operation === 'list') {
|
|
3964
4118
|
const propertyIdFilter = this.getNodeParameter('appointmentPropertyIdFilter', i, 0);
|
|
3965
4119
|
const staffIdFilter = this.getNodeParameter('appointmentStaffIdFilter', i, 0);
|
|
@@ -4217,22 +4371,37 @@ class AivenceRealty {
|
|
|
4217
4371
|
}
|
|
4218
4372
|
}
|
|
4219
4373
|
// ============================================
|
|
4220
|
-
// OWNER RESOURCE
|
|
4374
|
+
// OWNER EXPENSE RESOURCE
|
|
4221
4375
|
// ============================================
|
|
4222
|
-
else if (resource === '
|
|
4376
|
+
else if (resource === 'ownerExpense') {
|
|
4223
4377
|
if (operation === 'create') {
|
|
4378
|
+
const ownerId = this.getNodeParameter('ownerIdExpense', i);
|
|
4379
|
+
const expenseType = this.getNodeParameter('expenseType', i);
|
|
4380
|
+
const description = this.getNodeParameter('expenseDescription', i);
|
|
4381
|
+
const amount = this.getNodeParameter('expenseAmount', i);
|
|
4382
|
+
const expenseDate = this.getNodeParameter('expenseDate', i);
|
|
4383
|
+
const propertyId = this.getNodeParameter('propertyIdExpense', i);
|
|
4384
|
+
const filePath = this.getNodeParameter('expenseFilePath', i);
|
|
4385
|
+
const ocrData = this.getNodeParameter('expenseOcrData', i);
|
|
4386
|
+
const notes = this.getNodeParameter('expenseNotes', i);
|
|
4224
4387
|
const body = {
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
direccion: this.getNodeParameter('ownerDireccion', i) || undefined,
|
|
4231
|
-
notas: this.getNodeParameter('ownerNotas', i) || undefined,
|
|
4388
|
+
owner_id: ownerId,
|
|
4389
|
+
expense_type: expenseType,
|
|
4390
|
+
description,
|
|
4391
|
+
amount,
|
|
4392
|
+
expense_date: expenseDate,
|
|
4232
4393
|
};
|
|
4394
|
+
if (propertyId)
|
|
4395
|
+
body.property_id = propertyId;
|
|
4396
|
+
if (filePath)
|
|
4397
|
+
body.file_path = filePath;
|
|
4398
|
+
if (ocrData && ocrData !== '{}')
|
|
4399
|
+
body.ocr_data = JSON.parse(ocrData);
|
|
4400
|
+
if (notes)
|
|
4401
|
+
body.notes = notes;
|
|
4233
4402
|
responseData = await this.helpers.httpRequest({
|
|
4234
4403
|
method: 'POST',
|
|
4235
|
-
url: `${baseUrl}/api/v1/
|
|
4404
|
+
url: `${baseUrl}/api/v1/owner-expenses`,
|
|
4236
4405
|
headers: {
|
|
4237
4406
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4238
4407
|
'Accept': 'application/json',
|
|
@@ -4242,11 +4411,20 @@ class AivenceRealty {
|
|
|
4242
4411
|
json: true,
|
|
4243
4412
|
});
|
|
4244
4413
|
}
|
|
4245
|
-
else if (operation === '
|
|
4246
|
-
const
|
|
4414
|
+
else if (operation === 'list') {
|
|
4415
|
+
const ownerFilter = this.getNodeParameter('expenseOwnerFilter', i);
|
|
4416
|
+
const statusFilter = this.getNodeParameter('expenseStatusFilter', i);
|
|
4417
|
+
let url = `${baseUrl}/api/v1/owner-expenses`;
|
|
4418
|
+
const params = [];
|
|
4419
|
+
if (ownerFilter)
|
|
4420
|
+
params.push(`owner_id=${ownerFilter}`);
|
|
4421
|
+
if (statusFilter)
|
|
4422
|
+
params.push(`status=${statusFilter}`);
|
|
4423
|
+
if (params.length > 0)
|
|
4424
|
+
url += `?${params.join('&')}`;
|
|
4247
4425
|
responseData = await this.helpers.httpRequest({
|
|
4248
4426
|
method: 'GET',
|
|
4249
|
-
url
|
|
4427
|
+
url,
|
|
4250
4428
|
headers: {
|
|
4251
4429
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4252
4430
|
'Accept': 'application/json',
|
|
@@ -4254,20 +4432,11 @@ class AivenceRealty {
|
|
|
4254
4432
|
json: true,
|
|
4255
4433
|
});
|
|
4256
4434
|
}
|
|
4257
|
-
else if (operation === '
|
|
4258
|
-
const
|
|
4259
|
-
const searchTelefono = this.getNodeParameter('searchTelefono', i);
|
|
4260
|
-
const searchCuit = this.getNodeParameter('searchCuit', i);
|
|
4261
|
-
const params = new URLSearchParams();
|
|
4262
|
-
if (searchEmail)
|
|
4263
|
-
params.append('email', searchEmail);
|
|
4264
|
-
if (searchTelefono)
|
|
4265
|
-
params.append('telefono', searchTelefono);
|
|
4266
|
-
if (searchCuit)
|
|
4267
|
-
params.append('cuit', searchCuit);
|
|
4435
|
+
else if (operation === 'get') {
|
|
4436
|
+
const expenseId = this.getNodeParameter('ownerExpenseId', i);
|
|
4268
4437
|
responseData = await this.helpers.httpRequest({
|
|
4269
4438
|
method: 'GET',
|
|
4270
|
-
url: `${baseUrl}/api/v1/
|
|
4439
|
+
url: `${baseUrl}/api/v1/owner-expenses/${expenseId}`,
|
|
4271
4440
|
headers: {
|
|
4272
4441
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4273
4442
|
'Accept': 'application/json',
|
|
@@ -4275,75 +4444,76 @@ class AivenceRealty {
|
|
|
4275
4444
|
json: true,
|
|
4276
4445
|
});
|
|
4277
4446
|
}
|
|
4278
|
-
else if (operation === '
|
|
4279
|
-
const
|
|
4280
|
-
const
|
|
4281
|
-
const updateNombre = this.getNodeParameter('updateNombre', i);
|
|
4282
|
-
const updateEmail = this.getNodeParameter('updateEmail', i);
|
|
4283
|
-
const updateTelefono = this.getNodeParameter('updateTelefono', i);
|
|
4284
|
-
const ownerCuit = this.getNodeParameter('ownerCuit', i);
|
|
4285
|
-
const ownerTipoPersona = this.getNodeParameter('ownerTipoPersona', i);
|
|
4286
|
-
const ownerDireccion = this.getNodeParameter('ownerDireccion', i);
|
|
4287
|
-
const ownerNotas = this.getNodeParameter('ownerNotas', i);
|
|
4288
|
-
if (updateNombre)
|
|
4289
|
-
body.nombre = updateNombre;
|
|
4290
|
-
if (updateEmail)
|
|
4291
|
-
body.email = updateEmail;
|
|
4292
|
-
if (updateTelefono)
|
|
4293
|
-
body.telefono = updateTelefono;
|
|
4294
|
-
if (ownerCuit)
|
|
4295
|
-
body.cuit_cuil = ownerCuit;
|
|
4296
|
-
if (ownerTipoPersona)
|
|
4297
|
-
body.tipo_persona = ownerTipoPersona;
|
|
4298
|
-
if (ownerDireccion)
|
|
4299
|
-
body.direccion = ownerDireccion;
|
|
4300
|
-
if (ownerNotas)
|
|
4301
|
-
body.notas = ownerNotas;
|
|
4447
|
+
else if (operation === 'approve') {
|
|
4448
|
+
const expenseId = this.getNodeParameter('ownerExpenseId', i);
|
|
4449
|
+
const approvedBy = this.getNodeParameter('expenseApprovedBy', i);
|
|
4302
4450
|
responseData = await this.helpers.httpRequest({
|
|
4303
|
-
method: '
|
|
4304
|
-
url: `${baseUrl}/api/v1/
|
|
4451
|
+
method: 'POST',
|
|
4452
|
+
url: `${baseUrl}/api/v1/owner-expenses/${expenseId}/approve`,
|
|
4305
4453
|
headers: {
|
|
4306
4454
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4307
4455
|
'Accept': 'application/json',
|
|
4308
4456
|
'Content-Type': 'application/json',
|
|
4309
4457
|
},
|
|
4310
|
-
body,
|
|
4458
|
+
body: { approved_by: approvedBy },
|
|
4311
4459
|
json: true,
|
|
4312
4460
|
});
|
|
4313
4461
|
}
|
|
4314
|
-
else if (operation === '
|
|
4315
|
-
const
|
|
4462
|
+
else if (operation === 'reject') {
|
|
4463
|
+
const expenseId = this.getNodeParameter('ownerExpenseId', i);
|
|
4464
|
+
const rejectedBy = this.getNodeParameter('expenseRejectedBy', i);
|
|
4465
|
+
const rejectionReason = this.getNodeParameter('expenseRejectionReason', i);
|
|
4316
4466
|
responseData = await this.helpers.httpRequest({
|
|
4317
|
-
method: '
|
|
4318
|
-
url: `${baseUrl}/api/v1/
|
|
4467
|
+
method: 'POST',
|
|
4468
|
+
url: `${baseUrl}/api/v1/owner-expenses/${expenseId}/reject`,
|
|
4319
4469
|
headers: {
|
|
4320
4470
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4321
4471
|
'Accept': 'application/json',
|
|
4472
|
+
'Content-Type': 'application/json',
|
|
4473
|
+
},
|
|
4474
|
+
body: {
|
|
4475
|
+
rejected_by: rejectedBy,
|
|
4476
|
+
rejection_reason: rejectionReason,
|
|
4322
4477
|
},
|
|
4323
4478
|
json: true,
|
|
4324
4479
|
});
|
|
4325
4480
|
}
|
|
4326
4481
|
}
|
|
4327
4482
|
// ============================================
|
|
4328
|
-
//
|
|
4483
|
+
// CONTRACTOR INVOICE RESOURCE
|
|
4329
4484
|
// ============================================
|
|
4330
|
-
else if (resource === '
|
|
4331
|
-
if (operation === '
|
|
4485
|
+
else if (resource === 'contractorInvoice') {
|
|
4486
|
+
if (operation === 'create') {
|
|
4487
|
+
const contractorId = this.getNodeParameter('contractorIdInvoice', i);
|
|
4488
|
+
const invoiceType = this.getNodeParameter('invoiceType', i);
|
|
4489
|
+
const invoiceNumber = this.getNodeParameter('invoiceNumber', i);
|
|
4490
|
+
const amount = this.getNodeParameter('invoiceAmount', i);
|
|
4491
|
+
const issueDate = this.getNodeParameter('invoiceIssueDate', i);
|
|
4492
|
+
const dueDate = this.getNodeParameter('invoiceDueDate', i);
|
|
4493
|
+
const maintenanceRequestId = this.getNodeParameter('maintenanceRequestIdInvoice', i);
|
|
4494
|
+
const filePath = this.getNodeParameter('invoiceFilePath', i);
|
|
4495
|
+
const ocrData = this.getNodeParameter('invoiceOcrData', i);
|
|
4496
|
+
const notes = this.getNodeParameter('invoiceNotes', i);
|
|
4332
4497
|
const body = {
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
banos: this.getNodeParameter('tasacionBanos', i) || undefined,
|
|
4339
|
-
antiguedad: this.getNodeParameter('tasacionAntiguedad', i) || undefined,
|
|
4340
|
-
estado: this.getNodeParameter('tasacionEstado', i) || undefined,
|
|
4341
|
-
amenidades: this.getNodeParameter('tasacionAmenidades', i) || undefined,
|
|
4342
|
-
owner_id: this.getNodeParameter('tasacionOwnerIdSave', i) || undefined,
|
|
4498
|
+
contractor_id: contractorId,
|
|
4499
|
+
invoice_type: invoiceType,
|
|
4500
|
+
invoice_number: invoiceNumber,
|
|
4501
|
+
amount,
|
|
4502
|
+
issue_date: issueDate,
|
|
4343
4503
|
};
|
|
4504
|
+
if (dueDate)
|
|
4505
|
+
body.due_date = dueDate;
|
|
4506
|
+
if (maintenanceRequestId)
|
|
4507
|
+
body.maintenance_request_id = maintenanceRequestId;
|
|
4508
|
+
if (filePath)
|
|
4509
|
+
body.file_path = filePath;
|
|
4510
|
+
if (ocrData && ocrData !== '{}')
|
|
4511
|
+
body.ocr_data = JSON.parse(ocrData);
|
|
4512
|
+
if (notes)
|
|
4513
|
+
body.notes = notes;
|
|
4344
4514
|
responseData = await this.helpers.httpRequest({
|
|
4345
4515
|
method: 'POST',
|
|
4346
|
-
url: `${baseUrl}/api/v1/
|
|
4516
|
+
url: `${baseUrl}/api/v1/contractor-invoices`,
|
|
4347
4517
|
headers: {
|
|
4348
4518
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4349
4519
|
'Accept': 'application/json',
|
|
@@ -4353,11 +4523,23 @@ class AivenceRealty {
|
|
|
4353
4523
|
json: true,
|
|
4354
4524
|
});
|
|
4355
4525
|
}
|
|
4356
|
-
else if (operation === '
|
|
4357
|
-
const
|
|
4526
|
+
else if (operation === 'list') {
|
|
4527
|
+
const contractorFilter = this.getNodeParameter('invoiceContractorFilter', i);
|
|
4528
|
+
const statusFilter = this.getNodeParameter('invoiceStatusFilter', i);
|
|
4529
|
+
const typeFilter = this.getNodeParameter('invoiceTypeFilter', i);
|
|
4530
|
+
let url = `${baseUrl}/api/v1/contractor-invoices`;
|
|
4531
|
+
const params = [];
|
|
4532
|
+
if (contractorFilter)
|
|
4533
|
+
params.push(`contractor_id=${contractorFilter}`);
|
|
4534
|
+
if (statusFilter)
|
|
4535
|
+
params.push(`status=${statusFilter}`);
|
|
4536
|
+
if (typeFilter)
|
|
4537
|
+
params.push(`invoice_type=${typeFilter}`);
|
|
4538
|
+
if (params.length > 0)
|
|
4539
|
+
url += `?${params.join('&')}`;
|
|
4358
4540
|
responseData = await this.helpers.httpRequest({
|
|
4359
4541
|
method: 'GET',
|
|
4360
|
-
url
|
|
4542
|
+
url,
|
|
4361
4543
|
headers: {
|
|
4362
4544
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4363
4545
|
'Accept': 'application/json',
|
|
@@ -4365,11 +4547,11 @@ class AivenceRealty {
|
|
|
4365
4547
|
json: true,
|
|
4366
4548
|
});
|
|
4367
4549
|
}
|
|
4368
|
-
else if (operation === '
|
|
4369
|
-
const
|
|
4550
|
+
else if (operation === 'get') {
|
|
4551
|
+
const invoiceId = this.getNodeParameter('contractorInvoiceId', i);
|
|
4370
4552
|
responseData = await this.helpers.httpRequest({
|
|
4371
4553
|
method: 'GET',
|
|
4372
|
-
url: `${baseUrl}/api/v1/
|
|
4554
|
+
url: `${baseUrl}/api/v1/contractor-invoices/${invoiceId}`,
|
|
4373
4555
|
headers: {
|
|
4374
4556
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4375
4557
|
'Accept': 'application/json',
|
|
@@ -4377,101 +4559,147 @@ class AivenceRealty {
|
|
|
4377
4559
|
json: true,
|
|
4378
4560
|
});
|
|
4379
4561
|
}
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
// DOCUSEAL RESOURCE
|
|
4383
|
-
// ============================================
|
|
4384
|
-
else if (resource === 'docuseal') {
|
|
4385
|
-
if (operation === 'createMandato') {
|
|
4386
|
-
const body = {
|
|
4387
|
-
tipo: this.getNodeParameter('docusealTipo', i),
|
|
4388
|
-
owner_id: this.getNodeParameter('docusealOwnerId', i),
|
|
4389
|
-
property_id: this.getNodeParameter('docusealPropertyId', i) || undefined,
|
|
4390
|
-
duracion_meses: this.getNodeParameter('docusealDuracion', i) || undefined,
|
|
4391
|
-
comision_porcentaje: this.getNodeParameter('docusealComision', i) || undefined,
|
|
4392
|
-
precio_sugerido: this.getNodeParameter('docusealPrecio', i) || undefined,
|
|
4393
|
-
};
|
|
4562
|
+
else if (operation === 'approve') {
|
|
4563
|
+
const invoiceId = this.getNodeParameter('contractorInvoiceId', i);
|
|
4394
4564
|
responseData = await this.helpers.httpRequest({
|
|
4395
4565
|
method: 'POST',
|
|
4396
|
-
url: `${baseUrl}/api/v1/
|
|
4566
|
+
url: `${baseUrl}/api/v1/contractor-invoices/${invoiceId}/approve`,
|
|
4397
4567
|
headers: {
|
|
4398
4568
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4399
4569
|
'Accept': 'application/json',
|
|
4400
4570
|
'Content-Type': 'application/json',
|
|
4401
4571
|
},
|
|
4402
|
-
body,
|
|
4572
|
+
body: {},
|
|
4403
4573
|
json: true,
|
|
4404
4574
|
});
|
|
4405
4575
|
}
|
|
4406
|
-
else if (operation === '
|
|
4407
|
-
const
|
|
4576
|
+
else if (operation === 'reject') {
|
|
4577
|
+
const invoiceId = this.getNodeParameter('contractorInvoiceId', i);
|
|
4578
|
+
const rejectionReason = this.getNodeParameter('invoiceRejectionReason', i);
|
|
4408
4579
|
responseData = await this.helpers.httpRequest({
|
|
4409
|
-
method: '
|
|
4410
|
-
url: `${baseUrl}/api/v1/
|
|
4580
|
+
method: 'POST',
|
|
4581
|
+
url: `${baseUrl}/api/v1/contractor-invoices/${invoiceId}/reject`,
|
|
4411
4582
|
headers: {
|
|
4412
4583
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4413
4584
|
'Accept': 'application/json',
|
|
4585
|
+
'Content-Type': 'application/json',
|
|
4414
4586
|
},
|
|
4587
|
+
body: { rejection_reason: rejectionReason },
|
|
4415
4588
|
json: true,
|
|
4416
4589
|
});
|
|
4417
4590
|
}
|
|
4418
|
-
else if (operation === '
|
|
4591
|
+
else if (operation === 'markPaid') {
|
|
4592
|
+
const invoiceId = this.getNodeParameter('contractorInvoiceId', i);
|
|
4593
|
+
const paymentReference = this.getNodeParameter('invoicePaymentReference', i);
|
|
4594
|
+
const paidAt = this.getNodeParameter('invoicePaidAt', i);
|
|
4595
|
+
const body = {};
|
|
4596
|
+
if (paymentReference)
|
|
4597
|
+
body.payment_reference = paymentReference;
|
|
4598
|
+
if (paidAt)
|
|
4599
|
+
body.paid_at = paidAt;
|
|
4419
4600
|
responseData = await this.helpers.httpRequest({
|
|
4420
|
-
method: '
|
|
4421
|
-
url: `${baseUrl}/api/v1/
|
|
4601
|
+
method: 'POST',
|
|
4602
|
+
url: `${baseUrl}/api/v1/contractor-invoices/${invoiceId}/mark-paid`,
|
|
4422
4603
|
headers: {
|
|
4423
4604
|
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4424
4605
|
'Accept': 'application/json',
|
|
4606
|
+
'Content-Type': 'application/json',
|
|
4425
4607
|
},
|
|
4608
|
+
body,
|
|
4426
4609
|
json: true,
|
|
4427
4610
|
});
|
|
4428
4611
|
}
|
|
4429
|
-
|
|
4612
|
+
}
|
|
4613
|
+
// ============================================
|
|
4614
|
+
// PAYMENT PROOF RESOURCE (V2.3.0)
|
|
4615
|
+
// ============================================
|
|
4616
|
+
else if (resource === 'paymentProof') {
|
|
4617
|
+
if (operation === 'process') {
|
|
4618
|
+
const tenantId = this.getNodeParameter('ppTenantId', i);
|
|
4619
|
+
const ocrData = this.getNodeParameter('ppOcrData', i);
|
|
4620
|
+
const fileUrl = this.getNodeParameter('ppFileUrl', i, '');
|
|
4621
|
+
const body = {
|
|
4622
|
+
tenant_id: tenantId,
|
|
4623
|
+
ocr_data: ocrData,
|
|
4624
|
+
};
|
|
4625
|
+
if (fileUrl)
|
|
4626
|
+
body.file_url = fileUrl;
|
|
4430
4627
|
responseData = await this.helpers.httpRequest({
|
|
4431
|
-
method: '
|
|
4432
|
-
url: `${baseUrl}/api/v1/
|
|
4433
|
-
|
|
4434
|
-
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4435
|
-
'Accept': 'application/json',
|
|
4436
|
-
},
|
|
4628
|
+
method: 'POST',
|
|
4629
|
+
url: `${baseUrl}/api/v1/payments/verify-proof`,
|
|
4630
|
+
body,
|
|
4437
4631
|
json: true,
|
|
4438
4632
|
});
|
|
4439
4633
|
}
|
|
4440
4634
|
}
|
|
4441
4635
|
// ============================================
|
|
4442
|
-
//
|
|
4636
|
+
// AUTOMATION RESOURCE (V2.3.0)
|
|
4443
4637
|
// ============================================
|
|
4444
|
-
else if (resource === '
|
|
4445
|
-
if (operation === '
|
|
4638
|
+
else if (resource === 'automation') {
|
|
4639
|
+
if (operation === 'logExecution') {
|
|
4640
|
+
const workflowName = this.getNodeParameter('autoWorkflowName', i);
|
|
4641
|
+
const executionId = this.getNodeParameter('autoExecutionId', i);
|
|
4642
|
+
const status = this.getNodeParameter('autoStatus', i);
|
|
4643
|
+
const documentType = this.getNodeParameter('autoDocumentType', i, '');
|
|
4644
|
+
const metadata = this.getNodeParameter('autoMetadata', i, '{}');
|
|
4446
4645
|
const body = {
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
urgencia: this.getNodeParameter('marianaUrgencia', i),
|
|
4452
|
-
direccion_propiedad: this.getNodeParameter('marianaDireccion', i) || undefined,
|
|
4453
|
-
tipo_operacion: this.getNodeParameter('marianaOperacion', i) || undefined,
|
|
4646
|
+
workflow_name: workflowName,
|
|
4647
|
+
execution_id: executionId,
|
|
4648
|
+
status,
|
|
4649
|
+
metadata,
|
|
4454
4650
|
};
|
|
4651
|
+
if (documentType)
|
|
4652
|
+
body.document_type = documentType;
|
|
4455
4653
|
responseData = await this.helpers.httpRequest({
|
|
4456
4654
|
method: 'POST',
|
|
4457
|
-
url: `${baseUrl}/api/v1/
|
|
4458
|
-
headers: {
|
|
4459
|
-
'Authorization': `Bearer ${credentials.apiKey}`,
|
|
4460
|
-
'Accept': 'application/json',
|
|
4461
|
-
'Content-Type': 'application/json',
|
|
4462
|
-
},
|
|
4655
|
+
url: `${baseUrl}/api/v1/automation/log`,
|
|
4463
4656
|
body,
|
|
4464
4657
|
json: true,
|
|
4465
4658
|
});
|
|
4466
4659
|
}
|
|
4467
|
-
|
|
4660
|
+
}
|
|
4661
|
+
// ============================================
|
|
4662
|
+
// POLICY RESOURCE (V2.3.0)
|
|
4663
|
+
// ============================================
|
|
4664
|
+
else if (resource === 'policy') {
|
|
4665
|
+
if (operation === 'evaluate') {
|
|
4666
|
+
const policyType = this.getNodeParameter('policyType', i);
|
|
4667
|
+
const amount = this.getNodeParameter('policyAmount', i);
|
|
4668
|
+
const documentData = this.getNodeParameter('policyDocumentData', i);
|
|
4669
|
+
const body = {
|
|
4670
|
+
policy_type: policyType,
|
|
4671
|
+
amount,
|
|
4672
|
+
document_data: documentData,
|
|
4673
|
+
};
|
|
4468
4674
|
responseData = await this.helpers.httpRequest({
|
|
4469
|
-
method: '
|
|
4470
|
-
url: `${baseUrl}/api/v1/
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4675
|
+
method: 'POST',
|
|
4676
|
+
url: `${baseUrl}/api/v1/policies/evaluate`,
|
|
4677
|
+
body,
|
|
4678
|
+
json: true,
|
|
4679
|
+
});
|
|
4680
|
+
}
|
|
4681
|
+
}
|
|
4682
|
+
// ============================================
|
|
4683
|
+
// NOTIFICATION RESOURCE (V2.3.0)
|
|
4684
|
+
// ============================================
|
|
4685
|
+
else if (resource === 'notification') {
|
|
4686
|
+
if (operation === 'send') {
|
|
4687
|
+
const recipientType = this.getNodeParameter('notifRecipientType', i);
|
|
4688
|
+
const recipientId = this.getNodeParameter('notifRecipientId', i);
|
|
4689
|
+
const channel = this.getNodeParameter('notifChannel', i);
|
|
4690
|
+
const templateKey = this.getNodeParameter('notifTemplateKey', i);
|
|
4691
|
+
const variables = this.getNodeParameter('notifVariables', i, '{}');
|
|
4692
|
+
const body = {
|
|
4693
|
+
recipient_type: recipientType,
|
|
4694
|
+
recipient_id: recipientId,
|
|
4695
|
+
channel,
|
|
4696
|
+
template_key: templateKey,
|
|
4697
|
+
variables,
|
|
4698
|
+
};
|
|
4699
|
+
responseData = await this.helpers.httpRequest({
|
|
4700
|
+
method: 'POST',
|
|
4701
|
+
url: `${baseUrl}/api/v1/notifications/send`,
|
|
4702
|
+
body,
|
|
4475
4703
|
json: true,
|
|
4476
4704
|
});
|
|
4477
4705
|
}
|