tychat-contracts 1.0.79 → 1.0.80

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,8 @@ export declare const TOPIC_MESSAGE_SENT = "MESSAGE_SENT";
2
2
  export declare const TOPIC_MESSAGE_RECEIVED = "MESSAGE_RECEIVED";
3
3
  export declare const TOPIC_FOLLOWUP_CONFIG_UPDATED = "FOLLOWUP_CONFIG_UPDATED";
4
4
  export declare const TOPIC_APPOINTMENT_CHANGED = "APPOINTMENT_CHANGED";
5
+ /** Kafka request-reply: list follow-up logs (paginated, filters). */
6
+ export declare const TOPIC_FOLLOWUP_LOG_LIST = "followup.log.list";
5
7
  export declare class FollowupConversationEventPayload {
6
8
  tenant: string;
7
9
  patientId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"followup-events.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-events.dto.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AACvE,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,qBAAa,gCAAgC;IAK3C,MAAM,EAAE,MAAM,CAAC;IAMf,SAAS,EAAE,MAAM,CAAC;IAIlB,WAAW,EAAE,MAAM,CAAC;IAIpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,WAAW,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,CAAC;IAKxC,UAAU,CAAC,EAAE,OAAO,CAAC;IAIrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,iCAAiC;IAK5C,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,CAAC,EAAE,MAAM,CAAC;IAMhB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAIhC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,q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MAAM,CAAC;IAKxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAIlB,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -9,13 +9,15 @@ 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.AppointmentChangedEventPayload = exports.FollowupConfigUpdatedEventPayload = exports.FollowupConversationEventPayload = exports.TOPIC_APPOINTMENT_CHANGED = exports.TOPIC_FOLLOWUP_CONFIG_UPDATED = exports.TOPIC_MESSAGE_RECEIVED = exports.TOPIC_MESSAGE_SENT = void 0;
12
+ exports.AppointmentChangedEventPayload = exports.FollowupConfigUpdatedEventPayload = exports.FollowupConversationEventPayload = exports.TOPIC_FOLLOWUP_LOG_LIST = exports.TOPIC_APPOINTMENT_CHANGED = exports.TOPIC_FOLLOWUP_CONFIG_UPDATED = exports.TOPIC_MESSAGE_RECEIVED = exports.TOPIC_MESSAGE_SENT = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
15
  exports.TOPIC_MESSAGE_SENT = 'MESSAGE_SENT';
16
16
  exports.TOPIC_MESSAGE_RECEIVED = 'MESSAGE_RECEIVED';
17
17
  exports.TOPIC_FOLLOWUP_CONFIG_UPDATED = 'FOLLOWUP_CONFIG_UPDATED';
18
18
  exports.TOPIC_APPOINTMENT_CHANGED = 'APPOINTMENT_CHANGED';
19
+ /** Kafka request-reply: list follow-up logs (paginated, filters). */
20
+ exports.TOPIC_FOLLOWUP_LOG_LIST = 'followup.log.list';
19
21
  class FollowupConversationEventPayload {
20
22
  tenant;
21
23
  patientId;
@@ -0,0 +1,14 @@
1
+ import { ConversationIntentionDto } from './conversation-intention.dto';
2
+ import { FollowupTypeDto } from './followup-type.dto';
3
+ /**
4
+ * Query parameters for listing follow-up logs (HTTP query + Kafka payload).
5
+ */
6
+ export declare class FollowupLogListQueryDto {
7
+ page?: number;
8
+ limit?: number;
9
+ patientId?: string;
10
+ sessionUuid?: string;
11
+ intention?: ConversationIntentionDto;
12
+ followupType?: FollowupTypeDto;
13
+ }
14
+ //# sourceMappingURL=followup-log-list-query.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"followup-log-list-query.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-log-list-query.dto.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAkB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;GAEG;AACH,qBAAa,uBAAuB;IAMlC,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,SAAS,CAAC,EAAE,wBAAwB,CAAC;IAQrC,YAAY,CAAC,EAAE,eAAe,CAAC;CAChC"}
@@ -0,0 +1,76 @@
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.FollowupLogListQueryDto = 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
+ const conversation_intention_dto_1 = require("./conversation-intention.dto");
17
+ const followup_type_dto_1 = require("./followup-type.dto");
18
+ /**
19
+ * Query parameters for listing follow-up logs (HTTP query + Kafka payload).
20
+ */
21
+ class FollowupLogListQueryDto {
22
+ page;
23
+ limit;
24
+ patientId;
25
+ sessionUuid;
26
+ intention;
27
+ followupType;
28
+ }
29
+ exports.FollowupLogListQueryDto = FollowupLogListQueryDto;
30
+ __decorate([
31
+ (0, swagger_1.ApiPropertyOptional)({ minimum: 1, default: 1 }),
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_transformer_1.Type)(() => Number),
34
+ (0, class_validator_1.IsInt)(),
35
+ (0, class_validator_1.Min)(1),
36
+ __metadata("design:type", Number)
37
+ ], FollowupLogListQueryDto.prototype, "page", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiPropertyOptional)({ minimum: 1, maximum: 100, default: 20 }),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_transformer_1.Type)(() => Number),
42
+ (0, class_validator_1.IsInt)(),
43
+ (0, class_validator_1.Min)(1),
44
+ (0, class_validator_1.Max)(100),
45
+ __metadata("design:type", Number)
46
+ ], FollowupLogListQueryDto.prototype, "limit", void 0);
47
+ __decorate([
48
+ (0, swagger_1.ApiPropertyOptional)({ format: 'uuid' }),
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsUUID)('4'),
51
+ __metadata("design:type", String)
52
+ ], FollowupLogListQueryDto.prototype, "patientId", void 0);
53
+ __decorate([
54
+ (0, swagger_1.ApiPropertyOptional)({ format: 'uuid' }),
55
+ (0, class_validator_1.IsOptional)(),
56
+ (0, class_validator_1.IsUUID)('4'),
57
+ __metadata("design:type", String)
58
+ ], FollowupLogListQueryDto.prototype, "sessionUuid", void 0);
59
+ __decorate([
60
+ (0, swagger_1.ApiPropertyOptional)({
61
+ enum: conversation_intention_dto_1.CONVERSATION_INTENTIONS,
62
+ description: 'Filter by intention stored when the follow-up was sent',
63
+ }),
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsIn)([...conversation_intention_dto_1.CONVERSATION_INTENTIONS]),
66
+ __metadata("design:type", String)
67
+ ], FollowupLogListQueryDto.prototype, "intention", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiPropertyOptional)({
70
+ enum: followup_type_dto_1.FOLLOWUP_TYPES,
71
+ description: 'Filter by follow-up type',
72
+ }),
73
+ (0, class_validator_1.IsOptional)(),
74
+ (0, class_validator_1.IsIn)([...followup_type_dto_1.FOLLOWUP_TYPES]),
75
+ __metadata("design:type", String)
76
+ ], FollowupLogListQueryDto.prototype, "followupType", void 0);
@@ -0,0 +1,12 @@
1
+ import { FollowupLogResponseDto } from './followup-log-response.dto';
2
+ /**
3
+ * Paginated list of follow-up log entries.
4
+ */
5
+ export declare class FollowupLogListResponseDto {
6
+ items: FollowupLogResponseDto[];
7
+ total: number;
8
+ page: number;
9
+ limit: number;
10
+ totalPages: number;
11
+ }
12
+ //# sourceMappingURL=followup-log-list-response.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"followup-log-list-response.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/followup-log-list-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,qBAAa,0BAA0B;IAErC,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAGhC,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,45 @@
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.FollowupLogListResponseDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const followup_log_response_dto_1 = require("./followup-log-response.dto");
15
+ /**
16
+ * Paginated list of follow-up log entries.
17
+ */
18
+ class FollowupLogListResponseDto {
19
+ items;
20
+ total;
21
+ page;
22
+ limit;
23
+ totalPages;
24
+ }
25
+ exports.FollowupLogListResponseDto = FollowupLogListResponseDto;
26
+ __decorate([
27
+ (0, swagger_1.ApiProperty)({ type: [followup_log_response_dto_1.FollowupLogResponseDto] }),
28
+ __metadata("design:type", Array)
29
+ ], FollowupLogListResponseDto.prototype, "items", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({ example: 42 }),
32
+ __metadata("design:type", Number)
33
+ ], FollowupLogListResponseDto.prototype, "total", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ example: 1 }),
36
+ __metadata("design:type", Number)
37
+ ], FollowupLogListResponseDto.prototype, "page", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({ example: 20 }),
40
+ __metadata("design:type", Number)
41
+ ], FollowupLogListResponseDto.prototype, "limit", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({ example: 3 }),
44
+ __metadata("design:type", Number)
45
+ ], FollowupLogListResponseDto.prototype, "totalPages", void 0);
@@ -7,6 +7,8 @@ export * from './conversation-response.dto';
7
7
  export * from './followup-type.dto';
8
8
  export * from './followup-config-response.dto';
9
9
  export * from './followup-log-response.dto';
10
+ export * from './followup-log-list-query.dto';
11
+ export * from './followup-log-list-response.dto';
10
12
  export * from './satisfaction-response.dto';
11
13
  export * from './followup-events.dto';
12
14
  //# 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,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,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,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
@@ -23,5 +23,7 @@ __exportStar(require("./conversation-response.dto"), exports);
23
23
  __exportStar(require("./followup-type.dto"), exports);
24
24
  __exportStar(require("./followup-config-response.dto"), exports);
25
25
  __exportStar(require("./followup-log-response.dto"), exports);
26
+ __exportStar(require("./followup-log-list-query.dto"), exports);
27
+ __exportStar(require("./followup-log-list-response.dto"), exports);
26
28
  __exportStar(require("./satisfaction-response.dto"), exports);
27
29
  __exportStar(require("./followup-events.dto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.79",
3
+ "version": "1.0.80",
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",
@@ -6,6 +6,9 @@ export const TOPIC_MESSAGE_RECEIVED = 'MESSAGE_RECEIVED';
6
6
  export const TOPIC_FOLLOWUP_CONFIG_UPDATED = 'FOLLOWUP_CONFIG_UPDATED';
7
7
  export const TOPIC_APPOINTMENT_CHANGED = 'APPOINTMENT_CHANGED';
8
8
 
9
+ /** Kafka request-reply: list follow-up logs (paginated, filters). */
10
+ export const TOPIC_FOLLOWUP_LOG_LIST = 'followup.log.list';
11
+
9
12
  export class FollowupConversationEventPayload {
10
13
  @ApiProperty({ example: 'homolog' })
11
14
  @IsString()
@@ -0,0 +1,61 @@
1
+ import { ApiPropertyOptional } from '@nestjs/swagger';
2
+ import { Type } from 'class-transformer';
3
+ import {
4
+ IsIn,
5
+ IsInt,
6
+ IsOptional,
7
+ IsUUID,
8
+ Max,
9
+ Min,
10
+ } from 'class-validator';
11
+ import {
12
+ CONVERSATION_INTENTIONS,
13
+ ConversationIntentionDto,
14
+ } from './conversation-intention.dto';
15
+ import { FOLLOWUP_TYPES, FollowupTypeDto } from './followup-type.dto';
16
+
17
+ /**
18
+ * Query parameters for listing follow-up logs (HTTP query + Kafka payload).
19
+ */
20
+ export class FollowupLogListQueryDto {
21
+ @ApiPropertyOptional({ minimum: 1, default: 1 })
22
+ @IsOptional()
23
+ @Type(() => Number)
24
+ @IsInt()
25
+ @Min(1)
26
+ page?: number;
27
+
28
+ @ApiPropertyOptional({ minimum: 1, maximum: 100, default: 20 })
29
+ @IsOptional()
30
+ @Type(() => Number)
31
+ @IsInt()
32
+ @Min(1)
33
+ @Max(100)
34
+ limit?: number;
35
+
36
+ @ApiPropertyOptional({ format: 'uuid' })
37
+ @IsOptional()
38
+ @IsUUID('4')
39
+ patientId?: string;
40
+
41
+ @ApiPropertyOptional({ format: 'uuid' })
42
+ @IsOptional()
43
+ @IsUUID('4')
44
+ sessionUuid?: string;
45
+
46
+ @ApiPropertyOptional({
47
+ enum: CONVERSATION_INTENTIONS,
48
+ description: 'Filter by intention stored when the follow-up was sent',
49
+ })
50
+ @IsOptional()
51
+ @IsIn([...CONVERSATION_INTENTIONS])
52
+ intention?: ConversationIntentionDto;
53
+
54
+ @ApiPropertyOptional({
55
+ enum: FOLLOWUP_TYPES,
56
+ description: 'Filter by follow-up type',
57
+ })
58
+ @IsOptional()
59
+ @IsIn([...FOLLOWUP_TYPES])
60
+ followupType?: FollowupTypeDto;
61
+ }
@@ -0,0 +1,22 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { FollowupLogResponseDto } from './followup-log-response.dto';
3
+
4
+ /**
5
+ * Paginated list of follow-up log entries.
6
+ */
7
+ export class FollowupLogListResponseDto {
8
+ @ApiProperty({ type: [FollowupLogResponseDto] })
9
+ items: FollowupLogResponseDto[];
10
+
11
+ @ApiProperty({ example: 42 })
12
+ total: number;
13
+
14
+ @ApiProperty({ example: 1 })
15
+ page: number;
16
+
17
+ @ApiProperty({ example: 20 })
18
+ limit: number;
19
+
20
+ @ApiProperty({ example: 3 })
21
+ totalPages: number;
22
+ }
@@ -7,5 +7,7 @@ export * from './conversation-response.dto';
7
7
  export * from './followup-type.dto';
8
8
  export * from './followup-config-response.dto';
9
9
  export * from './followup-log-response.dto';
10
+ export * from './followup-log-list-query.dto';
11
+ export * from './followup-log-list-response.dto';
10
12
  export * from './satisfaction-response.dto';
11
13
  export * from './followup-events.dto';