tychat-contracts 1.6.80 → 1.6.81

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.
@@ -2,6 +2,7 @@
2
2
  export declare class AppointmentCalendarItemDto {
3
3
  id: string;
4
4
  date: string;
5
+ patientConfirmedAt?: string;
5
6
  }
6
7
  /** Agendamentos agrupados por hora civil UTC. */
7
8
  export declare class AppointmentCalendarHourDto {
@@ -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,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"}
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;IAOb,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;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"}
@@ -15,6 +15,7 @@ const swagger_1 = require("@nestjs/swagger");
15
15
  class AppointmentCalendarItemDto {
16
16
  id;
17
17
  date;
18
+ patientConfirmedAt;
18
19
  }
19
20
  exports.AppointmentCalendarItemDto = AppointmentCalendarItemDto;
20
21
  __decorate([
@@ -28,6 +29,13 @@ __decorate([
28
29
  }),
29
30
  __metadata("design:type", String)
30
31
  ], AppointmentCalendarItemDto.prototype, "date", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiPropertyOptional)({
34
+ description: 'Data/hora em que o paciente confirmou presença via WhatsApp (ISO 8601)',
35
+ example: '2026-04-09T10:30:00.000Z',
36
+ }),
37
+ __metadata("design:type", String)
38
+ ], AppointmentCalendarItemDto.prototype, "patientConfirmedAt", void 0);
31
39
  /** Agendamentos agrupados por hora civil UTC. */
32
40
  class AppointmentCalendarHourDto {
33
41
  hour;
@@ -0,0 +1,24 @@
1
+ export declare const APPOINTMENT_CONFIRMATION_ACTIONS: readonly ["confirm", "reschedule"];
2
+ export type AppointmentConfirmationActionDto = (typeof APPOINTMENT_CONFIRMATION_ACTIONS)[number];
3
+ /** Query parameters for listing appointment confirmation button responses. */
4
+ export declare class FollowupConfirmationResponseListQueryDto {
5
+ page?: number;
6
+ limit?: number;
7
+ patientId?: string;
8
+ appointmentId?: string;
9
+ action?: AppointmentConfirmationActionDto;
10
+ dateFrom?: string;
11
+ dateTo?: string;
12
+ }
13
+ /** Single row from appointment_confirmation_responses. */
14
+ export declare class FollowupConfirmationResponseItemDto {
15
+ id: string;
16
+ patientId: string;
17
+ appointmentId: string;
18
+ action: AppointmentConfirmationActionDto;
19
+ buttonId: string;
20
+ buttonTitle: string;
21
+ createdAt: string;
22
+ patientName?: string;
23
+ }
24
+ //# sourceMappingURL=followup-confirmation-response.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"followup-confirmation-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-confirmation-response.dto.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,gCAAgC,oCAAqC,CAAC;AACnF,MAAM,MAAM,gCAAgC,GAC1C,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,8EAA8E;AAC9E,qBAAa,wCAAwC;IAMnD,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,aAAa,CAAC,EAAE,MAAM,CAAC;IAMvB,MAAM,CAAC,EAAE,gCAAgC,CAAC;IAQ1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0DAA0D;AAC1D,qBAAa,mCAAmC;IAE9C,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,EAAE,MAAM,CAAC;IAGtB,MAAM,EAAE,gCAAgC,CAAC;IAGzC,QAAQ,EAAE,MAAM,CAAC;IAGjB,WAAW,EAAE,MAAM,CAAC;IAGpB,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,125 @@
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.FollowupConfirmationResponseItemDto = exports.FollowupConfirmationResponseListQueryDto = exports.APPOINTMENT_CONFIRMATION_ACTIONS = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ exports.APPOINTMENT_CONFIRMATION_ACTIONS = ['confirm', 'reschedule'];
17
+ /** Query parameters for listing appointment confirmation button responses. */
18
+ class FollowupConfirmationResponseListQueryDto {
19
+ page;
20
+ limit;
21
+ patientId;
22
+ appointmentId;
23
+ action;
24
+ dateFrom;
25
+ dateTo;
26
+ }
27
+ exports.FollowupConfirmationResponseListQueryDto = FollowupConfirmationResponseListQueryDto;
28
+ __decorate([
29
+ (0, swagger_1.ApiPropertyOptional)({ minimum: 1, default: 1 }),
30
+ (0, class_validator_1.IsOptional)(),
31
+ (0, class_transformer_1.Type)(() => Number),
32
+ (0, class_validator_1.IsInt)(),
33
+ (0, class_validator_1.Min)(1),
34
+ __metadata("design:type", Number)
35
+ ], FollowupConfirmationResponseListQueryDto.prototype, "page", void 0);
36
+ __decorate([
37
+ (0, swagger_1.ApiPropertyOptional)({ minimum: 1, maximum: 100, default: 20 }),
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_transformer_1.Type)(() => Number),
40
+ (0, class_validator_1.IsInt)(),
41
+ (0, class_validator_1.Min)(1),
42
+ (0, class_validator_1.Max)(100),
43
+ __metadata("design:type", Number)
44
+ ], FollowupConfirmationResponseListQueryDto.prototype, "limit", void 0);
45
+ __decorate([
46
+ (0, swagger_1.ApiPropertyOptional)({ format: 'uuid' }),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsUUID)('4'),
49
+ __metadata("design:type", String)
50
+ ], FollowupConfirmationResponseListQueryDto.prototype, "patientId", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiPropertyOptional)({ format: 'uuid' }),
53
+ (0, class_validator_1.IsOptional)(),
54
+ (0, class_validator_1.IsUUID)('4'),
55
+ __metadata("design:type", String)
56
+ ], FollowupConfirmationResponseListQueryDto.prototype, "appointmentId", void 0);
57
+ __decorate([
58
+ (0, swagger_1.ApiPropertyOptional)({ enum: exports.APPOINTMENT_CONFIRMATION_ACTIONS }),
59
+ (0, class_validator_1.IsOptional)(),
60
+ (0, class_validator_1.IsString)(),
61
+ (0, class_validator_1.IsIn)([...exports.APPOINTMENT_CONFIRMATION_ACTIONS]),
62
+ __metadata("design:type", String)
63
+ ], FollowupConfirmationResponseListQueryDto.prototype, "action", void 0);
64
+ __decorate([
65
+ (0, swagger_1.ApiPropertyOptional)({
66
+ description: 'Início do período (ISO 8601). Filtra por `created_at` (inclusivo).',
67
+ example: '2026-04-01T00:00:00.000Z',
68
+ }),
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.IsDateString)(),
71
+ __metadata("design:type", String)
72
+ ], FollowupConfirmationResponseListQueryDto.prototype, "dateFrom", void 0);
73
+ __decorate([
74
+ (0, swagger_1.ApiPropertyOptional)({
75
+ description: 'Fim do período (ISO 8601). Filtra por `created_at` (inclusivo).',
76
+ example: '2026-04-30T23:59:59.999Z',
77
+ }),
78
+ (0, class_validator_1.IsOptional)(),
79
+ (0, class_validator_1.IsDateString)(),
80
+ __metadata("design:type", String)
81
+ ], FollowupConfirmationResponseListQueryDto.prototype, "dateTo", void 0);
82
+ /** Single row from appointment_confirmation_responses. */
83
+ class FollowupConfirmationResponseItemDto {
84
+ id;
85
+ patientId;
86
+ appointmentId;
87
+ action;
88
+ buttonId;
89
+ buttonTitle;
90
+ createdAt;
91
+ patientName;
92
+ }
93
+ exports.FollowupConfirmationResponseItemDto = FollowupConfirmationResponseItemDto;
94
+ __decorate([
95
+ (0, swagger_1.ApiProperty)({ format: 'uuid' }),
96
+ __metadata("design:type", String)
97
+ ], FollowupConfirmationResponseItemDto.prototype, "id", void 0);
98
+ __decorate([
99
+ (0, swagger_1.ApiProperty)({ format: 'uuid' }),
100
+ __metadata("design:type", String)
101
+ ], FollowupConfirmationResponseItemDto.prototype, "patientId", void 0);
102
+ __decorate([
103
+ (0, swagger_1.ApiProperty)({ format: 'uuid' }),
104
+ __metadata("design:type", String)
105
+ ], FollowupConfirmationResponseItemDto.prototype, "appointmentId", void 0);
106
+ __decorate([
107
+ (0, swagger_1.ApiProperty)({ enum: exports.APPOINTMENT_CONFIRMATION_ACTIONS }),
108
+ __metadata("design:type", String)
109
+ ], FollowupConfirmationResponseItemDto.prototype, "action", void 0);
110
+ __decorate([
111
+ (0, swagger_1.ApiProperty)(),
112
+ __metadata("design:type", String)
113
+ ], FollowupConfirmationResponseItemDto.prototype, "buttonId", void 0);
114
+ __decorate([
115
+ (0, swagger_1.ApiProperty)(),
116
+ __metadata("design:type", String)
117
+ ], FollowupConfirmationResponseItemDto.prototype, "buttonTitle", void 0);
118
+ __decorate([
119
+ (0, swagger_1.ApiProperty)({ example: '2026-04-03T13:11:00.000Z' }),
120
+ __metadata("design:type", String)
121
+ ], FollowupConfirmationResponseItemDto.prototype, "createdAt", void 0);
122
+ __decorate([
123
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Nome do paciente (enriquecido pelo gateway)' }),
124
+ __metadata("design:type", String)
125
+ ], FollowupConfirmationResponseItemDto.prototype, "patientName", void 0);
@@ -15,6 +15,7 @@ export * from './followup-log-response.dto';
15
15
  export * from './followup-log-list-query.dto';
16
16
  export * from './followup-log-list-response.dto';
17
17
  export * from './followup-appointment-reprocess.dto';
18
+ export * from './followup-confirmation-response.dto';
18
19
  export * from './satisfaction-response.dto';
19
20
  export * from './followup-events.dto';
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conversations/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conversations/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
@@ -31,5 +31,6 @@ __exportStar(require("./followup-log-response.dto"), exports);
31
31
  __exportStar(require("./followup-log-list-query.dto"), exports);
32
32
  __exportStar(require("./followup-log-list-response.dto"), exports);
33
33
  __exportStar(require("./followup-appointment-reprocess.dto"), exports);
34
+ __exportStar(require("./followup-confirmation-response.dto"), exports);
34
35
  __exportStar(require("./satisfaction-response.dto"), exports);
35
36
  __exportStar(require("./followup-events.dto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.6.80",
3
+ "version": "1.6.81",
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",
@@ -1,4 +1,4 @@
1
- import { ApiProperty } from '@nestjs/swagger';
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
2
 
3
3
  /** Um agendamento no calendário. */
4
4
  export class AppointmentCalendarItemDto {
@@ -10,6 +10,13 @@ export class AppointmentCalendarItemDto {
10
10
  example: '2026-04-10T14:30:00.000Z',
11
11
  })
12
12
  date: string;
13
+
14
+ @ApiPropertyOptional({
15
+ description:
16
+ 'Data/hora em que o paciente confirmou presença via WhatsApp (ISO 8601)',
17
+ example: '2026-04-09T10:30:00.000Z',
18
+ })
19
+ patientConfirmedAt?: string;
13
20
  }
14
21
 
15
22
  /** Agendamentos agrupados por hora civil UTC. */
@@ -0,0 +1,93 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
+ import { Type } from 'class-transformer';
3
+ import {
4
+ IsDateString,
5
+ IsIn,
6
+ IsInt,
7
+ IsOptional,
8
+ IsString,
9
+ IsUUID,
10
+ Max,
11
+ Min,
12
+ } from 'class-validator';
13
+
14
+ export const APPOINTMENT_CONFIRMATION_ACTIONS = ['confirm', 'reschedule'] as const;
15
+ export type AppointmentConfirmationActionDto =
16
+ (typeof APPOINTMENT_CONFIRMATION_ACTIONS)[number];
17
+
18
+ /** Query parameters for listing appointment confirmation button responses. */
19
+ export class FollowupConfirmationResponseListQueryDto {
20
+ @ApiPropertyOptional({ minimum: 1, default: 1 })
21
+ @IsOptional()
22
+ @Type(() => Number)
23
+ @IsInt()
24
+ @Min(1)
25
+ page?: number;
26
+
27
+ @ApiPropertyOptional({ minimum: 1, maximum: 100, default: 20 })
28
+ @IsOptional()
29
+ @Type(() => Number)
30
+ @IsInt()
31
+ @Min(1)
32
+ @Max(100)
33
+ limit?: number;
34
+
35
+ @ApiPropertyOptional({ format: 'uuid' })
36
+ @IsOptional()
37
+ @IsUUID('4')
38
+ patientId?: string;
39
+
40
+ @ApiPropertyOptional({ format: 'uuid' })
41
+ @IsOptional()
42
+ @IsUUID('4')
43
+ appointmentId?: string;
44
+
45
+ @ApiPropertyOptional({ enum: APPOINTMENT_CONFIRMATION_ACTIONS })
46
+ @IsOptional()
47
+ @IsString()
48
+ @IsIn([...APPOINTMENT_CONFIRMATION_ACTIONS])
49
+ action?: AppointmentConfirmationActionDto;
50
+
51
+ @ApiPropertyOptional({
52
+ description: 'Início do período (ISO 8601). Filtra por `created_at` (inclusivo).',
53
+ example: '2026-04-01T00:00:00.000Z',
54
+ })
55
+ @IsOptional()
56
+ @IsDateString()
57
+ dateFrom?: string;
58
+
59
+ @ApiPropertyOptional({
60
+ description: 'Fim do período (ISO 8601). Filtra por `created_at` (inclusivo).',
61
+ example: '2026-04-30T23:59:59.999Z',
62
+ })
63
+ @IsOptional()
64
+ @IsDateString()
65
+ dateTo?: string;
66
+ }
67
+
68
+ /** Single row from appointment_confirmation_responses. */
69
+ export class FollowupConfirmationResponseItemDto {
70
+ @ApiProperty({ format: 'uuid' })
71
+ id: string;
72
+
73
+ @ApiProperty({ format: 'uuid' })
74
+ patientId: string;
75
+
76
+ @ApiProperty({ format: 'uuid' })
77
+ appointmentId: string;
78
+
79
+ @ApiProperty({ enum: APPOINTMENT_CONFIRMATION_ACTIONS })
80
+ action: AppointmentConfirmationActionDto;
81
+
82
+ @ApiProperty()
83
+ buttonId: string;
84
+
85
+ @ApiProperty()
86
+ buttonTitle: string;
87
+
88
+ @ApiProperty({ example: '2026-04-03T13:11:00.000Z' })
89
+ createdAt: string;
90
+
91
+ @ApiPropertyOptional({ description: 'Nome do paciente (enriquecido pelo gateway)' })
92
+ patientName?: string;
93
+ }
@@ -15,5 +15,6 @@ export * from './followup-log-response.dto';
15
15
  export * from './followup-log-list-query.dto';
16
16
  export * from './followup-log-list-response.dto';
17
17
  export * from './followup-appointment-reprocess.dto';
18
+ export * from './followup-confirmation-response.dto';
18
19
  export * from './satisfaction-response.dto';
19
20
  export * from './followup-events.dto';