n8n-nodes-aivencerealtycrm 2.0.3 → 2.0.4
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.
|
@@ -1640,6 +1640,12 @@ class AivenceRealty {
|
|
|
1640
1640
|
description: 'Actualizar estado de cita',
|
|
1641
1641
|
action: 'Actualizar estado',
|
|
1642
1642
|
},
|
|
1643
|
+
{
|
|
1644
|
+
name: 'Reschedule',
|
|
1645
|
+
value: 'reschedule',
|
|
1646
|
+
description: 'Reprogramar cita (cambiar fecha y hora)',
|
|
1647
|
+
action: 'Reprogramar cita',
|
|
1648
|
+
},
|
|
1643
1649
|
{
|
|
1644
1650
|
name: 'Delete',
|
|
1645
1651
|
value: 'delete',
|
|
@@ -1840,7 +1846,7 @@ class AivenceRealty {
|
|
|
1840
1846
|
default: '',
|
|
1841
1847
|
description: 'Origen de la cita (máximo 50 caracteres)',
|
|
1842
1848
|
},
|
|
1843
|
-
// Appointment ID para get, updateStatus y delete
|
|
1849
|
+
// Appointment ID para get, updateStatus, reschedule y delete
|
|
1844
1850
|
{
|
|
1845
1851
|
displayName: 'Appointment ID',
|
|
1846
1852
|
name: 'appointmentId',
|
|
@@ -1849,7 +1855,7 @@ class AivenceRealty {
|
|
|
1849
1855
|
displayOptions: {
|
|
1850
1856
|
show: {
|
|
1851
1857
|
resource: ['appointment'],
|
|
1852
|
-
operation: ['get', 'updateStatus', 'delete'],
|
|
1858
|
+
operation: ['get', 'updateStatus', 'reschedule', 'delete'],
|
|
1853
1859
|
},
|
|
1854
1860
|
},
|
|
1855
1861
|
default: '',
|
|
@@ -1888,6 +1894,51 @@ class AivenceRealty {
|
|
|
1888
1894
|
default: 'pending',
|
|
1889
1895
|
description: 'Nuevo estado de la cita',
|
|
1890
1896
|
},
|
|
1897
|
+
// Parámetros para Reschedule (Reprogramar)
|
|
1898
|
+
{
|
|
1899
|
+
displayName: 'Nueva Fecha',
|
|
1900
|
+
name: 'reschedule_fecha',
|
|
1901
|
+
type: 'string',
|
|
1902
|
+
required: true,
|
|
1903
|
+
displayOptions: {
|
|
1904
|
+
show: {
|
|
1905
|
+
resource: ['appointment'],
|
|
1906
|
+
operation: ['reschedule'],
|
|
1907
|
+
},
|
|
1908
|
+
},
|
|
1909
|
+
default: '',
|
|
1910
|
+
placeholder: '2026-01-20',
|
|
1911
|
+
description: 'Nueva fecha para la cita (formato: YYYY-MM-DD)',
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
displayName: 'Nueva Hora',
|
|
1915
|
+
name: 'reschedule_hora',
|
|
1916
|
+
type: 'string',
|
|
1917
|
+
required: true,
|
|
1918
|
+
displayOptions: {
|
|
1919
|
+
show: {
|
|
1920
|
+
resource: ['appointment'],
|
|
1921
|
+
operation: ['reschedule'],
|
|
1922
|
+
},
|
|
1923
|
+
},
|
|
1924
|
+
default: '',
|
|
1925
|
+
placeholder: '14:30',
|
|
1926
|
+
description: 'Nueva hora para la cita (formato: HH:mm, ejemplo: 14:30)',
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
displayName: 'Notas',
|
|
1930
|
+
name: 'reschedule_notas',
|
|
1931
|
+
type: 'string',
|
|
1932
|
+
required: false,
|
|
1933
|
+
displayOptions: {
|
|
1934
|
+
show: {
|
|
1935
|
+
resource: ['appointment'],
|
|
1936
|
+
operation: ['reschedule'],
|
|
1937
|
+
},
|
|
1938
|
+
},
|
|
1939
|
+
default: '',
|
|
1940
|
+
description: 'Motivo o notas de la reprogramación (opcional)',
|
|
1941
|
+
},
|
|
1891
1942
|
// Appointment List Filters
|
|
1892
1943
|
{
|
|
1893
1944
|
displayName: 'Filtro por Propiedad',
|
|
@@ -3180,6 +3231,25 @@ class AivenceRealty {
|
|
|
3180
3231
|
json: true,
|
|
3181
3232
|
});
|
|
3182
3233
|
}
|
|
3234
|
+
else if (operation === 'reschedule') {
|
|
3235
|
+
const appointmentId = this.getNodeParameter('appointmentId', i);
|
|
3236
|
+
const fecha = this.getNodeParameter('reschedule_fecha', i);
|
|
3237
|
+
const hora = this.getNodeParameter('reschedule_hora', i);
|
|
3238
|
+
const notas = this.getNodeParameter('reschedule_notas', i, '');
|
|
3239
|
+
const body = {
|
|
3240
|
+
fecha,
|
|
3241
|
+
hora,
|
|
3242
|
+
};
|
|
3243
|
+
if (notas) {
|
|
3244
|
+
body.notas = notas;
|
|
3245
|
+
}
|
|
3246
|
+
responseData = await this.helpers.httpRequest({
|
|
3247
|
+
method: 'PUT',
|
|
3248
|
+
url: `${baseUrl}/api/v1/reservas/${appointmentId}/reprogramar`,
|
|
3249
|
+
body,
|
|
3250
|
+
json: true,
|
|
3251
|
+
});
|
|
3252
|
+
}
|
|
3183
3253
|
else if (operation === 'delete') {
|
|
3184
3254
|
const appointmentId = this.getNodeParameter('appointmentId', i);
|
|
3185
3255
|
responseData = await this.helpers.httpRequest({
|