tychat-contracts 1.6.19 → 1.6.21
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/appointments/create-appointment.dto.d.ts +2 -0
- package/dist/appointments/create-appointment.dto.d.ts.map +1 -1
- package/dist/appointments/create-appointment.dto.js +22 -0
- package/dist/configurations/app-module-policy.enums.d.ts +1 -1
- package/dist/configurations/app-module-policy.enums.d.ts.map +1 -1
- package/dist/configurations/app-module-policy.enums.js +1 -0
- package/dist/legal-terms/legal-term-dispatch.dto.d.ts +2 -1
- package/dist/legal-terms/legal-term-dispatch.dto.d.ts.map +1 -1
- 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 +14 -4
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts +1 -1
- package/dist/legal-terms/legal-term-signature-rpc.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-signature-rpc.dto.js +5 -5
- package/dist/legal-terms/legal-term-template.dto.js +1 -1
- package/package.json +1 -1
- package/src/appointments/create-appointment.dto.ts +19 -0
- package/src/configurations/app-module-policy.enums.ts +1 -0
- package/src/legal-terms/legal-term-dispatch.dto.ts +2 -1
- package/src/legal-terms/legal-term-preview.dto.ts +12 -4
- package/src/legal-terms/legal-term-signature-rpc.dto.ts +5 -5
- package/src/legal-terms/legal-term-template.dto.ts +1 -1
|
@@ -14,5 +14,7 @@ export declare class CreateAppointmentDto {
|
|
|
14
14
|
rescheduledFromId?: string;
|
|
15
15
|
returnFromAppointmentId?: string;
|
|
16
16
|
initialProcedures?: AppointmentProcedureDto[];
|
|
17
|
+
legalTermRequested?: boolean;
|
|
18
|
+
legalTermProcedureIds?: string[];
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=create-appointment.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAGL,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAIlC,qBAAa,oBAAoB;IAO/B,SAAS,EAAE,MAAM,CAAC;IAOlB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAQ5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAS9B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAQrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAQ3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAWjC,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"create-appointment.dto.d.ts","sourceRoot":"","sources":["../../src/appointments/create-appointment.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAGL,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAIlC,qBAAa,oBAAoB;IAO/B,SAAS,EAAE,MAAM,CAAC;IAOlB,IAAI,EAAE,MAAM,CAAC;IAQb,MAAM,EAAE,MAAM,CAAC;IASf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAS3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAQ5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAS5B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAS9B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAQrC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAQ3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAWjC,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAQ9C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAW7B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC"}
|
|
@@ -29,6 +29,8 @@ class CreateAppointmentDto {
|
|
|
29
29
|
rescheduledFromId;
|
|
30
30
|
returnFromAppointmentId;
|
|
31
31
|
initialProcedures;
|
|
32
|
+
legalTermRequested;
|
|
33
|
+
legalTermProcedureIds;
|
|
32
34
|
}
|
|
33
35
|
exports.CreateAppointmentDto = CreateAppointmentDto;
|
|
34
36
|
__decorate([
|
|
@@ -153,3 +155,23 @@ __decorate([
|
|
|
153
155
|
(0, class_transformer_1.Type)(() => appointment_procedure_dto_1.AppointmentProcedureDto),
|
|
154
156
|
__metadata("design:type", Array)
|
|
155
157
|
], CreateAppointmentDto.prototype, "initialProcedures", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
160
|
+
description: 'Sinaliza que o fluxo de criação já pediu disparo de termo jurídico para o paciente',
|
|
161
|
+
default: false,
|
|
162
|
+
}),
|
|
163
|
+
(0, class_validator_1.IsOptional)(),
|
|
164
|
+
(0, class_validator_1.IsBoolean)(),
|
|
165
|
+
__metadata("design:type", Boolean)
|
|
166
|
+
], CreateAppointmentDto.prototype, "legalTermRequested", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
169
|
+
description: 'IDs de procedimentos (UUID) usados como contexto do termo jurídico solicitado na criação do agendamento',
|
|
170
|
+
type: [String],
|
|
171
|
+
format: 'uuid',
|
|
172
|
+
}),
|
|
173
|
+
(0, class_validator_1.IsOptional)(),
|
|
174
|
+
(0, class_validator_1.IsArray)(),
|
|
175
|
+
(0, class_validator_1.IsUUID)('4', { each: true }),
|
|
176
|
+
__metadata("design:type", Array)
|
|
177
|
+
], CreateAppointmentDto.prototype, "legalTermProcedureIds", void 0);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Módulos da aplicação web do tenant (Tychat-v2), controlados por plano e override por tenant.
|
|
3
3
|
* Valores estáveis para API e persistência.
|
|
4
4
|
*/
|
|
5
|
-
export declare const TYCHAT_APP_MODULE_KEYS: readonly ["dashboard", "check_in", "check_out", "schedule", "conversations", "patients", "patients_documents", "patients_legal_terms", "clinic_legal_terms", "patients_anamneses", "clinic_anamneses", "ai_conversation", "follow_up", "funnel", "satisfaction", "clinic", "billings", "connections", "settings"];
|
|
5
|
+
export declare const TYCHAT_APP_MODULE_KEYS: readonly ["dashboard", "check_in", "check_out", "schedule", "conversations", "patients", "patients_documents", "patients_legal_terms", "clinic_legal_terms", "legal_terms_digital_signature", "patients_anamneses", "clinic_anamneses", "ai_conversation", "follow_up", "funnel", "satisfaction", "clinic", "billings", "connections", "settings"];
|
|
6
6
|
export type TychatAppModuleKey = (typeof TYCHAT_APP_MODULE_KEYS)[number];
|
|
7
7
|
export declare const TYCHAT_APP_MODULE_POLICY_LEVELS: readonly ["default", "plan", "tenant"];
|
|
8
8
|
export type TychatAppModulePolicyLevel = (typeof TYCHAT_APP_MODULE_POLICY_LEVELS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-module-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/app-module-policy.enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"app-module-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/app-module-policy.enums.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,oVAqBzB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,+BAA+B,wCAAyC,CAAC;AACtF,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Status do registro de envio na clínica (WhatsApp / fluxo). */
|
|
2
2
|
export type LegalTermDispatchStatusValue = 'created' | 'sent' | 'failed';
|
|
3
|
-
/** Status do documento
|
|
3
|
+
/** Status do documento no provedor de assinatura (signature-service). */
|
|
4
4
|
export type SignatureDocumentStatusValue = 'pending' | 'signed' | 'refused' | 'cancelled' | 'expired'
|
|
5
5
|
/** Fluxo impresso: aguardando upload da digitalização assinada (sem registro em signature-service). */
|
|
6
6
|
| 'upload_required';
|
|
@@ -12,6 +12,7 @@ export type LegalTermSignaturePolicyValue = 'printed_only' | 'printed_and_integr
|
|
|
12
12
|
export type PatientLegalTermDispatchItemDto = {
|
|
13
13
|
id: string;
|
|
14
14
|
created_at: string;
|
|
15
|
+
appointment_id?: string | null;
|
|
15
16
|
procedure_ids: string[];
|
|
16
17
|
procedure_names: string[];
|
|
17
18
|
dispatch_status: LegalTermDispatchStatusValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-dispatch.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-dispatch.dto.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzE,
|
|
1
|
+
{"version":3,"file":"legal-term-dispatch.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-dispatch.dto.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzE,yEAAyE;AACzE,MAAM,MAAM,4BAA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,+BAA+B,CAAC,EAAE,MAAM,EAAE,CAAC;IAM3C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,gBAAgB;IAS3B,eAAe,CAAC,EAAE,2BAA2B,CAAC;IAK9C,YAAY,EAAE,MAAM,EAAE,CAAC;IAUvB,eAAe,EAAE,MAAM,CAAC;IAMxB,WAAW,CAAC,EAAE,MAAM,CAAC;IASrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,aAAa,CAAC,EAAE,MAAM,CAAC;IAQvB,cAAc,CAAC,EAAE,OAAO,CAAC;IAMzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAK1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAO3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAM9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAWnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -88,6 +88,7 @@ class LegalTermSendDto {
|
|
|
88
88
|
whatsappMessage;
|
|
89
89
|
signerEmail;
|
|
90
90
|
instanceKey;
|
|
91
|
+
appointmentId;
|
|
91
92
|
tenantAutoSign;
|
|
92
93
|
tenantSignerName;
|
|
93
94
|
tenantSignerEmail;
|
|
@@ -99,8 +100,8 @@ exports.LegalTermSendDto = LegalTermSendDto;
|
|
|
99
100
|
__decorate([
|
|
100
101
|
(0, swagger_1.ApiPropertyOptional)({
|
|
101
102
|
enum: LEGAL_TERM_SIGNATURE_METHODS,
|
|
102
|
-
description: 'Método de assinatura: digital
|
|
103
|
-
default: '
|
|
103
|
+
description: 'Método de assinatura: digital ou printed (PDF para impressão, ou digital para Assinatura Digital). Padrão: printed.',
|
|
104
|
+
default: 'printed',
|
|
104
105
|
}),
|
|
105
106
|
(0, class_validator_1.IsOptional)(),
|
|
106
107
|
(0, class_validator_1.IsIn)(LEGAL_TERM_SIGNATURE_METHODS),
|
|
@@ -140,7 +141,16 @@ __decorate([
|
|
|
140
141
|
], LegalTermSendDto.prototype, "instanceKey", void 0);
|
|
141
142
|
__decorate([
|
|
142
143
|
(0, swagger_1.ApiPropertyOptional)({
|
|
143
|
-
description: '
|
|
144
|
+
description: 'ID do agendamento relacionado ao envio do termo jurídico',
|
|
145
|
+
format: 'uuid',
|
|
146
|
+
}),
|
|
147
|
+
(0, class_validator_1.IsOptional)(),
|
|
148
|
+
(0, class_validator_1.IsUUID)('4'),
|
|
149
|
+
__metadata("design:type", String)
|
|
150
|
+
], LegalTermSendDto.prototype, "appointmentId", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
153
|
+
description: 'Assinatura automática do representante da clínica antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
|
|
144
154
|
}),
|
|
145
155
|
(0, class_validator_1.IsOptional)(),
|
|
146
156
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -176,7 +186,7 @@ __decorate([
|
|
|
176
186
|
], LegalTermSendDto.prototype, "tenantSignerDocumentation", void 0);
|
|
177
187
|
__decorate([
|
|
178
188
|
(0, swagger_1.ApiPropertyOptional)({
|
|
179
|
-
description: 'Celular do representante (BR) para
|
|
189
|
+
description: 'Celular do representante (BR) para notificação via WhatsApp; opcional (sem isso usa e-mail).',
|
|
180
190
|
}),
|
|
181
191
|
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
182
192
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LegalTermBodyFormat } from './legal-term-body-format';
|
|
2
|
-
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope
|
|
2
|
+
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope de assinatura digital). */
|
|
3
3
|
export declare class CreateLegalSigningEnvelopeRpcDto {
|
|
4
4
|
tenant: string;
|
|
5
5
|
patientId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legal-term-signature-rpc.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-signature-rpc.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,
|
|
1
|
+
{"version":3,"file":"legal-term-signature-rpc.dto.d.ts","sourceRoot":"","sources":["../../src/legal-terms/legal-term-signature-rpc.dto.ts"],"names":[],"mappings":"AAaA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7F,iGAAiG;AACjG,qBAAa,gCAAgC;IAK3C,MAAM,EAAE,MAAM,CAAC;IAIf,SAAS,EAAE,MAAM,CAAC;IAKlB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAM7B,UAAU,EAAE,MAAM,CAAC;IAKnB,WAAW,EAAE,MAAM,CAAC;IAUpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,SAAS,CAAC,EAAE,MAAM,CAAC;IASnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IAUjC,gBAAgB,EAAE,MAAM,CAAC;IAMzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAQtB,cAAc,CAAC,EAAE,OAAO,CAAC;IAMzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAK1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAO3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAM9B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAWnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,qBAAa,sCAAsC;IAEjD,mBAAmB,EAAE,MAAM,CAAC;IAG5B,UAAU,EAAE,MAAM,CAAC;IAGnB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EACZ,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC"}
|
|
@@ -13,7 +13,7 @@ exports.CreateLegalSigningEnvelopeRpcResultDto = exports.CreateLegalSigningEnvel
|
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const legal_term_body_format_1 = require("./legal-term-body-format");
|
|
16
|
-
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope
|
|
16
|
+
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope de assinatura digital). */
|
|
17
17
|
class CreateLegalSigningEnvelopeRpcDto {
|
|
18
18
|
tenant;
|
|
19
19
|
patientId;
|
|
@@ -67,7 +67,7 @@ __decorate([
|
|
|
67
67
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "signerEmail", void 0);
|
|
68
68
|
__decorate([
|
|
69
69
|
(0, swagger_1.ApiPropertyOptional)({
|
|
70
|
-
description: 'Telefone do paciente (BR) para
|
|
70
|
+
description: 'Telefone do paciente (BR) para assinatura digital: com WhatsApp em `document_signed` exige 10–11 dígitos nacionais; normalizado no signature-service.',
|
|
71
71
|
}),
|
|
72
72
|
(0, class_validator_1.IsOptional)(),
|
|
73
73
|
(0, class_validator_1.IsString)(),
|
|
@@ -111,7 +111,7 @@ __decorate([
|
|
|
111
111
|
__metadata("design:type", String)
|
|
112
112
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "documentFilename", void 0);
|
|
113
113
|
__decorate([
|
|
114
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Nome exibido do envelope
|
|
114
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Nome exibido do envelope de assinatura' }),
|
|
115
115
|
(0, class_validator_1.IsOptional)(),
|
|
116
116
|
(0, class_validator_1.IsString)(),
|
|
117
117
|
(0, class_validator_1.MaxLength)(500),
|
|
@@ -119,7 +119,7 @@ __decorate([
|
|
|
119
119
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "envelopeName", void 0);
|
|
120
120
|
__decorate([
|
|
121
121
|
(0, swagger_1.ApiPropertyOptional)({
|
|
122
|
-
description: 'Incluir signatário da clínica (PJ) com assinatura automática
|
|
122
|
+
description: 'Incluir signatário da clínica (PJ) com assinatura automática antes do paciente. Exige conta com termo de assinatura automática válido.',
|
|
123
123
|
}),
|
|
124
124
|
(0, class_validator_1.IsOptional)(),
|
|
125
125
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -155,7 +155,7 @@ __decorate([
|
|
|
155
155
|
], CreateLegalSigningEnvelopeRpcDto.prototype, "tenantSignerDocumentation", void 0);
|
|
156
156
|
__decorate([
|
|
157
157
|
(0, swagger_1.ApiPropertyOptional)({
|
|
158
|
-
description: 'Celular do representante (BR) para notificação
|
|
158
|
+
description: 'Celular do representante (BR) para notificação via WhatsApp após assinatura; se omitido, usa-se e-mail.',
|
|
159
159
|
}),
|
|
160
160
|
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
161
161
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -35,7 +35,7 @@ __decorate([
|
|
|
35
35
|
__decorate([
|
|
36
36
|
(0, swagger_1.ApiProperty)({
|
|
37
37
|
enum: legal_term_body_format_1.LEGAL_TERM_BODY_FORMATS,
|
|
38
|
-
description: 'Como interpretar body_html antes de gerar PDF
|
|
38
|
+
description: 'Como interpretar body_html antes de gerar PDF',
|
|
39
39
|
}),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], LegalTermTemplateDto.prototype, "body_format", void 0);
|
package/package.json
CHANGED
|
@@ -131,4 +131,23 @@ export class CreateAppointmentDto {
|
|
|
131
131
|
@ValidateNested({ each: true })
|
|
132
132
|
@Type(() => AppointmentProcedureDto)
|
|
133
133
|
initialProcedures?: AppointmentProcedureDto[];
|
|
134
|
+
|
|
135
|
+
@ApiPropertyOptional({
|
|
136
|
+
description: 'Sinaliza que o fluxo de criação já pediu disparo de termo jurídico para o paciente',
|
|
137
|
+
default: false,
|
|
138
|
+
})
|
|
139
|
+
@IsOptional()
|
|
140
|
+
@IsBoolean()
|
|
141
|
+
legalTermRequested?: boolean;
|
|
142
|
+
|
|
143
|
+
@ApiPropertyOptional({
|
|
144
|
+
description:
|
|
145
|
+
'IDs de procedimentos (UUID) usados como contexto do termo jurídico solicitado na criação do agendamento',
|
|
146
|
+
type: [String],
|
|
147
|
+
format: 'uuid',
|
|
148
|
+
})
|
|
149
|
+
@IsOptional()
|
|
150
|
+
@IsArray()
|
|
151
|
+
@IsUUID('4', { each: true })
|
|
152
|
+
legalTermProcedureIds?: string[];
|
|
134
153
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Status do registro de envio na clínica (WhatsApp / fluxo). */
|
|
2
2
|
export type LegalTermDispatchStatusValue = 'created' | 'sent' | 'failed';
|
|
3
3
|
|
|
4
|
-
/** Status do documento
|
|
4
|
+
/** Status do documento no provedor de assinatura (signature-service). */
|
|
5
5
|
export type SignatureDocumentStatusValue =
|
|
6
6
|
| 'pending'
|
|
7
7
|
| 'signed'
|
|
@@ -23,6 +23,7 @@ export type LegalTermSignaturePolicyValue =
|
|
|
23
23
|
export type PatientLegalTermDispatchItemDto = {
|
|
24
24
|
id: string;
|
|
25
25
|
created_at: string;
|
|
26
|
+
appointment_id?: string | null;
|
|
26
27
|
procedure_ids: string[];
|
|
27
28
|
procedure_names: string[];
|
|
28
29
|
dispatch_status: LegalTermDispatchStatusValue;
|
|
@@ -75,8 +75,8 @@ export class LegalTermSendDto {
|
|
|
75
75
|
@ApiPropertyOptional({
|
|
76
76
|
enum: LEGAL_TERM_SIGNATURE_METHODS,
|
|
77
77
|
description:
|
|
78
|
-
'Método de assinatura: digital
|
|
79
|
-
default: '
|
|
78
|
+
'Método de assinatura: digital ou printed (PDF para impressão, ou digital para Assinatura Digital). Padrão: printed.',
|
|
79
|
+
default: 'printed',
|
|
80
80
|
})
|
|
81
81
|
@IsOptional()
|
|
82
82
|
@IsIn(LEGAL_TERM_SIGNATURE_METHODS)
|
|
@@ -112,9 +112,17 @@ export class LegalTermSendDto {
|
|
|
112
112
|
@MaxLength(128)
|
|
113
113
|
instanceKey?: string;
|
|
114
114
|
|
|
115
|
+
@ApiPropertyOptional({
|
|
116
|
+
description: 'ID do agendamento relacionado ao envio do termo jurídico',
|
|
117
|
+
format: 'uuid',
|
|
118
|
+
})
|
|
119
|
+
@IsOptional()
|
|
120
|
+
@IsUUID('4')
|
|
121
|
+
appointmentId?: string;
|
|
122
|
+
|
|
115
123
|
@ApiPropertyOptional({
|
|
116
124
|
description:
|
|
117
|
-
'Assinatura automática do representante da clínica
|
|
125
|
+
'Assinatura automática do representante da clínica antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
|
|
118
126
|
})
|
|
119
127
|
@IsOptional()
|
|
120
128
|
@IsBoolean()
|
|
@@ -146,7 +154,7 @@ export class LegalTermSendDto {
|
|
|
146
154
|
|
|
147
155
|
@ApiPropertyOptional({
|
|
148
156
|
description:
|
|
149
|
-
'Celular do representante (BR) para
|
|
157
|
+
'Celular do representante (BR) para notificação via WhatsApp; opcional (sem isso usa e-mail).',
|
|
150
158
|
})
|
|
151
159
|
@ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
|
|
152
160
|
@IsOptional()
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from 'class-validator';
|
|
14
14
|
import { LEGAL_TERM_BODY_FORMATS, type LegalTermBodyFormat } from './legal-term-body-format';
|
|
15
15
|
|
|
16
|
-
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope
|
|
16
|
+
/** Payload RPC: tychat-api → tychat-signature-service (criar envelope de assinatura digital). */
|
|
17
17
|
export class CreateLegalSigningEnvelopeRpcDto {
|
|
18
18
|
@ApiProperty({ description: 'Slug do tenant' })
|
|
19
19
|
@IsString()
|
|
@@ -43,7 +43,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
43
43
|
|
|
44
44
|
@ApiPropertyOptional({
|
|
45
45
|
description:
|
|
46
|
-
'Telefone do paciente (BR) para
|
|
46
|
+
'Telefone do paciente (BR) para assinatura digital: com WhatsApp em `document_signed` exige 10–11 dígitos nacionais; normalizado no signature-service.',
|
|
47
47
|
})
|
|
48
48
|
@IsOptional()
|
|
49
49
|
@IsString()
|
|
@@ -84,7 +84,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
84
84
|
@MaxLength(255)
|
|
85
85
|
documentFilename: string;
|
|
86
86
|
|
|
87
|
-
@ApiPropertyOptional({ description: 'Nome exibido do envelope
|
|
87
|
+
@ApiPropertyOptional({ description: 'Nome exibido do envelope de assinatura' })
|
|
88
88
|
@IsOptional()
|
|
89
89
|
@IsString()
|
|
90
90
|
@MaxLength(500)
|
|
@@ -92,7 +92,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
92
92
|
|
|
93
93
|
@ApiPropertyOptional({
|
|
94
94
|
description:
|
|
95
|
-
'Incluir signatário da clínica (PJ) com assinatura automática
|
|
95
|
+
'Incluir signatário da clínica (PJ) com assinatura automática antes do paciente. Exige conta com termo de assinatura automática válido.',
|
|
96
96
|
})
|
|
97
97
|
@IsOptional()
|
|
98
98
|
@IsBoolean()
|
|
@@ -124,7 +124,7 @@ export class CreateLegalSigningEnvelopeRpcDto {
|
|
|
124
124
|
|
|
125
125
|
@ApiPropertyOptional({
|
|
126
126
|
description:
|
|
127
|
-
'Celular do representante (BR) para notificação
|
|
127
|
+
'Celular do representante (BR) para notificação via WhatsApp após assinatura; se omitido, usa-se e-mail.',
|
|
128
128
|
})
|
|
129
129
|
@ValidateIf((o: CreateLegalSigningEnvelopeRpcDto) => o.tenantAutoSign === true)
|
|
130
130
|
@IsOptional()
|
|
@@ -21,7 +21,7 @@ export class LegalTermTemplateDto {
|
|
|
21
21
|
|
|
22
22
|
@ApiProperty({
|
|
23
23
|
enum: LEGAL_TERM_BODY_FORMATS,
|
|
24
|
-
description: 'Como interpretar body_html antes de gerar PDF
|
|
24
|
+
description: 'Como interpretar body_html antes de gerar PDF',
|
|
25
25
|
})
|
|
26
26
|
body_format: LegalTermBodyFormat;
|
|
27
27
|
|