n8n-nodes-aivencerealtycrm 1.9.1 → 2.0.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.
|
@@ -60,6 +60,10 @@ class AivenceRealty {
|
|
|
60
60
|
name: 'Appointment',
|
|
61
61
|
value: 'appointment',
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
name: 'Calculator',
|
|
65
|
+
value: 'calculator',
|
|
66
|
+
},
|
|
63
67
|
],
|
|
64
68
|
default: 'lead',
|
|
65
69
|
description: 'Recurso del CRM a operar',
|
|
@@ -1645,6 +1649,234 @@ class AivenceRealty {
|
|
|
1645
1649
|
default: 'pending',
|
|
1646
1650
|
description: 'Nuevo estado de la cita',
|
|
1647
1651
|
},
|
|
1652
|
+
// ============================================
|
|
1653
|
+
// CALCULATOR OPERATIONS
|
|
1654
|
+
// ============================================
|
|
1655
|
+
{
|
|
1656
|
+
displayName: 'Operación',
|
|
1657
|
+
name: 'operation',
|
|
1658
|
+
type: 'options',
|
|
1659
|
+
noDataExpression: true,
|
|
1660
|
+
displayOptions: {
|
|
1661
|
+
show: {
|
|
1662
|
+
resource: ['calculator'],
|
|
1663
|
+
},
|
|
1664
|
+
},
|
|
1665
|
+
options: [
|
|
1666
|
+
{
|
|
1667
|
+
name: 'Hipoteca Tradicional',
|
|
1668
|
+
value: 'hipoteca_tradicional',
|
|
1669
|
+
description: 'Calcular cuota de crédito hipotecario en pesos',
|
|
1670
|
+
action: 'Calcular hipoteca tradicional',
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
name: 'Hipoteca UVA',
|
|
1674
|
+
value: 'hipoteca_uva',
|
|
1675
|
+
description: 'Calcular crédito UVA con ajuste por inflación',
|
|
1676
|
+
action: 'Calcular hipoteca uva',
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
name: 'Costos Escrituración',
|
|
1680
|
+
value: 'costos_escrituracion',
|
|
1681
|
+
description: 'Calcular gastos de escrituración y transferencia',
|
|
1682
|
+
action: 'Calcular costos escrituracion',
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
name: 'Alquiler vs Compra',
|
|
1686
|
+
value: 'alquiler_vs_compra',
|
|
1687
|
+
description: 'Comparar conveniencia financiera de alquilar o comprar',
|
|
1688
|
+
action: 'Comparar alquiler vs compra',
|
|
1689
|
+
},
|
|
1690
|
+
],
|
|
1691
|
+
default: 'hipoteca_tradicional',
|
|
1692
|
+
},
|
|
1693
|
+
// Precio Propiedad (todos)
|
|
1694
|
+
{
|
|
1695
|
+
displayName: 'Precio Propiedad (ARS)',
|
|
1696
|
+
name: 'property_price',
|
|
1697
|
+
type: 'number',
|
|
1698
|
+
displayOptions: {
|
|
1699
|
+
show: {
|
|
1700
|
+
resource: ['calculator'],
|
|
1701
|
+
operation: ['hipoteca_tradicional', 'hipoteca_uva', 'costos_escrituracion', 'alquiler_vs_compra'],
|
|
1702
|
+
},
|
|
1703
|
+
},
|
|
1704
|
+
default: 80000000,
|
|
1705
|
+
required: true,
|
|
1706
|
+
description: 'Precio de la propiedad en pesos argentinos',
|
|
1707
|
+
},
|
|
1708
|
+
// Anticipo % (hipotecas + alquiler vs compra)
|
|
1709
|
+
{
|
|
1710
|
+
displayName: 'Anticipo (%)',
|
|
1711
|
+
name: 'down_payment_pct',
|
|
1712
|
+
type: 'number',
|
|
1713
|
+
displayOptions: {
|
|
1714
|
+
show: {
|
|
1715
|
+
resource: ['calculator'],
|
|
1716
|
+
operation: ['hipoteca_tradicional', 'hipoteca_uva', 'alquiler_vs_compra'],
|
|
1717
|
+
},
|
|
1718
|
+
},
|
|
1719
|
+
default: 20,
|
|
1720
|
+
description: 'Porcentaje de anticipo (0-100)',
|
|
1721
|
+
},
|
|
1722
|
+
// Tasa Interés (hipotecas + alquiler vs compra)
|
|
1723
|
+
{
|
|
1724
|
+
displayName: 'Tasa Interés Anual (%)',
|
|
1725
|
+
name: 'interest_rate',
|
|
1726
|
+
type: 'number',
|
|
1727
|
+
displayOptions: {
|
|
1728
|
+
show: {
|
|
1729
|
+
resource: ['calculator'],
|
|
1730
|
+
operation: ['hipoteca_tradicional', 'hipoteca_uva', 'alquiler_vs_compra'],
|
|
1731
|
+
},
|
|
1732
|
+
},
|
|
1733
|
+
default: 45,
|
|
1734
|
+
required: true,
|
|
1735
|
+
description: 'Tasa de interés anual (TNA) en porcentaje',
|
|
1736
|
+
},
|
|
1737
|
+
// Plazo años (hipotecas)
|
|
1738
|
+
{
|
|
1739
|
+
displayName: 'Plazo (años)',
|
|
1740
|
+
name: 'loan_term_years',
|
|
1741
|
+
type: 'number',
|
|
1742
|
+
displayOptions: {
|
|
1743
|
+
show: {
|
|
1744
|
+
resource: ['calculator'],
|
|
1745
|
+
operation: ['hipoteca_tradicional', 'hipoteca_uva'],
|
|
1746
|
+
},
|
|
1747
|
+
},
|
|
1748
|
+
default: 20,
|
|
1749
|
+
required: true,
|
|
1750
|
+
description: 'Plazo del préstamo en años',
|
|
1751
|
+
},
|
|
1752
|
+
// Valor UVA (hipoteca UVA)
|
|
1753
|
+
{
|
|
1754
|
+
displayName: 'Valor UVA Actual',
|
|
1755
|
+
name: 'uva_value',
|
|
1756
|
+
type: 'number',
|
|
1757
|
+
displayOptions: {
|
|
1758
|
+
show: {
|
|
1759
|
+
resource: ['calculator'],
|
|
1760
|
+
operation: ['hipoteca_uva'],
|
|
1761
|
+
},
|
|
1762
|
+
},
|
|
1763
|
+
default: 1250,
|
|
1764
|
+
required: true,
|
|
1765
|
+
description: 'Valor actual de la UVA (consultar BCRA)',
|
|
1766
|
+
},
|
|
1767
|
+
// Ajuste CPI (hipoteca UVA)
|
|
1768
|
+
{
|
|
1769
|
+
displayName: 'Ajuste CPI Esperado (%/año)',
|
|
1770
|
+
name: 'cpi_adjustment_pct',
|
|
1771
|
+
type: 'number',
|
|
1772
|
+
displayOptions: {
|
|
1773
|
+
show: {
|
|
1774
|
+
resource: ['calculator'],
|
|
1775
|
+
operation: ['hipoteca_uva'],
|
|
1776
|
+
},
|
|
1777
|
+
},
|
|
1778
|
+
default: 25,
|
|
1779
|
+
description: 'Inflación esperada anual para proyección',
|
|
1780
|
+
},
|
|
1781
|
+
// Tipo de Propiedad (costos escrituración)
|
|
1782
|
+
{
|
|
1783
|
+
displayName: 'Tipo de Propiedad',
|
|
1784
|
+
name: 'property_type',
|
|
1785
|
+
type: 'options',
|
|
1786
|
+
displayOptions: {
|
|
1787
|
+
show: {
|
|
1788
|
+
resource: ['calculator'],
|
|
1789
|
+
operation: ['costos_escrituracion'],
|
|
1790
|
+
},
|
|
1791
|
+
},
|
|
1792
|
+
options: [
|
|
1793
|
+
{
|
|
1794
|
+
name: 'Departamento',
|
|
1795
|
+
value: 'departamento',
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
name: 'Casa',
|
|
1799
|
+
value: 'casa',
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
name: 'Terreno',
|
|
1803
|
+
value: 'terreno',
|
|
1804
|
+
},
|
|
1805
|
+
],
|
|
1806
|
+
default: 'departamento',
|
|
1807
|
+
},
|
|
1808
|
+
// Es Nueva (costos escrituración)
|
|
1809
|
+
{
|
|
1810
|
+
displayName: '¿Es Propiedad Nueva?',
|
|
1811
|
+
name: 'is_new',
|
|
1812
|
+
type: 'boolean',
|
|
1813
|
+
displayOptions: {
|
|
1814
|
+
show: {
|
|
1815
|
+
resource: ['calculator'],
|
|
1816
|
+
operation: ['costos_escrituracion'],
|
|
1817
|
+
},
|
|
1818
|
+
},
|
|
1819
|
+
default: false,
|
|
1820
|
+
description: 'Si es propiedad nueva, algunos impuestos no aplican',
|
|
1821
|
+
},
|
|
1822
|
+
// Alquiler Mensual (alquiler vs compra)
|
|
1823
|
+
{
|
|
1824
|
+
displayName: 'Alquiler Mensual (ARS)',
|
|
1825
|
+
name: 'monthly_rent',
|
|
1826
|
+
type: 'number',
|
|
1827
|
+
displayOptions: {
|
|
1828
|
+
show: {
|
|
1829
|
+
resource: ['calculator'],
|
|
1830
|
+
operation: ['alquiler_vs_compra'],
|
|
1831
|
+
},
|
|
1832
|
+
},
|
|
1833
|
+
default: 500000,
|
|
1834
|
+
required: true,
|
|
1835
|
+
description: 'Alquiler mensual actual',
|
|
1836
|
+
},
|
|
1837
|
+
// Años a Comparar (alquiler vs compra)
|
|
1838
|
+
{
|
|
1839
|
+
displayName: 'Años a Comparar',
|
|
1840
|
+
name: 'years',
|
|
1841
|
+
type: 'number',
|
|
1842
|
+
displayOptions: {
|
|
1843
|
+
show: {
|
|
1844
|
+
resource: ['calculator'],
|
|
1845
|
+
operation: ['alquiler_vs_compra'],
|
|
1846
|
+
},
|
|
1847
|
+
},
|
|
1848
|
+
default: 5,
|
|
1849
|
+
required: true,
|
|
1850
|
+
description: 'Período de análisis en años',
|
|
1851
|
+
},
|
|
1852
|
+
// Apreciación Anual (alquiler vs compra)
|
|
1853
|
+
{
|
|
1854
|
+
displayName: 'Apreciación Anual (%)',
|
|
1855
|
+
name: 'property_appreciation',
|
|
1856
|
+
type: 'number',
|
|
1857
|
+
displayOptions: {
|
|
1858
|
+
show: {
|
|
1859
|
+
resource: ['calculator'],
|
|
1860
|
+
operation: ['alquiler_vs_compra'],
|
|
1861
|
+
},
|
|
1862
|
+
},
|
|
1863
|
+
default: 5,
|
|
1864
|
+
description: 'Valorización esperada de la propiedad por año',
|
|
1865
|
+
},
|
|
1866
|
+
// Aumento Alquiler (alquiler vs compra)
|
|
1867
|
+
{
|
|
1868
|
+
displayName: 'Aumento Alquiler Anual (%)',
|
|
1869
|
+
name: 'rent_increase',
|
|
1870
|
+
type: 'number',
|
|
1871
|
+
displayOptions: {
|
|
1872
|
+
show: {
|
|
1873
|
+
resource: ['calculator'],
|
|
1874
|
+
operation: ['alquiler_vs_compra'],
|
|
1875
|
+
},
|
|
1876
|
+
},
|
|
1877
|
+
default: 40,
|
|
1878
|
+
description: 'Incremento esperado del alquiler por año',
|
|
1879
|
+
},
|
|
1648
1880
|
],
|
|
1649
1881
|
};
|
|
1650
1882
|
}
|
|
@@ -1840,7 +2072,7 @@ class AivenceRealty {
|
|
|
1840
2072
|
// Operación -> Estado (Laravel espera "estado": "for_rent" o "for_sale")
|
|
1841
2073
|
const operacion = this.getNodeParameter('searchOperacion', i, '');
|
|
1842
2074
|
if (operacion && operacion !== 'NULL' && operacion !== '') {
|
|
1843
|
-
qs.
|
|
2075
|
+
qs.estado = operacion;
|
|
1844
2076
|
}
|
|
1845
2077
|
// Tipo de Propiedad
|
|
1846
2078
|
const tipoPropiedad = this.getNodeParameter('searchTipoPropiedad', i, '');
|
|
@@ -1850,7 +2082,7 @@ class AivenceRealty {
|
|
|
1850
2082
|
// Zonas (barrios) - Smart Zone Logic aplicado desde workflow
|
|
1851
2083
|
const zonas = this.getNodeParameter('searchZonas', i, '');
|
|
1852
2084
|
if (zonas && zonas !== '' && zonas !== 'NULL' && zonas !== 'null') {
|
|
1853
|
-
qs.
|
|
2085
|
+
qs.barrio = zonas; // Formato: "Núñez, Saavedra, Belgrano"
|
|
1854
2086
|
}
|
|
1855
2087
|
// Dormitorios
|
|
1856
2088
|
const dormitoriosMin = this.getNodeParameter('searchDormitoriosMin', i, 0);
|
|
@@ -1925,7 +2157,7 @@ class AivenceRealty {
|
|
|
1925
2157
|
// Operación -> Estado (Laravel espera "estado": "for_rent" o "for_sale")
|
|
1926
2158
|
const operacion = this.getNodeParameter('searchOperacion', i, '');
|
|
1927
2159
|
if (operacion && operacion !== 'NULL' && operacion !== '') {
|
|
1928
|
-
qs.
|
|
2160
|
+
qs.estado = operacion;
|
|
1929
2161
|
}
|
|
1930
2162
|
// Tipo de Propiedad
|
|
1931
2163
|
const tipoPropiedad = this.getNodeParameter('searchTipoPropiedad', i, '');
|
|
@@ -1935,7 +2167,7 @@ class AivenceRealty {
|
|
|
1935
2167
|
// Zonas (barrios) - Smart Zone Logic aplicado desde workflow
|
|
1936
2168
|
const zonas = this.getNodeParameter('searchZonas', i, '');
|
|
1937
2169
|
if (zonas && zonas !== '' && zonas !== 'NULL' && zonas !== 'null') {
|
|
1938
|
-
qs.
|
|
2170
|
+
qs.barrio = zonas; // Formato: "Núñez, Saavedra, Belgrano"
|
|
1939
2171
|
}
|
|
1940
2172
|
// Dormitorios
|
|
1941
2173
|
const dormitoriosMin = this.getNodeParameter('searchDormitoriosMin', i, 0);
|
|
@@ -2359,6 +2591,60 @@ class AivenceRealty {
|
|
|
2359
2591
|
});
|
|
2360
2592
|
}
|
|
2361
2593
|
}
|
|
2594
|
+
// ============================================
|
|
2595
|
+
// CALCULATOR RESOURCE
|
|
2596
|
+
// ============================================
|
|
2597
|
+
else if (resource === 'calculator') {
|
|
2598
|
+
const operation = this.getNodeParameter('operation', i);
|
|
2599
|
+
let body = {};
|
|
2600
|
+
let endpoint = '';
|
|
2601
|
+
if (operation === 'hipoteca_tradicional') {
|
|
2602
|
+
endpoint = '/api/v1/calculadoras/hipoteca-tradicional';
|
|
2603
|
+
body = {
|
|
2604
|
+
property_price: this.getNodeParameter('property_price', i),
|
|
2605
|
+
down_payment_pct: this.getNodeParameter('down_payment_pct', i),
|
|
2606
|
+
interest_rate: this.getNodeParameter('interest_rate', i),
|
|
2607
|
+
loan_term_years: this.getNodeParameter('loan_term_years', i),
|
|
2608
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
else if (operation === 'hipoteca_uva') {
|
|
2611
|
+
endpoint = '/api/v1/calculadoras/hipoteca-uva';
|
|
2612
|
+
body = {
|
|
2613
|
+
property_price: this.getNodeParameter('property_price', i),
|
|
2614
|
+
down_payment_pct: this.getNodeParameter('down_payment_pct', i),
|
|
2615
|
+
interest_rate: this.getNodeParameter('interest_rate', i),
|
|
2616
|
+
loan_term_years: this.getNodeParameter('loan_term_years', i),
|
|
2617
|
+
uva_value: this.getNodeParameter('uva_value', i),
|
|
2618
|
+
cpi_adjustment_pct: this.getNodeParameter('cpi_adjustment_pct', i),
|
|
2619
|
+
};
|
|
2620
|
+
}
|
|
2621
|
+
else if (operation === 'costos_escrituracion') {
|
|
2622
|
+
endpoint = '/api/v1/calculadoras/costos-escrituracion';
|
|
2623
|
+
body = {
|
|
2624
|
+
property_price: this.getNodeParameter('property_price', i),
|
|
2625
|
+
property_type: this.getNodeParameter('property_type', i),
|
|
2626
|
+
is_new: this.getNodeParameter('is_new', i),
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
else if (operation === 'alquiler_vs_compra') {
|
|
2630
|
+
endpoint = '/api/v1/calculadoras/alquiler-vs-compra';
|
|
2631
|
+
body = {
|
|
2632
|
+
property_price: this.getNodeParameter('property_price', i),
|
|
2633
|
+
monthly_rent: this.getNodeParameter('monthly_rent', i),
|
|
2634
|
+
years: this.getNodeParameter('years', i),
|
|
2635
|
+
down_payment_pct: this.getNodeParameter('down_payment_pct', i),
|
|
2636
|
+
mortgage_rate: this.getNodeParameter('interest_rate', i),
|
|
2637
|
+
property_appreciation: this.getNodeParameter('property_appreciation', i),
|
|
2638
|
+
rent_increase: this.getNodeParameter('rent_increase', i),
|
|
2639
|
+
};
|
|
2640
|
+
}
|
|
2641
|
+
responseData = await this.helpers.httpRequest({
|
|
2642
|
+
method: 'POST',
|
|
2643
|
+
url: `${baseUrl}${endpoint}`,
|
|
2644
|
+
body,
|
|
2645
|
+
json: true,
|
|
2646
|
+
});
|
|
2647
|
+
}
|
|
2362
2648
|
// Formatear respuesta
|
|
2363
2649
|
const executionData = this.helpers.constructExecutionMetaData(this.helpers.returnJsonArray(responseData), { itemData: { item: i } });
|
|
2364
2650
|
returnData.push(...executionData);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-aivencerealtycrm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Nodo n8n para integrar el CRM inmobiliario AivenceRealty",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
"Real Estate",
|
|
11
11
|
"Inmobiliario",
|
|
12
12
|
"Property Management",
|
|
13
|
-
"API Integration"
|
|
13
|
+
"API Integration",
|
|
14
|
+
"Calculator",
|
|
15
|
+
"Mortgage",
|
|
16
|
+
"Argentina"
|
|
14
17
|
],
|
|
15
18
|
"license": "MIT",
|
|
16
19
|
"homepage": "https://realty.aivence.com",
|