tychat-contracts 1.3.18 → 1.3.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.
- package/dist/configurations/plan-summary.dto.d.ts +1 -0
- package/dist/configurations/plan-summary.dto.d.ts.map +1 -1
- package/dist/configurations/plan-summary.dto.js +5 -0
- package/dist/configurations/tenant-limits-summary.dto.d.ts +1 -0
- package/dist/configurations/tenant-limits-summary.dto.d.ts.map +1 -1
- package/dist/configurations/tenant-limits-summary.dto.js +5 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts +5 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-preview.dto.js +41 -0
- package/dist/legal-terms/legal-term-rmq-patterns.d.ts +2 -0
- package/dist/legal-terms/legal-term-rmq-patterns.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-rmq-patterns.js +3 -1
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts +5 -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 +45 -1
- package/package.json +1 -1
- package/src/configurations/plan-summary.dto.ts +3 -0
- package/src/configurations/tenant-limits-summary.dto.ts +3 -0
- package/src/legal-terms/legal-term-preview.dto.ts +44 -1
- package/src/legal-terms/legal-term-rmq-patterns.ts +2 -0
- package/src/legal-terms/legal-term-signature-rpc.dto.ts +39 -1
|
@@ -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,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,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -28,6 +28,7 @@ class PlanSummaryDto {
|
|
|
28
28
|
maxAdministrators;
|
|
29
29
|
maxProcedures;
|
|
30
30
|
monthlyAiTokens;
|
|
31
|
+
monthlyLegalTerms;
|
|
31
32
|
createdAt;
|
|
32
33
|
updatedAt;
|
|
33
34
|
}
|
|
@@ -84,6 +85,10 @@ __decorate([
|
|
|
84
85
|
(0, swagger_1.ApiProperty)({ description: 'Monthly AI token allowance', example: 5000 }),
|
|
85
86
|
__metadata("design:type", Number)
|
|
86
87
|
], PlanSummaryDto.prototype, "monthlyAiTokens", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, swagger_1.ApiProperty)({ description: 'Max legal term dispatches per calendar month (UTC)', example: 100 }),
|
|
90
|
+
__metadata("design:type", Number)
|
|
91
|
+
], PlanSummaryDto.prototype, "monthlyLegalTerms", void 0);
|
|
87
92
|
__decorate([
|
|
88
93
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
89
94
|
__metadata("design:type", Date)
|
|
@@ -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;
|
|
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;CAClC"}
|
|
@@ -23,6 +23,7 @@ class TenantLimitsSummaryDto {
|
|
|
23
23
|
maxProcedures;
|
|
24
24
|
maxWhatsappInstances;
|
|
25
25
|
maxUnits;
|
|
26
|
+
monthlyLegalTerms;
|
|
26
27
|
}
|
|
27
28
|
exports.TenantLimitsSummaryDto = TenantLimitsSummaryDto;
|
|
28
29
|
__decorate([
|
|
@@ -57,3 +58,7 @@ __decorate([
|
|
|
57
58
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Override max units' }),
|
|
58
59
|
__metadata("design:type", Object)
|
|
59
60
|
], TenantLimitsSummaryDto.prototype, "maxUnits", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Override max legal term dispatches per month (UTC)' }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], TenantLimitsSummaryDto.prototype, "monthlyLegalTerms", void 0);
|
|
@@ -12,5 +12,10 @@ export declare class LegalTermSendDto {
|
|
|
12
12
|
whatsappMessage: string;
|
|
13
13
|
signerEmail?: string;
|
|
14
14
|
instanceKey?: string;
|
|
15
|
+
tenantAutoSign?: boolean;
|
|
16
|
+
tenantSignerName?: string;
|
|
17
|
+
tenantSignerEmail?: string;
|
|
18
|
+
tenantSignerBirthday?: string;
|
|
19
|
+
tenantSignerDocumentation?: string;
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=legal-term-preview.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-preview.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-preview.dto.ts"],"names":[],"mappings":"
|
|
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;IAMnB,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"}
|
|
@@ -75,6 +75,11 @@ class LegalTermSendDto {
|
|
|
75
75
|
whatsappMessage;
|
|
76
76
|
signerEmail;
|
|
77
77
|
instanceKey;
|
|
78
|
+
tenantAutoSign;
|
|
79
|
+
tenantSignerName;
|
|
80
|
+
tenantSignerEmail;
|
|
81
|
+
tenantSignerBirthday;
|
|
82
|
+
tenantSignerDocumentation;
|
|
78
83
|
}
|
|
79
84
|
exports.LegalTermSendDto = LegalTermSendDto;
|
|
80
85
|
__decorate([
|
|
@@ -109,3 +114,39 @@ __decorate([
|
|
|
109
114
|
(0, class_validator_1.MaxLength)(128),
|
|
110
115
|
__metadata("design:type", String)
|
|
111
116
|
], LegalTermSendDto.prototype, "instanceKey", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
119
|
+
description: 'Assinatura automática do representante da clínica (Clicksign) antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
|
|
120
|
+
}),
|
|
121
|
+
(0, class_validator_1.IsOptional)(),
|
|
122
|
+
(0, class_validator_1.IsBoolean)(),
|
|
123
|
+
__metadata("design:type", Boolean)
|
|
124
|
+
], LegalTermSendDto.prototype, "tenantAutoSign", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
127
|
+
(0, class_validator_1.IsString)(),
|
|
128
|
+
(0, class_validator_1.MinLength)(1),
|
|
129
|
+
(0, class_validator_1.MaxLength)(500),
|
|
130
|
+
__metadata("design:type", String)
|
|
131
|
+
], LegalTermSendDto.prototype, "tenantSignerName", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
134
|
+
(0, class_validator_1.IsEmail)(),
|
|
135
|
+
(0, class_validator_1.MaxLength)(320),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], LegalTermSendDto.prototype, "tenantSignerEmail", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
140
|
+
(0, class_validator_1.IsString)(),
|
|
141
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/, {
|
|
142
|
+
message: 'tenantSignerBirthday deve ser ISO (YYYY-MM-DD)',
|
|
143
|
+
}),
|
|
144
|
+
__metadata("design:type", String)
|
|
145
|
+
], LegalTermSendDto.prototype, "tenantSignerBirthday", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
148
|
+
(0, class_validator_1.IsString)(),
|
|
149
|
+
(0, class_validator_1.MinLength)(11),
|
|
150
|
+
(0, class_validator_1.MaxLength)(14),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], LegalTermSendDto.prototype, "tenantSignerDocumentation", void 0);
|
|
@@ -2,6 +2,8 @@ export declare const LEGAL_TERM_TEMPLATE_GET = "legalTerm.template.get";
|
|
|
2
2
|
export declare const LEGAL_TERM_TEMPLATE_UPSERT = "legalTerm.template.upsert";
|
|
3
3
|
export declare const LEGAL_TERM_DISPATCH_CREATE = "legalTerm.dispatch.create";
|
|
4
4
|
export declare const LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = "legalTerm.dispatch.listByPatient";
|
|
5
|
+
/** Conta dispatches no mês civil UTC (status sent/created); usado para cota mensal. */
|
|
6
|
+
export declare const LEGAL_TERM_DISPATCH_COUNT_MONTHLY = "legalTerm.dispatch.countMonthly";
|
|
5
7
|
export declare const SIGNATURE_LEGAL_ENVELOPE_CREATE = "signature.legalEnvelope.create";
|
|
6
8
|
/** Resumo de documentos por IDs (tenant + escopo); usado pela API para enriquecer dispatches. */
|
|
7
9
|
export declare const SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = "signature.documents.summaryByIds";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-rmq-patterns.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-rmq-patterns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,mCAAmC,qCAAqC,CAAC;AACtF,eAAO,MAAM,+BAA+B,mCAAmC,CAAC;AAChF,iGAAiG;AACjG,eAAO,MAAM,kCAAkC,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"legal-term-rmq-patterns.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-rmq-patterns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AACtE,eAAO,MAAM,mCAAmC,qCAAqC,CAAC;AACtF,uFAAuF;AACvF,eAAO,MAAM,iCAAiC,oCAAoC,CAAC;AACnF,eAAO,MAAM,+BAA+B,mCAAmC,CAAC;AAChF,iGAAiG;AACjG,eAAO,MAAM,kCAAkC,qCAAqC,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = exports.SIGNATURE_LEGAL_ENVELOPE_CREATE = exports.LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = exports.LEGAL_TERM_DISPATCH_CREATE = exports.LEGAL_TERM_TEMPLATE_UPSERT = exports.LEGAL_TERM_TEMPLATE_GET = void 0;
|
|
3
|
+
exports.SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = exports.SIGNATURE_LEGAL_ENVELOPE_CREATE = exports.LEGAL_TERM_DISPATCH_COUNT_MONTHLY = exports.LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = exports.LEGAL_TERM_DISPATCH_CREATE = exports.LEGAL_TERM_TEMPLATE_UPSERT = exports.LEGAL_TERM_TEMPLATE_GET = void 0;
|
|
4
4
|
exports.LEGAL_TERM_TEMPLATE_GET = 'legalTerm.template.get';
|
|
5
5
|
exports.LEGAL_TERM_TEMPLATE_UPSERT = 'legalTerm.template.upsert';
|
|
6
6
|
exports.LEGAL_TERM_DISPATCH_CREATE = 'legalTerm.dispatch.create';
|
|
7
7
|
exports.LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = 'legalTerm.dispatch.listByPatient';
|
|
8
|
+
/** Conta dispatches no mês civil UTC (status sent/created); usado para cota mensal. */
|
|
9
|
+
exports.LEGAL_TERM_DISPATCH_COUNT_MONTHLY = 'legalTerm.dispatch.countMonthly';
|
|
8
10
|
exports.SIGNATURE_LEGAL_ENVELOPE_CREATE = 'signature.legalEnvelope.create';
|
|
9
11
|
/** Resumo de documentos por IDs (tenant + escopo); usado pela API para enriquecer dispatches. */
|
|
10
12
|
exports.SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = 'signature.documents.summaryByIds';
|
|
@@ -9,6 +9,11 @@ export declare class CreateLegalSigningEnvelopeRpcDto {
|
|
|
9
9
|
renderedHtml?: string;
|
|
10
10
|
documentFilename: string;
|
|
11
11
|
envelopeName?: string;
|
|
12
|
+
tenantAutoSign?: boolean;
|
|
13
|
+
tenantSignerName?: string;
|
|
14
|
+
tenantSignerEmail?: string;
|
|
15
|
+
tenantSignerBirthday?: string;
|
|
16
|
+
tenantSignerDocumentation?: string;
|
|
12
17
|
}
|
|
13
18
|
export declare class CreateLegalSigningEnvelopeRpcResultDto {
|
|
14
19
|
signatureDocumentId: 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":"
|
|
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;IAQnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAUtB,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"}
|
|
@@ -23,6 +23,11 @@ class CreateLegalSigningEnvelopeRpcDto {
|
|
|
23
23
|
renderedHtml;
|
|
24
24
|
documentFilename;
|
|
25
25
|
envelopeName;
|
|
26
|
+
tenantAutoSign;
|
|
27
|
+
tenantSignerName;
|
|
28
|
+
tenantSignerEmail;
|
|
29
|
+
tenantSignerBirthday;
|
|
30
|
+
tenantSignerDocumentation;
|
|
26
31
|
}
|
|
27
32
|
exports.CreateLegalSigningEnvelopeRpcDto = CreateLegalSigningEnvelopeRpcDto;
|
|
28
33
|
__decorate([
|
|
@@ -73,7 +78,10 @@ __decorate([
|
|
|
73
78
|
__metadata("design:type", String)
|
|
74
79
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "renderedHtml", void 0);
|
|
75
80
|
__decorate([
|
|
76
|
-
(0, swagger_1.ApiProperty)({
|
|
81
|
+
(0, swagger_1.ApiProperty)({
|
|
82
|
+
example: 'termo-juridico.pdf',
|
|
83
|
+
description: 'Nome do arquivo no envelope. Com renderedHtml o PDF é gerado no signature-service (html-to-pdfmake + pdfmake); com pdfBase64, o binário enviado já é PDF.',
|
|
84
|
+
}),
|
|
77
85
|
(0, class_validator_1.IsString)(),
|
|
78
86
|
(0, class_validator_1.MinLength)(1),
|
|
79
87
|
(0, class_validator_1.MaxLength)(255),
|
|
@@ -86,6 +94,42 @@ __decorate([
|
|
|
86
94
|
(0, class_validator_1.MaxLength)(500),
|
|
87
95
|
__metadata("design:type", String)
|
|
88
96
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "envelopeName", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
99
|
+
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.',
|
|
100
|
+
}),
|
|
101
|
+
(0, class_validator_1.IsOptional)(),
|
|
102
|
+
(0, class_validator_1.IsBoolean)(),
|
|
103
|
+
__metadata("design:type", Boolean)
|
|
104
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantAutoSign", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
107
|
+
(0, class_validator_1.IsString)(),
|
|
108
|
+
(0, class_validator_1.MinLength)(1),
|
|
109
|
+
(0, class_validator_1.MaxLength)(500),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantSignerName", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
114
|
+
(0, class_validator_1.IsEmail)(),
|
|
115
|
+
(0, class_validator_1.MaxLength)(320),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantSignerEmail", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
120
|
+
(0, class_validator_1.IsString)(),
|
|
121
|
+
(0, class_validator_1.Matches)(/^\d{4}-\d{2}-\d{2}$/, {
|
|
122
|
+
message: 'tenantSignerBirthday deve ser ISO (YYYY-MM-DD)',
|
|
123
|
+
}),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantSignerBirthday", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
128
|
+
(0, class_validator_1.IsString)(),
|
|
129
|
+
(0, class_validator_1.MinLength)(11),
|
|
130
|
+
(0, class_validator_1.MaxLength)(14),
|
|
131
|
+
__metadata("design:type", String)
|
|
132
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantSignerDocumentation", void 0);
|
|
89
133
|
class CreateLegalSigningEnvelopeRpcResultDto {
|
|
90
134
|
signatureDocumentId;
|
|
91
135
|
signingUrl;
|
package/package.json
CHANGED
|
@@ -43,6 +43,9 @@ export class PlanSummaryDto {
|
|
|
43
43
|
@ApiProperty({ description: 'Monthly AI token allowance', example: 5000 })
|
|
44
44
|
monthlyAiTokens: number;
|
|
45
45
|
|
|
46
|
+
@ApiProperty({ description: 'Max legal term dispatches per calendar month (UTC)', example: 100 })
|
|
47
|
+
monthlyLegalTerms: number;
|
|
48
|
+
|
|
46
49
|
@ApiPropertyOptional()
|
|
47
50
|
createdAt?: Date;
|
|
48
51
|
|
|
@@ -27,4 +27,7 @@ export class TenantLimitsSummaryDto {
|
|
|
27
27
|
|
|
28
28
|
@ApiPropertyOptional({ description: 'Override max units' })
|
|
29
29
|
maxUnits: number | null;
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional({ description: 'Override max legal term dispatches per month (UTC)' })
|
|
32
|
+
monthlyLegalTerms: number | null;
|
|
30
33
|
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsArray,
|
|
4
|
+
IsBoolean,
|
|
5
|
+
IsEmail,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsString,
|
|
8
|
+
IsUUID,
|
|
9
|
+
Matches,
|
|
10
|
+
MaxLength,
|
|
11
|
+
MinLength,
|
|
12
|
+
ValidateIf,
|
|
13
|
+
} from 'class-validator';
|
|
3
14
|
|
|
4
15
|
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
5
16
|
export class LegalTermPreviewRequestDto {
|
|
@@ -76,4 +87,36 @@ export class LegalTermSendDto {
|
|
|
76
87
|
@IsString()
|
|
77
88
|
@MaxLength(128)
|
|
78
89
|
instanceKey?: string;
|
|
90
|
+
|
|
91
|
+
@ApiPropertyOptional({
|
|
92
|
+
description:
|
|
93
|
+
'Assinatura automática do representante da clínica (Clicksign) antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
|
|
94
|
+
})
|
|
95
|
+
@IsOptional()
|
|
96
|
+
@IsBoolean()
|
|
97
|
+
tenantAutoSign?: boolean;
|
|
98
|
+
|
|
99
|
+
@ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
|
|
100
|
+
@IsString()
|
|
101
|
+
@MinLength(1)
|
|
102
|
+
@MaxLength(500)
|
|
103
|
+
tenantSignerName?: string;
|
|
104
|
+
|
|
105
|
+
@ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
|
|
106
|
+
@IsEmail()
|
|
107
|
+
@MaxLength(320)
|
|
108
|
+
tenantSignerEmail?: string;
|
|
109
|
+
|
|
110
|
+
@ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
|
|
111
|
+
@IsString()
|
|
112
|
+
@Matches(/^\d{4}-\d{2}-\d{2}$/, {
|
|
113
|
+
message: 'tenantSignerBirthday deve ser ISO (YYYY-MM-DD)',
|
|
114
|
+
})
|
|
115
|
+
tenantSignerBirthday?: string;
|
|
116
|
+
|
|
117
|
+
@ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
|
|
118
|
+
@IsString()
|
|
119
|
+
@MinLength(11)
|
|
120
|
+
@MaxLength(14)
|
|
121
|
+
tenantSignerDocumentation?: string;
|
|
79
122
|
}
|
|
@@ -2,6 +2,8 @@ export const LEGAL_TERM_TEMPLATE_GET = 'legalTerm.template.get';
|
|
|
2
2
|
export const LEGAL_TERM_TEMPLATE_UPSERT = 'legalTerm.template.upsert';
|
|
3
3
|
export const LEGAL_TERM_DISPATCH_CREATE = 'legalTerm.dispatch.create';
|
|
4
4
|
export const LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = 'legalTerm.dispatch.listByPatient';
|
|
5
|
+
/** Conta dispatches no mês civil UTC (status sent/created); usado para cota mensal. */
|
|
6
|
+
export const LEGAL_TERM_DISPATCH_COUNT_MONTHLY = 'legalTerm.dispatch.countMonthly';
|
|
5
7
|
export const SIGNATURE_LEGAL_ENVELOPE_CREATE = 'signature.legalEnvelope.create';
|
|
6
8
|
/** Resumo de documentos por IDs (tenant + escopo); usado pela API para enriquecer dispatches. */
|
|
7
9
|
export const SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = 'signature.documents.summaryByIds';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
2
|
import {
|
|
3
|
+
IsBoolean,
|
|
3
4
|
IsEmail,
|
|
4
5
|
IsOptional,
|
|
5
6
|
IsString,
|
|
6
7
|
IsUUID,
|
|
8
|
+
Matches,
|
|
7
9
|
MaxLength,
|
|
8
10
|
MinLength,
|
|
9
11
|
ValidateIf,
|
|
@@ -51,7 +53,11 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
51
53
|
@MinLength(1)
|
|
52
54
|
renderedHtml?: string;
|
|
53
55
|
|
|
54
|
-
@ApiProperty({
|
|
56
|
+
@ApiProperty({
|
|
57
|
+
example: 'termo-juridico.pdf',
|
|
58
|
+
description:
|
|
59
|
+
'Nome do arquivo no envelope. Com renderedHtml o PDF é gerado no signature-service (html-to-pdfmake + pdfmake); com pdfBase64, o binário enviado já é PDF.',
|
|
60
|
+
})
|
|
55
61
|
@IsString()
|
|
56
62
|
@MinLength(1)
|
|
57
63
|
@MaxLength(255)
|
|
@@ -62,6 +68,38 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
62
68
|
@IsString()
|
|
63
69
|
@MaxLength(500)
|
|
64
70
|
envelopeName?: string;
|
|
71
|
+
|
|
72
|
+
@ApiPropertyOptional({
|
|
73
|
+
description:
|
|
74
|
+
'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.',
|
|
75
|
+
})
|
|
76
|
+
@IsOptional()
|
|
77
|
+
@IsBoolean()
|
|
78
|
+
tenantAutoSign?: boolean;
|
|
79
|
+
|
|
80
|
+
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => o.tenantAutoSign === true)
|
|
81
|
+
@IsString()
|
|
82
|
+
@MinLength(1)
|
|
83
|
+
@MaxLength(500)
|
|
84
|
+
tenantSignerName?: string;
|
|
85
|
+
|
|
86
|
+
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => o.tenantAutoSign === true)
|
|
87
|
+
@IsEmail()
|
|
88
|
+
@MaxLength(320)
|
|
89
|
+
tenantSignerEmail?: string;
|
|
90
|
+
|
|
91
|
+
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => o.tenantAutoSign === true)
|
|
92
|
+
@IsString()
|
|
93
|
+
@Matches(/^\d{4}-\d{2}-\d{2}$/, {
|
|
94
|
+
message: 'tenantSignerBirthday deve ser ISO (YYYY-MM-DD)',
|
|
95
|
+
})
|
|
96
|
+
tenantSignerBirthday?: string;
|
|
97
|
+
|
|
98
|
+
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => o.tenantAutoSign === true)
|
|
99
|
+
@IsString()
|
|
100
|
+
@MinLength(11)
|
|
101
|
+
@MaxLength(14)
|
|
102
|
+
tenantSignerDocumentation?: string;
|
|
65
103
|
}
|
|
66
104
|
|
|
67
105
|
export class CreateLegalSigningEnvelopeRpcResultDto {
|