tychat-contracts 1.3.15 → 1.3.18
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/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-dispatch.dto.d.ts +21 -0
- package/dist/legal-terms/legal-term-dispatch.dto.d.ts.map +1 -0
- package/dist/legal-terms/legal-term-dispatch.dto.js +2 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts +1 -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-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 +8 -0
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-template.dto.d.ts +2 -0
- package/dist/legal-terms/legal-term-template.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-template.dto.js +21 -0
- package/package.json +1 -1
- package/src/legal-terms/index.ts +1 -0
- package/src/legal-terms/legal-term-dispatch.dto.ts +28 -0
- package/src/legal-terms/legal-term-preview.dto.ts +10 -0
- package/src/legal-terms/legal-term-rmq-patterns.ts +2 -0
- package/src/legal-terms/legal-term-signature-rpc.dto.ts +14 -0
- package/src/legal-terms/legal-term-template.dto.ts +20 -2
|
@@ -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,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,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
|
|
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./legal-term-template.dto"), exports);
|
|
18
18
|
__exportStar(require("./legal-term-preview.dto"), exports);
|
|
19
|
+
__exportStar(require("./legal-term-dispatch.dto"), exports);
|
|
19
20
|
__exportStar(require("./legal-term-signature-rpc.dto"), exports);
|
|
20
21
|
__exportStar(require("./legal-term-rmq-patterns"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Status do registro de envio na clínica (WhatsApp / fluxo). */
|
|
2
|
+
export type LegalTermDispatchStatusValue = 'created' | 'sent' | 'failed';
|
|
3
|
+
/** Status do documento na Clicksign (signature-service). */
|
|
4
|
+
export type SignatureDocumentStatusValue = 'pending' | 'signed' | 'refused' | 'cancelled' | 'expired';
|
|
5
|
+
/** Item agregado para a ficha do paciente (API: clinic + signature). */
|
|
6
|
+
export type PatientLegalTermDispatchItemDto = {
|
|
7
|
+
id: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
procedure_ids: string[];
|
|
10
|
+
procedure_names: string[];
|
|
11
|
+
dispatch_status: LegalTermDispatchStatusValue;
|
|
12
|
+
error_code: string | null;
|
|
13
|
+
signature_document_id: string | null;
|
|
14
|
+
signature_status: SignatureDocumentStatusValue | null;
|
|
15
|
+
signed_at: string | null;
|
|
16
|
+
patient_signed: boolean | null;
|
|
17
|
+
};
|
|
18
|
+
export type PatientLegalTermDispatchesResponseDto = {
|
|
19
|
+
items: PatientLegalTermDispatchItemDto[];
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=legal-term-dispatch.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal-term-dispatch.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-dispatch.dto.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzE,4DAA4D;AAC5D,MAAM,MAAM,4BAA4B,GACpC,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;AAEd,wEAAwE;AACxE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,4BAA4B,CAAC;IAC9C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,gBAAgB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACtD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG;IAClD,KAAK,EAAE,+BAA+B,EAAE,CAAC;CAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-preview.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-preview.dto.ts"],"names":[],"mappings":"AAGA,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;
|
|
1
|
+
{"version":3,"file":"legal-term-preview.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-preview.dto.ts"],"names":[],"mappings":"AAGA,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;CACtB"}
|
|
@@ -18,6 +18,7 @@ class LegalTermPreviewRequestDto {
|
|
|
18
18
|
nome_paciente;
|
|
19
19
|
cpf_exemplo;
|
|
20
20
|
procedimento_nomes;
|
|
21
|
+
procedimento_efeitos_colaterais;
|
|
21
22
|
data_hora_iso;
|
|
22
23
|
}
|
|
23
24
|
exports.LegalTermPreviewRequestDto = LegalTermPreviewRequestDto;
|
|
@@ -52,6 +53,16 @@ __decorate([
|
|
|
52
53
|
(0, class_validator_1.IsString)({ each: true }),
|
|
53
54
|
__metadata("design:type", Array)
|
|
54
55
|
], LegalTermPreviewRequestDto.prototype, "procedimento_nomes", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
type: [String],
|
|
59
|
+
description: 'Efeitos colaterais na mesma ordem que `procedimento_nomes` (prévia de {{ table_side_effects_en_list }})',
|
|
60
|
+
}),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsArray)(),
|
|
63
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
64
|
+
__metadata("design:type", Array)
|
|
65
|
+
], LegalTermPreviewRequestDto.prototype, "procedimento_efeitos_colaterais", void 0);
|
|
55
66
|
__decorate([
|
|
56
67
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Data/hora ISO 8601 para {{ data_hora }}' }),
|
|
57
68
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -3,4 +3,6 @@ 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
5
|
export declare const SIGNATURE_LEGAL_ENVELOPE_CREATE = "signature.legalEnvelope.create";
|
|
6
|
+
/** Resumo de documentos por IDs (tenant + escopo); usado pela API para enriquecer dispatches. */
|
|
7
|
+
export declare const SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = "signature.documents.summaryByIds";
|
|
6
8
|
//# sourceMappingURL=legal-term-rmq-patterns.d.ts.map
|
|
@@ -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"}
|
|
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,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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_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
8
|
exports.SIGNATURE_LEGAL_ENVELOPE_CREATE = 'signature.legalEnvelope.create';
|
|
9
|
+
/** Resumo de documentos por IDs (tenant + escopo); usado pela API para enriquecer dispatches. */
|
|
10
|
+
exports.SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = 'signature.documents.summaryByIds';
|
|
@@ -17,4 +17,12 @@ export declare class CreateLegalSigningEnvelopeRpcResultDto {
|
|
|
17
17
|
clicksignDocumentId: string;
|
|
18
18
|
clicksignSignerId?: string;
|
|
19
19
|
}
|
|
20
|
+
/** Resposta RPC: um documento por ID solicitado (apenas linhas do tenant). */
|
|
21
|
+
export type SignatureDocumentSummaryItemDto = {
|
|
22
|
+
id: string;
|
|
23
|
+
signature_status: 'pending' | 'signed' | 'refused' | 'cancelled' | 'expired';
|
|
24
|
+
patient_signed: boolean;
|
|
25
|
+
/** ISO-8601 UTC ou null */
|
|
26
|
+
signed_at: string | null;
|
|
27
|
+
};
|
|
20
28
|
//# sourceMappingURL=legal-term-signature-rpc.dto.d.ts.map
|
|
@@ -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":"AAWA,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;IAMtB,gBAAgB,EAAE,MAAM,CAAC;IAMzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;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"}
|
|
1
|
+
{"version":3,"file":"legal-term-signature-rpc.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-signature-rpc.dto.ts"],"names":[],"mappings":"AAWA,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;IAMtB,gBAAgB,EAAE,MAAM,CAAC;IAMzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,sCAAsC;IAEjD,mBAAmB,EAAE,MAAM,CAAC;IAG5B,UAAU,EAAE,MAAM,CAAC;IAGnB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EACZ,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export declare class LegalTermTemplateDto {
|
|
2
2
|
id: string;
|
|
3
3
|
body_html: string;
|
|
4
|
+
mandatory_procedure_ids: string[];
|
|
4
5
|
createdAt: Date;
|
|
5
6
|
updatedAt: Date;
|
|
6
7
|
}
|
|
7
8
|
export declare class UpsertLegalTermTemplateDto {
|
|
8
9
|
body_html: string;
|
|
10
|
+
mandatory_procedure_ids?: string[];
|
|
9
11
|
}
|
|
10
12
|
//# 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":"AAGA,qBAAa,oBAAoB;IAE/B,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"legal-term-template.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-template.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,oBAAoB;IAE/B,EAAE,EAAE,MAAM,CAAC;IAGX,SAAS,EAAE,MAAM,CAAC;IAOlB,uBAAuB,EAAE,MAAM,EAAE,CAAC;IAGlC,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,qBAAa,0BAA0B;IAKrC,SAAS,EAAE,MAAM,CAAC;IAWlB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;CACpC"}
|
|
@@ -15,6 +15,7 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
class LegalTermTemplateDto {
|
|
16
16
|
id;
|
|
17
17
|
body_html;
|
|
18
|
+
mandatory_procedure_ids;
|
|
18
19
|
createdAt;
|
|
19
20
|
updatedAt;
|
|
20
21
|
}
|
|
@@ -27,6 +28,14 @@ __decorate([
|
|
|
27
28
|
(0, swagger_1.ApiProperty)({ description: 'HTML do termo (editor rico)' }),
|
|
28
29
|
__metadata("design:type", String)
|
|
29
30
|
], LegalTermTemplateDto.prototype, "body_html", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
type: [String],
|
|
34
|
+
format: 'uuid',
|
|
35
|
+
description: 'IDs de procedimentos para os quais o envio do termo jurídico é obrigatório (subconjunto do cadastro)',
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], LegalTermTemplateDto.prototype, "mandatory_procedure_ids", void 0);
|
|
30
39
|
__decorate([
|
|
31
40
|
(0, swagger_1.ApiProperty)(),
|
|
32
41
|
__metadata("design:type", Date)
|
|
@@ -37,6 +46,7 @@ __decorate([
|
|
|
37
46
|
], LegalTermTemplateDto.prototype, "updatedAt", void 0);
|
|
38
47
|
class UpsertLegalTermTemplateDto {
|
|
39
48
|
body_html;
|
|
49
|
+
mandatory_procedure_ids;
|
|
40
50
|
}
|
|
41
51
|
exports.UpsertLegalTermTemplateDto = UpsertLegalTermTemplateDto;
|
|
42
52
|
__decorate([
|
|
@@ -46,3 +56,14 @@ __decorate([
|
|
|
46
56
|
(0, class_validator_1.MaxLength)(500_000),
|
|
47
57
|
__metadata("design:type", String)
|
|
48
58
|
], UpsertLegalTermTemplateDto.prototype, "body_html", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
61
|
+
type: [String],
|
|
62
|
+
format: 'uuid',
|
|
63
|
+
description: 'Se enviado, substitui a lista de procedimentos obrigatórios; omitir para manter o valor atual no servidor',
|
|
64
|
+
}),
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_1.IsArray)(),
|
|
67
|
+
(0, class_validator_1.IsUUID)('4', { each: true }),
|
|
68
|
+
__metadata("design:type", Array)
|
|
69
|
+
], UpsertLegalTermTemplateDto.prototype, "mandatory_procedure_ids", void 0);
|
package/package.json
CHANGED
package/src/legal-terms/index.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Status do registro de envio na clínica (WhatsApp / fluxo). */
|
|
2
|
+
export type LegalTermDispatchStatusValue = 'created' | 'sent' | 'failed';
|
|
3
|
+
|
|
4
|
+
/** Status do documento na Clicksign (signature-service). */
|
|
5
|
+
export type SignatureDocumentStatusValue =
|
|
6
|
+
| 'pending'
|
|
7
|
+
| 'signed'
|
|
8
|
+
| 'refused'
|
|
9
|
+
| 'cancelled'
|
|
10
|
+
| 'expired';
|
|
11
|
+
|
|
12
|
+
/** Item agregado para a ficha do paciente (API: clinic + signature). */
|
|
13
|
+
export type PatientLegalTermDispatchItemDto = {
|
|
14
|
+
id: string;
|
|
15
|
+
created_at: string;
|
|
16
|
+
procedure_ids: string[];
|
|
17
|
+
procedure_names: string[];
|
|
18
|
+
dispatch_status: LegalTermDispatchStatusValue;
|
|
19
|
+
error_code: string | null;
|
|
20
|
+
signature_document_id: string | null;
|
|
21
|
+
signature_status: SignatureDocumentStatusValue | null;
|
|
22
|
+
signed_at: string | null;
|
|
23
|
+
patient_signed: boolean | null;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type PatientLegalTermDispatchesResponseDto = {
|
|
27
|
+
items: PatientLegalTermDispatchItemDto[];
|
|
28
|
+
};
|
|
@@ -30,6 +30,16 @@ export class LegalTermPreviewRequestDto {
|
|
|
30
30
|
@IsString({ each: true })
|
|
31
31
|
procedimento_nomes?: string[];
|
|
32
32
|
|
|
33
|
+
@ApiPropertyOptional({
|
|
34
|
+
type: [String],
|
|
35
|
+
description:
|
|
36
|
+
'Efeitos colaterais na mesma ordem que `procedimento_nomes` (prévia de {{ table_side_effects_en_list }})',
|
|
37
|
+
})
|
|
38
|
+
@IsOptional()
|
|
39
|
+
@IsArray()
|
|
40
|
+
@IsString({ each: true })
|
|
41
|
+
procedimento_efeitos_colaterais?: string[];
|
|
42
|
+
|
|
33
43
|
@ApiPropertyOptional({ description: 'Data/hora ISO 8601 para {{ data_hora }}' })
|
|
34
44
|
@IsOptional()
|
|
35
45
|
@IsString()
|
|
@@ -3,3 +3,5 @@ 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
5
|
export const SIGNATURE_LEGAL_ENVELOPE_CREATE = 'signature.legalEnvelope.create';
|
|
6
|
+
/** Resumo de documentos por IDs (tenant + escopo); usado pela API para enriquecer dispatches. */
|
|
7
|
+
export const SIGNATURE_DOCUMENTS_SUMMARY_BY_IDS = 'signature.documents.summaryByIds';
|
|
@@ -80,3 +80,17 @@ export class CreateLegalSigningEnvelopeRpcResultDto {
|
|
|
80
80
|
@ApiPropertyOptional()
|
|
81
81
|
clicksignSignerId?: string;
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
/** Resposta RPC: um documento por ID solicitado (apenas linhas do tenant). */
|
|
85
|
+
export type SignatureDocumentSummaryItemDto = {
|
|
86
|
+
id: string;
|
|
87
|
+
signature_status:
|
|
88
|
+
| 'pending'
|
|
89
|
+
| 'signed'
|
|
90
|
+
| 'refused'
|
|
91
|
+
| 'cancelled'
|
|
92
|
+
| 'expired';
|
|
93
|
+
patient_signed: boolean;
|
|
94
|
+
/** ISO-8601 UTC ou null */
|
|
95
|
+
signed_at: string | null;
|
|
96
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
-
import { IsString, MaxLength, MinLength } from 'class-validator';
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import { IsArray, IsOptional, IsString, IsUUID, MaxLength, MinLength } from 'class-validator';
|
|
3
3
|
|
|
4
4
|
export class LegalTermTemplateDto {
|
|
5
5
|
@ApiProperty({ format: 'uuid' })
|
|
@@ -8,6 +8,13 @@ export class LegalTermTemplateDto {
|
|
|
8
8
|
@ApiProperty({ description: 'HTML do termo (editor rico)' })
|
|
9
9
|
body_html: string;
|
|
10
10
|
|
|
11
|
+
@ApiProperty({
|
|
12
|
+
type: [String],
|
|
13
|
+
format: 'uuid',
|
|
14
|
+
description: 'IDs de procedimentos para os quais o envio do termo jurídico é obrigatório (subconjunto do cadastro)',
|
|
15
|
+
})
|
|
16
|
+
mandatory_procedure_ids: string[];
|
|
17
|
+
|
|
11
18
|
@ApiProperty()
|
|
12
19
|
createdAt: Date;
|
|
13
20
|
|
|
@@ -21,4 +28,15 @@ export class UpsertLegalTermTemplateDto {
|
|
|
21
28
|
@MinLength(1)
|
|
22
29
|
@MaxLength(500_000)
|
|
23
30
|
body_html: string;
|
|
31
|
+
|
|
32
|
+
@ApiPropertyOptional({
|
|
33
|
+
type: [String],
|
|
34
|
+
format: 'uuid',
|
|
35
|
+
description:
|
|
36
|
+
'Se enviado, substitui a lista de procedimentos obrigatórios; omitir para manter o valor atual no servidor',
|
|
37
|
+
})
|
|
38
|
+
@IsOptional()
|
|
39
|
+
@IsArray()
|
|
40
|
+
@IsUUID('4', { each: true })
|
|
41
|
+
mandatory_procedure_ids?: string[];
|
|
24
42
|
}
|