evo360-types 1.3.699 → 1.3.705
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-notifications/zod-schemas.d.ts +458 -0
- package/dist/apps/evo-notifications/zod-schemas.js +39 -1
- package/dist/apps/evo-notifications/zod-schemas.ts +41 -0
- package/dist/types/evo-finops/providers/asaas/asaas_kyc.d.ts +7 -1
- package/dist/types/evo-finops/providers/asaas/asaas_kyc.ts +7 -0
- package/dist/types/evo-finops/providers/asaas/asaas_provider.d.ts +8 -0
- package/dist/types/evo-finops/providers/asaas/asaas_provider.ts +10 -0
- package/dist/types/evo-notifications/index.d.ts +25 -0
- package/dist/types/evo-notifications/index.ts +30 -0
- package/package.json +1 -1
|
@@ -78,6 +78,61 @@ export declare const zNotificationErrorSchema: z.ZodObject<{
|
|
|
78
78
|
code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
79
79
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
80
80
|
}, z.ZodTypeAny, "passthrough">>;
|
|
81
|
+
/** Human email content; plain text remains in the legacy top-level body_text. */
|
|
82
|
+
export declare const zNotificationEmailContentSchema: z.ZodEffects<z.ZodObject<{
|
|
83
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
84
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
85
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
86
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
87
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, "strict", z.ZodTypeAny, {
|
|
89
|
+
thread_id?: string | undefined;
|
|
90
|
+
body_text?: string | undefined;
|
|
91
|
+
subject?: string | undefined;
|
|
92
|
+
body_html?: string | undefined;
|
|
93
|
+
reply_to_message_id?: string | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
thread_id?: string | undefined;
|
|
96
|
+
body_text?: string | undefined;
|
|
97
|
+
subject?: string | undefined;
|
|
98
|
+
body_html?: string | undefined;
|
|
99
|
+
reply_to_message_id?: string | undefined;
|
|
100
|
+
}>, {
|
|
101
|
+
thread_id?: string | undefined;
|
|
102
|
+
body_text?: string | undefined;
|
|
103
|
+
subject?: string | undefined;
|
|
104
|
+
body_html?: string | undefined;
|
|
105
|
+
reply_to_message_id?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
thread_id?: string | undefined;
|
|
108
|
+
body_text?: string | undefined;
|
|
109
|
+
subject?: string | undefined;
|
|
110
|
+
body_html?: string | undefined;
|
|
111
|
+
reply_to_message_id?: string | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
export declare const EMAIL_ATTACHMENT_TOTAL_MAX_BYTES: number;
|
|
114
|
+
export declare const zEmailSmtpConfigSchema: z.ZodObject<{
|
|
115
|
+
host: z.ZodString;
|
|
116
|
+
port: z.ZodNumber;
|
|
117
|
+
secure: z.ZodBoolean;
|
|
118
|
+
username: z.ZodString;
|
|
119
|
+
password_secret_ref: z.ZodString;
|
|
120
|
+
max_attachment_total_bytes: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
122
|
+
host: z.ZodString;
|
|
123
|
+
port: z.ZodNumber;
|
|
124
|
+
secure: z.ZodBoolean;
|
|
125
|
+
username: z.ZodString;
|
|
126
|
+
password_secret_ref: z.ZodString;
|
|
127
|
+
max_attachment_total_bytes: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
129
|
+
host: z.ZodString;
|
|
130
|
+
port: z.ZodNumber;
|
|
131
|
+
secure: z.ZodBoolean;
|
|
132
|
+
username: z.ZodString;
|
|
133
|
+
password_secret_ref: z.ZodString;
|
|
134
|
+
max_attachment_total_bytes: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
81
136
|
export declare const zNotificationMessageSchema: z.ZodObject<{
|
|
82
137
|
id: z.ZodString;
|
|
83
138
|
ref: z.ZodAny;
|
|
@@ -119,6 +174,37 @@ export declare const zNotificationMessageSchema: z.ZodObject<{
|
|
|
119
174
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
120
175
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
121
176
|
body_text: z.ZodOptional<z.ZodString>;
|
|
177
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
178
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
179
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
180
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
181
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
182
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, "strict", z.ZodTypeAny, {
|
|
184
|
+
thread_id?: string | undefined;
|
|
185
|
+
body_text?: string | undefined;
|
|
186
|
+
subject?: string | undefined;
|
|
187
|
+
body_html?: string | undefined;
|
|
188
|
+
reply_to_message_id?: string | undefined;
|
|
189
|
+
}, {
|
|
190
|
+
thread_id?: string | undefined;
|
|
191
|
+
body_text?: string | undefined;
|
|
192
|
+
subject?: string | undefined;
|
|
193
|
+
body_html?: string | undefined;
|
|
194
|
+
reply_to_message_id?: string | undefined;
|
|
195
|
+
}>, {
|
|
196
|
+
thread_id?: string | undefined;
|
|
197
|
+
body_text?: string | undefined;
|
|
198
|
+
subject?: string | undefined;
|
|
199
|
+
body_html?: string | undefined;
|
|
200
|
+
reply_to_message_id?: string | undefined;
|
|
201
|
+
}, {
|
|
202
|
+
thread_id?: string | undefined;
|
|
203
|
+
body_text?: string | undefined;
|
|
204
|
+
subject?: string | undefined;
|
|
205
|
+
body_html?: string | undefined;
|
|
206
|
+
reply_to_message_id?: string | undefined;
|
|
207
|
+
}>>;
|
|
122
208
|
recipient: z.ZodObject<{
|
|
123
209
|
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
124
210
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -314,6 +400,37 @@ export declare const zNotificationMessageSchema: z.ZodObject<{
|
|
|
314
400
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
315
401
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
316
402
|
body_text: z.ZodOptional<z.ZodString>;
|
|
403
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
404
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
405
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
406
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
407
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
408
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, "strict", z.ZodTypeAny, {
|
|
410
|
+
thread_id?: string | undefined;
|
|
411
|
+
body_text?: string | undefined;
|
|
412
|
+
subject?: string | undefined;
|
|
413
|
+
body_html?: string | undefined;
|
|
414
|
+
reply_to_message_id?: string | undefined;
|
|
415
|
+
}, {
|
|
416
|
+
thread_id?: string | undefined;
|
|
417
|
+
body_text?: string | undefined;
|
|
418
|
+
subject?: string | undefined;
|
|
419
|
+
body_html?: string | undefined;
|
|
420
|
+
reply_to_message_id?: string | undefined;
|
|
421
|
+
}>, {
|
|
422
|
+
thread_id?: string | undefined;
|
|
423
|
+
body_text?: string | undefined;
|
|
424
|
+
subject?: string | undefined;
|
|
425
|
+
body_html?: string | undefined;
|
|
426
|
+
reply_to_message_id?: string | undefined;
|
|
427
|
+
}, {
|
|
428
|
+
thread_id?: string | undefined;
|
|
429
|
+
body_text?: string | undefined;
|
|
430
|
+
subject?: string | undefined;
|
|
431
|
+
body_html?: string | undefined;
|
|
432
|
+
reply_to_message_id?: string | undefined;
|
|
433
|
+
}>>;
|
|
317
434
|
recipient: z.ZodObject<{
|
|
318
435
|
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
319
436
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -509,6 +626,37 @@ export declare const zNotificationMessageSchema: z.ZodObject<{
|
|
|
509
626
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
510
627
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
511
628
|
body_text: z.ZodOptional<z.ZodString>;
|
|
629
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
630
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
631
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
632
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
633
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
634
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
635
|
+
}, "strict", z.ZodTypeAny, {
|
|
636
|
+
thread_id?: string | undefined;
|
|
637
|
+
body_text?: string | undefined;
|
|
638
|
+
subject?: string | undefined;
|
|
639
|
+
body_html?: string | undefined;
|
|
640
|
+
reply_to_message_id?: string | undefined;
|
|
641
|
+
}, {
|
|
642
|
+
thread_id?: string | undefined;
|
|
643
|
+
body_text?: string | undefined;
|
|
644
|
+
subject?: string | undefined;
|
|
645
|
+
body_html?: string | undefined;
|
|
646
|
+
reply_to_message_id?: string | undefined;
|
|
647
|
+
}>, {
|
|
648
|
+
thread_id?: string | undefined;
|
|
649
|
+
body_text?: string | undefined;
|
|
650
|
+
subject?: string | undefined;
|
|
651
|
+
body_html?: string | undefined;
|
|
652
|
+
reply_to_message_id?: string | undefined;
|
|
653
|
+
}, {
|
|
654
|
+
thread_id?: string | undefined;
|
|
655
|
+
body_text?: string | undefined;
|
|
656
|
+
subject?: string | undefined;
|
|
657
|
+
body_html?: string | undefined;
|
|
658
|
+
reply_to_message_id?: string | undefined;
|
|
659
|
+
}>>;
|
|
512
660
|
recipient: z.ZodObject<{
|
|
513
661
|
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
514
662
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -923,6 +1071,37 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
923
1071
|
locale: z.ZodOptional<z.ZodString>;
|
|
924
1072
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
925
1073
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1074
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1075
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
1077
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
1078
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
}, "strict", z.ZodTypeAny, {
|
|
1081
|
+
thread_id?: string | undefined;
|
|
1082
|
+
body_text?: string | undefined;
|
|
1083
|
+
subject?: string | undefined;
|
|
1084
|
+
body_html?: string | undefined;
|
|
1085
|
+
reply_to_message_id?: string | undefined;
|
|
1086
|
+
}, {
|
|
1087
|
+
thread_id?: string | undefined;
|
|
1088
|
+
body_text?: string | undefined;
|
|
1089
|
+
subject?: string | undefined;
|
|
1090
|
+
body_html?: string | undefined;
|
|
1091
|
+
reply_to_message_id?: string | undefined;
|
|
1092
|
+
}>, {
|
|
1093
|
+
thread_id?: string | undefined;
|
|
1094
|
+
body_text?: string | undefined;
|
|
1095
|
+
subject?: string | undefined;
|
|
1096
|
+
body_html?: string | undefined;
|
|
1097
|
+
reply_to_message_id?: string | undefined;
|
|
1098
|
+
}, {
|
|
1099
|
+
thread_id?: string | undefined;
|
|
1100
|
+
body_text?: string | undefined;
|
|
1101
|
+
subject?: string | undefined;
|
|
1102
|
+
body_html?: string | undefined;
|
|
1103
|
+
reply_to_message_id?: string | undefined;
|
|
1104
|
+
}>>;
|
|
926
1105
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
927
1106
|
body_text: z.ZodOptional<z.ZodString>;
|
|
928
1107
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
@@ -1129,6 +1308,37 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1129
1308
|
locale: z.ZodOptional<z.ZodString>;
|
|
1130
1309
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1131
1310
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1311
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1312
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1313
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
1314
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
1315
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
1316
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
1317
|
+
}, "strict", z.ZodTypeAny, {
|
|
1318
|
+
thread_id?: string | undefined;
|
|
1319
|
+
body_text?: string | undefined;
|
|
1320
|
+
subject?: string | undefined;
|
|
1321
|
+
body_html?: string | undefined;
|
|
1322
|
+
reply_to_message_id?: string | undefined;
|
|
1323
|
+
}, {
|
|
1324
|
+
thread_id?: string | undefined;
|
|
1325
|
+
body_text?: string | undefined;
|
|
1326
|
+
subject?: string | undefined;
|
|
1327
|
+
body_html?: string | undefined;
|
|
1328
|
+
reply_to_message_id?: string | undefined;
|
|
1329
|
+
}>, {
|
|
1330
|
+
thread_id?: string | undefined;
|
|
1331
|
+
body_text?: string | undefined;
|
|
1332
|
+
subject?: string | undefined;
|
|
1333
|
+
body_html?: string | undefined;
|
|
1334
|
+
reply_to_message_id?: string | undefined;
|
|
1335
|
+
}, {
|
|
1336
|
+
thread_id?: string | undefined;
|
|
1337
|
+
body_text?: string | undefined;
|
|
1338
|
+
subject?: string | undefined;
|
|
1339
|
+
body_html?: string | undefined;
|
|
1340
|
+
reply_to_message_id?: string | undefined;
|
|
1341
|
+
}>>;
|
|
1132
1342
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
1133
1343
|
body_text: z.ZodOptional<z.ZodString>;
|
|
1134
1344
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
@@ -1335,6 +1545,37 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1335
1545
|
locale: z.ZodOptional<z.ZodString>;
|
|
1336
1546
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1337
1547
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1548
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1549
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1550
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
1551
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
1552
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
1553
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
1554
|
+
}, "strict", z.ZodTypeAny, {
|
|
1555
|
+
thread_id?: string | undefined;
|
|
1556
|
+
body_text?: string | undefined;
|
|
1557
|
+
subject?: string | undefined;
|
|
1558
|
+
body_html?: string | undefined;
|
|
1559
|
+
reply_to_message_id?: string | undefined;
|
|
1560
|
+
}, {
|
|
1561
|
+
thread_id?: string | undefined;
|
|
1562
|
+
body_text?: string | undefined;
|
|
1563
|
+
subject?: string | undefined;
|
|
1564
|
+
body_html?: string | undefined;
|
|
1565
|
+
reply_to_message_id?: string | undefined;
|
|
1566
|
+
}>, {
|
|
1567
|
+
thread_id?: string | undefined;
|
|
1568
|
+
body_text?: string | undefined;
|
|
1569
|
+
subject?: string | undefined;
|
|
1570
|
+
body_html?: string | undefined;
|
|
1571
|
+
reply_to_message_id?: string | undefined;
|
|
1572
|
+
}, {
|
|
1573
|
+
thread_id?: string | undefined;
|
|
1574
|
+
body_text?: string | undefined;
|
|
1575
|
+
subject?: string | undefined;
|
|
1576
|
+
body_html?: string | undefined;
|
|
1577
|
+
reply_to_message_id?: string | undefined;
|
|
1578
|
+
}>>;
|
|
1338
1579
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
1339
1580
|
body_text: z.ZodOptional<z.ZodString>;
|
|
1340
1581
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
@@ -1541,6 +1782,37 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1541
1782
|
locale: z.ZodOptional<z.ZodString>;
|
|
1542
1783
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1543
1784
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1785
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
1786
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1787
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
1788
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
1789
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
1791
|
+
}, "strict", z.ZodTypeAny, {
|
|
1792
|
+
thread_id?: string | undefined;
|
|
1793
|
+
body_text?: string | undefined;
|
|
1794
|
+
subject?: string | undefined;
|
|
1795
|
+
body_html?: string | undefined;
|
|
1796
|
+
reply_to_message_id?: string | undefined;
|
|
1797
|
+
}, {
|
|
1798
|
+
thread_id?: string | undefined;
|
|
1799
|
+
body_text?: string | undefined;
|
|
1800
|
+
subject?: string | undefined;
|
|
1801
|
+
body_html?: string | undefined;
|
|
1802
|
+
reply_to_message_id?: string | undefined;
|
|
1803
|
+
}>, {
|
|
1804
|
+
thread_id?: string | undefined;
|
|
1805
|
+
body_text?: string | undefined;
|
|
1806
|
+
subject?: string | undefined;
|
|
1807
|
+
body_html?: string | undefined;
|
|
1808
|
+
reply_to_message_id?: string | undefined;
|
|
1809
|
+
}, {
|
|
1810
|
+
thread_id?: string | undefined;
|
|
1811
|
+
body_text?: string | undefined;
|
|
1812
|
+
subject?: string | undefined;
|
|
1813
|
+
body_html?: string | undefined;
|
|
1814
|
+
reply_to_message_id?: string | undefined;
|
|
1815
|
+
}>>;
|
|
1544
1816
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
1545
1817
|
body_text: z.ZodOptional<z.ZodString>;
|
|
1546
1818
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
@@ -1747,6 +2019,37 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1747
2019
|
locale: z.ZodOptional<z.ZodString>;
|
|
1748
2020
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1749
2021
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2022
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
2023
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2024
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
2025
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
2026
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
2027
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
2028
|
+
}, "strict", z.ZodTypeAny, {
|
|
2029
|
+
thread_id?: string | undefined;
|
|
2030
|
+
body_text?: string | undefined;
|
|
2031
|
+
subject?: string | undefined;
|
|
2032
|
+
body_html?: string | undefined;
|
|
2033
|
+
reply_to_message_id?: string | undefined;
|
|
2034
|
+
}, {
|
|
2035
|
+
thread_id?: string | undefined;
|
|
2036
|
+
body_text?: string | undefined;
|
|
2037
|
+
subject?: string | undefined;
|
|
2038
|
+
body_html?: string | undefined;
|
|
2039
|
+
reply_to_message_id?: string | undefined;
|
|
2040
|
+
}>, {
|
|
2041
|
+
thread_id?: string | undefined;
|
|
2042
|
+
body_text?: string | undefined;
|
|
2043
|
+
subject?: string | undefined;
|
|
2044
|
+
body_html?: string | undefined;
|
|
2045
|
+
reply_to_message_id?: string | undefined;
|
|
2046
|
+
}, {
|
|
2047
|
+
thread_id?: string | undefined;
|
|
2048
|
+
body_text?: string | undefined;
|
|
2049
|
+
subject?: string | undefined;
|
|
2050
|
+
body_html?: string | undefined;
|
|
2051
|
+
reply_to_message_id?: string | undefined;
|
|
2052
|
+
}>>;
|
|
1750
2053
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
1751
2054
|
body_text: z.ZodOptional<z.ZodString>;
|
|
1752
2055
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
@@ -1954,6 +2257,37 @@ export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1954
2257
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
1955
2258
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
1956
2259
|
body_text: z.ZodOptional<z.ZodString>;
|
|
2260
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
2261
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2262
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
2263
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
2264
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
2265
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
2266
|
+
}, "strict", z.ZodTypeAny, {
|
|
2267
|
+
thread_id?: string | undefined;
|
|
2268
|
+
body_text?: string | undefined;
|
|
2269
|
+
subject?: string | undefined;
|
|
2270
|
+
body_html?: string | undefined;
|
|
2271
|
+
reply_to_message_id?: string | undefined;
|
|
2272
|
+
}, {
|
|
2273
|
+
thread_id?: string | undefined;
|
|
2274
|
+
body_text?: string | undefined;
|
|
2275
|
+
subject?: string | undefined;
|
|
2276
|
+
body_html?: string | undefined;
|
|
2277
|
+
reply_to_message_id?: string | undefined;
|
|
2278
|
+
}>, {
|
|
2279
|
+
thread_id?: string | undefined;
|
|
2280
|
+
body_text?: string | undefined;
|
|
2281
|
+
subject?: string | undefined;
|
|
2282
|
+
body_html?: string | undefined;
|
|
2283
|
+
reply_to_message_id?: string | undefined;
|
|
2284
|
+
}, {
|
|
2285
|
+
thread_id?: string | undefined;
|
|
2286
|
+
body_text?: string | undefined;
|
|
2287
|
+
subject?: string | undefined;
|
|
2288
|
+
body_html?: string | undefined;
|
|
2289
|
+
reply_to_message_id?: string | undefined;
|
|
2290
|
+
}>>;
|
|
1957
2291
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
1958
2292
|
category: z.ZodLiteral<"utility">;
|
|
1959
2293
|
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2145,6 +2479,37 @@ export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2145
2479
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
2146
2480
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2147
2481
|
body_text: z.ZodOptional<z.ZodString>;
|
|
2482
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
2483
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2484
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
2485
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
2486
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
2487
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
2488
|
+
}, "strict", z.ZodTypeAny, {
|
|
2489
|
+
thread_id?: string | undefined;
|
|
2490
|
+
body_text?: string | undefined;
|
|
2491
|
+
subject?: string | undefined;
|
|
2492
|
+
body_html?: string | undefined;
|
|
2493
|
+
reply_to_message_id?: string | undefined;
|
|
2494
|
+
}, {
|
|
2495
|
+
thread_id?: string | undefined;
|
|
2496
|
+
body_text?: string | undefined;
|
|
2497
|
+
subject?: string | undefined;
|
|
2498
|
+
body_html?: string | undefined;
|
|
2499
|
+
reply_to_message_id?: string | undefined;
|
|
2500
|
+
}>, {
|
|
2501
|
+
thread_id?: string | undefined;
|
|
2502
|
+
body_text?: string | undefined;
|
|
2503
|
+
subject?: string | undefined;
|
|
2504
|
+
body_html?: string | undefined;
|
|
2505
|
+
reply_to_message_id?: string | undefined;
|
|
2506
|
+
}, {
|
|
2507
|
+
thread_id?: string | undefined;
|
|
2508
|
+
body_text?: string | undefined;
|
|
2509
|
+
subject?: string | undefined;
|
|
2510
|
+
body_html?: string | undefined;
|
|
2511
|
+
reply_to_message_id?: string | undefined;
|
|
2512
|
+
}>>;
|
|
2148
2513
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
2149
2514
|
category: z.ZodLiteral<"utility">;
|
|
2150
2515
|
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2336,6 +2701,37 @@ export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2336
2701
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
2337
2702
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2338
2703
|
body_text: z.ZodOptional<z.ZodString>;
|
|
2704
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
2705
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2706
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
2707
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
2708
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
2709
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
2710
|
+
}, "strict", z.ZodTypeAny, {
|
|
2711
|
+
thread_id?: string | undefined;
|
|
2712
|
+
body_text?: string | undefined;
|
|
2713
|
+
subject?: string | undefined;
|
|
2714
|
+
body_html?: string | undefined;
|
|
2715
|
+
reply_to_message_id?: string | undefined;
|
|
2716
|
+
}, {
|
|
2717
|
+
thread_id?: string | undefined;
|
|
2718
|
+
body_text?: string | undefined;
|
|
2719
|
+
subject?: string | undefined;
|
|
2720
|
+
body_html?: string | undefined;
|
|
2721
|
+
reply_to_message_id?: string | undefined;
|
|
2722
|
+
}>, {
|
|
2723
|
+
thread_id?: string | undefined;
|
|
2724
|
+
body_text?: string | undefined;
|
|
2725
|
+
subject?: string | undefined;
|
|
2726
|
+
body_html?: string | undefined;
|
|
2727
|
+
reply_to_message_id?: string | undefined;
|
|
2728
|
+
}, {
|
|
2729
|
+
thread_id?: string | undefined;
|
|
2730
|
+
body_text?: string | undefined;
|
|
2731
|
+
subject?: string | undefined;
|
|
2732
|
+
body_html?: string | undefined;
|
|
2733
|
+
reply_to_message_id?: string | undefined;
|
|
2734
|
+
}>>;
|
|
2339
2735
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
2340
2736
|
category: z.ZodLiteral<"utility">;
|
|
2341
2737
|
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2527,6 +2923,37 @@ export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2527
2923
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
2528
2924
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2529
2925
|
body_text: z.ZodOptional<z.ZodString>;
|
|
2926
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
2927
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
2928
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
2929
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
2930
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
2931
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
2932
|
+
}, "strict", z.ZodTypeAny, {
|
|
2933
|
+
thread_id?: string | undefined;
|
|
2934
|
+
body_text?: string | undefined;
|
|
2935
|
+
subject?: string | undefined;
|
|
2936
|
+
body_html?: string | undefined;
|
|
2937
|
+
reply_to_message_id?: string | undefined;
|
|
2938
|
+
}, {
|
|
2939
|
+
thread_id?: string | undefined;
|
|
2940
|
+
body_text?: string | undefined;
|
|
2941
|
+
subject?: string | undefined;
|
|
2942
|
+
body_html?: string | undefined;
|
|
2943
|
+
reply_to_message_id?: string | undefined;
|
|
2944
|
+
}>, {
|
|
2945
|
+
thread_id?: string | undefined;
|
|
2946
|
+
body_text?: string | undefined;
|
|
2947
|
+
subject?: string | undefined;
|
|
2948
|
+
body_html?: string | undefined;
|
|
2949
|
+
reply_to_message_id?: string | undefined;
|
|
2950
|
+
}, {
|
|
2951
|
+
thread_id?: string | undefined;
|
|
2952
|
+
body_text?: string | undefined;
|
|
2953
|
+
subject?: string | undefined;
|
|
2954
|
+
body_html?: string | undefined;
|
|
2955
|
+
reply_to_message_id?: string | undefined;
|
|
2956
|
+
}>>;
|
|
2530
2957
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
2531
2958
|
category: z.ZodLiteral<"utility">;
|
|
2532
2959
|
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2718,6 +3145,37 @@ export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2718
3145
|
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
2719
3146
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
2720
3147
|
body_text: z.ZodOptional<z.ZodString>;
|
|
3148
|
+
email: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
3149
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
3150
|
+
body_text: z.ZodOptional<z.ZodString>;
|
|
3151
|
+
body_html: z.ZodOptional<z.ZodString>;
|
|
3152
|
+
thread_id: z.ZodOptional<z.ZodString>;
|
|
3153
|
+
reply_to_message_id: z.ZodOptional<z.ZodString>;
|
|
3154
|
+
}, "strict", z.ZodTypeAny, {
|
|
3155
|
+
thread_id?: string | undefined;
|
|
3156
|
+
body_text?: string | undefined;
|
|
3157
|
+
subject?: string | undefined;
|
|
3158
|
+
body_html?: string | undefined;
|
|
3159
|
+
reply_to_message_id?: string | undefined;
|
|
3160
|
+
}, {
|
|
3161
|
+
thread_id?: string | undefined;
|
|
3162
|
+
body_text?: string | undefined;
|
|
3163
|
+
subject?: string | undefined;
|
|
3164
|
+
body_html?: string | undefined;
|
|
3165
|
+
reply_to_message_id?: string | undefined;
|
|
3166
|
+
}>, {
|
|
3167
|
+
thread_id?: string | undefined;
|
|
3168
|
+
body_text?: string | undefined;
|
|
3169
|
+
subject?: string | undefined;
|
|
3170
|
+
body_html?: string | undefined;
|
|
3171
|
+
reply_to_message_id?: string | undefined;
|
|
3172
|
+
}, {
|
|
3173
|
+
thread_id?: string | undefined;
|
|
3174
|
+
body_text?: string | undefined;
|
|
3175
|
+
subject?: string | undefined;
|
|
3176
|
+
body_html?: string | undefined;
|
|
3177
|
+
reply_to_message_id?: string | undefined;
|
|
3178
|
+
}>>;
|
|
2721
3179
|
direct_send: z.ZodOptional<z.ZodObject<{
|
|
2722
3180
|
category: z.ZodLiteral<"utility">;
|
|
2723
3181
|
ttl_seconds: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.zNexusDirectSendPayloadSchema = exports.zDirectSendPayloadSchema = exports.zNotificationAttachmentSchema = exports.NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES = exports.zNotificationDirectSendSchema = exports.zNotificationLogSchema = exports.zNotificationAttemptSchema = exports.zNotificationMessageSchema = exports.zEmailSmtpConfigSchema = exports.EMAIL_ATTACHMENT_TOTAL_MAX_BYTES = exports.zNotificationEmailContentSchema = 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");
|
|
@@ -78,6 +78,41 @@ exports.zNotificationErrorSchema = zod_1.z
|
|
|
78
78
|
details: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
79
79
|
})
|
|
80
80
|
.passthrough();
|
|
81
|
+
/** Human email content; plain text remains in the legacy top-level body_text. */
|
|
82
|
+
exports.zNotificationEmailContentSchema = zod_1.z
|
|
83
|
+
.object({
|
|
84
|
+
subject: zod_1.z.string().trim().min(1).max(998).optional(),
|
|
85
|
+
body_text: zod_1.z.string().optional(),
|
|
86
|
+
body_html: zod_1.z.string().optional(),
|
|
87
|
+
thread_id: zod_1.z.string().min(1).optional(),
|
|
88
|
+
reply_to_message_id: zod_1.z.string().min(1).optional(),
|
|
89
|
+
})
|
|
90
|
+
.strict()
|
|
91
|
+
.superRefine((data, ctx) => {
|
|
92
|
+
if (!data.reply_to_message_id && !data.subject) {
|
|
93
|
+
ctx.addIssue({
|
|
94
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
95
|
+
message: "Informe o assunto para iniciar uma nova conversa por email.",
|
|
96
|
+
path: ["subject"],
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
exports.EMAIL_ATTACHMENT_TOTAL_MAX_BYTES = 15 * 1024 * 1024;
|
|
101
|
+
exports.zEmailSmtpConfigSchema = zod_1.z
|
|
102
|
+
.object({
|
|
103
|
+
host: zod_1.z.string(),
|
|
104
|
+
port: zod_1.z.number(),
|
|
105
|
+
secure: zod_1.z.boolean(),
|
|
106
|
+
username: zod_1.z.string(),
|
|
107
|
+
password_secret_ref: zod_1.z.string(),
|
|
108
|
+
max_attachment_total_bytes: zod_1.z
|
|
109
|
+
.number()
|
|
110
|
+
.int()
|
|
111
|
+
.positive()
|
|
112
|
+
.max(exports.EMAIL_ATTACHMENT_TOTAL_MAX_BYTES)
|
|
113
|
+
.optional(),
|
|
114
|
+
})
|
|
115
|
+
.passthrough();
|
|
81
116
|
// ---- Main document schemas ----
|
|
82
117
|
exports.zNotificationMessageSchema = zod_schemas_1.zFireDocSchema
|
|
83
118
|
.extend({
|
|
@@ -90,6 +125,7 @@ exports.zNotificationMessageSchema = zod_schemas_1.zFireDocSchema
|
|
|
90
125
|
channel: exports.zNotificationChannelRefSchema,
|
|
91
126
|
template: exports.zNotificationTemplateRefSchema.optional(),
|
|
92
127
|
body_text: zod_1.z.string().max(4096).optional(),
|
|
128
|
+
email: exports.zNotificationEmailContentSchema.optional(),
|
|
93
129
|
recipient: exports.zNotificationRecipientSchema,
|
|
94
130
|
variables: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
95
131
|
status: exports.zNotificationMessageStatusSchema,
|
|
@@ -160,6 +196,7 @@ exports.zDirectSendPayloadSchema = zod_1.z
|
|
|
160
196
|
recipient: exports.zNotificationRecipientSchema,
|
|
161
197
|
channel: exports.zNotificationChannelRefSchema,
|
|
162
198
|
template: exports.zNotificationTemplateRefSchema.optional(),
|
|
199
|
+
email: exports.zNotificationEmailContentSchema.optional(),
|
|
163
200
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
164
201
|
body_text: zod_1.z.string().max(4096).optional(),
|
|
165
202
|
direct_send: exports.zNotificationDirectSendSchema.optional(),
|
|
@@ -219,6 +256,7 @@ exports.zNexusDirectSendPayloadSchema = zod_1.z
|
|
|
219
256
|
channel: exports.zNotificationChannelRefSchema,
|
|
220
257
|
template: exports.zNotificationTemplateRefSchema.optional(),
|
|
221
258
|
body_text: zod_1.z.string().max(4096).optional(),
|
|
259
|
+
email: exports.zNotificationEmailContentSchema.optional(),
|
|
222
260
|
direct_send: exports.zNotificationDirectSendSchema.optional(),
|
|
223
261
|
variables: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
224
262
|
routine: zod_1.z
|
|
@@ -88,6 +88,44 @@ export const zNotificationErrorSchema = z
|
|
|
88
88
|
})
|
|
89
89
|
.passthrough();
|
|
90
90
|
|
|
91
|
+
/** Human email content; plain text remains in the legacy top-level body_text. */
|
|
92
|
+
export const zNotificationEmailContentSchema = z
|
|
93
|
+
.object({
|
|
94
|
+
subject: z.string().trim().min(1).max(998).optional(),
|
|
95
|
+
body_text: z.string().optional(),
|
|
96
|
+
body_html: z.string().optional(),
|
|
97
|
+
thread_id: z.string().min(1).optional(),
|
|
98
|
+
reply_to_message_id: z.string().min(1).optional(),
|
|
99
|
+
})
|
|
100
|
+
.strict()
|
|
101
|
+
.superRefine((data, ctx) => {
|
|
102
|
+
if (!data.reply_to_message_id && !data.subject) {
|
|
103
|
+
ctx.addIssue({
|
|
104
|
+
code: z.ZodIssueCode.custom,
|
|
105
|
+
message: "Informe o assunto para iniciar uma nova conversa por email.",
|
|
106
|
+
path: ["subject"],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export const EMAIL_ATTACHMENT_TOTAL_MAX_BYTES = 15 * 1024 * 1024;
|
|
112
|
+
|
|
113
|
+
export const zEmailSmtpConfigSchema = z
|
|
114
|
+
.object({
|
|
115
|
+
host: z.string(),
|
|
116
|
+
port: z.number(),
|
|
117
|
+
secure: z.boolean(),
|
|
118
|
+
username: z.string(),
|
|
119
|
+
password_secret_ref: z.string(),
|
|
120
|
+
max_attachment_total_bytes: z
|
|
121
|
+
.number()
|
|
122
|
+
.int()
|
|
123
|
+
.positive()
|
|
124
|
+
.max(EMAIL_ATTACHMENT_TOTAL_MAX_BYTES)
|
|
125
|
+
.optional(),
|
|
126
|
+
})
|
|
127
|
+
.passthrough();
|
|
128
|
+
|
|
91
129
|
// ---- Main document schemas ----
|
|
92
130
|
|
|
93
131
|
export const zNotificationMessageSchema = zFireDocSchema
|
|
@@ -101,6 +139,7 @@ export const zNotificationMessageSchema = zFireDocSchema
|
|
|
101
139
|
channel: zNotificationChannelRefSchema,
|
|
102
140
|
template: zNotificationTemplateRefSchema.optional(),
|
|
103
141
|
body_text: z.string().max(4096).optional(),
|
|
142
|
+
email: zNotificationEmailContentSchema.optional(),
|
|
104
143
|
recipient: zNotificationRecipientSchema,
|
|
105
144
|
variables: z.record(z.unknown()).optional(),
|
|
106
145
|
status: zNotificationMessageStatusSchema,
|
|
@@ -179,6 +218,7 @@ export const zDirectSendPayloadSchema = z
|
|
|
179
218
|
recipient: zNotificationRecipientSchema,
|
|
180
219
|
channel: zNotificationChannelRefSchema,
|
|
181
220
|
template: zNotificationTemplateRefSchema.optional(),
|
|
221
|
+
email: zNotificationEmailContentSchema.optional(),
|
|
182
222
|
/** WhatsApp session text (no HSM). Max length per Meta. */
|
|
183
223
|
body_text: z.string().max(4096).optional(),
|
|
184
224
|
direct_send: zNotificationDirectSendSchema.optional(),
|
|
@@ -244,6 +284,7 @@ export const zNexusDirectSendPayloadSchema = z
|
|
|
244
284
|
channel: zNotificationChannelRefSchema,
|
|
245
285
|
template: zNotificationTemplateRefSchema.optional(),
|
|
246
286
|
body_text: z.string().max(4096).optional(),
|
|
287
|
+
email: zNotificationEmailContentSchema.optional(),
|
|
247
288
|
direct_send: zNotificationDirectSendSchema.optional(),
|
|
248
289
|
variables: z.record(z.unknown()).optional(),
|
|
249
290
|
routine: z
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsaasAccessTokenStatus, AsaasAccountStatusValue, AsaasEnvironment, AsaasKycNotificationTrigger, AsaasOnboardingNextAction, IAsaasCommercialInfoExpiration } from "./asaas_provider";
|
|
1
|
+
import { AsaasAccessTokenStatus, AsaasAccountStatusValue, AsaasEnvironment, AsaasKycNotificationTrigger, AsaasOnboardingNextAction, AsaasSubaccountModel, IAsaasCommercialInfoExpiration } from "./asaas_provider";
|
|
2
2
|
/** Tópico Pub/Sub dos pedidos de aviso de KYC (publicado pelo functions-app). */
|
|
3
3
|
export declare const FINOPS_ASAAS_KYC_NOTIFY_TOPIC = "app_evo-finops_asaas-kyc_notify-requested";
|
|
4
4
|
/** Gatilho do aviso: os de KYC + alerta de chave de API (destinado ao staff). */
|
|
@@ -60,4 +60,10 @@ export interface INexKycQueueItem {
|
|
|
60
60
|
last_error?: {
|
|
61
61
|
code?: string | null;
|
|
62
62
|
} | null;
|
|
63
|
+
/** feat-275 T19 — `baas` ou `legacy` (campo ausente no provider = legada). */
|
|
64
|
+
account_model?: AsaasSubaccountModel;
|
|
65
|
+
/** feat-275 T19 — provider removido da plataforma (exclusão lógica); ISO datetime. */
|
|
66
|
+
deleted_at?: string | null;
|
|
67
|
+
/** feat-275 T19 — conta encerrada no Asaas pela fila (irreversível); ISO datetime. */
|
|
68
|
+
asaas_closed_at?: string | null;
|
|
63
69
|
}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
AsaasEnvironment,
|
|
15
15
|
AsaasKycNotificationTrigger,
|
|
16
16
|
AsaasOnboardingNextAction,
|
|
17
|
+
AsaasSubaccountModel,
|
|
17
18
|
IAsaasCommercialInfoExpiration,
|
|
18
19
|
} from "./asaas_provider";
|
|
19
20
|
|
|
@@ -82,4 +83,10 @@ export interface INexKycQueueItem {
|
|
|
82
83
|
commercial_info_expiration?: IAsaasCommercialInfoExpiration | null;
|
|
83
84
|
access_token_meta?: INexKycQueueAccessTokenSummary | null;
|
|
84
85
|
last_error?: { code?: string | null } | null;
|
|
86
|
+
/** feat-275 T19 — `baas` ou `legacy` (campo ausente no provider = legada). */
|
|
87
|
+
account_model?: AsaasSubaccountModel;
|
|
88
|
+
/** feat-275 T19 — provider removido da plataforma (exclusão lógica); ISO datetime. */
|
|
89
|
+
deleted_at?: string | null;
|
|
90
|
+
/** feat-275 T19 — conta encerrada no Asaas pela fila (irreversível); ISO datetime. */
|
|
91
|
+
asaas_closed_at?: string | null;
|
|
85
92
|
}
|
|
@@ -72,8 +72,16 @@ export interface IAsaasWebhookConfig {
|
|
|
72
72
|
details?: unknown;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* feat-275 — modelo da subconta no Asaas. `baas`: onboarding na plataforma, sem acesso ao painel
|
|
77
|
+
* do Asaas. `legacy`: subconta padrão (o titular usa o painel). Gravado só nas criadas a partir da
|
|
78
|
+
* feat-275; campo ausente = `legacy`.
|
|
79
|
+
*/
|
|
80
|
+
export type AsaasSubaccountModel = "baas" | "legacy";
|
|
75
81
|
export interface IAsaasAccountScope {
|
|
76
82
|
mode: AsaasAccountScopeMode;
|
|
83
|
+
/** feat-275 — só em subconta criada pela plataforma após a homologação BaaS; ausente = legada. */
|
|
84
|
+
account_model?: AsaasSubaccountModel;
|
|
77
85
|
asaas_account_id?: string;
|
|
78
86
|
owner_asaas_account_id?: string;
|
|
79
87
|
wallet_id?: string;
|
|
@@ -98,9 +98,19 @@ export interface IAsaasWebhookConfig {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* feat-275 — modelo da subconta no Asaas. `baas`: onboarding na plataforma, sem acesso ao painel
|
|
103
|
+
* do Asaas. `legacy`: subconta padrão (o titular usa o painel). Gravado só nas criadas a partir da
|
|
104
|
+
* feat-275; campo ausente = `legacy`.
|
|
105
|
+
*/
|
|
106
|
+
export type AsaasSubaccountModel = "baas" | "legacy";
|
|
107
|
+
|
|
101
108
|
export interface IAsaasAccountScope {
|
|
102
109
|
mode: AsaasAccountScopeMode;
|
|
103
110
|
|
|
111
|
+
/** feat-275 — só em subconta criada pela plataforma após a homologação BaaS; ausente = legada. */
|
|
112
|
+
account_model?: AsaasSubaccountModel;
|
|
113
|
+
|
|
104
114
|
// Some flows may require “accountId” context.
|
|
105
115
|
// Keep it optional but available per environment.
|
|
106
116
|
asaas_account_id?: string;
|
|
@@ -137,6 +137,25 @@ export interface INotificationAttachment {
|
|
|
137
137
|
/** Conteúdo em base64. <= 64 KB já codificado. */
|
|
138
138
|
content_base64: string;
|
|
139
139
|
}
|
|
140
|
+
/** Campos compartilhados pelo conteúdo de email novo e de resposta. */
|
|
141
|
+
interface INotificationEmailContentBase {
|
|
142
|
+
/** Versões textuais do corpo livre. */
|
|
143
|
+
body_text?: string;
|
|
144
|
+
body_html?: string;
|
|
145
|
+
/** Identificador interno da conversa Hub-Omni. */
|
|
146
|
+
thread_id?: string;
|
|
147
|
+
}
|
|
148
|
+
/** Conteúdo de email humano. Replies podem reutilizar o assunto persistido. */
|
|
149
|
+
export type INotificationEmailContent = (INotificationEmailContentBase & {
|
|
150
|
+
/** Obrigatório ao iniciar uma conversa. */
|
|
151
|
+
subject: string;
|
|
152
|
+
reply_to_message_id?: never;
|
|
153
|
+
}) | (INotificationEmailContentBase & {
|
|
154
|
+
/** Opcional na resposta: o backend reutiliza o assunto da conversa. */
|
|
155
|
+
subject?: string;
|
|
156
|
+
/** ID interno Hub-Omni da mensagem respondida; headers derivam no backend. */
|
|
157
|
+
reply_to_message_id: string;
|
|
158
|
+
});
|
|
140
159
|
export interface INotificationSendPayload {
|
|
141
160
|
kind: "notification.send";
|
|
142
161
|
classification?: string;
|
|
@@ -145,6 +164,8 @@ export interface INotificationSendPayload {
|
|
|
145
164
|
channel: INotificationChannelRef;
|
|
146
165
|
template?: INotificationTemplateRef;
|
|
147
166
|
variables?: Record<string, unknown>;
|
|
167
|
+
/** Dados de email livre. Para payloads humanos, subject é obrigatório. */
|
|
168
|
+
email?: INotificationEmailContent;
|
|
148
169
|
/**
|
|
149
170
|
* WhatsApp (sessão): texto livre enviado via Hermes `type: text` (sem HSM).
|
|
150
171
|
* Mutuamente exclusivo com `template.template_id` para `channel.type === 'whatsapp'`.
|
|
@@ -195,6 +216,8 @@ export interface INotificationMessage extends IFireDoc {
|
|
|
195
216
|
template?: INotificationTemplateRef;
|
|
196
217
|
/** Snapshot quando o envio foi texto de sessão WhatsApp (sem template). */
|
|
197
218
|
body_text?: string;
|
|
219
|
+
/** Snapshot do assunto/HTML/threading de envios humanos por email. */
|
|
220
|
+
email?: INotificationEmailContent;
|
|
198
221
|
recipient: INotificationRecipient;
|
|
199
222
|
variables?: Record<string, unknown>;
|
|
200
223
|
status: NotificationMessageStatus;
|
|
@@ -246,6 +269,8 @@ export interface IEmailSmtpConfig {
|
|
|
246
269
|
* Formato: 'projects/{projectId}/secrets/{secretId}/versions/latest'
|
|
247
270
|
*/
|
|
248
271
|
password_secret_ref: string;
|
|
272
|
+
/** Limite opcional do total de anexos por mensagem, em bytes. */
|
|
273
|
+
max_attachment_total_bytes?: number;
|
|
249
274
|
}
|
|
250
275
|
/**
|
|
251
276
|
* Provider de transporte do canal de email.
|
|
@@ -222,6 +222,29 @@ export interface INotificationAttachment {
|
|
|
222
222
|
content_base64: string;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
/** Campos compartilhados pelo conteúdo de email novo e de resposta. */
|
|
226
|
+
interface INotificationEmailContentBase {
|
|
227
|
+
/** Versões textuais do corpo livre. */
|
|
228
|
+
body_text?: string;
|
|
229
|
+
body_html?: string;
|
|
230
|
+
/** Identificador interno da conversa Hub-Omni. */
|
|
231
|
+
thread_id?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Conteúdo de email humano. Replies podem reutilizar o assunto persistido. */
|
|
235
|
+
export type INotificationEmailContent =
|
|
236
|
+
| (INotificationEmailContentBase & {
|
|
237
|
+
/** Obrigatório ao iniciar uma conversa. */
|
|
238
|
+
subject: string;
|
|
239
|
+
reply_to_message_id?: never;
|
|
240
|
+
})
|
|
241
|
+
| (INotificationEmailContentBase & {
|
|
242
|
+
/** Opcional na resposta: o backend reutiliza o assunto da conversa. */
|
|
243
|
+
subject?: string;
|
|
244
|
+
/** ID interno Hub-Omni da mensagem respondida; headers derivam no backend. */
|
|
245
|
+
reply_to_message_id: string;
|
|
246
|
+
});
|
|
247
|
+
|
|
225
248
|
export interface INotificationSendPayload {
|
|
226
249
|
kind: "notification.send";
|
|
227
250
|
|
|
@@ -237,6 +260,9 @@ export interface INotificationSendPayload {
|
|
|
237
260
|
template?: INotificationTemplateRef;
|
|
238
261
|
variables?: Record<string, unknown>; // resolved upstream (Automation Hub / Task Runner)
|
|
239
262
|
|
|
263
|
+
/** Dados de email livre. Para payloads humanos, subject é obrigatório. */
|
|
264
|
+
email?: INotificationEmailContent;
|
|
265
|
+
|
|
240
266
|
/**
|
|
241
267
|
* WhatsApp (sessão): texto livre enviado via Hermes `type: text` (sem HSM).
|
|
242
268
|
* Mutuamente exclusivo com `template.template_id` para `channel.type === 'whatsapp'`.
|
|
@@ -313,6 +339,8 @@ export interface INotificationMessage extends IFireDoc {
|
|
|
313
339
|
template?: INotificationTemplateRef;
|
|
314
340
|
/** Snapshot quando o envio foi texto de sessão WhatsApp (sem template). */
|
|
315
341
|
body_text?: string;
|
|
342
|
+
/** Snapshot do assunto/HTML/threading de envios humanos por email. */
|
|
343
|
+
email?: INotificationEmailContent;
|
|
316
344
|
|
|
317
345
|
// Recipient snapshot
|
|
318
346
|
recipient: INotificationRecipient;
|
|
@@ -394,6 +422,8 @@ export interface IEmailSmtpConfig {
|
|
|
394
422
|
* Formato: 'projects/{projectId}/secrets/{secretId}/versions/latest'
|
|
395
423
|
*/
|
|
396
424
|
password_secret_ref: string;
|
|
425
|
+
/** Limite opcional do total de anexos por mensagem, em bytes. */
|
|
426
|
+
max_attachment_total_bytes?: number;
|
|
397
427
|
}
|
|
398
428
|
|
|
399
429
|
/**
|