tychat-contracts 1.0.118 → 1.0.121

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.
@@ -0,0 +1,17 @@
1
+ /** Um agendamento no calendário (com nome do paciente resolvido na API). */
2
+ export declare class AppointmentCalendarItemDto {
3
+ id: string;
4
+ date: string;
5
+ patientName: string;
6
+ }
7
+ /** Agendamentos agrupados por dia civil (UTC a partir do timestamp do agendamento). */
8
+ export declare class AppointmentCalendarDayDto {
9
+ date: string;
10
+ appointments: AppointmentCalendarItemDto[];
11
+ }
12
+ export declare class AppointmentCalendarResponseDto {
13
+ startDate: string;
14
+ endDate: string;
15
+ days: AppointmentCalendarDayDto[];
16
+ }
17
+ //# sourceMappingURL=appointment-calendar.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appointment-calendar.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-calendar.dto.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,qBAAa,0BAA0B;IAErC,EAAE,EAAE,MAAM,CAAC;IAMX,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,uFAAuF;AACvF,qBAAa,yBAAyB;IAKpC,IAAI,EAAE,MAAM,CAAC;IAGb,YAAY,EAAE,0BAA0B,EAAE,CAAC;CAC5C;AAED,qBAAa,8BAA8B;IAEzC,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,yBAAyB,EAAE,CAAC;CACnC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AppointmentCalendarResponseDto = exports.AppointmentCalendarDayDto = exports.AppointmentCalendarItemDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /** Um agendamento no calendário (com nome do paciente resolvido na API). */
15
+ class AppointmentCalendarItemDto {
16
+ id;
17
+ date;
18
+ patientName;
19
+ }
20
+ exports.AppointmentCalendarItemDto = AppointmentCalendarItemDto;
21
+ __decorate([
22
+ (0, swagger_1.ApiProperty)({ description: 'ID do agendamento (UUID)' }),
23
+ __metadata("design:type", String)
24
+ ], AppointmentCalendarItemDto.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({
27
+ description: 'Data/hora do agendamento (ISO 8601)',
28
+ example: '2026-04-10T14:30:00.000Z',
29
+ }),
30
+ __metadata("design:type", String)
31
+ ], AppointmentCalendarItemDto.prototype, "date", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiProperty)({ description: 'Nome do paciente' }),
34
+ __metadata("design:type", String)
35
+ ], AppointmentCalendarItemDto.prototype, "patientName", void 0);
36
+ /** Agendamentos agrupados por dia civil (UTC a partir do timestamp do agendamento). */
37
+ class AppointmentCalendarDayDto {
38
+ date;
39
+ appointments;
40
+ }
41
+ exports.AppointmentCalendarDayDto = AppointmentCalendarDayDto;
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({
44
+ description: 'Dia no formato YYYY-MM-DD',
45
+ example: '2026-04-10',
46
+ }),
47
+ __metadata("design:type", String)
48
+ ], AppointmentCalendarDayDto.prototype, "date", void 0);
49
+ __decorate([
50
+ (0, swagger_1.ApiProperty)({ type: [AppointmentCalendarItemDto] }),
51
+ __metadata("design:type", Array)
52
+ ], AppointmentCalendarDayDto.prototype, "appointments", void 0);
53
+ class AppointmentCalendarResponseDto {
54
+ startDate;
55
+ endDate;
56
+ days;
57
+ }
58
+ exports.AppointmentCalendarResponseDto = AppointmentCalendarResponseDto;
59
+ __decorate([
60
+ (0, swagger_1.ApiProperty)({ description: 'Início do período solicitado (YYYY-MM-DD)' }),
61
+ __metadata("design:type", String)
62
+ ], AppointmentCalendarResponseDto.prototype, "startDate", void 0);
63
+ __decorate([
64
+ (0, swagger_1.ApiProperty)({ description: 'Fim do período solicitado (YYYY-MM-DD)' }),
65
+ __metadata("design:type", String)
66
+ ], AppointmentCalendarResponseDto.prototype, "endDate", void 0);
67
+ __decorate([
68
+ (0, swagger_1.ApiProperty)({ type: [AppointmentCalendarDayDto] }),
69
+ __metadata("design:type", Array)
70
+ ], AppointmentCalendarResponseDto.prototype, "days", void 0);
@@ -1,4 +1,4 @@
1
- export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished", "canceled", "no_show"];
1
+ export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "in_care", "sended", "finished", "canceled", "no_show"];
2
2
  export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
3
3
  /**
4
4
  * Appointment types to differentiate regular appointments from return visits.
@@ -1 +1 @@
1
- {"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,iFAOvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,4FAQvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAChE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -4,6 +4,7 @@ exports.APPOINTMENT_TYPES = exports.APPOINTMENT_STATUSES = void 0;
4
4
  exports.APPOINTMENT_STATUSES = [
5
5
  'pending',
6
6
  'processing',
7
+ 'in_care',
7
8
  'sended',
8
9
  'finished',
9
10
  'canceled',
@@ -0,0 +1,21 @@
1
+ export type CareQueueSegmentDto = 'past' | 'current' | 'upcoming';
2
+ /** Item da fila de espera de atendimento (check-in → ordem por horário do agendamento). */
3
+ export declare class CareQueueEntryDto {
4
+ appointmentId: string;
5
+ patientId: string;
6
+ patientName: string;
7
+ doctorUserId: string;
8
+ doctorName: string;
9
+ specialtyId: string;
10
+ specialtyName: string;
11
+ appointmentDate: string;
12
+ status: string;
13
+ ticketCode: string;
14
+ queuePosition: number;
15
+ segment: CareQueueSegmentDto;
16
+ }
17
+ export declare class CareQueueResponseDto {
18
+ specialtyTicketPrefix: string;
19
+ items: CareQueueEntryDto[];
20
+ }
21
+ //# sourceMappingURL=care-queue.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"care-queue.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/care-queue.dto.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;AAElE,2FAA2F;AAC3F,qBAAa,iBAAiB;IAE5B,aAAa,EAAE,MAAM,CAAC;IAGtB,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IAGpB,YAAY,EAAE,MAAM,CAAC;IAGrB,UAAU,EAAE,MAAM,CAAC;IAGnB,WAAW,EAAE,MAAM,CAAC;IAGpB,aAAa,EAAE,MAAM,CAAC;IAGtB,eAAe,EAAE,MAAM,CAAC;IAGxB,MAAM,EAAE,MAAM,CAAC;IAMf,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,EAAE,MAAM,CAAC;IAMtB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,qBAAa,oBAAoB;IAM/B,qBAAqB,EAAE,MAAM,CAAC;IAG9B,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B"}
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CareQueueResponseDto = exports.CareQueueEntryDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /** Item da fila de espera de atendimento (check-in → ordem por horário do agendamento). */
15
+ class CareQueueEntryDto {
16
+ appointmentId;
17
+ patientId;
18
+ patientName;
19
+ doctorUserId;
20
+ doctorName;
21
+ specialtyId;
22
+ specialtyName;
23
+ appointmentDate;
24
+ status;
25
+ ticketCode;
26
+ queuePosition;
27
+ segment;
28
+ }
29
+ exports.CareQueueEntryDto = CareQueueEntryDto;
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({ description: 'ID do agendamento (UUID)' }),
32
+ __metadata("design:type", String)
33
+ ], CareQueueEntryDto.prototype, "appointmentId", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ description: 'ID do paciente (UUID)' }),
36
+ __metadata("design:type", String)
37
+ ], CareQueueEntryDto.prototype, "patientId", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({ description: 'Nome do paciente' }),
40
+ __metadata("design:type", String)
41
+ ], CareQueueEntryDto.prototype, "patientName", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({ description: 'userId do profissional (UUID)' }),
44
+ __metadata("design:type", String)
45
+ ], CareQueueEntryDto.prototype, "doctorUserId", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiProperty)({ description: 'Nome do profissional' }),
48
+ __metadata("design:type", String)
49
+ ], CareQueueEntryDto.prototype, "doctorName", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiProperty)({ description: 'ID da especialidade usada no ticket (UUID)' }),
52
+ __metadata("design:type", String)
53
+ ], CareQueueEntryDto.prototype, "specialtyId", void 0);
54
+ __decorate([
55
+ (0, swagger_1.ApiProperty)({ description: 'Nome da especialidade' }),
56
+ __metadata("design:type", String)
57
+ ], CareQueueEntryDto.prototype, "specialtyName", void 0);
58
+ __decorate([
59
+ (0, swagger_1.ApiProperty)({ description: 'Data/hora do agendamento (ISO 8601)' }),
60
+ __metadata("design:type", String)
61
+ ], CareQueueEntryDto.prototype, "appointmentDate", void 0);
62
+ __decorate([
63
+ (0, swagger_1.ApiProperty)({ description: 'Status do agendamento' }),
64
+ __metadata("design:type", String)
65
+ ], CareQueueEntryDto.prototype, "status", void 0);
66
+ __decorate([
67
+ (0, swagger_1.ApiProperty)({
68
+ description: 'Código na fila (prefixo da especialidade + posição)',
69
+ example: 'CAR-003',
70
+ }),
71
+ __metadata("design:type", String)
72
+ ], CareQueueEntryDto.prototype, "ticketCode", void 0);
73
+ __decorate([
74
+ (0, swagger_1.ApiProperty)({ description: 'Posição na fila do dia (1-based), por horário' }),
75
+ __metadata("design:type", Number)
76
+ ], CareQueueEntryDto.prototype, "queuePosition", void 0);
77
+ __decorate([
78
+ (0, swagger_1.ApiProperty)({
79
+ enum: ['past', 'current', 'upcoming'],
80
+ description: 'Atendidos, em atendimento agora, ou aguardando',
81
+ }),
82
+ __metadata("design:type", String)
83
+ ], CareQueueEntryDto.prototype, "segment", void 0);
84
+ class CareQueueResponseDto {
85
+ specialtyTicketPrefix;
86
+ items;
87
+ }
88
+ exports.CareQueueResponseDto = CareQueueResponseDto;
89
+ __decorate([
90
+ (0, swagger_1.ApiProperty)({
91
+ description: 'Prefixo de 3 letras usado nos tickets (primeira especialidade do perfil do médico)',
92
+ example: 'CAR',
93
+ }),
94
+ __metadata("design:type", String)
95
+ ], CareQueueResponseDto.prototype, "specialtyTicketPrefix", void 0);
96
+ __decorate([
97
+ (0, swagger_1.ApiProperty)({ type: [CareQueueEntryDto] }),
98
+ __metadata("design:type", Array)
99
+ ], CareQueueResponseDto.prototype, "items", void 0);
@@ -7,4 +7,6 @@ export * from './appointment-status.dto';
7
7
  export * from './appointment.dto';
8
8
  export * from './appointment-procedure.dto';
9
9
  export * from './update-appointment-procedure.dto';
10
+ export * from './care-queue.dto';
11
+ export * from './appointment-calendar.dto';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appointments/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appointments/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC"}
@@ -23,3 +23,5 @@ __exportStar(require("./appointment-status.dto"), exports);
23
23
  __exportStar(require("./appointment.dto"), exports);
24
24
  __exportStar(require("./appointment-procedure.dto"), exports);
25
25
  __exportStar(require("./update-appointment-procedure.dto"), exports);
26
+ __exportStar(require("./care-queue.dto"), exports);
27
+ __exportStar(require("./appointment-calendar.dto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.118",
3
+ "version": "1.0.121",
4
4
  "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,39 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+
3
+ /** Um agendamento no calendário (com nome do paciente resolvido na API). */
4
+ export class AppointmentCalendarItemDto {
5
+ @ApiProperty({ description: 'ID do agendamento (UUID)' })
6
+ id: string;
7
+
8
+ @ApiProperty({
9
+ description: 'Data/hora do agendamento (ISO 8601)',
10
+ example: '2026-04-10T14:30:00.000Z',
11
+ })
12
+ date: string;
13
+
14
+ @ApiProperty({ description: 'Nome do paciente' })
15
+ patientName: string;
16
+ }
17
+
18
+ /** Agendamentos agrupados por dia civil (UTC a partir do timestamp do agendamento). */
19
+ export class AppointmentCalendarDayDto {
20
+ @ApiProperty({
21
+ description: 'Dia no formato YYYY-MM-DD',
22
+ example: '2026-04-10',
23
+ })
24
+ date: string;
25
+
26
+ @ApiProperty({ type: [AppointmentCalendarItemDto] })
27
+ appointments: AppointmentCalendarItemDto[];
28
+ }
29
+
30
+ export class AppointmentCalendarResponseDto {
31
+ @ApiProperty({ description: 'Início do período solicitado (YYYY-MM-DD)' })
32
+ startDate: string;
33
+
34
+ @ApiProperty({ description: 'Fim do período solicitado (YYYY-MM-DD)' })
35
+ endDate: string;
36
+
37
+ @ApiProperty({ type: [AppointmentCalendarDayDto] })
38
+ days: AppointmentCalendarDayDto[];
39
+ }
@@ -1,6 +1,7 @@
1
1
  export const APPOINTMENT_STATUSES = [
2
2
  'pending',
3
3
  'processing',
4
+ 'in_care',
4
5
  'sended',
5
6
  'finished',
6
7
  'canceled',
@@ -0,0 +1,60 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+
3
+ export type CareQueueSegmentDto = 'past' | 'current' | 'upcoming';
4
+
5
+ /** Item da fila de espera de atendimento (check-in → ordem por horário do agendamento). */
6
+ export class CareQueueEntryDto {
7
+ @ApiProperty({ description: 'ID do agendamento (UUID)' })
8
+ appointmentId: string;
9
+
10
+ @ApiProperty({ description: 'ID do paciente (UUID)' })
11
+ patientId: string;
12
+
13
+ @ApiProperty({ description: 'Nome do paciente' })
14
+ patientName: string;
15
+
16
+ @ApiProperty({ description: 'userId do profissional (UUID)' })
17
+ doctorUserId: string;
18
+
19
+ @ApiProperty({ description: 'Nome do profissional' })
20
+ doctorName: string;
21
+
22
+ @ApiProperty({ description: 'ID da especialidade usada no ticket (UUID)' })
23
+ specialtyId: string;
24
+
25
+ @ApiProperty({ description: 'Nome da especialidade' })
26
+ specialtyName: string;
27
+
28
+ @ApiProperty({ description: 'Data/hora do agendamento (ISO 8601)' })
29
+ appointmentDate: string;
30
+
31
+ @ApiProperty({ description: 'Status do agendamento' })
32
+ status: string;
33
+
34
+ @ApiProperty({
35
+ description: 'Código na fila (prefixo da especialidade + posição)',
36
+ example: 'CAR-003',
37
+ })
38
+ ticketCode: string;
39
+
40
+ @ApiProperty({ description: 'Posição na fila do dia (1-based), por horário' })
41
+ queuePosition: number;
42
+
43
+ @ApiProperty({
44
+ enum: ['past', 'current', 'upcoming'],
45
+ description: 'Atendidos, em atendimento agora, ou aguardando',
46
+ })
47
+ segment: CareQueueSegmentDto;
48
+ }
49
+
50
+ export class CareQueueResponseDto {
51
+ @ApiProperty({
52
+ description:
53
+ 'Prefixo de 3 letras usado nos tickets (primeira especialidade do perfil do médico)',
54
+ example: 'CAR',
55
+ })
56
+ specialtyTicketPrefix: string;
57
+
58
+ @ApiProperty({ type: [CareQueueEntryDto] })
59
+ items: CareQueueEntryDto[];
60
+ }
@@ -6,4 +6,6 @@ export * from './available-slots-response.dto';
6
6
  export * from './appointment-status.dto';
7
7
  export * from './appointment.dto';
8
8
  export * from './appointment-procedure.dto';
9
- export * from './update-appointment-procedure.dto';
9
+ export * from './update-appointment-procedure.dto';
10
+ export * from './care-queue.dto';
11
+ export * from './appointment-calendar.dto';