evo360-types 1.3.415 → 1.3.416
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-chat/chatbee/zod-schemas.d.ts +78 -16
- package/dist/apps/evo-chat/chatbee/zod-schemas.js +8 -2
- package/dist/apps/evo-chat/chatbee/zod-schemas.ts +11 -5
- package/dist/types/evo-chat/chatbee/index.d.ts +3 -1
- package/dist/types/evo-chat/chatbee/index.ts +3 -1
- package/package.json +1 -1
|
@@ -475,17 +475,35 @@ export declare const zTemplateButtonPayloadSchema: z.ZodObject<{
|
|
|
475
475
|
/**
|
|
476
476
|
* Schema para mídia do HEADER
|
|
477
477
|
*/
|
|
478
|
-
export declare const zTemplateHeaderMediaSchema: z.ZodObject<{
|
|
478
|
+
export declare const zTemplateHeaderMediaSchema: z.ZodEffects<z.ZodObject<{
|
|
479
479
|
type: z.ZodEnum<["image", "video", "document"]>;
|
|
480
|
-
link: z.ZodString
|
|
480
|
+
link: z.ZodOptional<z.ZodString>;
|
|
481
|
+
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
482
|
+
mime_type: z.ZodOptional<z.ZodString>;
|
|
481
483
|
filename: z.ZodOptional<z.ZodString>;
|
|
482
484
|
}, "strip", z.ZodTypeAny, {
|
|
483
|
-
link: string;
|
|
484
485
|
type: "image" | "video" | "document";
|
|
486
|
+
link?: string | undefined;
|
|
487
|
+
gcs_uri?: string | undefined;
|
|
488
|
+
mime_type?: string | undefined;
|
|
485
489
|
filename?: string | undefined;
|
|
486
490
|
}, {
|
|
487
|
-
link: string;
|
|
488
491
|
type: "image" | "video" | "document";
|
|
492
|
+
link?: string | undefined;
|
|
493
|
+
gcs_uri?: string | undefined;
|
|
494
|
+
mime_type?: string | undefined;
|
|
495
|
+
filename?: string | undefined;
|
|
496
|
+
}>, {
|
|
497
|
+
type: "image" | "video" | "document";
|
|
498
|
+
link?: string | undefined;
|
|
499
|
+
gcs_uri?: string | undefined;
|
|
500
|
+
mime_type?: string | undefined;
|
|
501
|
+
filename?: string | undefined;
|
|
502
|
+
}, {
|
|
503
|
+
type: "image" | "video" | "document";
|
|
504
|
+
link?: string | undefined;
|
|
505
|
+
gcs_uri?: string | undefined;
|
|
506
|
+
mime_type?: string | undefined;
|
|
489
507
|
filename?: string | undefined;
|
|
490
508
|
}>;
|
|
491
509
|
/**
|
|
@@ -549,17 +567,35 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
549
567
|
value: string;
|
|
550
568
|
parameter_name: string;
|
|
551
569
|
}>, "many">>;
|
|
552
|
-
header_media: z.ZodOptional<z.ZodObject<{
|
|
570
|
+
header_media: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
553
571
|
type: z.ZodEnum<["image", "video", "document"]>;
|
|
554
|
-
link: z.ZodString
|
|
572
|
+
link: z.ZodOptional<z.ZodString>;
|
|
573
|
+
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
574
|
+
mime_type: z.ZodOptional<z.ZodString>;
|
|
555
575
|
filename: z.ZodOptional<z.ZodString>;
|
|
556
576
|
}, "strip", z.ZodTypeAny, {
|
|
557
|
-
link: string;
|
|
558
577
|
type: "image" | "video" | "document";
|
|
578
|
+
link?: string | undefined;
|
|
579
|
+
gcs_uri?: string | undefined;
|
|
580
|
+
mime_type?: string | undefined;
|
|
559
581
|
filename?: string | undefined;
|
|
560
582
|
}, {
|
|
561
|
-
link: string;
|
|
562
583
|
type: "image" | "video" | "document";
|
|
584
|
+
link?: string | undefined;
|
|
585
|
+
gcs_uri?: string | undefined;
|
|
586
|
+
mime_type?: string | undefined;
|
|
587
|
+
filename?: string | undefined;
|
|
588
|
+
}>, {
|
|
589
|
+
type: "image" | "video" | "document";
|
|
590
|
+
link?: string | undefined;
|
|
591
|
+
gcs_uri?: string | undefined;
|
|
592
|
+
mime_type?: string | undefined;
|
|
593
|
+
filename?: string | undefined;
|
|
594
|
+
}, {
|
|
595
|
+
type: "image" | "video" | "document";
|
|
596
|
+
link?: string | undefined;
|
|
597
|
+
gcs_uri?: string | undefined;
|
|
598
|
+
mime_type?: string | undefined;
|
|
563
599
|
filename?: string | undefined;
|
|
564
600
|
}>>;
|
|
565
601
|
button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -591,8 +627,10 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
591
627
|
parameter_name: string;
|
|
592
628
|
}[] | undefined;
|
|
593
629
|
header_media?: {
|
|
594
|
-
link: string;
|
|
595
630
|
type: "image" | "video" | "document";
|
|
631
|
+
link?: string | undefined;
|
|
632
|
+
gcs_uri?: string | undefined;
|
|
633
|
+
mime_type?: string | undefined;
|
|
596
634
|
filename?: string | undefined;
|
|
597
635
|
} | undefined;
|
|
598
636
|
button_payloads?: {
|
|
@@ -618,8 +656,10 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
618
656
|
parameter_name: string;
|
|
619
657
|
}[] | undefined;
|
|
620
658
|
header_media?: {
|
|
621
|
-
link: string;
|
|
622
659
|
type: "image" | "video" | "document";
|
|
660
|
+
link?: string | undefined;
|
|
661
|
+
gcs_uri?: string | undefined;
|
|
662
|
+
mime_type?: string | undefined;
|
|
623
663
|
filename?: string | undefined;
|
|
624
664
|
} | undefined;
|
|
625
665
|
button_payloads?: {
|
|
@@ -684,17 +724,35 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
684
724
|
value: string;
|
|
685
725
|
parameter_name: string;
|
|
686
726
|
}>, "many">>;
|
|
687
|
-
header_media: z.ZodOptional<z.ZodObject<{
|
|
727
|
+
header_media: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
688
728
|
type: z.ZodEnum<["image", "video", "document"]>;
|
|
689
|
-
link: z.ZodString
|
|
729
|
+
link: z.ZodOptional<z.ZodString>;
|
|
730
|
+
gcs_uri: z.ZodOptional<z.ZodString>;
|
|
731
|
+
mime_type: z.ZodOptional<z.ZodString>;
|
|
690
732
|
filename: z.ZodOptional<z.ZodString>;
|
|
691
733
|
}, "strip", z.ZodTypeAny, {
|
|
692
|
-
link: string;
|
|
693
734
|
type: "image" | "video" | "document";
|
|
735
|
+
link?: string | undefined;
|
|
736
|
+
gcs_uri?: string | undefined;
|
|
737
|
+
mime_type?: string | undefined;
|
|
738
|
+
filename?: string | undefined;
|
|
739
|
+
}, {
|
|
740
|
+
type: "image" | "video" | "document";
|
|
741
|
+
link?: string | undefined;
|
|
742
|
+
gcs_uri?: string | undefined;
|
|
743
|
+
mime_type?: string | undefined;
|
|
744
|
+
filename?: string | undefined;
|
|
745
|
+
}>, {
|
|
746
|
+
type: "image" | "video" | "document";
|
|
747
|
+
link?: string | undefined;
|
|
748
|
+
gcs_uri?: string | undefined;
|
|
749
|
+
mime_type?: string | undefined;
|
|
694
750
|
filename?: string | undefined;
|
|
695
751
|
}, {
|
|
696
|
-
link: string;
|
|
697
752
|
type: "image" | "video" | "document";
|
|
753
|
+
link?: string | undefined;
|
|
754
|
+
gcs_uri?: string | undefined;
|
|
755
|
+
mime_type?: string | undefined;
|
|
698
756
|
filename?: string | undefined;
|
|
699
757
|
}>>;
|
|
700
758
|
button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -726,8 +784,10 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
726
784
|
parameter_name: string;
|
|
727
785
|
}[] | undefined;
|
|
728
786
|
header_media?: {
|
|
729
|
-
link: string;
|
|
730
787
|
type: "image" | "video" | "document";
|
|
788
|
+
link?: string | undefined;
|
|
789
|
+
gcs_uri?: string | undefined;
|
|
790
|
+
mime_type?: string | undefined;
|
|
731
791
|
filename?: string | undefined;
|
|
732
792
|
} | undefined;
|
|
733
793
|
button_payloads?: {
|
|
@@ -753,8 +813,10 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
753
813
|
parameter_name: string;
|
|
754
814
|
}[] | undefined;
|
|
755
815
|
header_media?: {
|
|
756
|
-
link: string;
|
|
757
816
|
type: "image" | "video" | "document";
|
|
817
|
+
link?: string | undefined;
|
|
818
|
+
gcs_uri?: string | undefined;
|
|
819
|
+
mime_type?: string | undefined;
|
|
758
820
|
filename?: string | undefined;
|
|
759
821
|
} | undefined;
|
|
760
822
|
button_payloads?: {
|
|
@@ -97,10 +97,16 @@ exports.zTemplateButtonPayloadSchema = zod_1.z.object({
|
|
|
97
97
|
/**
|
|
98
98
|
* Schema para mídia do HEADER
|
|
99
99
|
*/
|
|
100
|
-
exports.zTemplateHeaderMediaSchema = zod_1.z
|
|
100
|
+
exports.zTemplateHeaderMediaSchema = zod_1.z
|
|
101
|
+
.object({
|
|
101
102
|
type: zod_1.z.enum(["image", "video", "document"]),
|
|
102
|
-
link: zod_1.z.string().url(),
|
|
103
|
+
link: zod_1.z.string().url().optional(), // URL pública da mídia (fluxo legado)
|
|
104
|
+
gcs_uri: zod_1.z.string().optional(), // URI GCS para upload ao Meta (media_id)
|
|
105
|
+
mime_type: zod_1.z.string().optional(), // usado quando a mídia vem de gcs_uri
|
|
103
106
|
filename: zod_1.z.string().optional(), // obrigatório apenas para documentos
|
|
107
|
+
})
|
|
108
|
+
.refine((d) => !!d.link || !!d.gcs_uri, {
|
|
109
|
+
message: "informe link ou gcs_uri",
|
|
104
110
|
});
|
|
105
111
|
/**
|
|
106
112
|
* Schema para requisição de envio de mensagem de texto
|
|
@@ -103,11 +103,17 @@ export const zTemplateButtonPayloadSchema = z.object({
|
|
|
103
103
|
/**
|
|
104
104
|
* Schema para mídia do HEADER
|
|
105
105
|
*/
|
|
106
|
-
export const zTemplateHeaderMediaSchema = z
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
export const zTemplateHeaderMediaSchema = z
|
|
107
|
+
.object({
|
|
108
|
+
type: z.enum(["image", "video", "document"]),
|
|
109
|
+
link: z.string().url().optional(), // URL pública da mídia (fluxo legado)
|
|
110
|
+
gcs_uri: z.string().optional(), // URI GCS para upload ao Meta (media_id)
|
|
111
|
+
mime_type: z.string().optional(), // usado quando a mídia vem de gcs_uri
|
|
112
|
+
filename: z.string().optional(), // obrigatório apenas para documentos
|
|
113
|
+
})
|
|
114
|
+
.refine((d) => !!d.link || !!d.gcs_uri, {
|
|
115
|
+
message: "informe link ou gcs_uri",
|
|
116
|
+
});
|
|
111
117
|
|
|
112
118
|
/**
|
|
113
119
|
* Schema para requisição de envio de mensagem de texto
|
|
@@ -95,7 +95,9 @@ export interface ITemplateButtonPayload {
|
|
|
95
95
|
*/
|
|
96
96
|
export interface ITemplateHeaderMedia {
|
|
97
97
|
type: "image" | "video" | "document";
|
|
98
|
-
link
|
|
98
|
+
link?: string; // URL pública da mídia (fluxo legado)
|
|
99
|
+
gcs_uri?: string; // URI GCS para upload ao Meta (media_id)
|
|
100
|
+
mime_type?: string; // usado quando a mídia vem de gcs_uri
|
|
99
101
|
filename?: string; // obrigatório apenas para documentos
|
|
100
102
|
}
|
|
101
103
|
|