tychat-contracts 1.3.1 → 1.3.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.
|
@@ -3,11 +3,18 @@ export declare class AppointmentCalendarItemDto {
|
|
|
3
3
|
id: string;
|
|
4
4
|
date: string;
|
|
5
5
|
}
|
|
6
|
+
/** Agendamentos agrupados por hora civil UTC. */
|
|
7
|
+
export declare class AppointmentCalendarHourDto {
|
|
8
|
+
hour: string;
|
|
9
|
+
countAppointment: number;
|
|
10
|
+
appointments: AppointmentCalendarItemDto[];
|
|
11
|
+
}
|
|
6
12
|
/** Agendamentos agrupados por dia civil (UTC a partir do timestamp do agendamento). */
|
|
7
13
|
export declare class AppointmentCalendarDayDto {
|
|
8
14
|
date: string;
|
|
9
15
|
countAppointment: number;
|
|
10
16
|
appointments: AppointmentCalendarItemDto[];
|
|
17
|
+
hours?: AppointmentCalendarHourDto[];
|
|
11
18
|
}
|
|
12
19
|
export declare class AppointmentCalendarResponseDto {
|
|
13
20
|
startDate: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appointment-calendar.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-calendar.dto.ts"],"names":[],"mappings":"AAEA,oCAAoC;AACpC,qBAAa,0BAA0B;IAErC,EAAE,EAAE,MAAM,CAAC;IAMX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,uFAAuF;AACvF,qBAAa,yBAAyB;IAKpC,IAAI,EAAE,MAAM,CAAC;IAMb,gBAAgB,EAAE,MAAM,CAAC;IAGzB,YAAY,EAAE,0BAA0B,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"appointment-calendar.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-calendar.dto.ts"],"names":[],"mappings":"AAEA,oCAAoC;AACpC,qBAAa,0BAA0B;IAErC,EAAE,EAAE,MAAM,CAAC;IAMX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,iDAAiD;AACjD,qBAAa,0BAA0B;IAKrC,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,MAAM,CAAC;IAGzB,YAAY,EAAE,0BAA0B,EAAE,CAAC;CAC5C;AAED,uFAAuF;AACvF,qBAAa,yBAAyB;IAKpC,IAAI,EAAE,MAAM,CAAC;IAMb,gBAAgB,EAAE,MAAM,CAAC;IAGzB,YAAY,EAAE,0BAA0B,EAAE,CAAC;IAQ3C,KAAK,CAAC,EAAE,0BAA0B,EAAE,CAAC;CACtC;AAED,qBAAa,8BAA8B;IAEzC,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE,MAAM,CAAC;IAOhB,IAAI,EAAE,yBAAyB,EAAE,CAAC;CACnC"}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AppointmentCalendarResponseDto = exports.AppointmentCalendarDayDto = exports.AppointmentCalendarItemDto = void 0;
|
|
12
|
+
exports.AppointmentCalendarResponseDto = exports.AppointmentCalendarDayDto = exports.AppointmentCalendarHourDto = exports.AppointmentCalendarItemDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
/** Um agendamento no calendário. */
|
|
15
15
|
class AppointmentCalendarItemDto {
|
|
@@ -28,11 +28,36 @@ __decorate([
|
|
|
28
28
|
}),
|
|
29
29
|
__metadata("design:type", String)
|
|
30
30
|
], AppointmentCalendarItemDto.prototype, "date", void 0);
|
|
31
|
+
/** Agendamentos agrupados por hora civil UTC. */
|
|
32
|
+
class AppointmentCalendarHourDto {
|
|
33
|
+
hour;
|
|
34
|
+
countAppointment;
|
|
35
|
+
appointments;
|
|
36
|
+
}
|
|
37
|
+
exports.AppointmentCalendarHourDto = AppointmentCalendarHourDto;
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
description: 'Hora UTC no formato ISO 8601 arredondada para início da hora',
|
|
41
|
+
example: '2026-04-10T14:00:00.000Z',
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], AppointmentCalendarHourDto.prototype, "hour", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, swagger_1.ApiProperty)({
|
|
47
|
+
description: 'Quantidade de agendamentos nesta hora UTC dentro do intervalo solicitado.',
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], AppointmentCalendarHourDto.prototype, "countAppointment", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({ type: [AppointmentCalendarItemDto] }),
|
|
53
|
+
__metadata("design:type", Array)
|
|
54
|
+
], AppointmentCalendarHourDto.prototype, "appointments", void 0);
|
|
31
55
|
/** Agendamentos agrupados por dia civil (UTC a partir do timestamp do agendamento). */
|
|
32
56
|
class AppointmentCalendarDayDto {
|
|
33
57
|
date;
|
|
34
58
|
countAppointment;
|
|
35
59
|
appointments;
|
|
60
|
+
hours;
|
|
36
61
|
}
|
|
37
62
|
exports.AppointmentCalendarDayDto = AppointmentCalendarDayDto;
|
|
38
63
|
__decorate([
|
|
@@ -52,6 +77,14 @@ __decorate([
|
|
|
52
77
|
(0, swagger_1.ApiProperty)({ type: [AppointmentCalendarItemDto] }),
|
|
53
78
|
__metadata("design:type", Array)
|
|
54
79
|
], AppointmentCalendarDayDto.prototype, "appointments", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, swagger_1.ApiProperty)({
|
|
82
|
+
required: false,
|
|
83
|
+
description: 'Quando o intervalo tiver exatamente 7 dias, agrega por hora UTC com `countAppointment` por hora e até 2 itens em `appointments` por hora.',
|
|
84
|
+
type: [AppointmentCalendarHourDto],
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", Array)
|
|
87
|
+
], AppointmentCalendarDayDto.prototype, "hours", void 0);
|
|
55
88
|
class AppointmentCalendarResponseDto {
|
|
56
89
|
startDate;
|
|
57
90
|
endDate;
|
|
@@ -68,7 +101,7 @@ __decorate([
|
|
|
68
101
|
], AppointmentCalendarResponseDto.prototype, "endDate", void 0);
|
|
69
102
|
__decorate([
|
|
70
103
|
(0, swagger_1.ApiProperty)({
|
|
71
|
-
description: 'Um elemento por dia civil no intervalo (UTC).
|
|
104
|
+
description: 'Um elemento por dia civil no intervalo (UTC). 1 dia: retorna todos os agendamentos em `appointments`. Exatamente 7 dias: `hours` traz até 2 agendamentos por hora e contagem por hora; `appointments` agrega esses previews do dia. Maior que 7 dias: `appointments` traz no máximo 2 itens por dia e `countAppointment` é o total diário.',
|
|
72
105
|
type: [AppointmentCalendarDayDto],
|
|
73
106
|
}),
|
|
74
107
|
__metadata("design:type", Array)
|
package/package.json
CHANGED
|
@@ -12,6 +12,23 @@ export class AppointmentCalendarItemDto {
|
|
|
12
12
|
date: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/** Agendamentos agrupados por hora civil UTC. */
|
|
16
|
+
export class AppointmentCalendarHourDto {
|
|
17
|
+
@ApiProperty({
|
|
18
|
+
description: 'Hora UTC no formato ISO 8601 arredondada para início da hora',
|
|
19
|
+
example: '2026-04-10T14:00:00.000Z',
|
|
20
|
+
})
|
|
21
|
+
hour: string;
|
|
22
|
+
|
|
23
|
+
@ApiProperty({
|
|
24
|
+
description: 'Quantidade de agendamentos nesta hora UTC dentro do intervalo solicitado.',
|
|
25
|
+
})
|
|
26
|
+
countAppointment: number;
|
|
27
|
+
|
|
28
|
+
@ApiProperty({ type: [AppointmentCalendarItemDto] })
|
|
29
|
+
appointments: AppointmentCalendarItemDto[];
|
|
30
|
+
}
|
|
31
|
+
|
|
15
32
|
/** Agendamentos agrupados por dia civil (UTC a partir do timestamp do agendamento). */
|
|
16
33
|
export class AppointmentCalendarDayDto {
|
|
17
34
|
@ApiProperty({
|
|
@@ -28,6 +45,14 @@ export class AppointmentCalendarDayDto {
|
|
|
28
45
|
|
|
29
46
|
@ApiProperty({ type: [AppointmentCalendarItemDto] })
|
|
30
47
|
appointments: AppointmentCalendarItemDto[];
|
|
48
|
+
|
|
49
|
+
@ApiProperty({
|
|
50
|
+
required: false,
|
|
51
|
+
description:
|
|
52
|
+
'Quando o intervalo tiver exatamente 7 dias, agrega por hora UTC com `countAppointment` por hora e até 2 itens em `appointments` por hora.',
|
|
53
|
+
type: [AppointmentCalendarHourDto],
|
|
54
|
+
})
|
|
55
|
+
hours?: AppointmentCalendarHourDto[];
|
|
31
56
|
}
|
|
32
57
|
|
|
33
58
|
export class AppointmentCalendarResponseDto {
|
|
@@ -39,7 +64,7 @@ export class AppointmentCalendarResponseDto {
|
|
|
39
64
|
|
|
40
65
|
@ApiProperty({
|
|
41
66
|
description:
|
|
42
|
-
'Um elemento por dia civil no intervalo (UTC).
|
|
67
|
+
'Um elemento por dia civil no intervalo (UTC). 1 dia: retorna todos os agendamentos em `appointments`. Exatamente 7 dias: `hours` traz até 2 agendamentos por hora e contagem por hora; `appointments` agrega esses previews do dia. Maior que 7 dias: `appointments` traz no máximo 2 itens por dia e `countAppointment` é o total diário.',
|
|
43
68
|
type: [AppointmentCalendarDayDto],
|
|
44
69
|
})
|
|
45
70
|
days: AppointmentCalendarDayDto[];
|