tychat-contracts 1.6.51 → 1.6.53

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.
@@ -1,3 +1,5 @@
1
+ export declare const APPOINTMENT_PROCEDURE_PRICING_TYPES: readonly ["fixed", "variable"];
2
+ export type AppointmentProcedurePricingTypeDto = (typeof APPOINTMENT_PROCEDURE_PRICING_TYPES)[number];
1
3
  /**
2
4
  * DTO for creating a procedure linked to an appointment.
3
5
  * Procedures belong to appointments (not directly to patients).
@@ -10,5 +12,8 @@ export declare class AppointmentProcedureDto {
10
12
  observation?: string | null;
11
13
  side_effects?: string | null;
12
14
  return_days?: number | null;
15
+ pricing_type?: AppointmentProcedurePricingTypeDto;
16
+ min_value?: number | null;
17
+ max_value?: number | null;
13
18
  }
14
19
  //# sourceMappingURL=appointment-procedure.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,qBAAa,uBAAuB;IASlC,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAOd,QAAQ,EAAE,OAAO,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
1
+ {"version":3,"file":"appointment-procedure.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment-procedure.dto.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,mCAAmC,gCAAiC,CAAC;AAClF,MAAM,MAAM,kCAAkC,GAC5C,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;;GAGG;AACH,qBAAa,uBAAuB;IASlC,IAAI,EAAE,MAAM,CAAC;IAOb,KAAK,EAAE,MAAM,CAAC;IAOd,QAAQ,EAAE,OAAO,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAU5B,YAAY,CAAC,EAAE,kCAAkC,CAAC;IAQlD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
@@ -9,9 +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.AppointmentProcedureDto = void 0;
12
+ exports.AppointmentProcedureDto = exports.APPOINTMENT_PROCEDURE_PRICING_TYPES = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
+ exports.APPOINTMENT_PROCEDURE_PRICING_TYPES = ['fixed', 'variable'];
15
16
  /**
16
17
  * DTO for creating a procedure linked to an appointment.
17
18
  * Procedures belong to appointments (not directly to patients).
@@ -24,6 +25,9 @@ class AppointmentProcedureDto {
24
25
  observation;
25
26
  side_effects;
26
27
  return_days;
28
+ pricing_type;
29
+ min_value;
30
+ max_value;
27
31
  }
28
32
  exports.AppointmentProcedureDto = AppointmentProcedureDto;
29
33
  __decorate([
@@ -93,3 +97,31 @@ __decorate([
93
97
  (0, class_validator_1.IsNumber)({ maxDecimalPlaces: 0 }),
94
98
  __metadata("design:type", Object)
95
99
  ], AppointmentProcedureDto.prototype, "return_days", void 0);
100
+ __decorate([
101
+ (0, swagger_1.ApiPropertyOptional)({
102
+ description: 'Tipo de precificação do catálogo no agendamento (snapshot). Valor final definido pelo médico na consulta quando variable.',
103
+ enum: exports.APPOINTMENT_PROCEDURE_PRICING_TYPES,
104
+ example: 'variable',
105
+ }),
106
+ (0, class_validator_1.IsOptional)(),
107
+ (0, class_validator_1.IsIn)(exports.APPOINTMENT_PROCEDURE_PRICING_TYPES),
108
+ __metadata("design:type", String)
109
+ ], AppointmentProcedureDto.prototype, "pricing_type", void 0);
110
+ __decorate([
111
+ (0, swagger_1.ApiPropertyOptional)({
112
+ description: 'Valor mínimo da faixa (snapshot do catálogo)',
113
+ example: 120,
114
+ }),
115
+ (0, class_validator_1.IsOptional)(),
116
+ (0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
117
+ __metadata("design:type", Object)
118
+ ], AppointmentProcedureDto.prototype, "min_value", void 0);
119
+ __decorate([
120
+ (0, swagger_1.ApiPropertyOptional)({
121
+ description: 'Valor máximo da faixa (snapshot do catálogo)',
122
+ example: 220,
123
+ }),
124
+ (0, class_validator_1.IsOptional)(),
125
+ (0, class_validator_1.IsNumber)({ maxDecimalPlaces: 2 }),
126
+ __metadata("design:type", Object)
127
+ ], AppointmentProcedureDto.prototype, "max_value", void 0);
@@ -12,6 +12,10 @@ export interface AppointmentProcedureResponseDto {
12
12
  sideEffects: string | null;
13
13
  /** Recommended number of days until a return visit (used for return follow-up). */
14
14
  returnDays: number | null;
15
+ /** Pricing snapshot from catalog at booking time. */
16
+ pricingType?: 'fixed' | 'variable' | null;
17
+ minValue?: number | null;
18
+ maxValue?: number | null;
15
19
  createdAt?: string;
16
20
  updatedAt?: string;
17
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEpF,mEAAmE;AACnE,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mFAAmF;IACnF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,MAAM,EAAE,oBAAoB,CAAC;IAK7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,eAAe,EAAE,kBAAkB,CAAC;IAKpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAK3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAIjC,UAAU,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAChD"}
1
+ {"version":3,"file":"appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/appointment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEpF,mEAAmE;AACnE,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mFAAmF;IACnF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,MAAM,EAAE,oBAAoB,CAAC;IAK7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,eAAe,EAAE,kBAAkB,CAAC;IAKpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAK3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAIjC,UAAU,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAChD"}
@@ -1,5 +1,5 @@
1
1
  export { NotificationUserCreatedEventPayload, NotificationPasswordResetRequestedEventPayload, NotificationNewDeviceLoginEventPayload, NotificationConversationChangeToHumanEventPayload, NotificationTenantAiTokensThresholdEventPayload, } from './notifications-kafka.payloads';
2
- export { TOPIC_NOTIFICATIONS_FIND_ALL, TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN, TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN, TOPIC_NOTIFICATIONS_UPDATE_VIEWED, TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER, EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH, EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH, EVENT_NOTIFICATIONS_HUMAN_ATTENDANT_IDLE_WARNING_PUSH, EVENT_NOTIFICATIONS_TENANT_AI_TOKENS_THRESHOLD, } from './notifications-kafka-topics';
2
+ export { TOPIC_NOTIFICATIONS_FIND_ALL, TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN, TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN, TOPIC_NOTIFICATIONS_UPDATE_VIEWED, TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED, TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER, EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH, EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH, EVENT_NOTIFICATIONS_HUMAN_ATTENDANT_IDLE_WARNING_PUSH, EVENT_NOTIFICATIONS_TENANT_AI_TOKENS_THRESHOLD, } from './notifications-kafka-topics';
3
3
  export { AdminBroadcastPushDto, ADMIN_NOTIFICATION_KINDS, type AdminNotificationKind, } from './admin-broadcast-push.dto';
4
4
  export { RegisterPushTokenDto, NotificationsRegisterPushTokenKafkaDto, NotificationsUnregisterPushTokenKafkaDto, } from './register-push-token.dto';
5
5
  export { ListNotificationsQueryDto, NOTIFICATION_PROVIDER_FILTERS, NOTIFICATION_STATUS_FILTERS, type NotificationProviderFilterDto, type NotificationStatusFilterDto, } from './list-notifications-query.dto';
@@ -7,4 +7,5 @@ export { NotificationsFindAllKafkaDto } from './notifications-find-all-kafka.dto
7
7
  export { NotificationListItemDto } from './notification-list-item.dto';
8
8
  export { UpdateNotificationViewedDto, NotificationsUpdateViewedKafkaDto, } from './update-notification-viewed.dto';
9
9
  export { NotificationsSendPushToUserKafkaDto } from './notifications-send-push-to-user.dto';
10
+ export { MarkAllNotificationsViewedResultDto, NotificationsMarkAllViewedKafkaDto, } from './mark-all-notifications-viewed.dto';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,8CAA8C,EAC9C,sCAAsC,EACtC,iDAAiD,EACjD,+CAA+C,GAChD,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,yCAAyC,EACzC,iCAAiC,EACjC,qCAAqC,EACrC,wCAAwC,EACxC,6CAA6C,EAC7C,qDAAqD,EACrD,8CAA8C,GAC/C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,sCAAsC,EACtC,wCAAwC,GACzC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,GACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,8CAA8C,EAC9C,sCAAsC,EACtC,iDAAiD,EACjD,+CAA+C,GAChD,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,yCAAyC,EACzC,iCAAiC,EACjC,mCAAmC,EACnC,qCAAqC,EACrC,wCAAwC,EACxC,6CAA6C,EAC7C,qDAAqD,EACrD,8CAA8C,GAC/C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,sCAAsC,EACtC,wCAAwC,GACzC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,GACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EACL,mCAAmC,EACnC,kCAAkC,GACnC,MAAM,qCAAqC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotificationsSendPushToUserKafkaDto = exports.NotificationsUpdateViewedKafkaDto = exports.UpdateNotificationViewedDto = exports.NotificationListItemDto = exports.NotificationsFindAllKafkaDto = exports.NOTIFICATION_STATUS_FILTERS = exports.NOTIFICATION_PROVIDER_FILTERS = exports.ListNotificationsQueryDto = exports.NotificationsUnregisterPushTokenKafkaDto = exports.NotificationsRegisterPushTokenKafkaDto = exports.RegisterPushTokenDto = exports.ADMIN_NOTIFICATION_KINDS = exports.AdminBroadcastPushDto = exports.EVENT_NOTIFICATIONS_TENANT_AI_TOKENS_THRESHOLD = exports.EVENT_NOTIFICATIONS_HUMAN_ATTENDANT_IDLE_WARNING_PUSH = exports.EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH = exports.EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH = exports.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = exports.TOPIC_NOTIFICATIONS_UPDATE_VIEWED = exports.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_FIND_ALL = exports.NotificationTenantAiTokensThresholdEventPayload = exports.NotificationConversationChangeToHumanEventPayload = exports.NotificationNewDeviceLoginEventPayload = exports.NotificationPasswordResetRequestedEventPayload = exports.NotificationUserCreatedEventPayload = void 0;
3
+ exports.NotificationsMarkAllViewedKafkaDto = exports.MarkAllNotificationsViewedResultDto = exports.NotificationsSendPushToUserKafkaDto = exports.NotificationsUpdateViewedKafkaDto = exports.UpdateNotificationViewedDto = exports.NotificationListItemDto = exports.NotificationsFindAllKafkaDto = exports.NOTIFICATION_STATUS_FILTERS = exports.NOTIFICATION_PROVIDER_FILTERS = exports.ListNotificationsQueryDto = exports.NotificationsUnregisterPushTokenKafkaDto = exports.NotificationsRegisterPushTokenKafkaDto = exports.RegisterPushTokenDto = exports.ADMIN_NOTIFICATION_KINDS = exports.AdminBroadcastPushDto = exports.EVENT_NOTIFICATIONS_TENANT_AI_TOKENS_THRESHOLD = exports.EVENT_NOTIFICATIONS_HUMAN_ATTENDANT_IDLE_WARNING_PUSH = exports.EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH = exports.EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH = exports.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = exports.TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED = exports.TOPIC_NOTIFICATIONS_UPDATE_VIEWED = exports.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_FIND_ALL = exports.NotificationTenantAiTokensThresholdEventPayload = exports.NotificationConversationChangeToHumanEventPayload = exports.NotificationNewDeviceLoginEventPayload = exports.NotificationPasswordResetRequestedEventPayload = exports.NotificationUserCreatedEventPayload = void 0;
4
4
  var notifications_kafka_payloads_1 = require("./notifications-kafka.payloads");
5
5
  Object.defineProperty(exports, "NotificationUserCreatedEventPayload", { enumerable: true, get: function () { return notifications_kafka_payloads_1.NotificationUserCreatedEventPayload; } });
6
6
  Object.defineProperty(exports, "NotificationPasswordResetRequestedEventPayload", { enumerable: true, get: function () { return notifications_kafka_payloads_1.NotificationPasswordResetRequestedEventPayload; } });
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_FIND_ALL", { enumerable: tru
12
12
  Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN; } });
13
13
  Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN; } });
14
14
  Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_UPDATE_VIEWED", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_UPDATE_VIEWED; } });
15
+ Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED; } });
15
16
  Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER; } });
16
17
  Object.defineProperty(exports, "EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH", { enumerable: true, get: function () { return notifications_kafka_topics_1.EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH; } });
17
18
  Object.defineProperty(exports, "EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH", { enumerable: true, get: function () { return notifications_kafka_topics_1.EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH; } });
@@ -37,3 +38,6 @@ Object.defineProperty(exports, "UpdateNotificationViewedDto", { enumerable: true
37
38
  Object.defineProperty(exports, "NotificationsUpdateViewedKafkaDto", { enumerable: true, get: function () { return update_notification_viewed_dto_1.NotificationsUpdateViewedKafkaDto; } });
38
39
  var notifications_send_push_to_user_dto_1 = require("./notifications-send-push-to-user.dto");
39
40
  Object.defineProperty(exports, "NotificationsSendPushToUserKafkaDto", { enumerable: true, get: function () { return notifications_send_push_to_user_dto_1.NotificationsSendPushToUserKafkaDto; } });
41
+ var mark_all_notifications_viewed_dto_1 = require("./mark-all-notifications-viewed.dto");
42
+ Object.defineProperty(exports, "MarkAllNotificationsViewedResultDto", { enumerable: true, get: function () { return mark_all_notifications_viewed_dto_1.MarkAllNotificationsViewedResultDto; } });
43
+ Object.defineProperty(exports, "NotificationsMarkAllViewedKafkaDto", { enumerable: true, get: function () { return mark_all_notifications_viewed_dto_1.NotificationsMarkAllViewedKafkaDto; } });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Resposta HTTP PUT /notifications/mark-all-viewed e RPC `notifications.markAllViewed`.
3
+ */
4
+ export declare class MarkAllNotificationsViewedResultDto {
5
+ updatedCount: number;
6
+ }
7
+ /**
8
+ * Payload RPC `notifications.markAllViewed` (sem body HTTP — só tenant + utilizador).
9
+ */
10
+ export declare class NotificationsMarkAllViewedKafkaDto {
11
+ tenant: string;
12
+ userId: string;
13
+ }
14
+ //# sourceMappingURL=mark-all-notifications-viewed.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mark-all-notifications-viewed.dto.d.ts","sourceRoot":"","sources":["../../src/notifications/mark-all-notifications-viewed.dto.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,mCAAmC;IAQ9C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,kCAAkC;IAI7C,MAAM,EAAE,MAAM,CAAC;IAOf,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,53 @@
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.NotificationsMarkAllViewedKafkaDto = exports.MarkAllNotificationsViewedResultDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * Resposta HTTP PUT /notifications/mark-all-viewed e RPC `notifications.markAllViewed`.
17
+ */
18
+ class MarkAllNotificationsViewedResultDto {
19
+ updatedCount;
20
+ }
21
+ exports.MarkAllNotificationsViewedResultDto = MarkAllNotificationsViewedResultDto;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({
24
+ description: 'Quantidade de notificações atualizadas (viewed_at preenchido).',
25
+ example: 12,
26
+ minimum: 0,
27
+ }),
28
+ (0, class_validator_1.IsInt)(),
29
+ (0, class_validator_1.Min)(0),
30
+ __metadata("design:type", Number)
31
+ ], MarkAllNotificationsViewedResultDto.prototype, "updatedCount", void 0);
32
+ /**
33
+ * Payload RPC `notifications.markAllViewed` (sem body HTTP — só tenant + utilizador).
34
+ */
35
+ class NotificationsMarkAllViewedKafkaDto {
36
+ tenant;
37
+ userId;
38
+ }
39
+ exports.NotificationsMarkAllViewedKafkaDto = NotificationsMarkAllViewedKafkaDto;
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({ example: 'default' }),
42
+ (0, class_validator_1.IsString)(),
43
+ (0, class_validator_1.IsNotEmpty)(),
44
+ __metadata("design:type", String)
45
+ ], NotificationsMarkAllViewedKafkaDto.prototype, "tenant", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiProperty)({
48
+ description: 'ID do utilizador (ex.: JWT sub).',
49
+ format: 'uuid',
50
+ }),
51
+ (0, class_validator_1.IsUUID)('4'),
52
+ __metadata("design:type", String)
53
+ ], NotificationsMarkAllViewedKafkaDto.prototype, "userId", void 0);
@@ -4,6 +4,8 @@ export declare const TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = "notifications.re
4
4
  export declare const TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = "notifications.unregisterPushToken";
5
5
  /** Kafka request–reply: atualizar visualização de uma notificação persistida. */
6
6
  export declare const TOPIC_NOTIFICATIONS_UPDATE_VIEWED = "notifications.updateViewed";
7
+ /** Kafka request–reply: marcar todas as notificações não visualizadas do utilizador. */
8
+ export declare const TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED = "notifications.markAllViewed";
7
9
  /** RabbitMQ request–reply: enviar push FCM a um utilizador (serviços internos). */
8
10
  export declare const TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = "notifications.sendPushToUser";
9
11
  /** Kafka event: push FCM em massa (painel administrativo). */
@@ -1 +1 @@
1
- {"version":3,"file":"notifications-kafka-topics.d.ts","sourceRoot":"","sources":["../../src/notifications/notifications-kafka-topics.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AAEpE,eAAO,MAAM,uCAAuC,oCACjB,CAAC;AAEpC,eAAO,MAAM,yCAAyC,sCACjB,CAAC;AAEtC,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,+BAA+B,CAAC;AAE9E,mFAAmF;AACnF,eAAO,MAAM,qCAAqC,iCAAiC,CAAC;AAEpF,8DAA8D;AAC9D,eAAO,MAAM,wCAAwC,uCACf,CAAC;AAEvC,4FAA4F;AAC5F,eAAO,MAAM,6CAA6C,oDACP,CAAC;AAEpD,2FAA2F;AAC3F,eAAO,MAAM,qDAAqD,oDACf,CAAC;AAEpD,0FAA0F;AAC1F,eAAO,MAAM,8CAA8C,6CACf,CAAC"}
1
+ {"version":3,"file":"notifications-kafka-topics.d.ts","sourceRoot":"","sources":["../../src/notifications/notifications-kafka-topics.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AAEpE,eAAO,MAAM,uCAAuC,oCACjB,CAAC;AAEpC,eAAO,MAAM,yCAAyC,sCACjB,CAAC;AAEtC,iFAAiF;AACjF,eAAO,MAAM,iCAAiC,+BAA+B,CAAC;AAE9E,wFAAwF;AACxF,eAAO,MAAM,mCAAmC,gCAAgC,CAAC;AAEjF,mFAAmF;AACnF,eAAO,MAAM,qCAAqC,iCAAiC,CAAC;AAEpF,8DAA8D;AAC9D,eAAO,MAAM,wCAAwC,uCACf,CAAC;AAEvC,4FAA4F;AAC5F,eAAO,MAAM,6CAA6C,oDACP,CAAC;AAEpD,2FAA2F;AAC3F,eAAO,MAAM,qDAAqD,oDACf,CAAC;AAEpD,0FAA0F;AAC1F,eAAO,MAAM,8CAA8C,6CACf,CAAC"}
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVENT_NOTIFICATIONS_TENANT_AI_TOKENS_THRESHOLD = exports.EVENT_NOTIFICATIONS_HUMAN_ATTENDANT_IDLE_WARNING_PUSH = exports.EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH = exports.EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH = exports.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = exports.TOPIC_NOTIFICATIONS_UPDATE_VIEWED = exports.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_FIND_ALL = void 0;
3
+ exports.EVENT_NOTIFICATIONS_TENANT_AI_TOKENS_THRESHOLD = exports.EVENT_NOTIFICATIONS_HUMAN_ATTENDANT_IDLE_WARNING_PUSH = exports.EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH = exports.EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH = exports.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = exports.TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED = exports.TOPIC_NOTIFICATIONS_UPDATE_VIEWED = exports.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_FIND_ALL = void 0;
4
4
  /** Kafka request–reply: lista notificações persistidas no banco do tenant. */
5
5
  exports.TOPIC_NOTIFICATIONS_FIND_ALL = 'notifications.findAll';
6
6
  exports.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = 'notifications.registerPushToken';
7
7
  exports.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = 'notifications.unregisterPushToken';
8
8
  /** Kafka request–reply: atualizar visualização de uma notificação persistida. */
9
9
  exports.TOPIC_NOTIFICATIONS_UPDATE_VIEWED = 'notifications.updateViewed';
10
+ /** Kafka request–reply: marcar todas as notificações não visualizadas do utilizador. */
11
+ exports.TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED = 'notifications.markAllViewed';
10
12
  /** RabbitMQ request–reply: enviar push FCM a um utilizador (serviços internos). */
11
13
  exports.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = 'notifications.sendPushToUser';
12
14
  /** Kafka event: push FCM em massa (painel administrativo). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.6.51",
3
+ "version": "1.6.53",
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",
@@ -2,6 +2,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
2
  import {
3
3
  IsBoolean,
4
4
  IsDateString,
5
+ IsIn,
5
6
  IsNotEmpty,
6
7
  IsNumber,
7
8
  IsOptional,
@@ -9,6 +10,10 @@ import {
9
10
  MaxLength,
10
11
  } from 'class-validator';
11
12
 
13
+ export const APPOINTMENT_PROCEDURE_PRICING_TYPES = ['fixed', 'variable'] as const;
14
+ export type AppointmentProcedurePricingTypeDto =
15
+ (typeof APPOINTMENT_PROCEDURE_PRICING_TYPES)[number];
16
+
12
17
  /**
13
18
  * DTO for creating a procedure linked to an appointment.
14
19
  * Procedures belong to appointments (not directly to patients).
@@ -73,4 +78,30 @@ export class AppointmentProcedureDto {
73
78
  @IsOptional()
74
79
  @IsNumber({ maxDecimalPlaces: 0 })
75
80
  return_days?: number | null;
81
+
82
+ @ApiPropertyOptional({
83
+ description:
84
+ 'Tipo de precificação do catálogo no agendamento (snapshot). Valor final definido pelo médico na consulta quando variable.',
85
+ enum: APPOINTMENT_PROCEDURE_PRICING_TYPES,
86
+ example: 'variable',
87
+ })
88
+ @IsOptional()
89
+ @IsIn(APPOINTMENT_PROCEDURE_PRICING_TYPES)
90
+ pricing_type?: AppointmentProcedurePricingTypeDto;
91
+
92
+ @ApiPropertyOptional({
93
+ description: 'Valor mínimo da faixa (snapshot do catálogo)',
94
+ example: 120,
95
+ })
96
+ @IsOptional()
97
+ @IsNumber({ maxDecimalPlaces: 2 })
98
+ min_value?: number | null;
99
+
100
+ @ApiPropertyOptional({
101
+ description: 'Valor máximo da faixa (snapshot do catálogo)',
102
+ example: 220,
103
+ })
104
+ @IsOptional()
105
+ @IsNumber({ maxDecimalPlaces: 2 })
106
+ max_value?: number | null;
76
107
  }
@@ -13,6 +13,10 @@ export interface AppointmentProcedureResponseDto {
13
13
  sideEffects: string | null;
14
14
  /** Recommended number of days until a return visit (used for return follow-up). */
15
15
  returnDays: number | null;
16
+ /** Pricing snapshot from catalog at booking time. */
17
+ pricingType?: 'fixed' | 'variable' | null;
18
+ minValue?: number | null;
19
+ maxValue?: number | null;
16
20
  createdAt?: string;
17
21
  updatedAt?: string;
18
22
  }
@@ -10,6 +10,7 @@ export {
10
10
  TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN,
11
11
  TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN,
12
12
  TOPIC_NOTIFICATIONS_UPDATE_VIEWED,
13
+ TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED,
13
14
  TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER,
14
15
  EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH,
15
16
  EVENT_NOTIFICATIONS_CONVERSATION_HANDOFF_PUSH,
@@ -40,3 +41,7 @@ export {
40
41
  NotificationsUpdateViewedKafkaDto,
41
42
  } from './update-notification-viewed.dto';
42
43
  export { NotificationsSendPushToUserKafkaDto } from './notifications-send-push-to-user.dto';
44
+ export {
45
+ MarkAllNotificationsViewedResultDto,
46
+ NotificationsMarkAllViewedKafkaDto,
47
+ } from './mark-all-notifications-viewed.dto';
@@ -0,0 +1,33 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+ import { IsInt, IsNotEmpty, IsString, IsUUID, Min } from 'class-validator';
3
+
4
+ /**
5
+ * Resposta HTTP PUT /notifications/mark-all-viewed e RPC `notifications.markAllViewed`.
6
+ */
7
+ export class MarkAllNotificationsViewedResultDto {
8
+ @ApiProperty({
9
+ description: 'Quantidade de notificações atualizadas (viewed_at preenchido).',
10
+ example: 12,
11
+ minimum: 0,
12
+ })
13
+ @IsInt()
14
+ @Min(0)
15
+ updatedCount: number;
16
+ }
17
+
18
+ /**
19
+ * Payload RPC `notifications.markAllViewed` (sem body HTTP — só tenant + utilizador).
20
+ */
21
+ export class NotificationsMarkAllViewedKafkaDto {
22
+ @ApiProperty({ example: 'default' })
23
+ @IsString()
24
+ @IsNotEmpty()
25
+ tenant: string;
26
+
27
+ @ApiProperty({
28
+ description: 'ID do utilizador (ex.: JWT sub).',
29
+ format: 'uuid',
30
+ })
31
+ @IsUUID('4')
32
+ userId: string;
33
+ }
@@ -10,6 +10,9 @@ export const TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN =
10
10
  /** Kafka request–reply: atualizar visualização de uma notificação persistida. */
11
11
  export const TOPIC_NOTIFICATIONS_UPDATE_VIEWED = 'notifications.updateViewed';
12
12
 
13
+ /** Kafka request–reply: marcar todas as notificações não visualizadas do utilizador. */
14
+ export const TOPIC_NOTIFICATIONS_MARK_ALL_VIEWED = 'notifications.markAllViewed';
15
+
13
16
  /** RabbitMQ request–reply: enviar push FCM a um utilizador (serviços internos). */
14
17
  export const TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER = 'notifications.sendPushToUser';
15
18