evo360-types 1.3.145 → 1.3.147

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.
@@ -463,6 +463,22 @@ export declare const zTemplateButtonPayloadSchema: z.ZodObject<{
463
463
  index: number;
464
464
  payload: string;
465
465
  }>;
466
+ /**
467
+ * Schema para mídia do HEADER
468
+ */
469
+ export declare const zTemplateHeaderMediaSchema: z.ZodObject<{
470
+ type: z.ZodEnum<["image", "video", "document"]>;
471
+ link: z.ZodString;
472
+ filename: z.ZodOptional<z.ZodString>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ link: string;
475
+ type: "image" | "video" | "document";
476
+ filename?: string | undefined;
477
+ }, {
478
+ link: string;
479
+ type: "image" | "video" | "document";
480
+ filename?: string | undefined;
481
+ }>;
466
482
  /**
467
483
  * Schema para requisição de envio de mensagem de texto
468
484
  */
@@ -504,6 +520,16 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
504
520
  template_name: z.ZodString;
505
521
  template_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
506
522
  waba_id: z.ZodOptional<z.ZodString>;
523
+ header_variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
524
+ parameter_name: z.ZodString;
525
+ value: z.ZodString;
526
+ }, "strip", z.ZodTypeAny, {
527
+ value: string;
528
+ parameter_name: string;
529
+ }, {
530
+ value: string;
531
+ parameter_name: string;
532
+ }>, "many">>;
507
533
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
508
534
  parameter_name: z.ZodString;
509
535
  value: z.ZodString;
@@ -514,6 +540,19 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
514
540
  value: string;
515
541
  parameter_name: string;
516
542
  }>, "many">>;
543
+ header_media: z.ZodOptional<z.ZodObject<{
544
+ type: z.ZodEnum<["image", "video", "document"]>;
545
+ link: z.ZodString;
546
+ filename: z.ZodOptional<z.ZodString>;
547
+ }, "strip", z.ZodTypeAny, {
548
+ link: string;
549
+ type: "image" | "video" | "document";
550
+ filename?: string | undefined;
551
+ }, {
552
+ link: string;
553
+ type: "image" | "video" | "document";
554
+ filename?: string | undefined;
555
+ }>>;
517
556
  button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
518
557
  index: z.ZodNumber;
519
558
  payload: z.ZodString;
@@ -534,10 +573,19 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
534
573
  template_language: string;
535
574
  contact_custom_name?: string | undefined;
536
575
  waba_id?: string | undefined;
576
+ header_variables?: {
577
+ value: string;
578
+ parameter_name: string;
579
+ }[] | undefined;
537
580
  variables?: {
538
581
  value: string;
539
582
  parameter_name: string;
540
583
  }[] | undefined;
584
+ header_media?: {
585
+ link: string;
586
+ type: "image" | "video" | "document";
587
+ filename?: string | undefined;
588
+ } | undefined;
541
589
  button_payloads?: {
542
590
  index: number;
543
591
  payload: string;
@@ -552,10 +600,19 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
552
600
  contact_custom_name?: string | undefined;
553
601
  template_language?: string | undefined;
554
602
  waba_id?: string | undefined;
603
+ header_variables?: {
604
+ value: string;
605
+ parameter_name: string;
606
+ }[] | undefined;
555
607
  variables?: {
556
608
  value: string;
557
609
  parameter_name: string;
558
610
  }[] | undefined;
611
+ header_media?: {
612
+ link: string;
613
+ type: "image" | "video" | "document";
614
+ filename?: string | undefined;
615
+ } | undefined;
559
616
  button_payloads?: {
560
617
  index: number;
561
618
  payload: string;
@@ -598,6 +655,16 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
598
655
  template_name: z.ZodString;
599
656
  template_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
600
657
  waba_id: z.ZodOptional<z.ZodString>;
658
+ header_variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
659
+ parameter_name: z.ZodString;
660
+ value: z.ZodString;
661
+ }, "strip", z.ZodTypeAny, {
662
+ value: string;
663
+ parameter_name: string;
664
+ }, {
665
+ value: string;
666
+ parameter_name: string;
667
+ }>, "many">>;
601
668
  variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
602
669
  parameter_name: z.ZodString;
603
670
  value: z.ZodString;
@@ -608,6 +675,19 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
608
675
  value: string;
609
676
  parameter_name: string;
610
677
  }>, "many">>;
678
+ header_media: z.ZodOptional<z.ZodObject<{
679
+ type: z.ZodEnum<["image", "video", "document"]>;
680
+ link: z.ZodString;
681
+ filename: z.ZodOptional<z.ZodString>;
682
+ }, "strip", z.ZodTypeAny, {
683
+ link: string;
684
+ type: "image" | "video" | "document";
685
+ filename?: string | undefined;
686
+ }, {
687
+ link: string;
688
+ type: "image" | "video" | "document";
689
+ filename?: string | undefined;
690
+ }>>;
611
691
  button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
612
692
  index: z.ZodNumber;
613
693
  payload: z.ZodString;
@@ -628,10 +708,19 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
628
708
  template_language: string;
629
709
  contact_custom_name?: string | undefined;
630
710
  waba_id?: string | undefined;
711
+ header_variables?: {
712
+ value: string;
713
+ parameter_name: string;
714
+ }[] | undefined;
631
715
  variables?: {
632
716
  value: string;
633
717
  parameter_name: string;
634
718
  }[] | undefined;
719
+ header_media?: {
720
+ link: string;
721
+ type: "image" | "video" | "document";
722
+ filename?: string | undefined;
723
+ } | undefined;
635
724
  button_payloads?: {
636
725
  index: number;
637
726
  payload: string;
@@ -646,10 +735,19 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
646
735
  contact_custom_name?: string | undefined;
647
736
  template_language?: string | undefined;
648
737
  waba_id?: string | undefined;
738
+ header_variables?: {
739
+ value: string;
740
+ parameter_name: string;
741
+ }[] | undefined;
649
742
  variables?: {
650
743
  value: string;
651
744
  parameter_name: string;
652
745
  }[] | undefined;
746
+ header_media?: {
747
+ link: string;
748
+ type: "image" | "video" | "document";
749
+ filename?: string | undefined;
750
+ } | undefined;
653
751
  button_payloads?: {
654
752
  index: number;
655
753
  payload: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zSendMessageResponseSchema = exports.zSendMessageRequestSchema = exports.zSendTemplateMessageRequestSchema = exports.zSendTextMessageRequestSchema = exports.zTemplateButtonPayloadSchema = exports.zTemplateVariableSchema = exports.zChatbeeContactHistorySchema = exports.zChatbeeContactHistoryPayloadClosedSchema = exports.zChatbeeContactHistoryPayloadCreatedSchema = exports.zChatbeeContactSchema = exports.zChatbeeStatusSchema = exports.zChatbeeDepartmentSchema = exports.zChatbeeChannelSchema = exports.zChatBeeChannelConfigSchema = void 0;
3
+ exports.zSendMessageResponseSchema = exports.zSendMessageRequestSchema = exports.zSendTemplateMessageRequestSchema = exports.zSendTextMessageRequestSchema = exports.zTemplateHeaderMediaSchema = exports.zTemplateButtonPayloadSchema = exports.zTemplateVariableSchema = exports.zChatbeeContactHistorySchema = exports.zChatbeeContactHistoryPayloadClosedSchema = exports.zChatbeeContactHistoryPayloadCreatedSchema = exports.zChatbeeContactSchema = exports.zChatbeeStatusSchema = exports.zChatbeeDepartmentSchema = exports.zChatbeeChannelSchema = exports.zChatBeeChannelConfigSchema = 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-hub-ia/channel/zod-schemas");
@@ -91,6 +91,14 @@ exports.zTemplateButtonPayloadSchema = zod_1.z.object({
91
91
  index: zod_1.z.number().int().min(0),
92
92
  payload: zod_1.z.string(),
93
93
  });
94
+ /**
95
+ * Schema para mídia do HEADER
96
+ */
97
+ exports.zTemplateHeaderMediaSchema = zod_1.z.object({
98
+ type: zod_1.z.enum(['image', 'video', 'document']),
99
+ link: zod_1.z.string().url(),
100
+ filename: zod_1.z.string().optional(), // obrigatório apenas para documentos
101
+ });
94
102
  /**
95
103
  * Schema para requisição de envio de mensagem de texto
96
104
  */
@@ -116,7 +124,9 @@ exports.zSendTemplateMessageRequestSchema = zod_1.z.object({
116
124
  template_name: zod_1.z.string().min(1),
117
125
  template_language: zod_1.z.string().optional().default('pt_BR'),
118
126
  waba_id: zod_1.z.string().optional(),
127
+ header_variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
119
128
  variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
129
+ header_media: exports.zTemplateHeaderMediaSchema.optional(),
120
130
  button_payloads: zod_1.z.array(exports.zTemplateButtonPayloadSchema).optional(),
121
131
  });
122
132
  /**
@@ -97,6 +97,15 @@ export const zTemplateButtonPayloadSchema = z.object({
97
97
  payload: z.string(),
98
98
  });
99
99
 
100
+ /**
101
+ * Schema para mídia do HEADER
102
+ */
103
+ export const zTemplateHeaderMediaSchema = z.object({
104
+ type: z.enum(['image', 'video', 'document']),
105
+ link: z.string().url(),
106
+ filename: z.string().optional(), // obrigatório apenas para documentos
107
+ });
108
+
100
109
  /**
101
110
  * Schema para requisição de envio de mensagem de texto
102
111
  */
@@ -123,7 +132,9 @@ export const zSendTemplateMessageRequestSchema = z.object({
123
132
  template_name: z.string().min(1),
124
133
  template_language: z.string().optional().default('pt_BR'),
125
134
  waba_id: z.string().optional(),
135
+ header_variables: z.array(zTemplateVariableSchema).optional(),
126
136
  variables: z.array(zTemplateVariableSchema).optional(),
137
+ header_media: zTemplateHeaderMediaSchema.optional(),
127
138
  button_payloads: z.array(zTemplateButtonPayloadSchema).optional(),
128
139
  });
129
140
 
@@ -66,6 +66,14 @@ export interface ITemplateButtonPayload {
66
66
  index: number;
67
67
  payload: string;
68
68
  }
69
+ /**
70
+ * Mídia para o HEADER do template (imagem, vídeo ou documento)
71
+ */
72
+ export interface ITemplateHeaderMedia {
73
+ type: 'image' | 'video' | 'document';
74
+ link: string;
75
+ filename?: string;
76
+ }
69
77
  /**
70
78
  * Requisição para envio de mensagem de texto simples
71
79
  */
@@ -91,7 +99,9 @@ export interface ISendTemplateMessageRequest {
91
99
  template_name: string;
92
100
  template_language?: string;
93
101
  waba_id?: string;
102
+ header_variables?: ITemplateVariable[];
94
103
  variables?: ITemplateVariable[];
104
+ header_media?: ITemplateHeaderMedia;
95
105
  button_payloads?: ITemplateButtonPayload[];
96
106
  }
97
107
  /**
@@ -87,6 +87,15 @@ export interface ITemplateButtonPayload {
87
87
  payload: string;
88
88
  }
89
89
 
90
+ /**
91
+ * Mídia para o HEADER do template (imagem, vídeo ou documento)
92
+ */
93
+ export interface ITemplateHeaderMedia {
94
+ type: 'image' | 'video' | 'document';
95
+ link: string;
96
+ filename?: string; // obrigatório apenas para documentos
97
+ }
98
+
90
99
  /**
91
100
  * Requisição para envio de mensagem de texto simples
92
101
  */
@@ -113,7 +122,9 @@ export interface ISendTemplateMessageRequest {
113
122
  template_name: string;
114
123
  template_language?: string; // padrão: 'pt_BR'
115
124
  waba_id?: string; // opcional, será obtido do canal se não fornecido
125
+ header_variables?: ITemplateVariable[]; // variáveis para o HEADER (se aplicável)
116
126
  variables?: ITemplateVariable[]; // variáveis para o BODY
127
+ header_media?: ITemplateHeaderMedia; // mídia para o HEADER (imagem, vídeo ou documento)
117
128
  button_payloads?: ITemplateButtonPayload[]; // payloads para botões QUICK_REPLY
118
129
  }
119
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.145",
3
+ "version": "1.3.147",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",