n8n-nodes-aivencerealtycrm 1.0.8 → 1.0.10
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.
|
@@ -53,8 +53,8 @@ class AivenceRealty {
|
|
|
53
53
|
value: 'contractor',
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
name: '
|
|
57
|
-
value: '
|
|
56
|
+
name: 'Tenant',
|
|
57
|
+
value: 'tenant',
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
name: 'Appointment',
|
|
@@ -540,6 +540,24 @@ class AivenceRealty {
|
|
|
540
540
|
description: 'Vista de agente (búsqueda avanzada)',
|
|
541
541
|
action: 'Vista de agente',
|
|
542
542
|
},
|
|
543
|
+
{
|
|
544
|
+
name: 'Get Similar',
|
|
545
|
+
value: 'getSimilar',
|
|
546
|
+
description: 'Obtener propiedades similares',
|
|
547
|
+
action: 'Obtener similares',
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: 'Natural Search',
|
|
551
|
+
value: 'naturalSearch',
|
|
552
|
+
description: 'Búsqueda con IA usando lenguaje natural',
|
|
553
|
+
action: 'Búsqueda natural',
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
name: 'Get Statistics',
|
|
557
|
+
value: 'statistics',
|
|
558
|
+
description: 'Obtener estadísticas de propiedades',
|
|
559
|
+
action: 'Obtener estadísticas',
|
|
560
|
+
},
|
|
543
561
|
],
|
|
544
562
|
default: 'list',
|
|
545
563
|
},
|
|
@@ -552,12 +570,30 @@ class AivenceRealty {
|
|
|
552
570
|
displayOptions: {
|
|
553
571
|
show: {
|
|
554
572
|
resource: ['property'],
|
|
555
|
-
operation: ['get', 'getAgentView'],
|
|
573
|
+
operation: ['get', 'getAgentView', 'getSimilar'],
|
|
556
574
|
},
|
|
557
575
|
},
|
|
558
576
|
default: '',
|
|
559
577
|
description: 'ID de la propiedad',
|
|
560
578
|
},
|
|
579
|
+
// Natural Search Query
|
|
580
|
+
{
|
|
581
|
+
displayName: 'Search Query',
|
|
582
|
+
name: 'naturalSearchQuery',
|
|
583
|
+
type: 'string',
|
|
584
|
+
required: true,
|
|
585
|
+
typeOptions: {
|
|
586
|
+
rows: 3,
|
|
587
|
+
},
|
|
588
|
+
displayOptions: {
|
|
589
|
+
show: {
|
|
590
|
+
resource: ['property'],
|
|
591
|
+
operation: ['naturalSearch'],
|
|
592
|
+
},
|
|
593
|
+
},
|
|
594
|
+
default: '',
|
|
595
|
+
description: 'Búsqueda en lenguaje natural (ej: "Busco un apartamento de 3 dormitorios en Palermo con balcón")',
|
|
596
|
+
},
|
|
561
597
|
// ============================================
|
|
562
598
|
// EMAIL OPERATIONS
|
|
563
599
|
// ============================================
|
|
@@ -575,12 +611,58 @@ class AivenceRealty {
|
|
|
575
611
|
{
|
|
576
612
|
name: 'Ingest',
|
|
577
613
|
value: 'ingest',
|
|
578
|
-
description: 'Ingestar email
|
|
614
|
+
description: 'Ingestar email clasificado desde N8N',
|
|
579
615
|
action: 'Ingestar email',
|
|
580
616
|
},
|
|
617
|
+
{
|
|
618
|
+
name: 'List',
|
|
619
|
+
value: 'list',
|
|
620
|
+
description: 'Listar emails con filtros',
|
|
621
|
+
action: 'Listar emails',
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: 'Get',
|
|
625
|
+
value: 'get',
|
|
626
|
+
description: 'Obtener email por ID',
|
|
627
|
+
action: 'Obtener email',
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
name: 'Reply',
|
|
631
|
+
value: 'reply',
|
|
632
|
+
description: 'Enviar respuesta a un email',
|
|
633
|
+
action: 'Responder email',
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
name: 'Regenerate AI',
|
|
637
|
+
value: 'regenerateAi',
|
|
638
|
+
description: 'Regenerar respuesta IA con Gemini',
|
|
639
|
+
action: 'Regenerar IA',
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: 'Mark as Read',
|
|
643
|
+
value: 'markAsRead',
|
|
644
|
+
description: 'Marcar email como leído',
|
|
645
|
+
action: 'Marcar como leído',
|
|
646
|
+
},
|
|
581
647
|
],
|
|
582
648
|
default: 'ingest',
|
|
583
649
|
},
|
|
650
|
+
// Email ID para get, reply, regenerateAi, markAsRead
|
|
651
|
+
{
|
|
652
|
+
displayName: 'Email ID',
|
|
653
|
+
name: 'emailId',
|
|
654
|
+
type: 'string',
|
|
655
|
+
required: true,
|
|
656
|
+
displayOptions: {
|
|
657
|
+
show: {
|
|
658
|
+
resource: ['email'],
|
|
659
|
+
operation: ['get', 'reply', 'regenerateAi', 'markAsRead'],
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
default: '',
|
|
663
|
+
description: 'ID del email',
|
|
664
|
+
},
|
|
665
|
+
// Email Ingest: JSON from previous node
|
|
584
666
|
{
|
|
585
667
|
displayName: 'Usar datos del nodo anterior',
|
|
586
668
|
name: 'useJsonInput',
|
|
@@ -588,7 +670,7 @@ class AivenceRealty {
|
|
|
588
670
|
displayOptions: {
|
|
589
671
|
show: {
|
|
590
672
|
resource: ['email'],
|
|
591
|
-
operation: ['ingest'],
|
|
673
|
+
operation: ['ingest', 'reply'],
|
|
592
674
|
},
|
|
593
675
|
},
|
|
594
676
|
default: true,
|
|
@@ -638,6 +720,12 @@ class AivenceRealty {
|
|
|
638
720
|
description: 'Agregar mensaje a solicitud',
|
|
639
721
|
action: 'Agregar mensaje',
|
|
640
722
|
},
|
|
723
|
+
{
|
|
724
|
+
name: 'Assign Contractor',
|
|
725
|
+
value: 'assignContractor',
|
|
726
|
+
description: 'Asignar contratista a solicitud',
|
|
727
|
+
action: 'Asignar contratista',
|
|
728
|
+
},
|
|
641
729
|
],
|
|
642
730
|
default: 'list',
|
|
643
731
|
},
|
|
@@ -650,12 +738,27 @@ class AivenceRealty {
|
|
|
650
738
|
displayOptions: {
|
|
651
739
|
show: {
|
|
652
740
|
resource: ['maintenanceRequest'],
|
|
653
|
-
operation: ['get', 'update', 'addMessage'],
|
|
741
|
+
operation: ['get', 'update', 'addMessage', 'assignContractor'],
|
|
654
742
|
},
|
|
655
743
|
},
|
|
656
744
|
default: '',
|
|
657
745
|
description: 'ID de la solicitud',
|
|
658
746
|
},
|
|
747
|
+
// Contractor ID para assignContractor
|
|
748
|
+
{
|
|
749
|
+
displayName: 'Contractor ID',
|
|
750
|
+
name: 'contractorId',
|
|
751
|
+
type: 'string',
|
|
752
|
+
required: true,
|
|
753
|
+
displayOptions: {
|
|
754
|
+
show: {
|
|
755
|
+
resource: ['maintenanceRequest'],
|
|
756
|
+
operation: ['assignContractor'],
|
|
757
|
+
},
|
|
758
|
+
},
|
|
759
|
+
default: '',
|
|
760
|
+
description: 'ID del contratista a asignar',
|
|
761
|
+
},
|
|
659
762
|
{
|
|
660
763
|
displayName: 'Usar datos del nodo anterior',
|
|
661
764
|
name: 'useJsonInput',
|
|
@@ -689,6 +792,18 @@ class AivenceRealty {
|
|
|
689
792
|
description: 'Listar contractors',
|
|
690
793
|
action: 'Listar contractors',
|
|
691
794
|
},
|
|
795
|
+
{
|
|
796
|
+
name: 'Get',
|
|
797
|
+
value: 'get',
|
|
798
|
+
description: 'Obtener contractor por ID',
|
|
799
|
+
action: 'Obtener contractor',
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
name: 'Create',
|
|
803
|
+
value: 'create',
|
|
804
|
+
description: 'Crear contractor',
|
|
805
|
+
action: 'Crear contractor',
|
|
806
|
+
},
|
|
692
807
|
{
|
|
693
808
|
name: 'Get Next Available',
|
|
694
809
|
value: 'getNextAvailable',
|
|
@@ -698,8 +813,37 @@ class AivenceRealty {
|
|
|
698
813
|
],
|
|
699
814
|
default: 'list',
|
|
700
815
|
},
|
|
816
|
+
// Contractor ID
|
|
817
|
+
{
|
|
818
|
+
displayName: 'Contractor ID',
|
|
819
|
+
name: 'contractorId',
|
|
820
|
+
type: 'string',
|
|
821
|
+
required: true,
|
|
822
|
+
displayOptions: {
|
|
823
|
+
show: {
|
|
824
|
+
resource: ['contractor'],
|
|
825
|
+
operation: ['get'],
|
|
826
|
+
},
|
|
827
|
+
},
|
|
828
|
+
default: '',
|
|
829
|
+
description: 'ID del contractor',
|
|
830
|
+
},
|
|
831
|
+
// Contractor Create: JSON from previous node
|
|
832
|
+
{
|
|
833
|
+
displayName: 'Usar datos del nodo anterior',
|
|
834
|
+
name: 'useJsonInput',
|
|
835
|
+
type: 'boolean',
|
|
836
|
+
displayOptions: {
|
|
837
|
+
show: {
|
|
838
|
+
resource: ['contractor'],
|
|
839
|
+
operation: ['create'],
|
|
840
|
+
},
|
|
841
|
+
},
|
|
842
|
+
default: true,
|
|
843
|
+
description: 'Si está activado, usará el JSON completo del nodo anterior con campos: name, email, phone, specialties, rating, availability',
|
|
844
|
+
},
|
|
701
845
|
// ============================================
|
|
702
|
-
//
|
|
846
|
+
// TENANT OPERATIONS
|
|
703
847
|
// ============================================
|
|
704
848
|
{
|
|
705
849
|
displayName: 'Operación',
|
|
@@ -708,31 +852,59 @@ class AivenceRealty {
|
|
|
708
852
|
noDataExpression: true,
|
|
709
853
|
displayOptions: {
|
|
710
854
|
show: {
|
|
711
|
-
resource: ['
|
|
855
|
+
resource: ['tenant'],
|
|
712
856
|
},
|
|
713
857
|
},
|
|
714
858
|
options: [
|
|
859
|
+
{
|
|
860
|
+
name: 'List',
|
|
861
|
+
value: 'list',
|
|
862
|
+
description: 'Listar inquilinos',
|
|
863
|
+
action: 'Listar inquilinos',
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: 'Get',
|
|
867
|
+
value: 'get',
|
|
868
|
+
description: 'Obtener inquilino por ID',
|
|
869
|
+
action: 'Obtener inquilino',
|
|
870
|
+
},
|
|
715
871
|
{
|
|
716
872
|
name: 'Create',
|
|
717
873
|
value: 'create',
|
|
718
|
-
description: 'Crear
|
|
719
|
-
action: 'Crear
|
|
874
|
+
description: 'Crear inquilino',
|
|
875
|
+
action: 'Crear inquilino',
|
|
720
876
|
},
|
|
721
877
|
],
|
|
722
|
-
default: '
|
|
878
|
+
default: 'list',
|
|
879
|
+
},
|
|
880
|
+
// Tenant ID
|
|
881
|
+
{
|
|
882
|
+
displayName: 'Tenant ID',
|
|
883
|
+
name: 'tenantId',
|
|
884
|
+
type: 'string',
|
|
885
|
+
required: true,
|
|
886
|
+
displayOptions: {
|
|
887
|
+
show: {
|
|
888
|
+
resource: ['tenant'],
|
|
889
|
+
operation: ['get'],
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
default: '',
|
|
893
|
+
description: 'ID del inquilino',
|
|
723
894
|
},
|
|
895
|
+
// Tenant Create: JSON from previous node
|
|
724
896
|
{
|
|
725
897
|
displayName: 'Usar datos del nodo anterior',
|
|
726
898
|
name: 'useJsonInput',
|
|
727
899
|
type: 'boolean',
|
|
728
900
|
displayOptions: {
|
|
729
901
|
show: {
|
|
730
|
-
resource: ['
|
|
902
|
+
resource: ['tenant'],
|
|
731
903
|
operation: ['create'],
|
|
732
904
|
},
|
|
733
905
|
},
|
|
734
906
|
default: true,
|
|
735
|
-
description: 'Si está activado, usará el JSON completo del nodo anterior',
|
|
907
|
+
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
908
|
},
|
|
737
909
|
// ============================================
|
|
738
910
|
// APPOINTMENT OPERATIONS
|
|
@@ -1047,6 +1219,30 @@ class AivenceRealty {
|
|
|
1047
1219
|
json: true,
|
|
1048
1220
|
});
|
|
1049
1221
|
}
|
|
1222
|
+
else if (operation === 'getSimilar') {
|
|
1223
|
+
const propertyId = this.getNodeParameter('propertyId', i);
|
|
1224
|
+
responseData = await this.helpers.httpRequest({
|
|
1225
|
+
method: 'GET',
|
|
1226
|
+
url: `${baseUrl}/api/v1/propiedades/${propertyId}/similares`,
|
|
1227
|
+
json: true,
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
else if (operation === 'naturalSearch') {
|
|
1231
|
+
const query = this.getNodeParameter('naturalSearchQuery', i);
|
|
1232
|
+
responseData = await this.helpers.httpRequest({
|
|
1233
|
+
method: 'POST',
|
|
1234
|
+
url: `${baseUrl}/api/v1/propiedades/busqueda/natural`,
|
|
1235
|
+
body: { query },
|
|
1236
|
+
json: true,
|
|
1237
|
+
});
|
|
1238
|
+
}
|
|
1239
|
+
else if (operation === 'statistics') {
|
|
1240
|
+
responseData = await this.helpers.httpRequest({
|
|
1241
|
+
method: 'GET',
|
|
1242
|
+
url: `${baseUrl}/api/v1/propiedades/estadisticas`,
|
|
1243
|
+
json: true,
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1050
1246
|
}
|
|
1051
1247
|
// ============================================
|
|
1052
1248
|
// EMAIL RESOURCE
|
|
@@ -1062,6 +1258,48 @@ class AivenceRealty {
|
|
|
1062
1258
|
json: true,
|
|
1063
1259
|
});
|
|
1064
1260
|
}
|
|
1261
|
+
else if (operation === 'list') {
|
|
1262
|
+
responseData = await this.helpers.httpRequest({
|
|
1263
|
+
method: 'GET',
|
|
1264
|
+
url: `${baseUrl}/api/v1/emails`,
|
|
1265
|
+
json: true,
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
else if (operation === 'get') {
|
|
1269
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1270
|
+
responseData = await this.helpers.httpRequest({
|
|
1271
|
+
method: 'GET',
|
|
1272
|
+
url: `${baseUrl}/api/v1/emails/${emailId}`,
|
|
1273
|
+
json: true,
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
else if (operation === 'reply') {
|
|
1277
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1278
|
+
const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
|
|
1279
|
+
const body = useJsonInput ? items[i].json : {};
|
|
1280
|
+
responseData = await this.helpers.httpRequest({
|
|
1281
|
+
method: 'POST',
|
|
1282
|
+
url: `${baseUrl}/api/v1/emails/${emailId}/reply`,
|
|
1283
|
+
body,
|
|
1284
|
+
json: true,
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
else if (operation === 'regenerateAi') {
|
|
1288
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1289
|
+
responseData = await this.helpers.httpRequest({
|
|
1290
|
+
method: 'POST',
|
|
1291
|
+
url: `${baseUrl}/api/v1/emails/${emailId}/regenerate-ai`,
|
|
1292
|
+
json: true,
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
else if (operation === 'markAsRead') {
|
|
1296
|
+
const emailId = this.getNodeParameter('emailId', i);
|
|
1297
|
+
responseData = await this.helpers.httpRequest({
|
|
1298
|
+
method: 'PATCH',
|
|
1299
|
+
url: `${baseUrl}/api/v1/emails/${emailId}/mark-read`,
|
|
1300
|
+
json: true,
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1065
1303
|
}
|
|
1066
1304
|
// ============================================
|
|
1067
1305
|
// MAINTENANCE REQUEST RESOURCE
|
|
@@ -1114,6 +1352,16 @@ class AivenceRealty {
|
|
|
1114
1352
|
json: true,
|
|
1115
1353
|
});
|
|
1116
1354
|
}
|
|
1355
|
+
else if (operation === 'assignContractor') {
|
|
1356
|
+
const requestId = this.getNodeParameter('requestId', i);
|
|
1357
|
+
const contractorId = this.getNodeParameter('contractorId', i);
|
|
1358
|
+
responseData = await this.helpers.httpRequest({
|
|
1359
|
+
method: 'POST',
|
|
1360
|
+
url: `${baseUrl}/api/v1/solicitudes-mantenimiento/${requestId}/asignar-contratista`,
|
|
1361
|
+
body: { contractor_id: contractorId },
|
|
1362
|
+
json: true,
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1117
1365
|
}
|
|
1118
1366
|
// ============================================
|
|
1119
1367
|
// CONTRACTOR RESOURCE
|
|
@@ -1122,7 +1370,25 @@ class AivenceRealty {
|
|
|
1122
1370
|
if (operation === 'list') {
|
|
1123
1371
|
responseData = await this.helpers.httpRequest({
|
|
1124
1372
|
method: 'GET',
|
|
1125
|
-
url: `${baseUrl}/api/
|
|
1373
|
+
url: `${baseUrl}/api/v1/contratistas`,
|
|
1374
|
+
json: true,
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
else if (operation === 'get') {
|
|
1378
|
+
const contractorId = this.getNodeParameter('contractorId', i);
|
|
1379
|
+
responseData = await this.helpers.httpRequest({
|
|
1380
|
+
method: 'GET',
|
|
1381
|
+
url: `${baseUrl}/api/v1/contratistas/${contractorId}`,
|
|
1382
|
+
json: true,
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
else if (operation === 'create') {
|
|
1386
|
+
const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
|
|
1387
|
+
const body = useJsonInput ? items[i].json : {};
|
|
1388
|
+
responseData = await this.helpers.httpRequest({
|
|
1389
|
+
method: 'POST',
|
|
1390
|
+
url: `${baseUrl}/api/v1/contratistas`,
|
|
1391
|
+
body,
|
|
1126
1392
|
json: true,
|
|
1127
1393
|
});
|
|
1128
1394
|
}
|
|
@@ -1135,15 +1401,30 @@ class AivenceRealty {
|
|
|
1135
1401
|
}
|
|
1136
1402
|
}
|
|
1137
1403
|
// ============================================
|
|
1138
|
-
//
|
|
1404
|
+
// TENANT RESOURCE
|
|
1139
1405
|
// ============================================
|
|
1140
|
-
else if (resource === '
|
|
1141
|
-
if (operation === '
|
|
1406
|
+
else if (resource === 'tenant') {
|
|
1407
|
+
if (operation === 'list') {
|
|
1408
|
+
responseData = await this.helpers.httpRequest({
|
|
1409
|
+
method: 'GET',
|
|
1410
|
+
url: `${baseUrl}/api/v1/inquilinos`,
|
|
1411
|
+
json: true,
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
else if (operation === 'get') {
|
|
1415
|
+
const tenantId = this.getNodeParameter('tenantId', i);
|
|
1416
|
+
responseData = await this.helpers.httpRequest({
|
|
1417
|
+
method: 'GET',
|
|
1418
|
+
url: `${baseUrl}/api/v1/inquilinos/${tenantId}`,
|
|
1419
|
+
json: true,
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
else if (operation === 'create') {
|
|
1142
1423
|
const useJsonInput = this.getNodeParameter('useJsonInput', i, true);
|
|
1143
1424
|
const body = useJsonInput ? items[i].json : {};
|
|
1144
1425
|
responseData = await this.helpers.httpRequest({
|
|
1145
1426
|
method: 'POST',
|
|
1146
|
-
url: `${baseUrl}/api/
|
|
1427
|
+
url: `${baseUrl}/api/v1/inquilinos`,
|
|
1147
1428
|
body,
|
|
1148
1429
|
json: true,
|
|
1149
1430
|
});
|