tychat-contracts 1.6.18 → 1.6.20

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 (35) hide show
  1. package/dist/configurations/app-module-policy.enums.d.ts +1 -1
  2. package/dist/configurations/app-module-policy.enums.d.ts.map +1 -1
  3. package/dist/configurations/app-module-policy.enums.js +1 -0
  4. package/dist/configurations/configuration-tenant-summary.dto.d.ts +3 -0
  5. package/dist/configurations/configuration-tenant-summary.dto.d.ts.map +1 -1
  6. package/dist/configurations/configuration-tenant-summary.dto.js +18 -2
  7. package/dist/configurations/extra-limits-charge-breakdown.dto.d.ts +15 -0
  8. package/dist/configurations/extra-limits-charge-breakdown.dto.d.ts.map +1 -0
  9. package/dist/configurations/extra-limits-charge-breakdown.dto.js +76 -0
  10. package/dist/configurations/index.d.ts +1 -0
  11. package/dist/configurations/index.d.ts.map +1 -1
  12. package/dist/configurations/index.js +1 -0
  13. package/dist/configurations/plan-summary.dto.d.ts +9 -0
  14. package/dist/configurations/plan-summary.dto.d.ts.map +1 -1
  15. package/dist/configurations/plan-summary.dto.js +45 -0
  16. package/dist/configurations/tenant-limits-summary.dto.d.ts +1 -1
  17. package/dist/configurations/tenant-limits-summary.dto.js +9 -9
  18. package/dist/legal-terms/legal-term-dispatch.dto.d.ts +1 -1
  19. package/dist/legal-terms/legal-term-dispatch.dto.d.ts.map +1 -1
  20. package/dist/legal-terms/legal-term-preview.dto.js +4 -4
  21. package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts +1 -1
  22. package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts.map +1 -1
  23. package/dist/legal-terms/legal-term-signature-rpc.dto.js +5 -5
  24. package/dist/legal-terms/legal-term-template.dto.js +1 -1
  25. package/package.json +1 -1
  26. package/src/configurations/app-module-policy.enums.ts +1 -0
  27. package/src/configurations/configuration-tenant-summary.dto.ts +14 -2
  28. package/src/configurations/extra-limits-charge-breakdown.dto.ts +39 -0
  29. package/src/configurations/index.ts +1 -0
  30. package/src/configurations/plan-summary.dto.ts +27 -0
  31. package/src/configurations/tenant-limits-summary.dto.ts +9 -9
  32. package/src/legal-terms/legal-term-dispatch.dto.ts +1 -1
  33. package/src/legal-terms/legal-term-preview.dto.ts +4 -4
  34. package/src/legal-terms/legal-term-signature-rpc.dto.ts +5 -5
  35. package/src/legal-terms/legal-term-template.dto.ts +1 -1
@@ -2,7 +2,7 @@
2
2
  * Módulos da aplicação web do tenant (Tychat-v2), controlados por plano e override por tenant.
3
3
  * Valores estáveis para API e persistência.
4
4
  */
5
- export declare const TYCHAT_APP_MODULE_KEYS: readonly ["dashboard", "check_in", "check_out", "schedule", "conversations", "patients", "patients_documents", "patients_legal_terms", "clinic_legal_terms", "patients_anamneses", "clinic_anamneses", "ai_conversation", "follow_up", "funnel", "satisfaction", "clinic", "billings", "connections", "settings"];
5
+ export declare const TYCHAT_APP_MODULE_KEYS: readonly ["dashboard", "check_in", "check_out", "schedule", "conversations", "patients", "patients_documents", "patients_legal_terms", "clinic_legal_terms", "legal_terms_digital_signature", "patients_anamneses", "clinic_anamneses", "ai_conversation", "follow_up", "funnel", "satisfaction", "clinic", "billings", "connections", "settings"];
6
6
  export type TychatAppModuleKey = (typeof TYCHAT_APP_MODULE_KEYS)[number];
7
7
  export declare const TYCHAT_APP_MODULE_POLICY_LEVELS: readonly ["default", "plan", "tenant"];
8
8
  export type TychatAppModulePolicyLevel = (typeof TYCHAT_APP_MODULE_POLICY_LEVELS)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"app-module-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/app-module-policy.enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,mTAoBzB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,+BAA+B,wCAAyC,CAAC;AACtF,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"app-module-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/app-module-policy.enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,oVAqBzB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,+BAA+B,wCAAyC,CAAC;AACtF,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -15,6 +15,7 @@ exports.TYCHAT_APP_MODULE_KEYS = [
15
15
  'patients_documents',
16
16
  'patients_legal_terms',
17
17
  'clinic_legal_terms',
18
+ 'legal_terms_digital_signature',
18
19
  'patients_anamneses',
19
20
  'clinic_anamneses',
20
21
  'ai_conversation',
@@ -1,5 +1,6 @@
1
1
  import { TenantAiTokenStateDto } from '../tenants/tenant-ai-token-state.dto';
2
2
  import { EffectiveAppModulePolicyDto } from './app-module-policy.dto';
3
+ import { ExtraLimitsChargeBreakdownDto } from './extra-limits-charge-breakdown.dto';
3
4
  import { PlanSummaryDto } from './plan-summary.dto';
4
5
  import { TenantLimitsSummaryDto } from './tenant-limits-summary.dto';
5
6
  import { TenantStorageUsageSummaryDto } from './tenant-storage-usage-summary.dto';
@@ -20,6 +21,8 @@ export declare class ConfigurationTenantSummaryDto {
20
21
  conversationEffectiveLimitBytes?: string;
21
22
  clinicEffectiveLimitBytes?: string;
22
23
  extraStorageCharge?: number;
24
+ extraLimitsCharge?: number;
25
+ extraLimitsChargeBreakdown?: ExtraLimitsChargeBreakdownDto;
23
26
  effectivePlanPrice?: number;
24
27
  appModules?: EffectiveAppModulePolicyDto[];
25
28
  }
@@ -1 +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,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAElF;;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;IAOtC,YAAY,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAOlD,YAAY,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAG5C,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAGzC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAKnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAM5B,UAAU,CAAC,EAAE,2BAA2B,EAAE,CAAC;CAC5C"}
1
+ {"version":3,"file":"configuration-tenant-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/configuration-tenant-summary.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAElF;;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;IAOtC,YAAY,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAOlD,YAAY,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAG5C,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAGzC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAKnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAM3B,0BAA0B,CAAC,EAAE,6BAA6B,CAAC;IAK3D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAM5B,UAAU,CAAC,EAAE,2BAA2B,EAAE,CAAC;CAC5C"}
@@ -13,6 +13,7 @@ exports.ConfigurationTenantSummaryDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const tenant_ai_token_state_dto_1 = require("../tenants/tenant-ai-token-state.dto");
15
15
  const app_module_policy_dto_1 = require("./app-module-policy.dto");
16
+ const extra_limits_charge_breakdown_dto_1 = require("./extra-limits-charge-breakdown.dto");
16
17
  const plan_summary_dto_1 = require("./plan-summary.dto");
17
18
  const tenant_limits_summary_dto_1 = require("./tenant-limits-summary.dto");
18
19
  const tenant_storage_usage_summary_dto_1 = require("./tenant-storage-usage-summary.dto");
@@ -33,6 +34,8 @@ class ConfigurationTenantSummaryDto {
33
34
  conversationEffectiveLimitBytes;
34
35
  clinicEffectiveLimitBytes;
35
36
  extraStorageCharge;
37
+ extraLimitsCharge;
38
+ extraLimitsChargeBreakdown;
36
39
  effectivePlanPrice;
37
40
  appModules;
38
41
  }
@@ -103,13 +106,26 @@ __decorate([
103
106
  ], ConfigurationTenantSummaryDto.prototype, "clinicEffectiveLimitBytes", void 0);
104
107
  __decorate([
105
108
  (0, swagger_1.ApiPropertyOptional)({
106
- description: 'Valor mensal estimado pelos GB extras de armazenamento (soma dos dois tipos)',
109
+ description: 'Valor mensal estimado pelos extras de armazenamento (conversas + clínico)',
107
110
  }),
108
111
  __metadata("design:type", Number)
109
112
  ], ConfigurationTenantSummaryDto.prototype, "extraStorageCharge", void 0);
110
113
  __decorate([
111
114
  (0, swagger_1.ApiPropertyOptional)({
112
- description: 'Preço base do plano + extraStorageCharge',
115
+ description: 'Valor mensal estimado pelos extras de limites (sem armazenamento)',
116
+ }),
117
+ __metadata("design:type", Number)
118
+ ], ConfigurationTenantSummaryDto.prototype, "extraLimitsCharge", void 0);
119
+ __decorate([
120
+ (0, swagger_1.ApiPropertyOptional)({
121
+ description: 'Detalhamento da cobrança mensal por tipo de limite extra',
122
+ type: () => extra_limits_charge_breakdown_dto_1.ExtraLimitsChargeBreakdownDto,
123
+ }),
124
+ __metadata("design:type", extra_limits_charge_breakdown_dto_1.ExtraLimitsChargeBreakdownDto)
125
+ ], ConfigurationTenantSummaryDto.prototype, "extraLimitsChargeBreakdown", void 0);
126
+ __decorate([
127
+ (0, swagger_1.ApiPropertyOptional)({
128
+ description: 'Preço base do plano + extras (limites e armazenamento)',
113
129
  }),
114
130
  __metadata("design:type", Number)
115
131
  ], ConfigurationTenantSummaryDto.prototype, "effectivePlanPrice", void 0);
@@ -0,0 +1,15 @@
1
+ export declare class ExtraLimitsChargeBreakdownDto {
2
+ patients: number;
3
+ doctors: number;
4
+ attendants: number;
5
+ administrators: number;
6
+ procedures: number;
7
+ whatsappInstances: number;
8
+ units: number;
9
+ monthlyLegalTerms: number;
10
+ concurrentSessions: number;
11
+ conversationStorage: number;
12
+ clinicStorage: number;
13
+ total: number;
14
+ }
15
+ //# sourceMappingURL=extra-limits-charge-breakdown.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extra-limits-charge-breakdown.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/extra-limits-charge-breakdown.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,6BAA6B;IAExC,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAE,MAAM,CAAC;IAGhB,UAAU,EAAE,MAAM,CAAC;IAGnB,cAAc,EAAE,MAAM,CAAC;IAGvB,UAAU,EAAE,MAAM,CAAC;IAGnB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,KAAK,EAAE,MAAM,CAAC;IAGd,iBAAiB,EAAE,MAAM,CAAC;IAG1B,kBAAkB,EAAE,MAAM,CAAC;IAG3B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,aAAa,EAAE,MAAM,CAAC;IAGtB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -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.ExtraLimitsChargeBreakdownDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ class ExtraLimitsChargeBreakdownDto {
15
+ patients;
16
+ doctors;
17
+ attendants;
18
+ administrators;
19
+ procedures;
20
+ whatsappInstances;
21
+ units;
22
+ monthlyLegalTerms;
23
+ concurrentSessions;
24
+ conversationStorage;
25
+ clinicStorage;
26
+ total;
27
+ }
28
+ exports.ExtraLimitsChargeBreakdownDto = ExtraLimitsChargeBreakdownDto;
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por pacientes extras', example: 0 }),
31
+ __metadata("design:type", Number)
32
+ ], ExtraLimitsChargeBreakdownDto.prototype, "patients", void 0);
33
+ __decorate([
34
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por médicos extras', example: 0 }),
35
+ __metadata("design:type", Number)
36
+ ], ExtraLimitsChargeBreakdownDto.prototype, "doctors", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por atendentes extras', example: 0 }),
39
+ __metadata("design:type", Number)
40
+ ], ExtraLimitsChargeBreakdownDto.prototype, "attendants", void 0);
41
+ __decorate([
42
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por administradores extras', example: 0 }),
43
+ __metadata("design:type", Number)
44
+ ], ExtraLimitsChargeBreakdownDto.prototype, "administrators", void 0);
45
+ __decorate([
46
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por procedimentos extras', example: 0 }),
47
+ __metadata("design:type", Number)
48
+ ], ExtraLimitsChargeBreakdownDto.prototype, "procedures", void 0);
49
+ __decorate([
50
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por instâncias WhatsApp extras', example: 0 }),
51
+ __metadata("design:type", Number)
52
+ ], ExtraLimitsChargeBreakdownDto.prototype, "whatsappInstances", void 0);
53
+ __decorate([
54
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por unidades extras', example: 0 }),
55
+ __metadata("design:type", Number)
56
+ ], ExtraLimitsChargeBreakdownDto.prototype, "units", void 0);
57
+ __decorate([
58
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por termos jurídicos mensais extras', example: 0 }),
59
+ __metadata("design:type", Number)
60
+ ], ExtraLimitsChargeBreakdownDto.prototype, "monthlyLegalTerms", void 0);
61
+ __decorate([
62
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por sessões simultâneas extras por conta', example: 0 }),
63
+ __metadata("design:type", Number)
64
+ ], ExtraLimitsChargeBreakdownDto.prototype, "concurrentSessions", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por armazenamento extra de conversas', example: 0 }),
67
+ __metadata("design:type", Number)
68
+ ], ExtraLimitsChargeBreakdownDto.prototype, "conversationStorage", void 0);
69
+ __decorate([
70
+ (0, swagger_1.ApiProperty)({ description: 'Cobrança por armazenamento extra clínico', example: 0 }),
71
+ __metadata("design:type", Number)
72
+ ], ExtraLimitsChargeBreakdownDto.prototype, "clinicStorage", void 0);
73
+ __decorate([
74
+ (0, swagger_1.ApiProperty)({ description: 'Soma total das cobranças de extras', example: 0 }),
75
+ __metadata("design:type", Number)
76
+ ], ExtraLimitsChargeBreakdownDto.prototype, "total", void 0);
@@ -9,6 +9,7 @@ export * from './app-module-policy.dto';
9
9
  export * from './plan-summary.dto';
10
10
  export * from './tenant-limits-summary.dto';
11
11
  export * from './tenant-storage-usage-summary.dto';
12
+ export * from './extra-limits-charge-breakdown.dto';
12
13
  export * from './configuration-tenant-summary.dto';
13
14
  export * from './clinic-configuration-with-tenant.dto';
14
15
  //# 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,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurations/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
@@ -25,5 +25,6 @@ __exportStar(require("./app-module-policy.dto"), exports);
25
25
  __exportStar(require("./plan-summary.dto"), exports);
26
26
  __exportStar(require("./tenant-limits-summary.dto"), exports);
27
27
  __exportStar(require("./tenant-storage-usage-summary.dto"), exports);
28
+ __exportStar(require("./extra-limits-charge-breakdown.dto"), exports);
28
29
  __exportStar(require("./configuration-tenant-summary.dto"), exports);
29
30
  __exportStar(require("./clinic-configuration-with-tenant.dto"), exports);
@@ -22,6 +22,15 @@ export declare class PlanSummaryDto {
22
22
  clinicStorageGb: number;
23
23
  conversationExtraPricePerGb: number;
24
24
  clinicExtraPricePerGb: number;
25
+ patientsExtraPrice: number;
26
+ doctorsExtraPrice: number;
27
+ attendantsExtraPrice: number;
28
+ administratorsExtraPrice: number;
29
+ proceduresExtraPrice: number;
30
+ whatsappInstancesExtraPrice: number;
31
+ unitsExtraPrice: number;
32
+ monthlyLegalTermsExtraPrice: number;
33
+ concurrentSessionsExtraPrice: number;
25
34
  createdAt?: Date;
26
35
  updatedAt?: Date;
27
36
  }
@@ -1 +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;IAMtB,+BAA+B,EAAE,MAAM,CAAC;IAOxC,gCAAgC,EAAE,YAAY,GAAG,YAAY,CAAC;IAG9D,eAAe,EAAE,MAAM,CAAC;IAGxB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,qBAAqB,EAAE,MAAM,CAAC;IAG9B,eAAe,EAAE,MAAM,CAAC;IAGxB,2BAA2B,EAAE,MAAM,CAAC;IAGpC,qBAAqB,EAAE,MAAM,CAAC;IAG9B,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
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;IAMtB,+BAA+B,EAAE,MAAM,CAAC;IAOxC,gCAAgC,EAAE,YAAY,GAAG,YAAY,CAAC;IAG9D,eAAe,EAAE,MAAM,CAAC;IAGxB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,qBAAqB,EAAE,MAAM,CAAC;IAG9B,eAAe,EAAE,MAAM,CAAC;IAGxB,2BAA2B,EAAE,MAAM,CAAC;IAGpC,qBAAqB,EAAE,MAAM,CAAC;IAG9B,kBAAkB,EAAE,MAAM,CAAC;IAG3B,iBAAiB,EAAE,MAAM,CAAC;IAG1B,oBAAoB,EAAE,MAAM,CAAC;IAG7B,wBAAwB,EAAE,MAAM,CAAC;IAGjC,oBAAoB,EAAE,MAAM,CAAC;IAG7B,2BAA2B,EAAE,MAAM,CAAC;IAGpC,eAAe,EAAE,MAAM,CAAC;IAGxB,2BAA2B,EAAE,MAAM,CAAC;IAGpC,4BAA4B,EAAE,MAAM,CAAC;IAGrC,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -35,6 +35,15 @@ class PlanSummaryDto {
35
35
  clinicStorageGb;
36
36
  conversationExtraPricePerGb;
37
37
  clinicExtraPricePerGb;
38
+ patientsExtraPrice;
39
+ doctorsExtraPrice;
40
+ attendantsExtraPrice;
41
+ administratorsExtraPrice;
42
+ proceduresExtraPrice;
43
+ whatsappInstancesExtraPrice;
44
+ unitsExtraPrice;
45
+ monthlyLegalTermsExtraPrice;
46
+ concurrentSessionsExtraPrice;
38
47
  createdAt;
39
48
  updatedAt;
40
49
  }
@@ -126,6 +135,42 @@ __decorate([
126
135
  (0, swagger_1.ApiProperty)({ description: 'Preço unitário por GB extra clínico', example: 0 }),
127
136
  __metadata("design:type", Number)
128
137
  ], PlanSummaryDto.prototype, "clinicExtraPricePerGb", void 0);
138
+ __decorate([
139
+ (0, swagger_1.ApiProperty)({ description: 'Preço por paciente extra', example: 0 }),
140
+ __metadata("design:type", Number)
141
+ ], PlanSummaryDto.prototype, "patientsExtraPrice", void 0);
142
+ __decorate([
143
+ (0, swagger_1.ApiProperty)({ description: 'Preço por médico extra', example: 0 }),
144
+ __metadata("design:type", Number)
145
+ ], PlanSummaryDto.prototype, "doctorsExtraPrice", void 0);
146
+ __decorate([
147
+ (0, swagger_1.ApiProperty)({ description: 'Preço por atendente extra', example: 0 }),
148
+ __metadata("design:type", Number)
149
+ ], PlanSummaryDto.prototype, "attendantsExtraPrice", void 0);
150
+ __decorate([
151
+ (0, swagger_1.ApiProperty)({ description: 'Preço por administrador extra', example: 0 }),
152
+ __metadata("design:type", Number)
153
+ ], PlanSummaryDto.prototype, "administratorsExtraPrice", void 0);
154
+ __decorate([
155
+ (0, swagger_1.ApiProperty)({ description: 'Preço por procedimento extra', example: 0 }),
156
+ __metadata("design:type", Number)
157
+ ], PlanSummaryDto.prototype, "proceduresExtraPrice", void 0);
158
+ __decorate([
159
+ (0, swagger_1.ApiProperty)({ description: 'Preço por instância WhatsApp extra', example: 0 }),
160
+ __metadata("design:type", Number)
161
+ ], PlanSummaryDto.prototype, "whatsappInstancesExtraPrice", void 0);
162
+ __decorate([
163
+ (0, swagger_1.ApiProperty)({ description: 'Preço por unidade extra', example: 0 }),
164
+ __metadata("design:type", Number)
165
+ ], PlanSummaryDto.prototype, "unitsExtraPrice", void 0);
166
+ __decorate([
167
+ (0, swagger_1.ApiProperty)({ description: 'Preço por termo jurídico mensal extra', example: 0 }),
168
+ __metadata("design:type", Number)
169
+ ], PlanSummaryDto.prototype, "monthlyLegalTermsExtraPrice", void 0);
170
+ __decorate([
171
+ (0, swagger_1.ApiProperty)({ description: 'Preço por sessão simultânea extra por conta', example: 0 }),
172
+ __metadata("design:type", Number)
173
+ ], PlanSummaryDto.prototype, "concurrentSessionsExtraPrice", void 0);
129
174
  __decorate([
130
175
  (0, swagger_1.ApiPropertyOptional)(),
131
176
  __metadata("design:type", Date)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Tenant-specific limit overrides (nullable fields fall back to plan defaults).
2
+ * Tenant-specific extra limits (somados ao plano base).
3
3
  */
4
4
  export declare class TenantLimitsSummaryDto {
5
5
  tenantId?: string;
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.TenantLimitsSummaryDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  /**
15
- * Tenant-specific limit overrides (nullable fields fall back to plan defaults).
15
+ * Tenant-specific extra limits (somados ao plano base).
16
16
  */
17
17
  class TenantLimitsSummaryDto {
18
18
  tenantId;
@@ -35,35 +35,35 @@ __decorate([
35
35
  __metadata("design:type", String)
36
36
  ], TenantLimitsSummaryDto.prototype, "tenantId", void 0);
37
37
  __decorate([
38
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max patients' }),
38
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Pacientes extras' }),
39
39
  __metadata("design:type", Object)
40
40
  ], TenantLimitsSummaryDto.prototype, "maxPatients", void 0);
41
41
  __decorate([
42
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max doctors' }),
42
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Médicos extras' }),
43
43
  __metadata("design:type", Object)
44
44
  ], TenantLimitsSummaryDto.prototype, "maxDoctors", void 0);
45
45
  __decorate([
46
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max attendants' }),
46
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Atendentes extras' }),
47
47
  __metadata("design:type", Object)
48
48
  ], TenantLimitsSummaryDto.prototype, "maxAttendants", void 0);
49
49
  __decorate([
50
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max administrators' }),
50
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Administradores extras' }),
51
51
  __metadata("design:type", Object)
52
52
  ], TenantLimitsSummaryDto.prototype, "maxAdministrators", void 0);
53
53
  __decorate([
54
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max procedures' }),
54
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Procedimentos extras' }),
55
55
  __metadata("design:type", Object)
56
56
  ], TenantLimitsSummaryDto.prototype, "maxProcedures", void 0);
57
57
  __decorate([
58
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max WhatsApp instances' }),
58
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Instâncias WhatsApp extras' }),
59
59
  __metadata("design:type", Object)
60
60
  ], TenantLimitsSummaryDto.prototype, "maxWhatsappInstances", void 0);
61
61
  __decorate([
62
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max units' }),
62
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Unidades extras' }),
63
63
  __metadata("design:type", Object)
64
64
  ], TenantLimitsSummaryDto.prototype, "maxUnits", void 0);
65
65
  __decorate([
66
- (0, swagger_1.ApiPropertyOptional)({ description: 'Override max legal term dispatches per month (UTC)' }),
66
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Termos jurídicos mensais extras (UTC)' }),
67
67
  __metadata("design:type", Object)
68
68
  ], TenantLimitsSummaryDto.prototype, "monthlyLegalTerms", void 0);
69
69
  __decorate([
@@ -1,6 +1,6 @@
1
1
  /** Status do registro de envio na clínica (WhatsApp / fluxo). */
2
2
  export type LegalTermDispatchStatusValue = 'created' | 'sent' | 'failed';
3
- /** Status do documento na Clicksign (signature-service). */
3
+ /** Status do documento no provedor de assinatura (signature-service). */
4
4
  export type SignatureDocumentStatusValue = 'pending' | 'signed' | 'refused' | 'cancelled' | 'expired'
5
5
  /** Fluxo impresso: aguardando upload da digitalização assinada (sem registro em signature-service). */
6
6
  | 'upload_required';
@@ -1 +1 @@
1
- {"version":3,"file":"legal-term-dispatch.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-dispatch.dto.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzE,4DAA4D;AAC5D,MAAM,MAAM,4BAA4B,GACpC,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS;AACX,uGAAuG;GACrG,iBAAiB,CAAC;AAEtB,wDAAwD;AACxD,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,SAAS,CAAC;AAElE,oEAAoE;AACpE,MAAM,MAAM,6BAA6B,GACrC,cAAc,GACd,0BAA0B,CAAC;AAE/B,wEAAwE;AACxE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,4BAA4B,CAAC;IAC9C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,gBAAgB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG;IAClD,KAAK,EAAE,+BAA+B,EAAE,CAAC;CAC1C,CAAC"}
1
+ {"version":3,"file":"legal-term-dispatch.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-dispatch.dto.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzE,yEAAyE;AACzE,MAAM,MAAM,4BAA4B,GACpC,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS;AACX,uGAAuG;GACrG,iBAAiB,CAAC;AAEtB,wDAAwD;AACxD,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,SAAS,CAAC;AAElE,oEAAoE;AACpE,MAAM,MAAM,6BAA6B,GACrC,cAAc,GACd,0BAA0B,CAAC;AAE/B,wEAAwE;AACxE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,4BAA4B,CAAC;IAC9C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,gBAAgB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG;IAClD,KAAK,EAAE,+BAA+B,EAAE,CAAC;CAC1C,CAAC"}
@@ -99,8 +99,8 @@ exports.LegalTermSendDto = LegalTermSendDto;
99
99
  __decorate([
100
100
  (0, swagger_1.ApiPropertyOptional)({
101
101
  enum: LEGAL_TERM_SIGNATURE_METHODS,
102
- description: 'Método de assinatura: digital (Clicksign + link no WhatsApp) ou printed (PDF para impressão, sem Clicksign). Padrão: digital.',
103
- default: 'digital',
102
+ description: 'Método de assinatura: digital ou printed (PDF para impressão, ou digital para Assinatura Digital). Padrão: printed.',
103
+ default: 'printed',
104
104
  }),
105
105
  (0, class_validator_1.IsOptional)(),
106
106
  (0, class_validator_1.IsIn)(LEGAL_TERM_SIGNATURE_METHODS),
@@ -140,7 +140,7 @@ __decorate([
140
140
  ], LegalTermSendDto.prototype, "instanceKey", void 0);
141
141
  __decorate([
142
142
  (0, swagger_1.ApiPropertyOptional)({
143
- description: 'Assinatura automática do representante da clínica (Clicksign) antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
143
+ description: 'Assinatura automática do representante da clínica antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
144
144
  }),
145
145
  (0, class_validator_1.IsOptional)(),
146
146
  (0, class_validator_1.IsBoolean)(),
@@ -176,7 +176,7 @@ __decorate([
176
176
  ], LegalTermSendDto.prototype, "tenantSignerDocumentation", void 0);
177
177
  __decorate([
178
178
  (0, swagger_1.ApiPropertyOptional)({
179
- description: 'Celular do representante (BR) para Clicksign notificar via WhatsApp; opcional (sem isso a Clicksign usa e-mail).',
179
+ description: 'Celular do representante (BR) para notificação via WhatsApp; opcional (sem isso usa e-mail).',
180
180
  }),
181
181
  (0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
182
182
  (0, class_validator_1.IsOptional)(),
@@ -1,5 +1,5 @@
1
1
  import { type LegalTermBodyFormat } from './legal-term-body-format';
2
- /** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
2
+ /** Payload RPC: tychat-api → tychat-signature-service (criar envelope de assinatura digital). */
3
3
  export declare class CreateLegalSigningEnvelopeRpcDto {
4
4
  tenant: string;
5
5
  patientId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"legal-term-signature-rpc.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-signature-rpc.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,wFAAwF;AACxF,qBAAa,gCAAgC;IAK3C,MAAM,EAAE,MAAM,CAAC;IAIf,SAAS,EAAE,MAAM,CAAC;IAKlB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAM7B,UAAU,EAAE,MAAM,CAAC;IAKnB,WAAW,EAAE,MAAM,CAAC;IAUpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,SAAS,CAAC,EAAE,MAAM,CAAC;IASnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAUjC,gBAAgB,EAAE,MAAM,CAAC;IAMzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,cAAc,CAAC,EAAE,OAAO,CAAC;IAMzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAK1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAO3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAM9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAWnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,sCAAsC;IAEjD,mBAAmB,EAAE,MAAM,CAAC;IAG5B,UAAU,EAAE,MAAM,CAAC;IAGnB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EACZ,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"legal-term-signature-rpc.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-signature-rpc.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,iGAAiG;AACjG,qBAAa,gCAAgC;IAK3C,MAAM,EAAE,MAAM,CAAC;IAIf,SAAS,EAAE,MAAM,CAAC;IAKlB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAM7B,UAAU,EAAE,MAAM,CAAC;IAKnB,WAAW,EAAE,MAAM,CAAC;IAUpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,SAAS,CAAC,EAAE,MAAM,CAAC;IASnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAUjC,gBAAgB,EAAE,MAAM,CAAC;IAMzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,cAAc,CAAC,EAAE,OAAO,CAAC;IAMzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAK1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAO3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAM9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAWnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,sCAAsC;IAEjD,mBAAmB,EAAE,MAAM,CAAC;IAG5B,UAAU,EAAE,MAAM,CAAC;IAGnB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EACZ,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
@@ -13,7 +13,7 @@ exports.CreateLegalSigningEnvelopeRpcResultDto = exports.CreateLegalSigningEnvel
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
15
  const legal_term_body_format_1 = require("./legal-term-body-format");
16
- /** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
16
+ /** Payload RPC: tychat-api → tychat-signature-service (criar envelope de assinatura digital). */
17
17
  class CreateLegalSigningEnvelopeRpcDto {
18
18
  tenant;
19
19
  patientId;
@@ -67,7 +67,7 @@ __decorate([
67
67
  ], CreateLegalSigningEnvelopeRpcDto.prototype, "signerEmail", void 0);
68
68
  __decorate([
69
69
  (0, swagger_1.ApiPropertyOptional)({
70
- description: 'Telefone do paciente (BR) para Clicksign: com WhatsApp em `document_signed` exige 10–11 dígitos nacionais; normalizado no signature-service.',
70
+ description: 'Telefone do paciente (BR) para assinatura digital: com WhatsApp em `document_signed` exige 10–11 dígitos nacionais; normalizado no signature-service.',
71
71
  }),
72
72
  (0, class_validator_1.IsOptional)(),
73
73
  (0, class_validator_1.IsString)(),
@@ -111,7 +111,7 @@ __decorate([
111
111
  __metadata("design:type", String)
112
112
  ], CreateLegalSigningEnvelopeRpcDto.prototype, "documentFilename", void 0);
113
113
  __decorate([
114
- (0, swagger_1.ApiPropertyOptional)({ description: 'Nome exibido do envelope na Clicksign' }),
114
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Nome exibido do envelope de assinatura' }),
115
115
  (0, class_validator_1.IsOptional)(),
116
116
  (0, class_validator_1.IsString)(),
117
117
  (0, class_validator_1.MaxLength)(500),
@@ -119,7 +119,7 @@ __decorate([
119
119
  ], CreateLegalSigningEnvelopeRpcDto.prototype, "envelopeName", void 0);
120
120
  __decorate([
121
121
  (0, swagger_1.ApiPropertyOptional)({
122
- description: 'Incluir signatário da clínica (PJ) com assinatura automática na Clicksign antes do paciente. Exige conta com termo de assinatura automática válido.',
122
+ description: 'Incluir signatário da clínica (PJ) com assinatura automática antes do paciente. Exige conta com termo de assinatura automática válido.',
123
123
  }),
124
124
  (0, class_validator_1.IsOptional)(),
125
125
  (0, class_validator_1.IsBoolean)(),
@@ -155,7 +155,7 @@ __decorate([
155
155
  ], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantSignerDocumentation", void 0);
156
156
  __decorate([
157
157
  (0, swagger_1.ApiPropertyOptional)({
158
- description: 'Celular do representante (BR) para notificação Clicksign via WhatsApp após assinatura; se omitido, usa-se e-mail.',
158
+ description: 'Celular do representante (BR) para notificação via WhatsApp após assinatura; se omitido, usa-se e-mail.',
159
159
  }),
160
160
  (0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
161
161
  (0, class_validator_1.IsOptional)(),
@@ -35,7 +35,7 @@ __decorate([
35
35
  __decorate([
36
36
  (0, swagger_1.ApiProperty)({
37
37
  enum: legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS,
38
- description: 'Como interpretar body_html antes de gerar PDF (Clicksign)',
38
+ description: 'Como interpretar body_html antes de gerar PDF',
39
39
  }),
40
40
  __metadata("design:type", String)
41
41
  ], LegalTermTemplateDto.prototype, "body_format", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.6.18",
3
+ "version": "1.6.20",
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",
@@ -12,6 +12,7 @@ export const TYCHAT_APP_MODULE_KEYS = [
12
12
  'patients_documents',
13
13
  'patients_legal_terms',
14
14
  'clinic_legal_terms',
15
+ 'legal_terms_digital_signature',
15
16
  'patients_anamneses',
16
17
  'clinic_anamneses',
17
18
  'ai_conversation',
@@ -1,6 +1,7 @@
1
1
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
2
  import { TenantAiTokenStateDto } from '../tenants/tenant-ai-token-state.dto';
3
3
  import { EffectiveAppModulePolicyDto } from './app-module-policy.dto';
4
+ import { ExtraLimitsChargeBreakdownDto } from './extra-limits-charge-breakdown.dto';
4
5
  import { PlanSummaryDto } from './plan-summary.dto';
5
6
  import { TenantLimitsSummaryDto } from './tenant-limits-summary.dto';
6
7
  import { TenantStorageUsageSummaryDto } from './tenant-storage-usage-summary.dto';
@@ -62,12 +63,23 @@ export class ConfigurationTenantSummaryDto {
62
63
  clinicEffectiveLimitBytes?: string;
63
64
 
64
65
  @ApiPropertyOptional({
65
- description: 'Valor mensal estimado pelos GB extras de armazenamento (soma dos dois tipos)',
66
+ description: 'Valor mensal estimado pelos extras de armazenamento (conversas + clínico)',
66
67
  })
67
68
  extraStorageCharge?: number;
68
69
 
69
70
  @ApiPropertyOptional({
70
- description: 'Preço base do plano + extraStorageCharge',
71
+ description: 'Valor mensal estimado pelos extras de limites (sem armazenamento)',
72
+ })
73
+ extraLimitsCharge?: number;
74
+
75
+ @ApiPropertyOptional({
76
+ description: 'Detalhamento da cobrança mensal por tipo de limite extra',
77
+ type: () => ExtraLimitsChargeBreakdownDto,
78
+ })
79
+ extraLimitsChargeBreakdown?: ExtraLimitsChargeBreakdownDto;
80
+
81
+ @ApiPropertyOptional({
82
+ description: 'Preço base do plano + extras (limites e armazenamento)',
71
83
  })
72
84
  effectivePlanPrice?: number;
73
85
 
@@ -0,0 +1,39 @@
1
+ import { ApiProperty } from '@nestjs/swagger';
2
+
3
+ export class ExtraLimitsChargeBreakdownDto {
4
+ @ApiProperty({ description: 'Cobrança por pacientes extras', example: 0 })
5
+ patients: number;
6
+
7
+ @ApiProperty({ description: 'Cobrança por médicos extras', example: 0 })
8
+ doctors: number;
9
+
10
+ @ApiProperty({ description: 'Cobrança por atendentes extras', example: 0 })
11
+ attendants: number;
12
+
13
+ @ApiProperty({ description: 'Cobrança por administradores extras', example: 0 })
14
+ administrators: number;
15
+
16
+ @ApiProperty({ description: 'Cobrança por procedimentos extras', example: 0 })
17
+ procedures: number;
18
+
19
+ @ApiProperty({ description: 'Cobrança por instâncias WhatsApp extras', example: 0 })
20
+ whatsappInstances: number;
21
+
22
+ @ApiProperty({ description: 'Cobrança por unidades extras', example: 0 })
23
+ units: number;
24
+
25
+ @ApiProperty({ description: 'Cobrança por termos jurídicos mensais extras', example: 0 })
26
+ monthlyLegalTerms: number;
27
+
28
+ @ApiProperty({ description: 'Cobrança por sessões simultâneas extras por conta', example: 0 })
29
+ concurrentSessions: number;
30
+
31
+ @ApiProperty({ description: 'Cobrança por armazenamento extra de conversas', example: 0 })
32
+ conversationStorage: number;
33
+
34
+ @ApiProperty({ description: 'Cobrança por armazenamento extra clínico', example: 0 })
35
+ clinicStorage: number;
36
+
37
+ @ApiProperty({ description: 'Soma total das cobranças de extras', example: 0 })
38
+ total: number;
39
+ }
@@ -9,5 +9,6 @@ export * from './app-module-policy.dto';
9
9
  export * from './plan-summary.dto';
10
10
  export * from './tenant-limits-summary.dto';
11
11
  export * from './tenant-storage-usage-summary.dto';
12
+ export * from './extra-limits-charge-breakdown.dto';
12
13
  export * from './configuration-tenant-summary.dto';
13
14
  export * from './clinic-configuration-with-tenant.dto';
@@ -71,6 +71,33 @@ export class PlanSummaryDto {
71
71
  @ApiProperty({ description: 'Preço unitário por GB extra clínico', example: 0 })
72
72
  clinicExtraPricePerGb: number;
73
73
 
74
+ @ApiProperty({ description: 'Preço por paciente extra', example: 0 })
75
+ patientsExtraPrice: number;
76
+
77
+ @ApiProperty({ description: 'Preço por médico extra', example: 0 })
78
+ doctorsExtraPrice: number;
79
+
80
+ @ApiProperty({ description: 'Preço por atendente extra', example: 0 })
81
+ attendantsExtraPrice: number;
82
+
83
+ @ApiProperty({ description: 'Preço por administrador extra', example: 0 })
84
+ administratorsExtraPrice: number;
85
+
86
+ @ApiProperty({ description: 'Preço por procedimento extra', example: 0 })
87
+ proceduresExtraPrice: number;
88
+
89
+ @ApiProperty({ description: 'Preço por instância WhatsApp extra', example: 0 })
90
+ whatsappInstancesExtraPrice: number;
91
+
92
+ @ApiProperty({ description: 'Preço por unidade extra', example: 0 })
93
+ unitsExtraPrice: number;
94
+
95
+ @ApiProperty({ description: 'Preço por termo jurídico mensal extra', example: 0 })
96
+ monthlyLegalTermsExtraPrice: number;
97
+
98
+ @ApiProperty({ description: 'Preço por sessão simultânea extra por conta', example: 0 })
99
+ concurrentSessionsExtraPrice: number;
100
+
74
101
  @ApiPropertyOptional()
75
102
  createdAt?: Date;
76
103
 
@@ -1,34 +1,34 @@
1
1
  import { ApiPropertyOptional } from '@nestjs/swagger';
2
2
 
3
3
  /**
4
- * Tenant-specific limit overrides (nullable fields fall back to plan defaults).
4
+ * Tenant-specific extra limits (somados ao plano base).
5
5
  */
6
6
  export class TenantLimitsSummaryDto {
7
7
  @ApiPropertyOptional({ description: 'Tenant ID (UUID)' })
8
8
  tenantId?: string;
9
9
 
10
- @ApiPropertyOptional({ description: 'Override max patients' })
10
+ @ApiPropertyOptional({ description: 'Pacientes extras' })
11
11
  maxPatients: number | null;
12
12
 
13
- @ApiPropertyOptional({ description: 'Override max doctors' })
13
+ @ApiPropertyOptional({ description: 'Médicos extras' })
14
14
  maxDoctors: number | null;
15
15
 
16
- @ApiPropertyOptional({ description: 'Override max attendants' })
16
+ @ApiPropertyOptional({ description: 'Atendentes extras' })
17
17
  maxAttendants: number | null;
18
18
 
19
- @ApiPropertyOptional({ description: 'Override max administrators' })
19
+ @ApiPropertyOptional({ description: 'Administradores extras' })
20
20
  maxAdministrators: number | null;
21
21
 
22
- @ApiPropertyOptional({ description: 'Override max procedures' })
22
+ @ApiPropertyOptional({ description: 'Procedimentos extras' })
23
23
  maxProcedures: number | null;
24
24
 
25
- @ApiPropertyOptional({ description: 'Override max WhatsApp instances' })
25
+ @ApiPropertyOptional({ description: 'Instâncias WhatsApp extras' })
26
26
  maxWhatsappInstances: number | null;
27
27
 
28
- @ApiPropertyOptional({ description: 'Override max units' })
28
+ @ApiPropertyOptional({ description: 'Unidades extras' })
29
29
  maxUnits: number | null;
30
30
 
31
- @ApiPropertyOptional({ description: 'Override max legal term dispatches per month (UTC)' })
31
+ @ApiPropertyOptional({ description: 'Termos jurídicos mensais extras (UTC)' })
32
32
  monthlyLegalTerms: number | null;
33
33
 
34
34
  @ApiPropertyOptional({ description: 'GB extras de armazenamento de conversas (somados ao plano)', default: 0 })
@@ -1,7 +1,7 @@
1
1
  /** Status do registro de envio na clínica (WhatsApp / fluxo). */
2
2
  export type LegalTermDispatchStatusValue = 'created' | 'sent' | 'failed';
3
3
 
4
- /** Status do documento na Clicksign (signature-service). */
4
+ /** Status do documento no provedor de assinatura (signature-service). */
5
5
  export type SignatureDocumentStatusValue =
6
6
  | 'pending'
7
7
  | 'signed'
@@ -75,8 +75,8 @@ export class LegalTermSendDto {
75
75
  @ApiPropertyOptional({
76
76
  enum: LEGAL_TERM_SIGNATURE_METHODS,
77
77
  description:
78
- 'Método de assinatura: digital (Clicksign + link no WhatsApp) ou printed (PDF para impressão, sem Clicksign). Padrão: digital.',
79
- default: 'digital',
78
+ 'Método de assinatura: digital ou printed (PDF para impressão, ou digital para Assinatura Digital). Padrão: printed.',
79
+ default: 'printed',
80
80
  })
81
81
  @IsOptional()
82
82
  @IsIn(LEGAL_TERM_SIGNATURE_METHODS)
@@ -114,7 +114,7 @@ export class LegalTermSendDto {
114
114
 
115
115
  @ApiPropertyOptional({
116
116
  description:
117
- 'Assinatura automática do representante da clínica (Clicksign) antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
117
+ 'Assinatura automática do representante da clínica antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
118
118
  })
119
119
  @IsOptional()
120
120
  @IsBoolean()
@@ -146,7 +146,7 @@ export class LegalTermSendDto {
146
146
 
147
147
  @ApiPropertyOptional({
148
148
  description:
149
- 'Celular do representante (BR) para Clicksign notificar via WhatsApp; opcional (sem isso a Clicksign usa e-mail).',
149
+ 'Celular do representante (BR) para notificação via WhatsApp; opcional (sem isso usa e-mail).',
150
150
  })
151
151
  @ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
152
152
  @IsOptional()
@@ -13,7 +13,7 @@ import {
13
13
  } from 'class-validator';
14
14
  import { LEGAL_TERM_BODY_FORMATS, type LegalTermBodyFormat } from './legal-term-body-format';
15
15
 
16
- /** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
16
+ /** Payload RPC: tychat-api → tychat-signature-service (criar envelope de assinatura digital). */
17
17
  export class CreateLegalSigningEnvelopeRpcDto {
18
18
  @ApiProperty({ description: 'Slug do tenant' })
19
19
  @IsString()
@@ -43,7 +43,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
43
43
 
44
44
  @ApiPropertyOptional({
45
45
  description:
46
- 'Telefone do paciente (BR) para Clicksign: com WhatsApp em `document_signed` exige 10–11 dígitos nacionais; normalizado no signature-service.',
46
+ 'Telefone do paciente (BR) para assinatura digital: com WhatsApp em `document_signed` exige 10–11 dígitos nacionais; normalizado no signature-service.',
47
47
  })
48
48
  @IsOptional()
49
49
  @IsString()
@@ -84,7 +84,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
84
84
  @MaxLength(255)
85
85
  documentFilename: string;
86
86
 
87
- @ApiPropertyOptional({ description: 'Nome exibido do envelope na Clicksign' })
87
+ @ApiPropertyOptional({ description: 'Nome exibido do envelope de assinatura' })
88
88
  @IsOptional()
89
89
  @IsString()
90
90
  @MaxLength(500)
@@ -92,7 +92,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
92
92
 
93
93
  @ApiPropertyOptional({
94
94
  description:
95
- 'Incluir signatário da clínica (PJ) com assinatura automática na Clicksign antes do paciente. Exige conta com termo de assinatura automática válido.',
95
+ 'Incluir signatário da clínica (PJ) com assinatura automática antes do paciente. Exige conta com termo de assinatura automática válido.',
96
96
  })
97
97
  @IsOptional()
98
98
  @IsBoolean()
@@ -124,7 +124,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
124
124
 
125
125
  @ApiPropertyOptional({
126
126
  description:
127
- 'Celular do representante (BR) para notificação Clicksign via WhatsApp após assinatura; se omitido, usa-se e-mail.',
127
+ 'Celular do representante (BR) para notificação via WhatsApp após assinatura; se omitido, usa-se e-mail.',
128
128
  })
129
129
  @ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => o.tenantAutoSign === true)
130
130
  @IsOptional()
@@ -21,7 +21,7 @@ export class LegalTermTemplateDto {
21
21
 
22
22
  @ApiProperty({
23
23
  enum: LEGAL_TERM_BODY_FORMATS,
24
- description: 'Como interpretar body_html antes de gerar PDF (Clicksign)',
24
+ description: 'Como interpretar body_html antes de gerar PDF',
25
25
  })
26
26
  body_format: LegalTermBodyFormat;
27
27