evo360-types 1.3.583 → 1.3.586
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/apps/evo-med/appointment/zod-schemas.d.ts +76 -0
- package/dist/apps/evo-med/appointment/zod-schemas.js +21 -1
- package/dist/apps/evo-med/appointment/zod-schemas.ts +22 -0
- package/dist/apps/evo-med/calendar/zod-schemas.d.ts +12 -0
- package/dist/apps/evo-med/calendar/zod-schemas.js +3 -0
- package/dist/apps/evo-med/calendar/zod-schemas.ts +3 -0
- package/dist/apps/evo-notifications/zod-schemas.d.ts +79 -0
- package/dist/apps/evo-notifications/zod-schemas.js +16 -1
- package/dist/apps/evo-notifications/zod-schemas.ts +17 -0
- package/dist/types/evo-med/appointment/index.d.ts +33 -0
- package/dist/types/evo-med/appointment/index.js +19 -1
- package/dist/types/evo-med/appointment/index.ts +49 -0
- package/dist/types/evo-med/calendar/index.d.ts +16 -0
- package/dist/types/evo-med/calendar/index.ts +16 -0
- package/dist/types/evo-notifications/index.d.ts +24 -0
- package/dist/types/evo-notifications/index.ts +26 -0
- package/package.json +1 -1
|
@@ -2,6 +2,22 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const zAppointmentPaymentStatusSchema: z.ZodEnum<["paid", "partial", "pending", "not_informed"]>;
|
|
3
3
|
export declare const zAppointmentStatusTypeSchema: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
4
4
|
export declare const zAppointmentModeSchema: z.ZodEnum<["telemedicine", "in_person"]>;
|
|
5
|
+
export declare const zTelemedicineProviderSchema: z.ZodEnum<["virtual_care", "other"]>;
|
|
6
|
+
/**
|
|
7
|
+
* Espelho de `IAppointmentTelemedicine`. `| null` em `access_url` porque o
|
|
8
|
+
* editor do FE grava "não escolhido" como `null` explícito e `.passthrough()`
|
|
9
|
+
* não cobre `null` em chave declarada.
|
|
10
|
+
*/
|
|
11
|
+
export declare const zAppointmentTelemedicineSchema: z.ZodObject<{
|
|
12
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
13
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
15
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
16
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
18
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
19
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
5
21
|
export declare const zAppointmentTypeBaseSchema: z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>;
|
|
6
22
|
export declare const zAppointmentAddressSchema: z.ZodObject<{
|
|
7
23
|
address_name: z.ZodOptional<z.ZodString>;
|
|
@@ -331,6 +347,16 @@ export declare const zAppointmentSchema: z.ZodObject<{
|
|
|
331
347
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
332
348
|
notes: z.ZodOptional<z.ZodString>;
|
|
333
349
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
350
|
+
telemedicine: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
351
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
352
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
354
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
355
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
357
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
358
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
334
360
|
appointmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
335
361
|
appointmentBaseType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>>;
|
|
336
362
|
appointmentSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -668,6 +694,16 @@ export declare const zAppointmentSchema: z.ZodObject<{
|
|
|
668
694
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
669
695
|
notes: z.ZodOptional<z.ZodString>;
|
|
670
696
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
697
|
+
telemedicine: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
698
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
699
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
700
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
701
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
702
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
703
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
704
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
705
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
706
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
671
707
|
appointmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
672
708
|
appointmentBaseType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>>;
|
|
673
709
|
appointmentSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1005,6 +1041,16 @@ export declare const zAppointmentSchema: z.ZodObject<{
|
|
|
1005
1041
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1006
1042
|
notes: z.ZodOptional<z.ZodString>;
|
|
1007
1043
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
1044
|
+
telemedicine: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1045
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1046
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1047
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1048
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1049
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1050
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1051
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1052
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1053
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1008
1054
|
appointmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1009
1055
|
appointmentBaseType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>>;
|
|
1010
1056
|
appointmentSource: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1336,6 +1382,16 @@ export declare const zPatientAppointmentSchema: z.ZodObject<{
|
|
|
1336
1382
|
status: z.ZodString;
|
|
1337
1383
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1338
1384
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
1385
|
+
telemedicine: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1386
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1387
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1388
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1389
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1390
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1391
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1392
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1393
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1394
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1339
1395
|
appointmentBaseType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>>;
|
|
1340
1396
|
procedures: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
1341
1397
|
professional: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1420,6 +1476,16 @@ export declare const zPatientAppointmentSchema: z.ZodObject<{
|
|
|
1420
1476
|
status: z.ZodString;
|
|
1421
1477
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1422
1478
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
1479
|
+
telemedicine: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1480
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1481
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1482
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1483
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1484
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1485
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1486
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1487
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1488
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1423
1489
|
appointmentBaseType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>>;
|
|
1424
1490
|
procedures: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
1425
1491
|
professional: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1504,6 +1570,16 @@ export declare const zPatientAppointmentSchema: z.ZodObject<{
|
|
|
1504
1570
|
status: z.ZodString;
|
|
1505
1571
|
statusBase: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
|
|
1506
1572
|
appointmentMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<["telemedicine", "in_person"]>>>;
|
|
1573
|
+
telemedicine: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1574
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1575
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1576
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1577
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1578
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1579
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1580
|
+
provider: z.ZodEnum<["virtual_care", "other"]>;
|
|
1581
|
+
access_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1582
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1507
1583
|
appointmentBaseType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>>>;
|
|
1508
1584
|
procedures: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
1509
1585
|
professional: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zPatientAppointmentSchema = exports.zAppointmentSchema = exports.zAppointmentSpecialtySchema = exports.zAppointmentRescheduleSchema = exports.zAppointmentAppointmentSourceSchema = exports.zAppointmentAppointmentRequestTypeSchema = exports.zAppointmentProcedureSchema = exports.zAppointmentPaymentSchema = exports.zAppointmentPaymentInvoiceRefSchema = exports.zAppointmentInsuranceSchema = exports.zAppointmentProfessionalSchema = exports.zAppointmentPatientSchema = exports.zAppointmentAddressSchema = exports.zAppointmentTypeBaseSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentPaymentStatusSchema = void 0;
|
|
3
|
+
exports.zPatientAppointmentSchema = exports.zAppointmentSchema = exports.zAppointmentSpecialtySchema = exports.zAppointmentRescheduleSchema = exports.zAppointmentAppointmentSourceSchema = exports.zAppointmentAppointmentRequestTypeSchema = exports.zAppointmentProcedureSchema = exports.zAppointmentPaymentSchema = exports.zAppointmentPaymentInvoiceRefSchema = exports.zAppointmentInsuranceSchema = exports.zAppointmentProfessionalSchema = exports.zAppointmentPatientSchema = exports.zAppointmentAddressSchema = exports.zAppointmentTypeBaseSchema = exports.zAppointmentTelemedicineSchema = exports.zTelemedicineProviderSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentPaymentStatusSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../../shared/zod-schemas");
|
|
6
6
|
// Enums para validação
|
|
@@ -32,6 +32,24 @@ exports.zAppointmentStatusTypeSchema = zod_1.z.enum([
|
|
|
32
32
|
"expired",
|
|
33
33
|
]);
|
|
34
34
|
exports.zAppointmentModeSchema = zod_1.z.enum(["telemedicine", "in_person"]);
|
|
35
|
+
// ----- Telemedicina: provider dentro do agendamento (feat-160 R6, D38)
|
|
36
|
+
//
|
|
37
|
+
// `z.enum` À MÃO, espelhando `TelemedicineProviderEnum` do TS — é a armadilha
|
|
38
|
+
// conhecida das duas listas ([[reference_external_object_type_dual_list]]):
|
|
39
|
+
// editar só o TS compila liso e estoura em runtime. Há smoke sobre o `dist/`
|
|
40
|
+
// conferindo que as duas listas batem.
|
|
41
|
+
exports.zTelemedicineProviderSchema = zod_1.z.enum(["virtual_care", "other"]);
|
|
42
|
+
/**
|
|
43
|
+
* Espelho de `IAppointmentTelemedicine`. `| null` em `access_url` porque o
|
|
44
|
+
* editor do FE grava "não escolhido" como `null` explícito e `.passthrough()`
|
|
45
|
+
* não cobre `null` em chave declarada.
|
|
46
|
+
*/
|
|
47
|
+
exports.zAppointmentTelemedicineSchema = zod_1.z
|
|
48
|
+
.object({
|
|
49
|
+
provider: exports.zTelemedicineProviderSchema,
|
|
50
|
+
access_url: zod_1.z.string().nullable().optional(),
|
|
51
|
+
})
|
|
52
|
+
.passthrough();
|
|
35
53
|
// Schema para os tipos base de agendamento (para validação do appointmentBaseType)
|
|
36
54
|
exports.zAppointmentTypeBaseSchema = zod_1.z.enum([
|
|
37
55
|
"blocked",
|
|
@@ -174,6 +192,7 @@ exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
|
|
|
174
192
|
statusBase: exports.zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
175
193
|
notes: zod_1.z.string().optional(),
|
|
176
194
|
appointmentMode: exports.zAppointmentModeSchema.nullable().optional(),
|
|
195
|
+
telemedicine: exports.zAppointmentTelemedicineSchema.nullable().optional(),
|
|
177
196
|
appointmentType: zod_1.z.string().nullable().optional(), // Tipo customizado do dicionário
|
|
178
197
|
appointmentBaseType: exports.zAppointmentTypeBaseSchema.nullable().optional(), // Tipo base para lógica
|
|
179
198
|
appointmentSource: exports.zAppointmentAppointmentSourceSchema
|
|
@@ -224,6 +243,7 @@ exports.zPatientAppointmentSchema = zod_1.z
|
|
|
224
243
|
status: zod_1.z.string(), // Status customizado do dicionário
|
|
225
244
|
statusBase: exports.zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
226
245
|
appointmentMode: exports.zAppointmentModeSchema.nullable().optional(),
|
|
246
|
+
telemedicine: exports.zAppointmentTelemedicineSchema.nullable().optional(),
|
|
227
247
|
appointmentBaseType: exports.zAppointmentTypeBaseSchema.nullable().optional(), // Tipo base para lógica
|
|
228
248
|
procedures: zod_1.z.array(zod_1.z.string()).nullable().optional(), // Array de strings dos procedimentos
|
|
229
249
|
professional: zod_1.z.string().nullable().optional(), // String serializada do profissional
|
|
@@ -37,6 +37,26 @@ export const zAppointmentStatusTypeSchema = z.enum([
|
|
|
37
37
|
|
|
38
38
|
export const zAppointmentModeSchema = z.enum(["telemedicine", "in_person"]);
|
|
39
39
|
|
|
40
|
+
// ----- Telemedicina: provider dentro do agendamento (feat-160 R6, D38)
|
|
41
|
+
//
|
|
42
|
+
// `z.enum` À MÃO, espelhando `TelemedicineProviderEnum` do TS — é a armadilha
|
|
43
|
+
// conhecida das duas listas ([[reference_external_object_type_dual_list]]):
|
|
44
|
+
// editar só o TS compila liso e estoura em runtime. Há smoke sobre o `dist/`
|
|
45
|
+
// conferindo que as duas listas batem.
|
|
46
|
+
export const zTelemedicineProviderSchema = z.enum(["virtual_care", "other"]);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Espelho de `IAppointmentTelemedicine`. `| null` em `access_url` porque o
|
|
50
|
+
* editor do FE grava "não escolhido" como `null` explícito e `.passthrough()`
|
|
51
|
+
* não cobre `null` em chave declarada.
|
|
52
|
+
*/
|
|
53
|
+
export const zAppointmentTelemedicineSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
provider: zTelemedicineProviderSchema,
|
|
56
|
+
access_url: z.string().nullable().optional(),
|
|
57
|
+
})
|
|
58
|
+
.passthrough();
|
|
59
|
+
|
|
40
60
|
// Schema para os tipos base de agendamento (para validação do appointmentBaseType)
|
|
41
61
|
export const zAppointmentTypeBaseSchema = z.enum([
|
|
42
62
|
"blocked",
|
|
@@ -191,6 +211,7 @@ export const zAppointmentSchema = zFireDocSchema
|
|
|
191
211
|
statusBase: zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
192
212
|
notes: z.string().optional(),
|
|
193
213
|
appointmentMode: zAppointmentModeSchema.nullable().optional(),
|
|
214
|
+
telemedicine: zAppointmentTelemedicineSchema.nullable().optional(),
|
|
194
215
|
appointmentType: z.string().nullable().optional(), // Tipo customizado do dicionário
|
|
195
216
|
appointmentBaseType: zAppointmentTypeBaseSchema.nullable().optional(), // Tipo base para lógica
|
|
196
217
|
appointmentSource: zAppointmentAppointmentSourceSchema
|
|
@@ -247,6 +268,7 @@ export const zPatientAppointmentSchema = z
|
|
|
247
268
|
status: z.string(), // Status customizado do dicionário
|
|
248
269
|
statusBase: zAppointmentStatusTypeSchema, // Tipo base para lógica
|
|
249
270
|
appointmentMode: zAppointmentModeSchema.nullable().optional(),
|
|
271
|
+
telemedicine: zAppointmentTelemedicineSchema.nullable().optional(),
|
|
250
272
|
appointmentBaseType: zAppointmentTypeBaseSchema.nullable().optional(), // Tipo base para lógica
|
|
251
273
|
procedures: z.array(z.string()).nullable().optional(), // Array de strings dos procedimentos
|
|
252
274
|
professional: z.string().nullable().optional(), // String serializada do profissional
|
|
@@ -1361,6 +1361,7 @@ export declare const zMedCalendarVirtualCareConfigSchema: z.ZodObject<{
|
|
|
1361
1361
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1362
1362
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1363
1363
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1364
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
1364
1365
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1365
1366
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1366
1367
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1402,6 +1403,7 @@ export declare const zMedCalendarVirtualCareConfigSchema: z.ZodObject<{
|
|
|
1402
1403
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1403
1404
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1404
1405
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1406
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
1405
1407
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1406
1408
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1407
1409
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1443,6 +1445,7 @@ export declare const zMedCalendarVirtualCareConfigSchema: z.ZodObject<{
|
|
|
1443
1445
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1444
1446
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1445
1447
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1448
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
1446
1449
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1447
1450
|
export declare const zMedCalendarSchema: z.ZodObject<{
|
|
1448
1451
|
id: z.ZodString;
|
|
@@ -3108,6 +3111,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
3108
3111
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3109
3112
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3110
3113
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3114
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
3111
3115
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3112
3116
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3113
3117
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -3149,6 +3153,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
3149
3153
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3150
3154
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3151
3155
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3156
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
3152
3157
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3153
3158
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3154
3159
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -3190,6 +3195,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
3190
3195
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3191
3196
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3192
3197
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3198
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
3193
3199
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
3194
3200
|
default_professional_ref: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
3195
3201
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -4856,6 +4862,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
4856
4862
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4857
4863
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4858
4864
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4865
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
4859
4866
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4860
4867
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4861
4868
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -4897,6 +4904,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
4897
4904
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4898
4905
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4899
4906
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4907
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
4900
4908
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4901
4909
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4902
4910
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -4938,6 +4946,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
4938
4946
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4939
4947
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4940
4948
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4949
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
4941
4950
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
4942
4951
|
default_professional_ref: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
4943
4952
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -6604,6 +6613,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
6604
6613
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
6605
6614
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6606
6615
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6616
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
6607
6617
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
6608
6618
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
6609
6619
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -6645,6 +6655,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
6645
6655
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
6646
6656
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6647
6657
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6658
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
6648
6659
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
6649
6660
|
auto_admit: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
6650
6661
|
recording: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -6686,6 +6697,7 @@ export declare const zMedCalendarSchema: z.ZodObject<{
|
|
|
6686
6697
|
allow_late_end: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
6687
6698
|
max_duration_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6688
6699
|
end_warning_minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6700
|
+
default_provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<["virtual_care", "other"]>>>;
|
|
6689
6701
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
6690
6702
|
default_professional_ref: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
6691
6703
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -139,6 +139,9 @@ exports.zMedCalendarVirtualCareConfigSchema = zod_1.z
|
|
|
139
139
|
allow_late_end: zod_1.z.boolean().nullable().optional(),
|
|
140
140
|
max_duration_minutes: zod_1.z.number().int().min(15).max(480).nullable().optional(),
|
|
141
141
|
end_warning_minutes: zod_1.z.number().int().min(0).max(1440).nullable().optional(),
|
|
142
|
+
// feat-160 R6 (D38): provider sugerido ao agendar telemedicina nesta agenda.
|
|
143
|
+
// `z.enum` à mão, espelho de `TelemedicineProviderEnum`.
|
|
144
|
+
default_provider: zod_1.z.enum(["virtual_care", "other"]).nullable().optional(),
|
|
142
145
|
})
|
|
143
146
|
.passthrough();
|
|
144
147
|
exports.zMedCalendarSchema = zod_schemas_1.zFireDocSchema
|
|
@@ -146,6 +146,9 @@ export const zMedCalendarVirtualCareConfigSchema = z
|
|
|
146
146
|
allow_late_end: z.boolean().nullable().optional(),
|
|
147
147
|
max_duration_minutes: z.number().int().min(15).max(480).nullable().optional(),
|
|
148
148
|
end_warning_minutes: z.number().int().min(0).max(1440).nullable().optional(),
|
|
149
|
+
// feat-160 R6 (D38): provider sugerido ao agendar telemedicina nesta agenda.
|
|
150
|
+
// `z.enum` à mão, espelho de `TelemedicineProviderEnum`.
|
|
151
|
+
default_provider: z.enum(["virtual_care", "other"]).nullable().optional(),
|
|
149
152
|
})
|
|
150
153
|
.passthrough();
|
|
151
154
|
|
|
@@ -634,6 +634,20 @@ export declare const zNotificationDirectSendSchema: z.ZodObject<{
|
|
|
634
634
|
category: "utility";
|
|
635
635
|
ttl_seconds?: number | undefined;
|
|
636
636
|
}>;
|
|
637
|
+
export declare const NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES = 65536;
|
|
638
|
+
export declare const zNotificationAttachmentSchema: z.ZodObject<{
|
|
639
|
+
filename: z.ZodString;
|
|
640
|
+
content_type: z.ZodString;
|
|
641
|
+
content_base64: z.ZodString;
|
|
642
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
643
|
+
filename: z.ZodString;
|
|
644
|
+
content_type: z.ZodString;
|
|
645
|
+
content_base64: z.ZodString;
|
|
646
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
647
|
+
filename: z.ZodString;
|
|
648
|
+
content_type: z.ZodString;
|
|
649
|
+
content_base64: z.ZodString;
|
|
650
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
637
651
|
export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
638
652
|
tenant: z.ZodString;
|
|
639
653
|
kind: z.ZodLiteral<"notification.send">;
|
|
@@ -752,6 +766,19 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
752
766
|
expires_at: z.ZodOptional<z.ZodDate>;
|
|
753
767
|
url_secret: z.ZodOptional<z.ZodString>;
|
|
754
768
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
769
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
770
|
+
filename: z.ZodString;
|
|
771
|
+
content_type: z.ZodString;
|
|
772
|
+
content_base64: z.ZodString;
|
|
773
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
774
|
+
filename: z.ZodString;
|
|
775
|
+
content_type: z.ZodString;
|
|
776
|
+
content_base64: z.ZodString;
|
|
777
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
778
|
+
filename: z.ZodString;
|
|
779
|
+
content_type: z.ZodString;
|
|
780
|
+
content_base64: z.ZodString;
|
|
781
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
755
782
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
756
783
|
tenant: z.ZodString;
|
|
757
784
|
kind: z.ZodLiteral<"notification.send">;
|
|
@@ -870,6 +897,19 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
870
897
|
expires_at: z.ZodOptional<z.ZodDate>;
|
|
871
898
|
url_secret: z.ZodOptional<z.ZodString>;
|
|
872
899
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
900
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
901
|
+
filename: z.ZodString;
|
|
902
|
+
content_type: z.ZodString;
|
|
903
|
+
content_base64: z.ZodString;
|
|
904
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
905
|
+
filename: z.ZodString;
|
|
906
|
+
content_type: z.ZodString;
|
|
907
|
+
content_base64: z.ZodString;
|
|
908
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
909
|
+
filename: z.ZodString;
|
|
910
|
+
content_type: z.ZodString;
|
|
911
|
+
content_base64: z.ZodString;
|
|
912
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
873
913
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
874
914
|
tenant: z.ZodString;
|
|
875
915
|
kind: z.ZodLiteral<"notification.send">;
|
|
@@ -988,6 +1028,19 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
988
1028
|
expires_at: z.ZodOptional<z.ZodDate>;
|
|
989
1029
|
url_secret: z.ZodOptional<z.ZodString>;
|
|
990
1030
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1031
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1032
|
+
filename: z.ZodString;
|
|
1033
|
+
content_type: z.ZodString;
|
|
1034
|
+
content_base64: z.ZodString;
|
|
1035
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1036
|
+
filename: z.ZodString;
|
|
1037
|
+
content_type: z.ZodString;
|
|
1038
|
+
content_base64: z.ZodString;
|
|
1039
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1040
|
+
filename: z.ZodString;
|
|
1041
|
+
content_type: z.ZodString;
|
|
1042
|
+
content_base64: z.ZodString;
|
|
1043
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
991
1044
|
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
992
1045
|
tenant: z.ZodString;
|
|
993
1046
|
kind: z.ZodLiteral<"notification.send">;
|
|
@@ -1106,6 +1159,19 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1106
1159
|
expires_at: z.ZodOptional<z.ZodDate>;
|
|
1107
1160
|
url_secret: z.ZodOptional<z.ZodString>;
|
|
1108
1161
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1162
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1163
|
+
filename: z.ZodString;
|
|
1164
|
+
content_type: z.ZodString;
|
|
1165
|
+
content_base64: z.ZodString;
|
|
1166
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1167
|
+
filename: z.ZodString;
|
|
1168
|
+
content_type: z.ZodString;
|
|
1169
|
+
content_base64: z.ZodString;
|
|
1170
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1171
|
+
filename: z.ZodString;
|
|
1172
|
+
content_type: z.ZodString;
|
|
1173
|
+
content_base64: z.ZodString;
|
|
1174
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1109
1175
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1110
1176
|
tenant: z.ZodString;
|
|
1111
1177
|
kind: z.ZodLiteral<"notification.send">;
|
|
@@ -1224,6 +1290,19 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1224
1290
|
expires_at: z.ZodOptional<z.ZodDate>;
|
|
1225
1291
|
url_secret: z.ZodOptional<z.ZodString>;
|
|
1226
1292
|
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1293
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1294
|
+
filename: z.ZodString;
|
|
1295
|
+
content_type: z.ZodString;
|
|
1296
|
+
content_base64: z.ZodString;
|
|
1297
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1298
|
+
filename: z.ZodString;
|
|
1299
|
+
content_type: z.ZodString;
|
|
1300
|
+
content_base64: z.ZodString;
|
|
1301
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1302
|
+
filename: z.ZodString;
|
|
1303
|
+
content_type: z.ZodString;
|
|
1304
|
+
content_base64: z.ZodString;
|
|
1305
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
1227
1306
|
}, z.ZodTypeAny, "passthrough">>;
|
|
1228
1307
|
export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
1229
1308
|
kind: z.ZodLiteral<"notification.send">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zNexusDirectSendPayloadSchema = exports.zDirectSendPayloadSchema = exports.zNotificationDirectSendSchema = exports.zNotificationLogSchema = exports.zNotificationAttemptSchema = exports.zNotificationMessageSchema = exports.zNotificationErrorSchema = exports.zNotificationProviderMetaSchema = exports.zNotificationTemplateRefSchema = exports.zNotificationChannelRefSchema = exports.zNotificationRecipientSchema = exports.zNotificationLogLevelSchema = exports.zNotificationRecipientKindSchema = exports.zNotificationAttemptStatusSchema = exports.zNotificationMessageStatusSchema = exports.zNotificationChannelTypeSchema = void 0;
|
|
3
|
+
exports.zNexusDirectSendPayloadSchema = exports.zDirectSendPayloadSchema = exports.zNotificationAttachmentSchema = exports.NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES = exports.zNotificationDirectSendSchema = exports.zNotificationLogSchema = exports.zNotificationAttemptSchema = exports.zNotificationMessageSchema = exports.zNotificationErrorSchema = exports.zNotificationProviderMetaSchema = exports.zNotificationTemplateRefSchema = exports.zNotificationChannelRefSchema = exports.zNotificationRecipientSchema = exports.zNotificationLogLevelSchema = exports.zNotificationRecipientKindSchema = exports.zNotificationAttemptStatusSchema = exports.zNotificationMessageStatusSchema = exports.zNotificationChannelTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
6
|
const zod_schemas_2 = require("../evo-task/zod-schemas");
|
|
@@ -137,6 +137,19 @@ exports.zNotificationDirectSendSchema = zod_1.z.object({
|
|
|
137
137
|
category: zod_1.z.literal("utility"),
|
|
138
138
|
ttl_seconds: zod_1.z.number().int().min(30).max(43200).optional(),
|
|
139
139
|
});
|
|
140
|
+
// ---- feat-160 R6 / F31: anexo de notificação (INotificationAttachment) ----
|
|
141
|
+
//
|
|
142
|
+
// 64 KB é o teto DEPOIS do base64 (65536 chars). Declarado aqui para que o
|
|
143
|
+
// direct-send recuse na borda, e não no provider — o payload vive no doc da
|
|
144
|
+
// task e no doc da mensagem, e o Firestore corta em 1 MB.
|
|
145
|
+
exports.NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES = 65536;
|
|
146
|
+
exports.zNotificationAttachmentSchema = zod_1.z
|
|
147
|
+
.object({
|
|
148
|
+
filename: zod_1.z.string().min(1).max(200),
|
|
149
|
+
content_type: zod_1.z.string().min(1).max(200),
|
|
150
|
+
content_base64: zod_1.z.string().min(1).max(exports.NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES),
|
|
151
|
+
})
|
|
152
|
+
.passthrough();
|
|
140
153
|
// ---- HTTP direct send (INotificationSendPayload + tenant + externalLinks) ----
|
|
141
154
|
exports.zDirectSendPayloadSchema = zod_1.z
|
|
142
155
|
.object({
|
|
@@ -166,6 +179,8 @@ exports.zDirectSendPayloadSchema = zod_1.z
|
|
|
166
179
|
force_send: zod_1.z.boolean().optional(),
|
|
167
180
|
externalLinks: zod_1.z.array(zod_schemas_2.zExternalLinkSchema).optional(),
|
|
168
181
|
quick_reply_actions: zod_1.z.array(zod_schemas_3.zQuickReplyActionIntentSchema).optional(),
|
|
182
|
+
// feat-160 R6 / F31 — só o canal de e-mail honra; 1 anexo por mensagem.
|
|
183
|
+
attachments: zod_1.z.array(exports.zNotificationAttachmentSchema).max(1).optional(),
|
|
169
184
|
})
|
|
170
185
|
.passthrough()
|
|
171
186
|
.superRefine((data, ctx) => {
|
|
@@ -153,6 +153,21 @@ export const zNotificationDirectSendSchema = z.object({
|
|
|
153
153
|
ttl_seconds: z.number().int().min(30).max(43200).optional(),
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
// ---- feat-160 R6 / F31: anexo de notificação (INotificationAttachment) ----
|
|
157
|
+
//
|
|
158
|
+
// 64 KB é o teto DEPOIS do base64 (65536 chars). Declarado aqui para que o
|
|
159
|
+
// direct-send recuse na borda, e não no provider — o payload vive no doc da
|
|
160
|
+
// task e no doc da mensagem, e o Firestore corta em 1 MB.
|
|
161
|
+
export const NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES = 65536;
|
|
162
|
+
|
|
163
|
+
export const zNotificationAttachmentSchema = z
|
|
164
|
+
.object({
|
|
165
|
+
filename: z.string().min(1).max(200),
|
|
166
|
+
content_type: z.string().min(1).max(200),
|
|
167
|
+
content_base64: z.string().min(1).max(NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES),
|
|
168
|
+
})
|
|
169
|
+
.passthrough();
|
|
170
|
+
|
|
156
171
|
// ---- HTTP direct send (INotificationSendPayload + tenant + externalLinks) ----
|
|
157
172
|
|
|
158
173
|
export const zDirectSendPayloadSchema = z
|
|
@@ -183,6 +198,8 @@ export const zDirectSendPayloadSchema = z
|
|
|
183
198
|
force_send: z.boolean().optional(),
|
|
184
199
|
externalLinks: z.array(zExternalLinkSchema).optional(),
|
|
185
200
|
quick_reply_actions: z.array(zQuickReplyActionIntentSchema).optional(),
|
|
201
|
+
// feat-160 R6 / F31 — só o canal de e-mail honra; 1 anexo por mensagem.
|
|
202
|
+
attachments: z.array(zNotificationAttachmentSchema).max(1).optional(),
|
|
186
203
|
})
|
|
187
204
|
.passthrough()
|
|
188
205
|
.superRefine((data, ctx) => {
|
|
@@ -20,6 +20,32 @@ export declare const AppointmentModeEnum: {
|
|
|
20
20
|
readonly InPerson: "in_person";
|
|
21
21
|
};
|
|
22
22
|
export type AppointmentMode = (typeof AppointmentModeEnum)[keyof typeof AppointmentModeEnum];
|
|
23
|
+
export declare const TelemedicineProviderEnum: {
|
|
24
|
+
/** Hub Médica Virtual Care — o único provider que aciona o nosso domínio de telemedicina (sala, gravação, transcrição, bilhetagem). */
|
|
25
|
+
readonly VirtualCare: "virtual_care";
|
|
26
|
+
/** Ferramenta de terceiro (Meet, Zoom, iClinic…). Guarda o link em `access_url`; NUNCA cria sala nossa. */
|
|
27
|
+
readonly Other: "other";
|
|
28
|
+
};
|
|
29
|
+
export type TelemedicineProvider = (typeof TelemedicineProviderEnum)[keyof typeof TelemedicineProviderEnum];
|
|
30
|
+
/**
|
|
31
|
+
* Bloco de telemedicina do agendamento (feat-160 R6, D38).
|
|
32
|
+
*
|
|
33
|
+
* Só é lido quando `appointmentMode === 'telemedicine'`. Em agendamento
|
|
34
|
+
* PRESENCIAL o bloco é ignorado por invariante (o form do FE o limpa; o
|
|
35
|
+
* backend nunca o consulta) — ver `isVirtualCareAppointment` em `@evo/model`.
|
|
36
|
+
*
|
|
37
|
+
* Ausência de bloco (ou de `provider`) em telemedicina = telemedicina genérica
|
|
38
|
+
* legada: nenhuma sala é criada e nenhuma teleconsulta existente é cancelada.
|
|
39
|
+
*/
|
|
40
|
+
export interface IAppointmentTelemedicine {
|
|
41
|
+
provider: TelemedicineProvider;
|
|
42
|
+
/**
|
|
43
|
+
* Link de acesso do terceiro. Só tem significado com `provider: 'other'`;
|
|
44
|
+
* com `virtual_care` o acesso é sempre o nosso `/qr` com capability.
|
|
45
|
+
* Só http(s) é aceito pelos leitores (`telemedicineAccessUrl`).
|
|
46
|
+
*/
|
|
47
|
+
access_url?: string | null;
|
|
48
|
+
}
|
|
23
49
|
export interface IAppointmentAddress {
|
|
24
50
|
address_name?: string;
|
|
25
51
|
address_line1?: string;
|
|
@@ -146,6 +172,11 @@ export interface IAppointment extends IFireDoc {
|
|
|
146
172
|
statusBase: AppointmentStatusType;
|
|
147
173
|
notes?: string;
|
|
148
174
|
appointmentMode?: AppointmentMode | null;
|
|
175
|
+
/**
|
|
176
|
+
* Provider de telemedicina (feat-160 R6, D38). Lido SÓ quando
|
|
177
|
+
* `appointmentMode === 'telemedicine'`. Ver `IAppointmentTelemedicine`.
|
|
178
|
+
*/
|
|
179
|
+
telemedicine?: IAppointmentTelemedicine | null;
|
|
149
180
|
appointmentType?: string | null;
|
|
150
181
|
appointmentBaseType?: AppointmentType | null;
|
|
151
182
|
appointmentSource?: IAppointmentAppointmentSource | null;
|
|
@@ -183,6 +214,8 @@ export interface IPatientAppointment {
|
|
|
183
214
|
status: string;
|
|
184
215
|
statusBase: AppointmentStatusType;
|
|
185
216
|
appointmentMode?: AppointmentMode | null;
|
|
217
|
+
/** Espelho do provider de telemedicina do agendamento (feat-160 R6, D38). */
|
|
218
|
+
telemedicine?: IAppointmentTelemedicine | null;
|
|
186
219
|
appointmentBaseType?: AppointmentType | null;
|
|
187
220
|
procedures?: string[];
|
|
188
221
|
professional?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PaymentTypeEnum = exports.AppointmentModeEnum = exports.AppointmentPaymentStatusEnum = exports.EvoMedAppointmentPermissions = void 0;
|
|
3
|
+
exports.PaymentTypeEnum = exports.TelemedicineProviderEnum = exports.AppointmentModeEnum = exports.AppointmentPaymentStatusEnum = exports.EvoMedAppointmentPermissions = void 0;
|
|
4
4
|
// Permissões para o agendamento
|
|
5
5
|
exports.EvoMedAppointmentPermissions = {
|
|
6
6
|
List: "evo_med_appointment_read",
|
|
@@ -21,6 +21,24 @@ exports.AppointmentModeEnum = {
|
|
|
21
21
|
Telemedicine: "telemedicine",
|
|
22
22
|
InPerson: "in_person",
|
|
23
23
|
};
|
|
24
|
+
// ----- Telemedicina: PROVIDER dentro do agendamento (feat-160 R6, D38)
|
|
25
|
+
//
|
|
26
|
+
// A modalidade (`appointmentMode`) continua canônica `in_person | telemedicine`.
|
|
27
|
+
// Quem distingue "consulta na NOSSA sala" de "consulta remota em ferramenta de
|
|
28
|
+
// terceiro" é este bloco, e só ele.
|
|
29
|
+
//
|
|
30
|
+
// ⚠️ HOMÔNIMO: `TelemedicineProviderEnum.VirtualCare` ('virtual_care') é o
|
|
31
|
+
// PROVIDER do agendamento. `IMedCalendar.virtual_care`
|
|
32
|
+
// (`IMedCalendarVirtualCareConfig`, D32) é OUTRA coisa: a configuração de
|
|
33
|
+
// gravação/retenção/identidade da agenda. São escopos diferentes; o único
|
|
34
|
+
// ponto em que se cruzam é `virtual_care.default_provider` (qual provider a
|
|
35
|
+
// agenda sugere ao agendar telemedicina).
|
|
36
|
+
exports.TelemedicineProviderEnum = {
|
|
37
|
+
/** Hub Médica Virtual Care — o único provider que aciona o nosso domínio de telemedicina (sala, gravação, transcrição, bilhetagem). */
|
|
38
|
+
VirtualCare: "virtual_care",
|
|
39
|
+
/** Ferramenta de terceiro (Meet, Zoom, iClinic…). Guarda o link em `access_url`; NUNCA cria sala nossa. */
|
|
40
|
+
Other: "other",
|
|
41
|
+
};
|
|
24
42
|
exports.PaymentTypeEnum = {
|
|
25
43
|
Patient: "patient",
|
|
26
44
|
Insurance: "insurance",
|
|
@@ -38,6 +38,48 @@ export const AppointmentModeEnum = {
|
|
|
38
38
|
export type AppointmentMode =
|
|
39
39
|
(typeof AppointmentModeEnum)[keyof typeof AppointmentModeEnum];
|
|
40
40
|
|
|
41
|
+
// ----- Telemedicina: PROVIDER dentro do agendamento (feat-160 R6, D38)
|
|
42
|
+
//
|
|
43
|
+
// A modalidade (`appointmentMode`) continua canônica `in_person | telemedicine`.
|
|
44
|
+
// Quem distingue "consulta na NOSSA sala" de "consulta remota em ferramenta de
|
|
45
|
+
// terceiro" é este bloco, e só ele.
|
|
46
|
+
//
|
|
47
|
+
// ⚠️ HOMÔNIMO: `TelemedicineProviderEnum.VirtualCare` ('virtual_care') é o
|
|
48
|
+
// PROVIDER do agendamento. `IMedCalendar.virtual_care`
|
|
49
|
+
// (`IMedCalendarVirtualCareConfig`, D32) é OUTRA coisa: a configuração de
|
|
50
|
+
// gravação/retenção/identidade da agenda. São escopos diferentes; o único
|
|
51
|
+
// ponto em que se cruzam é `virtual_care.default_provider` (qual provider a
|
|
52
|
+
// agenda sugere ao agendar telemedicina).
|
|
53
|
+
export const TelemedicineProviderEnum = {
|
|
54
|
+
/** Hub Médica Virtual Care — o único provider que aciona o nosso domínio de telemedicina (sala, gravação, transcrição, bilhetagem). */
|
|
55
|
+
VirtualCare: "virtual_care",
|
|
56
|
+
/** Ferramenta de terceiro (Meet, Zoom, iClinic…). Guarda o link em `access_url`; NUNCA cria sala nossa. */
|
|
57
|
+
Other: "other",
|
|
58
|
+
} as const;
|
|
59
|
+
|
|
60
|
+
export type TelemedicineProvider =
|
|
61
|
+
(typeof TelemedicineProviderEnum)[keyof typeof TelemedicineProviderEnum];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Bloco de telemedicina do agendamento (feat-160 R6, D38).
|
|
65
|
+
*
|
|
66
|
+
* Só é lido quando `appointmentMode === 'telemedicine'`. Em agendamento
|
|
67
|
+
* PRESENCIAL o bloco é ignorado por invariante (o form do FE o limpa; o
|
|
68
|
+
* backend nunca o consulta) — ver `isVirtualCareAppointment` em `@evo/model`.
|
|
69
|
+
*
|
|
70
|
+
* Ausência de bloco (ou de `provider`) em telemedicina = telemedicina genérica
|
|
71
|
+
* legada: nenhuma sala é criada e nenhuma teleconsulta existente é cancelada.
|
|
72
|
+
*/
|
|
73
|
+
export interface IAppointmentTelemedicine {
|
|
74
|
+
provider: TelemedicineProvider;
|
|
75
|
+
/**
|
|
76
|
+
* Link de acesso do terceiro. Só tem significado com `provider: 'other'`;
|
|
77
|
+
* com `virtual_care` o acesso é sempre o nosso `/qr` com capability.
|
|
78
|
+
* Só http(s) é aceito pelos leitores (`telemedicineAccessUrl`).
|
|
79
|
+
*/
|
|
80
|
+
access_url?: string | null;
|
|
81
|
+
}
|
|
82
|
+
|
|
41
83
|
// Interface para endereço
|
|
42
84
|
export interface IAppointmentAddress {
|
|
43
85
|
address_name?: string;
|
|
@@ -187,6 +229,11 @@ export interface IAppointment extends IFireDoc {
|
|
|
187
229
|
statusBase: AppointmentStatusType;
|
|
188
230
|
notes?: string;
|
|
189
231
|
appointmentMode?: AppointmentMode | null;
|
|
232
|
+
/**
|
|
233
|
+
* Provider de telemedicina (feat-160 R6, D38). Lido SÓ quando
|
|
234
|
+
* `appointmentMode === 'telemedicine'`. Ver `IAppointmentTelemedicine`.
|
|
235
|
+
*/
|
|
236
|
+
telemedicine?: IAppointmentTelemedicine | null;
|
|
190
237
|
appointmentType?: string | null;
|
|
191
238
|
appointmentBaseType?: AppointmentType | null;
|
|
192
239
|
appointmentSource?: IAppointmentAppointmentSource | null;
|
|
@@ -229,6 +276,8 @@ export interface IPatientAppointment {
|
|
|
229
276
|
status: string;
|
|
230
277
|
statusBase: AppointmentStatusType;
|
|
231
278
|
appointmentMode?: AppointmentMode | null;
|
|
279
|
+
/** Espelho do provider de telemedicina do agendamento (feat-160 R6, D38). */
|
|
280
|
+
telemedicine?: IAppointmentTelemedicine | null;
|
|
232
281
|
appointmentBaseType?: AppointmentType | null;
|
|
233
282
|
procedures?: string[];
|
|
234
283
|
professional?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "../../evo-people/fb_collections";
|
|
2
2
|
import type { FirestoreDocumentReference, IFireDoc, ITag } from "../../shared";
|
|
3
3
|
import type { IAppointmentCounters } from "../people";
|
|
4
|
+
import type { TelemedicineProvider } from "../appointment";
|
|
4
5
|
import type { IMedCalendarIntegration } from "../../evo-integrations";
|
|
5
6
|
export declare const EvoMedCalendarPermissions: {
|
|
6
7
|
readonly List: "evo_med_calendar_read";
|
|
@@ -212,6 +213,14 @@ export interface IMedCalendarVirtualCareConfig {
|
|
|
212
213
|
max_duration_minutes?: number | null;
|
|
213
214
|
/** Aviso ao médico no SPA quando faltar N min para o fim. 0 = sem aviso. */
|
|
214
215
|
end_warning_minutes?: number | null;
|
|
216
|
+
/**
|
|
217
|
+
* Provider sugerido ao agendar TELEMEDICINA nesta agenda (feat-160 R6, D38).
|
|
218
|
+
* Ausente = `virtual_care`. Não confundir o bloco `virtual_care` da agenda
|
|
219
|
+
* (esta config) com o provider `'virtual_care'` do agendamento
|
|
220
|
+
* (`IAppointmentTelemedicine.provider`): são coisas diferentes, e este campo
|
|
221
|
+
* é o ÚNICO ponto em que se cruzam.
|
|
222
|
+
*/
|
|
223
|
+
default_provider?: TelemedicineProvider | null;
|
|
215
224
|
}
|
|
216
225
|
/** Config já RESOLVIDA (doc + defaults) — é com isto que o backend decide. */
|
|
217
226
|
export interface IMedCalendarVirtualCareSettings {
|
|
@@ -233,6 +242,13 @@ export interface IMedCalendarVirtualCareSettings {
|
|
|
233
242
|
allow_late_end: boolean;
|
|
234
243
|
max_duration_minutes: number;
|
|
235
244
|
end_warning_minutes: number;
|
|
245
|
+
/**
|
|
246
|
+
* Provider sugerido ao agendar telemedicina (feat-160 R6, D38).
|
|
247
|
+
* Opcional mesmo no tipo RESOLVIDO: quem lê aplica
|
|
248
|
+
* `?? TelemedicineProviderEnum.VirtualCare`, e declarar obrigatório aqui
|
|
249
|
+
* quebraria todo resolvedor já compilado contra os defaults congelados.
|
|
250
|
+
*/
|
|
251
|
+
default_provider?: TelemedicineProvider;
|
|
236
252
|
}
|
|
237
253
|
/**
|
|
238
254
|
* Defaults da spec (plan §12 / D13 / D32). Agenda sem `virtual_care` vale
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "../../evo-people/fb_collections";
|
|
2
2
|
import type { FirestoreDocumentReference, IFireDoc, ITag } from "../../shared";
|
|
3
3
|
import type { IAppointmentCounters } from "../people";
|
|
4
|
+
import type { TelemedicineProvider } from "../appointment";
|
|
4
5
|
import type { IMedCalendarIntegration } from "../../evo-integrations";
|
|
5
6
|
|
|
6
7
|
// Permissões para o calendário
|
|
@@ -254,6 +255,14 @@ export interface IMedCalendarVirtualCareConfig {
|
|
|
254
255
|
max_duration_minutes?: number | null;
|
|
255
256
|
/** Aviso ao médico no SPA quando faltar N min para o fim. 0 = sem aviso. */
|
|
256
257
|
end_warning_minutes?: number | null;
|
|
258
|
+
/**
|
|
259
|
+
* Provider sugerido ao agendar TELEMEDICINA nesta agenda (feat-160 R6, D38).
|
|
260
|
+
* Ausente = `virtual_care`. Não confundir o bloco `virtual_care` da agenda
|
|
261
|
+
* (esta config) com o provider `'virtual_care'` do agendamento
|
|
262
|
+
* (`IAppointmentTelemedicine.provider`): são coisas diferentes, e este campo
|
|
263
|
+
* é o ÚNICO ponto em que se cruzam.
|
|
264
|
+
*/
|
|
265
|
+
default_provider?: TelemedicineProvider | null;
|
|
257
266
|
}
|
|
258
267
|
|
|
259
268
|
/** Config já RESOLVIDA (doc + defaults) — é com isto que o backend decide. */
|
|
@@ -276,6 +285,13 @@ export interface IMedCalendarVirtualCareSettings {
|
|
|
276
285
|
allow_late_end: boolean;
|
|
277
286
|
max_duration_minutes: number;
|
|
278
287
|
end_warning_minutes: number;
|
|
288
|
+
/**
|
|
289
|
+
* Provider sugerido ao agendar telemedicina (feat-160 R6, D38).
|
|
290
|
+
* Opcional mesmo no tipo RESOLVIDO: quem lê aplica
|
|
291
|
+
* `?? TelemedicineProviderEnum.VirtualCare`, e declarar obrigatório aqui
|
|
292
|
+
* quebraria todo resolvedor já compilado contra os defaults congelados.
|
|
293
|
+
*/
|
|
294
|
+
default_provider?: TelemedicineProvider;
|
|
279
295
|
}
|
|
280
296
|
|
|
281
297
|
/**
|
|
@@ -118,6 +118,25 @@ export interface INotificationDirectSend {
|
|
|
118
118
|
category: 'utility';
|
|
119
119
|
ttl_seconds?: number;
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Anexo de notificação (feat-160 R6 / F31 — ICS no e-mail).
|
|
123
|
+
*
|
|
124
|
+
* Só o canal de E-MAIL entende anexo. Provider que não conhece anexo
|
|
125
|
+
* (WhatsApp) **ignora** o campo — de propósito: anexo NÃO é mídia de HSM, e
|
|
126
|
+
* "consertar" mandando o ICS como documento de template quebra o envio.
|
|
127
|
+
*
|
|
128
|
+
* Teto de 64 KB por anexo DEPOIS do base64, 1 anexo por mensagem. O payload
|
|
129
|
+
* vive no doc da task E no doc da mensagem, e o Firestore corta em 1 MB — por
|
|
130
|
+
* isso o limite é validado no usecase, não só no provider.
|
|
131
|
+
*/
|
|
132
|
+
export interface INotificationAttachment {
|
|
133
|
+
/** Nome do arquivo apresentado ao destinatário. Ex.: 'consulta.ics'. */
|
|
134
|
+
filename: string;
|
|
135
|
+
/** Ex.: 'text/calendar; charset=utf-8; method=PUBLISH'. */
|
|
136
|
+
content_type: string;
|
|
137
|
+
/** Conteúdo em base64. <= 64 KB já codificado. */
|
|
138
|
+
content_base64: string;
|
|
139
|
+
}
|
|
121
140
|
export interface INotificationSendPayload {
|
|
122
141
|
kind: "notification.send";
|
|
123
142
|
classification?: string;
|
|
@@ -143,6 +162,11 @@ export interface INotificationSendPayload {
|
|
|
143
162
|
* The send path creates one quick-reply-actions/{actionId} doc per intent.
|
|
144
163
|
*/
|
|
145
164
|
quick_reply_actions?: IQuickReplyActionIntent[];
|
|
165
|
+
/**
|
|
166
|
+
* Anexos (feat-160 R6 / F31). Honrado SÓ no canal de e-mail; ignorado pelos
|
|
167
|
+
* demais providers. 1 anexo, <= 64 KB em base64 — ver `INotificationAttachment`.
|
|
168
|
+
*/
|
|
169
|
+
attachments?: INotificationAttachment[];
|
|
146
170
|
routine?: {
|
|
147
171
|
id: string;
|
|
148
172
|
version?: number | string;
|
|
@@ -202,6 +202,26 @@ export interface INotificationDirectSend {
|
|
|
202
202
|
ttl_seconds?: number;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
/**
|
|
206
|
+
* Anexo de notificação (feat-160 R6 / F31 — ICS no e-mail).
|
|
207
|
+
*
|
|
208
|
+
* Só o canal de E-MAIL entende anexo. Provider que não conhece anexo
|
|
209
|
+
* (WhatsApp) **ignora** o campo — de propósito: anexo NÃO é mídia de HSM, e
|
|
210
|
+
* "consertar" mandando o ICS como documento de template quebra o envio.
|
|
211
|
+
*
|
|
212
|
+
* Teto de 64 KB por anexo DEPOIS do base64, 1 anexo por mensagem. O payload
|
|
213
|
+
* vive no doc da task E no doc da mensagem, e o Firestore corta em 1 MB — por
|
|
214
|
+
* isso o limite é validado no usecase, não só no provider.
|
|
215
|
+
*/
|
|
216
|
+
export interface INotificationAttachment {
|
|
217
|
+
/** Nome do arquivo apresentado ao destinatário. Ex.: 'consulta.ics'. */
|
|
218
|
+
filename: string;
|
|
219
|
+
/** Ex.: 'text/calendar; charset=utf-8; method=PUBLISH'. */
|
|
220
|
+
content_type: string;
|
|
221
|
+
/** Conteúdo em base64. <= 64 KB já codificado. */
|
|
222
|
+
content_base64: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
205
225
|
export interface INotificationSendPayload {
|
|
206
226
|
kind: "notification.send";
|
|
207
227
|
|
|
@@ -237,6 +257,12 @@ export interface INotificationSendPayload {
|
|
|
237
257
|
*/
|
|
238
258
|
quick_reply_actions?: IQuickReplyActionIntent[];
|
|
239
259
|
|
|
260
|
+
/**
|
|
261
|
+
* Anexos (feat-160 R6 / F31). Honrado SÓ no canal de e-mail; ignorado pelos
|
|
262
|
+
* demais providers. 1 anexo, <= 64 KB em base64 — ver `INotificationAttachment`.
|
|
263
|
+
*/
|
|
264
|
+
attachments?: INotificationAttachment[];
|
|
265
|
+
|
|
240
266
|
// Optional business context
|
|
241
267
|
routine?: {
|
|
242
268
|
id: string;
|