n8n-nodes-digitalsac 0.4.1 → 0.4.3
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.
|
@@ -47,8 +47,10 @@ class Digitalsac {
|
|
|
47
47
|
{ name: 'Listar Serviços', value: 'listServices' },
|
|
48
48
|
{ name: 'Listar Usuários Disponíveis', value: 'listAvailableUsers' },
|
|
49
49
|
{ name: 'Listar Horários Disponíveis', value: 'listAvailableSlots' },
|
|
50
|
+
{ name: 'Listar Agendamentos', value: 'listSchedules' },
|
|
50
51
|
{ name: 'Criar Agendamento', value: 'createSchedule' },
|
|
51
52
|
{ name: 'Cancelar Agendamento', value: 'cancelSchedule' },
|
|
53
|
+
{ name: 'Gerar Link do Calendário (.ics)', value: 'calendarLink' },
|
|
52
54
|
],
|
|
53
55
|
default: 'validateWhatsapp',
|
|
54
56
|
},
|
|
@@ -381,6 +383,31 @@ class Digitalsac {
|
|
|
381
383
|
},
|
|
382
384
|
description: 'Se deve fechar o ticket após criar agendamento',
|
|
383
385
|
},
|
|
386
|
+
{
|
|
387
|
+
displayName: 'Data',
|
|
388
|
+
name: 'listScheduleDate',
|
|
389
|
+
type: 'string',
|
|
390
|
+
default: '',
|
|
391
|
+
placeholder: '2025-08-08',
|
|
392
|
+
displayOptions: {
|
|
393
|
+
show: {
|
|
394
|
+
operation: ['listSchedules'],
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
description: 'Data no formato YYYY-MM-DD para listar agendamentos',
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
displayName: 'User ID (Opcional)',
|
|
401
|
+
name: 'listScheduleUserId',
|
|
402
|
+
type: 'number',
|
|
403
|
+
default: 0,
|
|
404
|
+
displayOptions: {
|
|
405
|
+
show: {
|
|
406
|
+
operation: ['listSchedules'],
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
description: 'ID do usuário para filtrar agendamentos (opcional)',
|
|
410
|
+
},
|
|
384
411
|
{
|
|
385
412
|
displayName: 'ID do Agendamento',
|
|
386
413
|
name: 'scheduleId',
|
|
@@ -393,6 +420,18 @@ class Digitalsac {
|
|
|
393
420
|
},
|
|
394
421
|
description: 'ID do agendamento a ser cancelado',
|
|
395
422
|
},
|
|
423
|
+
{
|
|
424
|
+
displayName: 'ID do Agendamento',
|
|
425
|
+
name: 'calendarScheduleId',
|
|
426
|
+
type: 'number',
|
|
427
|
+
default: 0,
|
|
428
|
+
displayOptions: {
|
|
429
|
+
show: {
|
|
430
|
+
operation: ['calendarLink'],
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
description: 'ID do agendamento para gerar o link do calendário',
|
|
434
|
+
},
|
|
396
435
|
],
|
|
397
436
|
};
|
|
398
437
|
}
|
|
@@ -678,6 +717,14 @@ class Digitalsac {
|
|
|
678
717
|
const dateForSlots = this.getNodeParameter('scheduleDate', i);
|
|
679
718
|
url = `/typebot/listar_horarios_disponiveis?serviceId=${serviceIdForSlots}&userId=${userIdForSlots}&date=${dateForSlots}`;
|
|
680
719
|
break;
|
|
720
|
+
case 'listSchedules':
|
|
721
|
+
const dateForList = this.getNodeParameter('listScheduleDate', i);
|
|
722
|
+
const userIdForList = this.getNodeParameter('listScheduleUserId', i);
|
|
723
|
+
url = `/typebot/listar_agendamentos?date=${dateForList}`;
|
|
724
|
+
if (userIdForList && userIdForList > 0) {
|
|
725
|
+
url += `&userId=${userIdForList}`;
|
|
726
|
+
}
|
|
727
|
+
break;
|
|
681
728
|
case 'createSchedule':
|
|
682
729
|
url = '/typebot/criar_agendamento';
|
|
683
730
|
method = 'POST';
|
|
@@ -734,6 +781,10 @@ class Digitalsac {
|
|
|
734
781
|
json: true,
|
|
735
782
|
};
|
|
736
783
|
break;
|
|
784
|
+
case 'calendarLink':
|
|
785
|
+
const calendarScheduleId = this.getNodeParameter('calendarScheduleId', i);
|
|
786
|
+
url = `/typebot/calendar-link?scheduleId=${calendarScheduleId}`;
|
|
787
|
+
break;
|
|
737
788
|
}
|
|
738
789
|
// Se as opções não foram definidas no switch, defina-as aqui para operações GET
|
|
739
790
|
if (!options.method) {
|
|
@@ -54,8 +54,10 @@ export class Digitalsac implements INodeType {
|
|
|
54
54
|
{ name: 'Listar Serviços', value: 'listServices' },
|
|
55
55
|
{ name: 'Listar Usuários Disponíveis', value: 'listAvailableUsers' },
|
|
56
56
|
{ name: 'Listar Horários Disponíveis', value: 'listAvailableSlots' },
|
|
57
|
+
{ name: 'Listar Agendamentos', value: 'listSchedules' },
|
|
57
58
|
{ name: 'Criar Agendamento', value: 'createSchedule' },
|
|
58
59
|
{ name: 'Cancelar Agendamento', value: 'cancelSchedule' },
|
|
60
|
+
{ name: 'Gerar Link do Calendário (.ics)', value: 'calendarLink' },
|
|
59
61
|
],
|
|
60
62
|
default: 'validateWhatsapp',
|
|
61
63
|
},
|
|
@@ -388,6 +390,31 @@ export class Digitalsac implements INodeType {
|
|
|
388
390
|
},
|
|
389
391
|
description: 'Se deve fechar o ticket após criar agendamento',
|
|
390
392
|
},
|
|
393
|
+
{
|
|
394
|
+
displayName: 'Data',
|
|
395
|
+
name: 'listScheduleDate',
|
|
396
|
+
type: 'string',
|
|
397
|
+
default: '',
|
|
398
|
+
placeholder: '2025-08-08',
|
|
399
|
+
displayOptions: {
|
|
400
|
+
show: {
|
|
401
|
+
operation: ['listSchedules'],
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
description: 'Data no formato YYYY-MM-DD para listar agendamentos',
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
displayName: 'User ID (Opcional)',
|
|
408
|
+
name: 'listScheduleUserId',
|
|
409
|
+
type: 'number',
|
|
410
|
+
default: 0,
|
|
411
|
+
displayOptions: {
|
|
412
|
+
show: {
|
|
413
|
+
operation: ['listSchedules'],
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
description: 'ID do usuário para filtrar agendamentos (opcional)',
|
|
417
|
+
},
|
|
391
418
|
{
|
|
392
419
|
displayName: 'ID do Agendamento',
|
|
393
420
|
name: 'scheduleId',
|
|
@@ -400,6 +427,18 @@ export class Digitalsac implements INodeType {
|
|
|
400
427
|
},
|
|
401
428
|
description: 'ID do agendamento a ser cancelado',
|
|
402
429
|
},
|
|
430
|
+
{
|
|
431
|
+
displayName: 'ID do Agendamento',
|
|
432
|
+
name: 'calendarScheduleId',
|
|
433
|
+
type: 'number',
|
|
434
|
+
default: 0,
|
|
435
|
+
displayOptions: {
|
|
436
|
+
show: {
|
|
437
|
+
operation: ['calendarLink'],
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
description: 'ID do agendamento para gerar o link do calendário',
|
|
441
|
+
},
|
|
403
442
|
],
|
|
404
443
|
};
|
|
405
444
|
|
|
@@ -698,6 +737,16 @@ export class Digitalsac implements INodeType {
|
|
|
698
737
|
url = `/typebot/listar_horarios_disponiveis?serviceId=${serviceIdForSlots}&userId=${userIdForSlots}&date=${dateForSlots}`;
|
|
699
738
|
break;
|
|
700
739
|
|
|
740
|
+
case 'listSchedules':
|
|
741
|
+
const dateForList = this.getNodeParameter('listScheduleDate', i) as string;
|
|
742
|
+
const userIdForList = this.getNodeParameter('listScheduleUserId', i) as number;
|
|
743
|
+
|
|
744
|
+
url = `/typebot/listar_agendamentos?date=${dateForList}`;
|
|
745
|
+
if (userIdForList && userIdForList > 0) {
|
|
746
|
+
url += `&userId=${userIdForList}`;
|
|
747
|
+
}
|
|
748
|
+
break;
|
|
749
|
+
|
|
701
750
|
case 'createSchedule':
|
|
702
751
|
url = '/typebot/criar_agendamento';
|
|
703
752
|
method = 'POST';
|
|
@@ -762,6 +811,12 @@ export class Digitalsac implements INodeType {
|
|
|
762
811
|
json: true,
|
|
763
812
|
};
|
|
764
813
|
break;
|
|
814
|
+
|
|
815
|
+
case 'calendarLink':
|
|
816
|
+
const calendarScheduleId = this.getNodeParameter('calendarScheduleId', i) as number;
|
|
817
|
+
|
|
818
|
+
url = `/typebot/calendar-link?scheduleId=${calendarScheduleId}`;
|
|
819
|
+
break;
|
|
765
820
|
}
|
|
766
821
|
|
|
767
822
|
// Se as opções não foram definidas no switch, defina-as aqui para operações GET
|