evo360-types 1.3.705 → 1.3.711

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.
@@ -2344,7 +2344,7 @@ export declare const zCsqAppointmentEventSchema: z.ZodObject<{
2344
2344
  }>, "many">;
2345
2345
  supersedes: z.ZodOptional<z.ZodString>;
2346
2346
  }, "strip", z.ZodTypeAny, {
2347
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
2347
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
2348
2348
  actor: "automation" | "lead" | "hubia" | "attendant";
2349
2349
  evidence: {
2350
2350
  message_id: string;
@@ -2359,7 +2359,7 @@ export declare const zCsqAppointmentEventSchema: z.ZodObject<{
2359
2359
  modality?: string | undefined;
2360
2360
  supersedes?: string | undefined;
2361
2361
  }, {
2362
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
2362
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
2363
2363
  actor: "automation" | "lead" | "hubia" | "attendant";
2364
2364
  evidence: {
2365
2365
  message_id: string;
@@ -2447,7 +2447,7 @@ export declare const zCsqDetectorReportSchema: z.ZodObject<{
2447
2447
  }>, "many">;
2448
2448
  supersedes: z.ZodOptional<z.ZodString>;
2449
2449
  }, "strip", z.ZodTypeAny, {
2450
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
2450
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
2451
2451
  actor: "automation" | "lead" | "hubia" | "attendant";
2452
2452
  evidence: {
2453
2453
  message_id: string;
@@ -2462,7 +2462,7 @@ export declare const zCsqDetectorReportSchema: z.ZodObject<{
2462
2462
  modality?: string | undefined;
2463
2463
  supersedes?: string | undefined;
2464
2464
  }, {
2465
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
2465
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
2466
2466
  actor: "automation" | "lead" | "hubia" | "attendant";
2467
2467
  evidence: {
2468
2468
  message_id: string;
@@ -2538,7 +2538,7 @@ export declare const zCsqDetectorReportSchema: z.ZodObject<{
2538
2538
  } | null | undefined;
2539
2539
  time_mismatch?: number | undefined;
2540
2540
  event_list?: {
2541
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
2541
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
2542
2542
  actor: "automation" | "lead" | "hubia" | "attendant";
2543
2543
  evidence: {
2544
2544
  message_id: string;
@@ -2579,7 +2579,7 @@ export declare const zCsqDetectorReportSchema: z.ZodObject<{
2579
2579
  } | null | undefined;
2580
2580
  time_mismatch?: number | undefined;
2581
2581
  event_list?: {
2582
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
2582
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
2583
2583
  actor: "automation" | "lead" | "hubia" | "attendant";
2584
2584
  evidence: {
2585
2585
  message_id: string;
@@ -7594,7 +7594,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7594
7594
  }>, "many">;
7595
7595
  supersedes: z.ZodOptional<z.ZodString>;
7596
7596
  }, "strip", z.ZodTypeAny, {
7597
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
7597
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
7598
7598
  actor: "automation" | "lead" | "hubia" | "attendant";
7599
7599
  evidence: {
7600
7600
  message_id: string;
@@ -7609,7 +7609,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7609
7609
  modality?: string | undefined;
7610
7610
  supersedes?: string | undefined;
7611
7611
  }, {
7612
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
7612
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
7613
7613
  actor: "automation" | "lead" | "hubia" | "attendant";
7614
7614
  evidence: {
7615
7615
  message_id: string;
@@ -7685,7 +7685,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7685
7685
  } | null | undefined;
7686
7686
  time_mismatch?: number | undefined;
7687
7687
  event_list?: {
7688
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
7688
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
7689
7689
  actor: "automation" | "lead" | "hubia" | "attendant";
7690
7690
  evidence: {
7691
7691
  message_id: string;
@@ -7726,7 +7726,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
7726
7726
  } | null | undefined;
7727
7727
  time_mismatch?: number | undefined;
7728
7728
  event_list?: {
7729
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
7729
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
7730
7730
  actor: "automation" | "lead" | "hubia" | "attendant";
7731
7731
  evidence: {
7732
7732
  message_id: string;
@@ -10051,7 +10051,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10051
10051
  }>, "many">;
10052
10052
  supersedes: z.ZodOptional<z.ZodString>;
10053
10053
  }, "strip", z.ZodTypeAny, {
10054
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
10054
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
10055
10055
  actor: "automation" | "lead" | "hubia" | "attendant";
10056
10056
  evidence: {
10057
10057
  message_id: string;
@@ -10066,7 +10066,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10066
10066
  modality?: string | undefined;
10067
10067
  supersedes?: string | undefined;
10068
10068
  }, {
10069
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
10069
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
10070
10070
  actor: "automation" | "lead" | "hubia" | "attendant";
10071
10071
  evidence: {
10072
10072
  message_id: string;
@@ -10142,7 +10142,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10142
10142
  } | null | undefined;
10143
10143
  time_mismatch?: number | undefined;
10144
10144
  event_list?: {
10145
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
10145
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
10146
10146
  actor: "automation" | "lead" | "hubia" | "attendant";
10147
10147
  evidence: {
10148
10148
  message_id: string;
@@ -10183,7 +10183,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
10183
10183
  } | null | undefined;
10184
10184
  time_mismatch?: number | undefined;
10185
10185
  event_list?: {
10186
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
10186
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
10187
10187
  actor: "automation" | "lead" | "hubia" | "attendant";
10188
10188
  evidence: {
10189
10189
  message_id: string;
@@ -12508,7 +12508,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
12508
12508
  }>, "many">;
12509
12509
  supersedes: z.ZodOptional<z.ZodString>;
12510
12510
  }, "strip", z.ZodTypeAny, {
12511
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
12511
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
12512
12512
  actor: "automation" | "lead" | "hubia" | "attendant";
12513
12513
  evidence: {
12514
12514
  message_id: string;
@@ -12523,7 +12523,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
12523
12523
  modality?: string | undefined;
12524
12524
  supersedes?: string | undefined;
12525
12525
  }, {
12526
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
12526
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
12527
12527
  actor: "automation" | "lead" | "hubia" | "attendant";
12528
12528
  evidence: {
12529
12529
  message_id: string;
@@ -12599,7 +12599,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
12599
12599
  } | null | undefined;
12600
12600
  time_mismatch?: number | undefined;
12601
12601
  event_list?: {
12602
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
12602
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
12603
12603
  actor: "automation" | "lead" | "hubia" | "attendant";
12604
12604
  evidence: {
12605
12605
  message_id: string;
@@ -12640,7 +12640,7 @@ export declare const zCsqLeadReportSchema: z.ZodObject<{
12640
12640
  } | null | undefined;
12641
12641
  time_mismatch?: number | undefined;
12642
12642
  event_list?: {
12643
- kind: "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested" | "appointment_cancelled";
12643
+ kind: "appointment_cancelled" | "slot_offered" | "slot_accepted" | "appointment_confirmed" | "reschedule_requested";
12644
12644
  actor: "automation" | "lead" | "hubia" | "attendant";
12645
12645
  evidence: {
12646
12646
  message_id: string;
@@ -1021,6 +1021,61 @@ export declare const zNotificationAttachmentSchema: z.ZodObject<{
1021
1021
  content_type: z.ZodString;
1022
1022
  content_base64: z.ZodString;
1023
1023
  }, z.ZodTypeAny, "passthrough">>;
1024
+ export declare const NOTIFICATION_EMAIL_ATTACHMENT_MAX_COUNT = 10;
1025
+ export declare const NOTIFICATION_EMAIL_ATTACHMENT_MAX_BYTES: number;
1026
+ /** Inline (base64) continua limitado a 1 por mensagem: ele vive no doc da task e da mensagem. */
1027
+ export declare const NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT = 1;
1028
+ export declare const zNotificationAttachmentRefSchema: z.ZodObject<{
1029
+ filename: z.ZodString;
1030
+ content_type: z.ZodString;
1031
+ size_bytes: z.ZodOptional<z.ZodNumber>;
1032
+ gcs_uri: z.ZodString;
1033
+ }, "strict", z.ZodTypeAny, {
1034
+ filename: string;
1035
+ gcs_uri: string;
1036
+ content_type: string;
1037
+ size_bytes?: number | undefined;
1038
+ }, {
1039
+ filename: string;
1040
+ gcs_uri: string;
1041
+ content_type: string;
1042
+ size_bytes?: number | undefined;
1043
+ }>;
1044
+ /** Item de `attachments[]` do envio: inline legado OU referência (`gcs_uri`). */
1045
+ export declare const zNotificationAttachmentInputSchema: z.ZodUnion<[z.ZodObject<{
1046
+ filename: z.ZodString;
1047
+ content_type: z.ZodString;
1048
+ size_bytes: z.ZodOptional<z.ZodNumber>;
1049
+ gcs_uri: z.ZodString;
1050
+ }, "strict", z.ZodTypeAny, {
1051
+ filename: string;
1052
+ gcs_uri: string;
1053
+ content_type: string;
1054
+ size_bytes?: number | undefined;
1055
+ }, {
1056
+ filename: string;
1057
+ gcs_uri: string;
1058
+ content_type: string;
1059
+ size_bytes?: number | undefined;
1060
+ }>, z.ZodObject<{
1061
+ filename: z.ZodString;
1062
+ content_type: z.ZodString;
1063
+ content_base64: z.ZodString;
1064
+ } & {
1065
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1066
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1067
+ filename: z.ZodString;
1068
+ content_type: z.ZodString;
1069
+ content_base64: z.ZodString;
1070
+ } & {
1071
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1072
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1073
+ filename: z.ZodString;
1074
+ content_type: z.ZodString;
1075
+ content_base64: z.ZodString;
1076
+ } & {
1077
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1078
+ }, z.ZodTypeAny, "passthrough">>]>;
1024
1079
  export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
1025
1080
  tenant: z.ZodString;
1026
1081
  kind: z.ZodLiteral<"notification.send">;
@@ -1245,19 +1300,40 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
1245
1300
  expires_at: z.ZodOptional<z.ZodDate>;
1246
1301
  url_secret: z.ZodOptional<z.ZodString>;
1247
1302
  }, z.ZodTypeAny, "passthrough">>, "many">>;
1248
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1303
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1304
+ filename: z.ZodString;
1305
+ content_type: z.ZodString;
1306
+ size_bytes: z.ZodOptional<z.ZodNumber>;
1307
+ gcs_uri: z.ZodString;
1308
+ }, "strict", z.ZodTypeAny, {
1309
+ filename: string;
1310
+ gcs_uri: string;
1311
+ content_type: string;
1312
+ size_bytes?: number | undefined;
1313
+ }, {
1314
+ filename: string;
1315
+ gcs_uri: string;
1316
+ content_type: string;
1317
+ size_bytes?: number | undefined;
1318
+ }>, z.ZodObject<{
1249
1319
  filename: z.ZodString;
1250
1320
  content_type: z.ZodString;
1251
1321
  content_base64: z.ZodString;
1322
+ } & {
1323
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1252
1324
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1253
1325
  filename: z.ZodString;
1254
1326
  content_type: z.ZodString;
1255
1327
  content_base64: z.ZodString;
1328
+ } & {
1329
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1256
1330
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1257
1331
  filename: z.ZodString;
1258
1332
  content_type: z.ZodString;
1259
1333
  content_base64: z.ZodString;
1260
- }, z.ZodTypeAny, "passthrough">>, "many">>;
1334
+ } & {
1335
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1336
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
1261
1337
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1262
1338
  tenant: z.ZodString;
1263
1339
  kind: z.ZodLiteral<"notification.send">;
@@ -1482,19 +1558,40 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
1482
1558
  expires_at: z.ZodOptional<z.ZodDate>;
1483
1559
  url_secret: z.ZodOptional<z.ZodString>;
1484
1560
  }, z.ZodTypeAny, "passthrough">>, "many">>;
1485
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1561
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1562
+ filename: z.ZodString;
1563
+ content_type: z.ZodString;
1564
+ size_bytes: z.ZodOptional<z.ZodNumber>;
1565
+ gcs_uri: z.ZodString;
1566
+ }, "strict", z.ZodTypeAny, {
1567
+ filename: string;
1568
+ gcs_uri: string;
1569
+ content_type: string;
1570
+ size_bytes?: number | undefined;
1571
+ }, {
1572
+ filename: string;
1573
+ gcs_uri: string;
1574
+ content_type: string;
1575
+ size_bytes?: number | undefined;
1576
+ }>, z.ZodObject<{
1486
1577
  filename: z.ZodString;
1487
1578
  content_type: z.ZodString;
1488
1579
  content_base64: z.ZodString;
1580
+ } & {
1581
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1489
1582
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1490
1583
  filename: z.ZodString;
1491
1584
  content_type: z.ZodString;
1492
1585
  content_base64: z.ZodString;
1586
+ } & {
1587
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1493
1588
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1494
1589
  filename: z.ZodString;
1495
1590
  content_type: z.ZodString;
1496
1591
  content_base64: z.ZodString;
1497
- }, z.ZodTypeAny, "passthrough">>, "many">>;
1592
+ } & {
1593
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1594
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
1498
1595
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1499
1596
  tenant: z.ZodString;
1500
1597
  kind: z.ZodLiteral<"notification.send">;
@@ -1719,19 +1816,40 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
1719
1816
  expires_at: z.ZodOptional<z.ZodDate>;
1720
1817
  url_secret: z.ZodOptional<z.ZodString>;
1721
1818
  }, z.ZodTypeAny, "passthrough">>, "many">>;
1722
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1819
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
1820
+ filename: z.ZodString;
1821
+ content_type: z.ZodString;
1822
+ size_bytes: z.ZodOptional<z.ZodNumber>;
1823
+ gcs_uri: z.ZodString;
1824
+ }, "strict", z.ZodTypeAny, {
1825
+ filename: string;
1826
+ gcs_uri: string;
1827
+ content_type: string;
1828
+ size_bytes?: number | undefined;
1829
+ }, {
1830
+ filename: string;
1831
+ gcs_uri: string;
1832
+ content_type: string;
1833
+ size_bytes?: number | undefined;
1834
+ }>, z.ZodObject<{
1723
1835
  filename: z.ZodString;
1724
1836
  content_type: z.ZodString;
1725
1837
  content_base64: z.ZodString;
1838
+ } & {
1839
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1726
1840
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1727
1841
  filename: z.ZodString;
1728
1842
  content_type: z.ZodString;
1729
1843
  content_base64: z.ZodString;
1844
+ } & {
1845
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1730
1846
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1731
1847
  filename: z.ZodString;
1732
1848
  content_type: z.ZodString;
1733
1849
  content_base64: z.ZodString;
1734
- }, z.ZodTypeAny, "passthrough">>, "many">>;
1850
+ } & {
1851
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1852
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
1735
1853
  }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
1736
1854
  tenant: z.ZodString;
1737
1855
  kind: z.ZodLiteral<"notification.send">;
@@ -1956,19 +2074,40 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
1956
2074
  expires_at: z.ZodOptional<z.ZodDate>;
1957
2075
  url_secret: z.ZodOptional<z.ZodString>;
1958
2076
  }, z.ZodTypeAny, "passthrough">>, "many">>;
1959
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
2077
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
2078
+ filename: z.ZodString;
2079
+ content_type: z.ZodString;
2080
+ size_bytes: z.ZodOptional<z.ZodNumber>;
2081
+ gcs_uri: z.ZodString;
2082
+ }, "strict", z.ZodTypeAny, {
2083
+ filename: string;
2084
+ gcs_uri: string;
2085
+ content_type: string;
2086
+ size_bytes?: number | undefined;
2087
+ }, {
2088
+ filename: string;
2089
+ gcs_uri: string;
2090
+ content_type: string;
2091
+ size_bytes?: number | undefined;
2092
+ }>, z.ZodObject<{
1960
2093
  filename: z.ZodString;
1961
2094
  content_type: z.ZodString;
1962
2095
  content_base64: z.ZodString;
2096
+ } & {
2097
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1963
2098
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1964
2099
  filename: z.ZodString;
1965
2100
  content_type: z.ZodString;
1966
2101
  content_base64: z.ZodString;
2102
+ } & {
2103
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
1967
2104
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1968
2105
  filename: z.ZodString;
1969
2106
  content_type: z.ZodString;
1970
2107
  content_base64: z.ZodString;
1971
- }, z.ZodTypeAny, "passthrough">>, "many">>;
2108
+ } & {
2109
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
2110
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
1972
2111
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1973
2112
  tenant: z.ZodString;
1974
2113
  kind: z.ZodLiteral<"notification.send">;
@@ -2193,19 +2332,40 @@ export declare const zDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
2193
2332
  expires_at: z.ZodOptional<z.ZodDate>;
2194
2333
  url_secret: z.ZodOptional<z.ZodString>;
2195
2334
  }, z.ZodTypeAny, "passthrough">>, "many">>;
2196
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
2335
+ attachments: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
2336
+ filename: z.ZodString;
2337
+ content_type: z.ZodString;
2338
+ size_bytes: z.ZodOptional<z.ZodNumber>;
2339
+ gcs_uri: z.ZodString;
2340
+ }, "strict", z.ZodTypeAny, {
2341
+ filename: string;
2342
+ gcs_uri: string;
2343
+ content_type: string;
2344
+ size_bytes?: number | undefined;
2345
+ }, {
2346
+ filename: string;
2347
+ gcs_uri: string;
2348
+ content_type: string;
2349
+ size_bytes?: number | undefined;
2350
+ }>, z.ZodObject<{
2197
2351
  filename: z.ZodString;
2198
2352
  content_type: z.ZodString;
2199
2353
  content_base64: z.ZodString;
2354
+ } & {
2355
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
2200
2356
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2201
2357
  filename: z.ZodString;
2202
2358
  content_type: z.ZodString;
2203
2359
  content_base64: z.ZodString;
2360
+ } & {
2361
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
2204
2362
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2205
2363
  filename: z.ZodString;
2206
2364
  content_type: z.ZodString;
2207
2365
  content_base64: z.ZodString;
2208
- }, z.ZodTypeAny, "passthrough">>, "many">>;
2366
+ } & {
2367
+ gcs_uri: z.ZodOptional<z.ZodUndefined>;
2368
+ }, z.ZodTypeAny, "passthrough">>]>, "many">>;
2209
2369
  }, z.ZodTypeAny, "passthrough">>;
2210
2370
  export declare const zNexusDirectSendPayloadSchema: z.ZodEffects<z.ZodObject<{
2211
2371
  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.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;
3
+ exports.zNexusDirectSendPayloadSchema = exports.zDirectSendPayloadSchema = exports.zNotificationAttachmentInputSchema = exports.zNotificationAttachmentRefSchema = exports.NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT = exports.NOTIFICATION_EMAIL_ATTACHMENT_MAX_BYTES = exports.NOTIFICATION_EMAIL_ATTACHMENT_MAX_COUNT = 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");
@@ -186,6 +186,37 @@ exports.zNotificationAttachmentSchema = zod_1.z
186
186
  content_base64: zod_1.z.string().min(1).max(exports.NOTIFICATION_ATTACHMENT_MAX_BASE64_BYTES),
187
187
  })
188
188
  .passthrough();
189
+ // ---- feat-254 B1: anexo de e-mail por referência (gcs_uri) ----
190
+ //
191
+ // O front sobe o arquivo pelo `POST /media/upload` do hub-waba (mesmo caminho
192
+ // da mídia do WhatsApp) e manda só a referência. O backend baixa do bucket de
193
+ // mídia do tenant (`gs://<bucket>/tenants/<tenant>/...`), valida tipo/extensão
194
+ // contra a allowlist do e-mail e aplica os limites abaixo. O formato é
195
+ // discriminado pela presença de `gcs_uri`; o inline legado continua valendo.
196
+ exports.NOTIFICATION_EMAIL_ATTACHMENT_MAX_COUNT = 10;
197
+ exports.NOTIFICATION_EMAIL_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
198
+ /** Inline (base64) continua limitado a 1 por mensagem: ele vive no doc da task e da mensagem. */
199
+ exports.NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT = 1;
200
+ exports.zNotificationAttachmentRefSchema = zod_1.z
201
+ .object({
202
+ filename: zod_1.z.string().min(1).max(200),
203
+ content_type: zod_1.z.string().min(1).max(200),
204
+ size_bytes: zod_1.z.number().int().positive().max(exports.NOTIFICATION_EMAIL_ATTACHMENT_MAX_BYTES).optional(),
205
+ gcs_uri: zod_1.z
206
+ .string()
207
+ .max(1024)
208
+ .regex(/^gs:\/\/[^/]+\/.+$/u, "gcs_uri deve ter o formato gs://<bucket>/<caminho>"),
209
+ })
210
+ .strict();
211
+ /** Inline legado sem `gcs_uri`: um item com os dois formatos ao mesmo tempo é ambíguo. */
212
+ const zNotificationAttachmentInlineOnlySchema = exports.zNotificationAttachmentSchema.extend({
213
+ gcs_uri: zod_1.z.undefined().optional(),
214
+ });
215
+ /** Item de `attachments[]` do envio: inline legado OU referência (`gcs_uri`). */
216
+ exports.zNotificationAttachmentInputSchema = zod_1.z.union([
217
+ exports.zNotificationAttachmentRefSchema,
218
+ zNotificationAttachmentInlineOnlySchema,
219
+ ]);
189
220
  // ---- HTTP direct send (INotificationSendPayload + tenant + externalLinks) ----
190
221
  exports.zDirectSendPayloadSchema = zod_1.z
191
222
  .object({
@@ -216,11 +247,33 @@ exports.zDirectSendPayloadSchema = zod_1.z
216
247
  force_send: zod_1.z.boolean().optional(),
217
248
  externalLinks: zod_1.z.array(zod_schemas_2.zExternalLinkSchema).optional(),
218
249
  quick_reply_actions: zod_1.z.array(zod_schemas_3.zQuickReplyActionIntentSchema).optional(),
219
- // feat-160 R6 / F31 — só o canal de e-mail honra; 1 anexo por mensagem.
220
- attachments: zod_1.z.array(exports.zNotificationAttachmentSchema).max(1).optional(),
250
+ // feat-160 R6 / F31 — só o canal de e-mail honra.
251
+ // feat-254 B1 — até 10 itens no e-mail (por referência `gcs_uri`); inline
252
+ // continua no máximo 1 e os demais canais continuam com 1 (ignorado).
253
+ // Tamanho real e total do canal são validados no backend ao baixar.
254
+ attachments: zod_1.z
255
+ .array(exports.zNotificationAttachmentInputSchema)
256
+ .max(exports.NOTIFICATION_EMAIL_ATTACHMENT_MAX_COUNT)
257
+ .optional(),
221
258
  })
222
259
  .passthrough()
223
260
  .superRefine((data, ctx) => {
261
+ const attachments = data.attachments ?? [];
262
+ if (data.channel.type !== "email" && attachments.length > 1) {
263
+ ctx.addIssue({
264
+ code: zod_1.z.ZodIssueCode.custom,
265
+ message: "Só o canal de e-mail aceita mais de um anexo.",
266
+ path: ["attachments"],
267
+ });
268
+ }
269
+ const inlineCount = attachments.filter((a) => !a.gcs_uri).length;
270
+ if (inlineCount > exports.NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT) {
271
+ ctx.addIssue({
272
+ code: zod_1.z.ZodIssueCode.custom,
273
+ message: `No máximo ${exports.NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT} anexo inline (base64); envie os demais por referência (gcs_uri).`,
274
+ path: ["attachments"],
275
+ });
276
+ }
224
277
  if (data.channel.type !== "whatsapp")
225
278
  return;
226
279
  const hasTemplate = Boolean(data.template?.template_id?.trim());
@@ -207,6 +207,41 @@ export const zNotificationAttachmentSchema = z
207
207
  })
208
208
  .passthrough();
209
209
 
210
+ // ---- feat-254 B1: anexo de e-mail por referência (gcs_uri) ----
211
+ //
212
+ // O front sobe o arquivo pelo `POST /media/upload` do hub-waba (mesmo caminho
213
+ // da mídia do WhatsApp) e manda só a referência. O backend baixa do bucket de
214
+ // mídia do tenant (`gs://<bucket>/tenants/<tenant>/...`), valida tipo/extensão
215
+ // contra a allowlist do e-mail e aplica os limites abaixo. O formato é
216
+ // discriminado pela presença de `gcs_uri`; o inline legado continua valendo.
217
+ export const NOTIFICATION_EMAIL_ATTACHMENT_MAX_COUNT = 10;
218
+ export const NOTIFICATION_EMAIL_ATTACHMENT_MAX_BYTES = 10 * 1024 * 1024;
219
+ /** Inline (base64) continua limitado a 1 por mensagem: ele vive no doc da task e da mensagem. */
220
+ export const NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT = 1;
221
+
222
+ export const zNotificationAttachmentRefSchema = z
223
+ .object({
224
+ filename: z.string().min(1).max(200),
225
+ content_type: z.string().min(1).max(200),
226
+ size_bytes: z.number().int().positive().max(NOTIFICATION_EMAIL_ATTACHMENT_MAX_BYTES).optional(),
227
+ gcs_uri: z
228
+ .string()
229
+ .max(1024)
230
+ .regex(/^gs:\/\/[^/]+\/.+$/u, "gcs_uri deve ter o formato gs://<bucket>/<caminho>"),
231
+ })
232
+ .strict();
233
+
234
+ /** Inline legado sem `gcs_uri`: um item com os dois formatos ao mesmo tempo é ambíguo. */
235
+ const zNotificationAttachmentInlineOnlySchema = zNotificationAttachmentSchema.extend({
236
+ gcs_uri: z.undefined().optional(),
237
+ });
238
+
239
+ /** Item de `attachments[]` do envio: inline legado OU referência (`gcs_uri`). */
240
+ export const zNotificationAttachmentInputSchema = z.union([
241
+ zNotificationAttachmentRefSchema,
242
+ zNotificationAttachmentInlineOnlySchema,
243
+ ]);
244
+
210
245
  // ---- HTTP direct send (INotificationSendPayload + tenant + externalLinks) ----
211
246
 
212
247
  export const zDirectSendPayloadSchema = z
@@ -238,11 +273,33 @@ export const zDirectSendPayloadSchema = z
238
273
  force_send: z.boolean().optional(),
239
274
  externalLinks: z.array(zExternalLinkSchema).optional(),
240
275
  quick_reply_actions: z.array(zQuickReplyActionIntentSchema).optional(),
241
- // feat-160 R6 / F31 — só o canal de e-mail honra; 1 anexo por mensagem.
242
- attachments: z.array(zNotificationAttachmentSchema).max(1).optional(),
276
+ // feat-160 R6 / F31 — só o canal de e-mail honra.
277
+ // feat-254 B1 — até 10 itens no e-mail (por referência `gcs_uri`); inline
278
+ // continua no máximo 1 e os demais canais continuam com 1 (ignorado).
279
+ // Tamanho real e total do canal são validados no backend ao baixar.
280
+ attachments: z
281
+ .array(zNotificationAttachmentInputSchema)
282
+ .max(NOTIFICATION_EMAIL_ATTACHMENT_MAX_COUNT)
283
+ .optional(),
243
284
  })
244
285
  .passthrough()
245
286
  .superRefine((data, ctx) => {
287
+ const attachments = data.attachments ?? [];
288
+ if (data.channel.type !== "email" && attachments.length > 1) {
289
+ ctx.addIssue({
290
+ code: z.ZodIssueCode.custom,
291
+ message: "Só o canal de e-mail aceita mais de um anexo.",
292
+ path: ["attachments"],
293
+ });
294
+ }
295
+ const inlineCount = attachments.filter((a) => !a.gcs_uri).length;
296
+ if (inlineCount > NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT) {
297
+ ctx.addIssue({
298
+ code: z.ZodIssueCode.custom,
299
+ message: `No máximo ${NOTIFICATION_ATTACHMENT_MAX_INLINE_COUNT} anexo inline (base64); envie os demais por referência (gcs_uri).`,
300
+ path: ["attachments"],
301
+ });
302
+ }
246
303
  if (data.channel.type !== "whatsapp") return;
247
304
  const hasTemplate = Boolean(data.template?.template_id?.trim());
248
305
  /** Texto de sessão sem HSM: campo dedicado ou `variables.text` (string) quando não há template. */