tychat-contracts 1.3.10 → 1.3.15
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/analytics/event-analytic.enum.d.ts +1 -1
- package/dist/analytics/event-analytic.enum.d.ts.map +1 -1
- package/dist/analytics/event-analytic.enum.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/legal-terms/index.d.ts +5 -0
- package/dist/legal-terms/index.d.ts.map +1 -0
- package/dist/legal-terms/index.js +20 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts +15 -0
- package/dist/legal-terms/legal-term-preview.dto.d.ts.map +1 -0
- package/dist/legal-terms/legal-term-preview.dto.js +100 -0
- package/dist/legal-terms/legal-term-rmq-patterns.d.ts +6 -0
- package/dist/legal-terms/legal-term-rmq-patterns.d.ts.map +1 -0
- package/dist/legal-terms/legal-term-rmq-patterns.js +8 -0
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts +20 -0
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts.map +1 -0
- package/dist/legal-terms/legal-term-signature-rpc.dto.js +116 -0
- package/dist/legal-terms/legal-term-template.dto.d.ts +10 -0
- package/dist/legal-terms/legal-term-template.dto.d.ts.map +1 -0
- package/dist/legal-terms/legal-term-template.dto.js +48 -0
- package/package.json +1 -1
- package/src/analytics/event-analytic.enum.ts +3 -0
- package/src/index.ts +1 -0
- package/src/legal-terms/index.ts +4 -0
- package/src/legal-terms/legal-term-preview.dto.ts +69 -0
- package/src/legal-terms/legal-term-rmq-patterns.ts +5 -0
- package/src/legal-terms/legal-term-signature-rpc.dto.ts +82 -0
- package/src/legal-terms/legal-term-template.dto.ts +24 -0
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Enum of all analytic event types emitted by microservices.
|
|
3
3
|
* Each value follows the pattern: `domain.action`.
|
|
4
4
|
*/
|
|
5
|
-
export declare const EVENT_ANALYTIC_TYPES: readonly ["patient.created", "patient.updated", "patient.deleted", "patient.status_changed", "appointment.created", "appointment.updated", "appointment.canceled", "appointment.rescheduled", "appointment.no_show", "appointment.finished", "appointment.procedure_finished", "checkin.effectued", "checkout.effectued", "message.sent", "message.received", "conversation.session_started", "conversation.session_ended", "conversation.transferred_to_human", "followup.abandonment.sent", "followup.appointment_confirmation.sent", "followup.satisfaction_booking.sent", "followup.satisfaction_finished.sent", "followup.no_show_reschedule.sent", "followup.wellness_check.sent", "followup.return_suggestion.sent", "followup.satisfaction_booking.response_received", "followup.satisfaction_finished.response_received", "followup.config_updated", "payment.created", "payment.payed", "payment.refunded", "payment.canceled", "payment.overdue", "payment_gateway.payment_created", "payment_gateway.payment_confirmed", "payment_gateway.payment_failed", "payment_gateway.payment_refunded", "payment_gateway.payment_canceled", "payment_gateway.payment_expired", "payment_gateway.webhook_received", "billing.invoice_created", "billing.invoice_paid", "ai.interaction", "ai.fallback", "auth.login", "auth.logout", "auth.password_reset", "user.created", "user.updated", "user.deleted", "notification.sent", "notification.failed", "whatsapp.connection_established", "whatsapp.connection_lost", "procedure.created", "procedure.updated", "procedure.deleted", "specialty.created", "specialty.updated", "specialty.deleted", "professional.created", "professional.updated", "professional.deleted", "configuration.updated", "storage.file_uploaded", "storage.file_deleted", "tenant.created", "tenant.updated"];
|
|
5
|
+
export declare const EVENT_ANALYTIC_TYPES: readonly ["patient.created", "patient.updated", "patient.deleted", "patient.status_changed", "appointment.created", "appointment.updated", "appointment.canceled", "appointment.rescheduled", "appointment.no_show", "appointment.finished", "appointment.procedure_finished", "checkin.effectued", "checkout.effectued", "message.sent", "message.received", "conversation.session_started", "conversation.session_ended", "conversation.transferred_to_human", "followup.abandonment.sent", "followup.appointment_confirmation.sent", "followup.satisfaction_booking.sent", "followup.satisfaction_finished.sent", "followup.no_show_reschedule.sent", "followup.wellness_check.sent", "followup.return_suggestion.sent", "followup.satisfaction_booking.response_received", "followup.satisfaction_finished.response_received", "followup.config_updated", "payment.created", "payment.payed", "payment.refunded", "payment.canceled", "payment.overdue", "payment_gateway.payment_created", "payment_gateway.payment_confirmed", "payment_gateway.payment_failed", "payment_gateway.payment_refunded", "payment_gateway.payment_canceled", "payment_gateway.payment_expired", "payment_gateway.webhook_received", "billing.invoice_created", "billing.invoice_paid", "ai.interaction", "ai.fallback", "auth.login", "auth.logout", "auth.password_reset", "user.created", "user.updated", "user.deleted", "notification.sent", "notification.failed", "whatsapp.connection_established", "whatsapp.connection_lost", "procedure.created", "procedure.updated", "procedure.deleted", "specialty.created", "specialty.updated", "specialty.deleted", "professional.created", "professional.updated", "professional.deleted", "configuration.updated", "legal_term.template.updated", "storage.file_uploaded", "storage.file_deleted", "tenant.created", "tenant.updated"];
|
|
6
6
|
export type EventAnalyticType = (typeof EVENT_ANALYTIC_TYPES)[number];
|
|
7
7
|
//# sourceMappingURL=event-analytic.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-analytic.enum.d.ts","sourceRoot":"","sources":["../../src/analytics/event-analytic.enum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"event-analytic.enum.d.ts","sourceRoot":"","sources":["../../src/analytics/event-analytic.enum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,6wDAgHvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -89,6 +89,8 @@ exports.EVENT_ANALYTIC_TYPES = [
|
|
|
89
89
|
'professional.deleted',
|
|
90
90
|
// ── Configuration events ────────────────────────────────────────
|
|
91
91
|
'configuration.updated',
|
|
92
|
+
// ── Legal term (clinic template) ────────────────────────────────
|
|
93
|
+
'legal_term.template.updated',
|
|
92
94
|
// ── Storage events ──────────────────────────────────────────────
|
|
93
95
|
'storage.file_uploaded',
|
|
94
96
|
'storage.file_deleted',
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./legal-term-template.dto"), exports);
|
|
18
|
+
__exportStar(require("./legal-term-preview.dto"), exports);
|
|
19
|
+
__exportStar(require("./legal-term-signature-rpc.dto"), exports);
|
|
20
|
+
__exportStar(require("./legal-term-rmq-patterns"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
2
|
+
export declare class LegalTermPreviewRequestDto {
|
|
3
|
+
body_html?: string;
|
|
4
|
+
nome_paciente?: string;
|
|
5
|
+
cpf_exemplo?: string;
|
|
6
|
+
procedimento_nomes?: string[];
|
|
7
|
+
data_hora_iso?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class LegalTermSendDto {
|
|
10
|
+
procedureIds: string[];
|
|
11
|
+
whatsappMessage: string;
|
|
12
|
+
signerEmail?: string;
|
|
13
|
+
instanceKey?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=legal-term-preview.dto.d.ts.map
|
|
@@ -0,0 +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;IAM9B,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"}
|
|
@@ -0,0 +1,100 @@
|
|
|
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.LegalTermSendDto = exports.LegalTermPreviewRequestDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
16
|
+
class LegalTermPreviewRequestDto {
|
|
17
|
+
body_html;
|
|
18
|
+
nome_paciente;
|
|
19
|
+
cpf_exemplo;
|
|
20
|
+
procedimento_nomes;
|
|
21
|
+
data_hora_iso;
|
|
22
|
+
}
|
|
23
|
+
exports.LegalTermPreviewRequestDto = LegalTermPreviewRequestDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
26
|
+
description: 'HTML atual do editor (rascunho); se omitido, usa o modelo salvo no banco',
|
|
27
|
+
maxLength: 500_000,
|
|
28
|
+
}),
|
|
29
|
+
(0, class_validator_1.IsOptional)(),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.MaxLength)(500_000),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], LegalTermPreviewRequestDto.prototype, "body_html", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Nome do paciente de exemplo' }),
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.MaxLength)(500),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], LegalTermPreviewRequestDto.prototype, "nome_paciente", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'CPF de exemplo (com ou sem máscara)' }),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.MaxLength)(20),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], LegalTermPreviewRequestDto.prototype, "cpf_exemplo", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({ type: [String], description: 'Nomes de procedimentos na ordem' }),
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsArray)(),
|
|
52
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
53
|
+
__metadata("design:type", Array)
|
|
54
|
+
], LegalTermPreviewRequestDto.prototype, "procedimento_nomes", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Data/hora ISO 8601 para {{ data_hora }}' }),
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
(0, class_validator_1.IsString)(),
|
|
59
|
+
(0, class_validator_1.MaxLength)(40),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], LegalTermPreviewRequestDto.prototype, "data_hora_iso", void 0);
|
|
62
|
+
class LegalTermSendDto {
|
|
63
|
+
procedureIds;
|
|
64
|
+
whatsappMessage;
|
|
65
|
+
signerEmail;
|
|
66
|
+
instanceKey;
|
|
67
|
+
}
|
|
68
|
+
exports.LegalTermSendDto = LegalTermSendDto;
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({ type: [String], format: 'uuid' }),
|
|
71
|
+
(0, class_validator_1.IsArray)(),
|
|
72
|
+
(0, class_validator_1.IsUUID)('4', { each: true }),
|
|
73
|
+
__metadata("design:type", Array)
|
|
74
|
+
], LegalTermSendDto.prototype, "procedureIds", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({
|
|
77
|
+
description: 'Mensagem WhatsApp; deve conter exatamente {{ link_termo_juridico }}',
|
|
78
|
+
example: 'Olá, assine seu termo: {{ link_termo_juridico }}',
|
|
79
|
+
}),
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
(0, class_validator_1.MinLength)(1),
|
|
82
|
+
(0, class_validator_1.MaxLength)(4000),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], LegalTermSendDto.prototype, "whatsappMessage", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'E-mail do signatário se o paciente não tiver e-mail cadastrado' }),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
(0, class_validator_1.IsString)(),
|
|
89
|
+
(0, class_validator_1.MaxLength)(320),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], LegalTermSendDto.prototype, "signerEmail", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
94
|
+
description: 'Instância Evolution (opcional). Se omitido, usa-se a da sessão ativa do paciente (igual a conversas).',
|
|
95
|
+
}),
|
|
96
|
+
(0, class_validator_1.IsOptional)(),
|
|
97
|
+
(0, class_validator_1.IsString)(),
|
|
98
|
+
(0, class_validator_1.MaxLength)(128),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], LegalTermSendDto.prototype, "instanceKey", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const LEGAL_TERM_TEMPLATE_GET = "legalTerm.template.get";
|
|
2
|
+
export declare const LEGAL_TERM_TEMPLATE_UPSERT = "legalTerm.template.upsert";
|
|
3
|
+
export declare const LEGAL_TERM_DISPATCH_CREATE = "legalTerm.dispatch.create";
|
|
4
|
+
export declare const LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = "legalTerm.dispatch.listByPatient";
|
|
5
|
+
export declare const SIGNATURE_LEGAL_ENVELOPE_CREATE = "signature.legalEnvelope.create";
|
|
6
|
+
//# sourceMappingURL=legal-term-rmq-patterns.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
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;
|
|
4
|
+
exports.LEGAL_TERM_TEMPLATE_GET = 'legalTerm.template.get';
|
|
5
|
+
exports.LEGAL_TERM_TEMPLATE_UPSERT = 'legalTerm.template.upsert';
|
|
6
|
+
exports.LEGAL_TERM_DISPATCH_CREATE = 'legalTerm.dispatch.create';
|
|
7
|
+
exports.LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = 'legalTerm.dispatch.listByPatient';
|
|
8
|
+
exports.SIGNATURE_LEGAL_ENVELOPE_CREATE = 'signature.legalEnvelope.create';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
|
|
2
|
+
export declare class CreateLegalSigningEnvelopeRpcDto {
|
|
3
|
+
tenant: string;
|
|
4
|
+
patientId: string;
|
|
5
|
+
legalTermDispatchId?: string;
|
|
6
|
+
signerName: string;
|
|
7
|
+
signerEmail: string;
|
|
8
|
+
pdfBase64?: string;
|
|
9
|
+
renderedHtml?: string;
|
|
10
|
+
documentFilename: string;
|
|
11
|
+
envelopeName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class CreateLegalSigningEnvelopeRpcResultDto {
|
|
14
|
+
signatureDocumentId: string;
|
|
15
|
+
signingUrl: string;
|
|
16
|
+
clicksignEnvelopeId: string;
|
|
17
|
+
clicksignDocumentId: string;
|
|
18
|
+
clicksignSignerId?: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=legal-term-signature-rpc.dto.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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.CreateLegalSigningEnvelopeRpcResultDto = exports.CreateLegalSigningEnvelopeRpcDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
|
|
16
|
+
class CreateLegalSigningEnvelopeRpcDto {
|
|
17
|
+
tenant;
|
|
18
|
+
patientId;
|
|
19
|
+
legalTermDispatchId;
|
|
20
|
+
signerName;
|
|
21
|
+
signerEmail;
|
|
22
|
+
pdfBase64;
|
|
23
|
+
renderedHtml;
|
|
24
|
+
documentFilename;
|
|
25
|
+
envelopeName;
|
|
26
|
+
}
|
|
27
|
+
exports.CreateLegalSigningEnvelopeRpcDto = CreateLegalSigningEnvelopeRpcDto;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ description: 'Slug do tenant' }),
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.MinLength)(1),
|
|
32
|
+
(0, class_validator_1.MaxLength)(128),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenant", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ format: 'uuid' }),
|
|
37
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "patientId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiPropertyOptional)({ format: 'uuid', description: 'ID do dispatch na clínica (preenchido após create se fluxo inverter)' }),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "legalTermDispatchId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)(),
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.MinLength)(1),
|
|
50
|
+
(0, class_validator_1.MaxLength)(500),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "signerName", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)(),
|
|
55
|
+
(0, class_validator_1.IsEmail)(),
|
|
56
|
+
(0, class_validator_1.MaxLength)(320),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "signerEmail", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'PDF em base64 (sem prefixo data:); omitir se enviar renderedHtml' }),
|
|
61
|
+
(0, class_validator_1.ValidateIf)((o) => !o.renderedHtml?.trim()),
|
|
62
|
+
(0, class_validator_1.IsString)(),
|
|
63
|
+
(0, class_validator_1.MinLength)(1),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "pdfBase64", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
68
|
+
description: 'HTML já renderizado do termo; convertido para PDF no signature-service se pdfBase64 ausente',
|
|
69
|
+
}),
|
|
70
|
+
(0, class_validator_1.ValidateIf)((o) => !o.pdfBase64?.trim()),
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
(0, class_validator_1.MinLength)(1),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "renderedHtml", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiProperty)({ example: 'termo-juridico.pdf' }),
|
|
77
|
+
(0, class_validator_1.IsString)(),
|
|
78
|
+
(0, class_validator_1.MinLength)(1),
|
|
79
|
+
(0, class_validator_1.MaxLength)(255),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "documentFilename", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Nome exibido do envelope na Clicksign' }),
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
86
|
+
(0, class_validator_1.MaxLength)(500),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], CreateLegalSigningEnvelopeRpcDto.prototype, "envelopeName", void 0);
|
|
89
|
+
class CreateLegalSigningEnvelopeRpcResultDto {
|
|
90
|
+
signatureDocumentId;
|
|
91
|
+
signingUrl;
|
|
92
|
+
clicksignEnvelopeId;
|
|
93
|
+
clicksignDocumentId;
|
|
94
|
+
clicksignSignerId;
|
|
95
|
+
}
|
|
96
|
+
exports.CreateLegalSigningEnvelopeRpcResultDto = CreateLegalSigningEnvelopeRpcResultDto;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, swagger_1.ApiProperty)({ format: 'uuid' }),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], CreateLegalSigningEnvelopeRpcResultDto.prototype, "signatureDocumentId", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, swagger_1.ApiProperty)(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], CreateLegalSigningEnvelopeRpcResultDto.prototype, "signingUrl", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, swagger_1.ApiProperty)(),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], CreateLegalSigningEnvelopeRpcResultDto.prototype, "clicksignEnvelopeId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, swagger_1.ApiProperty)(),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], CreateLegalSigningEnvelopeRpcResultDto.prototype, "clicksignDocumentId", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], CreateLegalSigningEnvelopeRpcResultDto.prototype, "clicksignSignerId", void 0);
|
|
@@ -0,0 +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;IAGlB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,qBAAa,0BAA0B;IAKrC,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.UpsertLegalTermTemplateDto = exports.LegalTermTemplateDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class LegalTermTemplateDto {
|
|
16
|
+
id;
|
|
17
|
+
body_html;
|
|
18
|
+
createdAt;
|
|
19
|
+
updatedAt;
|
|
20
|
+
}
|
|
21
|
+
exports.LegalTermTemplateDto = LegalTermTemplateDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ format: 'uuid' }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], LegalTermTemplateDto.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ description: 'HTML do termo (editor rico)' }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], LegalTermTemplateDto.prototype, "body_html", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)(),
|
|
32
|
+
__metadata("design:type", Date)
|
|
33
|
+
], LegalTermTemplateDto.prototype, "createdAt", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)(),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], LegalTermTemplateDto.prototype, "updatedAt", void 0);
|
|
38
|
+
class UpsertLegalTermTemplateDto {
|
|
39
|
+
body_html;
|
|
40
|
+
}
|
|
41
|
+
exports.UpsertLegalTermTemplateDto = UpsertLegalTermTemplateDto;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({ description: 'HTML do termo (editor rico)', minLength: 1, maxLength: 500_000 }),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.MinLength)(1),
|
|
46
|
+
(0, class_validator_1.MaxLength)(500_000),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], UpsertLegalTermTemplateDto.prototype, "body_html", void 0);
|
package/package.json
CHANGED
|
@@ -104,6 +104,9 @@ export const EVENT_ANALYTIC_TYPES = [
|
|
|
104
104
|
// ── Configuration events ────────────────────────────────────────
|
|
105
105
|
'configuration.updated',
|
|
106
106
|
|
|
107
|
+
// ── Legal term (clinic template) ────────────────────────────────
|
|
108
|
+
'legal_term.template.updated',
|
|
109
|
+
|
|
107
110
|
// ── Storage events ──────────────────────────────────────────────
|
|
108
111
|
'storage.file_uploaded',
|
|
109
112
|
'storage.file_deleted',
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import { IsArray, IsOptional, IsString, IsUUID, MaxLength, MinLength } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/** Valores explícitos para substituição na pré-visualização (sem inferência heurística). */
|
|
5
|
+
export class LegalTermPreviewRequestDto {
|
|
6
|
+
@ApiPropertyOptional({
|
|
7
|
+
description: 'HTML atual do editor (rascunho); se omitido, usa o modelo salvo no banco',
|
|
8
|
+
maxLength: 500_000,
|
|
9
|
+
})
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsString()
|
|
12
|
+
@MaxLength(500_000)
|
|
13
|
+
body_html?: string;
|
|
14
|
+
|
|
15
|
+
@ApiPropertyOptional({ description: 'Nome do paciente de exemplo' })
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
@MaxLength(500)
|
|
19
|
+
nome_paciente?: string;
|
|
20
|
+
|
|
21
|
+
@ApiPropertyOptional({ description: 'CPF de exemplo (com ou sem máscara)' })
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
@MaxLength(20)
|
|
25
|
+
cpf_exemplo?: string;
|
|
26
|
+
|
|
27
|
+
@ApiPropertyOptional({ type: [String], description: 'Nomes de procedimentos na ordem' })
|
|
28
|
+
@IsOptional()
|
|
29
|
+
@IsArray()
|
|
30
|
+
@IsString({ each: true })
|
|
31
|
+
procedimento_nomes?: string[];
|
|
32
|
+
|
|
33
|
+
@ApiPropertyOptional({ description: 'Data/hora ISO 8601 para {{ data_hora }}' })
|
|
34
|
+
@IsOptional()
|
|
35
|
+
@IsString()
|
|
36
|
+
@MaxLength(40)
|
|
37
|
+
data_hora_iso?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class LegalTermSendDto {
|
|
41
|
+
@ApiProperty({ type: [String], format: 'uuid' })
|
|
42
|
+
@IsArray()
|
|
43
|
+
@IsUUID('4', { each: true })
|
|
44
|
+
procedureIds: string[];
|
|
45
|
+
|
|
46
|
+
@ApiProperty({
|
|
47
|
+
description: 'Mensagem WhatsApp; deve conter exatamente {{ link_termo_juridico }}',
|
|
48
|
+
example: 'Olá, assine seu termo: {{ link_termo_juridico }}',
|
|
49
|
+
})
|
|
50
|
+
@IsString()
|
|
51
|
+
@MinLength(1)
|
|
52
|
+
@MaxLength(4000)
|
|
53
|
+
whatsappMessage: string;
|
|
54
|
+
|
|
55
|
+
@ApiPropertyOptional({ description: 'E-mail do signatário se o paciente não tiver e-mail cadastrado' })
|
|
56
|
+
@IsOptional()
|
|
57
|
+
@IsString()
|
|
58
|
+
@MaxLength(320)
|
|
59
|
+
signerEmail?: string;
|
|
60
|
+
|
|
61
|
+
@ApiPropertyOptional({
|
|
62
|
+
description:
|
|
63
|
+
'Instância Evolution (opcional). Se omitido, usa-se a da sessão ativa do paciente (igual a conversas).',
|
|
64
|
+
})
|
|
65
|
+
@IsOptional()
|
|
66
|
+
@IsString()
|
|
67
|
+
@MaxLength(128)
|
|
68
|
+
instanceKey?: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const LEGAL_TERM_TEMPLATE_GET = 'legalTerm.template.get';
|
|
2
|
+
export const LEGAL_TERM_TEMPLATE_UPSERT = 'legalTerm.template.upsert';
|
|
3
|
+
export const LEGAL_TERM_DISPATCH_CREATE = 'legalTerm.dispatch.create';
|
|
4
|
+
export const LEGAL_TERM_DISPATCH_LIST_BY_PATIENT = 'legalTerm.dispatch.listByPatient';
|
|
5
|
+
export const SIGNATURE_LEGAL_ENVELOPE_CREATE = 'signature.legalEnvelope.create';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import {
|
|
3
|
+
IsEmail,
|
|
4
|
+
IsOptional,
|
|
5
|
+
IsString,
|
|
6
|
+
IsUUID,
|
|
7
|
+
MaxLength,
|
|
8
|
+
MinLength,
|
|
9
|
+
ValidateIf,
|
|
10
|
+
} from 'class-validator';
|
|
11
|
+
|
|
12
|
+
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope Clicksign v3). */
|
|
13
|
+
export class CreateLegalSigningEnvelopeRpcDto {
|
|
14
|
+
@ApiProperty({ description: 'Slug do tenant' })
|
|
15
|
+
@IsString()
|
|
16
|
+
@MinLength(1)
|
|
17
|
+
@MaxLength(128)
|
|
18
|
+
tenant: string;
|
|
19
|
+
|
|
20
|
+
@ApiProperty({ format: 'uuid' })
|
|
21
|
+
@IsUUID('4')
|
|
22
|
+
patientId: string;
|
|
23
|
+
|
|
24
|
+
@ApiPropertyOptional({ format: 'uuid', description: 'ID do dispatch na clínica (preenchido após create se fluxo inverter)' })
|
|
25
|
+
@IsOptional()
|
|
26
|
+
@IsUUID('4')
|
|
27
|
+
legalTermDispatchId?: string;
|
|
28
|
+
|
|
29
|
+
@ApiProperty()
|
|
30
|
+
@IsString()
|
|
31
|
+
@MinLength(1)
|
|
32
|
+
@MaxLength(500)
|
|
33
|
+
signerName: string;
|
|
34
|
+
|
|
35
|
+
@ApiProperty()
|
|
36
|
+
@IsEmail()
|
|
37
|
+
@MaxLength(320)
|
|
38
|
+
signerEmail: string;
|
|
39
|
+
|
|
40
|
+
@ApiPropertyOptional({ description: 'PDF em base64 (sem prefixo data:); omitir se enviar renderedHtml' })
|
|
41
|
+
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => !o.renderedHtml?.trim())
|
|
42
|
+
@IsString()
|
|
43
|
+
@MinLength(1)
|
|
44
|
+
pdfBase64?: string;
|
|
45
|
+
|
|
46
|
+
@ApiPropertyOptional({
|
|
47
|
+
description: 'HTML já renderizado do termo; convertido para PDF no signature-service se pdfBase64 ausente',
|
|
48
|
+
})
|
|
49
|
+
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => !o.pdfBase64?.trim())
|
|
50
|
+
@IsString()
|
|
51
|
+
@MinLength(1)
|
|
52
|
+
renderedHtml?: string;
|
|
53
|
+
|
|
54
|
+
@ApiProperty({ example: 'termo-juridico.pdf' })
|
|
55
|
+
@IsString()
|
|
56
|
+
@MinLength(1)
|
|
57
|
+
@MaxLength(255)
|
|
58
|
+
documentFilename: string;
|
|
59
|
+
|
|
60
|
+
@ApiPropertyOptional({ description: 'Nome exibido do envelope na Clicksign' })
|
|
61
|
+
@IsOptional()
|
|
62
|
+
@IsString()
|
|
63
|
+
@MaxLength(500)
|
|
64
|
+
envelopeName?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class CreateLegalSigningEnvelopeRpcResultDto {
|
|
68
|
+
@ApiProperty({ format: 'uuid' })
|
|
69
|
+
signatureDocumentId: string;
|
|
70
|
+
|
|
71
|
+
@ApiProperty()
|
|
72
|
+
signingUrl: string;
|
|
73
|
+
|
|
74
|
+
@ApiProperty()
|
|
75
|
+
clicksignEnvelopeId: string;
|
|
76
|
+
|
|
77
|
+
@ApiProperty()
|
|
78
|
+
clicksignDocumentId: string;
|
|
79
|
+
|
|
80
|
+
@ApiPropertyOptional()
|
|
81
|
+
clicksignSignerId?: string;
|
|
82
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { IsString, MaxLength, MinLength } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
export class LegalTermTemplateDto {
|
|
5
|
+
@ApiProperty({ format: 'uuid' })
|
|
6
|
+
id: string;
|
|
7
|
+
|
|
8
|
+
@ApiProperty({ description: 'HTML do termo (editor rico)' })
|
|
9
|
+
body_html: string;
|
|
10
|
+
|
|
11
|
+
@ApiProperty()
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
|
|
14
|
+
@ApiProperty()
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class UpsertLegalTermTemplateDto {
|
|
19
|
+
@ApiProperty({ description: 'HTML do termo (editor rico)', minLength: 1, maxLength: 500_000 })
|
|
20
|
+
@IsString()
|
|
21
|
+
@MinLength(1)
|
|
22
|
+
@MaxLength(500_000)
|
|
23
|
+
body_html: string;
|
|
24
|
+
}
|