tychat-contracts 1.4.0 → 1.4.3
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.
- package/dist/configurations/configuration-tenant-summary.dto.d.ts +6 -0
- package/dist/configurations/configuration-tenant-summary.dto.d.ts.map +1 -1
- package/dist/configurations/configuration-tenant-summary.dto.js +34 -0
- package/dist/configurations/index.d.ts +1 -0
- package/dist/configurations/index.d.ts.map +1 -1
- package/dist/configurations/index.js +1 -0
- package/dist/configurations/plan-summary.dto.d.ts +4 -0
- package/dist/configurations/plan-summary.dto.d.ts.map +1 -1
- package/dist/configurations/plan-summary.dto.js +20 -0
- package/dist/configurations/tenant-limits-summary.dto.d.ts +2 -0
- package/dist/configurations/tenant-limits-summary.dto.d.ts.map +1 -1
- package/dist/configurations/tenant-limits-summary.dto.js +10 -0
- package/dist/configurations/tenant-storage-usage-summary.dto.d.ts +6 -0
- package/dist/configurations/tenant-storage-usage-summary.dto.d.ts.map +1 -0
- package/dist/configurations/tenant-storage-usage-summary.dto.js +27 -0
- package/dist/legal-terms/index.d.ts +1 -0
- package/dist/legal-terms/index.d.ts.map +1 -1
- package/dist/legal-terms/index.js +1 -0
- package/dist/legal-terms/legal-term-body-format.d.ts +4 -0
- package/dist/legal-terms/legal-term-body-format.d.ts.map +1 -0
- package/dist/legal-terms/legal-term-body-format.js +5 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts +2 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-preview.dto.js +11 -0
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts +2 -0
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-signature-rpc.dto.js +12 -1
- package/dist/legal-terms/legal-term-template.dto.d.ts +3 -0
- package/dist/legal-terms/legal-term-template.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-template.dto.js +27 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +3 -1
- package/dist/notifications/notifications-kafka-topics.d.ts +1 -0
- package/dist/notifications/notifications-kafka-topics.d.ts.map +1 -1
- package/dist/notifications/notifications-kafka-topics.js +2 -1
- package/dist/notifications/register-push-token.dto.d.ts +8 -0
- package/dist/notifications/register-push-token.dto.d.ts.map +1 -1
- package/dist/notifications/register-push-token.dto.js +24 -1
- package/dist/storage/presign-upload.dto.d.ts +3 -0
- package/dist/storage/presign-upload.dto.d.ts.map +1 -1
- package/dist/storage/presign-upload.dto.js +35 -0
- package/dist/tenants/index.d.ts +1 -0
- package/dist/tenants/index.d.ts.map +1 -1
- package/dist/tenants/index.js +1 -0
- package/dist/tenants/tenant-storage-usage-apply-delta.dto.d.ts +8 -0
- package/dist/tenants/tenant-storage-usage-apply-delta.dto.d.ts.map +1 -0
- package/dist/tenants/tenant-storage-usage-apply-delta.dto.js +40 -0
- package/package.json +1 -1
- package/src/configurations/configuration-tenant-summary.dto.ts +24 -0
- package/src/configurations/index.ts +1 -0
- package/src/configurations/plan-summary.dto.ts +12 -0
- package/src/configurations/tenant-limits-summary.dto.ts +6 -0
- package/src/configurations/tenant-storage-usage-summary.dto.ts +10 -0
- package/src/legal-terms/index.ts +1 -0
- package/src/legal-terms/legal-term-body-format.ts +4 -0
- package/src/legal-terms/legal-term-preview.dto.ts +10 -0
- package/src/legal-terms/legal-term-signature-rpc.dto.ts +12 -1
- package/src/legal-terms/legal-term-template.dto.ts +32 -3
- package/src/notifications/index.ts +2 -0
- package/src/notifications/notifications-kafka-topics.ts +3 -0
- package/src/notifications/register-push-token.dto.ts +16 -0
- package/src/storage/presign-upload.dto.ts +43 -1
- package/src/tenants/index.ts +1 -0
- package/src/tenants/tenant-storage-usage-apply-delta.dto.ts +23 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PlanSummaryDto } from './plan-summary.dto';
|
|
2
2
|
import { TenantLimitsSummaryDto } from './tenant-limits-summary.dto';
|
|
3
|
+
import { TenantStorageUsageSummaryDto } from './tenant-storage-usage-summary.dto';
|
|
3
4
|
/**
|
|
4
5
|
* Tenant branding and subscription info returned with clinic configuration (no DB credentials).
|
|
5
6
|
*/
|
|
@@ -12,5 +13,10 @@ export declare class ConfigurationTenantSummaryDto {
|
|
|
12
13
|
status: 'active' | 'inactive';
|
|
13
14
|
plan: PlanSummaryDto | null;
|
|
14
15
|
limits: TenantLimitsSummaryDto | null;
|
|
16
|
+
storageUsage: TenantStorageUsageSummaryDto | null;
|
|
17
|
+
conversationEffectiveLimitBytes?: string;
|
|
18
|
+
clinicEffectiveLimitBytes?: string;
|
|
19
|
+
extraStorageCharge?: number;
|
|
20
|
+
effectivePlanPrice?: number;
|
|
15
21
|
}
|
|
16
22
|
//# sourceMappingURL=configuration-tenant-summary.dto.d.ts.map
|
|
@@ -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,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"configuration-tenant-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/configuration-tenant-summary.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;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;IAGlD,+BAA+B,CAAC,EAAE,MAAM,CAAC;IAGzC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAKnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAK5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -13,6 +13,7 @@ exports.ConfigurationTenantSummaryDto = void 0;
|
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const plan_summary_dto_1 = require("./plan-summary.dto");
|
|
15
15
|
const tenant_limits_summary_dto_1 = require("./tenant-limits-summary.dto");
|
|
16
|
+
const tenant_storage_usage_summary_dto_1 = require("./tenant-storage-usage-summary.dto");
|
|
16
17
|
/**
|
|
17
18
|
* Tenant branding and subscription info returned with clinic configuration (no DB credentials).
|
|
18
19
|
*/
|
|
@@ -25,6 +26,11 @@ class ConfigurationTenantSummaryDto {
|
|
|
25
26
|
status;
|
|
26
27
|
plan;
|
|
27
28
|
limits;
|
|
29
|
+
storageUsage;
|
|
30
|
+
conversationEffectiveLimitBytes;
|
|
31
|
+
clinicEffectiveLimitBytes;
|
|
32
|
+
extraStorageCharge;
|
|
33
|
+
effectivePlanPrice;
|
|
28
34
|
}
|
|
29
35
|
exports.ConfigurationTenantSummaryDto = ConfigurationTenantSummaryDto;
|
|
30
36
|
__decorate([
|
|
@@ -67,3 +73,31 @@ __decorate([
|
|
|
67
73
|
}),
|
|
68
74
|
__metadata("design:type", Object)
|
|
69
75
|
], ConfigurationTenantSummaryDto.prototype, "limits", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: 'Uso acumulado por tipo (bytes como string)',
|
|
79
|
+
type: () => tenant_storage_usage_summary_dto_1.TenantStorageUsageSummaryDto,
|
|
80
|
+
nullable: true,
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], ConfigurationTenantSummaryDto.prototype, "storageUsage", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Limite efetivo de conversas em bytes (plano + extras)' }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], ConfigurationTenantSummaryDto.prototype, "conversationEffectiveLimitBytes", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Limite efetivo clínico em bytes (plano + extras)' }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], ConfigurationTenantSummaryDto.prototype, "clinicEffectiveLimitBytes", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
94
|
+
description: 'Valor mensal estimado pelos GB extras de armazenamento (soma dos dois tipos)',
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", Number)
|
|
97
|
+
], ConfigurationTenantSummaryDto.prototype, "extraStorageCharge", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
100
|
+
description: 'Preço base do plano + extraStorageCharge',
|
|
101
|
+
}),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], ConfigurationTenantSummaryDto.prototype, "effectivePlanPrice", void 0);
|
|
@@ -6,6 +6,7 @@ export * from './ai-tool-policy.enums';
|
|
|
6
6
|
export * from './ai-tool-policy.dto';
|
|
7
7
|
export * from './plan-summary.dto';
|
|
8
8
|
export * from './tenant-limits-summary.dto';
|
|
9
|
+
export * from './tenant-storage-usage-summary.dto';
|
|
9
10
|
export * from './configuration-tenant-summary.dto';
|
|
10
11
|
export * from './clinic-configuration-with-tenant.dto';
|
|
11
12
|
//# 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,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,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,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
|
|
@@ -22,5 +22,6 @@ __exportStar(require("./ai-tool-policy.enums"), exports);
|
|
|
22
22
|
__exportStar(require("./ai-tool-policy.dto"), exports);
|
|
23
23
|
__exportStar(require("./plan-summary.dto"), exports);
|
|
24
24
|
__exportStar(require("./tenant-limits-summary.dto"), exports);
|
|
25
|
+
__exportStar(require("./tenant-storage-usage-summary.dto"), exports);
|
|
25
26
|
__exportStar(require("./configuration-tenant-summary.dto"), exports);
|
|
26
27
|
__exportStar(require("./clinic-configuration-with-tenant.dto"), exports);
|
|
@@ -16,6 +16,10 @@ export declare class PlanSummaryDto {
|
|
|
16
16
|
maxProcedures: number;
|
|
17
17
|
monthlyAiTokens: number;
|
|
18
18
|
monthlyLegalTerms: number;
|
|
19
|
+
conversationStorageGb: number;
|
|
20
|
+
clinicStorageGb: number;
|
|
21
|
+
conversationExtraPricePerGb: number;
|
|
22
|
+
clinicExtraPricePerGb: number;
|
|
19
23
|
createdAt?: Date;
|
|
20
24
|
updatedAt?: Date;
|
|
21
25
|
}
|
|
@@ -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;IAGtB,eAAe,EAAE,MAAM,CAAC;IAGxB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,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;IAGtB,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"}
|
|
@@ -29,6 +29,10 @@ class PlanSummaryDto {
|
|
|
29
29
|
maxProcedures;
|
|
30
30
|
monthlyAiTokens;
|
|
31
31
|
monthlyLegalTerms;
|
|
32
|
+
conversationStorageGb;
|
|
33
|
+
clinicStorageGb;
|
|
34
|
+
conversationExtraPricePerGb;
|
|
35
|
+
clinicExtraPricePerGb;
|
|
32
36
|
createdAt;
|
|
33
37
|
updatedAt;
|
|
34
38
|
}
|
|
@@ -89,6 +93,22 @@ __decorate([
|
|
|
89
93
|
(0, swagger_1.ApiProperty)({ description: 'Max legal term dispatches per calendar month (UTC)', example: 100 }),
|
|
90
94
|
__metadata("design:type", Number)
|
|
91
95
|
], PlanSummaryDto.prototype, "monthlyLegalTerms", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, swagger_1.ApiProperty)({ description: 'Franquia base de armazenamento de conversas (GB)', example: 1 }),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], PlanSummaryDto.prototype, "conversationStorageGb", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, swagger_1.ApiProperty)({ description: 'Franquia base de armazenamento clínico (GB)', example: 1 }),
|
|
102
|
+
__metadata("design:type", Number)
|
|
103
|
+
], PlanSummaryDto.prototype, "clinicStorageGb", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, swagger_1.ApiProperty)({ description: 'Preço unitário por GB extra de conversas', example: 0 }),
|
|
106
|
+
__metadata("design:type", Number)
|
|
107
|
+
], PlanSummaryDto.prototype, "conversationExtraPricePerGb", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, swagger_1.ApiProperty)({ description: 'Preço unitário por GB extra clínico', example: 0 }),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], PlanSummaryDto.prototype, "clinicExtraPricePerGb", void 0);
|
|
92
112
|
__decorate([
|
|
93
113
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
94
114
|
__metadata("design:type", Date)
|
|
@@ -11,5 +11,7 @@ export declare class TenantLimitsSummaryDto {
|
|
|
11
11
|
maxWhatsappInstances: number | null;
|
|
12
12
|
maxUnits: number | null;
|
|
13
13
|
monthlyLegalTerms: number | null;
|
|
14
|
+
extraConversationStorageGb: number;
|
|
15
|
+
extraClinicStorageGb: number;
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=tenant-limits-summary.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-limits-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/tenant-limits-summary.dto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,sBAAsB;IAEjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"tenant-limits-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/tenant-limits-summary.dto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,sBAAsB;IAEjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGpC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAGjC,0BAA0B,EAAE,MAAM,CAAC;IAGnC,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -24,6 +24,8 @@ class TenantLimitsSummaryDto {
|
|
|
24
24
|
maxWhatsappInstances;
|
|
25
25
|
maxUnits;
|
|
26
26
|
monthlyLegalTerms;
|
|
27
|
+
extraConversationStorageGb;
|
|
28
|
+
extraClinicStorageGb;
|
|
27
29
|
}
|
|
28
30
|
exports.TenantLimitsSummaryDto = TenantLimitsSummaryDto;
|
|
29
31
|
__decorate([
|
|
@@ -62,3 +64,11 @@ __decorate([
|
|
|
62
64
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Override max legal term dispatches per month (UTC)' }),
|
|
63
65
|
__metadata("design:type", Object)
|
|
64
66
|
], TenantLimitsSummaryDto.prototype, "monthlyLegalTerms", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'GB extras de armazenamento de conversas (somados ao plano)', default: 0 }),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], TenantLimitsSummaryDto.prototype, "extraConversationStorageGb", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'GB extras de armazenamento clínico (somados ao plano)', default: 0 }),
|
|
73
|
+
__metadata("design:type", Number)
|
|
74
|
+
], TenantLimitsSummaryDto.prototype, "extraClinicStorageGb", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-storage-usage-summary.dto.d.ts","sourceRoot":"","sources":["../../src/configurations/tenant-storage-usage-summary.dto.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,qBAAa,4BAA4B;IAEvC,qBAAqB,EAAE,MAAM,CAAC;IAG9B,eAAe,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.TenantStorageUsageSummaryDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
/** Uso acumulado de armazenamento (core DB), exposto no resumo de configuração. */
|
|
15
|
+
class TenantStorageUsageSummaryDto {
|
|
16
|
+
conversationUsedBytes;
|
|
17
|
+
clinicUsedBytes;
|
|
18
|
+
}
|
|
19
|
+
exports.TenantStorageUsageSummaryDto = TenantStorageUsageSummaryDto;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, swagger_1.ApiProperty)({ description: 'Bytes usados em mídia de conversas', example: '0' }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TenantStorageUsageSummaryDto.prototype, "conversationUsedBytes", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({ description: 'Bytes usados em armazenamento clínico', example: '0' }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], TenantStorageUsageSummaryDto.prototype, "clinicUsedBytes", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legal-terms/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legal-terms/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./legal-term-body-format"), exports);
|
|
17
18
|
__exportStar(require("./legal-term-template.dto"), exports);
|
|
18
19
|
__exportStar(require("./legal-term-preview.dto"), exports);
|
|
19
20
|
__exportStar(require("./legal-term-dispatch.dto"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Formato de armazenamento do modelo; conversão para HTML/PDF é determinística por enum. */
|
|
2
|
+
export declare const LEGAL_TERM_BODY_FORMATS: readonly ["html", "markdown", "plain_text"];
|
|
3
|
+
export type LegalTermBodyFormat = (typeof LEGAL_TERM_BODY_FORMATS)[number];
|
|
4
|
+
//# sourceMappingURL=legal-term-body-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal-term-body-format.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-body-format.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,eAAO,MAAM,uBAAuB,6CAA8C,CAAC;AAEnF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LEGAL_TERM_BODY_FORMATS = void 0;
|
|
4
|
+
/** Formato de armazenamento do modelo; conversão para HTML/PDF é determinística por enum. */
|
|
5
|
+
exports.LEGAL_TERM_BODY_FORMATS = ['html', 'markdown', 'plain_text'];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { type LegalTermBodyFormat } from './legal-term-body-format';
|
|
1
2
|
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
2
3
|
export declare class LegalTermPreviewRequestDto {
|
|
3
4
|
body_html?: string;
|
|
5
|
+
body_format?: LegalTermBodyFormat;
|
|
4
6
|
nome_paciente?: string;
|
|
5
7
|
cpf_exemplo?: string;
|
|
6
8
|
procedimento_nomes?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-preview.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-preview.dto.ts"],"names":[],"mappings":"AAcA,4FAA4F;AAC5F,qBAAa,0BAA0B;IAQrC,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"legal-term-preview.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-preview.dto.ts"],"names":[],"mappings":"AAcA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,4FAA4F;AAC5F,qBAAa,0BAA0B;IAQrC,SAAS,CAAC,EAAE,MAAM,CAAC;IAQnB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAMlC,aAAa,CAAC,EAAE,MAAM,CAAC;IAMvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAU9B,+BAA+B,CAAC,EAAE,MAAM,EAAE,CAAC;IAM3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,gBAAgB;IAI3B,YAAY,EAAE,MAAM,EAAE,CAAC;IASvB,eAAe,EAAE,MAAM,CAAC;IAMxB,WAAW,CAAC,EAAE,MAAM,CAAC;IASrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,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;CACpC"}
|
|
@@ -12,9 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.LegalTermSendDto = exports.LegalTermPreviewRequestDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const legal_term_body_format_1 = require("./legal-term-body-format");
|
|
15
16
|
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
16
17
|
class LegalTermPreviewRequestDto {
|
|
17
18
|
body_html;
|
|
19
|
+
body_format;
|
|
18
20
|
nome_paciente;
|
|
19
21
|
cpf_exemplo;
|
|
20
22
|
procedimento_nomes;
|
|
@@ -32,6 +34,15 @@ __decorate([
|
|
|
32
34
|
(0, class_validator_1.MaxLength)(500_000),
|
|
33
35
|
__metadata("design:type", String)
|
|
34
36
|
], LegalTermPreviewRequestDto.prototype, "body_html", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
39
|
+
enum: legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS,
|
|
40
|
+
description: 'Formato do rascunho body_html; se omitido, usa o modelo salvo ou html',
|
|
41
|
+
}),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsIn)(legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], LegalTermPreviewRequestDto.prototype, "body_format", void 0);
|
|
35
46
|
__decorate([
|
|
36
47
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Nome do paciente de exemplo' }),
|
|
37
48
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LegalTermBodyFormat } from './legal-term-body-format';
|
|
1
2
|
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
|
|
2
3
|
export declare class CreateLegalSigningEnvelopeRpcDto {
|
|
3
4
|
tenant: string;
|
|
@@ -7,6 +8,7 @@ export declare class CreateLegalSigningEnvelopeRpcDto {
|
|
|
7
8
|
signerEmail: string;
|
|
8
9
|
pdfBase64?: string;
|
|
9
10
|
renderedHtml?: string;
|
|
11
|
+
bodyFormat?: LegalTermBodyFormat;
|
|
10
12
|
documentFilename: string;
|
|
11
13
|
envelopeName?: string;
|
|
12
14
|
tenantAutoSign?: boolean;
|
|
@@ -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,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;IAMpB,SAAS,CAAC,EAAE,MAAM,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,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;IAMpB,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;CACpC;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"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateLegalSigningEnvelopeRpcResultDto = exports.CreateLegalSigningEnvelopeRpcDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const legal_term_body_format_1 = require("./legal-term-body-format");
|
|
15
16
|
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
|
|
16
17
|
class CreateLegalSigningEnvelopeRpcDto {
|
|
17
18
|
tenant;
|
|
@@ -21,6 +22,7 @@ class CreateLegalSigningEnvelopeRpcDto {
|
|
|
21
22
|
signerEmail;
|
|
22
23
|
pdfBase64;
|
|
23
24
|
renderedHtml;
|
|
25
|
+
bodyFormat;
|
|
24
26
|
documentFilename;
|
|
25
27
|
envelopeName;
|
|
26
28
|
tenantAutoSign;
|
|
@@ -70,13 +72,22 @@ __decorate([
|
|
|
70
72
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "pdfBase64", void 0);
|
|
71
73
|
__decorate([
|
|
72
74
|
(0, swagger_1.ApiPropertyOptional)({
|
|
73
|
-
description: '
|
|
75
|
+
description: 'Conteúdo já com placeholders substituídos; convertido para HTML→PDF no signature-service conforme bodyFormat',
|
|
74
76
|
}),
|
|
75
77
|
(0, class_validator_1.ValidateIf)((o) => !o.pdfBase64?.trim()),
|
|
76
78
|
(0, class_validator_1.IsString)(),
|
|
77
79
|
(0, class_validator_1.MinLength)(1),
|
|
78
80
|
__metadata("design:type", String)
|
|
79
81
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "renderedHtml", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
84
|
+
enum: legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS,
|
|
85
|
+
description: 'Interpretação de renderedHtml antes do PDF; padrão html',
|
|
86
|
+
}),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
(0, class_validator_1.IsIn)(legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "bodyFormat", void 0);
|
|
80
91
|
__decorate([
|
|
81
92
|
(0, swagger_1.ApiProperty)({
|
|
82
93
|
example: 'termo-juridico.pdf',
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { type LegalTermBodyFormat } from './legal-term-body-format';
|
|
1
2
|
export declare class LegalTermTemplateDto {
|
|
2
3
|
id: string;
|
|
3
4
|
body_html: string;
|
|
5
|
+
body_format: LegalTermBodyFormat;
|
|
4
6
|
mandatory_procedure_ids: string[];
|
|
5
7
|
createdAt: Date;
|
|
6
8
|
updatedAt: Date;
|
|
7
9
|
}
|
|
8
10
|
export declare class UpsertLegalTermTemplateDto {
|
|
9
11
|
body_html: string;
|
|
12
|
+
body_format?: LegalTermBodyFormat;
|
|
10
13
|
mandatory_procedure_ids?: string[];
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=legal-term-template.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-template.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-template.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"legal-term-template.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-template.dto.ts"],"names":[],"mappings":"AAUA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,qBAAa,oBAAoB;IAE/B,EAAE,EAAE,MAAM,CAAC;IAKX,SAAS,EAAE,MAAM,CAAC;IAMlB,WAAW,EAAE,mBAAmB,CAAC;IAOjC,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAGlC,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,qBAAa,0BAA0B;IASrC,SAAS,EAAE,MAAM,CAAC;IAQlB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAWlC,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;CACpC"}
|
|
@@ -12,9 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.UpsertLegalTermTemplateDto = exports.LegalTermTemplateDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const legal_term_body_format_1 = require("./legal-term-body-format");
|
|
15
16
|
class LegalTermTemplateDto {
|
|
16
17
|
id;
|
|
17
18
|
body_html;
|
|
19
|
+
body_format;
|
|
18
20
|
mandatory_procedure_ids;
|
|
19
21
|
createdAt;
|
|
20
22
|
updatedAt;
|
|
@@ -25,9 +27,18 @@ __decorate([
|
|
|
25
27
|
__metadata("design:type", String)
|
|
26
28
|
], LegalTermTemplateDto.prototype, "id", void 0);
|
|
27
29
|
__decorate([
|
|
28
|
-
(0, swagger_1.ApiProperty)({
|
|
30
|
+
(0, swagger_1.ApiProperty)({
|
|
31
|
+
description: 'Conteúdo do modelo (HTML, Markdown ou texto conforme body_format)',
|
|
32
|
+
}),
|
|
29
33
|
__metadata("design:type", String)
|
|
30
34
|
], LegalTermTemplateDto.prototype, "body_html", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({
|
|
37
|
+
enum: legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS,
|
|
38
|
+
description: 'Como interpretar body_html antes de gerar PDF (Clicksign)',
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], LegalTermTemplateDto.prototype, "body_format", void 0);
|
|
31
42
|
__decorate([
|
|
32
43
|
(0, swagger_1.ApiProperty)({
|
|
33
44
|
type: [String],
|
|
@@ -46,16 +57,30 @@ __decorate([
|
|
|
46
57
|
], LegalTermTemplateDto.prototype, "updatedAt", void 0);
|
|
47
58
|
class UpsertLegalTermTemplateDto {
|
|
48
59
|
body_html;
|
|
60
|
+
body_format;
|
|
49
61
|
mandatory_procedure_ids;
|
|
50
62
|
}
|
|
51
63
|
exports.UpsertLegalTermTemplateDto = UpsertLegalTermTemplateDto;
|
|
52
64
|
__decorate([
|
|
53
|
-
(0, swagger_1.ApiProperty)({
|
|
65
|
+
(0, swagger_1.ApiProperty)({
|
|
66
|
+
description: 'Corpo do termo (HTML, Markdown ou texto puro conforme body_format)',
|
|
67
|
+
minLength: 1,
|
|
68
|
+
maxLength: 500_000,
|
|
69
|
+
}),
|
|
54
70
|
(0, class_validator_1.IsString)(),
|
|
55
71
|
(0, class_validator_1.MinLength)(1),
|
|
56
72
|
(0, class_validator_1.MaxLength)(500_000),
|
|
57
73
|
__metadata("design:type", String)
|
|
58
74
|
], UpsertLegalTermTemplateDto.prototype, "body_html", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
77
|
+
enum: legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS,
|
|
78
|
+
description: 'Padrão: html',
|
|
79
|
+
}),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsIn)(legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], UpsertLegalTermTemplateDto.prototype, "body_format", void 0);
|
|
59
84
|
__decorate([
|
|
60
85
|
(0, swagger_1.ApiPropertyOptional)({
|
|
61
86
|
type: [String],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { NotificationUserCreatedEventPayload, NotificationPasswordResetRequestedEventPayload, NotificationConversationChangeToHumanEventPayload, NotificationTenantAiTokensThresholdEventPayload, } from './notifications-kafka.payloads';
|
|
2
|
-
export { TOPIC_NOTIFICATIONS_FIND_ALL, TOPIC_NOTIFICATIONS_REGISTER_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_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
|
-
export { RegisterPushTokenDto, NotificationsRegisterPushTokenKafkaDto, } from './register-push-token.dto';
|
|
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';
|
|
6
6
|
export { NotificationsFindAllKafkaDto } from './notifications-find-all-kafka.dto';
|
|
7
7
|
export { NotificationListItemDto } from './notification-list-item.dto';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,8CAA8C,EAC9C,iDAAiD,EACjD,+CAA+C,GAChD,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,8CAA8C,EAC9C,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,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.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_REGISTER_PUSH_TOKEN = exports.TOPIC_NOTIFICATIONS_FIND_ALL = exports.NotificationTenantAiTokensThresholdEventPayload = exports.NotificationConversationChangeToHumanEventPayload = exports.NotificationPasswordResetRequestedEventPayload = exports.NotificationUserCreatedEventPayload = void 0;
|
|
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.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; } });
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "NotificationTenantAiTokensThresholdEventPayload"
|
|
|
9
9
|
var notifications_kafka_topics_1 = require("./notifications-kafka-topics");
|
|
10
10
|
Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_FIND_ALL", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_FIND_ALL; } });
|
|
11
11
|
Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN; } });
|
|
12
|
+
Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN; } });
|
|
12
13
|
Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_UPDATE_VIEWED", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_UPDATE_VIEWED; } });
|
|
13
14
|
Object.defineProperty(exports, "TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER", { enumerable: true, get: function () { return notifications_kafka_topics_1.TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER; } });
|
|
14
15
|
Object.defineProperty(exports, "EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH", { enumerable: true, get: function () { return notifications_kafka_topics_1.EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH; } });
|
|
@@ -21,6 +22,7 @@ Object.defineProperty(exports, "ADMIN_NOTIFICATION_KINDS", { enumerable: true, g
|
|
|
21
22
|
var register_push_token_dto_1 = require("./register-push-token.dto");
|
|
22
23
|
Object.defineProperty(exports, "RegisterPushTokenDto", { enumerable: true, get: function () { return register_push_token_dto_1.RegisterPushTokenDto; } });
|
|
23
24
|
Object.defineProperty(exports, "NotificationsRegisterPushTokenKafkaDto", { enumerable: true, get: function () { return register_push_token_dto_1.NotificationsRegisterPushTokenKafkaDto; } });
|
|
25
|
+
Object.defineProperty(exports, "NotificationsUnregisterPushTokenKafkaDto", { enumerable: true, get: function () { return register_push_token_dto_1.NotificationsUnregisterPushTokenKafkaDto; } });
|
|
24
26
|
var list_notifications_query_dto_1 = require("./list-notifications-query.dto");
|
|
25
27
|
Object.defineProperty(exports, "ListNotificationsQueryDto", { enumerable: true, get: function () { return list_notifications_query_dto_1.ListNotificationsQueryDto; } });
|
|
26
28
|
Object.defineProperty(exports, "NOTIFICATION_PROVIDER_FILTERS", { enumerable: true, get: function () { return list_notifications_query_dto_1.NOTIFICATION_PROVIDER_FILTERS; } });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Kafka request–reply: lista notificações persistidas no banco do tenant. */
|
|
2
2
|
export declare const TOPIC_NOTIFICATIONS_FIND_ALL = "notifications.findAll";
|
|
3
3
|
export declare const TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN = "notifications.registerPushToken";
|
|
4
|
+
export declare const TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = "notifications.unregisterPushToken";
|
|
4
5
|
/** Kafka request–reply: atualizar visualização de uma notificação persistida. */
|
|
5
6
|
export declare const TOPIC_NOTIFICATIONS_UPDATE_VIEWED = "notifications.updateViewed";
|
|
6
7
|
/** RabbitMQ request–reply: enviar push FCM a um utilizador (serviços internos). */
|
|
@@ -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,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,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,9 +1,10 @@
|
|
|
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_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_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
|
+
exports.TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN = 'notifications.unregisterPushToken';
|
|
7
8
|
/** Kafka request–reply: atualizar visualização de uma notificação persistida. */
|
|
8
9
|
exports.TOPIC_NOTIFICATIONS_UPDATE_VIEWED = 'notifications.updateViewed';
|
|
9
10
|
/** RabbitMQ request–reply: enviar push FCM a um utilizador (serviços internos). */
|
|
@@ -12,4 +12,12 @@ export declare class NotificationsRegisterPushTokenKafkaDto {
|
|
|
12
12
|
userId: string;
|
|
13
13
|
payload: RegisterPushTokenDto;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Payload Kafka `notifications.unregisterPushToken`.
|
|
17
|
+
*/
|
|
18
|
+
export declare class NotificationsUnregisterPushTokenKafkaDto {
|
|
19
|
+
tenant: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
payload: RegisterPushTokenDto;
|
|
22
|
+
}
|
|
15
23
|
//# sourceMappingURL=register-push-token.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-push-token.dto.d.ts","sourceRoot":"","sources":["../../src/notifications/register-push-token.dto.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,qBAAa,oBAAoB;IAS/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,qBAAa,sCAAsC;IAGjD,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,EAAE,MAAM,CAAC;IAIf,OAAO,EAAE,oBAAoB,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"register-push-token.dto.d.ts","sourceRoot":"","sources":["../../src/notifications/register-push-token.dto.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,qBAAa,oBAAoB;IAS/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,qBAAa,sCAAsC;IAGjD,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,EAAE,MAAM,CAAC;IAIf,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,qBAAa,wCAAwC;IAGnD,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,EAAE,MAAM,CAAC;IAIf,OAAO,EAAE,oBAAoB,CAAC;CAC/B"}
|
|
@@ -9,7 +9,7 @@ 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.NotificationsRegisterPushTokenKafkaDto = exports.RegisterPushTokenDto = void 0;
|
|
12
|
+
exports.NotificationsUnregisterPushTokenKafkaDto = exports.NotificationsRegisterPushTokenKafkaDto = exports.RegisterPushTokenDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
@@ -54,3 +54,26 @@ __decorate([
|
|
|
54
54
|
(0, class_transformer_1.Type)(() => RegisterPushTokenDto),
|
|
55
55
|
__metadata("design:type", RegisterPushTokenDto)
|
|
56
56
|
], NotificationsRegisterPushTokenKafkaDto.prototype, "payload", void 0);
|
|
57
|
+
/**
|
|
58
|
+
* Payload Kafka `notifications.unregisterPushToken`.
|
|
59
|
+
*/
|
|
60
|
+
class NotificationsUnregisterPushTokenKafkaDto {
|
|
61
|
+
tenant;
|
|
62
|
+
userId;
|
|
63
|
+
payload;
|
|
64
|
+
}
|
|
65
|
+
exports.NotificationsUnregisterPushTokenKafkaDto = NotificationsUnregisterPushTokenKafkaDto;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsString)(),
|
|
68
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], NotificationsUnregisterPushTokenKafkaDto.prototype, "tenant", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], NotificationsUnregisterPushTokenKafkaDto.prototype, "userId", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.ValidateNested)(),
|
|
77
|
+
(0, class_transformer_1.Type)(() => RegisterPushTokenDto),
|
|
78
|
+
__metadata("design:type", RegisterPushTokenDto)
|
|
79
|
+
], NotificationsUnregisterPushTokenKafkaDto.prototype, "payload", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presign-upload.dto.d.ts","sourceRoot":"","sources":["../../src/storage/presign-upload.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presign-upload.dto.d.ts","sourceRoot":"","sources":["../../src/storage/presign-upload.dto.ts"],"names":[],"mappings":"AAaA,qBAAa,gBAAgB;IAQ3B,GAAG,EAAE,MAAM,CAAC;IAQZ,WAAW,EAAE,MAAM,CAAC;IAYpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAW1B,aAAa,CAAC,EAAE,MAAM,CAAC;IAUvB,WAAW,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC;IAWxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -16,6 +16,9 @@ class PresignUploadDto {
|
|
|
16
16
|
key;
|
|
17
17
|
contentType;
|
|
18
18
|
expiresInSeconds;
|
|
19
|
+
fileSizeBytes;
|
|
20
|
+
storageKind;
|
|
21
|
+
tenantSlug;
|
|
19
22
|
}
|
|
20
23
|
exports.PresignUploadDto = PresignUploadDto;
|
|
21
24
|
__decorate([
|
|
@@ -50,3 +53,35 @@ __decorate([
|
|
|
50
53
|
(0, class_validator_1.Max)(604800),
|
|
51
54
|
__metadata("design:type", Number)
|
|
52
55
|
], PresignUploadDto.prototype, "expiresInSeconds", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'Tamanho em bytes (obrigatório para uploads que persistem no DB do tenant e contam na cota)',
|
|
59
|
+
example: 524288,
|
|
60
|
+
minimum: 1,
|
|
61
|
+
}),
|
|
62
|
+
(0, class_validator_1.ValidateIf)((_o, v) => v !== undefined && v !== null),
|
|
63
|
+
(0, class_validator_1.IsInt)(),
|
|
64
|
+
(0, class_validator_1.Min)(1),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], PresignUploadDto.prototype, "fileSizeBytes", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
69
|
+
description: 'conversation = mídia de conversas; clinic = exames/documentos clínicos',
|
|
70
|
+
enum: ['conversation', 'clinic'],
|
|
71
|
+
default: 'conversation',
|
|
72
|
+
}),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.IsIn)(['conversation', 'clinic']),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], PresignUploadDto.prototype, "storageKind", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
79
|
+
description: 'Slug do tenant quando o token de sistema é usado sem host {slug}-storage (ex.: chamadas internas). Se enviado, tem precedência sobre o host.',
|
|
80
|
+
example: 'clinica_demo',
|
|
81
|
+
maxLength: 255,
|
|
82
|
+
}),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsString)(),
|
|
85
|
+
(0, class_validator_1.MaxLength)(255),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], PresignUploadDto.prototype, "tenantSlug", void 0);
|
package/dist/tenants/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export * from './tenant-ai-token-state.dto';
|
|
|
7
7
|
export * from './consume-tenant-ai-tokens.dto';
|
|
8
8
|
export * from './recharge-tenant-ai-tokens.dto';
|
|
9
9
|
export * from './renew-tenant-ai-tokens.dto';
|
|
10
|
+
export * from './tenant-storage-usage-apply-delta.dto';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC"}
|
package/dist/tenants/index.js
CHANGED
|
@@ -23,3 +23,4 @@ __exportStar(require("./tenant-ai-token-state.dto"), exports);
|
|
|
23
23
|
__exportStar(require("./consume-tenant-ai-tokens.dto"), exports);
|
|
24
24
|
__exportStar(require("./recharge-tenant-ai-tokens.dto"), exports);
|
|
25
25
|
__exportStar(require("./renew-tenant-ai-tokens.dto"), exports);
|
|
26
|
+
__exportStar(require("./tenant-storage-usage-apply-delta.dto"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type TenantStorageUsageKind = 'conversation' | 'clinic';
|
|
2
|
+
/** Payload para `tenant.storageUsage.applyDelta` (RMQ/Kafka). */
|
|
3
|
+
export declare class TenantStorageUsageApplyDeltaDto {
|
|
4
|
+
tenantSlug: string;
|
|
5
|
+
kind: TenantStorageUsageKind;
|
|
6
|
+
deltaBytes: number;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=tenant-storage-usage-apply-delta.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-storage-usage-apply-delta.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/tenant-storage-usage-apply-delta.dto.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,QAAQ,CAAC;AAE/D,iEAAiE;AACjE,qBAAa,+BAA+B;IAI1C,UAAU,EAAE,MAAM,CAAC;IAInB,IAAI,EAAE,sBAAsB,CAAC;IAO7B,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.TenantStorageUsageApplyDeltaDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Payload para `tenant.storageUsage.applyDelta` (RMQ/Kafka). */
|
|
16
|
+
class TenantStorageUsageApplyDeltaDto {
|
|
17
|
+
tenantSlug;
|
|
18
|
+
kind;
|
|
19
|
+
deltaBytes;
|
|
20
|
+
}
|
|
21
|
+
exports.TenantStorageUsageApplyDeltaDto = TenantStorageUsageApplyDeltaDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ example: 'acme' }),
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.MaxLength)(255),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], TenantStorageUsageApplyDeltaDto.prototype, "tenantSlug", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ enum: ['conversation', 'clinic'] }),
|
|
30
|
+
(0, class_validator_1.IsIn)(['conversation', 'clinic']),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], TenantStorageUsageApplyDeltaDto.prototype, "kind", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({
|
|
35
|
+
description: 'Positivo após upload persistido; negativo após exclusão.',
|
|
36
|
+
example: 1024,
|
|
37
|
+
}),
|
|
38
|
+
(0, class_validator_1.IsInt)(),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], TenantStorageUsageApplyDeltaDto.prototype, "deltaBytes", void 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
2
|
import { PlanSummaryDto } from './plan-summary.dto';
|
|
3
3
|
import { TenantLimitsSummaryDto } from './tenant-limits-summary.dto';
|
|
4
|
+
import { TenantStorageUsageSummaryDto } from './tenant-storage-usage-summary.dto';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Tenant branding and subscription info returned with clinic configuration (no DB credentials).
|
|
@@ -37,4 +38,27 @@ export class ConfigurationTenantSummaryDto {
|
|
|
37
38
|
nullable: true,
|
|
38
39
|
})
|
|
39
40
|
limits: TenantLimitsSummaryDto | null;
|
|
41
|
+
|
|
42
|
+
@ApiPropertyOptional({
|
|
43
|
+
description: 'Uso acumulado por tipo (bytes como string)',
|
|
44
|
+
type: () => TenantStorageUsageSummaryDto,
|
|
45
|
+
nullable: true,
|
|
46
|
+
})
|
|
47
|
+
storageUsage: TenantStorageUsageSummaryDto | null;
|
|
48
|
+
|
|
49
|
+
@ApiPropertyOptional({ description: 'Limite efetivo de conversas em bytes (plano + extras)' })
|
|
50
|
+
conversationEffectiveLimitBytes?: string;
|
|
51
|
+
|
|
52
|
+
@ApiPropertyOptional({ description: 'Limite efetivo clínico em bytes (plano + extras)' })
|
|
53
|
+
clinicEffectiveLimitBytes?: string;
|
|
54
|
+
|
|
55
|
+
@ApiPropertyOptional({
|
|
56
|
+
description: 'Valor mensal estimado pelos GB extras de armazenamento (soma dos dois tipos)',
|
|
57
|
+
})
|
|
58
|
+
extraStorageCharge?: number;
|
|
59
|
+
|
|
60
|
+
@ApiPropertyOptional({
|
|
61
|
+
description: 'Preço base do plano + extraStorageCharge',
|
|
62
|
+
})
|
|
63
|
+
effectivePlanPrice?: number;
|
|
40
64
|
}
|
|
@@ -6,5 +6,6 @@ export * from './ai-tool-policy.enums';
|
|
|
6
6
|
export * from './ai-tool-policy.dto';
|
|
7
7
|
export * from './plan-summary.dto';
|
|
8
8
|
export * from './tenant-limits-summary.dto';
|
|
9
|
+
export * from './tenant-storage-usage-summary.dto';
|
|
9
10
|
export * from './configuration-tenant-summary.dto';
|
|
10
11
|
export * from './clinic-configuration-with-tenant.dto';
|
|
@@ -46,6 +46,18 @@ export class PlanSummaryDto {
|
|
|
46
46
|
@ApiProperty({ description: 'Max legal term dispatches per calendar month (UTC)', example: 100 })
|
|
47
47
|
monthlyLegalTerms: number;
|
|
48
48
|
|
|
49
|
+
@ApiProperty({ description: 'Franquia base de armazenamento de conversas (GB)', example: 1 })
|
|
50
|
+
conversationStorageGb: number;
|
|
51
|
+
|
|
52
|
+
@ApiProperty({ description: 'Franquia base de armazenamento clínico (GB)', example: 1 })
|
|
53
|
+
clinicStorageGb: number;
|
|
54
|
+
|
|
55
|
+
@ApiProperty({ description: 'Preço unitário por GB extra de conversas', example: 0 })
|
|
56
|
+
conversationExtraPricePerGb: number;
|
|
57
|
+
|
|
58
|
+
@ApiProperty({ description: 'Preço unitário por GB extra clínico', example: 0 })
|
|
59
|
+
clinicExtraPricePerGb: number;
|
|
60
|
+
|
|
49
61
|
@ApiPropertyOptional()
|
|
50
62
|
createdAt?: Date;
|
|
51
63
|
|
|
@@ -30,4 +30,10 @@ export class TenantLimitsSummaryDto {
|
|
|
30
30
|
|
|
31
31
|
@ApiPropertyOptional({ description: 'Override max legal term dispatches per month (UTC)' })
|
|
32
32
|
monthlyLegalTerms: number | null;
|
|
33
|
+
|
|
34
|
+
@ApiPropertyOptional({ description: 'GB extras de armazenamento de conversas (somados ao plano)', default: 0 })
|
|
35
|
+
extraConversationStorageGb: number;
|
|
36
|
+
|
|
37
|
+
@ApiPropertyOptional({ description: 'GB extras de armazenamento clínico (somados ao plano)', default: 0 })
|
|
38
|
+
extraClinicStorageGb: number;
|
|
33
39
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
|
|
3
|
+
/** Uso acumulado de armazenamento (core DB), exposto no resumo de configuração. */
|
|
4
|
+
export class TenantStorageUsageSummaryDto {
|
|
5
|
+
@ApiProperty({ description: 'Bytes usados em mídia de conversas', example: '0' })
|
|
6
|
+
conversationUsedBytes: string;
|
|
7
|
+
|
|
8
|
+
@ApiProperty({ description: 'Bytes usados em armazenamento clínico', example: '0' })
|
|
9
|
+
clinicUsedBytes: string;
|
|
10
|
+
}
|
package/src/legal-terms/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
IsArray,
|
|
4
4
|
IsBoolean,
|
|
5
5
|
IsEmail,
|
|
6
|
+
IsIn,
|
|
6
7
|
IsOptional,
|
|
7
8
|
IsString,
|
|
8
9
|
IsUUID,
|
|
@@ -11,6 +12,7 @@ import {
|
|
|
11
12
|
MinLength,
|
|
12
13
|
ValidateIf,
|
|
13
14
|
} from 'class-validator';
|
|
15
|
+
import { LEGAL_TERM_BODY_FORMATS, type LegalTermBodyFormat } from './legal-term-body-format';
|
|
14
16
|
|
|
15
17
|
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
16
18
|
export class LegalTermPreviewRequestDto {
|
|
@@ -23,6 +25,14 @@ export class LegalTermPreviewRequestDto {
|
|
|
23
25
|
@MaxLength(500_000)
|
|
24
26
|
body_html?: string;
|
|
25
27
|
|
|
28
|
+
@ApiPropertyOptional({
|
|
29
|
+
enum: LEGAL_TERM_BODY_FORMATS,
|
|
30
|
+
description: 'Formato do rascunho body_html; se omitido, usa o modelo salvo ou html',
|
|
31
|
+
})
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsIn(LEGAL_TERM_BODY_FORMATS)
|
|
34
|
+
body_format?: LegalTermBodyFormat;
|
|
35
|
+
|
|
26
36
|
@ApiPropertyOptional({ description: 'Nome do paciente de exemplo' })
|
|
27
37
|
@IsOptional()
|
|
28
38
|
@IsString()
|
|
@@ -2,6 +2,7 @@ import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
2
2
|
import {
|
|
3
3
|
IsBoolean,
|
|
4
4
|
IsEmail,
|
|
5
|
+
IsIn,
|
|
5
6
|
IsOptional,
|
|
6
7
|
IsString,
|
|
7
8
|
IsUUID,
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
MinLength,
|
|
11
12
|
ValidateIf,
|
|
12
13
|
} from 'class-validator';
|
|
14
|
+
import { LEGAL_TERM_BODY_FORMATS, type LegalTermBodyFormat } from './legal-term-body-format';
|
|
13
15
|
|
|
14
16
|
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
|
|
15
17
|
export class CreateLegalSigningEnvelopeRpcDto {
|
|
@@ -46,13 +48,22 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
46
48
|
pdfBase64?: string;
|
|
47
49
|
|
|
48
50
|
@ApiPropertyOptional({
|
|
49
|
-
description:
|
|
51
|
+
description:
|
|
52
|
+
'Conteúdo já com placeholders substituídos; convertido para HTML→PDF no signature-service conforme bodyFormat',
|
|
50
53
|
})
|
|
51
54
|
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => !o.pdfBase64?.trim())
|
|
52
55
|
@IsString()
|
|
53
56
|
@MinLength(1)
|
|
54
57
|
renderedHtml?: string;
|
|
55
58
|
|
|
59
|
+
@ApiPropertyOptional({
|
|
60
|
+
enum: LEGAL_TERM_BODY_FORMATS,
|
|
61
|
+
description: 'Interpretação de renderedHtml antes do PDF; padrão html',
|
|
62
|
+
})
|
|
63
|
+
@IsOptional()
|
|
64
|
+
@IsIn(LEGAL_TERM_BODY_FORMATS)
|
|
65
|
+
bodyFormat?: LegalTermBodyFormat;
|
|
66
|
+
|
|
56
67
|
@ApiProperty({
|
|
57
68
|
example: 'termo-juridico.pdf',
|
|
58
69
|
description:
|
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsArray,
|
|
4
|
+
IsIn,
|
|
5
|
+
IsOptional,
|
|
6
|
+
IsString,
|
|
7
|
+
IsUUID,
|
|
8
|
+
MaxLength,
|
|
9
|
+
MinLength,
|
|
10
|
+
} from 'class-validator';
|
|
11
|
+
import { LEGAL_TERM_BODY_FORMATS, type LegalTermBodyFormat } from './legal-term-body-format';
|
|
3
12
|
|
|
4
13
|
export class LegalTermTemplateDto {
|
|
5
14
|
@ApiProperty({ format: 'uuid' })
|
|
6
15
|
id: string;
|
|
7
16
|
|
|
8
|
-
@ApiProperty({
|
|
17
|
+
@ApiProperty({
|
|
18
|
+
description: 'Conteúdo do modelo (HTML, Markdown ou texto conforme body_format)',
|
|
19
|
+
})
|
|
9
20
|
body_html: string;
|
|
10
21
|
|
|
22
|
+
@ApiProperty({
|
|
23
|
+
enum: LEGAL_TERM_BODY_FORMATS,
|
|
24
|
+
description: 'Como interpretar body_html antes de gerar PDF (Clicksign)',
|
|
25
|
+
})
|
|
26
|
+
body_format: LegalTermBodyFormat;
|
|
27
|
+
|
|
11
28
|
@ApiProperty({
|
|
12
29
|
type: [String],
|
|
13
30
|
format: 'uuid',
|
|
@@ -23,12 +40,24 @@ export class LegalTermTemplateDto {
|
|
|
23
40
|
}
|
|
24
41
|
|
|
25
42
|
export class UpsertLegalTermTemplateDto {
|
|
26
|
-
@ApiProperty({
|
|
43
|
+
@ApiProperty({
|
|
44
|
+
description: 'Corpo do termo (HTML, Markdown ou texto puro conforme body_format)',
|
|
45
|
+
minLength: 1,
|
|
46
|
+
maxLength: 500_000,
|
|
47
|
+
})
|
|
27
48
|
@IsString()
|
|
28
49
|
@MinLength(1)
|
|
29
50
|
@MaxLength(500_000)
|
|
30
51
|
body_html: string;
|
|
31
52
|
|
|
53
|
+
@ApiPropertyOptional({
|
|
54
|
+
enum: LEGAL_TERM_BODY_FORMATS,
|
|
55
|
+
description: 'Padrão: html',
|
|
56
|
+
})
|
|
57
|
+
@IsOptional()
|
|
58
|
+
@IsIn(LEGAL_TERM_BODY_FORMATS)
|
|
59
|
+
body_format?: LegalTermBodyFormat;
|
|
60
|
+
|
|
32
61
|
@ApiPropertyOptional({
|
|
33
62
|
type: [String],
|
|
34
63
|
format: 'uuid',
|
|
@@ -7,6 +7,7 @@ export {
|
|
|
7
7
|
export {
|
|
8
8
|
TOPIC_NOTIFICATIONS_FIND_ALL,
|
|
9
9
|
TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN,
|
|
10
|
+
TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN,
|
|
10
11
|
TOPIC_NOTIFICATIONS_UPDATE_VIEWED,
|
|
11
12
|
TOPIC_NOTIFICATIONS_SEND_PUSH_TO_USER,
|
|
12
13
|
EVENT_NOTIFICATIONS_ADMIN_BROADCAST_PUSH,
|
|
@@ -22,6 +23,7 @@ export {
|
|
|
22
23
|
export {
|
|
23
24
|
RegisterPushTokenDto,
|
|
24
25
|
NotificationsRegisterPushTokenKafkaDto,
|
|
26
|
+
NotificationsUnregisterPushTokenKafkaDto,
|
|
25
27
|
} from './register-push-token.dto';
|
|
26
28
|
export {
|
|
27
29
|
ListNotificationsQueryDto,
|
|
@@ -4,6 +4,9 @@ export const TOPIC_NOTIFICATIONS_FIND_ALL = 'notifications.findAll';
|
|
|
4
4
|
export const TOPIC_NOTIFICATIONS_REGISTER_PUSH_TOKEN =
|
|
5
5
|
'notifications.registerPushToken';
|
|
6
6
|
|
|
7
|
+
export const TOPIC_NOTIFICATIONS_UNREGISTER_PUSH_TOKEN =
|
|
8
|
+
'notifications.unregisterPushToken';
|
|
9
|
+
|
|
7
10
|
/** Kafka request–reply: atualizar visualização de uma notificação persistida. */
|
|
8
11
|
export const TOPIC_NOTIFICATIONS_UPDATE_VIEWED = 'notifications.updateViewed';
|
|
9
12
|
|
|
@@ -38,3 +38,19 @@ export class NotificationsRegisterPushTokenKafkaDto {
|
|
|
38
38
|
@Type(() => RegisterPushTokenDto)
|
|
39
39
|
payload: RegisterPushTokenDto;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Payload Kafka `notifications.unregisterPushToken`.
|
|
44
|
+
*/
|
|
45
|
+
export class NotificationsUnregisterPushTokenKafkaDto {
|
|
46
|
+
@IsString()
|
|
47
|
+
@IsNotEmpty()
|
|
48
|
+
tenant: string;
|
|
49
|
+
|
|
50
|
+
@IsUUID('4')
|
|
51
|
+
userId: string;
|
|
52
|
+
|
|
53
|
+
@ValidateNested()
|
|
54
|
+
@Type(() => RegisterPushTokenDto)
|
|
55
|
+
payload: RegisterPushTokenDto;
|
|
56
|
+
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsIn,
|
|
4
|
+
IsInt,
|
|
5
|
+
IsNotEmpty,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsString,
|
|
8
|
+
Max,
|
|
9
|
+
MaxLength,
|
|
10
|
+
Min,
|
|
11
|
+
ValidateIf,
|
|
12
|
+
} from 'class-validator';
|
|
3
13
|
|
|
4
14
|
export class PresignUploadDto {
|
|
5
15
|
@ApiProperty({
|
|
@@ -30,4 +40,36 @@ export class PresignUploadDto {
|
|
|
30
40
|
@Min(60)
|
|
31
41
|
@Max(604800)
|
|
32
42
|
expiresInSeconds?: number;
|
|
43
|
+
|
|
44
|
+
@ApiPropertyOptional({
|
|
45
|
+
description:
|
|
46
|
+
'Tamanho em bytes (obrigatório para uploads que persistem no DB do tenant e contam na cota)',
|
|
47
|
+
example: 524288,
|
|
48
|
+
minimum: 1,
|
|
49
|
+
})
|
|
50
|
+
@ValidateIf((_o, v) => v !== undefined && v !== null)
|
|
51
|
+
@IsInt()
|
|
52
|
+
@Min(1)
|
|
53
|
+
fileSizeBytes?: number;
|
|
54
|
+
|
|
55
|
+
@ApiPropertyOptional({
|
|
56
|
+
description:
|
|
57
|
+
'conversation = mídia de conversas; clinic = exames/documentos clínicos',
|
|
58
|
+
enum: ['conversation', 'clinic'],
|
|
59
|
+
default: 'conversation',
|
|
60
|
+
})
|
|
61
|
+
@IsOptional()
|
|
62
|
+
@IsIn(['conversation', 'clinic'])
|
|
63
|
+
storageKind?: 'conversation' | 'clinic';
|
|
64
|
+
|
|
65
|
+
@ApiPropertyOptional({
|
|
66
|
+
description:
|
|
67
|
+
'Slug do tenant quando o token de sistema é usado sem host {slug}-storage (ex.: chamadas internas). Se enviado, tem precedência sobre o host.',
|
|
68
|
+
example: 'clinica_demo',
|
|
69
|
+
maxLength: 255,
|
|
70
|
+
})
|
|
71
|
+
@IsOptional()
|
|
72
|
+
@IsString()
|
|
73
|
+
@MaxLength(255)
|
|
74
|
+
tenantSlug?: string;
|
|
33
75
|
}
|
package/src/tenants/index.ts
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { IsIn, IsInt, IsString, MaxLength, Min } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export type TenantStorageUsageKind = 'conversation' | 'clinic';
|
|
5
|
+
|
|
6
|
+
/** Payload para `tenant.storageUsage.applyDelta` (RMQ/Kafka). */
|
|
7
|
+
export class TenantStorageUsageApplyDeltaDto {
|
|
8
|
+
@ApiProperty({ example: 'acme' })
|
|
9
|
+
@IsString()
|
|
10
|
+
@MaxLength(255)
|
|
11
|
+
tenantSlug: string;
|
|
12
|
+
|
|
13
|
+
@ApiProperty({ enum: ['conversation', 'clinic'] })
|
|
14
|
+
@IsIn(['conversation', 'clinic'])
|
|
15
|
+
kind: TenantStorageUsageKind;
|
|
16
|
+
|
|
17
|
+
@ApiProperty({
|
|
18
|
+
description: 'Positivo após upload persistido; negativo após exclusão.',
|
|
19
|
+
example: 1024,
|
|
20
|
+
})
|
|
21
|
+
@IsInt()
|
|
22
|
+
deltaBytes: number;
|
|
23
|
+
}
|