evo360-types 1.3.414 → 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.
@@ -17316,19 +17316,31 @@ export declare const zCsvUploadMeta: z.ZodObject<{
17316
17316
  label: z.ZodString;
17317
17317
  filename: z.ZodString;
17318
17318
  file_base64: z.ZodString;
17319
- /** CSV column -> semantic field mapping (name/mobile/email/variables). */
17319
+ /** Mapping `{ <campo reservado|nome de variavel>: <coluna do CSV> }`.
17320
+ * Chaves reservadas: `name`, `phone`, `email`, `external_id`; qualquer outra
17321
+ * chave e tratada como nome de variavel de template (valor = coluna do CSV).
17322
+ * Canonico do backend (`toColumnMapping` no csv-service) — o FE converte a
17323
+ * UI header->campo para este shape antes de enviar (fix pos-review da F1). */
17320
17324
  mapping: z.ZodRecord<z.ZodString, z.ZodString>;
17321
17325
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
17322
17326
  label: z.ZodString;
17323
17327
  filename: z.ZodString;
17324
17328
  file_base64: z.ZodString;
17325
- /** CSV column -> semantic field mapping (name/mobile/email/variables). */
17329
+ /** Mapping `{ <campo reservado|nome de variavel>: <coluna do CSV> }`.
17330
+ * Chaves reservadas: `name`, `phone`, `email`, `external_id`; qualquer outra
17331
+ * chave e tratada como nome de variavel de template (valor = coluna do CSV).
17332
+ * Canonico do backend (`toColumnMapping` no csv-service) — o FE converte a
17333
+ * UI header->campo para este shape antes de enviar (fix pos-review da F1). */
17326
17334
  mapping: z.ZodRecord<z.ZodString, z.ZodString>;
17327
17335
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
17328
17336
  label: z.ZodString;
17329
17337
  filename: z.ZodString;
17330
17338
  file_base64: z.ZodString;
17331
- /** CSV column -> semantic field mapping (name/mobile/email/variables). */
17339
+ /** Mapping `{ <campo reservado|nome de variavel>: <coluna do CSV> }`.
17340
+ * Chaves reservadas: `name`, `phone`, `email`, `external_id`; qualquer outra
17341
+ * chave e tratada como nome de variavel de template (valor = coluna do CSV).
17342
+ * Canonico do backend (`toColumnMapping` no csv-service) — o FE converte a
17343
+ * UI header->campo para este shape antes de enviar (fix pos-review da F1). */
17332
17344
  mapping: z.ZodRecord<z.ZodString, z.ZodString>;
17333
17345
  }, z.ZodTypeAny, "passthrough">>;
17334
17346
  export type ICsvUploadMeta = z.infer<typeof zCsvUploadMeta>;
@@ -331,7 +331,11 @@ exports.zCsvUploadMeta = zod_1.z
331
331
  label: zod_1.z.string().min(1),
332
332
  filename: zod_1.z.string().min(1),
333
333
  file_base64: zod_1.z.string(),
334
- /** CSV column -> semantic field mapping (name/mobile/email/variables). */
334
+ /** Mapping `{ <campo reservado|nome de variavel>: <coluna do CSV> }`.
335
+ * Chaves reservadas: `name`, `phone`, `email`, `external_id`; qualquer outra
336
+ * chave e tratada como nome de variavel de template (valor = coluna do CSV).
337
+ * Canonico do backend (`toColumnMapping` no csv-service) — o FE converte a
338
+ * UI header->campo para este shape antes de enviar (fix pos-review da F1). */
335
339
  mapping: zod_1.z.record(zod_1.z.string()),
336
340
  })
337
341
  .passthrough();
@@ -361,7 +361,11 @@ export const zCsvUploadMeta = z
361
361
  label: z.string().min(1),
362
362
  filename: z.string().min(1),
363
363
  file_base64: z.string(),
364
- /** CSV column -> semantic field mapping (name/mobile/email/variables). */
364
+ /** Mapping `{ <campo reservado|nome de variavel>: <coluna do CSV> }`.
365
+ * Chaves reservadas: `name`, `phone`, `email`, `external_id`; qualquer outra
366
+ * chave e tratada como nome de variavel de template (valor = coluna do CSV).
367
+ * Canonico do backend (`toColumnMapping` no csv-service) — o FE converte a
368
+ * UI header->campo para este shape antes de enviar (fix pos-review da F1). */
365
369
  mapping: z.record(z.string()),
366
370
  })
367
371
  .passthrough();
@@ -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.object({
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.object({
107
- type: z.enum(["image", "video", "document"]),
108
- link: z.string().url(),
109
- filename: z.string().optional(), // obrigatório apenas para documentos
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