tychat-contracts 1.0.22 → 1.0.25

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.
Files changed (44) hide show
  1. package/dist/auth/auth-kafka.payloads.d.ts +1 -0
  2. package/dist/auth/auth-kafka.payloads.d.ts.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -0
  6. package/dist/payments/create-payment.dto.d.ts +14 -0
  7. package/dist/payments/create-payment.dto.d.ts.map +1 -0
  8. package/dist/payments/create-payment.dto.js +104 -0
  9. package/dist/payments/index.d.ts +5 -0
  10. package/dist/payments/index.d.ts.map +1 -0
  11. package/dist/payments/index.js +20 -0
  12. package/dist/payments/list-payments-query.dto.d.ts +7 -0
  13. package/dist/payments/list-payments-query.dto.d.ts.map +1 -0
  14. package/dist/payments/list-payments-query.dto.js +65 -0
  15. package/dist/payments/payment-response.dto.d.ts +14 -0
  16. package/dist/payments/payment-response.dto.d.ts.map +1 -0
  17. package/dist/payments/payment-response.dto.js +99 -0
  18. package/dist/payments/update-payment.dto.d.ts +6 -0
  19. package/dist/payments/update-payment.dto.d.ts.map +1 -0
  20. package/dist/payments/update-payment.dto.js +8 -0
  21. package/dist/professionals/professional-profile.dto.d.ts +3 -0
  22. package/dist/professionals/professional-profile.dto.d.ts.map +1 -1
  23. package/dist/professionals/professional-profile.dto.js +21 -0
  24. package/dist/users/create-user.dto.d.ts +1 -0
  25. package/dist/users/create-user.dto.d.ts.map +1 -1
  26. package/dist/users/create-user.dto.js +12 -0
  27. package/package.json +1 -1
  28. package/src/appointments/available-slots-query.dto.ts +32 -32
  29. package/src/appointments/available-slots-response.dto.ts +57 -57
  30. package/src/auth/auth-kafka.payloads.ts +1 -0
  31. package/src/index.ts +1 -0
  32. package/src/payments/create-payment.dto.ts +89 -0
  33. package/src/payments/index.ts +4 -0
  34. package/src/payments/list-payments-query.dto.ts +44 -0
  35. package/src/payments/payment-response.dto.ts +71 -0
  36. package/src/payments/update-payment.dto.ts +4 -0
  37. package/src/professionals/find-professionals-by-specialty-or-procedures.dto.ts +30 -30
  38. package/src/professionals/index.ts +3 -3
  39. package/src/professionals/professional-profile.dto.ts +80 -61
  40. package/src/specialties/create-specialty.dto.ts +15 -15
  41. package/src/specialties/index.ts +4 -4
  42. package/src/specialties/specialty.dto.ts +23 -23
  43. package/src/specialties/update-specialty.dto.ts +5 -5
  44. package/src/users/create-user.dto.ts +10 -0
@@ -14,6 +14,7 @@ export interface RefreshPayload {
14
14
  /** Payload para criação de usuário (atendente ou profissional de saúde). Quem envia deve garantir que apenas administrador pode solicitar. */
15
15
  export interface CreateUserPayload {
16
16
  tenant?: string;
17
+ name: string;
17
18
  username: string;
18
19
  password: string;
19
20
  role: 'attendant' | 'health_professional';
@@ -1 +1 @@
1
- {"version":3,"file":"auth-kafka.payloads.d.ts","sourceRoot":"","sources":["../../src/auth/auth-kafka.payloads.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,8IAA8I;AAC9I,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,WAAW,GAAG,qBAAqB,CAAC;CAC3C"}
1
+ {"version":3,"file":"auth-kafka.payloads.d.ts","sourceRoot":"","sources":["../../src/auth/auth-kafka.payloads.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,8IAA8I;AAC9I,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,WAAW,GAAG,qBAAqB,CAAC;CAC3C"}
package/dist/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export * from './procedures';
6
6
  export * from './configurations';
7
7
  export * from './specialties';
8
8
  export * from './professionals';
9
+ export * from './payments';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -22,3 +22,4 @@ __exportStar(require("./procedures"), exports);
22
22
  __exportStar(require("./configurations"), exports);
23
23
  __exportStar(require("./specialties"), exports);
24
24
  __exportStar(require("./professionals"), exports);
25
+ __exportStar(require("./payments"), exports);
@@ -0,0 +1,14 @@
1
+ export declare const PAYMENT_METHODS: readonly ["PIX", "CREDIT_CARD", "DEBIT_CARD", "VOUCHER", "CASH"];
2
+ export type PaymentMethodDto = (typeof PAYMENT_METHODS)[number];
3
+ export declare const PAYMENT_STATUSES: readonly ["PENDING", "PAYED", "REFUNDED", "CANCELED", "OVERDUE"];
4
+ export type PaymentStatusDto = (typeof PAYMENT_STATUSES)[number];
5
+ export declare class CreatePaymentDto {
6
+ method: PaymentMethodDto;
7
+ value: number;
8
+ patientId: string;
9
+ appointmentId: string;
10
+ dueDate?: string;
11
+ status?: PaymentStatusDto;
12
+ payedAt?: string;
13
+ }
14
+ //# sourceMappingURL=create-payment.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-payment.dto.d.ts","sourceRoot":"","sources":["../../src/payments/create-payment.dto.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,kEAMlB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,kEAMnB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,qBAAa,gBAAgB;IAQ3B,MAAM,EAAE,gBAAgB,CAAC;IASzB,KAAK,EAAE,MAAM,CAAC;IAQd,SAAS,EAAE,MAAM,CAAC;IAQlB,aAAa,EAAE,MAAM,CAAC;IAQtB,OAAO,CAAC,EAAE,MAAM,CAAC;IASjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAQ1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,104 @@
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.CreatePaymentDto = exports.PAYMENT_STATUSES = exports.PAYMENT_METHODS = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ exports.PAYMENT_METHODS = [
16
+ 'PIX',
17
+ 'CREDIT_CARD',
18
+ 'DEBIT_CARD',
19
+ 'VOUCHER',
20
+ 'CASH',
21
+ ];
22
+ exports.PAYMENT_STATUSES = [
23
+ 'PENDING',
24
+ 'PAYED',
25
+ 'REFUNDED',
26
+ 'CANCELED',
27
+ 'OVERDUE',
28
+ ];
29
+ class CreatePaymentDto {
30
+ method;
31
+ value;
32
+ patientId;
33
+ appointmentId;
34
+ dueDate;
35
+ status;
36
+ payedAt;
37
+ }
38
+ exports.CreatePaymentDto = CreatePaymentDto;
39
+ __decorate([
40
+ (0, swagger_1.ApiProperty)({
41
+ description: 'Payment method',
42
+ enum: exports.PAYMENT_METHODS,
43
+ example: 'PIX',
44
+ }),
45
+ (0, class_validator_1.IsEnum)(exports.PAYMENT_METHODS),
46
+ (0, class_validator_1.IsNotEmpty)(),
47
+ __metadata("design:type", String)
48
+ ], CreatePaymentDto.prototype, "method", void 0);
49
+ __decorate([
50
+ (0, swagger_1.ApiProperty)({
51
+ description: 'Payment value (must be greater than 0)',
52
+ example: 150.5,
53
+ minimum: 0.01,
54
+ }),
55
+ (0, class_validator_1.IsNumber)(),
56
+ (0, class_validator_1.Min)(0.01),
57
+ __metadata("design:type", Number)
58
+ ], CreatePaymentDto.prototype, "value", void 0);
59
+ __decorate([
60
+ (0, swagger_1.ApiProperty)({
61
+ description: 'Patient ID (UUID)',
62
+ example: '550e8400-e29b-41d4-a716-446655440000',
63
+ }),
64
+ (0, class_validator_1.IsUUID)('4'),
65
+ (0, class_validator_1.IsNotEmpty)(),
66
+ __metadata("design:type", String)
67
+ ], CreatePaymentDto.prototype, "patientId", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiProperty)({
70
+ description: 'Appointment ID (UUID)',
71
+ example: '550e8400-e29b-41d4-a716-446655440001',
72
+ }),
73
+ (0, class_validator_1.IsUUID)('4'),
74
+ (0, class_validator_1.IsNotEmpty)(),
75
+ __metadata("design:type", String)
76
+ ], CreatePaymentDto.prototype, "appointmentId", void 0);
77
+ __decorate([
78
+ (0, swagger_1.ApiPropertyOptional)({
79
+ description: 'Due date (ISO 8601). Defaults to now if not provided.',
80
+ example: '2026-03-15T23:59:59.000Z',
81
+ }),
82
+ (0, class_validator_1.IsOptional)(),
83
+ (0, class_validator_1.IsDateString)(),
84
+ __metadata("design:type", String)
85
+ ], CreatePaymentDto.prototype, "dueDate", void 0);
86
+ __decorate([
87
+ (0, swagger_1.ApiPropertyOptional)({
88
+ description: 'Payment status. Defaults to PENDING if not provided.',
89
+ enum: exports.PAYMENT_STATUSES,
90
+ default: 'PENDING',
91
+ }),
92
+ (0, class_validator_1.IsOptional)(),
93
+ (0, class_validator_1.IsEnum)(exports.PAYMENT_STATUSES),
94
+ __metadata("design:type", String)
95
+ ], CreatePaymentDto.prototype, "status", void 0);
96
+ __decorate([
97
+ (0, swagger_1.ApiPropertyOptional)({
98
+ description: 'Date when payment was completed (ISO 8601). Set when status is PAYED.',
99
+ example: '2026-03-15T14:30:00.000Z',
100
+ }),
101
+ (0, class_validator_1.IsOptional)(),
102
+ (0, class_validator_1.IsDateString)(),
103
+ __metadata("design:type", String)
104
+ ], CreatePaymentDto.prototype, "payedAt", void 0);
@@ -0,0 +1,5 @@
1
+ export * from './create-payment.dto';
2
+ export * from './update-payment.dto';
3
+ export * from './list-payments-query.dto';
4
+ export * from './payment-response.dto';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payments/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./create-payment.dto"), exports);
18
+ __exportStar(require("./update-payment.dto"), exports);
19
+ __exportStar(require("./list-payments-query.dto"), exports);
20
+ __exportStar(require("./payment-response.dto"), exports);
@@ -0,0 +1,7 @@
1
+ export declare class ListPaymentsQueryDto {
2
+ appointmentId?: string;
3
+ patientId?: string;
4
+ page?: number;
5
+ limit?: number;
6
+ }
7
+ //# sourceMappingURL=list-payments-query.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-payments-query.dto.d.ts","sourceRoot":"","sources":["../../src/payments/list-payments-query.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAO/B,aAAa,CAAC,EAAE,MAAM,CAAC;IAQvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAWnB,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,65 @@
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.ListPaymentsQueryDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class ListPaymentsQueryDto {
16
+ appointmentId;
17
+ patientId;
18
+ page;
19
+ limit;
20
+ }
21
+ exports.ListPaymentsQueryDto = ListPaymentsQueryDto;
22
+ __decorate([
23
+ (0, swagger_1.ApiPropertyOptional)({
24
+ description: 'Filter by appointment ID (UUID)',
25
+ example: '550e8400-e29b-41d4-a716-446655440001',
26
+ }),
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsUUID)('4'),
29
+ __metadata("design:type", String)
30
+ ], ListPaymentsQueryDto.prototype, "appointmentId", void 0);
31
+ __decorate([
32
+ (0, swagger_1.ApiPropertyOptional)({
33
+ description: 'Filter by patient ID (UUID)',
34
+ example: '550e8400-e29b-41d4-a716-446655440000',
35
+ }),
36
+ (0, class_validator_1.IsOptional)(),
37
+ (0, class_validator_1.IsUUID)('4'),
38
+ __metadata("design:type", String)
39
+ ], ListPaymentsQueryDto.prototype, "patientId", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiPropertyOptional)({
42
+ description: 'Page number (starting at 1)',
43
+ example: 1,
44
+ minimum: 1,
45
+ default: 1,
46
+ }),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsInt)(),
49
+ (0, class_validator_1.Min)(1),
50
+ __metadata("design:type", Number)
51
+ ], ListPaymentsQueryDto.prototype, "page", void 0);
52
+ __decorate([
53
+ (0, swagger_1.ApiPropertyOptional)({
54
+ description: 'Number of records per page',
55
+ example: 20,
56
+ minimum: 1,
57
+ maximum: 100,
58
+ default: 20,
59
+ }),
60
+ (0, class_validator_1.IsOptional)(),
61
+ (0, class_validator_1.IsInt)(),
62
+ (0, class_validator_1.Min)(1),
63
+ (0, class_validator_1.Max)(100),
64
+ __metadata("design:type", Number)
65
+ ], ListPaymentsQueryDto.prototype, "limit", void 0);
@@ -0,0 +1,14 @@
1
+ import { PaymentMethodDto, PaymentStatusDto } from './create-payment.dto';
2
+ export declare class PaymentResponseDto {
3
+ id: string;
4
+ method: PaymentMethodDto;
5
+ status: PaymentStatusDto;
6
+ value: number;
7
+ dueDate: string;
8
+ payedAt?: string | null;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ patientId: string;
12
+ appointmentId: string;
13
+ }
14
+ //# sourceMappingURL=payment-response.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-response.dto.d.ts","sourceRoot":"","sources":["../../src/payments/payment-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,kBAAkB;IAK7B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,gBAAgB,CAAC;IAOzB,MAAM,EAAE,gBAAgB,CAAC;IAMzB,KAAK,EAAE,MAAM,CAAC;IAMd,OAAO,EAAE,MAAM,CAAC;IAMhB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAMxB,SAAS,EAAE,MAAM,CAAC;IAMlB,SAAS,EAAE,MAAM,CAAC;IAMlB,SAAS,EAAE,MAAM,CAAC;IAMlB,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -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.PaymentResponseDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const create_payment_dto_1 = require("./create-payment.dto");
15
+ class PaymentResponseDto {
16
+ id;
17
+ method;
18
+ status;
19
+ value;
20
+ dueDate;
21
+ payedAt;
22
+ createdAt;
23
+ updatedAt;
24
+ patientId;
25
+ appointmentId;
26
+ }
27
+ exports.PaymentResponseDto = PaymentResponseDto;
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({
30
+ description: 'Payment ID (UUID)',
31
+ example: '550e8400-e29b-41d4-a716-446655440002',
32
+ }),
33
+ __metadata("design:type", String)
34
+ ], PaymentResponseDto.prototype, "id", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiProperty)({
37
+ description: 'Payment method',
38
+ enum: create_payment_dto_1.PAYMENT_METHODS,
39
+ example: 'PIX',
40
+ }),
41
+ __metadata("design:type", String)
42
+ ], PaymentResponseDto.prototype, "method", void 0);
43
+ __decorate([
44
+ (0, swagger_1.ApiProperty)({
45
+ description: 'Payment status',
46
+ enum: create_payment_dto_1.PAYMENT_STATUSES,
47
+ example: 'PENDING',
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], PaymentResponseDto.prototype, "status", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiProperty)({
53
+ description: 'Payment value',
54
+ example: 150.5,
55
+ }),
56
+ __metadata("design:type", Number)
57
+ ], PaymentResponseDto.prototype, "value", void 0);
58
+ __decorate([
59
+ (0, swagger_1.ApiProperty)({
60
+ description: 'Due date (ISO 8601)',
61
+ example: '2026-03-15T23:59:59.000Z',
62
+ }),
63
+ __metadata("design:type", String)
64
+ ], PaymentResponseDto.prototype, "dueDate", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiPropertyOptional)({
67
+ description: 'Date when payment was completed (ISO 8601)',
68
+ example: '2026-03-15T14:30:00.000Z',
69
+ }),
70
+ __metadata("design:type", Object)
71
+ ], PaymentResponseDto.prototype, "payedAt", void 0);
72
+ __decorate([
73
+ (0, swagger_1.ApiProperty)({
74
+ description: 'Creation timestamp (ISO 8601)',
75
+ example: '2026-03-10T12:00:00.000Z',
76
+ }),
77
+ __metadata("design:type", String)
78
+ ], PaymentResponseDto.prototype, "createdAt", void 0);
79
+ __decorate([
80
+ (0, swagger_1.ApiProperty)({
81
+ description: 'Last update timestamp (ISO 8601)',
82
+ example: '2026-03-10T12:00:00.000Z',
83
+ }),
84
+ __metadata("design:type", String)
85
+ ], PaymentResponseDto.prototype, "updatedAt", void 0);
86
+ __decorate([
87
+ (0, swagger_1.ApiProperty)({
88
+ description: 'Patient ID (UUID)',
89
+ example: '550e8400-e29b-41d4-a716-446655440000',
90
+ }),
91
+ __metadata("design:type", String)
92
+ ], PaymentResponseDto.prototype, "patientId", void 0);
93
+ __decorate([
94
+ (0, swagger_1.ApiProperty)({
95
+ description: 'Appointment ID (UUID)',
96
+ example: '550e8400-e29b-41d4-a716-446655440001',
97
+ }),
98
+ __metadata("design:type", String)
99
+ ], PaymentResponseDto.prototype, "appointmentId", void 0);
@@ -0,0 +1,6 @@
1
+ import { CreatePaymentDto } from './create-payment.dto';
2
+ declare const UpdatePaymentDto_base: import("@nestjs/common").Type<Partial<CreatePaymentDto>>;
3
+ export declare class UpdatePaymentDto extends UpdatePaymentDto_base {
4
+ }
5
+ export {};
6
+ //# sourceMappingURL=update-payment.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-payment.dto.d.ts","sourceRoot":"","sources":["../../src/payments/update-payment.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;;AAExD,qBAAa,gBAAiB,SAAQ,qBAA6B;CAAG"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdatePaymentDto = void 0;
4
+ const swagger_1 = require("@nestjs/swagger");
5
+ const create_payment_dto_1 = require("./create-payment.dto");
6
+ class UpdatePaymentDto extends (0, swagger_1.PartialType)(create_payment_dto_1.CreatePaymentDto) {
7
+ }
8
+ exports.UpdatePaymentDto = UpdatePaymentDto;
@@ -1,10 +1,13 @@
1
+ import { OpeningHoursSlotDto } from '../configurations';
1
2
  export declare class ProfessionalProfileDto {
2
3
  userId: string;
3
4
  specialtyId: string;
4
5
  procedureIds: string[];
6
+ workingHours?: OpeningHoursSlotDto[];
5
7
  }
6
8
  export declare class UpdateProfessionalProfileDto {
7
9
  specialtyId?: string;
8
10
  procedureIds?: string[];
11
+ workingHours?: OpeningHoursSlotDto[];
9
12
  }
10
13
  //# sourceMappingURL=professional-profile.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"professional-profile.dto.d.ts","sourceRoot":"","sources":["../../src/professionals/professional-profile.dto.ts"],"names":[],"mappings":"AASA,qBAAa,sBAAsB;IAMjC,MAAM,EAAE,MAAM,CAAC;IAOf,WAAW,EAAE,MAAM,CAAC;IAapB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,qBAAa,4BAA4B;IAOvC,WAAW,CAAC,EAAE,MAAM,CAAC;IAarB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB"}
1
+ {"version":3,"file":"professional-profile.dto.d.ts","sourceRoot":"","sources":["../../src/professionals/professional-profile.dto.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,qBAAa,sBAAsB;IAMjC,MAAM,EAAE,MAAM,CAAC;IAOf,WAAW,EAAE,MAAM,CAAC;IAapB,YAAY,EAAE,MAAM,EAAE,CAAC;IASvB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED,qBAAa,4BAA4B;IAOvC,WAAW,CAAC,EAAE,MAAM,CAAC;IAarB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IASxB,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC"}
@@ -12,10 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateProfessionalProfileDto = exports.ProfessionalProfileDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
+ const configurations_1 = require("../configurations");
15
16
  class ProfessionalProfileDto {
16
17
  userId;
17
18
  specialtyId;
18
19
  procedureIds;
20
+ workingHours;
19
21
  }
20
22
  exports.ProfessionalProfileDto = ProfessionalProfileDto;
21
23
  __decorate([
@@ -47,9 +49,19 @@ __decorate([
47
49
  (0, class_validator_1.IsUUID)('4', { each: true }),
48
50
  __metadata("design:type", Array)
49
51
  ], ProfessionalProfileDto.prototype, "procedureIds", void 0);
52
+ __decorate([
53
+ (0, swagger_1.ApiPropertyOptional)({
54
+ description: 'Horário de trabalho do profissional por dia da semana (0=domingo..6=sábado)',
55
+ type: [configurations_1.OpeningHoursSlotDto],
56
+ }),
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsArray)(),
59
+ __metadata("design:type", Array)
60
+ ], ProfessionalProfileDto.prototype, "workingHours", void 0);
50
61
  class UpdateProfessionalProfileDto {
51
62
  specialtyId;
52
63
  procedureIds;
64
+ workingHours;
53
65
  }
54
66
  exports.UpdateProfessionalProfileDto = UpdateProfessionalProfileDto;
55
67
  __decorate([
@@ -74,3 +86,12 @@ __decorate([
74
86
  (0, class_validator_1.IsUUID)('4', { each: true }),
75
87
  __metadata("design:type", Array)
76
88
  ], UpdateProfessionalProfileDto.prototype, "procedureIds", void 0);
89
+ __decorate([
90
+ (0, swagger_1.ApiPropertyOptional)({
91
+ description: 'Horário de trabalho do profissional por dia da semana (0=domingo..6=sábado)',
92
+ type: [configurations_1.OpeningHoursSlotDto],
93
+ }),
94
+ (0, class_validator_1.IsOptional)(),
95
+ (0, class_validator_1.IsArray)(),
96
+ __metadata("design:type", Array)
97
+ ], UpdateProfessionalProfileDto.prototype, "workingHours", void 0);
@@ -5,6 +5,7 @@
5
5
  export declare const CREATABLE_USER_ROLES: readonly ["attendant", "health_professional"];
6
6
  export type CreatableUserRole = (typeof CREATABLE_USER_ROLES)[number];
7
7
  export declare class CreateUserDto {
8
+ name: string;
8
9
  username: string;
9
10
  password: string;
10
11
  role: CreatableUserRole;
@@ -1 +1 @@
1
- {"version":3,"file":"create-user.dto.d.ts","sourceRoot":"","sources":["../../src/users/create-user.dto.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+CAAgD,CAAC;AAClF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,qBAAa,aAAa;IASxB,QAAQ,EAAE,MAAM,CAAC;IAUjB,QAAQ,EAAE,MAAM,CAAC;IAWjB,IAAI,EAAE,iBAAiB,CAAC;CACzB"}
1
+ {"version":3,"file":"create-user.dto.d.ts","sourceRoot":"","sources":["../../src/users/create-user.dto.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+CAAgD,CAAC;AAClF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,qBAAa,aAAa;IASxB,IAAI,EAAE,MAAM,CAAC;IAUb,QAAQ,EAAE,MAAM,CAAC;IAUjB,QAAQ,EAAE,MAAM,CAAC;IAWjB,IAAI,EAAE,iBAAiB,CAAC;CACzB"}
@@ -18,11 +18,23 @@ const class_validator_1 = require("class-validator");
18
18
  */
19
19
  exports.CREATABLE_USER_ROLES = ['attendant', 'health_professional'];
20
20
  class CreateUserDto {
21
+ name;
21
22
  username;
22
23
  password;
23
24
  role;
24
25
  }
25
26
  exports.CreateUserDto = CreateUserDto;
27
+ __decorate([
28
+ (0, swagger_1.ApiProperty)({
29
+ description: 'Nome completo do usuário',
30
+ example: 'Maria da Silva',
31
+ maxLength: 255,
32
+ }),
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.MinLength)(1, { message: 'name não pode ser vazio' }),
35
+ (0, class_validator_1.MaxLength)(255),
36
+ __metadata("design:type", String)
37
+ ], CreateUserDto.prototype, "name", void 0);
26
38
  __decorate([
27
39
  (0, swagger_1.ApiProperty)({
28
40
  description: 'Login do usuário (único no tenant)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.22",
3
+ "version": "1.0.25",
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,32 +1,32 @@
1
- import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
- import {
3
- ArrayNotEmpty,
4
- IsArray,
5
- IsOptional,
6
- IsUUID,
7
- } from 'class-validator';
8
-
9
- export class AvailableSlotsQueryDto {
10
- @ApiProperty({
11
- description:
12
- 'Lista de IDs de procedimentos (UUID v4) que o paciente irá realizar',
13
- example: [
14
- '550e8400-e29b-41d4-a716-446655440010',
15
- '550e8400-e29b-41d4-a716-446655440011',
16
- ],
17
- })
18
- @IsArray()
19
- @ArrayNotEmpty()
20
- @IsUUID('4', { each: true })
21
- procedureIds: string[];
22
-
23
- @ApiPropertyOptional({
24
- description:
25
- 'ID do profissional de saúde (UUID v4). Quando informado, os horários serão calculados apenas para este profissional.',
26
- example: '550e8400-e29b-41d4-a716-446655440001',
27
- })
28
- @IsOptional()
29
- @IsUUID('4')
30
- userId?: string;
31
- }
32
-
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
+ import {
3
+ ArrayNotEmpty,
4
+ IsArray,
5
+ IsOptional,
6
+ IsUUID,
7
+ } from 'class-validator';
8
+
9
+ export class AvailableSlotsQueryDto {
10
+ @ApiProperty({
11
+ description:
12
+ 'Lista de IDs de procedimentos (UUID v4) que o paciente irá realizar',
13
+ example: [
14
+ '550e8400-e29b-41d4-a716-446655440010',
15
+ '550e8400-e29b-41d4-a716-446655440011',
16
+ ],
17
+ })
18
+ @IsArray()
19
+ @ArrayNotEmpty()
20
+ @IsUUID('4', { each: true })
21
+ procedureIds: string[];
22
+
23
+ @ApiPropertyOptional({
24
+ description:
25
+ 'ID do profissional de saúde (UUID v4). Quando informado, os horários serão calculados apenas para este profissional.',
26
+ example: '550e8400-e29b-41d4-a716-446655440001',
27
+ })
28
+ @IsOptional()
29
+ @IsUUID('4')
30
+ userId?: string;
31
+ }
32
+