n8n-nodes-aivencerealtycrm 1.8.6 → 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: [
@@ -640,7 +646,7 @@ class AivenceRealty {
640
646
  displayOptions: {
641
647
  show: {
642
648
  resource: ['property'],
643
- operation: ['search'],
649
+ operation: ['search', 'searchAgentView'],
644
650
  },
645
651
  },
646
652
  default: '',
@@ -653,7 +659,7 @@ class AivenceRealty {
653
659
  displayOptions: {
654
660
  show: {
655
661
  resource: ['property'],
656
- operation: ['search'],
662
+ operation: ['search', 'searchAgentView'],
657
663
  },
658
664
  },
659
665
  default: '',
@@ -667,7 +673,7 @@ class AivenceRealty {
667
673
  displayOptions: {
668
674
  show: {
669
675
  resource: ['property'],
670
- operation: ['search'],
676
+ operation: ['search', 'searchAgentView'],
671
677
  },
672
678
  },
673
679
  default: 0,
@@ -680,7 +686,7 @@ class AivenceRealty {
680
686
  displayOptions: {
681
687
  show: {
682
688
  resource: ['property'],
683
- operation: ['search'],
689
+ operation: ['search', 'searchAgentView'],
684
690
  },
685
691
  },
686
692
  default: 0,
@@ -693,7 +699,7 @@ class AivenceRealty {
693
699
  displayOptions: {
694
700
  show: {
695
701
  resource: ['property'],
696
- operation: ['search'],
702
+ operation: ['search', 'searchAgentView'],
697
703
  },
698
704
  },
699
705
  default: 0,
@@ -706,7 +712,7 @@ class AivenceRealty {
706
712
  displayOptions: {
707
713
  show: {
708
714
  resource: ['property'],
709
- operation: ['search'],
715
+ operation: ['search', 'searchAgentView'],
710
716
  },
711
717
  },
712
718
  default: 0,
@@ -719,7 +725,7 @@ class AivenceRealty {
719
725
  displayOptions: {
720
726
  show: {
721
727
  resource: ['property'],
722
- operation: ['search'],
728
+ operation: ['search', 'searchAgentView'],
723
729
  },
724
730
  },
725
731
  default: 0,
@@ -732,7 +738,7 @@ class AivenceRealty {
732
738
  displayOptions: {
733
739
  show: {
734
740
  resource: ['property'],
735
- operation: ['search'],
741
+ operation: ['search', 'searchAgentView'],
736
742
  },
737
743
  },
738
744
  default: 0,
@@ -745,7 +751,7 @@ class AivenceRealty {
745
751
  displayOptions: {
746
752
  show: {
747
753
  resource: ['property'],
748
- operation: ['search'],
754
+ operation: ['search', 'searchAgentView'],
749
755
  },
750
756
  },
751
757
  default: 0,
@@ -758,7 +764,7 @@ class AivenceRealty {
758
764
  displayOptions: {
759
765
  show: {
760
766
  resource: ['property'],
761
- operation: ['search'],
767
+ operation: ['search', 'searchAgentView'],
762
768
  },
763
769
  },
764
770
  options: [
@@ -776,7 +782,7 @@ class AivenceRealty {
776
782
  displayOptions: {
777
783
  show: {
778
784
  resource: ['property'],
779
- operation: ['search'],
785
+ operation: ['search', 'searchAgentView'],
780
786
  },
781
787
  },
782
788
  default: 0,
@@ -789,7 +795,7 @@ class AivenceRealty {
789
795
  displayOptions: {
790
796
  show: {
791
797
  resource: ['property'],
792
- operation: ['search'],
798
+ operation: ['search', 'searchAgentView'],
793
799
  },
794
800
  },
795
801
  default: 0,
@@ -802,7 +808,7 @@ class AivenceRealty {
802
808
  displayOptions: {
803
809
  show: {
804
810
  resource: ['property'],
805
- operation: ['search'],
811
+ operation: ['search', 'searchAgentView'],
806
812
  },
807
813
  },
808
814
  default: '',
@@ -1906,6 +1912,90 @@ class AivenceRealty {
1906
1912
  json: true,
1907
1913
  });
1908
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
+ }
1909
1999
  else if (operation === 'list') {
1910
2000
  responseData = await this.helpers.httpRequest({
1911
2001
  method: 'GET',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-aivencerealtycrm",
3
- "version": "1.8.6",
3
+ "version": "1.8.7",
4
4
  "description": "Nodo n8n para integrar el CRM inmobiliario AivenceRealty",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",