evo360-types 1.3.145 → 1.3.146

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
  */
@@ -514,6 +530,19 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
514
530
  value: string;
515
531
  parameter_name: string;
516
532
  }>, "many">>;
533
+ header_media: z.ZodOptional<z.ZodObject<{
534
+ type: z.ZodEnum<["image", "video", "document"]>;
535
+ link: z.ZodString;
536
+ filename: z.ZodOptional<z.ZodString>;
537
+ }, "strip", z.ZodTypeAny, {
538
+ link: string;
539
+ type: "image" | "video" | "document";
540
+ filename?: string | undefined;
541
+ }, {
542
+ link: string;
543
+ type: "image" | "video" | "document";
544
+ filename?: string | undefined;
545
+ }>>;
517
546
  button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
518
547
  index: z.ZodNumber;
519
548
  payload: z.ZodString;
@@ -538,6 +567,11 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
538
567
  value: string;
539
568
  parameter_name: string;
540
569
  }[] | undefined;
570
+ header_media?: {
571
+ link: string;
572
+ type: "image" | "video" | "document";
573
+ filename?: string | undefined;
574
+ } | undefined;
541
575
  button_payloads?: {
542
576
  index: number;
543
577
  payload: string;
@@ -556,6 +590,11 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
556
590
  value: string;
557
591
  parameter_name: string;
558
592
  }[] | undefined;
593
+ header_media?: {
594
+ link: string;
595
+ type: "image" | "video" | "document";
596
+ filename?: string | undefined;
597
+ } | undefined;
559
598
  button_payloads?: {
560
599
  index: number;
561
600
  payload: string;
@@ -608,6 +647,19 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
608
647
  value: string;
609
648
  parameter_name: string;
610
649
  }>, "many">>;
650
+ header_media: z.ZodOptional<z.ZodObject<{
651
+ type: z.ZodEnum<["image", "video", "document"]>;
652
+ link: z.ZodString;
653
+ filename: z.ZodOptional<z.ZodString>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ link: string;
656
+ type: "image" | "video" | "document";
657
+ filename?: string | undefined;
658
+ }, {
659
+ link: string;
660
+ type: "image" | "video" | "document";
661
+ filename?: string | undefined;
662
+ }>>;
611
663
  button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
612
664
  index: z.ZodNumber;
613
665
  payload: z.ZodString;
@@ -632,6 +684,11 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
632
684
  value: string;
633
685
  parameter_name: string;
634
686
  }[] | undefined;
687
+ header_media?: {
688
+ link: string;
689
+ type: "image" | "video" | "document";
690
+ filename?: string | undefined;
691
+ } | undefined;
635
692
  button_payloads?: {
636
693
  index: number;
637
694
  payload: string;
@@ -650,6 +707,11 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
650
707
  value: string;
651
708
  parameter_name: string;
652
709
  }[] | undefined;
710
+ header_media?: {
711
+ link: string;
712
+ type: "image" | "video" | "document";
713
+ filename?: string | undefined;
714
+ } | undefined;
653
715
  button_payloads?: {
654
716
  index: number;
655
717
  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
  */
@@ -117,6 +125,7 @@ exports.zSendTemplateMessageRequestSchema = zod_1.z.object({
117
125
  template_language: zod_1.z.string().optional().default('pt_BR'),
118
126
  waba_id: zod_1.z.string().optional(),
119
127
  variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
128
+ header_media: exports.zTemplateHeaderMediaSchema.optional(),
120
129
  button_payloads: zod_1.z.array(exports.zTemplateButtonPayloadSchema).optional(),
121
130
  });
122
131
  /**
@@ -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
  */
@@ -124,6 +133,7 @@ export const zSendTemplateMessageRequestSchema = z.object({
124
133
  template_language: z.string().optional().default('pt_BR'),
125
134
  waba_id: z.string().optional(),
126
135
  variables: z.array(zTemplateVariableSchema).optional(),
136
+ header_media: zTemplateHeaderMediaSchema.optional(),
127
137
  button_payloads: z.array(zTemplateButtonPayloadSchema).optional(),
128
138
  });
129
139
 
@@ -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
  */
@@ -92,6 +100,7 @@ export interface ISendTemplateMessageRequest {
92
100
  template_language?: string;
93
101
  waba_id?: string;
94
102
  variables?: ITemplateVariable[];
103
+ header_media?: ITemplateHeaderMedia;
95
104
  button_payloads?: ITemplateButtonPayload[];
96
105
  }
97
106
  /**
@@ -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,8 @@ 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
116
- variables?: ITemplateVariable[]; // variáveis para o BODY
125
+ variables?: ITemplateVariable[]; // variáveis para o BODY e HEADER (se aplicável)
126
+ header_media?: ITemplateHeaderMedia; // mídia para o HEADER (imagem, vídeo ou documento)
117
127
  button_payloads?: ITemplateButtonPayload[]; // payloads para botões QUICK_REPLY
118
128
  }
119
129
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.145",
3
+ "version": "1.3.146",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",