evo360-types 1.3.405 → 1.3.408

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.
@@ -0,0 +1,3322 @@
1
+ import { z } from "zod";
2
+ export declare const zAutomationCronTriggerSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"cron">;
4
+ cron: z.ZodObject<{
5
+ expression: z.ZodString;
6
+ timezone: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ expression: string;
9
+ timezone?: string | undefined;
10
+ }, {
11
+ expression: string;
12
+ timezone?: string | undefined;
13
+ }>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ type: "cron";
16
+ cron: {
17
+ expression: string;
18
+ timezone?: string | undefined;
19
+ };
20
+ }, {
21
+ type: "cron";
22
+ cron: {
23
+ expression: string;
24
+ timezone?: string | undefined;
25
+ };
26
+ }>;
27
+ export declare const zAutomationTriggerSchema: z.ZodObject<{
28
+ type: z.ZodLiteral<"cron">;
29
+ cron: z.ZodObject<{
30
+ expression: z.ZodString;
31
+ timezone: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ expression: string;
34
+ timezone?: string | undefined;
35
+ }, {
36
+ expression: string;
37
+ timezone?: string | undefined;
38
+ }>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ type: "cron";
41
+ cron: {
42
+ expression: string;
43
+ timezone?: string | undefined;
44
+ };
45
+ }, {
46
+ type: "cron";
47
+ cron: {
48
+ expression: string;
49
+ timezone?: string | undefined;
50
+ };
51
+ }>;
52
+ export declare const zAutomationDateOffsetModeSchema: z.ZodEnum<["calendar", "business"]>;
53
+ export declare const zAutomationDateWindowSchema: z.ZodObject<{
54
+ offset_days: z.ZodNumber;
55
+ offset_mode: z.ZodEnum<["calendar", "business"]>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ offset_days: number;
58
+ offset_mode: "calendar" | "business";
59
+ }, {
60
+ offset_days: number;
61
+ offset_mode: "calendar" | "business";
62
+ }>;
63
+ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
64
+ target: z.ZodLiteral<"appointment">;
65
+ appointment: z.ZodObject<{
66
+ calendar_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
67
+ date_window: z.ZodObject<{
68
+ offset_days: z.ZodNumber;
69
+ offset_mode: z.ZodEnum<["calendar", "business"]>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ offset_days: number;
72
+ offset_mode: "calendar" | "business";
73
+ }, {
74
+ offset_days: number;
75
+ offset_mode: "calendar" | "business";
76
+ }>;
77
+ status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
78
+ status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
79
+ appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ date_window: {
82
+ offset_days: number;
83
+ offset_mode: "calendar" | "business";
84
+ };
85
+ calendar_ids?: string[] | undefined;
86
+ status_in?: string[] | undefined;
87
+ status_base_in?: string[] | undefined;
88
+ appointment_type_not_in?: string[] | undefined;
89
+ }, {
90
+ date_window: {
91
+ offset_days: number;
92
+ offset_mode: "calendar" | "business";
93
+ };
94
+ calendar_ids?: string[] | undefined;
95
+ status_in?: string[] | undefined;
96
+ status_base_in?: string[] | undefined;
97
+ appointment_type_not_in?: string[] | undefined;
98
+ }>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ appointment: {
101
+ date_window: {
102
+ offset_days: number;
103
+ offset_mode: "calendar" | "business";
104
+ };
105
+ calendar_ids?: string[] | undefined;
106
+ status_in?: string[] | undefined;
107
+ status_base_in?: string[] | undefined;
108
+ appointment_type_not_in?: string[] | undefined;
109
+ };
110
+ target: "appointment";
111
+ }, {
112
+ appointment: {
113
+ date_window: {
114
+ offset_days: number;
115
+ offset_mode: "calendar" | "business";
116
+ };
117
+ calendar_ids?: string[] | undefined;
118
+ status_in?: string[] | undefined;
119
+ status_base_in?: string[] | undefined;
120
+ appointment_type_not_in?: string[] | undefined;
121
+ };
122
+ target: "appointment";
123
+ }>;
124
+ export declare const zAutomationSelectionSchema: z.ZodObject<{
125
+ target: z.ZodLiteral<"appointment">;
126
+ appointment: z.ZodObject<{
127
+ calendar_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
128
+ date_window: z.ZodObject<{
129
+ offset_days: z.ZodNumber;
130
+ offset_mode: z.ZodEnum<["calendar", "business"]>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ offset_days: number;
133
+ offset_mode: "calendar" | "business";
134
+ }, {
135
+ offset_days: number;
136
+ offset_mode: "calendar" | "business";
137
+ }>;
138
+ status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
139
+ status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
140
+ appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ date_window: {
143
+ offset_days: number;
144
+ offset_mode: "calendar" | "business";
145
+ };
146
+ calendar_ids?: string[] | undefined;
147
+ status_in?: string[] | undefined;
148
+ status_base_in?: string[] | undefined;
149
+ appointment_type_not_in?: string[] | undefined;
150
+ }, {
151
+ date_window: {
152
+ offset_days: number;
153
+ offset_mode: "calendar" | "business";
154
+ };
155
+ calendar_ids?: string[] | undefined;
156
+ status_in?: string[] | undefined;
157
+ status_base_in?: string[] | undefined;
158
+ appointment_type_not_in?: string[] | undefined;
159
+ }>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ appointment: {
162
+ date_window: {
163
+ offset_days: number;
164
+ offset_mode: "calendar" | "business";
165
+ };
166
+ calendar_ids?: string[] | undefined;
167
+ status_in?: string[] | undefined;
168
+ status_base_in?: string[] | undefined;
169
+ appointment_type_not_in?: string[] | undefined;
170
+ };
171
+ target: "appointment";
172
+ }, {
173
+ appointment: {
174
+ date_window: {
175
+ offset_days: number;
176
+ offset_mode: "calendar" | "business";
177
+ };
178
+ calendar_ids?: string[] | undefined;
179
+ status_in?: string[] | undefined;
180
+ status_base_in?: string[] | undefined;
181
+ appointment_type_not_in?: string[] | undefined;
182
+ };
183
+ target: "appointment";
184
+ }>;
185
+ export declare const zAutomationOperatorSchema: z.ZodEnum<["eq", "neq", "in", "not_in", "exists", "not_exists", "is_true", "is_false"]>;
186
+ export declare const zAutomationConditionSchema: z.ZodObject<{
187
+ fact: z.ZodString;
188
+ operator: z.ZodEnum<["eq", "neq", "in", "not_in", "exists", "not_exists", "is_true", "is_false"]>;
189
+ value: z.ZodOptional<z.ZodUnknown>;
190
+ }, "strip", z.ZodTypeAny, {
191
+ operator: "in" | "eq" | "neq" | "not_in" | "exists" | "not_exists" | "is_true" | "is_false";
192
+ fact: string;
193
+ value?: unknown;
194
+ }, {
195
+ operator: "in" | "eq" | "neq" | "not_in" | "exists" | "not_exists" | "is_true" | "is_false";
196
+ fact: string;
197
+ value?: unknown;
198
+ }>;
199
+ type ZAutomationConditionGroup = {
200
+ combinator: "and" | "or";
201
+ conditions: Array<z.infer<typeof zAutomationConditionSchema> | ZAutomationConditionGroup>;
202
+ };
203
+ export declare const zAutomationConditionGroupSchema: z.ZodType<ZAutomationConditionGroup>;
204
+ export declare const zAutomationExecuteAtSchema: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
205
+ rule: z.ZodLiteral<"immediate">;
206
+ }, "strip", z.ZodTypeAny, {
207
+ rule: "immediate";
208
+ }, {
209
+ rule: "immediate";
210
+ }>, z.ZodObject<{
211
+ rule: z.ZodLiteral<"send_at_local">;
212
+ time: z.ZodString;
213
+ base: z.ZodEnum<["target_date", "run_date"]>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ base: "target_date" | "run_date";
216
+ time: string;
217
+ rule: "send_at_local";
218
+ }, {
219
+ base: "target_date" | "run_date";
220
+ time: string;
221
+ rule: "send_at_local";
222
+ }>]>;
223
+ export declare const zAutomationAutoTaskOutputSchema: z.ZodObject<{
224
+ type: z.ZodLiteral<"auto_task">;
225
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
226
+ kind: z.ZodString;
227
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
228
+ execute_at: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
229
+ rule: z.ZodLiteral<"immediate">;
230
+ }, "strip", z.ZodTypeAny, {
231
+ rule: "immediate";
232
+ }, {
233
+ rule: "immediate";
234
+ }>, z.ZodObject<{
235
+ rule: z.ZodLiteral<"send_at_local">;
236
+ time: z.ZodString;
237
+ base: z.ZodEnum<["target_date", "run_date"]>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ base: "target_date" | "run_date";
240
+ time: string;
241
+ rule: "send_at_local";
242
+ }, {
243
+ base: "target_date" | "run_date";
244
+ time: string;
245
+ rule: "send_at_local";
246
+ }>]>;
247
+ retry: z.ZodOptional<z.ZodObject<{
248
+ max_attempts: z.ZodNumber;
249
+ attempt: z.ZodNumber;
250
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
251
+ backoff_seconds: z.ZodNumber;
252
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
253
+ last_error: z.ZodOptional<z.ZodObject<{
254
+ message: z.ZodString;
255
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
256
+ at: z.ZodDate;
257
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ message: string;
260
+ at: Date;
261
+ code?: string | number | undefined;
262
+ details?: Record<string, unknown> | undefined;
263
+ }, {
264
+ message: string;
265
+ at: Date;
266
+ code?: string | number | undefined;
267
+ details?: Record<string, unknown> | undefined;
268
+ }>>;
269
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
270
+ max_attempts: z.ZodNumber;
271
+ attempt: z.ZodNumber;
272
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
273
+ backoff_seconds: z.ZodNumber;
274
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
275
+ last_error: z.ZodOptional<z.ZodObject<{
276
+ message: z.ZodString;
277
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
278
+ at: z.ZodDate;
279
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ message: string;
282
+ at: Date;
283
+ code?: string | number | undefined;
284
+ details?: Record<string, unknown> | undefined;
285
+ }, {
286
+ message: string;
287
+ at: Date;
288
+ code?: string | number | undefined;
289
+ details?: Record<string, unknown> | undefined;
290
+ }>>;
291
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
292
+ max_attempts: z.ZodNumber;
293
+ attempt: z.ZodNumber;
294
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
295
+ backoff_seconds: z.ZodNumber;
296
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
297
+ last_error: z.ZodOptional<z.ZodObject<{
298
+ message: z.ZodString;
299
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
300
+ at: z.ZodDate;
301
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ message: string;
304
+ at: Date;
305
+ code?: string | number | undefined;
306
+ details?: Record<string, unknown> | undefined;
307
+ }, {
308
+ message: string;
309
+ at: Date;
310
+ code?: string | number | undefined;
311
+ details?: Record<string, unknown> | undefined;
312
+ }>>;
313
+ }, z.ZodTypeAny, "passthrough">>>;
314
+ on_failure: z.ZodOptional<z.ZodObject<{
315
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
316
+ name: z.ZodOptional<z.ZodString>;
317
+ ref: z.ZodOptional<z.ZodAny>;
318
+ }, "strip", z.ZodTypeAny, {
319
+ name?: string | undefined;
320
+ ref?: any;
321
+ }, {
322
+ name?: string | undefined;
323
+ ref?: any;
324
+ }>>;
325
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
326
+ title: z.ZodOptional<z.ZodString>;
327
+ description: z.ZodOptional<z.ZodString>;
328
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
329
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
330
+ name: z.ZodString;
331
+ color: z.ZodOptional<z.ZodString>;
332
+ hidden: z.ZodBoolean;
333
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
334
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ name: string;
337
+ hidden: boolean;
338
+ base?: boolean | undefined;
339
+ color?: string | undefined;
340
+ category?: string | null | undefined;
341
+ }, {
342
+ name: string;
343
+ hidden: boolean;
344
+ base?: boolean | undefined;
345
+ color?: string | undefined;
346
+ category?: string | null | undefined;
347
+ }>, "many">>>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ description?: string | undefined;
350
+ tags?: {
351
+ name: string;
352
+ hidden: boolean;
353
+ base?: boolean | undefined;
354
+ color?: string | undefined;
355
+ category?: string | null | undefined;
356
+ }[] | null | undefined;
357
+ title?: string | undefined;
358
+ priority?: "low" | "medium" | "high" | undefined;
359
+ }, {
360
+ description?: string | undefined;
361
+ tags?: {
362
+ name: string;
363
+ hidden: boolean;
364
+ base?: boolean | undefined;
365
+ color?: string | undefined;
366
+ category?: string | null | undefined;
367
+ }[] | null | undefined;
368
+ title?: string | undefined;
369
+ priority?: "low" | "medium" | "high" | undefined;
370
+ }>>;
371
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
372
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
373
+ kind: z.ZodString;
374
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
375
+ }, "strip", z.ZodTypeAny, {
376
+ kind: string;
377
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
378
+ payload: Record<string, unknown>;
379
+ }, {
380
+ kind: string;
381
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
382
+ payload: Record<string, unknown>;
383
+ }>, "many">>;
384
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
385
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
386
+ name: z.ZodOptional<z.ZodString>;
387
+ ref: z.ZodOptional<z.ZodAny>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ name?: string | undefined;
390
+ ref?: any;
391
+ }, {
392
+ name?: string | undefined;
393
+ ref?: any;
394
+ }>>;
395
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
396
+ title: z.ZodOptional<z.ZodString>;
397
+ description: z.ZodOptional<z.ZodString>;
398
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
399
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
400
+ name: z.ZodString;
401
+ color: z.ZodOptional<z.ZodString>;
402
+ hidden: z.ZodBoolean;
403
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
404
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ name: string;
407
+ hidden: boolean;
408
+ base?: boolean | undefined;
409
+ color?: string | undefined;
410
+ category?: string | null | undefined;
411
+ }, {
412
+ name: string;
413
+ hidden: boolean;
414
+ base?: boolean | undefined;
415
+ color?: string | undefined;
416
+ category?: string | null | undefined;
417
+ }>, "many">>>;
418
+ }, "strip", z.ZodTypeAny, {
419
+ description?: string | undefined;
420
+ tags?: {
421
+ name: string;
422
+ hidden: boolean;
423
+ base?: boolean | undefined;
424
+ color?: string | undefined;
425
+ category?: string | null | undefined;
426
+ }[] | null | undefined;
427
+ title?: string | undefined;
428
+ priority?: "low" | "medium" | "high" | undefined;
429
+ }, {
430
+ description?: string | undefined;
431
+ tags?: {
432
+ name: string;
433
+ hidden: boolean;
434
+ base?: boolean | undefined;
435
+ color?: string | undefined;
436
+ category?: string | null | undefined;
437
+ }[] | null | undefined;
438
+ title?: string | undefined;
439
+ priority?: "low" | "medium" | "high" | undefined;
440
+ }>>;
441
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
442
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
443
+ kind: z.ZodString;
444
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
445
+ }, "strip", z.ZodTypeAny, {
446
+ kind: string;
447
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
448
+ payload: Record<string, unknown>;
449
+ }, {
450
+ kind: string;
451
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
452
+ payload: Record<string, unknown>;
453
+ }>, "many">>;
454
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
455
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
456
+ name: z.ZodOptional<z.ZodString>;
457
+ ref: z.ZodOptional<z.ZodAny>;
458
+ }, "strip", z.ZodTypeAny, {
459
+ name?: string | undefined;
460
+ ref?: any;
461
+ }, {
462
+ name?: string | undefined;
463
+ ref?: any;
464
+ }>>;
465
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
466
+ title: z.ZodOptional<z.ZodString>;
467
+ description: z.ZodOptional<z.ZodString>;
468
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
469
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
470
+ name: z.ZodString;
471
+ color: z.ZodOptional<z.ZodString>;
472
+ hidden: z.ZodBoolean;
473
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
474
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
475
+ }, "strip", z.ZodTypeAny, {
476
+ name: string;
477
+ hidden: boolean;
478
+ base?: boolean | undefined;
479
+ color?: string | undefined;
480
+ category?: string | null | undefined;
481
+ }, {
482
+ name: string;
483
+ hidden: boolean;
484
+ base?: boolean | undefined;
485
+ color?: string | undefined;
486
+ category?: string | null | undefined;
487
+ }>, "many">>>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ description?: string | undefined;
490
+ tags?: {
491
+ name: string;
492
+ hidden: boolean;
493
+ base?: boolean | undefined;
494
+ color?: string | undefined;
495
+ category?: string | null | undefined;
496
+ }[] | null | undefined;
497
+ title?: string | undefined;
498
+ priority?: "low" | "medium" | "high" | undefined;
499
+ }, {
500
+ description?: string | undefined;
501
+ tags?: {
502
+ name: string;
503
+ hidden: boolean;
504
+ base?: boolean | undefined;
505
+ color?: string | undefined;
506
+ category?: string | null | undefined;
507
+ }[] | null | undefined;
508
+ title?: string | undefined;
509
+ priority?: "low" | "medium" | "high" | undefined;
510
+ }>>;
511
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
512
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
513
+ kind: z.ZodString;
514
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
515
+ }, "strip", z.ZodTypeAny, {
516
+ kind: string;
517
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
518
+ payload: Record<string, unknown>;
519
+ }, {
520
+ kind: string;
521
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
522
+ payload: Record<string, unknown>;
523
+ }>, "many">>;
524
+ }, z.ZodTypeAny, "passthrough">>>;
525
+ }, "strip", z.ZodTypeAny, {
526
+ type: "auto_task";
527
+ kind: string;
528
+ execute_at: {
529
+ rule: "immediate";
530
+ } | {
531
+ base: "target_date" | "run_date";
532
+ time: string;
533
+ rule: "send_at_local";
534
+ };
535
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
536
+ payload: Record<string, unknown>;
537
+ retry?: z.objectOutputType<{
538
+ max_attempts: z.ZodNumber;
539
+ attempt: z.ZodNumber;
540
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
541
+ backoff_seconds: z.ZodNumber;
542
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
543
+ last_error: z.ZodOptional<z.ZodObject<{
544
+ message: z.ZodString;
545
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
546
+ at: z.ZodDate;
547
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ message: string;
550
+ at: Date;
551
+ code?: string | number | undefined;
552
+ details?: Record<string, unknown> | undefined;
553
+ }, {
554
+ message: string;
555
+ at: Date;
556
+ code?: string | number | undefined;
557
+ details?: Record<string, unknown> | undefined;
558
+ }>>;
559
+ }, z.ZodTypeAny, "passthrough"> | undefined;
560
+ on_failure?: z.objectOutputType<{
561
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
562
+ name: z.ZodOptional<z.ZodString>;
563
+ ref: z.ZodOptional<z.ZodAny>;
564
+ }, "strip", z.ZodTypeAny, {
565
+ name?: string | undefined;
566
+ ref?: any;
567
+ }, {
568
+ name?: string | undefined;
569
+ ref?: any;
570
+ }>>;
571
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
572
+ title: z.ZodOptional<z.ZodString>;
573
+ description: z.ZodOptional<z.ZodString>;
574
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
575
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
576
+ name: z.ZodString;
577
+ color: z.ZodOptional<z.ZodString>;
578
+ hidden: z.ZodBoolean;
579
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
581
+ }, "strip", z.ZodTypeAny, {
582
+ name: string;
583
+ hidden: boolean;
584
+ base?: boolean | undefined;
585
+ color?: string | undefined;
586
+ category?: string | null | undefined;
587
+ }, {
588
+ name: string;
589
+ hidden: boolean;
590
+ base?: boolean | undefined;
591
+ color?: string | undefined;
592
+ category?: string | null | undefined;
593
+ }>, "many">>>;
594
+ }, "strip", z.ZodTypeAny, {
595
+ description?: string | undefined;
596
+ tags?: {
597
+ name: string;
598
+ hidden: boolean;
599
+ base?: boolean | undefined;
600
+ color?: string | undefined;
601
+ category?: string | null | undefined;
602
+ }[] | null | undefined;
603
+ title?: string | undefined;
604
+ priority?: "low" | "medium" | "high" | undefined;
605
+ }, {
606
+ description?: string | undefined;
607
+ tags?: {
608
+ name: string;
609
+ hidden: boolean;
610
+ base?: boolean | undefined;
611
+ color?: string | undefined;
612
+ category?: string | null | undefined;
613
+ }[] | null | undefined;
614
+ title?: string | undefined;
615
+ priority?: "low" | "medium" | "high" | undefined;
616
+ }>>;
617
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
618
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
619
+ kind: z.ZodString;
620
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ kind: string;
623
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
624
+ payload: Record<string, unknown>;
625
+ }, {
626
+ kind: string;
627
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
628
+ payload: Record<string, unknown>;
629
+ }>, "many">>;
630
+ }, z.ZodTypeAny, "passthrough"> | undefined;
631
+ }, {
632
+ type: "auto_task";
633
+ kind: string;
634
+ execute_at: {
635
+ rule: "immediate";
636
+ } | {
637
+ base: "target_date" | "run_date";
638
+ time: string;
639
+ rule: "send_at_local";
640
+ };
641
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
642
+ payload?: Record<string, unknown> | undefined;
643
+ retry?: z.objectInputType<{
644
+ max_attempts: z.ZodNumber;
645
+ attempt: z.ZodNumber;
646
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
647
+ backoff_seconds: z.ZodNumber;
648
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
649
+ last_error: z.ZodOptional<z.ZodObject<{
650
+ message: z.ZodString;
651
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
652
+ at: z.ZodDate;
653
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ message: string;
656
+ at: Date;
657
+ code?: string | number | undefined;
658
+ details?: Record<string, unknown> | undefined;
659
+ }, {
660
+ message: string;
661
+ at: Date;
662
+ code?: string | number | undefined;
663
+ details?: Record<string, unknown> | undefined;
664
+ }>>;
665
+ }, z.ZodTypeAny, "passthrough"> | undefined;
666
+ on_failure?: z.objectInputType<{
667
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
668
+ name: z.ZodOptional<z.ZodString>;
669
+ ref: z.ZodOptional<z.ZodAny>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ name?: string | undefined;
672
+ ref?: any;
673
+ }, {
674
+ name?: string | undefined;
675
+ ref?: any;
676
+ }>>;
677
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
678
+ title: z.ZodOptional<z.ZodString>;
679
+ description: z.ZodOptional<z.ZodString>;
680
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
681
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
682
+ name: z.ZodString;
683
+ color: z.ZodOptional<z.ZodString>;
684
+ hidden: z.ZodBoolean;
685
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
686
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
687
+ }, "strip", z.ZodTypeAny, {
688
+ name: string;
689
+ hidden: boolean;
690
+ base?: boolean | undefined;
691
+ color?: string | undefined;
692
+ category?: string | null | undefined;
693
+ }, {
694
+ name: string;
695
+ hidden: boolean;
696
+ base?: boolean | undefined;
697
+ color?: string | undefined;
698
+ category?: string | null | undefined;
699
+ }>, "many">>>;
700
+ }, "strip", z.ZodTypeAny, {
701
+ description?: string | undefined;
702
+ tags?: {
703
+ name: string;
704
+ hidden: boolean;
705
+ base?: boolean | undefined;
706
+ color?: string | undefined;
707
+ category?: string | null | undefined;
708
+ }[] | null | undefined;
709
+ title?: string | undefined;
710
+ priority?: "low" | "medium" | "high" | undefined;
711
+ }, {
712
+ description?: string | undefined;
713
+ tags?: {
714
+ name: string;
715
+ hidden: boolean;
716
+ base?: boolean | undefined;
717
+ color?: string | undefined;
718
+ category?: string | null | undefined;
719
+ }[] | null | undefined;
720
+ title?: string | undefined;
721
+ priority?: "low" | "medium" | "high" | undefined;
722
+ }>>;
723
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
724
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
725
+ kind: z.ZodString;
726
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ kind: string;
729
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
730
+ payload: Record<string, unknown>;
731
+ }, {
732
+ kind: string;
733
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
734
+ payload: Record<string, unknown>;
735
+ }>, "many">>;
736
+ }, z.ZodTypeAny, "passthrough"> | undefined;
737
+ }>;
738
+ export declare const zAutomationHumanTaskOutputSchema: z.ZodObject<{
739
+ type: z.ZodLiteral<"human_task">;
740
+ title: z.ZodString;
741
+ description: z.ZodOptional<z.ZodString>;
742
+ assignee_ref: z.ZodOptional<z.ZodString>;
743
+ }, "strip", z.ZodTypeAny, {
744
+ type: "human_task";
745
+ title: string;
746
+ description?: string | undefined;
747
+ assignee_ref?: string | undefined;
748
+ }, {
749
+ type: "human_task";
750
+ title: string;
751
+ description?: string | undefined;
752
+ assignee_ref?: string | undefined;
753
+ }>;
754
+ export declare const zAutomationOutputSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
755
+ type: z.ZodLiteral<"auto_task">;
756
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
757
+ kind: z.ZodString;
758
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
759
+ execute_at: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
760
+ rule: z.ZodLiteral<"immediate">;
761
+ }, "strip", z.ZodTypeAny, {
762
+ rule: "immediate";
763
+ }, {
764
+ rule: "immediate";
765
+ }>, z.ZodObject<{
766
+ rule: z.ZodLiteral<"send_at_local">;
767
+ time: z.ZodString;
768
+ base: z.ZodEnum<["target_date", "run_date"]>;
769
+ }, "strip", z.ZodTypeAny, {
770
+ base: "target_date" | "run_date";
771
+ time: string;
772
+ rule: "send_at_local";
773
+ }, {
774
+ base: "target_date" | "run_date";
775
+ time: string;
776
+ rule: "send_at_local";
777
+ }>]>;
778
+ retry: z.ZodOptional<z.ZodObject<{
779
+ max_attempts: z.ZodNumber;
780
+ attempt: z.ZodNumber;
781
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
782
+ backoff_seconds: z.ZodNumber;
783
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
784
+ last_error: z.ZodOptional<z.ZodObject<{
785
+ message: z.ZodString;
786
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
787
+ at: z.ZodDate;
788
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
789
+ }, "strip", z.ZodTypeAny, {
790
+ message: string;
791
+ at: Date;
792
+ code?: string | number | undefined;
793
+ details?: Record<string, unknown> | undefined;
794
+ }, {
795
+ message: string;
796
+ at: Date;
797
+ code?: string | number | undefined;
798
+ details?: Record<string, unknown> | undefined;
799
+ }>>;
800
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
801
+ max_attempts: z.ZodNumber;
802
+ attempt: z.ZodNumber;
803
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
804
+ backoff_seconds: z.ZodNumber;
805
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
806
+ last_error: z.ZodOptional<z.ZodObject<{
807
+ message: z.ZodString;
808
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
809
+ at: z.ZodDate;
810
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
811
+ }, "strip", z.ZodTypeAny, {
812
+ message: string;
813
+ at: Date;
814
+ code?: string | number | undefined;
815
+ details?: Record<string, unknown> | undefined;
816
+ }, {
817
+ message: string;
818
+ at: Date;
819
+ code?: string | number | undefined;
820
+ details?: Record<string, unknown> | undefined;
821
+ }>>;
822
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
823
+ max_attempts: z.ZodNumber;
824
+ attempt: z.ZodNumber;
825
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
826
+ backoff_seconds: z.ZodNumber;
827
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
828
+ last_error: z.ZodOptional<z.ZodObject<{
829
+ message: z.ZodString;
830
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
831
+ at: z.ZodDate;
832
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
833
+ }, "strip", z.ZodTypeAny, {
834
+ message: string;
835
+ at: Date;
836
+ code?: string | number | undefined;
837
+ details?: Record<string, unknown> | undefined;
838
+ }, {
839
+ message: string;
840
+ at: Date;
841
+ code?: string | number | undefined;
842
+ details?: Record<string, unknown> | undefined;
843
+ }>>;
844
+ }, z.ZodTypeAny, "passthrough">>>;
845
+ on_failure: z.ZodOptional<z.ZodObject<{
846
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
847
+ name: z.ZodOptional<z.ZodString>;
848
+ ref: z.ZodOptional<z.ZodAny>;
849
+ }, "strip", z.ZodTypeAny, {
850
+ name?: string | undefined;
851
+ ref?: any;
852
+ }, {
853
+ name?: string | undefined;
854
+ ref?: any;
855
+ }>>;
856
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
857
+ title: z.ZodOptional<z.ZodString>;
858
+ description: z.ZodOptional<z.ZodString>;
859
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
860
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
861
+ name: z.ZodString;
862
+ color: z.ZodOptional<z.ZodString>;
863
+ hidden: z.ZodBoolean;
864
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
865
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
866
+ }, "strip", z.ZodTypeAny, {
867
+ name: string;
868
+ hidden: boolean;
869
+ base?: boolean | undefined;
870
+ color?: string | undefined;
871
+ category?: string | null | undefined;
872
+ }, {
873
+ name: string;
874
+ hidden: boolean;
875
+ base?: boolean | undefined;
876
+ color?: string | undefined;
877
+ category?: string | null | undefined;
878
+ }>, "many">>>;
879
+ }, "strip", z.ZodTypeAny, {
880
+ description?: string | undefined;
881
+ tags?: {
882
+ name: string;
883
+ hidden: boolean;
884
+ base?: boolean | undefined;
885
+ color?: string | undefined;
886
+ category?: string | null | undefined;
887
+ }[] | null | undefined;
888
+ title?: string | undefined;
889
+ priority?: "low" | "medium" | "high" | undefined;
890
+ }, {
891
+ description?: string | undefined;
892
+ tags?: {
893
+ name: string;
894
+ hidden: boolean;
895
+ base?: boolean | undefined;
896
+ color?: string | undefined;
897
+ category?: string | null | undefined;
898
+ }[] | null | undefined;
899
+ title?: string | undefined;
900
+ priority?: "low" | "medium" | "high" | undefined;
901
+ }>>;
902
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
903
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
904
+ kind: z.ZodString;
905
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
906
+ }, "strip", z.ZodTypeAny, {
907
+ kind: string;
908
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
909
+ payload: Record<string, unknown>;
910
+ }, {
911
+ kind: string;
912
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
913
+ payload: Record<string, unknown>;
914
+ }>, "many">>;
915
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
916
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
917
+ name: z.ZodOptional<z.ZodString>;
918
+ ref: z.ZodOptional<z.ZodAny>;
919
+ }, "strip", z.ZodTypeAny, {
920
+ name?: string | undefined;
921
+ ref?: any;
922
+ }, {
923
+ name?: string | undefined;
924
+ ref?: any;
925
+ }>>;
926
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
927
+ title: z.ZodOptional<z.ZodString>;
928
+ description: z.ZodOptional<z.ZodString>;
929
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
930
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
931
+ name: z.ZodString;
932
+ color: z.ZodOptional<z.ZodString>;
933
+ hidden: z.ZodBoolean;
934
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
935
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
936
+ }, "strip", z.ZodTypeAny, {
937
+ name: string;
938
+ hidden: boolean;
939
+ base?: boolean | undefined;
940
+ color?: string | undefined;
941
+ category?: string | null | undefined;
942
+ }, {
943
+ name: string;
944
+ hidden: boolean;
945
+ base?: boolean | undefined;
946
+ color?: string | undefined;
947
+ category?: string | null | undefined;
948
+ }>, "many">>>;
949
+ }, "strip", z.ZodTypeAny, {
950
+ description?: string | undefined;
951
+ tags?: {
952
+ name: string;
953
+ hidden: boolean;
954
+ base?: boolean | undefined;
955
+ color?: string | undefined;
956
+ category?: string | null | undefined;
957
+ }[] | null | undefined;
958
+ title?: string | undefined;
959
+ priority?: "low" | "medium" | "high" | undefined;
960
+ }, {
961
+ description?: string | undefined;
962
+ tags?: {
963
+ name: string;
964
+ hidden: boolean;
965
+ base?: boolean | undefined;
966
+ color?: string | undefined;
967
+ category?: string | null | undefined;
968
+ }[] | null | undefined;
969
+ title?: string | undefined;
970
+ priority?: "low" | "medium" | "high" | undefined;
971
+ }>>;
972
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
973
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
974
+ kind: z.ZodString;
975
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
976
+ }, "strip", z.ZodTypeAny, {
977
+ kind: string;
978
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
979
+ payload: Record<string, unknown>;
980
+ }, {
981
+ kind: string;
982
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
983
+ payload: Record<string, unknown>;
984
+ }>, "many">>;
985
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
986
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
987
+ name: z.ZodOptional<z.ZodString>;
988
+ ref: z.ZodOptional<z.ZodAny>;
989
+ }, "strip", z.ZodTypeAny, {
990
+ name?: string | undefined;
991
+ ref?: any;
992
+ }, {
993
+ name?: string | undefined;
994
+ ref?: any;
995
+ }>>;
996
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
997
+ title: z.ZodOptional<z.ZodString>;
998
+ description: z.ZodOptional<z.ZodString>;
999
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1000
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1001
+ name: z.ZodString;
1002
+ color: z.ZodOptional<z.ZodString>;
1003
+ hidden: z.ZodBoolean;
1004
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1005
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1006
+ }, "strip", z.ZodTypeAny, {
1007
+ name: string;
1008
+ hidden: boolean;
1009
+ base?: boolean | undefined;
1010
+ color?: string | undefined;
1011
+ category?: string | null | undefined;
1012
+ }, {
1013
+ name: string;
1014
+ hidden: boolean;
1015
+ base?: boolean | undefined;
1016
+ color?: string | undefined;
1017
+ category?: string | null | undefined;
1018
+ }>, "many">>>;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ description?: string | undefined;
1021
+ tags?: {
1022
+ name: string;
1023
+ hidden: boolean;
1024
+ base?: boolean | undefined;
1025
+ color?: string | undefined;
1026
+ category?: string | null | undefined;
1027
+ }[] | null | undefined;
1028
+ title?: string | undefined;
1029
+ priority?: "low" | "medium" | "high" | undefined;
1030
+ }, {
1031
+ description?: string | undefined;
1032
+ tags?: {
1033
+ name: string;
1034
+ hidden: boolean;
1035
+ base?: boolean | undefined;
1036
+ color?: string | undefined;
1037
+ category?: string | null | undefined;
1038
+ }[] | null | undefined;
1039
+ title?: string | undefined;
1040
+ priority?: "low" | "medium" | "high" | undefined;
1041
+ }>>;
1042
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1043
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1044
+ kind: z.ZodString;
1045
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1046
+ }, "strip", z.ZodTypeAny, {
1047
+ kind: string;
1048
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1049
+ payload: Record<string, unknown>;
1050
+ }, {
1051
+ kind: string;
1052
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1053
+ payload: Record<string, unknown>;
1054
+ }>, "many">>;
1055
+ }, z.ZodTypeAny, "passthrough">>>;
1056
+ }, "strip", z.ZodTypeAny, {
1057
+ type: "auto_task";
1058
+ kind: string;
1059
+ execute_at: {
1060
+ rule: "immediate";
1061
+ } | {
1062
+ base: "target_date" | "run_date";
1063
+ time: string;
1064
+ rule: "send_at_local";
1065
+ };
1066
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1067
+ payload: Record<string, unknown>;
1068
+ retry?: z.objectOutputType<{
1069
+ max_attempts: z.ZodNumber;
1070
+ attempt: z.ZodNumber;
1071
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1072
+ backoff_seconds: z.ZodNumber;
1073
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1074
+ last_error: z.ZodOptional<z.ZodObject<{
1075
+ message: z.ZodString;
1076
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1077
+ at: z.ZodDate;
1078
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1079
+ }, "strip", z.ZodTypeAny, {
1080
+ message: string;
1081
+ at: Date;
1082
+ code?: string | number | undefined;
1083
+ details?: Record<string, unknown> | undefined;
1084
+ }, {
1085
+ message: string;
1086
+ at: Date;
1087
+ code?: string | number | undefined;
1088
+ details?: Record<string, unknown> | undefined;
1089
+ }>>;
1090
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1091
+ on_failure?: z.objectOutputType<{
1092
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1093
+ name: z.ZodOptional<z.ZodString>;
1094
+ ref: z.ZodOptional<z.ZodAny>;
1095
+ }, "strip", z.ZodTypeAny, {
1096
+ name?: string | undefined;
1097
+ ref?: any;
1098
+ }, {
1099
+ name?: string | undefined;
1100
+ ref?: any;
1101
+ }>>;
1102
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1103
+ title: z.ZodOptional<z.ZodString>;
1104
+ description: z.ZodOptional<z.ZodString>;
1105
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1106
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1107
+ name: z.ZodString;
1108
+ color: z.ZodOptional<z.ZodString>;
1109
+ hidden: z.ZodBoolean;
1110
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1111
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1112
+ }, "strip", z.ZodTypeAny, {
1113
+ name: string;
1114
+ hidden: boolean;
1115
+ base?: boolean | undefined;
1116
+ color?: string | undefined;
1117
+ category?: string | null | undefined;
1118
+ }, {
1119
+ name: string;
1120
+ hidden: boolean;
1121
+ base?: boolean | undefined;
1122
+ color?: string | undefined;
1123
+ category?: string | null | undefined;
1124
+ }>, "many">>>;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ description?: string | undefined;
1127
+ tags?: {
1128
+ name: string;
1129
+ hidden: boolean;
1130
+ base?: boolean | undefined;
1131
+ color?: string | undefined;
1132
+ category?: string | null | undefined;
1133
+ }[] | null | undefined;
1134
+ title?: string | undefined;
1135
+ priority?: "low" | "medium" | "high" | undefined;
1136
+ }, {
1137
+ description?: string | undefined;
1138
+ tags?: {
1139
+ name: string;
1140
+ hidden: boolean;
1141
+ base?: boolean | undefined;
1142
+ color?: string | undefined;
1143
+ category?: string | null | undefined;
1144
+ }[] | null | undefined;
1145
+ title?: string | undefined;
1146
+ priority?: "low" | "medium" | "high" | undefined;
1147
+ }>>;
1148
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1149
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1150
+ kind: z.ZodString;
1151
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1152
+ }, "strip", z.ZodTypeAny, {
1153
+ kind: string;
1154
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1155
+ payload: Record<string, unknown>;
1156
+ }, {
1157
+ kind: string;
1158
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1159
+ payload: Record<string, unknown>;
1160
+ }>, "many">>;
1161
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1162
+ }, {
1163
+ type: "auto_task";
1164
+ kind: string;
1165
+ execute_at: {
1166
+ rule: "immediate";
1167
+ } | {
1168
+ base: "target_date" | "run_date";
1169
+ time: string;
1170
+ rule: "send_at_local";
1171
+ };
1172
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1173
+ payload?: Record<string, unknown> | undefined;
1174
+ retry?: z.objectInputType<{
1175
+ max_attempts: z.ZodNumber;
1176
+ attempt: z.ZodNumber;
1177
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1178
+ backoff_seconds: z.ZodNumber;
1179
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1180
+ last_error: z.ZodOptional<z.ZodObject<{
1181
+ message: z.ZodString;
1182
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1183
+ at: z.ZodDate;
1184
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1185
+ }, "strip", z.ZodTypeAny, {
1186
+ message: string;
1187
+ at: Date;
1188
+ code?: string | number | undefined;
1189
+ details?: Record<string, unknown> | undefined;
1190
+ }, {
1191
+ message: string;
1192
+ at: Date;
1193
+ code?: string | number | undefined;
1194
+ details?: Record<string, unknown> | undefined;
1195
+ }>>;
1196
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1197
+ on_failure?: z.objectInputType<{
1198
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1199
+ name: z.ZodOptional<z.ZodString>;
1200
+ ref: z.ZodOptional<z.ZodAny>;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ name?: string | undefined;
1203
+ ref?: any;
1204
+ }, {
1205
+ name?: string | undefined;
1206
+ ref?: any;
1207
+ }>>;
1208
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1209
+ title: z.ZodOptional<z.ZodString>;
1210
+ description: z.ZodOptional<z.ZodString>;
1211
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1212
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1213
+ name: z.ZodString;
1214
+ color: z.ZodOptional<z.ZodString>;
1215
+ hidden: z.ZodBoolean;
1216
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1217
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1218
+ }, "strip", z.ZodTypeAny, {
1219
+ name: string;
1220
+ hidden: boolean;
1221
+ base?: boolean | undefined;
1222
+ color?: string | undefined;
1223
+ category?: string | null | undefined;
1224
+ }, {
1225
+ name: string;
1226
+ hidden: boolean;
1227
+ base?: boolean | undefined;
1228
+ color?: string | undefined;
1229
+ category?: string | null | undefined;
1230
+ }>, "many">>>;
1231
+ }, "strip", z.ZodTypeAny, {
1232
+ description?: string | undefined;
1233
+ tags?: {
1234
+ name: string;
1235
+ hidden: boolean;
1236
+ base?: boolean | undefined;
1237
+ color?: string | undefined;
1238
+ category?: string | null | undefined;
1239
+ }[] | null | undefined;
1240
+ title?: string | undefined;
1241
+ priority?: "low" | "medium" | "high" | undefined;
1242
+ }, {
1243
+ description?: string | undefined;
1244
+ tags?: {
1245
+ name: string;
1246
+ hidden: boolean;
1247
+ base?: boolean | undefined;
1248
+ color?: string | undefined;
1249
+ category?: string | null | undefined;
1250
+ }[] | null | undefined;
1251
+ title?: string | undefined;
1252
+ priority?: "low" | "medium" | "high" | undefined;
1253
+ }>>;
1254
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1255
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1256
+ kind: z.ZodString;
1257
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ kind: string;
1260
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1261
+ payload: Record<string, unknown>;
1262
+ }, {
1263
+ kind: string;
1264
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1265
+ payload: Record<string, unknown>;
1266
+ }>, "many">>;
1267
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1268
+ }>, z.ZodObject<{
1269
+ type: z.ZodLiteral<"human_task">;
1270
+ title: z.ZodString;
1271
+ description: z.ZodOptional<z.ZodString>;
1272
+ assignee_ref: z.ZodOptional<z.ZodString>;
1273
+ }, "strip", z.ZodTypeAny, {
1274
+ type: "human_task";
1275
+ title: string;
1276
+ description?: string | undefined;
1277
+ assignee_ref?: string | undefined;
1278
+ }, {
1279
+ type: "human_task";
1280
+ title: string;
1281
+ description?: string | undefined;
1282
+ assignee_ref?: string | undefined;
1283
+ }>]>;
1284
+ export declare const zAutomationBranchSchema: z.ZodObject<{
1285
+ id: z.ZodString;
1286
+ name: z.ZodString;
1287
+ when: z.ZodOptional<z.ZodType<ZAutomationConditionGroup, z.ZodTypeDef, ZAutomationConditionGroup>>;
1288
+ is_fallback: z.ZodOptional<z.ZodBoolean>;
1289
+ outputs: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1290
+ type: z.ZodLiteral<"auto_task">;
1291
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1292
+ kind: z.ZodString;
1293
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1294
+ execute_at: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
1295
+ rule: z.ZodLiteral<"immediate">;
1296
+ }, "strip", z.ZodTypeAny, {
1297
+ rule: "immediate";
1298
+ }, {
1299
+ rule: "immediate";
1300
+ }>, z.ZodObject<{
1301
+ rule: z.ZodLiteral<"send_at_local">;
1302
+ time: z.ZodString;
1303
+ base: z.ZodEnum<["target_date", "run_date"]>;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ base: "target_date" | "run_date";
1306
+ time: string;
1307
+ rule: "send_at_local";
1308
+ }, {
1309
+ base: "target_date" | "run_date";
1310
+ time: string;
1311
+ rule: "send_at_local";
1312
+ }>]>;
1313
+ retry: z.ZodOptional<z.ZodObject<{
1314
+ max_attempts: z.ZodNumber;
1315
+ attempt: z.ZodNumber;
1316
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1317
+ backoff_seconds: z.ZodNumber;
1318
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1319
+ last_error: z.ZodOptional<z.ZodObject<{
1320
+ message: z.ZodString;
1321
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1322
+ at: z.ZodDate;
1323
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1324
+ }, "strip", z.ZodTypeAny, {
1325
+ message: string;
1326
+ at: Date;
1327
+ code?: string | number | undefined;
1328
+ details?: Record<string, unknown> | undefined;
1329
+ }, {
1330
+ message: string;
1331
+ at: Date;
1332
+ code?: string | number | undefined;
1333
+ details?: Record<string, unknown> | undefined;
1334
+ }>>;
1335
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1336
+ max_attempts: z.ZodNumber;
1337
+ attempt: z.ZodNumber;
1338
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1339
+ backoff_seconds: z.ZodNumber;
1340
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1341
+ last_error: z.ZodOptional<z.ZodObject<{
1342
+ message: z.ZodString;
1343
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1344
+ at: z.ZodDate;
1345
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1346
+ }, "strip", z.ZodTypeAny, {
1347
+ message: string;
1348
+ at: Date;
1349
+ code?: string | number | undefined;
1350
+ details?: Record<string, unknown> | undefined;
1351
+ }, {
1352
+ message: string;
1353
+ at: Date;
1354
+ code?: string | number | undefined;
1355
+ details?: Record<string, unknown> | undefined;
1356
+ }>>;
1357
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1358
+ max_attempts: z.ZodNumber;
1359
+ attempt: z.ZodNumber;
1360
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1361
+ backoff_seconds: z.ZodNumber;
1362
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1363
+ last_error: z.ZodOptional<z.ZodObject<{
1364
+ message: z.ZodString;
1365
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1366
+ at: z.ZodDate;
1367
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1368
+ }, "strip", z.ZodTypeAny, {
1369
+ message: string;
1370
+ at: Date;
1371
+ code?: string | number | undefined;
1372
+ details?: Record<string, unknown> | undefined;
1373
+ }, {
1374
+ message: string;
1375
+ at: Date;
1376
+ code?: string | number | undefined;
1377
+ details?: Record<string, unknown> | undefined;
1378
+ }>>;
1379
+ }, z.ZodTypeAny, "passthrough">>>;
1380
+ on_failure: z.ZodOptional<z.ZodObject<{
1381
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1382
+ name: z.ZodOptional<z.ZodString>;
1383
+ ref: z.ZodOptional<z.ZodAny>;
1384
+ }, "strip", z.ZodTypeAny, {
1385
+ name?: string | undefined;
1386
+ ref?: any;
1387
+ }, {
1388
+ name?: string | undefined;
1389
+ ref?: any;
1390
+ }>>;
1391
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1392
+ title: z.ZodOptional<z.ZodString>;
1393
+ description: z.ZodOptional<z.ZodString>;
1394
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1395
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1396
+ name: z.ZodString;
1397
+ color: z.ZodOptional<z.ZodString>;
1398
+ hidden: z.ZodBoolean;
1399
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1400
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1401
+ }, "strip", z.ZodTypeAny, {
1402
+ name: string;
1403
+ hidden: boolean;
1404
+ base?: boolean | undefined;
1405
+ color?: string | undefined;
1406
+ category?: string | null | undefined;
1407
+ }, {
1408
+ name: string;
1409
+ hidden: boolean;
1410
+ base?: boolean | undefined;
1411
+ color?: string | undefined;
1412
+ category?: string | null | undefined;
1413
+ }>, "many">>>;
1414
+ }, "strip", z.ZodTypeAny, {
1415
+ description?: string | undefined;
1416
+ tags?: {
1417
+ name: string;
1418
+ hidden: boolean;
1419
+ base?: boolean | undefined;
1420
+ color?: string | undefined;
1421
+ category?: string | null | undefined;
1422
+ }[] | null | undefined;
1423
+ title?: string | undefined;
1424
+ priority?: "low" | "medium" | "high" | undefined;
1425
+ }, {
1426
+ description?: string | undefined;
1427
+ tags?: {
1428
+ name: string;
1429
+ hidden: boolean;
1430
+ base?: boolean | undefined;
1431
+ color?: string | undefined;
1432
+ category?: string | null | undefined;
1433
+ }[] | null | undefined;
1434
+ title?: string | undefined;
1435
+ priority?: "low" | "medium" | "high" | undefined;
1436
+ }>>;
1437
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1438
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1439
+ kind: z.ZodString;
1440
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1441
+ }, "strip", z.ZodTypeAny, {
1442
+ kind: string;
1443
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1444
+ payload: Record<string, unknown>;
1445
+ }, {
1446
+ kind: string;
1447
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1448
+ payload: Record<string, unknown>;
1449
+ }>, "many">>;
1450
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1451
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1452
+ name: z.ZodOptional<z.ZodString>;
1453
+ ref: z.ZodOptional<z.ZodAny>;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ name?: string | undefined;
1456
+ ref?: any;
1457
+ }, {
1458
+ name?: string | undefined;
1459
+ ref?: any;
1460
+ }>>;
1461
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1462
+ title: z.ZodOptional<z.ZodString>;
1463
+ description: z.ZodOptional<z.ZodString>;
1464
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1465
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1466
+ name: z.ZodString;
1467
+ color: z.ZodOptional<z.ZodString>;
1468
+ hidden: z.ZodBoolean;
1469
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1470
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1471
+ }, "strip", z.ZodTypeAny, {
1472
+ name: string;
1473
+ hidden: boolean;
1474
+ base?: boolean | undefined;
1475
+ color?: string | undefined;
1476
+ category?: string | null | undefined;
1477
+ }, {
1478
+ name: string;
1479
+ hidden: boolean;
1480
+ base?: boolean | undefined;
1481
+ color?: string | undefined;
1482
+ category?: string | null | undefined;
1483
+ }>, "many">>>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ description?: string | undefined;
1486
+ tags?: {
1487
+ name: string;
1488
+ hidden: boolean;
1489
+ base?: boolean | undefined;
1490
+ color?: string | undefined;
1491
+ category?: string | null | undefined;
1492
+ }[] | null | undefined;
1493
+ title?: string | undefined;
1494
+ priority?: "low" | "medium" | "high" | undefined;
1495
+ }, {
1496
+ description?: string | undefined;
1497
+ tags?: {
1498
+ name: string;
1499
+ hidden: boolean;
1500
+ base?: boolean | undefined;
1501
+ color?: string | undefined;
1502
+ category?: string | null | undefined;
1503
+ }[] | null | undefined;
1504
+ title?: string | undefined;
1505
+ priority?: "low" | "medium" | "high" | undefined;
1506
+ }>>;
1507
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1508
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1509
+ kind: z.ZodString;
1510
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1511
+ }, "strip", z.ZodTypeAny, {
1512
+ kind: string;
1513
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1514
+ payload: Record<string, unknown>;
1515
+ }, {
1516
+ kind: string;
1517
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1518
+ payload: Record<string, unknown>;
1519
+ }>, "many">>;
1520
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1521
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1522
+ name: z.ZodOptional<z.ZodString>;
1523
+ ref: z.ZodOptional<z.ZodAny>;
1524
+ }, "strip", z.ZodTypeAny, {
1525
+ name?: string | undefined;
1526
+ ref?: any;
1527
+ }, {
1528
+ name?: string | undefined;
1529
+ ref?: any;
1530
+ }>>;
1531
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1532
+ title: z.ZodOptional<z.ZodString>;
1533
+ description: z.ZodOptional<z.ZodString>;
1534
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1535
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1536
+ name: z.ZodString;
1537
+ color: z.ZodOptional<z.ZodString>;
1538
+ hidden: z.ZodBoolean;
1539
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1540
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1541
+ }, "strip", z.ZodTypeAny, {
1542
+ name: string;
1543
+ hidden: boolean;
1544
+ base?: boolean | undefined;
1545
+ color?: string | undefined;
1546
+ category?: string | null | undefined;
1547
+ }, {
1548
+ name: string;
1549
+ hidden: boolean;
1550
+ base?: boolean | undefined;
1551
+ color?: string | undefined;
1552
+ category?: string | null | undefined;
1553
+ }>, "many">>>;
1554
+ }, "strip", z.ZodTypeAny, {
1555
+ description?: string | undefined;
1556
+ tags?: {
1557
+ name: string;
1558
+ hidden: boolean;
1559
+ base?: boolean | undefined;
1560
+ color?: string | undefined;
1561
+ category?: string | null | undefined;
1562
+ }[] | null | undefined;
1563
+ title?: string | undefined;
1564
+ priority?: "low" | "medium" | "high" | undefined;
1565
+ }, {
1566
+ description?: string | undefined;
1567
+ tags?: {
1568
+ name: string;
1569
+ hidden: boolean;
1570
+ base?: boolean | undefined;
1571
+ color?: string | undefined;
1572
+ category?: string | null | undefined;
1573
+ }[] | null | undefined;
1574
+ title?: string | undefined;
1575
+ priority?: "low" | "medium" | "high" | undefined;
1576
+ }>>;
1577
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1578
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1579
+ kind: z.ZodString;
1580
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1581
+ }, "strip", z.ZodTypeAny, {
1582
+ kind: string;
1583
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1584
+ payload: Record<string, unknown>;
1585
+ }, {
1586
+ kind: string;
1587
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1588
+ payload: Record<string, unknown>;
1589
+ }>, "many">>;
1590
+ }, z.ZodTypeAny, "passthrough">>>;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ type: "auto_task";
1593
+ kind: string;
1594
+ execute_at: {
1595
+ rule: "immediate";
1596
+ } | {
1597
+ base: "target_date" | "run_date";
1598
+ time: string;
1599
+ rule: "send_at_local";
1600
+ };
1601
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1602
+ payload: Record<string, unknown>;
1603
+ retry?: z.objectOutputType<{
1604
+ max_attempts: z.ZodNumber;
1605
+ attempt: z.ZodNumber;
1606
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1607
+ backoff_seconds: z.ZodNumber;
1608
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1609
+ last_error: z.ZodOptional<z.ZodObject<{
1610
+ message: z.ZodString;
1611
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1612
+ at: z.ZodDate;
1613
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1614
+ }, "strip", z.ZodTypeAny, {
1615
+ message: string;
1616
+ at: Date;
1617
+ code?: string | number | undefined;
1618
+ details?: Record<string, unknown> | undefined;
1619
+ }, {
1620
+ message: string;
1621
+ at: Date;
1622
+ code?: string | number | undefined;
1623
+ details?: Record<string, unknown> | undefined;
1624
+ }>>;
1625
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1626
+ on_failure?: z.objectOutputType<{
1627
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1628
+ name: z.ZodOptional<z.ZodString>;
1629
+ ref: z.ZodOptional<z.ZodAny>;
1630
+ }, "strip", z.ZodTypeAny, {
1631
+ name?: string | undefined;
1632
+ ref?: any;
1633
+ }, {
1634
+ name?: string | undefined;
1635
+ ref?: any;
1636
+ }>>;
1637
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1638
+ title: z.ZodOptional<z.ZodString>;
1639
+ description: z.ZodOptional<z.ZodString>;
1640
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1641
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1642
+ name: z.ZodString;
1643
+ color: z.ZodOptional<z.ZodString>;
1644
+ hidden: z.ZodBoolean;
1645
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1646
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1647
+ }, "strip", z.ZodTypeAny, {
1648
+ name: string;
1649
+ hidden: boolean;
1650
+ base?: boolean | undefined;
1651
+ color?: string | undefined;
1652
+ category?: string | null | undefined;
1653
+ }, {
1654
+ name: string;
1655
+ hidden: boolean;
1656
+ base?: boolean | undefined;
1657
+ color?: string | undefined;
1658
+ category?: string | null | undefined;
1659
+ }>, "many">>>;
1660
+ }, "strip", z.ZodTypeAny, {
1661
+ description?: string | undefined;
1662
+ tags?: {
1663
+ name: string;
1664
+ hidden: boolean;
1665
+ base?: boolean | undefined;
1666
+ color?: string | undefined;
1667
+ category?: string | null | undefined;
1668
+ }[] | null | undefined;
1669
+ title?: string | undefined;
1670
+ priority?: "low" | "medium" | "high" | undefined;
1671
+ }, {
1672
+ description?: string | undefined;
1673
+ tags?: {
1674
+ name: string;
1675
+ hidden: boolean;
1676
+ base?: boolean | undefined;
1677
+ color?: string | undefined;
1678
+ category?: string | null | undefined;
1679
+ }[] | null | undefined;
1680
+ title?: string | undefined;
1681
+ priority?: "low" | "medium" | "high" | undefined;
1682
+ }>>;
1683
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1684
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1685
+ kind: z.ZodString;
1686
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1687
+ }, "strip", z.ZodTypeAny, {
1688
+ kind: string;
1689
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1690
+ payload: Record<string, unknown>;
1691
+ }, {
1692
+ kind: string;
1693
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1694
+ payload: Record<string, unknown>;
1695
+ }>, "many">>;
1696
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1697
+ }, {
1698
+ type: "auto_task";
1699
+ kind: string;
1700
+ execute_at: {
1701
+ rule: "immediate";
1702
+ } | {
1703
+ base: "target_date" | "run_date";
1704
+ time: string;
1705
+ rule: "send_at_local";
1706
+ };
1707
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1708
+ payload?: Record<string, unknown> | undefined;
1709
+ retry?: z.objectInputType<{
1710
+ max_attempts: z.ZodNumber;
1711
+ attempt: z.ZodNumber;
1712
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1713
+ backoff_seconds: z.ZodNumber;
1714
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1715
+ last_error: z.ZodOptional<z.ZodObject<{
1716
+ message: z.ZodString;
1717
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1718
+ at: z.ZodDate;
1719
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1720
+ }, "strip", z.ZodTypeAny, {
1721
+ message: string;
1722
+ at: Date;
1723
+ code?: string | number | undefined;
1724
+ details?: Record<string, unknown> | undefined;
1725
+ }, {
1726
+ message: string;
1727
+ at: Date;
1728
+ code?: string | number | undefined;
1729
+ details?: Record<string, unknown> | undefined;
1730
+ }>>;
1731
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1732
+ on_failure?: z.objectInputType<{
1733
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1734
+ name: z.ZodOptional<z.ZodString>;
1735
+ ref: z.ZodOptional<z.ZodAny>;
1736
+ }, "strip", z.ZodTypeAny, {
1737
+ name?: string | undefined;
1738
+ ref?: any;
1739
+ }, {
1740
+ name?: string | undefined;
1741
+ ref?: any;
1742
+ }>>;
1743
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1744
+ title: z.ZodOptional<z.ZodString>;
1745
+ description: z.ZodOptional<z.ZodString>;
1746
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1747
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1748
+ name: z.ZodString;
1749
+ color: z.ZodOptional<z.ZodString>;
1750
+ hidden: z.ZodBoolean;
1751
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1752
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1753
+ }, "strip", z.ZodTypeAny, {
1754
+ name: string;
1755
+ hidden: boolean;
1756
+ base?: boolean | undefined;
1757
+ color?: string | undefined;
1758
+ category?: string | null | undefined;
1759
+ }, {
1760
+ name: string;
1761
+ hidden: boolean;
1762
+ base?: boolean | undefined;
1763
+ color?: string | undefined;
1764
+ category?: string | null | undefined;
1765
+ }>, "many">>>;
1766
+ }, "strip", z.ZodTypeAny, {
1767
+ description?: string | undefined;
1768
+ tags?: {
1769
+ name: string;
1770
+ hidden: boolean;
1771
+ base?: boolean | undefined;
1772
+ color?: string | undefined;
1773
+ category?: string | null | undefined;
1774
+ }[] | null | undefined;
1775
+ title?: string | undefined;
1776
+ priority?: "low" | "medium" | "high" | undefined;
1777
+ }, {
1778
+ description?: string | undefined;
1779
+ tags?: {
1780
+ name: string;
1781
+ hidden: boolean;
1782
+ base?: boolean | undefined;
1783
+ color?: string | undefined;
1784
+ category?: string | null | undefined;
1785
+ }[] | null | undefined;
1786
+ title?: string | undefined;
1787
+ priority?: "low" | "medium" | "high" | undefined;
1788
+ }>>;
1789
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1790
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1791
+ kind: z.ZodString;
1792
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1793
+ }, "strip", z.ZodTypeAny, {
1794
+ kind: string;
1795
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1796
+ payload: Record<string, unknown>;
1797
+ }, {
1798
+ kind: string;
1799
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1800
+ payload: Record<string, unknown>;
1801
+ }>, "many">>;
1802
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1803
+ }>, z.ZodObject<{
1804
+ type: z.ZodLiteral<"human_task">;
1805
+ title: z.ZodString;
1806
+ description: z.ZodOptional<z.ZodString>;
1807
+ assignee_ref: z.ZodOptional<z.ZodString>;
1808
+ }, "strip", z.ZodTypeAny, {
1809
+ type: "human_task";
1810
+ title: string;
1811
+ description?: string | undefined;
1812
+ assignee_ref?: string | undefined;
1813
+ }, {
1814
+ type: "human_task";
1815
+ title: string;
1816
+ description?: string | undefined;
1817
+ assignee_ref?: string | undefined;
1818
+ }>]>, "many">;
1819
+ }, "strip", z.ZodTypeAny, {
1820
+ name: string;
1821
+ id: string;
1822
+ outputs: ({
1823
+ type: "auto_task";
1824
+ kind: string;
1825
+ execute_at: {
1826
+ rule: "immediate";
1827
+ } | {
1828
+ base: "target_date" | "run_date";
1829
+ time: string;
1830
+ rule: "send_at_local";
1831
+ };
1832
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1833
+ payload: Record<string, unknown>;
1834
+ retry?: z.objectOutputType<{
1835
+ max_attempts: z.ZodNumber;
1836
+ attempt: z.ZodNumber;
1837
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1838
+ backoff_seconds: z.ZodNumber;
1839
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1840
+ last_error: z.ZodOptional<z.ZodObject<{
1841
+ message: z.ZodString;
1842
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1843
+ at: z.ZodDate;
1844
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1845
+ }, "strip", z.ZodTypeAny, {
1846
+ message: string;
1847
+ at: Date;
1848
+ code?: string | number | undefined;
1849
+ details?: Record<string, unknown> | undefined;
1850
+ }, {
1851
+ message: string;
1852
+ at: Date;
1853
+ code?: string | number | undefined;
1854
+ details?: Record<string, unknown> | undefined;
1855
+ }>>;
1856
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1857
+ on_failure?: z.objectOutputType<{
1858
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1859
+ name: z.ZodOptional<z.ZodString>;
1860
+ ref: z.ZodOptional<z.ZodAny>;
1861
+ }, "strip", z.ZodTypeAny, {
1862
+ name?: string | undefined;
1863
+ ref?: any;
1864
+ }, {
1865
+ name?: string | undefined;
1866
+ ref?: any;
1867
+ }>>;
1868
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1869
+ title: z.ZodOptional<z.ZodString>;
1870
+ description: z.ZodOptional<z.ZodString>;
1871
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1872
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1873
+ name: z.ZodString;
1874
+ color: z.ZodOptional<z.ZodString>;
1875
+ hidden: z.ZodBoolean;
1876
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1877
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ name: string;
1880
+ hidden: boolean;
1881
+ base?: boolean | undefined;
1882
+ color?: string | undefined;
1883
+ category?: string | null | undefined;
1884
+ }, {
1885
+ name: string;
1886
+ hidden: boolean;
1887
+ base?: boolean | undefined;
1888
+ color?: string | undefined;
1889
+ category?: string | null | undefined;
1890
+ }>, "many">>>;
1891
+ }, "strip", z.ZodTypeAny, {
1892
+ description?: string | undefined;
1893
+ tags?: {
1894
+ name: string;
1895
+ hidden: boolean;
1896
+ base?: boolean | undefined;
1897
+ color?: string | undefined;
1898
+ category?: string | null | undefined;
1899
+ }[] | null | undefined;
1900
+ title?: string | undefined;
1901
+ priority?: "low" | "medium" | "high" | undefined;
1902
+ }, {
1903
+ description?: string | undefined;
1904
+ tags?: {
1905
+ name: string;
1906
+ hidden: boolean;
1907
+ base?: boolean | undefined;
1908
+ color?: string | undefined;
1909
+ category?: string | null | undefined;
1910
+ }[] | null | undefined;
1911
+ title?: string | undefined;
1912
+ priority?: "low" | "medium" | "high" | undefined;
1913
+ }>>;
1914
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1915
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
1916
+ kind: z.ZodString;
1917
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1918
+ }, "strip", z.ZodTypeAny, {
1919
+ kind: string;
1920
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1921
+ payload: Record<string, unknown>;
1922
+ }, {
1923
+ kind: string;
1924
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1925
+ payload: Record<string, unknown>;
1926
+ }>, "many">>;
1927
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1928
+ } | {
1929
+ type: "human_task";
1930
+ title: string;
1931
+ description?: string | undefined;
1932
+ assignee_ref?: string | undefined;
1933
+ })[];
1934
+ when?: ZAutomationConditionGroup | undefined;
1935
+ is_fallback?: boolean | undefined;
1936
+ }, {
1937
+ name: string;
1938
+ id: string;
1939
+ outputs: ({
1940
+ type: "auto_task";
1941
+ kind: string;
1942
+ execute_at: {
1943
+ rule: "immediate";
1944
+ } | {
1945
+ base: "target_date" | "run_date";
1946
+ time: string;
1947
+ rule: "send_at_local";
1948
+ };
1949
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1950
+ payload?: Record<string, unknown> | undefined;
1951
+ retry?: z.objectInputType<{
1952
+ max_attempts: z.ZodNumber;
1953
+ attempt: z.ZodNumber;
1954
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
1955
+ backoff_seconds: z.ZodNumber;
1956
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
1957
+ last_error: z.ZodOptional<z.ZodObject<{
1958
+ message: z.ZodString;
1959
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1960
+ at: z.ZodDate;
1961
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ message: string;
1964
+ at: Date;
1965
+ code?: string | number | undefined;
1966
+ details?: Record<string, unknown> | undefined;
1967
+ }, {
1968
+ message: string;
1969
+ at: Date;
1970
+ code?: string | number | undefined;
1971
+ details?: Record<string, unknown> | undefined;
1972
+ }>>;
1973
+ }, z.ZodTypeAny, "passthrough"> | undefined;
1974
+ on_failure?: z.objectInputType<{
1975
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
1976
+ name: z.ZodOptional<z.ZodString>;
1977
+ ref: z.ZodOptional<z.ZodAny>;
1978
+ }, "strip", z.ZodTypeAny, {
1979
+ name?: string | undefined;
1980
+ ref?: any;
1981
+ }, {
1982
+ name?: string | undefined;
1983
+ ref?: any;
1984
+ }>>;
1985
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
1986
+ title: z.ZodOptional<z.ZodString>;
1987
+ description: z.ZodOptional<z.ZodString>;
1988
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
1989
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1990
+ name: z.ZodString;
1991
+ color: z.ZodOptional<z.ZodString>;
1992
+ hidden: z.ZodBoolean;
1993
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1994
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1995
+ }, "strip", z.ZodTypeAny, {
1996
+ name: string;
1997
+ hidden: boolean;
1998
+ base?: boolean | undefined;
1999
+ color?: string | undefined;
2000
+ category?: string | null | undefined;
2001
+ }, {
2002
+ name: string;
2003
+ hidden: boolean;
2004
+ base?: boolean | undefined;
2005
+ color?: string | undefined;
2006
+ category?: string | null | undefined;
2007
+ }>, "many">>>;
2008
+ }, "strip", z.ZodTypeAny, {
2009
+ description?: string | undefined;
2010
+ tags?: {
2011
+ name: string;
2012
+ hidden: boolean;
2013
+ base?: boolean | undefined;
2014
+ color?: string | undefined;
2015
+ category?: string | null | undefined;
2016
+ }[] | null | undefined;
2017
+ title?: string | undefined;
2018
+ priority?: "low" | "medium" | "high" | undefined;
2019
+ }, {
2020
+ description?: string | undefined;
2021
+ tags?: {
2022
+ name: string;
2023
+ hidden: boolean;
2024
+ base?: boolean | undefined;
2025
+ color?: string | undefined;
2026
+ category?: string | null | undefined;
2027
+ }[] | null | undefined;
2028
+ title?: string | undefined;
2029
+ priority?: "low" | "medium" | "high" | undefined;
2030
+ }>>;
2031
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2032
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2033
+ kind: z.ZodString;
2034
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2035
+ }, "strip", z.ZodTypeAny, {
2036
+ kind: string;
2037
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2038
+ payload: Record<string, unknown>;
2039
+ }, {
2040
+ kind: string;
2041
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2042
+ payload: Record<string, unknown>;
2043
+ }>, "many">>;
2044
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2045
+ } | {
2046
+ type: "human_task";
2047
+ title: string;
2048
+ description?: string | undefined;
2049
+ assignee_ref?: string | undefined;
2050
+ })[];
2051
+ when?: ZAutomationConditionGroup | undefined;
2052
+ is_fallback?: boolean | undefined;
2053
+ }>;
2054
+ export declare const zAutomationBranchModeSchema: z.ZodEnum<["all", "exclusive"]>;
2055
+ export declare const zAutomationRoutineSchema: z.ZodObject<{
2056
+ id: z.ZodString;
2057
+ name: z.ZodString;
2058
+ description: z.ZodOptional<z.ZodString>;
2059
+ active: z.ZodDefault<z.ZodBoolean>;
2060
+ version: z.ZodDefault<z.ZodNumber>;
2061
+ trigger: z.ZodObject<{
2062
+ type: z.ZodLiteral<"cron">;
2063
+ cron: z.ZodObject<{
2064
+ expression: z.ZodString;
2065
+ timezone: z.ZodOptional<z.ZodString>;
2066
+ }, "strip", z.ZodTypeAny, {
2067
+ expression: string;
2068
+ timezone?: string | undefined;
2069
+ }, {
2070
+ expression: string;
2071
+ timezone?: string | undefined;
2072
+ }>;
2073
+ }, "strip", z.ZodTypeAny, {
2074
+ type: "cron";
2075
+ cron: {
2076
+ expression: string;
2077
+ timezone?: string | undefined;
2078
+ };
2079
+ }, {
2080
+ type: "cron";
2081
+ cron: {
2082
+ expression: string;
2083
+ timezone?: string | undefined;
2084
+ };
2085
+ }>;
2086
+ selection: z.ZodObject<{
2087
+ target: z.ZodLiteral<"appointment">;
2088
+ appointment: z.ZodObject<{
2089
+ calendar_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2090
+ date_window: z.ZodObject<{
2091
+ offset_days: z.ZodNumber;
2092
+ offset_mode: z.ZodEnum<["calendar", "business"]>;
2093
+ }, "strip", z.ZodTypeAny, {
2094
+ offset_days: number;
2095
+ offset_mode: "calendar" | "business";
2096
+ }, {
2097
+ offset_days: number;
2098
+ offset_mode: "calendar" | "business";
2099
+ }>;
2100
+ status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2101
+ status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2102
+ appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2103
+ }, "strip", z.ZodTypeAny, {
2104
+ date_window: {
2105
+ offset_days: number;
2106
+ offset_mode: "calendar" | "business";
2107
+ };
2108
+ calendar_ids?: string[] | undefined;
2109
+ status_in?: string[] | undefined;
2110
+ status_base_in?: string[] | undefined;
2111
+ appointment_type_not_in?: string[] | undefined;
2112
+ }, {
2113
+ date_window: {
2114
+ offset_days: number;
2115
+ offset_mode: "calendar" | "business";
2116
+ };
2117
+ calendar_ids?: string[] | undefined;
2118
+ status_in?: string[] | undefined;
2119
+ status_base_in?: string[] | undefined;
2120
+ appointment_type_not_in?: string[] | undefined;
2121
+ }>;
2122
+ }, "strip", z.ZodTypeAny, {
2123
+ appointment: {
2124
+ date_window: {
2125
+ offset_days: number;
2126
+ offset_mode: "calendar" | "business";
2127
+ };
2128
+ calendar_ids?: string[] | undefined;
2129
+ status_in?: string[] | undefined;
2130
+ status_base_in?: string[] | undefined;
2131
+ appointment_type_not_in?: string[] | undefined;
2132
+ };
2133
+ target: "appointment";
2134
+ }, {
2135
+ appointment: {
2136
+ date_window: {
2137
+ offset_days: number;
2138
+ offset_mode: "calendar" | "business";
2139
+ };
2140
+ calendar_ids?: string[] | undefined;
2141
+ status_in?: string[] | undefined;
2142
+ status_base_in?: string[] | undefined;
2143
+ appointment_type_not_in?: string[] | undefined;
2144
+ };
2145
+ target: "appointment";
2146
+ }>;
2147
+ branch_mode: z.ZodEnum<["all", "exclusive"]>;
2148
+ branches: z.ZodArray<z.ZodObject<{
2149
+ id: z.ZodString;
2150
+ name: z.ZodString;
2151
+ when: z.ZodOptional<z.ZodType<ZAutomationConditionGroup, z.ZodTypeDef, ZAutomationConditionGroup>>;
2152
+ is_fallback: z.ZodOptional<z.ZodBoolean>;
2153
+ outputs: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2154
+ type: z.ZodLiteral<"auto_task">;
2155
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2156
+ kind: z.ZodString;
2157
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2158
+ execute_at: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
2159
+ rule: z.ZodLiteral<"immediate">;
2160
+ }, "strip", z.ZodTypeAny, {
2161
+ rule: "immediate";
2162
+ }, {
2163
+ rule: "immediate";
2164
+ }>, z.ZodObject<{
2165
+ rule: z.ZodLiteral<"send_at_local">;
2166
+ time: z.ZodString;
2167
+ base: z.ZodEnum<["target_date", "run_date"]>;
2168
+ }, "strip", z.ZodTypeAny, {
2169
+ base: "target_date" | "run_date";
2170
+ time: string;
2171
+ rule: "send_at_local";
2172
+ }, {
2173
+ base: "target_date" | "run_date";
2174
+ time: string;
2175
+ rule: "send_at_local";
2176
+ }>]>;
2177
+ retry: z.ZodOptional<z.ZodObject<{
2178
+ max_attempts: z.ZodNumber;
2179
+ attempt: z.ZodNumber;
2180
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2181
+ backoff_seconds: z.ZodNumber;
2182
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2183
+ last_error: z.ZodOptional<z.ZodObject<{
2184
+ message: z.ZodString;
2185
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2186
+ at: z.ZodDate;
2187
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2188
+ }, "strip", z.ZodTypeAny, {
2189
+ message: string;
2190
+ at: Date;
2191
+ code?: string | number | undefined;
2192
+ details?: Record<string, unknown> | undefined;
2193
+ }, {
2194
+ message: string;
2195
+ at: Date;
2196
+ code?: string | number | undefined;
2197
+ details?: Record<string, unknown> | undefined;
2198
+ }>>;
2199
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2200
+ max_attempts: z.ZodNumber;
2201
+ attempt: z.ZodNumber;
2202
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2203
+ backoff_seconds: z.ZodNumber;
2204
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2205
+ last_error: z.ZodOptional<z.ZodObject<{
2206
+ message: z.ZodString;
2207
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2208
+ at: z.ZodDate;
2209
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2210
+ }, "strip", z.ZodTypeAny, {
2211
+ message: string;
2212
+ at: Date;
2213
+ code?: string | number | undefined;
2214
+ details?: Record<string, unknown> | undefined;
2215
+ }, {
2216
+ message: string;
2217
+ at: Date;
2218
+ code?: string | number | undefined;
2219
+ details?: Record<string, unknown> | undefined;
2220
+ }>>;
2221
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2222
+ max_attempts: z.ZodNumber;
2223
+ attempt: z.ZodNumber;
2224
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2225
+ backoff_seconds: z.ZodNumber;
2226
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2227
+ last_error: z.ZodOptional<z.ZodObject<{
2228
+ message: z.ZodString;
2229
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2230
+ at: z.ZodDate;
2231
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2232
+ }, "strip", z.ZodTypeAny, {
2233
+ message: string;
2234
+ at: Date;
2235
+ code?: string | number | undefined;
2236
+ details?: Record<string, unknown> | undefined;
2237
+ }, {
2238
+ message: string;
2239
+ at: Date;
2240
+ code?: string | number | undefined;
2241
+ details?: Record<string, unknown> | undefined;
2242
+ }>>;
2243
+ }, z.ZodTypeAny, "passthrough">>>;
2244
+ on_failure: z.ZodOptional<z.ZodObject<{
2245
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2246
+ name: z.ZodOptional<z.ZodString>;
2247
+ ref: z.ZodOptional<z.ZodAny>;
2248
+ }, "strip", z.ZodTypeAny, {
2249
+ name?: string | undefined;
2250
+ ref?: any;
2251
+ }, {
2252
+ name?: string | undefined;
2253
+ ref?: any;
2254
+ }>>;
2255
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2256
+ title: z.ZodOptional<z.ZodString>;
2257
+ description: z.ZodOptional<z.ZodString>;
2258
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2259
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2260
+ name: z.ZodString;
2261
+ color: z.ZodOptional<z.ZodString>;
2262
+ hidden: z.ZodBoolean;
2263
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2264
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2265
+ }, "strip", z.ZodTypeAny, {
2266
+ name: string;
2267
+ hidden: boolean;
2268
+ base?: boolean | undefined;
2269
+ color?: string | undefined;
2270
+ category?: string | null | undefined;
2271
+ }, {
2272
+ name: string;
2273
+ hidden: boolean;
2274
+ base?: boolean | undefined;
2275
+ color?: string | undefined;
2276
+ category?: string | null | undefined;
2277
+ }>, "many">>>;
2278
+ }, "strip", z.ZodTypeAny, {
2279
+ description?: string | undefined;
2280
+ tags?: {
2281
+ name: string;
2282
+ hidden: boolean;
2283
+ base?: boolean | undefined;
2284
+ color?: string | undefined;
2285
+ category?: string | null | undefined;
2286
+ }[] | null | undefined;
2287
+ title?: string | undefined;
2288
+ priority?: "low" | "medium" | "high" | undefined;
2289
+ }, {
2290
+ description?: string | undefined;
2291
+ tags?: {
2292
+ name: string;
2293
+ hidden: boolean;
2294
+ base?: boolean | undefined;
2295
+ color?: string | undefined;
2296
+ category?: string | null | undefined;
2297
+ }[] | null | undefined;
2298
+ title?: string | undefined;
2299
+ priority?: "low" | "medium" | "high" | undefined;
2300
+ }>>;
2301
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2302
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2303
+ kind: z.ZodString;
2304
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2305
+ }, "strip", z.ZodTypeAny, {
2306
+ kind: string;
2307
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2308
+ payload: Record<string, unknown>;
2309
+ }, {
2310
+ kind: string;
2311
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2312
+ payload: Record<string, unknown>;
2313
+ }>, "many">>;
2314
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2315
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2316
+ name: z.ZodOptional<z.ZodString>;
2317
+ ref: z.ZodOptional<z.ZodAny>;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ name?: string | undefined;
2320
+ ref?: any;
2321
+ }, {
2322
+ name?: string | undefined;
2323
+ ref?: any;
2324
+ }>>;
2325
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2326
+ title: z.ZodOptional<z.ZodString>;
2327
+ description: z.ZodOptional<z.ZodString>;
2328
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2329
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2330
+ name: z.ZodString;
2331
+ color: z.ZodOptional<z.ZodString>;
2332
+ hidden: z.ZodBoolean;
2333
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2334
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2335
+ }, "strip", z.ZodTypeAny, {
2336
+ name: string;
2337
+ hidden: boolean;
2338
+ base?: boolean | undefined;
2339
+ color?: string | undefined;
2340
+ category?: string | null | undefined;
2341
+ }, {
2342
+ name: string;
2343
+ hidden: boolean;
2344
+ base?: boolean | undefined;
2345
+ color?: string | undefined;
2346
+ category?: string | null | undefined;
2347
+ }>, "many">>>;
2348
+ }, "strip", z.ZodTypeAny, {
2349
+ description?: string | undefined;
2350
+ tags?: {
2351
+ name: string;
2352
+ hidden: boolean;
2353
+ base?: boolean | undefined;
2354
+ color?: string | undefined;
2355
+ category?: string | null | undefined;
2356
+ }[] | null | undefined;
2357
+ title?: string | undefined;
2358
+ priority?: "low" | "medium" | "high" | undefined;
2359
+ }, {
2360
+ description?: string | undefined;
2361
+ tags?: {
2362
+ name: string;
2363
+ hidden: boolean;
2364
+ base?: boolean | undefined;
2365
+ color?: string | undefined;
2366
+ category?: string | null | undefined;
2367
+ }[] | null | undefined;
2368
+ title?: string | undefined;
2369
+ priority?: "low" | "medium" | "high" | undefined;
2370
+ }>>;
2371
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2372
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2373
+ kind: z.ZodString;
2374
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2375
+ }, "strip", z.ZodTypeAny, {
2376
+ kind: string;
2377
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2378
+ payload: Record<string, unknown>;
2379
+ }, {
2380
+ kind: string;
2381
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2382
+ payload: Record<string, unknown>;
2383
+ }>, "many">>;
2384
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2385
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2386
+ name: z.ZodOptional<z.ZodString>;
2387
+ ref: z.ZodOptional<z.ZodAny>;
2388
+ }, "strip", z.ZodTypeAny, {
2389
+ name?: string | undefined;
2390
+ ref?: any;
2391
+ }, {
2392
+ name?: string | undefined;
2393
+ ref?: any;
2394
+ }>>;
2395
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2396
+ title: z.ZodOptional<z.ZodString>;
2397
+ description: z.ZodOptional<z.ZodString>;
2398
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2399
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2400
+ name: z.ZodString;
2401
+ color: z.ZodOptional<z.ZodString>;
2402
+ hidden: z.ZodBoolean;
2403
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2404
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2405
+ }, "strip", z.ZodTypeAny, {
2406
+ name: string;
2407
+ hidden: boolean;
2408
+ base?: boolean | undefined;
2409
+ color?: string | undefined;
2410
+ category?: string | null | undefined;
2411
+ }, {
2412
+ name: string;
2413
+ hidden: boolean;
2414
+ base?: boolean | undefined;
2415
+ color?: string | undefined;
2416
+ category?: string | null | undefined;
2417
+ }>, "many">>>;
2418
+ }, "strip", z.ZodTypeAny, {
2419
+ description?: string | undefined;
2420
+ tags?: {
2421
+ name: string;
2422
+ hidden: boolean;
2423
+ base?: boolean | undefined;
2424
+ color?: string | undefined;
2425
+ category?: string | null | undefined;
2426
+ }[] | null | undefined;
2427
+ title?: string | undefined;
2428
+ priority?: "low" | "medium" | "high" | undefined;
2429
+ }, {
2430
+ description?: string | undefined;
2431
+ tags?: {
2432
+ name: string;
2433
+ hidden: boolean;
2434
+ base?: boolean | undefined;
2435
+ color?: string | undefined;
2436
+ category?: string | null | undefined;
2437
+ }[] | null | undefined;
2438
+ title?: string | undefined;
2439
+ priority?: "low" | "medium" | "high" | undefined;
2440
+ }>>;
2441
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2442
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2443
+ kind: z.ZodString;
2444
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2445
+ }, "strip", z.ZodTypeAny, {
2446
+ kind: string;
2447
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2448
+ payload: Record<string, unknown>;
2449
+ }, {
2450
+ kind: string;
2451
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2452
+ payload: Record<string, unknown>;
2453
+ }>, "many">>;
2454
+ }, z.ZodTypeAny, "passthrough">>>;
2455
+ }, "strip", z.ZodTypeAny, {
2456
+ type: "auto_task";
2457
+ kind: string;
2458
+ execute_at: {
2459
+ rule: "immediate";
2460
+ } | {
2461
+ base: "target_date" | "run_date";
2462
+ time: string;
2463
+ rule: "send_at_local";
2464
+ };
2465
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2466
+ payload: Record<string, unknown>;
2467
+ retry?: z.objectOutputType<{
2468
+ max_attempts: z.ZodNumber;
2469
+ attempt: z.ZodNumber;
2470
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2471
+ backoff_seconds: z.ZodNumber;
2472
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2473
+ last_error: z.ZodOptional<z.ZodObject<{
2474
+ message: z.ZodString;
2475
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2476
+ at: z.ZodDate;
2477
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2478
+ }, "strip", z.ZodTypeAny, {
2479
+ message: string;
2480
+ at: Date;
2481
+ code?: string | number | undefined;
2482
+ details?: Record<string, unknown> | undefined;
2483
+ }, {
2484
+ message: string;
2485
+ at: Date;
2486
+ code?: string | number | undefined;
2487
+ details?: Record<string, unknown> | undefined;
2488
+ }>>;
2489
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2490
+ on_failure?: z.objectOutputType<{
2491
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2492
+ name: z.ZodOptional<z.ZodString>;
2493
+ ref: z.ZodOptional<z.ZodAny>;
2494
+ }, "strip", z.ZodTypeAny, {
2495
+ name?: string | undefined;
2496
+ ref?: any;
2497
+ }, {
2498
+ name?: string | undefined;
2499
+ ref?: any;
2500
+ }>>;
2501
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2502
+ title: z.ZodOptional<z.ZodString>;
2503
+ description: z.ZodOptional<z.ZodString>;
2504
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2505
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2506
+ name: z.ZodString;
2507
+ color: z.ZodOptional<z.ZodString>;
2508
+ hidden: z.ZodBoolean;
2509
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2510
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2511
+ }, "strip", z.ZodTypeAny, {
2512
+ name: string;
2513
+ hidden: boolean;
2514
+ base?: boolean | undefined;
2515
+ color?: string | undefined;
2516
+ category?: string | null | undefined;
2517
+ }, {
2518
+ name: string;
2519
+ hidden: boolean;
2520
+ base?: boolean | undefined;
2521
+ color?: string | undefined;
2522
+ category?: string | null | undefined;
2523
+ }>, "many">>>;
2524
+ }, "strip", z.ZodTypeAny, {
2525
+ description?: string | undefined;
2526
+ tags?: {
2527
+ name: string;
2528
+ hidden: boolean;
2529
+ base?: boolean | undefined;
2530
+ color?: string | undefined;
2531
+ category?: string | null | undefined;
2532
+ }[] | null | undefined;
2533
+ title?: string | undefined;
2534
+ priority?: "low" | "medium" | "high" | undefined;
2535
+ }, {
2536
+ description?: string | undefined;
2537
+ tags?: {
2538
+ name: string;
2539
+ hidden: boolean;
2540
+ base?: boolean | undefined;
2541
+ color?: string | undefined;
2542
+ category?: string | null | undefined;
2543
+ }[] | null | undefined;
2544
+ title?: string | undefined;
2545
+ priority?: "low" | "medium" | "high" | undefined;
2546
+ }>>;
2547
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2548
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2549
+ kind: z.ZodString;
2550
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2551
+ }, "strip", z.ZodTypeAny, {
2552
+ kind: string;
2553
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2554
+ payload: Record<string, unknown>;
2555
+ }, {
2556
+ kind: string;
2557
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2558
+ payload: Record<string, unknown>;
2559
+ }>, "many">>;
2560
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2561
+ }, {
2562
+ type: "auto_task";
2563
+ kind: string;
2564
+ execute_at: {
2565
+ rule: "immediate";
2566
+ } | {
2567
+ base: "target_date" | "run_date";
2568
+ time: string;
2569
+ rule: "send_at_local";
2570
+ };
2571
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2572
+ payload?: Record<string, unknown> | undefined;
2573
+ retry?: z.objectInputType<{
2574
+ max_attempts: z.ZodNumber;
2575
+ attempt: z.ZodNumber;
2576
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2577
+ backoff_seconds: z.ZodNumber;
2578
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2579
+ last_error: z.ZodOptional<z.ZodObject<{
2580
+ message: z.ZodString;
2581
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2582
+ at: z.ZodDate;
2583
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2584
+ }, "strip", z.ZodTypeAny, {
2585
+ message: string;
2586
+ at: Date;
2587
+ code?: string | number | undefined;
2588
+ details?: Record<string, unknown> | undefined;
2589
+ }, {
2590
+ message: string;
2591
+ at: Date;
2592
+ code?: string | number | undefined;
2593
+ details?: Record<string, unknown> | undefined;
2594
+ }>>;
2595
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2596
+ on_failure?: z.objectInputType<{
2597
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2598
+ name: z.ZodOptional<z.ZodString>;
2599
+ ref: z.ZodOptional<z.ZodAny>;
2600
+ }, "strip", z.ZodTypeAny, {
2601
+ name?: string | undefined;
2602
+ ref?: any;
2603
+ }, {
2604
+ name?: string | undefined;
2605
+ ref?: any;
2606
+ }>>;
2607
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2608
+ title: z.ZodOptional<z.ZodString>;
2609
+ description: z.ZodOptional<z.ZodString>;
2610
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2611
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2612
+ name: z.ZodString;
2613
+ color: z.ZodOptional<z.ZodString>;
2614
+ hidden: z.ZodBoolean;
2615
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2616
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2617
+ }, "strip", z.ZodTypeAny, {
2618
+ name: string;
2619
+ hidden: boolean;
2620
+ base?: boolean | undefined;
2621
+ color?: string | undefined;
2622
+ category?: string | null | undefined;
2623
+ }, {
2624
+ name: string;
2625
+ hidden: boolean;
2626
+ base?: boolean | undefined;
2627
+ color?: string | undefined;
2628
+ category?: string | null | undefined;
2629
+ }>, "many">>>;
2630
+ }, "strip", z.ZodTypeAny, {
2631
+ description?: string | undefined;
2632
+ tags?: {
2633
+ name: string;
2634
+ hidden: boolean;
2635
+ base?: boolean | undefined;
2636
+ color?: string | undefined;
2637
+ category?: string | null | undefined;
2638
+ }[] | null | undefined;
2639
+ title?: string | undefined;
2640
+ priority?: "low" | "medium" | "high" | undefined;
2641
+ }, {
2642
+ description?: string | undefined;
2643
+ tags?: {
2644
+ name: string;
2645
+ hidden: boolean;
2646
+ base?: boolean | undefined;
2647
+ color?: string | undefined;
2648
+ category?: string | null | undefined;
2649
+ }[] | null | undefined;
2650
+ title?: string | undefined;
2651
+ priority?: "low" | "medium" | "high" | undefined;
2652
+ }>>;
2653
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2654
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2655
+ kind: z.ZodString;
2656
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2657
+ }, "strip", z.ZodTypeAny, {
2658
+ kind: string;
2659
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2660
+ payload: Record<string, unknown>;
2661
+ }, {
2662
+ kind: string;
2663
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2664
+ payload: Record<string, unknown>;
2665
+ }>, "many">>;
2666
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2667
+ }>, z.ZodObject<{
2668
+ type: z.ZodLiteral<"human_task">;
2669
+ title: z.ZodString;
2670
+ description: z.ZodOptional<z.ZodString>;
2671
+ assignee_ref: z.ZodOptional<z.ZodString>;
2672
+ }, "strip", z.ZodTypeAny, {
2673
+ type: "human_task";
2674
+ title: string;
2675
+ description?: string | undefined;
2676
+ assignee_ref?: string | undefined;
2677
+ }, {
2678
+ type: "human_task";
2679
+ title: string;
2680
+ description?: string | undefined;
2681
+ assignee_ref?: string | undefined;
2682
+ }>]>, "many">;
2683
+ }, "strip", z.ZodTypeAny, {
2684
+ name: string;
2685
+ id: string;
2686
+ outputs: ({
2687
+ type: "auto_task";
2688
+ kind: string;
2689
+ execute_at: {
2690
+ rule: "immediate";
2691
+ } | {
2692
+ base: "target_date" | "run_date";
2693
+ time: string;
2694
+ rule: "send_at_local";
2695
+ };
2696
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2697
+ payload: Record<string, unknown>;
2698
+ retry?: z.objectOutputType<{
2699
+ max_attempts: z.ZodNumber;
2700
+ attempt: z.ZodNumber;
2701
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2702
+ backoff_seconds: z.ZodNumber;
2703
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2704
+ last_error: z.ZodOptional<z.ZodObject<{
2705
+ message: z.ZodString;
2706
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2707
+ at: z.ZodDate;
2708
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2709
+ }, "strip", z.ZodTypeAny, {
2710
+ message: string;
2711
+ at: Date;
2712
+ code?: string | number | undefined;
2713
+ details?: Record<string, unknown> | undefined;
2714
+ }, {
2715
+ message: string;
2716
+ at: Date;
2717
+ code?: string | number | undefined;
2718
+ details?: Record<string, unknown> | undefined;
2719
+ }>>;
2720
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2721
+ on_failure?: z.objectOutputType<{
2722
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2723
+ name: z.ZodOptional<z.ZodString>;
2724
+ ref: z.ZodOptional<z.ZodAny>;
2725
+ }, "strip", z.ZodTypeAny, {
2726
+ name?: string | undefined;
2727
+ ref?: any;
2728
+ }, {
2729
+ name?: string | undefined;
2730
+ ref?: any;
2731
+ }>>;
2732
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2733
+ title: z.ZodOptional<z.ZodString>;
2734
+ description: z.ZodOptional<z.ZodString>;
2735
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2736
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2737
+ name: z.ZodString;
2738
+ color: z.ZodOptional<z.ZodString>;
2739
+ hidden: z.ZodBoolean;
2740
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2741
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2742
+ }, "strip", z.ZodTypeAny, {
2743
+ name: string;
2744
+ hidden: boolean;
2745
+ base?: boolean | undefined;
2746
+ color?: string | undefined;
2747
+ category?: string | null | undefined;
2748
+ }, {
2749
+ name: string;
2750
+ hidden: boolean;
2751
+ base?: boolean | undefined;
2752
+ color?: string | undefined;
2753
+ category?: string | null | undefined;
2754
+ }>, "many">>>;
2755
+ }, "strip", z.ZodTypeAny, {
2756
+ description?: string | undefined;
2757
+ tags?: {
2758
+ name: string;
2759
+ hidden: boolean;
2760
+ base?: boolean | undefined;
2761
+ color?: string | undefined;
2762
+ category?: string | null | undefined;
2763
+ }[] | null | undefined;
2764
+ title?: string | undefined;
2765
+ priority?: "low" | "medium" | "high" | undefined;
2766
+ }, {
2767
+ description?: string | undefined;
2768
+ tags?: {
2769
+ name: string;
2770
+ hidden: boolean;
2771
+ base?: boolean | undefined;
2772
+ color?: string | undefined;
2773
+ category?: string | null | undefined;
2774
+ }[] | null | undefined;
2775
+ title?: string | undefined;
2776
+ priority?: "low" | "medium" | "high" | undefined;
2777
+ }>>;
2778
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2779
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2780
+ kind: z.ZodString;
2781
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2782
+ }, "strip", z.ZodTypeAny, {
2783
+ kind: string;
2784
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2785
+ payload: Record<string, unknown>;
2786
+ }, {
2787
+ kind: string;
2788
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2789
+ payload: Record<string, unknown>;
2790
+ }>, "many">>;
2791
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2792
+ } | {
2793
+ type: "human_task";
2794
+ title: string;
2795
+ description?: string | undefined;
2796
+ assignee_ref?: string | undefined;
2797
+ })[];
2798
+ when?: ZAutomationConditionGroup | undefined;
2799
+ is_fallback?: boolean | undefined;
2800
+ }, {
2801
+ name: string;
2802
+ id: string;
2803
+ outputs: ({
2804
+ type: "auto_task";
2805
+ kind: string;
2806
+ execute_at: {
2807
+ rule: "immediate";
2808
+ } | {
2809
+ base: "target_date" | "run_date";
2810
+ time: string;
2811
+ rule: "send_at_local";
2812
+ };
2813
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2814
+ payload?: Record<string, unknown> | undefined;
2815
+ retry?: z.objectInputType<{
2816
+ max_attempts: z.ZodNumber;
2817
+ attempt: z.ZodNumber;
2818
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
2819
+ backoff_seconds: z.ZodNumber;
2820
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
2821
+ last_error: z.ZodOptional<z.ZodObject<{
2822
+ message: z.ZodString;
2823
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
2824
+ at: z.ZodDate;
2825
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2826
+ }, "strip", z.ZodTypeAny, {
2827
+ message: string;
2828
+ at: Date;
2829
+ code?: string | number | undefined;
2830
+ details?: Record<string, unknown> | undefined;
2831
+ }, {
2832
+ message: string;
2833
+ at: Date;
2834
+ code?: string | number | undefined;
2835
+ details?: Record<string, unknown> | undefined;
2836
+ }>>;
2837
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2838
+ on_failure?: z.objectInputType<{
2839
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
2840
+ name: z.ZodOptional<z.ZodString>;
2841
+ ref: z.ZodOptional<z.ZodAny>;
2842
+ }, "strip", z.ZodTypeAny, {
2843
+ name?: string | undefined;
2844
+ ref?: any;
2845
+ }, {
2846
+ name?: string | undefined;
2847
+ ref?: any;
2848
+ }>>;
2849
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
2850
+ title: z.ZodOptional<z.ZodString>;
2851
+ description: z.ZodOptional<z.ZodString>;
2852
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
2853
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
2854
+ name: z.ZodString;
2855
+ color: z.ZodOptional<z.ZodString>;
2856
+ hidden: z.ZodBoolean;
2857
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2858
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2859
+ }, "strip", z.ZodTypeAny, {
2860
+ name: string;
2861
+ hidden: boolean;
2862
+ base?: boolean | undefined;
2863
+ color?: string | undefined;
2864
+ category?: string | null | undefined;
2865
+ }, {
2866
+ name: string;
2867
+ hidden: boolean;
2868
+ base?: boolean | undefined;
2869
+ color?: string | undefined;
2870
+ category?: string | null | undefined;
2871
+ }>, "many">>>;
2872
+ }, "strip", z.ZodTypeAny, {
2873
+ description?: string | undefined;
2874
+ tags?: {
2875
+ name: string;
2876
+ hidden: boolean;
2877
+ base?: boolean | undefined;
2878
+ color?: string | undefined;
2879
+ category?: string | null | undefined;
2880
+ }[] | null | undefined;
2881
+ title?: string | undefined;
2882
+ priority?: "low" | "medium" | "high" | undefined;
2883
+ }, {
2884
+ description?: string | undefined;
2885
+ tags?: {
2886
+ name: string;
2887
+ hidden: boolean;
2888
+ base?: boolean | undefined;
2889
+ color?: string | undefined;
2890
+ category?: string | null | undefined;
2891
+ }[] | null | undefined;
2892
+ title?: string | undefined;
2893
+ priority?: "low" | "medium" | "high" | undefined;
2894
+ }>>;
2895
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2896
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
2897
+ kind: z.ZodString;
2898
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2899
+ }, "strip", z.ZodTypeAny, {
2900
+ kind: string;
2901
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2902
+ payload: Record<string, unknown>;
2903
+ }, {
2904
+ kind: string;
2905
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2906
+ payload: Record<string, unknown>;
2907
+ }>, "many">>;
2908
+ }, z.ZodTypeAny, "passthrough"> | undefined;
2909
+ } | {
2910
+ type: "human_task";
2911
+ title: string;
2912
+ description?: string | undefined;
2913
+ assignee_ref?: string | undefined;
2914
+ })[];
2915
+ when?: ZAutomationConditionGroup | undefined;
2916
+ is_fallback?: boolean | undefined;
2917
+ }>, "many">;
2918
+ guards: z.ZodObject<{
2919
+ max_tasks_per_run: z.ZodNumber;
2920
+ }, "strip", z.ZodTypeAny, {
2921
+ max_tasks_per_run: number;
2922
+ }, {
2923
+ max_tasks_per_run: number;
2924
+ }>;
2925
+ dry_run_stamp: z.ZodOptional<z.ZodObject<{
2926
+ version: z.ZodNumber;
2927
+ at: z.ZodDate;
2928
+ by: z.ZodString;
2929
+ }, "strip", z.ZodTypeAny, {
2930
+ version: number;
2931
+ at: Date;
2932
+ by: string;
2933
+ }, {
2934
+ version: number;
2935
+ at: Date;
2936
+ by: string;
2937
+ }>>;
2938
+ trigger_state: z.ZodOptional<z.ZodObject<{
2939
+ last_fired_at: z.ZodOptional<z.ZodDate>;
2940
+ }, "strip", z.ZodTypeAny, {
2941
+ last_fired_at?: Date | undefined;
2942
+ }, {
2943
+ last_fired_at?: Date | undefined;
2944
+ }>>;
2945
+ stats: z.ZodOptional<z.ZodObject<{
2946
+ last_run_at: z.ZodOptional<z.ZodDate>;
2947
+ last_materialized_at: z.ZodOptional<z.ZodDate>;
2948
+ last_run_id: z.ZodOptional<z.ZodString>;
2949
+ }, "strip", z.ZodTypeAny, {
2950
+ last_run_at?: Date | undefined;
2951
+ last_materialized_at?: Date | undefined;
2952
+ last_run_id?: string | undefined;
2953
+ }, {
2954
+ last_run_at?: Date | undefined;
2955
+ last_materialized_at?: Date | undefined;
2956
+ last_run_id?: string | undefined;
2957
+ }>>;
2958
+ created_at: z.ZodDate;
2959
+ updated_at: z.ZodDate;
2960
+ }, "strip", z.ZodTypeAny, {
2961
+ name: string;
2962
+ id: string;
2963
+ version: number;
2964
+ created_at: Date;
2965
+ updated_at: Date;
2966
+ active: boolean;
2967
+ trigger: {
2968
+ type: "cron";
2969
+ cron: {
2970
+ expression: string;
2971
+ timezone?: string | undefined;
2972
+ };
2973
+ };
2974
+ selection: {
2975
+ appointment: {
2976
+ date_window: {
2977
+ offset_days: number;
2978
+ offset_mode: "calendar" | "business";
2979
+ };
2980
+ calendar_ids?: string[] | undefined;
2981
+ status_in?: string[] | undefined;
2982
+ status_base_in?: string[] | undefined;
2983
+ appointment_type_not_in?: string[] | undefined;
2984
+ };
2985
+ target: "appointment";
2986
+ };
2987
+ branch_mode: "all" | "exclusive";
2988
+ branches: {
2989
+ name: string;
2990
+ id: string;
2991
+ outputs: ({
2992
+ type: "auto_task";
2993
+ kind: string;
2994
+ execute_at: {
2995
+ rule: "immediate";
2996
+ } | {
2997
+ base: "target_date" | "run_date";
2998
+ time: string;
2999
+ rule: "send_at_local";
3000
+ };
3001
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3002
+ payload: Record<string, unknown>;
3003
+ retry?: z.objectOutputType<{
3004
+ max_attempts: z.ZodNumber;
3005
+ attempt: z.ZodNumber;
3006
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3007
+ backoff_seconds: z.ZodNumber;
3008
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3009
+ last_error: z.ZodOptional<z.ZodObject<{
3010
+ message: z.ZodString;
3011
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3012
+ at: z.ZodDate;
3013
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3014
+ }, "strip", z.ZodTypeAny, {
3015
+ message: string;
3016
+ at: Date;
3017
+ code?: string | number | undefined;
3018
+ details?: Record<string, unknown> | undefined;
3019
+ }, {
3020
+ message: string;
3021
+ at: Date;
3022
+ code?: string | number | undefined;
3023
+ details?: Record<string, unknown> | undefined;
3024
+ }>>;
3025
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3026
+ on_failure?: z.objectOutputType<{
3027
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3028
+ name: z.ZodOptional<z.ZodString>;
3029
+ ref: z.ZodOptional<z.ZodAny>;
3030
+ }, "strip", z.ZodTypeAny, {
3031
+ name?: string | undefined;
3032
+ ref?: any;
3033
+ }, {
3034
+ name?: string | undefined;
3035
+ ref?: any;
3036
+ }>>;
3037
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3038
+ title: z.ZodOptional<z.ZodString>;
3039
+ description: z.ZodOptional<z.ZodString>;
3040
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3041
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3042
+ name: z.ZodString;
3043
+ color: z.ZodOptional<z.ZodString>;
3044
+ hidden: z.ZodBoolean;
3045
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3046
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3047
+ }, "strip", z.ZodTypeAny, {
3048
+ name: string;
3049
+ hidden: boolean;
3050
+ base?: boolean | undefined;
3051
+ color?: string | undefined;
3052
+ category?: string | null | undefined;
3053
+ }, {
3054
+ name: string;
3055
+ hidden: boolean;
3056
+ base?: boolean | undefined;
3057
+ color?: string | undefined;
3058
+ category?: string | null | undefined;
3059
+ }>, "many">>>;
3060
+ }, "strip", z.ZodTypeAny, {
3061
+ description?: string | undefined;
3062
+ tags?: {
3063
+ name: string;
3064
+ hidden: boolean;
3065
+ base?: boolean | undefined;
3066
+ color?: string | undefined;
3067
+ category?: string | null | undefined;
3068
+ }[] | null | undefined;
3069
+ title?: string | undefined;
3070
+ priority?: "low" | "medium" | "high" | undefined;
3071
+ }, {
3072
+ description?: string | undefined;
3073
+ tags?: {
3074
+ name: string;
3075
+ hidden: boolean;
3076
+ base?: boolean | undefined;
3077
+ color?: string | undefined;
3078
+ category?: string | null | undefined;
3079
+ }[] | null | undefined;
3080
+ title?: string | undefined;
3081
+ priority?: "low" | "medium" | "high" | undefined;
3082
+ }>>;
3083
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3084
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3085
+ kind: z.ZodString;
3086
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3087
+ }, "strip", z.ZodTypeAny, {
3088
+ kind: string;
3089
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3090
+ payload: Record<string, unknown>;
3091
+ }, {
3092
+ kind: string;
3093
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3094
+ payload: Record<string, unknown>;
3095
+ }>, "many">>;
3096
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3097
+ } | {
3098
+ type: "human_task";
3099
+ title: string;
3100
+ description?: string | undefined;
3101
+ assignee_ref?: string | undefined;
3102
+ })[];
3103
+ when?: ZAutomationConditionGroup | undefined;
3104
+ is_fallback?: boolean | undefined;
3105
+ }[];
3106
+ guards: {
3107
+ max_tasks_per_run: number;
3108
+ };
3109
+ description?: string | undefined;
3110
+ dry_run_stamp?: {
3111
+ version: number;
3112
+ at: Date;
3113
+ by: string;
3114
+ } | undefined;
3115
+ trigger_state?: {
3116
+ last_fired_at?: Date | undefined;
3117
+ } | undefined;
3118
+ stats?: {
3119
+ last_run_at?: Date | undefined;
3120
+ last_materialized_at?: Date | undefined;
3121
+ last_run_id?: string | undefined;
3122
+ } | undefined;
3123
+ }, {
3124
+ name: string;
3125
+ id: string;
3126
+ created_at: Date;
3127
+ updated_at: Date;
3128
+ trigger: {
3129
+ type: "cron";
3130
+ cron: {
3131
+ expression: string;
3132
+ timezone?: string | undefined;
3133
+ };
3134
+ };
3135
+ selection: {
3136
+ appointment: {
3137
+ date_window: {
3138
+ offset_days: number;
3139
+ offset_mode: "calendar" | "business";
3140
+ };
3141
+ calendar_ids?: string[] | undefined;
3142
+ status_in?: string[] | undefined;
3143
+ status_base_in?: string[] | undefined;
3144
+ appointment_type_not_in?: string[] | undefined;
3145
+ };
3146
+ target: "appointment";
3147
+ };
3148
+ branch_mode: "all" | "exclusive";
3149
+ branches: {
3150
+ name: string;
3151
+ id: string;
3152
+ outputs: ({
3153
+ type: "auto_task";
3154
+ kind: string;
3155
+ execute_at: {
3156
+ rule: "immediate";
3157
+ } | {
3158
+ base: "target_date" | "run_date";
3159
+ time: string;
3160
+ rule: "send_at_local";
3161
+ };
3162
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3163
+ payload?: Record<string, unknown> | undefined;
3164
+ retry?: z.objectInputType<{
3165
+ max_attempts: z.ZodNumber;
3166
+ attempt: z.ZodNumber;
3167
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3168
+ backoff_seconds: z.ZodNumber;
3169
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3170
+ last_error: z.ZodOptional<z.ZodObject<{
3171
+ message: z.ZodString;
3172
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3173
+ at: z.ZodDate;
3174
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3175
+ }, "strip", z.ZodTypeAny, {
3176
+ message: string;
3177
+ at: Date;
3178
+ code?: string | number | undefined;
3179
+ details?: Record<string, unknown> | undefined;
3180
+ }, {
3181
+ message: string;
3182
+ at: Date;
3183
+ code?: string | number | undefined;
3184
+ details?: Record<string, unknown> | undefined;
3185
+ }>>;
3186
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3187
+ on_failure?: z.objectInputType<{
3188
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3189
+ name: z.ZodOptional<z.ZodString>;
3190
+ ref: z.ZodOptional<z.ZodAny>;
3191
+ }, "strip", z.ZodTypeAny, {
3192
+ name?: string | undefined;
3193
+ ref?: any;
3194
+ }, {
3195
+ name?: string | undefined;
3196
+ ref?: any;
3197
+ }>>;
3198
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3199
+ title: z.ZodOptional<z.ZodString>;
3200
+ description: z.ZodOptional<z.ZodString>;
3201
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3202
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3203
+ name: z.ZodString;
3204
+ color: z.ZodOptional<z.ZodString>;
3205
+ hidden: z.ZodBoolean;
3206
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3207
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3208
+ }, "strip", z.ZodTypeAny, {
3209
+ name: string;
3210
+ hidden: boolean;
3211
+ base?: boolean | undefined;
3212
+ color?: string | undefined;
3213
+ category?: string | null | undefined;
3214
+ }, {
3215
+ name: string;
3216
+ hidden: boolean;
3217
+ base?: boolean | undefined;
3218
+ color?: string | undefined;
3219
+ category?: string | null | undefined;
3220
+ }>, "many">>>;
3221
+ }, "strip", z.ZodTypeAny, {
3222
+ description?: string | undefined;
3223
+ tags?: {
3224
+ name: string;
3225
+ hidden: boolean;
3226
+ base?: boolean | undefined;
3227
+ color?: string | undefined;
3228
+ category?: string | null | undefined;
3229
+ }[] | null | undefined;
3230
+ title?: string | undefined;
3231
+ priority?: "low" | "medium" | "high" | undefined;
3232
+ }, {
3233
+ description?: string | undefined;
3234
+ tags?: {
3235
+ name: string;
3236
+ hidden: boolean;
3237
+ base?: boolean | undefined;
3238
+ color?: string | undefined;
3239
+ category?: string | null | undefined;
3240
+ }[] | null | undefined;
3241
+ title?: string | undefined;
3242
+ priority?: "low" | "medium" | "high" | undefined;
3243
+ }>>;
3244
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3245
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3246
+ kind: z.ZodString;
3247
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3248
+ }, "strip", z.ZodTypeAny, {
3249
+ kind: string;
3250
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3251
+ payload: Record<string, unknown>;
3252
+ }, {
3253
+ kind: string;
3254
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3255
+ payload: Record<string, unknown>;
3256
+ }>, "many">>;
3257
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3258
+ } | {
3259
+ type: "human_task";
3260
+ title: string;
3261
+ description?: string | undefined;
3262
+ assignee_ref?: string | undefined;
3263
+ })[];
3264
+ when?: ZAutomationConditionGroup | undefined;
3265
+ is_fallback?: boolean | undefined;
3266
+ }[];
3267
+ guards: {
3268
+ max_tasks_per_run: number;
3269
+ };
3270
+ version?: number | undefined;
3271
+ active?: boolean | undefined;
3272
+ description?: string | undefined;
3273
+ dry_run_stamp?: {
3274
+ version: number;
3275
+ at: Date;
3276
+ by: string;
3277
+ } | undefined;
3278
+ trigger_state?: {
3279
+ last_fired_at?: Date | undefined;
3280
+ } | undefined;
3281
+ stats?: {
3282
+ last_run_at?: Date | undefined;
3283
+ last_materialized_at?: Date | undefined;
3284
+ last_run_id?: string | undefined;
3285
+ } | undefined;
3286
+ }>;
3287
+ export declare const zHubAutomationConfigSchema: z.ZodObject<{
3288
+ active: z.ZodDefault<z.ZodBoolean>;
3289
+ limits: z.ZodOptional<z.ZodObject<{
3290
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3291
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3292
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3293
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3294
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3295
+ }, z.ZodTypeAny, "passthrough">>>;
3296
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3297
+ active: z.ZodDefault<z.ZodBoolean>;
3298
+ limits: z.ZodOptional<z.ZodObject<{
3299
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3300
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3301
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3302
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3303
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3304
+ }, z.ZodTypeAny, "passthrough">>>;
3305
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3306
+ active: z.ZodDefault<z.ZodBoolean>;
3307
+ limits: z.ZodOptional<z.ZodObject<{
3308
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3309
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3310
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3311
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3312
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
3313
+ }, z.ZodTypeAny, "passthrough">>>;
3314
+ }, z.ZodTypeAny, "passthrough">>;
3315
+ export declare const zAutomationDryRunRequestSchema: z.ZodObject<{
3316
+ run_date: z.ZodOptional<z.ZodString>;
3317
+ }, "strip", z.ZodTypeAny, {
3318
+ run_date?: string | undefined;
3319
+ }, {
3320
+ run_date?: string | undefined;
3321
+ }>;
3322
+ export {};