n8n-nodes-aivencerealtycrm 1.0.8 → 1.0.9

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.
@@ -40,10 +40,6 @@ class AivenceRealty {
40
40
  name: 'Property',
41
41
  value: 'property',
42
42
  },
43
- {
44
- name: 'Email',
45
- value: 'email',
46
- },
47
43
  {
48
44
  name: 'Maintenance Request',
49
45
  value: 'maintenanceRequest',
@@ -53,8 +49,8 @@ class AivenceRealty {
53
49
  value: 'contractor',
54
50
  },
55
51
  {
56
- name: 'Maintenance Cost',
57
- value: 'maintenanceCost',
52
+ name: 'Tenant',
53
+ value: 'tenant',
58
54
  },
59
55
  {
60
56
  name: 'Appointment',
@@ -540,6 +536,24 @@ class AivenceRealty {
540
536
  description: 'Vista de agente (búsqueda avanzada)',
541
537
  action: 'Vista de agente',
542
538
  },
539
+ {
540
+ name: 'Get Similar',
541
+ value: 'getSimilar',
542
+ description: 'Obtener propiedades similares',
543
+ action: 'Obtener similares',
544
+ },
545
+ {
546
+ name: 'Natural Search',
547
+ value: 'naturalSearch',
548
+ description: 'Búsqueda con IA usando lenguaje natural',
549
+ action: 'Búsqueda natural',
550
+ },
551
+ {
552
+ name: 'Get Statistics',
553
+ value: 'statistics',
554
+ description: 'Obtener estadísticas de propiedades',
555
+ action: 'Obtener estadísticas',
556
+ },
543
557
  ],
544
558
  default: 'list',
545
559
  },
@@ -552,47 +566,29 @@ class AivenceRealty {
552
566
  displayOptions: {
553
567
  show: {
554
568
  resource: ['property'],
555
- operation: ['get', 'getAgentView'],
569
+ operation: ['get', 'getAgentView', 'getSimilar'],
556
570
  },
557
571
  },
558
572
  default: '',
559
573
  description: 'ID de la propiedad',
560
574
  },
561
- // ============================================
562
- // EMAIL OPERATIONS
563
- // ============================================
575
+ // Natural Search Query
564
576
  {
565
- displayName: 'Operación',
566
- name: 'operation',
567
- type: 'options',
568
- noDataExpression: true,
569
- displayOptions: {
570
- show: {
571
- resource: ['email'],
572
- },
577
+ displayName: 'Search Query',
578
+ name: 'naturalSearchQuery',
579
+ type: 'string',
580
+ required: true,
581
+ typeOptions: {
582
+ rows: 3,
573
583
  },
574
- options: [
575
- {
576
- name: 'Ingest',
577
- value: 'ingest',
578
- description: 'Ingestar email al CRM',
579
- action: 'Ingestar email',
580
- },
581
- ],
582
- default: 'ingest',
583
- },
584
- {
585
- displayName: 'Usar datos del nodo anterior',
586
- name: 'useJsonInput',
587
- type: 'boolean',
588
584
  displayOptions: {
589
585
  show: {
590
- resource: ['email'],
591
- operation: ['ingest'],
586
+ resource: ['property'],
587
+ operation: ['naturalSearch'],
592
588
  },
593
589
  },
594
- default: true,
595
- description: 'Si está activado, usará el JSON completo del nodo anterior',
590
+ default: '',
591
+ description: 'Búsqueda en lenguaje natural (ej: "Busco un apartamento de 3 dormitorios en Palermo con balcón")',
596
592
  },
597
593
  // ============================================
598
594
  // MAINTENANCE REQUEST OPERATIONS
@@ -638,6 +634,12 @@ class AivenceRealty {
638
634
  description: 'Agregar mensaje a solicitud',
639
635
  action: 'Agregar mensaje',
640
636
  },
637
+ {
638
+ name: 'Assign Contractor',
639
+ value: 'assignContractor',
640
+ description: 'Asignar contratista a solicitud',
641
+ action: 'Asignar contratista',
642
+ },
641
643
  ],
642
644
  default: 'list',
643
645
  },
@@ -650,12 +652,27 @@ class AivenceRealty {
650
652
  displayOptions: {
651
653
  show: {
652
654
  resource: ['maintenanceRequest'],
653
- operation: ['get', 'update', 'addMessage'],
655
+ operation: ['get', 'update', 'addMessage', 'assignContractor'],
654
656
  },
655
657
  },
656
658
  default: '',
657
659
  description: 'ID de la solicitud',
658
660
  },
661
+ // Contractor ID para assignContractor
662
+ {
663
+ displayName: 'Contractor ID',
664
+ name: 'contractorId',
665
+ type: 'string',
666
+ required: true,
667
+ displayOptions: {
668
+ show: {
669
+ resource: ['maintenanceRequest'],
670
+ operation: ['assignContractor'],
671
+ },
672
+ },
673
+ default: '',
674
+ description: 'ID del contratista a asignar',
675
+ },
659
676
  {
660
677
  displayName: 'Usar datos del nodo anterior',
661
678
  name: 'useJsonInput',
@@ -689,6 +706,18 @@ class AivenceRealty {
689
706
  description: 'Listar contractors',
690
707
  action: 'Listar contractors',
691
708
  },
709
+ {
710
+ name: 'Get',
711
+ value: 'get',
712
+ description: 'Obtener contractor por ID',
713
+ action: 'Obtener contractor',
714
+ },
715
+ {
716
+ name: 'Create',
717
+ value: 'create',
718
+ description: 'Crear contractor',
719
+ action: 'Crear contractor',
720
+ },
692
721
  {
693
722
  name: 'Get Next Available',
694
723
  value: 'getNextAvailable',
@@ -698,8 +727,37 @@ class AivenceRealty {
698
727
  ],
699
728
  default: 'list',
700
729
  },
730
+ // Contractor ID
731
+ {
732
+ displayName: 'Contractor ID',
733
+ name: 'contractorId',
734
+ type: 'string',
735
+ required: true,
736
+ displayOptions: {
737
+ show: {
738
+ resource: ['contractor'],
739
+ operation: ['get'],
740
+ },
741
+ },
742
+ default: '',
743
+ description: 'ID del contractor',
744
+ },
745
+ // Contractor Create: JSON from previous node
746
+ {
747
+ displayName: 'Usar datos del nodo anterior',
748
+ name: 'useJsonInput',
749
+ type: 'boolean',
750
+ displayOptions: {
751
+ show: {
752
+ resource: ['contractor'],
753
+ operation: ['create'],
754
+ },
755
+ },
756
+ default: true,
757
+ description: 'Si está activado, usará el JSON completo del nodo anterior con campos: name, email, phone, specialties, rating, availability',
758
+ },
701
759
  // ============================================
702
- // MAINTENANCE COST OPERATIONS
760
+ // TENANT OPERATIONS
703
761
  // ============================================
704
762
  {
705
763
  displayName: 'Operación',
@@ -708,31 +766,59 @@ class AivenceRealty {
708
766
  noDataExpression: true,
709
767
  displayOptions: {
710
768
  show: {
711
- resource: ['maintenanceCost'],
769
+ resource: ['tenant'],
712
770
  },
713
771
  },
714
772
  options: [
773
+ {
774
+ name: 'List',
775
+ value: 'list',
776
+ description: 'Listar inquilinos',
777
+ action: 'Listar inquilinos',
778
+ },
779
+ {
780
+ name: 'Get',
781
+ value: 'get',
782
+ description: 'Obtener inquilino por ID',
783
+ action: 'Obtener inquilino',
784
+ },
715
785
  {
716
786
  name: 'Create',
717
787
  value: 'create',
718
- description: 'Crear costo de mantenimiento',
719
- action: 'Crear costo',
788
+ description: 'Crear inquilino',
789
+ action: 'Crear inquilino',
720
790
  },
721
791
  ],
722
- default: 'create',
792
+ default: 'list',
723
793
  },
794
+ // Tenant ID
795
+ {
796
+ displayName: 'Tenant ID',
797
+ name: 'tenantId',
798
+ type: 'string',
799
+ required: true,
800
+ displayOptions: {
801
+ show: {
802
+ resource: ['tenant'],
803
+ operation: ['get'],
804
+ },
805
+ },
806
+ default: '',
807
+ description: 'ID del inquilino',
808
+ },
809
+ // Tenant Create: JSON from previous node
724
810
  {
725
811
  displayName: 'Usar datos del nodo anterior',
726
812
  name: 'useJsonInput',
727
813
  type: 'boolean',
728
814
  displayOptions: {
729
815
  show: {
730
- resource: ['maintenanceCost'],
816
+ resource: ['tenant'],
731
817
  operation: ['create'],
732
818
  },
733
819
  },
734
820
  default: true,
735
- description: 'Si está activado, usará el JSON completo del nodo anterior',
821
+ description: 'Si está activado, usará el JSON completo del nodo anterior con campos: name, email, phone, property_id, lease_start, lease_end, monthly_rent',
736
822
  },
737
823
  // ============================================
738
824
  // APPOINTMENT OPERATIONS
@@ -1047,18 +1133,27 @@ class AivenceRealty {
1047
1133
  json: true,
1048
1134
  });
1049
1135
  }
1050
- }
1051
- // ============================================
1052
- // EMAIL RESOURCE
1053
- // ============================================
1054
- else if (resource === 'email') {
1055
- if (operation === 'ingest') {
1056
- const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
1057
- const body = useJsonInput ? items[i].json : {};
1136
+ else if (operation === 'getSimilar') {
1137
+ const propertyId = this.getNodeParameter('propertyId', i);
1138
+ responseData = await this.helpers.httpRequest({
1139
+ method: 'GET',
1140
+ url: `${baseUrl}/api/v1/propiedades/${propertyId}/similares`,
1141
+ json: true,
1142
+ });
1143
+ }
1144
+ else if (operation === 'naturalSearch') {
1145
+ const query = this.getNodeParameter('naturalSearchQuery', i);
1058
1146
  responseData = await this.helpers.httpRequest({
1059
1147
  method: 'POST',
1060
- url: `${baseUrl}/api/v1/emails/ingest`,
1061
- body,
1148
+ url: `${baseUrl}/api/v1/propiedades/busqueda/natural`,
1149
+ body: { query },
1150
+ json: true,
1151
+ });
1152
+ }
1153
+ else if (operation === 'statistics') {
1154
+ responseData = await this.helpers.httpRequest({
1155
+ method: 'GET',
1156
+ url: `${baseUrl}/api/v1/propiedades/estadisticas`,
1062
1157
  json: true,
1063
1158
  });
1064
1159
  }
@@ -1114,6 +1209,16 @@ class AivenceRealty {
1114
1209
  json: true,
1115
1210
  });
1116
1211
  }
1212
+ else if (operation === 'assignContractor') {
1213
+ const requestId = this.getNodeParameter('requestId', i);
1214
+ const contractorId = this.getNodeParameter('contractorId', i);
1215
+ responseData = await this.helpers.httpRequest({
1216
+ method: 'POST',
1217
+ url: `${baseUrl}/api/v1/solicitudes-mantenimiento/${requestId}/asignar-contratista`,
1218
+ body: { contractor_id: contractorId },
1219
+ json: true,
1220
+ });
1221
+ }
1117
1222
  }
1118
1223
  // ============================================
1119
1224
  // CONTRACTOR RESOURCE
@@ -1122,7 +1227,25 @@ class AivenceRealty {
1122
1227
  if (operation === 'list') {
1123
1228
  responseData = await this.helpers.httpRequest({
1124
1229
  method: 'GET',
1125
- url: `${baseUrl}/api/contractors`,
1230
+ url: `${baseUrl}/api/v1/contratistas`,
1231
+ json: true,
1232
+ });
1233
+ }
1234
+ else if (operation === 'get') {
1235
+ const contractorId = this.getNodeParameter('contractorId', i);
1236
+ responseData = await this.helpers.httpRequest({
1237
+ method: 'GET',
1238
+ url: `${baseUrl}/api/v1/contratistas/${contractorId}`,
1239
+ json: true,
1240
+ });
1241
+ }
1242
+ else if (operation === 'create') {
1243
+ const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
1244
+ const body = useJsonInput ? items[i].json : {};
1245
+ responseData = await this.helpers.httpRequest({
1246
+ method: 'POST',
1247
+ url: `${baseUrl}/api/v1/contratistas`,
1248
+ body,
1126
1249
  json: true,
1127
1250
  });
1128
1251
  }
@@ -1135,15 +1258,30 @@ class AivenceRealty {
1135
1258
  }
1136
1259
  }
1137
1260
  // ============================================
1138
- // MAINTENANCE COST RESOURCE
1261
+ // TENANT RESOURCE
1139
1262
  // ============================================
1140
- else if (resource === 'maintenanceCost') {
1141
- if (operation === 'create') {
1263
+ else if (resource === 'tenant') {
1264
+ if (operation === 'list') {
1265
+ responseData = await this.helpers.httpRequest({
1266
+ method: 'GET',
1267
+ url: `${baseUrl}/api/v1/inquilinos`,
1268
+ json: true,
1269
+ });
1270
+ }
1271
+ else if (operation === 'get') {
1272
+ const tenantId = this.getNodeParameter('tenantId', i);
1273
+ responseData = await this.helpers.httpRequest({
1274
+ method: 'GET',
1275
+ url: `${baseUrl}/api/v1/inquilinos/${tenantId}`,
1276
+ json: true,
1277
+ });
1278
+ }
1279
+ else if (operation === 'create') {
1142
1280
  const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
1143
1281
  const body = useJsonInput ? items[i].json : {};
1144
1282
  responseData = await this.helpers.httpRequest({
1145
1283
  method: 'POST',
1146
- url: `${baseUrl}/api/maintenance-costs`,
1284
+ url: `${baseUrl}/api/v1/inquilinos`,
1147
1285
  body,
1148
1286
  json: true,
1149
1287
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-aivencerealtycrm",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Nodo n8n para integrar el CRM inmobiliario AivenceRealty",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",