n8n-nodes-digitalsac 0.4.1 → 0.4.2

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,6 +47,7 @@ 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' },
52
53
  ],
@@ -381,6 +382,31 @@ class Digitalsac {
381
382
  },
382
383
  description: 'Se deve fechar o ticket após criar agendamento',
383
384
  },
385
+ {
386
+ displayName: 'Data',
387
+ name: 'listScheduleDate',
388
+ type: 'string',
389
+ default: '',
390
+ placeholder: '2025-08-08',
391
+ displayOptions: {
392
+ show: {
393
+ operation: ['listSchedules'],
394
+ },
395
+ },
396
+ description: 'Data no formato YYYY-MM-DD para listar agendamentos',
397
+ },
398
+ {
399
+ displayName: 'User ID (Opcional)',
400
+ name: 'listScheduleUserId',
401
+ type: 'number',
402
+ default: 0,
403
+ displayOptions: {
404
+ show: {
405
+ operation: ['listSchedules'],
406
+ },
407
+ },
408
+ description: 'ID do usuário para filtrar agendamentos (opcional)',
409
+ },
384
410
  {
385
411
  displayName: 'ID do Agendamento',
386
412
  name: 'scheduleId',
@@ -678,6 +704,14 @@ class Digitalsac {
678
704
  const dateForSlots = this.getNodeParameter('scheduleDate', i);
679
705
  url = `/typebot/listar_horarios_disponiveis?serviceId=${serviceIdForSlots}&userId=${userIdForSlots}&date=${dateForSlots}`;
680
706
  break;
707
+ case 'listSchedules':
708
+ const dateForList = this.getNodeParameter('listScheduleDate', i);
709
+ const userIdForList = this.getNodeParameter('listScheduleUserId', i);
710
+ url = `/typebot/listar_agendamentos?date=${dateForList}`;
711
+ if (userIdForList && userIdForList > 0) {
712
+ url += `&userId=${userIdForList}`;
713
+ }
714
+ break;
681
715
  case 'createSchedule':
682
716
  url = '/typebot/criar_agendamento';
683
717
  method = 'POST';
@@ -54,6 +54,7 @@ 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' },
59
60
  ],
@@ -388,6 +389,31 @@ export class Digitalsac implements INodeType {
388
389
  },
389
390
  description: 'Se deve fechar o ticket após criar agendamento',
390
391
  },
392
+ {
393
+ displayName: 'Data',
394
+ name: 'listScheduleDate',
395
+ type: 'string',
396
+ default: '',
397
+ placeholder: '2025-08-08',
398
+ displayOptions: {
399
+ show: {
400
+ operation: ['listSchedules'],
401
+ },
402
+ },
403
+ description: 'Data no formato YYYY-MM-DD para listar agendamentos',
404
+ },
405
+ {
406
+ displayName: 'User ID (Opcional)',
407
+ name: 'listScheduleUserId',
408
+ type: 'number',
409
+ default: 0,
410
+ displayOptions: {
411
+ show: {
412
+ operation: ['listSchedules'],
413
+ },
414
+ },
415
+ description: 'ID do usuário para filtrar agendamentos (opcional)',
416
+ },
391
417
  {
392
418
  displayName: 'ID do Agendamento',
393
419
  name: 'scheduleId',
@@ -698,6 +724,16 @@ export class Digitalsac implements INodeType {
698
724
  url = `/typebot/listar_horarios_disponiveis?serviceId=${serviceIdForSlots}&userId=${userIdForSlots}&date=${dateForSlots}`;
699
725
  break;
700
726
 
727
+ case 'listSchedules':
728
+ const dateForList = this.getNodeParameter('listScheduleDate', i) as string;
729
+ const userIdForList = this.getNodeParameter('listScheduleUserId', i) as number;
730
+
731
+ url = `/typebot/listar_agendamentos?date=${dateForList}`;
732
+ if (userIdForList && userIdForList > 0) {
733
+ url += `&userId=${userIdForList}`;
734
+ }
735
+ break;
736
+
701
737
  case 'createSchedule':
702
738
  url = '/typebot/criar_agendamento';
703
739
  method = 'POST';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-digitalsac",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Izing Pro Digitalsac",
5
5
  "keywords": [
6
6
  "n8n",