evo360-types 1.3.415 → 1.3.417

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.
@@ -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
@@ -838,6 +838,19 @@ export declare const zAutomationHumanTaskOutputSchema: z.ZodObject<{
838
838
  description?: string | undefined;
839
839
  assignee_ref?: string | undefined;
840
840
  }>;
841
+ export declare const zAutomationActionOutputSchema: z.ZodObject<{
842
+ type: z.ZodLiteral<"action">;
843
+ action_id: z.ZodString;
844
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
845
+ }, "strip", z.ZodTypeAny, {
846
+ input: Record<string, unknown>;
847
+ type: "action";
848
+ action_id: string;
849
+ }, {
850
+ type: "action";
851
+ action_id: string;
852
+ input?: Record<string, unknown> | undefined;
853
+ }>;
841
854
  export declare const zAutomationOutputSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
842
855
  type: z.ZodLiteral<"auto_task">;
843
856
  handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run", "campaign.materialize", "campaign.dispatch_batch"]>;
@@ -1382,6 +1395,18 @@ export declare const zAutomationOutputSchema: z.ZodDiscriminatedUnion<"type", [z
1382
1395
  title: string;
1383
1396
  description?: string | undefined;
1384
1397
  assignee_ref?: string | undefined;
1398
+ }>, z.ZodObject<{
1399
+ type: z.ZodLiteral<"action">;
1400
+ action_id: z.ZodString;
1401
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1402
+ }, "strip", z.ZodTypeAny, {
1403
+ input: Record<string, unknown>;
1404
+ type: "action";
1405
+ action_id: string;
1406
+ }, {
1407
+ type: "action";
1408
+ action_id: string;
1409
+ input?: Record<string, unknown> | undefined;
1385
1410
  }>]>;
1386
1411
  export declare const zAutomationBranchSchema: z.ZodObject<{
1387
1412
  id: z.ZodString;
@@ -1932,6 +1957,18 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
1932
1957
  title: string;
1933
1958
  description?: string | undefined;
1934
1959
  assignee_ref?: string | undefined;
1960
+ }>, z.ZodObject<{
1961
+ type: z.ZodLiteral<"action">;
1962
+ action_id: z.ZodString;
1963
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1964
+ }, "strip", z.ZodTypeAny, {
1965
+ input: Record<string, unknown>;
1966
+ type: "action";
1967
+ action_id: string;
1968
+ }, {
1969
+ type: "action";
1970
+ action_id: string;
1971
+ input?: Record<string, unknown> | undefined;
1935
1972
  }>]>, "many">;
1936
1973
  }, "strip", z.ZodTypeAny, {
1937
1974
  name: string;
@@ -2050,6 +2087,10 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
2050
2087
  title: string;
2051
2088
  description?: string | undefined;
2052
2089
  assignee_ref?: string | undefined;
2090
+ } | {
2091
+ input: Record<string, unknown>;
2092
+ type: "action";
2093
+ action_id: string;
2053
2094
  })[];
2054
2095
  when?: ZAutomationConditionGroup | undefined;
2055
2096
  is_fallback?: boolean | undefined;
@@ -2170,6 +2211,10 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
2170
2211
  title: string;
2171
2212
  description?: string | undefined;
2172
2213
  assignee_ref?: string | undefined;
2214
+ } | {
2215
+ type: "action";
2216
+ action_id: string;
2217
+ input?: Record<string, unknown> | undefined;
2173
2218
  })[];
2174
2219
  when?: ZAutomationConditionGroup | undefined;
2175
2220
  is_fallback?: boolean | undefined;
@@ -2848,6 +2893,18 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2848
2893
  title: string;
2849
2894
  description?: string | undefined;
2850
2895
  assignee_ref?: string | undefined;
2896
+ }>, z.ZodObject<{
2897
+ type: z.ZodLiteral<"action">;
2898
+ action_id: z.ZodString;
2899
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2900
+ }, "strip", z.ZodTypeAny, {
2901
+ input: Record<string, unknown>;
2902
+ type: "action";
2903
+ action_id: string;
2904
+ }, {
2905
+ type: "action";
2906
+ action_id: string;
2907
+ input?: Record<string, unknown> | undefined;
2851
2908
  }>]>, "many">;
2852
2909
  }, "strip", z.ZodTypeAny, {
2853
2910
  name: string;
@@ -2966,6 +3023,10 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2966
3023
  title: string;
2967
3024
  description?: string | undefined;
2968
3025
  assignee_ref?: string | undefined;
3026
+ } | {
3027
+ input: Record<string, unknown>;
3028
+ type: "action";
3029
+ action_id: string;
2969
3030
  })[];
2970
3031
  when?: ZAutomationConditionGroup | undefined;
2971
3032
  is_fallback?: boolean | undefined;
@@ -3086,6 +3147,10 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3086
3147
  title: string;
3087
3148
  description?: string | undefined;
3088
3149
  assignee_ref?: string | undefined;
3150
+ } | {
3151
+ type: "action";
3152
+ action_id: string;
3153
+ input?: Record<string, unknown> | undefined;
3089
3154
  })[];
3090
3155
  when?: ZAutomationConditionGroup | undefined;
3091
3156
  is_fallback?: boolean | undefined;
@@ -3284,6 +3349,10 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3284
3349
  title: string;
3285
3350
  description?: string | undefined;
3286
3351
  assignee_ref?: string | undefined;
3352
+ } | {
3353
+ input: Record<string, unknown>;
3354
+ type: "action";
3355
+ action_id: string;
3287
3356
  })[];
3288
3357
  when?: ZAutomationConditionGroup | undefined;
3289
3358
  is_fallback?: boolean | undefined;
@@ -3455,6 +3524,10 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3455
3524
  title: string;
3456
3525
  description?: string | undefined;
3457
3526
  assignee_ref?: string | undefined;
3527
+ } | {
3528
+ type: "action";
3529
+ action_id: string;
3530
+ input?: Record<string, unknown> | undefined;
3458
3531
  })[];
3459
3532
  when?: ZAutomationConditionGroup | undefined;
3460
3533
  is_fallback?: boolean | undefined;
@@ -4151,6 +4224,18 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4151
4224
  title: string;
4152
4225
  description?: string | undefined;
4153
4226
  assignee_ref?: string | undefined;
4227
+ }>, z.ZodObject<{
4228
+ type: z.ZodLiteral<"action">;
4229
+ action_id: z.ZodString;
4230
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4231
+ }, "strip", z.ZodTypeAny, {
4232
+ input: Record<string, unknown>;
4233
+ type: "action";
4234
+ action_id: string;
4235
+ }, {
4236
+ type: "action";
4237
+ action_id: string;
4238
+ input?: Record<string, unknown> | undefined;
4154
4239
  }>]>, "many">;
4155
4240
  }, "strip", z.ZodTypeAny, {
4156
4241
  name: string;
@@ -4269,6 +4354,10 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4269
4354
  title: string;
4270
4355
  description?: string | undefined;
4271
4356
  assignee_ref?: string | undefined;
4357
+ } | {
4358
+ input: Record<string, unknown>;
4359
+ type: "action";
4360
+ action_id: string;
4272
4361
  })[];
4273
4362
  when?: ZAutomationConditionGroup | undefined;
4274
4363
  is_fallback?: boolean | undefined;
@@ -4389,6 +4478,10 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4389
4478
  title: string;
4390
4479
  description?: string | undefined;
4391
4480
  assignee_ref?: string | undefined;
4481
+ } | {
4482
+ type: "action";
4483
+ action_id: string;
4484
+ input?: Record<string, unknown> | undefined;
4392
4485
  })[];
4393
4486
  when?: ZAutomationConditionGroup | undefined;
4394
4487
  is_fallback?: boolean | undefined;
@@ -4549,6 +4642,10 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4549
4642
  title: string;
4550
4643
  description?: string | undefined;
4551
4644
  assignee_ref?: string | undefined;
4645
+ } | {
4646
+ input: Record<string, unknown>;
4647
+ type: "action";
4648
+ action_id: string;
4552
4649
  })[];
4553
4650
  when?: ZAutomationConditionGroup | undefined;
4554
4651
  is_fallback?: boolean | undefined;
@@ -4705,6 +4802,10 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4705
4802
  title: string;
4706
4803
  description?: string | undefined;
4707
4804
  assignee_ref?: string | undefined;
4805
+ } | {
4806
+ type: "action";
4807
+ action_id: string;
4808
+ input?: Record<string, unknown> | undefined;
4708
4809
  })[];
4709
4810
  when?: ZAutomationConditionGroup | undefined;
4710
4811
  is_fallback?: boolean | undefined;
@@ -5388,6 +5489,18 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5388
5489
  title: string;
5389
5490
  description?: string | undefined;
5390
5491
  assignee_ref?: string | undefined;
5492
+ }>, z.ZodObject<{
5493
+ type: z.ZodLiteral<"action">;
5494
+ action_id: z.ZodString;
5495
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5496
+ }, "strip", z.ZodTypeAny, {
5497
+ input: Record<string, unknown>;
5498
+ type: "action";
5499
+ action_id: string;
5500
+ }, {
5501
+ type: "action";
5502
+ action_id: string;
5503
+ input?: Record<string, unknown> | undefined;
5391
5504
  }>]>, "many">;
5392
5505
  }, "strip", z.ZodTypeAny, {
5393
5506
  name: string;
@@ -5506,6 +5619,10 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5506
5619
  title: string;
5507
5620
  description?: string | undefined;
5508
5621
  assignee_ref?: string | undefined;
5622
+ } | {
5623
+ input: Record<string, unknown>;
5624
+ type: "action";
5625
+ action_id: string;
5509
5626
  })[];
5510
5627
  when?: ZAutomationConditionGroup | undefined;
5511
5628
  is_fallback?: boolean | undefined;
@@ -5626,6 +5743,10 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5626
5743
  title: string;
5627
5744
  description?: string | undefined;
5628
5745
  assignee_ref?: string | undefined;
5746
+ } | {
5747
+ type: "action";
5748
+ action_id: string;
5749
+ input?: Record<string, unknown> | undefined;
5629
5750
  })[];
5630
5751
  when?: ZAutomationConditionGroup | undefined;
5631
5752
  is_fallback?: boolean | undefined;
@@ -5786,6 +5907,10 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5786
5907
  title: string;
5787
5908
  description?: string | undefined;
5788
5909
  assignee_ref?: string | undefined;
5910
+ } | {
5911
+ input: Record<string, unknown>;
5912
+ type: "action";
5913
+ action_id: string;
5789
5914
  })[];
5790
5915
  when?: ZAutomationConditionGroup | undefined;
5791
5916
  is_fallback?: boolean | undefined;
@@ -5942,6 +6067,10 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5942
6067
  title: string;
5943
6068
  description?: string | undefined;
5944
6069
  assignee_ref?: string | undefined;
6070
+ } | {
6071
+ type: "action";
6072
+ action_id: string;
6073
+ input?: Record<string, unknown> | undefined;
5945
6074
  })[];
5946
6075
  when?: ZAutomationConditionGroup | undefined;
5947
6076
  is_fallback?: boolean | undefined;
@@ -6103,6 +6232,10 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
6103
6232
  title: string;
6104
6233
  description?: string | undefined;
6105
6234
  assignee_ref?: string | undefined;
6235
+ } | {
6236
+ input: Record<string, unknown>;
6237
+ type: "action";
6238
+ action_id: string;
6106
6239
  })[];
6107
6240
  when?: ZAutomationConditionGroup | undefined;
6108
6241
  is_fallback?: boolean | undefined;
@@ -6262,6 +6395,10 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
6262
6395
  title: string;
6263
6396
  description?: string | undefined;
6264
6397
  assignee_ref?: string | undefined;
6398
+ } | {
6399
+ type: "action";
6400
+ action_id: string;
6401
+ input?: Record<string, unknown> | undefined;
6265
6402
  })[];
6266
6403
  when?: ZAutomationConditionGroup | undefined;
6267
6404
  is_fallback?: boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zAutomationTriggerRequestSchema = exports.zAutomationDryRunRequestSchema = exports.zHubAutomationConfigSchema = exports.zAutomationRoutineUpdateRequestSchema = exports.zAutomationRoutineWriteSchema = exports.zAutomationRoutineSchema = exports.zAutomationBranchModeSchema = exports.zAutomationBranchSchema = exports.zAutomationOutputSchema = exports.zAutomationHumanTaskOutputSchema = exports.zAutomationAutoTaskOutputSchema = exports.zAutomationExecuteAtSchema = exports.zAutomationConditionGroupSchema = exports.zAutomationConditionSchema = exports.zAutomationOperatorSchema = exports.zAutomationSelectionSchema = exports.zAutomationAppointmentSelectionSchema = exports.zAutomationDateWindowSchema = exports.zAutomationDateOffsetModeSchema = exports.zAutomationTriggerSchema = exports.zAutomationWebhookTriggerSchema = exports.zAutomationCronTriggerSchema = void 0;
3
+ exports.zAutomationTriggerRequestSchema = exports.zAutomationDryRunRequestSchema = exports.zHubAutomationConfigSchema = exports.zAutomationRoutineUpdateRequestSchema = exports.zAutomationRoutineWriteSchema = exports.zAutomationRoutineSchema = exports.zAutomationBranchModeSchema = exports.zAutomationBranchSchema = exports.zAutomationOutputSchema = exports.zAutomationActionOutputSchema = exports.zAutomationHumanTaskOutputSchema = exports.zAutomationAutoTaskOutputSchema = exports.zAutomationExecuteAtSchema = exports.zAutomationConditionGroupSchema = exports.zAutomationConditionSchema = exports.zAutomationOperatorSchema = exports.zAutomationSelectionSchema = exports.zAutomationAppointmentSelectionSchema = exports.zAutomationDateWindowSchema = exports.zAutomationDateOffsetModeSchema = exports.zAutomationTriggerSchema = exports.zAutomationWebhookTriggerSchema = exports.zAutomationCronTriggerSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../evo-task/zod-schemas");
6
6
  // ------------------------------------------------------
@@ -100,9 +100,20 @@ exports.zAutomationHumanTaskOutputSchema = zod_1.z.object({
100
100
  description: zod_1.z.string().optional(),
101
101
  assignee_ref: zod_1.z.string().optional(),
102
102
  });
103
+ // feat-084 (F2'): inline action output — runs a shared @evo/actions Action
104
+ // immediately (no Task/Runner delivery guarantee). `action_id` selects the
105
+ // registered action; `input` is the raw action input (the entity target lives
106
+ // IN the input, e.g. { appointment_id, calendar_id, ... }). Only idempotent
107
+ // actions are inline-eligible — enforced by the ActionRegistry, not here.
108
+ exports.zAutomationActionOutputSchema = zod_1.z.object({
109
+ type: zod_1.z.literal("action"),
110
+ action_id: zod_1.z.string().min(1),
111
+ input: zod_1.z.record(zod_1.z.unknown()).default({}),
112
+ });
103
113
  exports.zAutomationOutputSchema = zod_1.z.discriminatedUnion("type", [
104
114
  exports.zAutomationAutoTaskOutputSchema,
105
115
  exports.zAutomationHumanTaskOutputSchema,
116
+ exports.zAutomationActionOutputSchema,
106
117
  ]);
107
118
  // ------------------------------------------------------
108
119
  // Branches
@@ -128,9 +128,21 @@ export const zAutomationHumanTaskOutputSchema = z.object({
128
128
  assignee_ref: z.string().optional(),
129
129
  });
130
130
 
131
+ // feat-084 (F2'): inline action output — runs a shared @evo/actions Action
132
+ // immediately (no Task/Runner delivery guarantee). `action_id` selects the
133
+ // registered action; `input` is the raw action input (the entity target lives
134
+ // IN the input, e.g. { appointment_id, calendar_id, ... }). Only idempotent
135
+ // actions are inline-eligible — enforced by the ActionRegistry, not here.
136
+ export const zAutomationActionOutputSchema = z.object({
137
+ type: z.literal("action"),
138
+ action_id: z.string().min(1),
139
+ input: z.record(z.unknown()).default({}),
140
+ });
141
+
131
142
  export const zAutomationOutputSchema = z.discriminatedUnion("type", [
132
143
  zAutomationAutoTaskOutputSchema,
133
144
  zAutomationHumanTaskOutputSchema,
145
+ zAutomationActionOutputSchema,
134
146
  ]);
135
147
 
136
148
  // ------------------------------------------------------
@@ -74,7 +74,9 @@ export interface ITemplateButtonPayload {
74
74
  */
75
75
  export interface ITemplateHeaderMedia {
76
76
  type: "image" | "video" | "document";
77
- link: string;
77
+ link?: string;
78
+ gcs_uri?: string;
79
+ mime_type?: string;
78
80
  filename?: string;
79
81
  }
80
82
  /**
@@ -95,7 +95,9 @@ export interface ITemplateButtonPayload {
95
95
  */
96
96
  export interface ITemplateHeaderMedia {
97
97
  type: "image" | "video" | "document";
98
- link: string;
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
 
@@ -73,6 +73,7 @@ export interface IAutomationConditionGroup {
73
73
  export declare const AutomationOutputTypeEnum: {
74
74
  readonly AutoTask: "auto_task";
75
75
  readonly HumanTask: "human_task";
76
+ readonly Action: "action";
76
77
  };
77
78
  export type AutomationOutputType = (typeof AutomationOutputTypeEnum)[keyof typeof AutomationOutputTypeEnum];
78
79
  export type IAutomationExecuteAt = {
@@ -100,7 +101,12 @@ export interface IAutomationHumanTaskOutput {
100
101
  description?: string;
101
102
  assignee_ref?: string;
102
103
  }
103
- export type IAutomationOutput = IAutomationAutoTaskOutput | IAutomationHumanTaskOutput;
104
+ export interface IAutomationActionOutput {
105
+ type: "action";
106
+ action_id: string;
107
+ input: Record<string, unknown>;
108
+ }
109
+ export type IAutomationOutput = IAutomationAutoTaskOutput | IAutomationHumanTaskOutput | IAutomationActionOutput;
104
110
  export interface IAutomationBranch {
105
111
  id: string;
106
112
  name: string;
@@ -74,11 +74,13 @@ exports.AutomationOperatorEnum = {
74
74
  IsFalse: "is_false",
75
75
  };
76
76
  // ------------------------------------------------------
77
- // Outputs (auto Task | human Task)
77
+ // Outputs (auto Task | human Task | inline Action)
78
78
  // ------------------------------------------------------
79
79
  exports.AutomationOutputTypeEnum = {
80
80
  AutoTask: "auto_task",
81
81
  HumanTask: "human_task",
82
+ // feat-084 (F2'): inline shared @evo/actions Action (no Task/Runner).
83
+ Action: "action",
82
84
  };
83
85
  // ------------------------------------------------------
84
86
  // Run trace (Firestore doc: tenants/{t}/apps/hub-automation/runs/{runId})
@@ -173,11 +173,13 @@ export interface IAutomationConditionGroup {
173
173
  }
174
174
 
175
175
  // ------------------------------------------------------
176
- // Outputs (auto Task | human Task)
176
+ // Outputs (auto Task | human Task | inline Action)
177
177
  // ------------------------------------------------------
178
178
  export const AutomationOutputTypeEnum = {
179
179
  AutoTask: "auto_task",
180
180
  HumanTask: "human_task",
181
+ // feat-084 (F2'): inline shared @evo/actions Action (no Task/Runner).
182
+ Action: "action",
181
183
  } as const;
182
184
 
183
185
  export type AutomationOutputType =
@@ -226,9 +228,23 @@ export interface IAutomationHumanTaskOutput {
226
228
  assignee_ref?: string;
227
229
  }
228
230
 
231
+ // feat-084 (F2'): inline action output. Runs a shared @evo/actions Action
232
+ // immediately, in-process, with NO Task/Runner delivery guarantee or retry —
233
+ // use auto_task when guaranteed delivery/retry matters. `action_id` selects the
234
+ // action registered in buildDomainActionRegistry(); `input` is the raw action
235
+ // input, where the entity target lives (e.g. { appointment_id, calendar_id,
236
+ // status, status_base }). Only idempotent actions are inline-eligible (the
237
+ // ActionRegistry rejects non-idempotent ones at execution time).
238
+ export interface IAutomationActionOutput {
239
+ type: "action";
240
+ action_id: string;
241
+ input: Record<string, unknown>;
242
+ }
243
+
229
244
  export type IAutomationOutput =
230
245
  | IAutomationAutoTaskOutput
231
- | IAutomationHumanTaskOutput;
246
+ | IAutomationHumanTaskOutput
247
+ | IAutomationActionOutput;
232
248
 
233
249
  // ------------------------------------------------------
234
250
  // Branches
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.415",
3
+ "version": "1.3.417",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",