tychat-contracts 1.6.19 → 1.6.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/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 +1 -1
- package/dist/legal-terms/legal-term-dispatch.dto.d.ts.map +1 -1
- package/dist/legal-terms/legal-term-preview.dto.js +4 -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/configurations/app-module-policy.enums.ts +1 -0
- package/src/legal-terms/legal-term-dispatch.dto.ts +1 -1
- package/src/legal-terms/legal-term-preview.dto.ts +4 -4
- package/src/legal-terms/legal-term-signature-rpc.dto.ts +5 -5
- package/src/legal-terms/legal-term-template.dto.ts +1 -1
|
@@ -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';
|
|
@@ -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,4BAA4B,GACpC,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS;AACX,uGAAuG;GACrG,iBAAiB,CAAC;AAEtB,wDAAwD;AACxD,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,SAAS,CAAC;AAElE,oEAAoE;AACpE,MAAM,MAAM,6BAA6B,GACrC,cAAc,GACd,0BAA0B,CAAC;AAE/B,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,gBAAgB,EAAE,6BAA6B,CAAC;IAChD,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"}
|
|
@@ -99,8 +99,8 @@ exports.LegalTermSendDto = LegalTermSendDto;
|
|
|
99
99
|
__decorate([
|
|
100
100
|
(0, swagger_1.ApiPropertyOptional)({
|
|
101
101
|
enum: LEGAL_TERM_SIGNATURE_METHODS,
|
|
102
|
-
description: 'Método de assinatura: digital
|
|
103
|
-
default: '
|
|
102
|
+
description: 'Método de assinatura: digital ou printed (PDF para impressão, ou digital para Assinatura Digital). Padrão: printed.',
|
|
103
|
+
default: 'printed',
|
|
104
104
|
}),
|
|
105
105
|
(0, class_validator_1.IsOptional)(),
|
|
106
106
|
(0, class_validator_1.IsIn)(LEGAL_TERM_SIGNATURE_METHODS),
|
|
@@ -140,7 +140,7 @@ __decorate([
|
|
|
140
140
|
], LegalTermSendDto.prototype, "instanceKey", void 0);
|
|
141
141
|
__decorate([
|
|
142
142
|
(0, swagger_1.ApiPropertyOptional)({
|
|
143
|
-
description: 'Assinatura automática do representante da clínica
|
|
143
|
+
description: 'Assinatura automática do representante da clínica antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
|
|
144
144
|
}),
|
|
145
145
|
(0, class_validator_1.IsOptional)(),
|
|
146
146
|
(0, class_validator_1.IsBoolean)(),
|
|
@@ -176,7 +176,7 @@ __decorate([
|
|
|
176
176
|
], LegalTermSendDto.prototype, "tenantSignerDocumentation", void 0);
|
|
177
177
|
__decorate([
|
|
178
178
|
(0, swagger_1.ApiPropertyOptional)({
|
|
179
|
-
description: 'Celular do representante (BR) para
|
|
179
|
+
description: 'Celular do representante (BR) para notificação via WhatsApp; opcional (sem isso usa e-mail).',
|
|
180
180
|
}),
|
|
181
181
|
(0, class_validator_1.ValidateIf)((o) => o.tenantAutoSign === true),
|
|
182
182
|
(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
|
@@ -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'
|
|
@@ -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)
|
|
@@ -114,7 +114,7 @@ export class LegalTermSendDto {
|
|
|
114
114
|
|
|
115
115
|
@ApiPropertyOptional({
|
|
116
116
|
description:
|
|
117
|
-
'Assinatura automática do representante da clínica
|
|
117
|
+
'Assinatura automática do representante da clínica antes do paciente. Exige tenantSignerName, tenantSignerEmail, tenantSignerBirthday (YYYY-MM-DD) e tenantSignerDocumentation (CPF).',
|
|
118
118
|
})
|
|
119
119
|
@IsOptional()
|
|
120
120
|
@IsBoolean()
|
|
@@ -146,7 +146,7 @@ export class LegalTermSendDto {
|
|
|
146
146
|
|
|
147
147
|
@ApiPropertyOptional({
|
|
148
148
|
description:
|
|
149
|
-
'Celular do representante (BR) para
|
|
149
|
+
'Celular do representante (BR) para notificação via WhatsApp; opcional (sem isso usa e-mail).',
|
|
150
150
|
})
|
|
151
151
|
@ValidateIf((o: LegalTermSendDto) => o.tenantAutoSign === true)
|
|
152
152
|
@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
|
|