tychat-contracts 1.0.52 → 1.0.54

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 (34) hide show
  1. package/README.md +6 -5
  2. package/dist/configurations/clinic-configuration-with-tenant.dto.d.ts +9 -0
  3. package/dist/configurations/clinic-configuration-with-tenant.dto.d.ts.map +1 -0
  4. package/dist/configurations/clinic-configuration-with-tenant.dto.js +29 -0
  5. package/dist/configurations/configuration-tenant-summary.dto.d.ts +16 -0
  6. package/dist/configurations/configuration-tenant-summary.dto.d.ts.map +1 -0
  7. package/dist/configurations/configuration-tenant-summary.dto.js +69 -0
  8. package/dist/configurations/index.d.ts +4 -0
  9. package/dist/configurations/index.d.ts.map +1 -1
  10. package/dist/configurations/index.js +4 -0
  11. package/dist/configurations/plan-summary.dto.d.ts +20 -0
  12. package/dist/configurations/plan-summary.dto.d.ts.map +1 -0
  13. package/dist/configurations/plan-summary.dto.js +89 -0
  14. package/dist/configurations/tenant-limits-summary.dto.d.ts +14 -0
  15. package/dist/configurations/tenant-limits-summary.dto.d.ts.map +1 -0
  16. package/dist/configurations/tenant-limits-summary.dto.js +59 -0
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -0
  20. package/dist/notifications/index.d.ts +2 -0
  21. package/dist/notifications/index.d.ts.map +1 -0
  22. package/dist/notifications/index.js +6 -0
  23. package/dist/notifications/notifications-kafka.payloads.d.ts +16 -0
  24. package/dist/notifications/notifications-kafka.payloads.d.ts.map +1 -0
  25. package/dist/notifications/notifications-kafka.payloads.js +131 -0
  26. package/package.json +1 -1
  27. package/src/configurations/clinic-configuration-with-tenant.dto.ts +14 -0
  28. package/src/configurations/configuration-tenant-summary.dto.ts +40 -0
  29. package/src/configurations/index.ts +4 -0
  30. package/src/configurations/plan-summary.dto.ts +48 -0
  31. package/src/configurations/tenant-limits-summary.dto.ts +30 -0
  32. package/src/index.ts +1 -0
  33. package/src/notifications/index.ts +4 -0
  34. package/src/notifications/notifications-kafka.payloads.ts +95 -0
package/README.md CHANGED
@@ -5,8 +5,9 @@ DTOs compartilhados com **class-validator** usados pela **tychat-api** e pelos m
5
5
  ## Estrutura
6
6
 
7
7
  - **auth**: `LoginDto`, `RefreshTokenDto`, `RequestPasswordResetDto`, `ConfirmPasswordResetDto`, `AuthLoginResponseDto`, payloads Kafka (`LoginPayload`, `RequestPasswordResetPayload`, etc.)
8
- - **users**: `CreateUserDto` (sem password para criação por admin), `UserListItemDto`, `UpdateSelfUserDto`, `UpdateUserByAdminDto`, `UpdatedUserDto`, `ChangeForcePasswordDto`
8
+ - **users**: `CreateUserDto` (sem password para criação por admin), `UserListItemDto`, `UpdateSelfUserDto` (name/email), `UpdateUserByAdminDto` (name/email/role), `UpdatedUserDto`, `ChangeForcePasswordDto`
9
9
  - **professionals**: `ProfessionalProfileDto`, `UpdateProfessionalProfileDto`, `CreateProfessionalWithProfileDto`
10
+ - **notifications**: payloads Kafka para notificações de e-mail (`NotificationUserCreatedEventPayload`, `NotificationPasswordResetRequestedEventPayload`)
10
11
 
11
12
  ## Uso
12
13
 
@@ -15,18 +16,18 @@ DTOs compartilhados com **class-validator** usados pela **tychat-api** e pelos m
15
16
  npm run build
16
17
  ```
17
18
 
18
- Nos projetos que consomem (tychat-api, tychat-tenant-service):
19
+ Nos projetos que consomem (tychat-api, tychat-tenant-service, etc.):
19
20
 
20
21
  ```json
21
22
  "dependencies": {
22
- "tychat-contracts-dtos": "file:../tychat-contracts-dtos"
23
+ "tychat-contracts": "^1.0.53"
23
24
  }
24
25
  ```
25
26
 
26
27
  ```ts
27
- import { LoginDto } from 'tychat-contracts-dtos';
28
+ import { LoginDto } from 'tychat-contracts';
28
29
  ```
29
30
 
30
31
  ## Desenvolvimento
31
32
 
32
- Após alterar os DTOs, rode `npm run build` no pacote e reinstale (ou use `npm link`) nos projetos que o utilizam.
33
+ Após alterar os DTOs, rode `npm run build`, publique no registry e atualize os consumidores para a mesma versão.
@@ -0,0 +1,9 @@
1
+ import { ClinicConfigurationDto } from './clinic-configuration.dto';
2
+ import { ConfigurationTenantSummaryDto } from './configuration-tenant-summary.dto';
3
+ /**
4
+ * Clinic configuration (opening hours) plus tenant summary for the same tenant context.
5
+ */
6
+ export declare class ClinicConfigurationWithTenantDto extends ClinicConfigurationDto {
7
+ tenant: ConfigurationTenantSummaryDto;
8
+ }
9
+ //# sourceMappingURL=clinic-configuration-with-tenant.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clinic-configuration-with-tenant.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/clinic-configuration-with-tenant.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,sBAAsB;IAK1E,MAAM,EAAE,6BAA6B,CAAC;CACvC"}
@@ -0,0 +1,29 @@
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.ClinicConfigurationWithTenantDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const clinic_configuration_dto_1 = require("./clinic-configuration.dto");
15
+ const configuration_tenant_summary_dto_1 = require("./configuration-tenant-summary.dto");
16
+ /**
17
+ * Clinic configuration (opening hours) plus tenant summary for the same tenant context.
18
+ */
19
+ class ClinicConfigurationWithTenantDto extends clinic_configuration_dto_1.ClinicConfigurationDto {
20
+ tenant;
21
+ }
22
+ exports.ClinicConfigurationWithTenantDto = ClinicConfigurationWithTenantDto;
23
+ __decorate([
24
+ (0, swagger_1.ApiProperty)({
25
+ description: 'Tenant metadata (name, branding, plan, limits)',
26
+ type: () => configuration_tenant_summary_dto_1.ConfigurationTenantSummaryDto,
27
+ }),
28
+ __metadata("design:type", configuration_tenant_summary_dto_1.ConfigurationTenantSummaryDto)
29
+ ], ClinicConfigurationWithTenantDto.prototype, "tenant", void 0);
@@ -0,0 +1,16 @@
1
+ import { PlanSummaryDto } from './plan-summary.dto';
2
+ import { TenantLimitsSummaryDto } from './tenant-limits-summary.dto';
3
+ /**
4
+ * Tenant branding and subscription info returned with clinic configuration (no DB credentials).
5
+ */
6
+ export declare class ConfigurationTenantSummaryDto {
7
+ name: string;
8
+ cnpj: string;
9
+ location: string | null;
10
+ logoWhite: string | null;
11
+ logoDark: string | null;
12
+ status: 'active' | 'inactive';
13
+ plan: PlanSummaryDto | null;
14
+ limits: TenantLimitsSummaryDto | null;
15
+ }
16
+ //# sourceMappingURL=configuration-tenant-summary.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration-tenant-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/configuration-tenant-summary.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,qBAAa,6BAA6B;IAExC,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAO9B,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAO5B,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACvC"}
@@ -0,0 +1,69 @@
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.ConfigurationTenantSummaryDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const plan_summary_dto_1 = require("./plan-summary.dto");
15
+ const tenant_limits_summary_dto_1 = require("./tenant-limits-summary.dto");
16
+ /**
17
+ * Tenant branding and subscription info returned with clinic configuration (no DB credentials).
18
+ */
19
+ class ConfigurationTenantSummaryDto {
20
+ name;
21
+ cnpj;
22
+ location;
23
+ logoWhite;
24
+ logoDark;
25
+ status;
26
+ plan;
27
+ limits;
28
+ }
29
+ exports.ConfigurationTenantSummaryDto = ConfigurationTenantSummaryDto;
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({ description: 'Tenant display name', example: 'Clínica Demo' }),
32
+ __metadata("design:type", String)
33
+ ], ConfigurationTenantSummaryDto.prototype, "name", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ description: 'CNPJ', example: '12345678000199' }),
36
+ __metadata("design:type", String)
37
+ ], ConfigurationTenantSummaryDto.prototype, "cnpj", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Location / address', nullable: true }),
40
+ __metadata("design:type", Object)
41
+ ], ConfigurationTenantSummaryDto.prototype, "location", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Logo URL (light background)', nullable: true }),
44
+ __metadata("design:type", Object)
45
+ ], ConfigurationTenantSummaryDto.prototype, "logoWhite", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Logo URL (dark background)', nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], ConfigurationTenantSummaryDto.prototype, "logoDark", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiProperty)({ description: 'Tenant status', enum: ['active', 'inactive'] }),
52
+ __metadata("design:type", String)
53
+ ], ConfigurationTenantSummaryDto.prototype, "status", void 0);
54
+ __decorate([
55
+ (0, swagger_1.ApiPropertyOptional)({
56
+ description: 'Subscription plan',
57
+ type: () => plan_summary_dto_1.PlanSummaryDto,
58
+ nullable: true,
59
+ }),
60
+ __metadata("design:type", Object)
61
+ ], ConfigurationTenantSummaryDto.prototype, "plan", void 0);
62
+ __decorate([
63
+ (0, swagger_1.ApiPropertyOptional)({
64
+ description: 'Per-tenant limit overrides',
65
+ type: () => tenant_limits_summary_dto_1.TenantLimitsSummaryDto,
66
+ nullable: true,
67
+ }),
68
+ __metadata("design:type", Object)
69
+ ], ConfigurationTenantSummaryDto.prototype, "limits", void 0);
@@ -1,4 +1,8 @@
1
1
  export * from './opening-hours-slot.dto';
2
2
  export * from './update-clinic-configuration.dto';
3
3
  export * from './clinic-configuration.dto';
4
+ export * from './plan-summary.dto';
5
+ export * from './tenant-limits-summary.dto';
6
+ export * from './configuration-tenant-summary.dto';
7
+ export * from './clinic-configuration-with-tenant.dto';
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
@@ -17,3 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./opening-hours-slot.dto"), exports);
18
18
  __exportStar(require("./update-clinic-configuration.dto"), exports);
19
19
  __exportStar(require("./clinic-configuration.dto"), exports);
20
+ __exportStar(require("./plan-summary.dto"), exports);
21
+ __exportStar(require("./tenant-limits-summary.dto"), exports);
22
+ __exportStar(require("./configuration-tenant-summary.dto"), exports);
23
+ __exportStar(require("./clinic-configuration-with-tenant.dto"), exports);
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Plan fields exposed with clinic configuration (subset of core Plan entity).
3
+ */
4
+ export declare class PlanSummaryDto {
5
+ id: string;
6
+ name: string;
7
+ price: number;
8
+ recurrenceDays: number;
9
+ maxUnits: number;
10
+ status: 'active' | 'inactive';
11
+ maxWhatsappInstances: number;
12
+ maxPatients: number;
13
+ maxDoctors: number;
14
+ maxAttendants: number;
15
+ maxAdministrators: number;
16
+ maxProcedures: number;
17
+ createdAt?: Date;
18
+ updatedAt?: Date;
19
+ }
20
+ //# sourceMappingURL=plan-summary.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/plan-summary.dto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,cAAc;IAEzB,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,cAAc,EAAE,MAAM,CAAC;IAGvB,QAAQ,EAAE,MAAM,CAAC;IAGjB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAG9B,oBAAoB,EAAE,MAAM,CAAC;IAG7B,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,EAAE,MAAM,CAAC;IAGtB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,aAAa,EAAE,MAAM,CAAC;IAGtB,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -0,0 +1,89 @@
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.PlanSummaryDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /**
15
+ * Plan fields exposed with clinic configuration (subset of core Plan entity).
16
+ */
17
+ class PlanSummaryDto {
18
+ id;
19
+ name;
20
+ price;
21
+ recurrenceDays;
22
+ maxUnits;
23
+ status;
24
+ maxWhatsappInstances;
25
+ maxPatients;
26
+ maxDoctors;
27
+ maxAttendants;
28
+ maxAdministrators;
29
+ maxProcedures;
30
+ createdAt;
31
+ updatedAt;
32
+ }
33
+ exports.PlanSummaryDto = PlanSummaryDto;
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ description: 'Plan ID (UUID)', example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' }),
36
+ __metadata("design:type", String)
37
+ ], PlanSummaryDto.prototype, "id", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({ description: 'Plan display name', example: 'Professional' }),
40
+ __metadata("design:type", String)
41
+ ], PlanSummaryDto.prototype, "name", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({ description: 'Price', example: 99.9 }),
44
+ __metadata("design:type", Number)
45
+ ], PlanSummaryDto.prototype, "price", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiProperty)({ description: 'Recurrence period in days', example: 30 }),
48
+ __metadata("design:type", Number)
49
+ ], PlanSummaryDto.prototype, "recurrenceDays", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiProperty)({ description: 'Maximum units allowed by plan', example: 3 }),
52
+ __metadata("design:type", Number)
53
+ ], PlanSummaryDto.prototype, "maxUnits", void 0);
54
+ __decorate([
55
+ (0, swagger_1.ApiProperty)({ description: 'Plan status', enum: ['active', 'inactive'] }),
56
+ __metadata("design:type", String)
57
+ ], PlanSummaryDto.prototype, "status", void 0);
58
+ __decorate([
59
+ (0, swagger_1.ApiProperty)({ description: 'Max WhatsApp instances', example: 2 }),
60
+ __metadata("design:type", Number)
61
+ ], PlanSummaryDto.prototype, "maxWhatsappInstances", void 0);
62
+ __decorate([
63
+ (0, swagger_1.ApiProperty)({ description: 'Max patients', example: 5000 }),
64
+ __metadata("design:type", Number)
65
+ ], PlanSummaryDto.prototype, "maxPatients", void 0);
66
+ __decorate([
67
+ (0, swagger_1.ApiProperty)({ description: 'Max doctors', example: 20 }),
68
+ __metadata("design:type", Number)
69
+ ], PlanSummaryDto.prototype, "maxDoctors", void 0);
70
+ __decorate([
71
+ (0, swagger_1.ApiProperty)({ description: 'Max attendants', example: 10 }),
72
+ __metadata("design:type", Number)
73
+ ], PlanSummaryDto.prototype, "maxAttendants", void 0);
74
+ __decorate([
75
+ (0, swagger_1.ApiProperty)({ description: 'Max administrators', example: 5 }),
76
+ __metadata("design:type", Number)
77
+ ], PlanSummaryDto.prototype, "maxAdministrators", void 0);
78
+ __decorate([
79
+ (0, swagger_1.ApiProperty)({ description: 'Max procedures', example: 200 }),
80
+ __metadata("design:type", Number)
81
+ ], PlanSummaryDto.prototype, "maxProcedures", void 0);
82
+ __decorate([
83
+ (0, swagger_1.ApiPropertyOptional)(),
84
+ __metadata("design:type", Date)
85
+ ], PlanSummaryDto.prototype, "createdAt", void 0);
86
+ __decorate([
87
+ (0, swagger_1.ApiPropertyOptional)(),
88
+ __metadata("design:type", Date)
89
+ ], PlanSummaryDto.prototype, "updatedAt", void 0);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Tenant-specific limit overrides (nullable fields fall back to plan defaults).
3
+ */
4
+ export declare class TenantLimitsSummaryDto {
5
+ tenantId?: string;
6
+ maxPatients: number | null;
7
+ maxDoctors: number | null;
8
+ maxAttendants: number | null;
9
+ maxAdministrators: number | null;
10
+ maxProcedures: number | null;
11
+ maxWhatsappInstances: number | null;
12
+ maxUnits: number | null;
13
+ }
14
+ //# sourceMappingURL=tenant-limits-summary.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-limits-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/tenant-limits-summary.dto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,sBAAsB;IAEjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"}
@@ -0,0 +1,59 @@
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.TenantLimitsSummaryDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ /**
15
+ * Tenant-specific limit overrides (nullable fields fall back to plan defaults).
16
+ */
17
+ class TenantLimitsSummaryDto {
18
+ tenantId;
19
+ maxPatients;
20
+ maxDoctors;
21
+ maxAttendants;
22
+ maxAdministrators;
23
+ maxProcedures;
24
+ maxWhatsappInstances;
25
+ maxUnits;
26
+ }
27
+ exports.TenantLimitsSummaryDto = TenantLimitsSummaryDto;
28
+ __decorate([
29
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Tenant ID (UUID)' }),
30
+ __metadata("design:type", String)
31
+ ], TenantLimitsSummaryDto.prototype, "tenantId", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max patients' }),
34
+ __metadata("design:type", Object)
35
+ ], TenantLimitsSummaryDto.prototype, "maxPatients", void 0);
36
+ __decorate([
37
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max doctors' }),
38
+ __metadata("design:type", Object)
39
+ ], TenantLimitsSummaryDto.prototype, "maxDoctors", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max attendants' }),
42
+ __metadata("design:type", Object)
43
+ ], TenantLimitsSummaryDto.prototype, "maxAttendants", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max administrators' }),
46
+ __metadata("design:type", Object)
47
+ ], TenantLimitsSummaryDto.prototype, "maxAdministrators", void 0);
48
+ __decorate([
49
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max procedures' }),
50
+ __metadata("design:type", Object)
51
+ ], TenantLimitsSummaryDto.prototype, "maxProcedures", void 0);
52
+ __decorate([
53
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max WhatsApp instances' }),
54
+ __metadata("design:type", Object)
55
+ ], TenantLimitsSummaryDto.prototype, "maxWhatsappInstances", void 0);
56
+ __decorate([
57
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Override max units' }),
58
+ __metadata("design:type", Object)
59
+ ], TenantLimitsSummaryDto.prototype, "maxUnits", void 0);
package/dist/index.d.ts CHANGED
@@ -10,4 +10,5 @@ export * from './payments';
10
10
  export * from './billing';
11
11
  export * from './ai';
12
12
  export * from './storage';
13
+ export * from './notifications';
13
14
  //# 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;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,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;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -26,3 +26,4 @@ __exportStar(require("./payments"), exports);
26
26
  __exportStar(require("./billing"), exports);
27
27
  __exportStar(require("./ai"), exports);
28
28
  __exportStar(require("./storage"), exports);
29
+ __exportStar(require("./notifications"), exports);
@@ -0,0 +1,2 @@
1
+ export { NotificationUserCreatedEventPayload, NotificationPasswordResetRequestedEventPayload, } from './notifications-kafka.payloads';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,8CAA8C,GAC/C,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationPasswordResetRequestedEventPayload = exports.NotificationUserCreatedEventPayload = void 0;
4
+ var notifications_kafka_payloads_1 = require("./notifications-kafka.payloads");
5
+ Object.defineProperty(exports, "NotificationUserCreatedEventPayload", { enumerable: true, get: function () { return notifications_kafka_payloads_1.NotificationUserCreatedEventPayload; } });
6
+ Object.defineProperty(exports, "NotificationPasswordResetRequestedEventPayload", { enumerable: true, get: function () { return notifications_kafka_payloads_1.NotificationPasswordResetRequestedEventPayload; } });
@@ -0,0 +1,16 @@
1
+ export declare class NotificationUserCreatedEventPayload {
2
+ eventId: string;
3
+ tenant: string;
4
+ email: string;
5
+ name: string;
6
+ password: string;
7
+ occurredAt: string;
8
+ }
9
+ export declare class NotificationPasswordResetRequestedEventPayload {
10
+ eventId: string;
11
+ tenant: string;
12
+ email: string;
13
+ verifyToken: string;
14
+ occurredAt: string;
15
+ }
16
+ //# sourceMappingURL=notifications-kafka.payloads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications-kafka.payloads.d.ts","sourceRoot":"","sources":["../../src/notifications/notifications-kafka.payloads.ts"],"names":[],"mappings":"AAGA,qBAAa,mCAAmC;IAM9C,OAAO,EAAE,MAAM,CAAC;IAShB,MAAM,EAAE,MAAM,CAAC;IAQf,KAAK,EAAE,MAAM,CAAC;IASd,IAAI,EAAE,MAAM,CAAC;IASb,QAAQ,EAAE,MAAM,CAAC;IAOjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,8CAA8C;IAMzD,OAAO,EAAE,MAAM,CAAC;IAShB,MAAM,EAAE,MAAM,CAAC;IAQf,KAAK,EAAE,MAAM,CAAC;IASd,WAAW,EAAE,MAAM,CAAC;IAOpB,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,131 @@
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.NotificationPasswordResetRequestedEventPayload = exports.NotificationUserCreatedEventPayload = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class NotificationUserCreatedEventPayload {
16
+ eventId;
17
+ tenant;
18
+ email;
19
+ name;
20
+ password;
21
+ occurredAt;
22
+ }
23
+ exports.NotificationUserCreatedEventPayload = NotificationUserCreatedEventPayload;
24
+ __decorate([
25
+ (0, swagger_1.ApiProperty)({
26
+ description: 'Unique event id used for idempotent processing',
27
+ example: '2d3ecf0d-8d38-4b95-95c8-d3e903e6f1fe',
28
+ }),
29
+ (0, class_validator_1.IsUUID)(),
30
+ __metadata("design:type", String)
31
+ ], NotificationUserCreatedEventPayload.prototype, "eventId", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiProperty)({
34
+ description: 'Tenant slug that owns the user',
35
+ example: 'default',
36
+ }),
37
+ (0, class_validator_1.IsString)(),
38
+ (0, class_validator_1.MinLength)(1),
39
+ (0, class_validator_1.MaxLength)(255),
40
+ __metadata("design:type", String)
41
+ ], NotificationUserCreatedEventPayload.prototype, "tenant", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({
44
+ description: 'Created user email address',
45
+ example: 'maria.silva@example.com',
46
+ }),
47
+ (0, class_validator_1.IsEmail)(),
48
+ (0, class_validator_1.MaxLength)(255),
49
+ __metadata("design:type", String)
50
+ ], NotificationUserCreatedEventPayload.prototype, "email", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiProperty)({
53
+ description: 'Created user display name',
54
+ example: 'Maria Silva',
55
+ }),
56
+ (0, class_validator_1.IsString)(),
57
+ (0, class_validator_1.MinLength)(1),
58
+ (0, class_validator_1.MaxLength)(255),
59
+ __metadata("design:type", String)
60
+ ], NotificationUserCreatedEventPayload.prototype, "name", void 0);
61
+ __decorate([
62
+ (0, swagger_1.ApiProperty)({
63
+ description: 'Temporary generated password',
64
+ example: 'tmp-9f2adce',
65
+ }),
66
+ (0, class_validator_1.IsString)(),
67
+ (0, class_validator_1.MinLength)(6),
68
+ (0, class_validator_1.MaxLength)(255),
69
+ __metadata("design:type", String)
70
+ ], NotificationUserCreatedEventPayload.prototype, "password", void 0);
71
+ __decorate([
72
+ (0, swagger_1.ApiProperty)({
73
+ description: 'Timestamp when the event was created',
74
+ example: '2026-03-22T12:30:00.000Z',
75
+ }),
76
+ (0, class_validator_1.IsISO8601)(),
77
+ __metadata("design:type", String)
78
+ ], NotificationUserCreatedEventPayload.prototype, "occurredAt", void 0);
79
+ class NotificationPasswordResetRequestedEventPayload {
80
+ eventId;
81
+ tenant;
82
+ email;
83
+ verifyToken;
84
+ occurredAt;
85
+ }
86
+ exports.NotificationPasswordResetRequestedEventPayload = NotificationPasswordResetRequestedEventPayload;
87
+ __decorate([
88
+ (0, swagger_1.ApiProperty)({
89
+ description: 'Unique event id used for idempotent processing',
90
+ example: 'f5b3790a-1134-4db2-b4e0-ff40ce59d047',
91
+ }),
92
+ (0, class_validator_1.IsUUID)(),
93
+ __metadata("design:type", String)
94
+ ], NotificationPasswordResetRequestedEventPayload.prototype, "eventId", void 0);
95
+ __decorate([
96
+ (0, swagger_1.ApiProperty)({
97
+ description: 'Tenant slug that owns the user',
98
+ example: 'default',
99
+ }),
100
+ (0, class_validator_1.IsString)(),
101
+ (0, class_validator_1.MinLength)(1),
102
+ (0, class_validator_1.MaxLength)(255),
103
+ __metadata("design:type", String)
104
+ ], NotificationPasswordResetRequestedEventPayload.prototype, "tenant", void 0);
105
+ __decorate([
106
+ (0, swagger_1.ApiProperty)({
107
+ description: 'User email that requested password reset',
108
+ example: 'maria.silva@example.com',
109
+ }),
110
+ (0, class_validator_1.IsEmail)(),
111
+ (0, class_validator_1.MaxLength)(255),
112
+ __metadata("design:type", String)
113
+ ], NotificationPasswordResetRequestedEventPayload.prototype, "email", void 0);
114
+ __decorate([
115
+ (0, swagger_1.ApiProperty)({
116
+ description: 'Password reset verification token',
117
+ example: 'a3b5f3c1f3c6ef',
118
+ }),
119
+ (0, class_validator_1.IsString)(),
120
+ (0, class_validator_1.MinLength)(1),
121
+ (0, class_validator_1.MaxLength)(255),
122
+ __metadata("design:type", String)
123
+ ], NotificationPasswordResetRequestedEventPayload.prototype, "verifyToken", void 0);
124
+ __decorate([
125
+ (0, swagger_1.ApiProperty)({
126
+ description: 'Timestamp when the event was created',
127
+ example: '2026-03-22T12:30:00.000Z',
128
+ }),
129
+ (0, class_validator_1.IsISO8601)(),
130
+ __metadata("design:type", String)
131
+ ], NotificationPasswordResetRequestedEventPayload.prototype, "occurredAt", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
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,14 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { ClinicConfigurationDto } from './clinic-configuration.dto';
3
+ import { ConfigurationTenantSummaryDto } from './configuration-tenant-summary.dto';
4
+
5
+ /**
6
+ * Clinic configuration (opening hours) plus tenant summary for the same tenant context.
7
+ */
8
+ export class ClinicConfigurationWithTenantDto extends ClinicConfigurationDto {
9
+ @ApiProperty({
10
+ description: 'Tenant metadata (name, branding, plan, limits)',
11
+ type: () => ConfigurationTenantSummaryDto,
12
+ })
13
+ tenant: ConfigurationTenantSummaryDto;
14
+ }
@@ -0,0 +1,40 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
+ import { PlanSummaryDto } from './plan-summary.dto';
3
+ import { TenantLimitsSummaryDto } from './tenant-limits-summary.dto';
4
+
5
+ /**
6
+ * Tenant branding and subscription info returned with clinic configuration (no DB credentials).
7
+ */
8
+ export class ConfigurationTenantSummaryDto {
9
+ @ApiProperty({ description: 'Tenant display name', example: 'Clínica Demo' })
10
+ name: string;
11
+
12
+ @ApiProperty({ description: 'CNPJ', example: '12345678000199' })
13
+ cnpj: string;
14
+
15
+ @ApiPropertyOptional({ description: 'Location / address', nullable: true })
16
+ location: string | null;
17
+
18
+ @ApiPropertyOptional({ description: 'Logo URL (light background)', nullable: true })
19
+ logoWhite: string | null;
20
+
21
+ @ApiPropertyOptional({ description: 'Logo URL (dark background)', nullable: true })
22
+ logoDark: string | null;
23
+
24
+ @ApiProperty({ description: 'Tenant status', enum: ['active', 'inactive'] })
25
+ status: 'active' | 'inactive';
26
+
27
+ @ApiPropertyOptional({
28
+ description: 'Subscription plan',
29
+ type: () => PlanSummaryDto,
30
+ nullable: true,
31
+ })
32
+ plan: PlanSummaryDto | null;
33
+
34
+ @ApiPropertyOptional({
35
+ description: 'Per-tenant limit overrides',
36
+ type: () => TenantLimitsSummaryDto,
37
+ nullable: true,
38
+ })
39
+ limits: TenantLimitsSummaryDto | null;
40
+ }
@@ -1,3 +1,7 @@
1
1
  export * from './opening-hours-slot.dto';
2
2
  export * from './update-clinic-configuration.dto';
3
3
  export * from './clinic-configuration.dto';
4
+ export * from './plan-summary.dto';
5
+ export * from './tenant-limits-summary.dto';
6
+ export * from './configuration-tenant-summary.dto';
7
+ export * from './clinic-configuration-with-tenant.dto';
@@ -0,0 +1,48 @@
1
+ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
+
3
+ /**
4
+ * Plan fields exposed with clinic configuration (subset of core Plan entity).
5
+ */
6
+ export class PlanSummaryDto {
7
+ @ApiProperty({ description: 'Plan ID (UUID)', example: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' })
8
+ id: string;
9
+
10
+ @ApiProperty({ description: 'Plan display name', example: 'Professional' })
11
+ name: string;
12
+
13
+ @ApiProperty({ description: 'Price', example: 99.9 })
14
+ price: number;
15
+
16
+ @ApiProperty({ description: 'Recurrence period in days', example: 30 })
17
+ recurrenceDays: number;
18
+
19
+ @ApiProperty({ description: 'Maximum units allowed by plan', example: 3 })
20
+ maxUnits: number;
21
+
22
+ @ApiProperty({ description: 'Plan status', enum: ['active', 'inactive'] })
23
+ status: 'active' | 'inactive';
24
+
25
+ @ApiProperty({ description: 'Max WhatsApp instances', example: 2 })
26
+ maxWhatsappInstances: number;
27
+
28
+ @ApiProperty({ description: 'Max patients', example: 5000 })
29
+ maxPatients: number;
30
+
31
+ @ApiProperty({ description: 'Max doctors', example: 20 })
32
+ maxDoctors: number;
33
+
34
+ @ApiProperty({ description: 'Max attendants', example: 10 })
35
+ maxAttendants: number;
36
+
37
+ @ApiProperty({ description: 'Max administrators', example: 5 })
38
+ maxAdministrators: number;
39
+
40
+ @ApiProperty({ description: 'Max procedures', example: 200 })
41
+ maxProcedures: number;
42
+
43
+ @ApiPropertyOptional()
44
+ createdAt?: Date;
45
+
46
+ @ApiPropertyOptional()
47
+ updatedAt?: Date;
48
+ }
@@ -0,0 +1,30 @@
1
+ import { ApiPropertyOptional } from '@nestjs/swagger';
2
+
3
+ /**
4
+ * Tenant-specific limit overrides (nullable fields fall back to plan defaults).
5
+ */
6
+ export class TenantLimitsSummaryDto {
7
+ @ApiPropertyOptional({ description: 'Tenant ID (UUID)' })
8
+ tenantId?: string;
9
+
10
+ @ApiPropertyOptional({ description: 'Override max patients' })
11
+ maxPatients: number | null;
12
+
13
+ @ApiPropertyOptional({ description: 'Override max doctors' })
14
+ maxDoctors: number | null;
15
+
16
+ @ApiPropertyOptional({ description: 'Override max attendants' })
17
+ maxAttendants: number | null;
18
+
19
+ @ApiPropertyOptional({ description: 'Override max administrators' })
20
+ maxAdministrators: number | null;
21
+
22
+ @ApiPropertyOptional({ description: 'Override max procedures' })
23
+ maxProcedures: number | null;
24
+
25
+ @ApiPropertyOptional({ description: 'Override max WhatsApp instances' })
26
+ maxWhatsappInstances: number | null;
27
+
28
+ @ApiPropertyOptional({ description: 'Override max units' })
29
+ maxUnits: number | null;
30
+ }
package/src/index.ts CHANGED
@@ -10,3 +10,4 @@ export * from './payments';
10
10
  export * from './billing';
11
11
  export * from './ai';
12
12
  export * from './storage';
13
+ export * from './notifications';
@@ -0,0 +1,4 @@
1
+ export {
2
+ NotificationUserCreatedEventPayload,
3
+ NotificationPasswordResetRequestedEventPayload,
4
+ } from './notifications-kafka.payloads';
@@ -0,0 +1,95 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { IsEmail, IsISO8601, IsString, IsUUID, MaxLength, MinLength } from 'class-validator';
3
+
4
+ export class NotificationUserCreatedEventPayload {
5
+ @ApiProperty({
6
+ description: 'Unique event id used for idempotent processing',
7
+ example: '2d3ecf0d-8d38-4b95-95c8-d3e903e6f1fe',
8
+ })
9
+ @IsUUID()
10
+ eventId: string;
11
+
12
+ @ApiProperty({
13
+ description: 'Tenant slug that owns the user',
14
+ example: 'default',
15
+ })
16
+ @IsString()
17
+ @MinLength(1)
18
+ @MaxLength(255)
19
+ tenant: string;
20
+
21
+ @ApiProperty({
22
+ description: 'Created user email address',
23
+ example: 'maria.silva@example.com',
24
+ })
25
+ @IsEmail()
26
+ @MaxLength(255)
27
+ email: string;
28
+
29
+ @ApiProperty({
30
+ description: 'Created user display name',
31
+ example: 'Maria Silva',
32
+ })
33
+ @IsString()
34
+ @MinLength(1)
35
+ @MaxLength(255)
36
+ name: string;
37
+
38
+ @ApiProperty({
39
+ description: 'Temporary generated password',
40
+ example: 'tmp-9f2adce',
41
+ })
42
+ @IsString()
43
+ @MinLength(6)
44
+ @MaxLength(255)
45
+ password: string;
46
+
47
+ @ApiProperty({
48
+ description: 'Timestamp when the event was created',
49
+ example: '2026-03-22T12:30:00.000Z',
50
+ })
51
+ @IsISO8601()
52
+ occurredAt: string;
53
+ }
54
+
55
+ export class NotificationPasswordResetRequestedEventPayload {
56
+ @ApiProperty({
57
+ description: 'Unique event id used for idempotent processing',
58
+ example: 'f5b3790a-1134-4db2-b4e0-ff40ce59d047',
59
+ })
60
+ @IsUUID()
61
+ eventId: string;
62
+
63
+ @ApiProperty({
64
+ description: 'Tenant slug that owns the user',
65
+ example: 'default',
66
+ })
67
+ @IsString()
68
+ @MinLength(1)
69
+ @MaxLength(255)
70
+ tenant: string;
71
+
72
+ @ApiProperty({
73
+ description: 'User email that requested password reset',
74
+ example: 'maria.silva@example.com',
75
+ })
76
+ @IsEmail()
77
+ @MaxLength(255)
78
+ email: string;
79
+
80
+ @ApiProperty({
81
+ description: 'Password reset verification token',
82
+ example: 'a3b5f3c1f3c6ef',
83
+ })
84
+ @IsString()
85
+ @MinLength(1)
86
+ @MaxLength(255)
87
+ verifyToken: string;
88
+
89
+ @ApiProperty({
90
+ description: 'Timestamp when the event was created',
91
+ example: '2026-03-22T12:30:00.000Z',
92
+ })
93
+ @IsISO8601()
94
+ occurredAt: string;
95
+ }