n8n-nodes-aivencerealtycrm 1.8.5 → 1.8.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.
|
@@ -525,9 +525,15 @@ class AivenceRealty {
|
|
|
525
525
|
{
|
|
526
526
|
name: 'Search',
|
|
527
527
|
value: 'search',
|
|
528
|
-
description: 'Buscar propiedades con filtros avanzados',
|
|
528
|
+
description: 'Buscar propiedades con filtros avanzados (datos públicos)',
|
|
529
529
|
action: 'Buscar propiedades',
|
|
530
530
|
},
|
|
531
|
+
{
|
|
532
|
+
name: 'Search Agent View',
|
|
533
|
+
value: 'searchAgentView',
|
|
534
|
+
description: 'Buscar propiedades con datos privados de agente',
|
|
535
|
+
action: 'Buscar propiedades (agente)',
|
|
536
|
+
},
|
|
531
537
|
{
|
|
532
538
|
name: 'List',
|
|
533
539
|
value: 'list',
|
|
@@ -610,7 +616,7 @@ class AivenceRealty {
|
|
|
610
616
|
displayOptions: {
|
|
611
617
|
show: {
|
|
612
618
|
resource: ['property'],
|
|
613
|
-
operation: ['search'],
|
|
619
|
+
operation: ['search', 'searchAgentView'],
|
|
614
620
|
},
|
|
615
621
|
},
|
|
616
622
|
default: 0,
|
|
@@ -623,7 +629,7 @@ class AivenceRealty {
|
|
|
623
629
|
displayOptions: {
|
|
624
630
|
show: {
|
|
625
631
|
resource: ['property'],
|
|
626
|
-
operation: ['search'],
|
|
632
|
+
operation: ['search', 'searchAgentView'],
|
|
627
633
|
},
|
|
628
634
|
},
|
|
629
635
|
options: [
|
|
@@ -636,28 +642,15 @@ class AivenceRealty {
|
|
|
636
642
|
{
|
|
637
643
|
displayName: 'Tipo de Propiedad',
|
|
638
644
|
name: 'searchTipoPropiedad',
|
|
639
|
-
type: '
|
|
645
|
+
type: 'string',
|
|
640
646
|
displayOptions: {
|
|
641
647
|
show: {
|
|
642
648
|
resource: ['property'],
|
|
643
|
-
operation: ['search'],
|
|
649
|
+
operation: ['search', 'searchAgentView'],
|
|
644
650
|
},
|
|
645
651
|
},
|
|
646
|
-
options: [
|
|
647
|
-
{ name: 'Casa', value: 'casa' },
|
|
648
|
-
{ name: 'Apartamento', value: 'apartamento' },
|
|
649
|
-
{ name: 'Departamento', value: 'apartamento' },
|
|
650
|
-
{ name: 'Duplex', value: 'duplex' },
|
|
651
|
-
{ name: 'PH', value: 'ph' },
|
|
652
|
-
{ name: 'Local Comercial', value: 'local_comercial' },
|
|
653
|
-
{ name: 'Oficina', value: 'oficina' },
|
|
654
|
-
{ name: 'Terreno', value: 'terreno' },
|
|
655
|
-
{ name: 'Bodega', value: 'bodega' },
|
|
656
|
-
{ name: 'Quinta', value: 'quinta' },
|
|
657
|
-
{ name: 'Cochera', value: 'cochera' },
|
|
658
|
-
],
|
|
659
652
|
default: '',
|
|
660
|
-
description: 'Tipo de propiedad a buscar',
|
|
653
|
+
description: 'Tipo de propiedad a buscar. Valores: casa, apartamento, duplex, ph, local_comercial, oficina, terreno, bodega, quinta, cochera. Soporta múltiples valores separados por coma (ej: "apartamento,ph,casa")',
|
|
661
654
|
},
|
|
662
655
|
{
|
|
663
656
|
displayName: 'Zonas (Barrios)',
|
|
@@ -666,7 +659,7 @@ class AivenceRealty {
|
|
|
666
659
|
displayOptions: {
|
|
667
660
|
show: {
|
|
668
661
|
resource: ['property'],
|
|
669
|
-
operation: ['search'],
|
|
662
|
+
operation: ['search', 'searchAgentView'],
|
|
670
663
|
},
|
|
671
664
|
},
|
|
672
665
|
default: '',
|
|
@@ -680,7 +673,7 @@ class AivenceRealty {
|
|
|
680
673
|
displayOptions: {
|
|
681
674
|
show: {
|
|
682
675
|
resource: ['property'],
|
|
683
|
-
operation: ['search'],
|
|
676
|
+
operation: ['search', 'searchAgentView'],
|
|
684
677
|
},
|
|
685
678
|
},
|
|
686
679
|
default: 0,
|
|
@@ -693,7 +686,7 @@ class AivenceRealty {
|
|
|
693
686
|
displayOptions: {
|
|
694
687
|
show: {
|
|
695
688
|
resource: ['property'],
|
|
696
|
-
operation: ['search'],
|
|
689
|
+
operation: ['search', 'searchAgentView'],
|
|
697
690
|
},
|
|
698
691
|
},
|
|
699
692
|
default: 0,
|
|
@@ -706,7 +699,7 @@ class AivenceRealty {
|
|
|
706
699
|
displayOptions: {
|
|
707
700
|
show: {
|
|
708
701
|
resource: ['property'],
|
|
709
|
-
operation: ['search'],
|
|
702
|
+
operation: ['search', 'searchAgentView'],
|
|
710
703
|
},
|
|
711
704
|
},
|
|
712
705
|
default: 0,
|
|
@@ -719,7 +712,7 @@ class AivenceRealty {
|
|
|
719
712
|
displayOptions: {
|
|
720
713
|
show: {
|
|
721
714
|
resource: ['property'],
|
|
722
|
-
operation: ['search'],
|
|
715
|
+
operation: ['search', 'searchAgentView'],
|
|
723
716
|
},
|
|
724
717
|
},
|
|
725
718
|
default: 0,
|
|
@@ -732,7 +725,7 @@ class AivenceRealty {
|
|
|
732
725
|
displayOptions: {
|
|
733
726
|
show: {
|
|
734
727
|
resource: ['property'],
|
|
735
|
-
operation: ['search'],
|
|
728
|
+
operation: ['search', 'searchAgentView'],
|
|
736
729
|
},
|
|
737
730
|
},
|
|
738
731
|
default: 0,
|
|
@@ -745,7 +738,7 @@ class AivenceRealty {
|
|
|
745
738
|
displayOptions: {
|
|
746
739
|
show: {
|
|
747
740
|
resource: ['property'],
|
|
748
|
-
operation: ['search'],
|
|
741
|
+
operation: ['search', 'searchAgentView'],
|
|
749
742
|
},
|
|
750
743
|
},
|
|
751
744
|
default: 0,
|
|
@@ -758,7 +751,7 @@ class AivenceRealty {
|
|
|
758
751
|
displayOptions: {
|
|
759
752
|
show: {
|
|
760
753
|
resource: ['property'],
|
|
761
|
-
operation: ['search'],
|
|
754
|
+
operation: ['search', 'searchAgentView'],
|
|
762
755
|
},
|
|
763
756
|
},
|
|
764
757
|
default: 0,
|
|
@@ -771,7 +764,7 @@ class AivenceRealty {
|
|
|
771
764
|
displayOptions: {
|
|
772
765
|
show: {
|
|
773
766
|
resource: ['property'],
|
|
774
|
-
operation: ['search'],
|
|
767
|
+
operation: ['search', 'searchAgentView'],
|
|
775
768
|
},
|
|
776
769
|
},
|
|
777
770
|
options: [
|
|
@@ -789,7 +782,7 @@ class AivenceRealty {
|
|
|
789
782
|
displayOptions: {
|
|
790
783
|
show: {
|
|
791
784
|
resource: ['property'],
|
|
792
|
-
operation: ['search'],
|
|
785
|
+
operation: ['search', 'searchAgentView'],
|
|
793
786
|
},
|
|
794
787
|
},
|
|
795
788
|
default: 0,
|
|
@@ -802,7 +795,7 @@ class AivenceRealty {
|
|
|
802
795
|
displayOptions: {
|
|
803
796
|
show: {
|
|
804
797
|
resource: ['property'],
|
|
805
|
-
operation: ['search'],
|
|
798
|
+
operation: ['search', 'searchAgentView'],
|
|
806
799
|
},
|
|
807
800
|
},
|
|
808
801
|
default: 0,
|
|
@@ -815,7 +808,7 @@ class AivenceRealty {
|
|
|
815
808
|
displayOptions: {
|
|
816
809
|
show: {
|
|
817
810
|
resource: ['property'],
|
|
818
|
-
operation: ['search'],
|
|
811
|
+
operation: ['search', 'searchAgentView'],
|
|
819
812
|
},
|
|
820
813
|
},
|
|
821
814
|
default: '',
|
|
@@ -1919,6 +1912,90 @@ class AivenceRealty {
|
|
|
1919
1912
|
json: true,
|
|
1920
1913
|
});
|
|
1921
1914
|
}
|
|
1915
|
+
else if (operation === 'searchAgentView') {
|
|
1916
|
+
// ============================================
|
|
1917
|
+
// PROPERTY SEARCH AGENT VIEW - Con datos privados
|
|
1918
|
+
// ============================================
|
|
1919
|
+
const qs = {};
|
|
1920
|
+
// Property ID (búsqueda directa por ID)
|
|
1921
|
+
const propertyId = this.getNodeParameter('searchPropertyId', i, 0);
|
|
1922
|
+
if (propertyId > 0) {
|
|
1923
|
+
qs.id = propertyId;
|
|
1924
|
+
}
|
|
1925
|
+
// Operación -> Estado (Laravel espera "estado": "for_rent" o "for_sale")
|
|
1926
|
+
const operacion = this.getNodeParameter('searchOperacion', i, '');
|
|
1927
|
+
if (operacion && operacion !== 'NULL' && operacion !== '') {
|
|
1928
|
+
qs.estado = operacion;
|
|
1929
|
+
}
|
|
1930
|
+
// Tipo de Propiedad
|
|
1931
|
+
const tipoPropiedad = this.getNodeParameter('searchTipoPropiedad', i, '');
|
|
1932
|
+
if (tipoPropiedad && tipoPropiedad !== '' && tipoPropiedad !== 'NULL') {
|
|
1933
|
+
qs.tipo_propiedad = tipoPropiedad;
|
|
1934
|
+
}
|
|
1935
|
+
// Zonas (barrios) - Smart Zone Logic aplicado desde workflow
|
|
1936
|
+
const zonas = this.getNodeParameter('searchZonas', i, '');
|
|
1937
|
+
if (zonas && zonas !== '' && zonas !== 'NULL' && zonas !== 'null') {
|
|
1938
|
+
qs.barrio = zonas; // Formato: "Núñez, Saavedra, Belgrano"
|
|
1939
|
+
}
|
|
1940
|
+
// Dormitorios
|
|
1941
|
+
const dormitoriosMin = this.getNodeParameter('searchDormitoriosMin', i, 0);
|
|
1942
|
+
if (dormitoriosMin > 0) {
|
|
1943
|
+
qs.dormitorios_minimo = dormitoriosMin;
|
|
1944
|
+
}
|
|
1945
|
+
const dormitoriosMax = this.getNodeParameter('searchDormitoriosMax', i, 0);
|
|
1946
|
+
if (dormitoriosMax > 0) {
|
|
1947
|
+
qs.dormitorios_maximo = dormitoriosMax;
|
|
1948
|
+
}
|
|
1949
|
+
// Baños
|
|
1950
|
+
const banos = this.getNodeParameter('searchBanos', i, 0);
|
|
1951
|
+
if (banos > 0) {
|
|
1952
|
+
qs.banos_minimo = banos;
|
|
1953
|
+
}
|
|
1954
|
+
// Ambientes
|
|
1955
|
+
const ambientesMin = this.getNodeParameter('searchAmbientesMin', i, 0);
|
|
1956
|
+
if (ambientesMin > 0) {
|
|
1957
|
+
qs.ambientes_minimo = ambientesMin;
|
|
1958
|
+
}
|
|
1959
|
+
const ambientesMax = this.getNodeParameter('searchAmbientesMax', i, 0);
|
|
1960
|
+
if (ambientesMax > 0) {
|
|
1961
|
+
qs.ambientes_maximo = ambientesMax;
|
|
1962
|
+
}
|
|
1963
|
+
// Área (Superficie)
|
|
1964
|
+
const areaMin = this.getNodeParameter('searchAreaMin', i, 0);
|
|
1965
|
+
if (areaMin > 0) {
|
|
1966
|
+
qs.area_minima = areaMin;
|
|
1967
|
+
}
|
|
1968
|
+
const areaMax = this.getNodeParameter('searchAreaMax', i, 0);
|
|
1969
|
+
if (areaMax > 0) {
|
|
1970
|
+
qs.area_maxima = areaMax;
|
|
1971
|
+
}
|
|
1972
|
+
// Moneda
|
|
1973
|
+
const moneda = this.getNodeParameter('searchMoneda', i, 'USD');
|
|
1974
|
+
if (moneda && moneda !== '') {
|
|
1975
|
+
qs.moneda = moneda;
|
|
1976
|
+
}
|
|
1977
|
+
// Precio
|
|
1978
|
+
const precioMin = this.getNodeParameter('searchPrecioMin', i, 0);
|
|
1979
|
+
if (precioMin > 0) {
|
|
1980
|
+
qs.precio_minimo = precioMin;
|
|
1981
|
+
}
|
|
1982
|
+
const precioMax = this.getNodeParameter('searchPrecioMax', i, 0);
|
|
1983
|
+
if (precioMax > 0) {
|
|
1984
|
+
qs.precio_maximo = precioMax;
|
|
1985
|
+
}
|
|
1986
|
+
// Amenidades
|
|
1987
|
+
const amenidades = this.getNodeParameter('searchAmenidades', i, '');
|
|
1988
|
+
if (amenidades && amenidades !== '' && amenidades !== 'NULL') {
|
|
1989
|
+
// Convertir string "pileta,balcon,cochera" a array ["pileta", "balcon", "cochera"]
|
|
1990
|
+
qs.amenities = amenidades.split(',').map(a => a.trim()).filter(a => a);
|
|
1991
|
+
}
|
|
1992
|
+
responseData = await this.helpers.httpRequestWithAuthentication.call(this, 'aivenceRealtyApi', {
|
|
1993
|
+
method: 'GET',
|
|
1994
|
+
url: `${baseUrl}/api/v1/propiedades/search/agent`,
|
|
1995
|
+
qs,
|
|
1996
|
+
json: true,
|
|
1997
|
+
});
|
|
1998
|
+
}
|
|
1922
1999
|
else if (operation === 'list') {
|
|
1923
2000
|
responseData = await this.helpers.httpRequest({
|
|
1924
2001
|
method: 'GET',
|