tychat-contracts 1.0.26 → 1.0.27

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,3 @@
1
+ export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished"];
2
+ export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
3
+ //# sourceMappingURL=appointment-status.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appointment-status.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-status.dto.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,0DAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APPOINTMENT_STATUSES = void 0;
4
+ exports.APPOINTMENT_STATUSES = [
5
+ 'pending',
6
+ 'processing',
7
+ 'sended',
8
+ 'finished',
9
+ ];
@@ -0,0 +1,11 @@
1
+ import { AppointmentStatusDto } from "./appointment-status.dto";
2
+ export interface AppointmentDto {
3
+ id: string;
4
+ patientId: string;
5
+ userId: string;
6
+ date: string;
7
+ checkinCompleted: boolean;
8
+ checkoutCompleted: boolean;
9
+ status: AppointmentStatusDto;
10
+ }
11
+ //# sourceMappingURL=appointment.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IAMX,SAAS,EAAE,MAAM,CAAC;IAKlB,MAAM,EAAE,MAAM,CAAC;IAKf,IAAI,EAAE,MAAM,CAAC;IAKb,gBAAgB,EAAE,OAAO,CAAC;IAK1B,iBAAiB,EAAE,OAAO,CAAC;IAK3B,MAAM,EAAE,oBAAoB,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,4 @@
1
- export declare const APPOINTMENT_STATUSES: readonly ["pending", "processing", "sended", "finished"];
2
- export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
1
+ import { AppointmentStatusDto } from './appointment-status.dto';
3
2
  export declare class CreateAppointmentDto {
4
3
  patientId: string;
5
4
  date: string;
@@ -1 +1 @@
1
- {"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,0DAKvB,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,qBAAa,oBAAoB;IAO/B,SAAS,EAAE,MAAM,CAAC;IAOlB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
1
+ {"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AASA,OAAO,EAAwB,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAItF,qBAAa,oBAAoB;IAO/B,SAAS,EAAE,MAAM,CAAC;IAOlB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
@@ -9,15 +9,10 @@ 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.CreateAppointmentDto = exports.APPOINTMENT_STATUSES = void 0;
12
+ exports.CreateAppointmentDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
- exports.APPOINTMENT_STATUSES = [
16
- 'pending',
17
- 'processing',
18
- 'sended',
19
- 'finished',
20
- ];
15
+ const appointment_status_dto_1 = require("./appointment-status.dto");
21
16
  class CreateAppointmentDto {
22
17
  patientId;
23
18
  date;
@@ -76,10 +71,10 @@ __decorate([
76
71
  __decorate([
77
72
  (0, swagger_1.ApiPropertyOptional)({
78
73
  description: 'Status do agendamento',
79
- enum: exports.APPOINTMENT_STATUSES,
74
+ enum: appointment_status_dto_1.APPOINTMENT_STATUSES,
80
75
  default: 'pending',
81
76
  }),
82
77
  (0, class_validator_1.IsOptional)(),
83
- (0, class_validator_1.IsEnum)(exports.APPOINTMENT_STATUSES),
78
+ (0, class_validator_1.IsEnum)(appointment_status_dto_1.APPOINTMENT_STATUSES),
84
79
  __metadata("design:type", String)
85
80
  ], CreateAppointmentDto.prototype, "status", void 0);
@@ -3,4 +3,6 @@ export * from './update-appointment.dto';
3
3
  export * from './list-appointments-query.dto';
4
4
  export * from './available-slots-query.dto';
5
5
  export * from './available-slots-response.dto';
6
+ export * from './appointment-status.dto';
7
+ export * from './appointment.dto';
6
8
  //# 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"}
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"}
@@ -19,3 +19,5 @@ __exportStar(require("./update-appointment.dto"), exports);
19
19
  __exportStar(require("./list-appointments-query.dto"), exports);
20
20
  __exportStar(require("./available-slots-query.dto"), exports);
21
21
  __exportStar(require("./available-slots-response.dto"), exports);
22
+ __exportStar(require("./appointment-status.dto"), exports);
23
+ __exportStar(require("./appointment.dto"), exports);
@@ -1,3 +1,4 @@
1
+ import { AppointmentDto } from './appointment.dto';
1
2
  export declare class ListAppointmentsQueryDto {
2
3
  page?: number;
3
4
  limit?: number;
@@ -7,4 +8,10 @@ export declare class ListAppointmentsQueryDto {
7
8
  checkinCompleted?: boolean;
8
9
  patientId?: string;
9
10
  }
11
+ export interface AppointmentListResult {
12
+ items: AppointmentDto[];
13
+ total: number;
14
+ page: number;
15
+ limit: number;
16
+ }
10
17
  //# sourceMappingURL=list-appointments-query.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,wBAAwB;IAUnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAQ3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"list-appointments-query.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/list-appointments-query.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,wBAAwB;IAUnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAQ3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
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,7 @@
1
+ export const APPOINTMENT_STATUSES = [
2
+ 'pending',
3
+ 'processing',
4
+ 'sended',
5
+ 'finished',
6
+ ] as const;
7
+ export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
@@ -0,0 +1,36 @@
1
+ import { AppointmentStatusDto } from "./appointment-status.dto";
2
+
3
+ export interface AppointmentDto {
4
+ id: string;
5
+
6
+ /*
7
+ * ID do paciente (UUID)
8
+ * @example '550e8400-e29b-41d4-a716-446655440000'
9
+ */
10
+ patientId: string;
11
+ /*
12
+ * ID do profissional de saúde atrelado ao agendamento (UUID)
13
+ * @example '550e8400-e29b-41d4-a716-446655440001'
14
+ */
15
+ userId: string;
16
+ /*
17
+ * Data e hora do agendamento (ISO 8601)
18
+ * @example '2026-03-15T14:00:00.000Z'
19
+ */
20
+ date: string;
21
+ /*
22
+ * Indica se o check-in foi realizado
23
+ * @example false
24
+ */
25
+ checkinCompleted: boolean;
26
+ /*
27
+ * Indica se o check-out foi realizado
28
+ * @example false
29
+ */
30
+ checkoutCompleted: boolean;
31
+ /*
32
+ * Status do agendamento
33
+ * @example 'pending'
34
+ */
35
+ status: AppointmentStatusDto;
36
+ }
@@ -7,14 +7,9 @@ import {
7
7
  IsOptional,
8
8
  IsUUID,
9
9
  } from 'class-validator';
10
+ import { APPOINTMENT_STATUSES, AppointmentStatusDto } from './appointment-status.dto';
11
+
10
12
 
11
- export const APPOINTMENT_STATUSES = [
12
- 'pending',
13
- 'processing',
14
- 'sended',
15
- 'finished',
16
- ] as const;
17
- export type AppointmentStatusDto = (typeof APPOINTMENT_STATUSES)[number];
18
13
 
19
14
  export class CreateAppointmentDto {
20
15
  @ApiProperty({
@@ -3,3 +3,5 @@ export * from './update-appointment.dto';
3
3
  export * from './list-appointments-query.dto';
4
4
  export * from './available-slots-query.dto';
5
5
  export * from './available-slots-response.dto';
6
+ export * from './appointment-status.dto';
7
+ export * from './appointment.dto';
@@ -1,5 +1,6 @@
1
1
  import { ApiPropertyOptional } from '@nestjs/swagger';
2
2
  import { IsBoolean, IsDateString, IsInt, IsOptional, IsUUID, Max, Min } from 'class-validator';
3
+ import { AppointmentDto } from './appointment.dto';
3
4
 
4
5
  export class ListAppointmentsQueryDto {
5
6
  @ApiPropertyOptional({
@@ -66,3 +67,10 @@ export class ListAppointmentsQueryDto {
66
67
  @IsUUID('4')
67
68
  patientId?: string;
68
69
  }
70
+
71
+ export interface AppointmentListResult {
72
+ items: AppointmentDto[];
73
+ total: number;
74
+ page: number;
75
+ limit: number;
76
+ }
Binary file
Binary file