evo360-types 1.3.408 → 1.3.409

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.
@@ -24,7 +24,14 @@ export declare const zAutomationCronTriggerSchema: z.ZodObject<{
24
24
  timezone?: string | undefined;
25
25
  };
26
26
  }>;
27
- export declare const zAutomationTriggerSchema: z.ZodObject<{
27
+ export declare const zAutomationWebhookTriggerSchema: z.ZodObject<{
28
+ type: z.ZodLiteral<"webhook">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: "webhook";
31
+ }, {
32
+ type: "webhook";
33
+ }>;
34
+ export declare const zAutomationTriggerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
28
35
  type: z.ZodLiteral<"cron">;
29
36
  cron: z.ZodObject<{
30
37
  expression: z.ZodString;
@@ -48,7 +55,13 @@ export declare const zAutomationTriggerSchema: z.ZodObject<{
48
55
  expression: string;
49
56
  timezone?: string | undefined;
50
57
  };
51
- }>;
58
+ }>, z.ZodObject<{
59
+ type: z.ZodLiteral<"webhook">;
60
+ }, "strip", z.ZodTypeAny, {
61
+ type: "webhook";
62
+ }, {
63
+ type: "webhook";
64
+ }>]>;
52
65
  export declare const zAutomationDateOffsetModeSchema: z.ZodEnum<["calendar", "business"]>;
53
66
  export declare const zAutomationDateWindowSchema: z.ZodObject<{
54
67
  offset_days: z.ZodNumber;
@@ -2058,7 +2071,7 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2058
2071
  description: z.ZodOptional<z.ZodString>;
2059
2072
  active: z.ZodDefault<z.ZodBoolean>;
2060
2073
  version: z.ZodDefault<z.ZodNumber>;
2061
- trigger: z.ZodObject<{
2074
+ trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2062
2075
  type: z.ZodLiteral<"cron">;
2063
2076
  cron: z.ZodObject<{
2064
2077
  expression: z.ZodString;
@@ -2082,7 +2095,13 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2082
2095
  expression: string;
2083
2096
  timezone?: string | undefined;
2084
2097
  };
2085
- }>;
2098
+ }>, z.ZodObject<{
2099
+ type: z.ZodLiteral<"webhook">;
2100
+ }, "strip", z.ZodTypeAny, {
2101
+ type: "webhook";
2102
+ }, {
2103
+ type: "webhook";
2104
+ }>]>;
2086
2105
  selection: z.ZodObject<{
2087
2106
  target: z.ZodLiteral<"appointment">;
2088
2107
  appointment: z.ZodObject<{
@@ -2970,6 +2989,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2970
2989
  expression: string;
2971
2990
  timezone?: string | undefined;
2972
2991
  };
2992
+ } | {
2993
+ type: "webhook";
2973
2994
  };
2974
2995
  selection: {
2975
2996
  appointment: {
@@ -3131,6 +3152,8 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3131
3152
  expression: string;
3132
3153
  timezone?: string | undefined;
3133
3154
  };
3155
+ } | {
3156
+ type: "webhook";
3134
3157
  };
3135
3158
  selection: {
3136
3159
  appointment: {
@@ -3284,35 +3307,2697 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3284
3307
  last_run_id?: string | undefined;
3285
3308
  } | undefined;
3286
3309
  }>;
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<{
3310
+ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3311
+ id: z.ZodString;
3312
+ name: z.ZodString;
3313
+ description: z.ZodOptional<z.ZodString>;
3306
3314
  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<{
3315
+ trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3316
+ type: z.ZodLiteral<"cron">;
3317
+ cron: z.ZodObject<{
3318
+ expression: z.ZodString;
3319
+ timezone: z.ZodOptional<z.ZodString>;
3320
+ }, "strip", z.ZodTypeAny, {
3321
+ expression: string;
3322
+ timezone?: string | undefined;
3323
+ }, {
3324
+ expression: string;
3325
+ timezone?: string | undefined;
3326
+ }>;
3327
+ }, "strip", z.ZodTypeAny, {
3328
+ type: "cron";
3329
+ cron: {
3330
+ expression: string;
3331
+ timezone?: string | undefined;
3332
+ };
3333
+ }, {
3334
+ type: "cron";
3335
+ cron: {
3336
+ expression: string;
3337
+ timezone?: string | undefined;
3338
+ };
3339
+ }>, z.ZodObject<{
3340
+ type: z.ZodLiteral<"webhook">;
3341
+ }, "strip", z.ZodTypeAny, {
3342
+ type: "webhook";
3343
+ }, {
3344
+ type: "webhook";
3345
+ }>]>;
3346
+ selection: z.ZodObject<{
3347
+ target: z.ZodLiteral<"appointment">;
3348
+ appointment: z.ZodObject<{
3349
+ calendar_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3350
+ date_window: z.ZodObject<{
3351
+ offset_days: z.ZodNumber;
3352
+ offset_mode: z.ZodEnum<["calendar", "business"]>;
3353
+ }, "strip", z.ZodTypeAny, {
3354
+ offset_days: number;
3355
+ offset_mode: "calendar" | "business";
3356
+ }, {
3357
+ offset_days: number;
3358
+ offset_mode: "calendar" | "business";
3359
+ }>;
3360
+ status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3361
+ status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3362
+ appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3363
+ }, "strip", z.ZodTypeAny, {
3364
+ date_window: {
3365
+ offset_days: number;
3366
+ offset_mode: "calendar" | "business";
3367
+ };
3368
+ calendar_ids?: string[] | undefined;
3369
+ status_in?: string[] | undefined;
3370
+ status_base_in?: string[] | undefined;
3371
+ appointment_type_not_in?: string[] | undefined;
3372
+ }, {
3373
+ date_window: {
3374
+ offset_days: number;
3375
+ offset_mode: "calendar" | "business";
3376
+ };
3377
+ calendar_ids?: string[] | undefined;
3378
+ status_in?: string[] | undefined;
3379
+ status_base_in?: string[] | undefined;
3380
+ appointment_type_not_in?: string[] | undefined;
3381
+ }>;
3382
+ }, "strip", z.ZodTypeAny, {
3383
+ appointment: {
3384
+ date_window: {
3385
+ offset_days: number;
3386
+ offset_mode: "calendar" | "business";
3387
+ };
3388
+ calendar_ids?: string[] | undefined;
3389
+ status_in?: string[] | undefined;
3390
+ status_base_in?: string[] | undefined;
3391
+ appointment_type_not_in?: string[] | undefined;
3392
+ };
3393
+ target: "appointment";
3394
+ }, {
3395
+ appointment: {
3396
+ date_window: {
3397
+ offset_days: number;
3398
+ offset_mode: "calendar" | "business";
3399
+ };
3400
+ calendar_ids?: string[] | undefined;
3401
+ status_in?: string[] | undefined;
3402
+ status_base_in?: string[] | undefined;
3403
+ appointment_type_not_in?: string[] | undefined;
3404
+ };
3405
+ target: "appointment";
3406
+ }>;
3407
+ branch_mode: z.ZodEnum<["all", "exclusive"]>;
3408
+ branches: z.ZodArray<z.ZodObject<{
3409
+ id: z.ZodString;
3410
+ name: z.ZodString;
3411
+ when: z.ZodOptional<z.ZodType<ZAutomationConditionGroup, z.ZodTypeDef, ZAutomationConditionGroup>>;
3412
+ is_fallback: z.ZodOptional<z.ZodBoolean>;
3413
+ outputs: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3414
+ type: z.ZodLiteral<"auto_task">;
3415
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3416
+ kind: z.ZodString;
3417
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3418
+ execute_at: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
3419
+ rule: z.ZodLiteral<"immediate">;
3420
+ }, "strip", z.ZodTypeAny, {
3421
+ rule: "immediate";
3422
+ }, {
3423
+ rule: "immediate";
3424
+ }>, z.ZodObject<{
3425
+ rule: z.ZodLiteral<"send_at_local">;
3426
+ time: z.ZodString;
3427
+ base: z.ZodEnum<["target_date", "run_date"]>;
3428
+ }, "strip", z.ZodTypeAny, {
3429
+ base: "target_date" | "run_date";
3430
+ time: string;
3431
+ rule: "send_at_local";
3432
+ }, {
3433
+ base: "target_date" | "run_date";
3434
+ time: string;
3435
+ rule: "send_at_local";
3436
+ }>]>;
3437
+ retry: z.ZodOptional<z.ZodObject<{
3438
+ max_attempts: z.ZodNumber;
3439
+ attempt: z.ZodNumber;
3440
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3441
+ backoff_seconds: z.ZodNumber;
3442
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3443
+ last_error: z.ZodOptional<z.ZodObject<{
3444
+ message: z.ZodString;
3445
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3446
+ at: z.ZodDate;
3447
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3448
+ }, "strip", z.ZodTypeAny, {
3449
+ message: string;
3450
+ at: Date;
3451
+ code?: string | number | undefined;
3452
+ details?: Record<string, unknown> | undefined;
3453
+ }, {
3454
+ message: string;
3455
+ at: Date;
3456
+ code?: string | number | undefined;
3457
+ details?: Record<string, unknown> | undefined;
3458
+ }>>;
3459
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3460
+ max_attempts: z.ZodNumber;
3461
+ attempt: z.ZodNumber;
3462
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3463
+ backoff_seconds: z.ZodNumber;
3464
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3465
+ last_error: z.ZodOptional<z.ZodObject<{
3466
+ message: z.ZodString;
3467
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3468
+ at: z.ZodDate;
3469
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3470
+ }, "strip", z.ZodTypeAny, {
3471
+ message: string;
3472
+ at: Date;
3473
+ code?: string | number | undefined;
3474
+ details?: Record<string, unknown> | undefined;
3475
+ }, {
3476
+ message: string;
3477
+ at: Date;
3478
+ code?: string | number | undefined;
3479
+ details?: Record<string, unknown> | undefined;
3480
+ }>>;
3481
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3482
+ max_attempts: z.ZodNumber;
3483
+ attempt: z.ZodNumber;
3484
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3485
+ backoff_seconds: z.ZodNumber;
3486
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3487
+ last_error: z.ZodOptional<z.ZodObject<{
3488
+ message: z.ZodString;
3489
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3490
+ at: z.ZodDate;
3491
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3492
+ }, "strip", z.ZodTypeAny, {
3493
+ message: string;
3494
+ at: Date;
3495
+ code?: string | number | undefined;
3496
+ details?: Record<string, unknown> | undefined;
3497
+ }, {
3498
+ message: string;
3499
+ at: Date;
3500
+ code?: string | number | undefined;
3501
+ details?: Record<string, unknown> | undefined;
3502
+ }>>;
3503
+ }, z.ZodTypeAny, "passthrough">>>;
3504
+ on_failure: z.ZodOptional<z.ZodObject<{
3505
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3506
+ name: z.ZodOptional<z.ZodString>;
3507
+ ref: z.ZodOptional<z.ZodAny>;
3508
+ }, "strip", z.ZodTypeAny, {
3509
+ name?: string | undefined;
3510
+ ref?: any;
3511
+ }, {
3512
+ name?: string | undefined;
3513
+ ref?: any;
3514
+ }>>;
3515
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3516
+ title: z.ZodOptional<z.ZodString>;
3517
+ description: z.ZodOptional<z.ZodString>;
3518
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3519
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3520
+ name: z.ZodString;
3521
+ color: z.ZodOptional<z.ZodString>;
3522
+ hidden: z.ZodBoolean;
3523
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3524
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3525
+ }, "strip", z.ZodTypeAny, {
3526
+ name: string;
3527
+ hidden: boolean;
3528
+ base?: boolean | undefined;
3529
+ color?: string | undefined;
3530
+ category?: string | null | undefined;
3531
+ }, {
3532
+ name: string;
3533
+ hidden: boolean;
3534
+ base?: boolean | undefined;
3535
+ color?: string | undefined;
3536
+ category?: string | null | undefined;
3537
+ }>, "many">>>;
3538
+ }, "strip", z.ZodTypeAny, {
3539
+ description?: string | undefined;
3540
+ tags?: {
3541
+ name: string;
3542
+ hidden: boolean;
3543
+ base?: boolean | undefined;
3544
+ color?: string | undefined;
3545
+ category?: string | null | undefined;
3546
+ }[] | null | undefined;
3547
+ title?: string | undefined;
3548
+ priority?: "low" | "medium" | "high" | undefined;
3549
+ }, {
3550
+ description?: string | undefined;
3551
+ tags?: {
3552
+ name: string;
3553
+ hidden: boolean;
3554
+ base?: boolean | undefined;
3555
+ color?: string | undefined;
3556
+ category?: string | null | undefined;
3557
+ }[] | null | undefined;
3558
+ title?: string | undefined;
3559
+ priority?: "low" | "medium" | "high" | undefined;
3560
+ }>>;
3561
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3562
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3563
+ kind: z.ZodString;
3564
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3565
+ }, "strip", z.ZodTypeAny, {
3566
+ kind: string;
3567
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3568
+ payload: Record<string, unknown>;
3569
+ }, {
3570
+ kind: string;
3571
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3572
+ payload: Record<string, unknown>;
3573
+ }>, "many">>;
3574
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3575
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3576
+ name: z.ZodOptional<z.ZodString>;
3577
+ ref: z.ZodOptional<z.ZodAny>;
3578
+ }, "strip", z.ZodTypeAny, {
3579
+ name?: string | undefined;
3580
+ ref?: any;
3581
+ }, {
3582
+ name?: string | undefined;
3583
+ ref?: any;
3584
+ }>>;
3585
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3586
+ title: z.ZodOptional<z.ZodString>;
3587
+ description: z.ZodOptional<z.ZodString>;
3588
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3589
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3590
+ name: z.ZodString;
3591
+ color: z.ZodOptional<z.ZodString>;
3592
+ hidden: z.ZodBoolean;
3593
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3594
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3595
+ }, "strip", z.ZodTypeAny, {
3596
+ name: string;
3597
+ hidden: boolean;
3598
+ base?: boolean | undefined;
3599
+ color?: string | undefined;
3600
+ category?: string | null | undefined;
3601
+ }, {
3602
+ name: string;
3603
+ hidden: boolean;
3604
+ base?: boolean | undefined;
3605
+ color?: string | undefined;
3606
+ category?: string | null | undefined;
3607
+ }>, "many">>>;
3608
+ }, "strip", z.ZodTypeAny, {
3609
+ description?: string | undefined;
3610
+ tags?: {
3611
+ name: string;
3612
+ hidden: boolean;
3613
+ base?: boolean | undefined;
3614
+ color?: string | undefined;
3615
+ category?: string | null | undefined;
3616
+ }[] | null | undefined;
3617
+ title?: string | undefined;
3618
+ priority?: "low" | "medium" | "high" | undefined;
3619
+ }, {
3620
+ description?: string | undefined;
3621
+ tags?: {
3622
+ name: string;
3623
+ hidden: boolean;
3624
+ base?: boolean | undefined;
3625
+ color?: string | undefined;
3626
+ category?: string | null | undefined;
3627
+ }[] | null | undefined;
3628
+ title?: string | undefined;
3629
+ priority?: "low" | "medium" | "high" | undefined;
3630
+ }>>;
3631
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3632
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3633
+ kind: z.ZodString;
3634
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3635
+ }, "strip", z.ZodTypeAny, {
3636
+ kind: string;
3637
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3638
+ payload: Record<string, unknown>;
3639
+ }, {
3640
+ kind: string;
3641
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3642
+ payload: Record<string, unknown>;
3643
+ }>, "many">>;
3644
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3645
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3646
+ name: z.ZodOptional<z.ZodString>;
3647
+ ref: z.ZodOptional<z.ZodAny>;
3648
+ }, "strip", z.ZodTypeAny, {
3649
+ name?: string | undefined;
3650
+ ref?: any;
3651
+ }, {
3652
+ name?: string | undefined;
3653
+ ref?: any;
3654
+ }>>;
3655
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3656
+ title: z.ZodOptional<z.ZodString>;
3657
+ description: z.ZodOptional<z.ZodString>;
3658
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3659
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3660
+ name: z.ZodString;
3661
+ color: z.ZodOptional<z.ZodString>;
3662
+ hidden: z.ZodBoolean;
3663
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3664
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3665
+ }, "strip", z.ZodTypeAny, {
3666
+ name: string;
3667
+ hidden: boolean;
3668
+ base?: boolean | undefined;
3669
+ color?: string | undefined;
3670
+ category?: string | null | undefined;
3671
+ }, {
3672
+ name: string;
3673
+ hidden: boolean;
3674
+ base?: boolean | undefined;
3675
+ color?: string | undefined;
3676
+ category?: string | null | undefined;
3677
+ }>, "many">>>;
3678
+ }, "strip", z.ZodTypeAny, {
3679
+ description?: string | undefined;
3680
+ tags?: {
3681
+ name: string;
3682
+ hidden: boolean;
3683
+ base?: boolean | undefined;
3684
+ color?: string | undefined;
3685
+ category?: string | null | undefined;
3686
+ }[] | null | undefined;
3687
+ title?: string | undefined;
3688
+ priority?: "low" | "medium" | "high" | undefined;
3689
+ }, {
3690
+ description?: string | undefined;
3691
+ tags?: {
3692
+ name: string;
3693
+ hidden: boolean;
3694
+ base?: boolean | undefined;
3695
+ color?: string | undefined;
3696
+ category?: string | null | undefined;
3697
+ }[] | null | undefined;
3698
+ title?: string | undefined;
3699
+ priority?: "low" | "medium" | "high" | undefined;
3700
+ }>>;
3701
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3702
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3703
+ kind: z.ZodString;
3704
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3705
+ }, "strip", z.ZodTypeAny, {
3706
+ kind: string;
3707
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3708
+ payload: Record<string, unknown>;
3709
+ }, {
3710
+ kind: string;
3711
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3712
+ payload: Record<string, unknown>;
3713
+ }>, "many">>;
3714
+ }, z.ZodTypeAny, "passthrough">>>;
3715
+ }, "strip", z.ZodTypeAny, {
3716
+ type: "auto_task";
3717
+ kind: string;
3718
+ execute_at: {
3719
+ rule: "immediate";
3720
+ } | {
3721
+ base: "target_date" | "run_date";
3722
+ time: string;
3723
+ rule: "send_at_local";
3724
+ };
3725
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3726
+ payload: Record<string, unknown>;
3727
+ retry?: z.objectOutputType<{
3728
+ max_attempts: z.ZodNumber;
3729
+ attempt: z.ZodNumber;
3730
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3731
+ backoff_seconds: z.ZodNumber;
3732
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3733
+ last_error: z.ZodOptional<z.ZodObject<{
3734
+ message: z.ZodString;
3735
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3736
+ at: z.ZodDate;
3737
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3738
+ }, "strip", z.ZodTypeAny, {
3739
+ message: string;
3740
+ at: Date;
3741
+ code?: string | number | undefined;
3742
+ details?: Record<string, unknown> | undefined;
3743
+ }, {
3744
+ message: string;
3745
+ at: Date;
3746
+ code?: string | number | undefined;
3747
+ details?: Record<string, unknown> | undefined;
3748
+ }>>;
3749
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3750
+ on_failure?: z.objectOutputType<{
3751
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3752
+ name: z.ZodOptional<z.ZodString>;
3753
+ ref: z.ZodOptional<z.ZodAny>;
3754
+ }, "strip", z.ZodTypeAny, {
3755
+ name?: string | undefined;
3756
+ ref?: any;
3757
+ }, {
3758
+ name?: string | undefined;
3759
+ ref?: any;
3760
+ }>>;
3761
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3762
+ title: z.ZodOptional<z.ZodString>;
3763
+ description: z.ZodOptional<z.ZodString>;
3764
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3765
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3766
+ name: z.ZodString;
3767
+ color: z.ZodOptional<z.ZodString>;
3768
+ hidden: z.ZodBoolean;
3769
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3770
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3771
+ }, "strip", z.ZodTypeAny, {
3772
+ name: string;
3773
+ hidden: boolean;
3774
+ base?: boolean | undefined;
3775
+ color?: string | undefined;
3776
+ category?: string | null | undefined;
3777
+ }, {
3778
+ name: string;
3779
+ hidden: boolean;
3780
+ base?: boolean | undefined;
3781
+ color?: string | undefined;
3782
+ category?: string | null | undefined;
3783
+ }>, "many">>>;
3784
+ }, "strip", z.ZodTypeAny, {
3785
+ description?: string | undefined;
3786
+ tags?: {
3787
+ name: string;
3788
+ hidden: boolean;
3789
+ base?: boolean | undefined;
3790
+ color?: string | undefined;
3791
+ category?: string | null | undefined;
3792
+ }[] | null | undefined;
3793
+ title?: string | undefined;
3794
+ priority?: "low" | "medium" | "high" | undefined;
3795
+ }, {
3796
+ description?: string | undefined;
3797
+ tags?: {
3798
+ name: string;
3799
+ hidden: boolean;
3800
+ base?: boolean | undefined;
3801
+ color?: string | undefined;
3802
+ category?: string | null | undefined;
3803
+ }[] | null | undefined;
3804
+ title?: string | undefined;
3805
+ priority?: "low" | "medium" | "high" | undefined;
3806
+ }>>;
3807
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3808
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3809
+ kind: z.ZodString;
3810
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3811
+ }, "strip", z.ZodTypeAny, {
3812
+ kind: string;
3813
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3814
+ payload: Record<string, unknown>;
3815
+ }, {
3816
+ kind: string;
3817
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3818
+ payload: Record<string, unknown>;
3819
+ }>, "many">>;
3820
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3821
+ }, {
3822
+ type: "auto_task";
3823
+ kind: string;
3824
+ execute_at: {
3825
+ rule: "immediate";
3826
+ } | {
3827
+ base: "target_date" | "run_date";
3828
+ time: string;
3829
+ rule: "send_at_local";
3830
+ };
3831
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3832
+ payload?: Record<string, unknown> | undefined;
3833
+ retry?: z.objectInputType<{
3834
+ max_attempts: z.ZodNumber;
3835
+ attempt: z.ZodNumber;
3836
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3837
+ backoff_seconds: z.ZodNumber;
3838
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3839
+ last_error: z.ZodOptional<z.ZodObject<{
3840
+ message: z.ZodString;
3841
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3842
+ at: z.ZodDate;
3843
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3844
+ }, "strip", z.ZodTypeAny, {
3845
+ message: string;
3846
+ at: Date;
3847
+ code?: string | number | undefined;
3848
+ details?: Record<string, unknown> | undefined;
3849
+ }, {
3850
+ message: string;
3851
+ at: Date;
3852
+ code?: string | number | undefined;
3853
+ details?: Record<string, unknown> | undefined;
3854
+ }>>;
3855
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3856
+ on_failure?: z.objectInputType<{
3857
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3858
+ name: z.ZodOptional<z.ZodString>;
3859
+ ref: z.ZodOptional<z.ZodAny>;
3860
+ }, "strip", z.ZodTypeAny, {
3861
+ name?: string | undefined;
3862
+ ref?: any;
3863
+ }, {
3864
+ name?: string | undefined;
3865
+ ref?: any;
3866
+ }>>;
3867
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3868
+ title: z.ZodOptional<z.ZodString>;
3869
+ description: z.ZodOptional<z.ZodString>;
3870
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3871
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3872
+ name: z.ZodString;
3873
+ color: z.ZodOptional<z.ZodString>;
3874
+ hidden: z.ZodBoolean;
3875
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3876
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3877
+ }, "strip", z.ZodTypeAny, {
3878
+ name: string;
3879
+ hidden: boolean;
3880
+ base?: boolean | undefined;
3881
+ color?: string | undefined;
3882
+ category?: string | null | undefined;
3883
+ }, {
3884
+ name: string;
3885
+ hidden: boolean;
3886
+ base?: boolean | undefined;
3887
+ color?: string | undefined;
3888
+ category?: string | null | undefined;
3889
+ }>, "many">>>;
3890
+ }, "strip", z.ZodTypeAny, {
3891
+ description?: string | undefined;
3892
+ tags?: {
3893
+ name: string;
3894
+ hidden: boolean;
3895
+ base?: boolean | undefined;
3896
+ color?: string | undefined;
3897
+ category?: string | null | undefined;
3898
+ }[] | null | undefined;
3899
+ title?: string | undefined;
3900
+ priority?: "low" | "medium" | "high" | undefined;
3901
+ }, {
3902
+ description?: string | undefined;
3903
+ tags?: {
3904
+ name: string;
3905
+ hidden: boolean;
3906
+ base?: boolean | undefined;
3907
+ color?: string | undefined;
3908
+ category?: string | null | undefined;
3909
+ }[] | null | undefined;
3910
+ title?: string | undefined;
3911
+ priority?: "low" | "medium" | "high" | undefined;
3912
+ }>>;
3913
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
3914
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
3915
+ kind: z.ZodString;
3916
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3917
+ }, "strip", z.ZodTypeAny, {
3918
+ kind: string;
3919
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3920
+ payload: Record<string, unknown>;
3921
+ }, {
3922
+ kind: string;
3923
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3924
+ payload: Record<string, unknown>;
3925
+ }>, "many">>;
3926
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3927
+ }>, z.ZodObject<{
3928
+ type: z.ZodLiteral<"human_task">;
3929
+ title: z.ZodString;
3930
+ description: z.ZodOptional<z.ZodString>;
3931
+ assignee_ref: z.ZodOptional<z.ZodString>;
3932
+ }, "strip", z.ZodTypeAny, {
3933
+ type: "human_task";
3934
+ title: string;
3935
+ description?: string | undefined;
3936
+ assignee_ref?: string | undefined;
3937
+ }, {
3938
+ type: "human_task";
3939
+ title: string;
3940
+ description?: string | undefined;
3941
+ assignee_ref?: string | undefined;
3942
+ }>]>, "many">;
3943
+ }, "strip", z.ZodTypeAny, {
3944
+ name: string;
3945
+ id: string;
3946
+ outputs: ({
3947
+ type: "auto_task";
3948
+ kind: string;
3949
+ execute_at: {
3950
+ rule: "immediate";
3951
+ } | {
3952
+ base: "target_date" | "run_date";
3953
+ time: string;
3954
+ rule: "send_at_local";
3955
+ };
3956
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3957
+ payload: Record<string, unknown>;
3958
+ retry?: z.objectOutputType<{
3959
+ max_attempts: z.ZodNumber;
3960
+ attempt: z.ZodNumber;
3961
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
3962
+ backoff_seconds: z.ZodNumber;
3963
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
3964
+ last_error: z.ZodOptional<z.ZodObject<{
3965
+ message: z.ZodString;
3966
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
3967
+ at: z.ZodDate;
3968
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3969
+ }, "strip", z.ZodTypeAny, {
3970
+ message: string;
3971
+ at: Date;
3972
+ code?: string | number | undefined;
3973
+ details?: Record<string, unknown> | undefined;
3974
+ }, {
3975
+ message: string;
3976
+ at: Date;
3977
+ code?: string | number | undefined;
3978
+ details?: Record<string, unknown> | undefined;
3979
+ }>>;
3980
+ }, z.ZodTypeAny, "passthrough"> | undefined;
3981
+ on_failure?: z.objectOutputType<{
3982
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
3983
+ name: z.ZodOptional<z.ZodString>;
3984
+ ref: z.ZodOptional<z.ZodAny>;
3985
+ }, "strip", z.ZodTypeAny, {
3986
+ name?: string | undefined;
3987
+ ref?: any;
3988
+ }, {
3989
+ name?: string | undefined;
3990
+ ref?: any;
3991
+ }>>;
3992
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
3993
+ title: z.ZodOptional<z.ZodString>;
3994
+ description: z.ZodOptional<z.ZodString>;
3995
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
3996
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
3997
+ name: z.ZodString;
3998
+ color: z.ZodOptional<z.ZodString>;
3999
+ hidden: z.ZodBoolean;
4000
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4001
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4002
+ }, "strip", z.ZodTypeAny, {
4003
+ name: string;
4004
+ hidden: boolean;
4005
+ base?: boolean | undefined;
4006
+ color?: string | undefined;
4007
+ category?: string | null | undefined;
4008
+ }, {
4009
+ name: string;
4010
+ hidden: boolean;
4011
+ base?: boolean | undefined;
4012
+ color?: string | undefined;
4013
+ category?: string | null | undefined;
4014
+ }>, "many">>>;
4015
+ }, "strip", z.ZodTypeAny, {
4016
+ description?: string | undefined;
4017
+ tags?: {
4018
+ name: string;
4019
+ hidden: boolean;
4020
+ base?: boolean | undefined;
4021
+ color?: string | undefined;
4022
+ category?: string | null | undefined;
4023
+ }[] | null | undefined;
4024
+ title?: string | undefined;
4025
+ priority?: "low" | "medium" | "high" | undefined;
4026
+ }, {
4027
+ description?: string | undefined;
4028
+ tags?: {
4029
+ name: string;
4030
+ hidden: boolean;
4031
+ base?: boolean | undefined;
4032
+ color?: string | undefined;
4033
+ category?: string | null | undefined;
4034
+ }[] | null | undefined;
4035
+ title?: string | undefined;
4036
+ priority?: "low" | "medium" | "high" | undefined;
4037
+ }>>;
4038
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4039
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4040
+ kind: z.ZodString;
4041
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4042
+ }, "strip", z.ZodTypeAny, {
4043
+ kind: string;
4044
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4045
+ payload: Record<string, unknown>;
4046
+ }, {
4047
+ kind: string;
4048
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4049
+ payload: Record<string, unknown>;
4050
+ }>, "many">>;
4051
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4052
+ } | {
4053
+ type: "human_task";
4054
+ title: string;
4055
+ description?: string | undefined;
4056
+ assignee_ref?: string | undefined;
4057
+ })[];
4058
+ when?: ZAutomationConditionGroup | undefined;
4059
+ is_fallback?: boolean | undefined;
4060
+ }, {
4061
+ name: string;
4062
+ id: string;
4063
+ outputs: ({
4064
+ type: "auto_task";
4065
+ kind: string;
4066
+ execute_at: {
4067
+ rule: "immediate";
4068
+ } | {
4069
+ base: "target_date" | "run_date";
4070
+ time: string;
4071
+ rule: "send_at_local";
4072
+ };
4073
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4074
+ payload?: Record<string, unknown> | undefined;
4075
+ retry?: z.objectInputType<{
4076
+ max_attempts: z.ZodNumber;
4077
+ attempt: z.ZodNumber;
4078
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4079
+ backoff_seconds: z.ZodNumber;
4080
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4081
+ last_error: z.ZodOptional<z.ZodObject<{
4082
+ message: z.ZodString;
4083
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4084
+ at: z.ZodDate;
4085
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4086
+ }, "strip", z.ZodTypeAny, {
4087
+ message: string;
4088
+ at: Date;
4089
+ code?: string | number | undefined;
4090
+ details?: Record<string, unknown> | undefined;
4091
+ }, {
4092
+ message: string;
4093
+ at: Date;
4094
+ code?: string | number | undefined;
4095
+ details?: Record<string, unknown> | undefined;
4096
+ }>>;
4097
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4098
+ on_failure?: z.objectInputType<{
4099
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4100
+ name: z.ZodOptional<z.ZodString>;
4101
+ ref: z.ZodOptional<z.ZodAny>;
4102
+ }, "strip", z.ZodTypeAny, {
4103
+ name?: string | undefined;
4104
+ ref?: any;
4105
+ }, {
4106
+ name?: string | undefined;
4107
+ ref?: any;
4108
+ }>>;
4109
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4110
+ title: z.ZodOptional<z.ZodString>;
4111
+ description: z.ZodOptional<z.ZodString>;
4112
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4113
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4114
+ name: z.ZodString;
4115
+ color: z.ZodOptional<z.ZodString>;
4116
+ hidden: z.ZodBoolean;
4117
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4118
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4119
+ }, "strip", z.ZodTypeAny, {
4120
+ name: string;
4121
+ hidden: boolean;
4122
+ base?: boolean | undefined;
4123
+ color?: string | undefined;
4124
+ category?: string | null | undefined;
4125
+ }, {
4126
+ name: string;
4127
+ hidden: boolean;
4128
+ base?: boolean | undefined;
4129
+ color?: string | undefined;
4130
+ category?: string | null | undefined;
4131
+ }>, "many">>>;
4132
+ }, "strip", z.ZodTypeAny, {
4133
+ description?: string | undefined;
4134
+ tags?: {
4135
+ name: string;
4136
+ hidden: boolean;
4137
+ base?: boolean | undefined;
4138
+ color?: string | undefined;
4139
+ category?: string | null | undefined;
4140
+ }[] | null | undefined;
4141
+ title?: string | undefined;
4142
+ priority?: "low" | "medium" | "high" | undefined;
4143
+ }, {
4144
+ description?: string | undefined;
4145
+ tags?: {
4146
+ name: string;
4147
+ hidden: boolean;
4148
+ base?: boolean | undefined;
4149
+ color?: string | undefined;
4150
+ category?: string | null | undefined;
4151
+ }[] | null | undefined;
4152
+ title?: string | undefined;
4153
+ priority?: "low" | "medium" | "high" | undefined;
4154
+ }>>;
4155
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4156
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4157
+ kind: z.ZodString;
4158
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4159
+ }, "strip", z.ZodTypeAny, {
4160
+ kind: string;
4161
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4162
+ payload: Record<string, unknown>;
4163
+ }, {
4164
+ kind: string;
4165
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4166
+ payload: Record<string, unknown>;
4167
+ }>, "many">>;
4168
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4169
+ } | {
4170
+ type: "human_task";
4171
+ title: string;
4172
+ description?: string | undefined;
4173
+ assignee_ref?: string | undefined;
4174
+ })[];
4175
+ when?: ZAutomationConditionGroup | undefined;
4176
+ is_fallback?: boolean | undefined;
4177
+ }>, "many">;
4178
+ guards: z.ZodObject<{
4179
+ max_tasks_per_run: z.ZodNumber;
4180
+ }, "strip", z.ZodTypeAny, {
4181
+ max_tasks_per_run: number;
4182
+ }, {
4183
+ max_tasks_per_run: number;
4184
+ }>;
4185
+ }, "strip", z.ZodTypeAny, {
4186
+ name: string;
4187
+ id: string;
4188
+ active: boolean;
4189
+ trigger: {
4190
+ type: "cron";
4191
+ cron: {
4192
+ expression: string;
4193
+ timezone?: string | undefined;
4194
+ };
4195
+ } | {
4196
+ type: "webhook";
4197
+ };
4198
+ selection: {
4199
+ appointment: {
4200
+ date_window: {
4201
+ offset_days: number;
4202
+ offset_mode: "calendar" | "business";
4203
+ };
4204
+ calendar_ids?: string[] | undefined;
4205
+ status_in?: string[] | undefined;
4206
+ status_base_in?: string[] | undefined;
4207
+ appointment_type_not_in?: string[] | undefined;
4208
+ };
4209
+ target: "appointment";
4210
+ };
4211
+ branch_mode: "all" | "exclusive";
4212
+ branches: {
4213
+ name: string;
4214
+ id: string;
4215
+ outputs: ({
4216
+ type: "auto_task";
4217
+ kind: string;
4218
+ execute_at: {
4219
+ rule: "immediate";
4220
+ } | {
4221
+ base: "target_date" | "run_date";
4222
+ time: string;
4223
+ rule: "send_at_local";
4224
+ };
4225
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4226
+ payload: Record<string, unknown>;
4227
+ retry?: z.objectOutputType<{
4228
+ max_attempts: z.ZodNumber;
4229
+ attempt: z.ZodNumber;
4230
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4231
+ backoff_seconds: z.ZodNumber;
4232
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4233
+ last_error: z.ZodOptional<z.ZodObject<{
4234
+ message: z.ZodString;
4235
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4236
+ at: z.ZodDate;
4237
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4238
+ }, "strip", z.ZodTypeAny, {
4239
+ message: string;
4240
+ at: Date;
4241
+ code?: string | number | undefined;
4242
+ details?: Record<string, unknown> | undefined;
4243
+ }, {
4244
+ message: string;
4245
+ at: Date;
4246
+ code?: string | number | undefined;
4247
+ details?: Record<string, unknown> | undefined;
4248
+ }>>;
4249
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4250
+ on_failure?: z.objectOutputType<{
4251
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4252
+ name: z.ZodOptional<z.ZodString>;
4253
+ ref: z.ZodOptional<z.ZodAny>;
4254
+ }, "strip", z.ZodTypeAny, {
4255
+ name?: string | undefined;
4256
+ ref?: any;
4257
+ }, {
4258
+ name?: string | undefined;
4259
+ ref?: any;
4260
+ }>>;
4261
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4262
+ title: z.ZodOptional<z.ZodString>;
4263
+ description: z.ZodOptional<z.ZodString>;
4264
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4265
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4266
+ name: z.ZodString;
4267
+ color: z.ZodOptional<z.ZodString>;
4268
+ hidden: z.ZodBoolean;
4269
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4270
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4271
+ }, "strip", z.ZodTypeAny, {
4272
+ name: string;
4273
+ hidden: boolean;
4274
+ base?: boolean | undefined;
4275
+ color?: string | undefined;
4276
+ category?: string | null | undefined;
4277
+ }, {
4278
+ name: string;
4279
+ hidden: boolean;
4280
+ base?: boolean | undefined;
4281
+ color?: string | undefined;
4282
+ category?: string | null | undefined;
4283
+ }>, "many">>>;
4284
+ }, "strip", z.ZodTypeAny, {
4285
+ description?: string | undefined;
4286
+ tags?: {
4287
+ name: string;
4288
+ hidden: boolean;
4289
+ base?: boolean | undefined;
4290
+ color?: string | undefined;
4291
+ category?: string | null | undefined;
4292
+ }[] | null | undefined;
4293
+ title?: string | undefined;
4294
+ priority?: "low" | "medium" | "high" | undefined;
4295
+ }, {
4296
+ description?: string | undefined;
4297
+ tags?: {
4298
+ name: string;
4299
+ hidden: boolean;
4300
+ base?: boolean | undefined;
4301
+ color?: string | undefined;
4302
+ category?: string | null | undefined;
4303
+ }[] | null | undefined;
4304
+ title?: string | undefined;
4305
+ priority?: "low" | "medium" | "high" | undefined;
4306
+ }>>;
4307
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4308
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4309
+ kind: z.ZodString;
4310
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4311
+ }, "strip", z.ZodTypeAny, {
4312
+ kind: string;
4313
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4314
+ payload: Record<string, unknown>;
4315
+ }, {
4316
+ kind: string;
4317
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4318
+ payload: Record<string, unknown>;
4319
+ }>, "many">>;
4320
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4321
+ } | {
4322
+ type: "human_task";
4323
+ title: string;
4324
+ description?: string | undefined;
4325
+ assignee_ref?: string | undefined;
4326
+ })[];
4327
+ when?: ZAutomationConditionGroup | undefined;
4328
+ is_fallback?: boolean | undefined;
4329
+ }[];
4330
+ guards: {
4331
+ max_tasks_per_run: number;
4332
+ };
4333
+ description?: string | undefined;
4334
+ }, {
4335
+ name: string;
4336
+ id: string;
4337
+ trigger: {
4338
+ type: "cron";
4339
+ cron: {
4340
+ expression: string;
4341
+ timezone?: string | undefined;
4342
+ };
4343
+ } | {
4344
+ type: "webhook";
4345
+ };
4346
+ selection: {
4347
+ appointment: {
4348
+ date_window: {
4349
+ offset_days: number;
4350
+ offset_mode: "calendar" | "business";
4351
+ };
4352
+ calendar_ids?: string[] | undefined;
4353
+ status_in?: string[] | undefined;
4354
+ status_base_in?: string[] | undefined;
4355
+ appointment_type_not_in?: string[] | undefined;
4356
+ };
4357
+ target: "appointment";
4358
+ };
4359
+ branch_mode: "all" | "exclusive";
4360
+ branches: {
4361
+ name: string;
4362
+ id: string;
4363
+ outputs: ({
4364
+ type: "auto_task";
4365
+ kind: string;
4366
+ execute_at: {
4367
+ rule: "immediate";
4368
+ } | {
4369
+ base: "target_date" | "run_date";
4370
+ time: string;
4371
+ rule: "send_at_local";
4372
+ };
4373
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4374
+ payload?: Record<string, unknown> | undefined;
4375
+ retry?: z.objectInputType<{
4376
+ max_attempts: z.ZodNumber;
4377
+ attempt: z.ZodNumber;
4378
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4379
+ backoff_seconds: z.ZodNumber;
4380
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4381
+ last_error: z.ZodOptional<z.ZodObject<{
4382
+ message: z.ZodString;
4383
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4384
+ at: z.ZodDate;
4385
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4386
+ }, "strip", z.ZodTypeAny, {
4387
+ message: string;
4388
+ at: Date;
4389
+ code?: string | number | undefined;
4390
+ details?: Record<string, unknown> | undefined;
4391
+ }, {
4392
+ message: string;
4393
+ at: Date;
4394
+ code?: string | number | undefined;
4395
+ details?: Record<string, unknown> | undefined;
4396
+ }>>;
4397
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4398
+ on_failure?: z.objectInputType<{
4399
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4400
+ name: z.ZodOptional<z.ZodString>;
4401
+ ref: z.ZodOptional<z.ZodAny>;
4402
+ }, "strip", z.ZodTypeAny, {
4403
+ name?: string | undefined;
4404
+ ref?: any;
4405
+ }, {
4406
+ name?: string | undefined;
4407
+ ref?: any;
4408
+ }>>;
4409
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4410
+ title: z.ZodOptional<z.ZodString>;
4411
+ description: z.ZodOptional<z.ZodString>;
4412
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4413
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4414
+ name: z.ZodString;
4415
+ color: z.ZodOptional<z.ZodString>;
4416
+ hidden: z.ZodBoolean;
4417
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4418
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4419
+ }, "strip", z.ZodTypeAny, {
4420
+ name: string;
4421
+ hidden: boolean;
4422
+ base?: boolean | undefined;
4423
+ color?: string | undefined;
4424
+ category?: string | null | undefined;
4425
+ }, {
4426
+ name: string;
4427
+ hidden: boolean;
4428
+ base?: boolean | undefined;
4429
+ color?: string | undefined;
4430
+ category?: string | null | undefined;
4431
+ }>, "many">>>;
4432
+ }, "strip", z.ZodTypeAny, {
4433
+ description?: string | undefined;
4434
+ tags?: {
4435
+ name: string;
4436
+ hidden: boolean;
4437
+ base?: boolean | undefined;
4438
+ color?: string | undefined;
4439
+ category?: string | null | undefined;
4440
+ }[] | null | undefined;
4441
+ title?: string | undefined;
4442
+ priority?: "low" | "medium" | "high" | undefined;
4443
+ }, {
4444
+ description?: string | undefined;
4445
+ tags?: {
4446
+ name: string;
4447
+ hidden: boolean;
4448
+ base?: boolean | undefined;
4449
+ color?: string | undefined;
4450
+ category?: string | null | undefined;
4451
+ }[] | null | undefined;
4452
+ title?: string | undefined;
4453
+ priority?: "low" | "medium" | "high" | undefined;
4454
+ }>>;
4455
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4456
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4457
+ kind: z.ZodString;
4458
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4459
+ }, "strip", z.ZodTypeAny, {
4460
+ kind: string;
4461
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4462
+ payload: Record<string, unknown>;
4463
+ }, {
4464
+ kind: string;
4465
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4466
+ payload: Record<string, unknown>;
4467
+ }>, "many">>;
4468
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4469
+ } | {
4470
+ type: "human_task";
4471
+ title: string;
4472
+ description?: string | undefined;
4473
+ assignee_ref?: string | undefined;
4474
+ })[];
4475
+ when?: ZAutomationConditionGroup | undefined;
4476
+ is_fallback?: boolean | undefined;
4477
+ }[];
4478
+ guards: {
4479
+ max_tasks_per_run: number;
4480
+ };
4481
+ active?: boolean | undefined;
4482
+ description?: string | undefined;
4483
+ }>;
4484
+ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4485
+ routine: z.ZodObject<{
4486
+ id: z.ZodString;
4487
+ name: z.ZodString;
4488
+ description: z.ZodOptional<z.ZodString>;
4489
+ active: z.ZodDefault<z.ZodBoolean>;
4490
+ trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4491
+ type: z.ZodLiteral<"cron">;
4492
+ cron: z.ZodObject<{
4493
+ expression: z.ZodString;
4494
+ timezone: z.ZodOptional<z.ZodString>;
4495
+ }, "strip", z.ZodTypeAny, {
4496
+ expression: string;
4497
+ timezone?: string | undefined;
4498
+ }, {
4499
+ expression: string;
4500
+ timezone?: string | undefined;
4501
+ }>;
4502
+ }, "strip", z.ZodTypeAny, {
4503
+ type: "cron";
4504
+ cron: {
4505
+ expression: string;
4506
+ timezone?: string | undefined;
4507
+ };
4508
+ }, {
4509
+ type: "cron";
4510
+ cron: {
4511
+ expression: string;
4512
+ timezone?: string | undefined;
4513
+ };
4514
+ }>, z.ZodObject<{
4515
+ type: z.ZodLiteral<"webhook">;
4516
+ }, "strip", z.ZodTypeAny, {
4517
+ type: "webhook";
4518
+ }, {
4519
+ type: "webhook";
4520
+ }>]>;
4521
+ selection: z.ZodObject<{
4522
+ target: z.ZodLiteral<"appointment">;
4523
+ appointment: z.ZodObject<{
4524
+ calendar_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4525
+ date_window: z.ZodObject<{
4526
+ offset_days: z.ZodNumber;
4527
+ offset_mode: z.ZodEnum<["calendar", "business"]>;
4528
+ }, "strip", z.ZodTypeAny, {
4529
+ offset_days: number;
4530
+ offset_mode: "calendar" | "business";
4531
+ }, {
4532
+ offset_days: number;
4533
+ offset_mode: "calendar" | "business";
4534
+ }>;
4535
+ status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4536
+ status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4537
+ appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4538
+ }, "strip", z.ZodTypeAny, {
4539
+ date_window: {
4540
+ offset_days: number;
4541
+ offset_mode: "calendar" | "business";
4542
+ };
4543
+ calendar_ids?: string[] | undefined;
4544
+ status_in?: string[] | undefined;
4545
+ status_base_in?: string[] | undefined;
4546
+ appointment_type_not_in?: string[] | undefined;
4547
+ }, {
4548
+ date_window: {
4549
+ offset_days: number;
4550
+ offset_mode: "calendar" | "business";
4551
+ };
4552
+ calendar_ids?: string[] | undefined;
4553
+ status_in?: string[] | undefined;
4554
+ status_base_in?: string[] | undefined;
4555
+ appointment_type_not_in?: string[] | undefined;
4556
+ }>;
4557
+ }, "strip", z.ZodTypeAny, {
4558
+ appointment: {
4559
+ date_window: {
4560
+ offset_days: number;
4561
+ offset_mode: "calendar" | "business";
4562
+ };
4563
+ calendar_ids?: string[] | undefined;
4564
+ status_in?: string[] | undefined;
4565
+ status_base_in?: string[] | undefined;
4566
+ appointment_type_not_in?: string[] | undefined;
4567
+ };
4568
+ target: "appointment";
4569
+ }, {
4570
+ appointment: {
4571
+ date_window: {
4572
+ offset_days: number;
4573
+ offset_mode: "calendar" | "business";
4574
+ };
4575
+ calendar_ids?: string[] | undefined;
4576
+ status_in?: string[] | undefined;
4577
+ status_base_in?: string[] | undefined;
4578
+ appointment_type_not_in?: string[] | undefined;
4579
+ };
4580
+ target: "appointment";
4581
+ }>;
4582
+ branch_mode: z.ZodEnum<["all", "exclusive"]>;
4583
+ branches: z.ZodArray<z.ZodObject<{
4584
+ id: z.ZodString;
4585
+ name: z.ZodString;
4586
+ when: z.ZodOptional<z.ZodType<ZAutomationConditionGroup, z.ZodTypeDef, ZAutomationConditionGroup>>;
4587
+ is_fallback: z.ZodOptional<z.ZodBoolean>;
4588
+ outputs: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4589
+ type: z.ZodLiteral<"auto_task">;
4590
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4591
+ kind: z.ZodString;
4592
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4593
+ execute_at: z.ZodDiscriminatedUnion<"rule", [z.ZodObject<{
4594
+ rule: z.ZodLiteral<"immediate">;
4595
+ }, "strip", z.ZodTypeAny, {
4596
+ rule: "immediate";
4597
+ }, {
4598
+ rule: "immediate";
4599
+ }>, z.ZodObject<{
4600
+ rule: z.ZodLiteral<"send_at_local">;
4601
+ time: z.ZodString;
4602
+ base: z.ZodEnum<["target_date", "run_date"]>;
4603
+ }, "strip", z.ZodTypeAny, {
4604
+ base: "target_date" | "run_date";
4605
+ time: string;
4606
+ rule: "send_at_local";
4607
+ }, {
4608
+ base: "target_date" | "run_date";
4609
+ time: string;
4610
+ rule: "send_at_local";
4611
+ }>]>;
4612
+ retry: z.ZodOptional<z.ZodObject<{
4613
+ max_attempts: z.ZodNumber;
4614
+ attempt: z.ZodNumber;
4615
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4616
+ backoff_seconds: z.ZodNumber;
4617
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4618
+ last_error: z.ZodOptional<z.ZodObject<{
4619
+ message: z.ZodString;
4620
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4621
+ at: z.ZodDate;
4622
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4623
+ }, "strip", z.ZodTypeAny, {
4624
+ message: string;
4625
+ at: Date;
4626
+ code?: string | number | undefined;
4627
+ details?: Record<string, unknown> | undefined;
4628
+ }, {
4629
+ message: string;
4630
+ at: Date;
4631
+ code?: string | number | undefined;
4632
+ details?: Record<string, unknown> | undefined;
4633
+ }>>;
4634
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4635
+ max_attempts: z.ZodNumber;
4636
+ attempt: z.ZodNumber;
4637
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4638
+ backoff_seconds: z.ZodNumber;
4639
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4640
+ last_error: z.ZodOptional<z.ZodObject<{
4641
+ message: z.ZodString;
4642
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4643
+ at: z.ZodDate;
4644
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4645
+ }, "strip", z.ZodTypeAny, {
4646
+ message: string;
4647
+ at: Date;
4648
+ code?: string | number | undefined;
4649
+ details?: Record<string, unknown> | undefined;
4650
+ }, {
4651
+ message: string;
4652
+ at: Date;
4653
+ code?: string | number | undefined;
4654
+ details?: Record<string, unknown> | undefined;
4655
+ }>>;
4656
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4657
+ max_attempts: z.ZodNumber;
4658
+ attempt: z.ZodNumber;
4659
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4660
+ backoff_seconds: z.ZodNumber;
4661
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4662
+ last_error: z.ZodOptional<z.ZodObject<{
4663
+ message: z.ZodString;
4664
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4665
+ at: z.ZodDate;
4666
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4667
+ }, "strip", z.ZodTypeAny, {
4668
+ message: string;
4669
+ at: Date;
4670
+ code?: string | number | undefined;
4671
+ details?: Record<string, unknown> | undefined;
4672
+ }, {
4673
+ message: string;
4674
+ at: Date;
4675
+ code?: string | number | undefined;
4676
+ details?: Record<string, unknown> | undefined;
4677
+ }>>;
4678
+ }, z.ZodTypeAny, "passthrough">>>;
4679
+ on_failure: z.ZodOptional<z.ZodObject<{
4680
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4681
+ name: z.ZodOptional<z.ZodString>;
4682
+ ref: z.ZodOptional<z.ZodAny>;
4683
+ }, "strip", z.ZodTypeAny, {
4684
+ name?: string | undefined;
4685
+ ref?: any;
4686
+ }, {
4687
+ name?: string | undefined;
4688
+ ref?: any;
4689
+ }>>;
4690
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4691
+ title: z.ZodOptional<z.ZodString>;
4692
+ description: z.ZodOptional<z.ZodString>;
4693
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4694
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4695
+ name: z.ZodString;
4696
+ color: z.ZodOptional<z.ZodString>;
4697
+ hidden: z.ZodBoolean;
4698
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4699
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4700
+ }, "strip", z.ZodTypeAny, {
4701
+ name: string;
4702
+ hidden: boolean;
4703
+ base?: boolean | undefined;
4704
+ color?: string | undefined;
4705
+ category?: string | null | undefined;
4706
+ }, {
4707
+ name: string;
4708
+ hidden: boolean;
4709
+ base?: boolean | undefined;
4710
+ color?: string | undefined;
4711
+ category?: string | null | undefined;
4712
+ }>, "many">>>;
4713
+ }, "strip", z.ZodTypeAny, {
4714
+ description?: string | undefined;
4715
+ tags?: {
4716
+ name: string;
4717
+ hidden: boolean;
4718
+ base?: boolean | undefined;
4719
+ color?: string | undefined;
4720
+ category?: string | null | undefined;
4721
+ }[] | null | undefined;
4722
+ title?: string | undefined;
4723
+ priority?: "low" | "medium" | "high" | undefined;
4724
+ }, {
4725
+ description?: string | undefined;
4726
+ tags?: {
4727
+ name: string;
4728
+ hidden: boolean;
4729
+ base?: boolean | undefined;
4730
+ color?: string | undefined;
4731
+ category?: string | null | undefined;
4732
+ }[] | null | undefined;
4733
+ title?: string | undefined;
4734
+ priority?: "low" | "medium" | "high" | undefined;
4735
+ }>>;
4736
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4737
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4738
+ kind: z.ZodString;
4739
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4740
+ }, "strip", z.ZodTypeAny, {
4741
+ kind: string;
4742
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4743
+ payload: Record<string, unknown>;
4744
+ }, {
4745
+ kind: string;
4746
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4747
+ payload: Record<string, unknown>;
4748
+ }>, "many">>;
4749
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4750
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4751
+ name: z.ZodOptional<z.ZodString>;
4752
+ ref: z.ZodOptional<z.ZodAny>;
4753
+ }, "strip", z.ZodTypeAny, {
4754
+ name?: string | undefined;
4755
+ ref?: any;
4756
+ }, {
4757
+ name?: string | undefined;
4758
+ ref?: any;
4759
+ }>>;
4760
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4761
+ title: z.ZodOptional<z.ZodString>;
4762
+ description: z.ZodOptional<z.ZodString>;
4763
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4764
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4765
+ name: z.ZodString;
4766
+ color: z.ZodOptional<z.ZodString>;
4767
+ hidden: z.ZodBoolean;
4768
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4769
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4770
+ }, "strip", z.ZodTypeAny, {
4771
+ name: string;
4772
+ hidden: boolean;
4773
+ base?: boolean | undefined;
4774
+ color?: string | undefined;
4775
+ category?: string | null | undefined;
4776
+ }, {
4777
+ name: string;
4778
+ hidden: boolean;
4779
+ base?: boolean | undefined;
4780
+ color?: string | undefined;
4781
+ category?: string | null | undefined;
4782
+ }>, "many">>>;
4783
+ }, "strip", z.ZodTypeAny, {
4784
+ description?: string | undefined;
4785
+ tags?: {
4786
+ name: string;
4787
+ hidden: boolean;
4788
+ base?: boolean | undefined;
4789
+ color?: string | undefined;
4790
+ category?: string | null | undefined;
4791
+ }[] | null | undefined;
4792
+ title?: string | undefined;
4793
+ priority?: "low" | "medium" | "high" | undefined;
4794
+ }, {
4795
+ description?: string | undefined;
4796
+ tags?: {
4797
+ name: string;
4798
+ hidden: boolean;
4799
+ base?: boolean | undefined;
4800
+ color?: string | undefined;
4801
+ category?: string | null | undefined;
4802
+ }[] | null | undefined;
4803
+ title?: string | undefined;
4804
+ priority?: "low" | "medium" | "high" | undefined;
4805
+ }>>;
4806
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4807
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4808
+ kind: z.ZodString;
4809
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4810
+ }, "strip", z.ZodTypeAny, {
4811
+ kind: string;
4812
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4813
+ payload: Record<string, unknown>;
4814
+ }, {
4815
+ kind: string;
4816
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4817
+ payload: Record<string, unknown>;
4818
+ }>, "many">>;
4819
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4820
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4821
+ name: z.ZodOptional<z.ZodString>;
4822
+ ref: z.ZodOptional<z.ZodAny>;
4823
+ }, "strip", z.ZodTypeAny, {
4824
+ name?: string | undefined;
4825
+ ref?: any;
4826
+ }, {
4827
+ name?: string | undefined;
4828
+ ref?: any;
4829
+ }>>;
4830
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4831
+ title: z.ZodOptional<z.ZodString>;
4832
+ description: z.ZodOptional<z.ZodString>;
4833
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4834
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4835
+ name: z.ZodString;
4836
+ color: z.ZodOptional<z.ZodString>;
4837
+ hidden: z.ZodBoolean;
4838
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4839
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4840
+ }, "strip", z.ZodTypeAny, {
4841
+ name: string;
4842
+ hidden: boolean;
4843
+ base?: boolean | undefined;
4844
+ color?: string | undefined;
4845
+ category?: string | null | undefined;
4846
+ }, {
4847
+ name: string;
4848
+ hidden: boolean;
4849
+ base?: boolean | undefined;
4850
+ color?: string | undefined;
4851
+ category?: string | null | undefined;
4852
+ }>, "many">>>;
4853
+ }, "strip", z.ZodTypeAny, {
4854
+ description?: string | undefined;
4855
+ tags?: {
4856
+ name: string;
4857
+ hidden: boolean;
4858
+ base?: boolean | undefined;
4859
+ color?: string | undefined;
4860
+ category?: string | null | undefined;
4861
+ }[] | null | undefined;
4862
+ title?: string | undefined;
4863
+ priority?: "low" | "medium" | "high" | undefined;
4864
+ }, {
4865
+ description?: string | undefined;
4866
+ tags?: {
4867
+ name: string;
4868
+ hidden: boolean;
4869
+ base?: boolean | undefined;
4870
+ color?: string | undefined;
4871
+ category?: string | null | undefined;
4872
+ }[] | null | undefined;
4873
+ title?: string | undefined;
4874
+ priority?: "low" | "medium" | "high" | undefined;
4875
+ }>>;
4876
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4877
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4878
+ kind: z.ZodString;
4879
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4880
+ }, "strip", z.ZodTypeAny, {
4881
+ kind: string;
4882
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4883
+ payload: Record<string, unknown>;
4884
+ }, {
4885
+ kind: string;
4886
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4887
+ payload: Record<string, unknown>;
4888
+ }>, "many">>;
4889
+ }, z.ZodTypeAny, "passthrough">>>;
4890
+ }, "strip", z.ZodTypeAny, {
4891
+ type: "auto_task";
4892
+ kind: string;
4893
+ execute_at: {
4894
+ rule: "immediate";
4895
+ } | {
4896
+ base: "target_date" | "run_date";
4897
+ time: string;
4898
+ rule: "send_at_local";
4899
+ };
4900
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4901
+ payload: Record<string, unknown>;
4902
+ retry?: z.objectOutputType<{
4903
+ max_attempts: z.ZodNumber;
4904
+ attempt: z.ZodNumber;
4905
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
4906
+ backoff_seconds: z.ZodNumber;
4907
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
4908
+ last_error: z.ZodOptional<z.ZodObject<{
4909
+ message: z.ZodString;
4910
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
4911
+ at: z.ZodDate;
4912
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4913
+ }, "strip", z.ZodTypeAny, {
4914
+ message: string;
4915
+ at: Date;
4916
+ code?: string | number | undefined;
4917
+ details?: Record<string, unknown> | undefined;
4918
+ }, {
4919
+ message: string;
4920
+ at: Date;
4921
+ code?: string | number | undefined;
4922
+ details?: Record<string, unknown> | undefined;
4923
+ }>>;
4924
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4925
+ on_failure?: z.objectOutputType<{
4926
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
4927
+ name: z.ZodOptional<z.ZodString>;
4928
+ ref: z.ZodOptional<z.ZodAny>;
4929
+ }, "strip", z.ZodTypeAny, {
4930
+ name?: string | undefined;
4931
+ ref?: any;
4932
+ }, {
4933
+ name?: string | undefined;
4934
+ ref?: any;
4935
+ }>>;
4936
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
4937
+ title: z.ZodOptional<z.ZodString>;
4938
+ description: z.ZodOptional<z.ZodString>;
4939
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
4940
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
4941
+ name: z.ZodString;
4942
+ color: z.ZodOptional<z.ZodString>;
4943
+ hidden: z.ZodBoolean;
4944
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4945
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4946
+ }, "strip", z.ZodTypeAny, {
4947
+ name: string;
4948
+ hidden: boolean;
4949
+ base?: boolean | undefined;
4950
+ color?: string | undefined;
4951
+ category?: string | null | undefined;
4952
+ }, {
4953
+ name: string;
4954
+ hidden: boolean;
4955
+ base?: boolean | undefined;
4956
+ color?: string | undefined;
4957
+ category?: string | null | undefined;
4958
+ }>, "many">>>;
4959
+ }, "strip", z.ZodTypeAny, {
4960
+ description?: string | undefined;
4961
+ tags?: {
4962
+ name: string;
4963
+ hidden: boolean;
4964
+ base?: boolean | undefined;
4965
+ color?: string | undefined;
4966
+ category?: string | null | undefined;
4967
+ }[] | null | undefined;
4968
+ title?: string | undefined;
4969
+ priority?: "low" | "medium" | "high" | undefined;
4970
+ }, {
4971
+ description?: string | undefined;
4972
+ tags?: {
4973
+ name: string;
4974
+ hidden: boolean;
4975
+ base?: boolean | undefined;
4976
+ color?: string | undefined;
4977
+ category?: string | null | undefined;
4978
+ }[] | null | undefined;
4979
+ title?: string | undefined;
4980
+ priority?: "low" | "medium" | "high" | undefined;
4981
+ }>>;
4982
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
4983
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
4984
+ kind: z.ZodString;
4985
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4986
+ }, "strip", z.ZodTypeAny, {
4987
+ kind: string;
4988
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4989
+ payload: Record<string, unknown>;
4990
+ }, {
4991
+ kind: string;
4992
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4993
+ payload: Record<string, unknown>;
4994
+ }>, "many">>;
4995
+ }, z.ZodTypeAny, "passthrough"> | undefined;
4996
+ }, {
4997
+ type: "auto_task";
4998
+ kind: string;
4999
+ execute_at: {
5000
+ rule: "immediate";
5001
+ } | {
5002
+ base: "target_date" | "run_date";
5003
+ time: string;
5004
+ rule: "send_at_local";
5005
+ };
5006
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5007
+ payload?: Record<string, unknown> | undefined;
5008
+ retry?: z.objectInputType<{
5009
+ max_attempts: z.ZodNumber;
5010
+ attempt: z.ZodNumber;
5011
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5012
+ backoff_seconds: z.ZodNumber;
5013
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5014
+ last_error: z.ZodOptional<z.ZodObject<{
5015
+ message: z.ZodString;
5016
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5017
+ at: z.ZodDate;
5018
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5019
+ }, "strip", z.ZodTypeAny, {
5020
+ message: string;
5021
+ at: Date;
5022
+ code?: string | number | undefined;
5023
+ details?: Record<string, unknown> | undefined;
5024
+ }, {
5025
+ message: string;
5026
+ at: Date;
5027
+ code?: string | number | undefined;
5028
+ details?: Record<string, unknown> | undefined;
5029
+ }>>;
5030
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5031
+ on_failure?: z.objectInputType<{
5032
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5033
+ name: z.ZodOptional<z.ZodString>;
5034
+ ref: z.ZodOptional<z.ZodAny>;
5035
+ }, "strip", z.ZodTypeAny, {
5036
+ name?: string | undefined;
5037
+ ref?: any;
5038
+ }, {
5039
+ name?: string | undefined;
5040
+ ref?: any;
5041
+ }>>;
5042
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5043
+ title: z.ZodOptional<z.ZodString>;
5044
+ description: z.ZodOptional<z.ZodString>;
5045
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5046
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5047
+ name: z.ZodString;
5048
+ color: z.ZodOptional<z.ZodString>;
5049
+ hidden: z.ZodBoolean;
5050
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5051
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5052
+ }, "strip", z.ZodTypeAny, {
5053
+ name: string;
5054
+ hidden: boolean;
5055
+ base?: boolean | undefined;
5056
+ color?: string | undefined;
5057
+ category?: string | null | undefined;
5058
+ }, {
5059
+ name: string;
5060
+ hidden: boolean;
5061
+ base?: boolean | undefined;
5062
+ color?: string | undefined;
5063
+ category?: string | null | undefined;
5064
+ }>, "many">>>;
5065
+ }, "strip", z.ZodTypeAny, {
5066
+ description?: string | undefined;
5067
+ tags?: {
5068
+ name: string;
5069
+ hidden: boolean;
5070
+ base?: boolean | undefined;
5071
+ color?: string | undefined;
5072
+ category?: string | null | undefined;
5073
+ }[] | null | undefined;
5074
+ title?: string | undefined;
5075
+ priority?: "low" | "medium" | "high" | undefined;
5076
+ }, {
5077
+ description?: string | undefined;
5078
+ tags?: {
5079
+ name: string;
5080
+ hidden: boolean;
5081
+ base?: boolean | undefined;
5082
+ color?: string | undefined;
5083
+ category?: string | null | undefined;
5084
+ }[] | null | undefined;
5085
+ title?: string | undefined;
5086
+ priority?: "low" | "medium" | "high" | undefined;
5087
+ }>>;
5088
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5089
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5090
+ kind: z.ZodString;
5091
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5092
+ }, "strip", z.ZodTypeAny, {
5093
+ kind: string;
5094
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5095
+ payload: Record<string, unknown>;
5096
+ }, {
5097
+ kind: string;
5098
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5099
+ payload: Record<string, unknown>;
5100
+ }>, "many">>;
5101
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5102
+ }>, z.ZodObject<{
5103
+ type: z.ZodLiteral<"human_task">;
5104
+ title: z.ZodString;
5105
+ description: z.ZodOptional<z.ZodString>;
5106
+ assignee_ref: z.ZodOptional<z.ZodString>;
5107
+ }, "strip", z.ZodTypeAny, {
5108
+ type: "human_task";
5109
+ title: string;
5110
+ description?: string | undefined;
5111
+ assignee_ref?: string | undefined;
5112
+ }, {
5113
+ type: "human_task";
5114
+ title: string;
5115
+ description?: string | undefined;
5116
+ assignee_ref?: string | undefined;
5117
+ }>]>, "many">;
5118
+ }, "strip", z.ZodTypeAny, {
5119
+ name: string;
5120
+ id: string;
5121
+ outputs: ({
5122
+ type: "auto_task";
5123
+ kind: string;
5124
+ execute_at: {
5125
+ rule: "immediate";
5126
+ } | {
5127
+ base: "target_date" | "run_date";
5128
+ time: string;
5129
+ rule: "send_at_local";
5130
+ };
5131
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5132
+ payload: Record<string, unknown>;
5133
+ retry?: z.objectOutputType<{
5134
+ max_attempts: z.ZodNumber;
5135
+ attempt: z.ZodNumber;
5136
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5137
+ backoff_seconds: z.ZodNumber;
5138
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5139
+ last_error: z.ZodOptional<z.ZodObject<{
5140
+ message: z.ZodString;
5141
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5142
+ at: z.ZodDate;
5143
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5144
+ }, "strip", z.ZodTypeAny, {
5145
+ message: string;
5146
+ at: Date;
5147
+ code?: string | number | undefined;
5148
+ details?: Record<string, unknown> | undefined;
5149
+ }, {
5150
+ message: string;
5151
+ at: Date;
5152
+ code?: string | number | undefined;
5153
+ details?: Record<string, unknown> | undefined;
5154
+ }>>;
5155
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5156
+ on_failure?: z.objectOutputType<{
5157
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5158
+ name: z.ZodOptional<z.ZodString>;
5159
+ ref: z.ZodOptional<z.ZodAny>;
5160
+ }, "strip", z.ZodTypeAny, {
5161
+ name?: string | undefined;
5162
+ ref?: any;
5163
+ }, {
5164
+ name?: string | undefined;
5165
+ ref?: any;
5166
+ }>>;
5167
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5168
+ title: z.ZodOptional<z.ZodString>;
5169
+ description: z.ZodOptional<z.ZodString>;
5170
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5171
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5172
+ name: z.ZodString;
5173
+ color: z.ZodOptional<z.ZodString>;
5174
+ hidden: z.ZodBoolean;
5175
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5176
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5177
+ }, "strip", z.ZodTypeAny, {
5178
+ name: string;
5179
+ hidden: boolean;
5180
+ base?: boolean | undefined;
5181
+ color?: string | undefined;
5182
+ category?: string | null | undefined;
5183
+ }, {
5184
+ name: string;
5185
+ hidden: boolean;
5186
+ base?: boolean | undefined;
5187
+ color?: string | undefined;
5188
+ category?: string | null | undefined;
5189
+ }>, "many">>>;
5190
+ }, "strip", z.ZodTypeAny, {
5191
+ description?: string | undefined;
5192
+ tags?: {
5193
+ name: string;
5194
+ hidden: boolean;
5195
+ base?: boolean | undefined;
5196
+ color?: string | undefined;
5197
+ category?: string | null | undefined;
5198
+ }[] | null | undefined;
5199
+ title?: string | undefined;
5200
+ priority?: "low" | "medium" | "high" | undefined;
5201
+ }, {
5202
+ description?: string | undefined;
5203
+ tags?: {
5204
+ name: string;
5205
+ hidden: boolean;
5206
+ base?: boolean | undefined;
5207
+ color?: string | undefined;
5208
+ category?: string | null | undefined;
5209
+ }[] | null | undefined;
5210
+ title?: string | undefined;
5211
+ priority?: "low" | "medium" | "high" | undefined;
5212
+ }>>;
5213
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5214
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5215
+ kind: z.ZodString;
5216
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5217
+ }, "strip", z.ZodTypeAny, {
5218
+ kind: string;
5219
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5220
+ payload: Record<string, unknown>;
5221
+ }, {
5222
+ kind: string;
5223
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5224
+ payload: Record<string, unknown>;
5225
+ }>, "many">>;
5226
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5227
+ } | {
5228
+ type: "human_task";
5229
+ title: string;
5230
+ description?: string | undefined;
5231
+ assignee_ref?: string | undefined;
5232
+ })[];
5233
+ when?: ZAutomationConditionGroup | undefined;
5234
+ is_fallback?: boolean | undefined;
5235
+ }, {
5236
+ name: string;
5237
+ id: string;
5238
+ outputs: ({
5239
+ type: "auto_task";
5240
+ kind: string;
5241
+ execute_at: {
5242
+ rule: "immediate";
5243
+ } | {
5244
+ base: "target_date" | "run_date";
5245
+ time: string;
5246
+ rule: "send_at_local";
5247
+ };
5248
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5249
+ payload?: Record<string, unknown> | undefined;
5250
+ retry?: z.objectInputType<{
5251
+ max_attempts: z.ZodNumber;
5252
+ attempt: z.ZodNumber;
5253
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5254
+ backoff_seconds: z.ZodNumber;
5255
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5256
+ last_error: z.ZodOptional<z.ZodObject<{
5257
+ message: z.ZodString;
5258
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5259
+ at: z.ZodDate;
5260
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5261
+ }, "strip", z.ZodTypeAny, {
5262
+ message: string;
5263
+ at: Date;
5264
+ code?: string | number | undefined;
5265
+ details?: Record<string, unknown> | undefined;
5266
+ }, {
5267
+ message: string;
5268
+ at: Date;
5269
+ code?: string | number | undefined;
5270
+ details?: Record<string, unknown> | undefined;
5271
+ }>>;
5272
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5273
+ on_failure?: z.objectInputType<{
5274
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5275
+ name: z.ZodOptional<z.ZodString>;
5276
+ ref: z.ZodOptional<z.ZodAny>;
5277
+ }, "strip", z.ZodTypeAny, {
5278
+ name?: string | undefined;
5279
+ ref?: any;
5280
+ }, {
5281
+ name?: string | undefined;
5282
+ ref?: any;
5283
+ }>>;
5284
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5285
+ title: z.ZodOptional<z.ZodString>;
5286
+ description: z.ZodOptional<z.ZodString>;
5287
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5288
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5289
+ name: z.ZodString;
5290
+ color: z.ZodOptional<z.ZodString>;
5291
+ hidden: z.ZodBoolean;
5292
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5293
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5294
+ }, "strip", z.ZodTypeAny, {
5295
+ name: string;
5296
+ hidden: boolean;
5297
+ base?: boolean | undefined;
5298
+ color?: string | undefined;
5299
+ category?: string | null | undefined;
5300
+ }, {
5301
+ name: string;
5302
+ hidden: boolean;
5303
+ base?: boolean | undefined;
5304
+ color?: string | undefined;
5305
+ category?: string | null | undefined;
5306
+ }>, "many">>>;
5307
+ }, "strip", z.ZodTypeAny, {
5308
+ description?: string | undefined;
5309
+ tags?: {
5310
+ name: string;
5311
+ hidden: boolean;
5312
+ base?: boolean | undefined;
5313
+ color?: string | undefined;
5314
+ category?: string | null | undefined;
5315
+ }[] | null | undefined;
5316
+ title?: string | undefined;
5317
+ priority?: "low" | "medium" | "high" | undefined;
5318
+ }, {
5319
+ description?: string | undefined;
5320
+ tags?: {
5321
+ name: string;
5322
+ hidden: boolean;
5323
+ base?: boolean | undefined;
5324
+ color?: string | undefined;
5325
+ category?: string | null | undefined;
5326
+ }[] | null | undefined;
5327
+ title?: string | undefined;
5328
+ priority?: "low" | "medium" | "high" | undefined;
5329
+ }>>;
5330
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5331
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5332
+ kind: z.ZodString;
5333
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5334
+ }, "strip", z.ZodTypeAny, {
5335
+ kind: string;
5336
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5337
+ payload: Record<string, unknown>;
5338
+ }, {
5339
+ kind: string;
5340
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5341
+ payload: Record<string, unknown>;
5342
+ }>, "many">>;
5343
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5344
+ } | {
5345
+ type: "human_task";
5346
+ title: string;
5347
+ description?: string | undefined;
5348
+ assignee_ref?: string | undefined;
5349
+ })[];
5350
+ when?: ZAutomationConditionGroup | undefined;
5351
+ is_fallback?: boolean | undefined;
5352
+ }>, "many">;
5353
+ guards: z.ZodObject<{
5354
+ max_tasks_per_run: z.ZodNumber;
5355
+ }, "strip", z.ZodTypeAny, {
5356
+ max_tasks_per_run: number;
5357
+ }, {
5358
+ max_tasks_per_run: number;
5359
+ }>;
5360
+ }, "strip", z.ZodTypeAny, {
5361
+ name: string;
5362
+ id: string;
5363
+ active: boolean;
5364
+ trigger: {
5365
+ type: "cron";
5366
+ cron: {
5367
+ expression: string;
5368
+ timezone?: string | undefined;
5369
+ };
5370
+ } | {
5371
+ type: "webhook";
5372
+ };
5373
+ selection: {
5374
+ appointment: {
5375
+ date_window: {
5376
+ offset_days: number;
5377
+ offset_mode: "calendar" | "business";
5378
+ };
5379
+ calendar_ids?: string[] | undefined;
5380
+ status_in?: string[] | undefined;
5381
+ status_base_in?: string[] | undefined;
5382
+ appointment_type_not_in?: string[] | undefined;
5383
+ };
5384
+ target: "appointment";
5385
+ };
5386
+ branch_mode: "all" | "exclusive";
5387
+ branches: {
5388
+ name: string;
5389
+ id: string;
5390
+ outputs: ({
5391
+ type: "auto_task";
5392
+ kind: string;
5393
+ execute_at: {
5394
+ rule: "immediate";
5395
+ } | {
5396
+ base: "target_date" | "run_date";
5397
+ time: string;
5398
+ rule: "send_at_local";
5399
+ };
5400
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5401
+ payload: Record<string, unknown>;
5402
+ retry?: z.objectOutputType<{
5403
+ max_attempts: z.ZodNumber;
5404
+ attempt: z.ZodNumber;
5405
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5406
+ backoff_seconds: z.ZodNumber;
5407
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5408
+ last_error: z.ZodOptional<z.ZodObject<{
5409
+ message: z.ZodString;
5410
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5411
+ at: z.ZodDate;
5412
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5413
+ }, "strip", z.ZodTypeAny, {
5414
+ message: string;
5415
+ at: Date;
5416
+ code?: string | number | undefined;
5417
+ details?: Record<string, unknown> | undefined;
5418
+ }, {
5419
+ message: string;
5420
+ at: Date;
5421
+ code?: string | number | undefined;
5422
+ details?: Record<string, unknown> | undefined;
5423
+ }>>;
5424
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5425
+ on_failure?: z.objectOutputType<{
5426
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5427
+ name: z.ZodOptional<z.ZodString>;
5428
+ ref: z.ZodOptional<z.ZodAny>;
5429
+ }, "strip", z.ZodTypeAny, {
5430
+ name?: string | undefined;
5431
+ ref?: any;
5432
+ }, {
5433
+ name?: string | undefined;
5434
+ ref?: any;
5435
+ }>>;
5436
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5437
+ title: z.ZodOptional<z.ZodString>;
5438
+ description: z.ZodOptional<z.ZodString>;
5439
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5440
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5441
+ name: z.ZodString;
5442
+ color: z.ZodOptional<z.ZodString>;
5443
+ hidden: z.ZodBoolean;
5444
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5445
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5446
+ }, "strip", z.ZodTypeAny, {
5447
+ name: string;
5448
+ hidden: boolean;
5449
+ base?: boolean | undefined;
5450
+ color?: string | undefined;
5451
+ category?: string | null | undefined;
5452
+ }, {
5453
+ name: string;
5454
+ hidden: boolean;
5455
+ base?: boolean | undefined;
5456
+ color?: string | undefined;
5457
+ category?: string | null | undefined;
5458
+ }>, "many">>>;
5459
+ }, "strip", z.ZodTypeAny, {
5460
+ description?: string | undefined;
5461
+ tags?: {
5462
+ name: string;
5463
+ hidden: boolean;
5464
+ base?: boolean | undefined;
5465
+ color?: string | undefined;
5466
+ category?: string | null | undefined;
5467
+ }[] | null | undefined;
5468
+ title?: string | undefined;
5469
+ priority?: "low" | "medium" | "high" | undefined;
5470
+ }, {
5471
+ description?: string | undefined;
5472
+ tags?: {
5473
+ name: string;
5474
+ hidden: boolean;
5475
+ base?: boolean | undefined;
5476
+ color?: string | undefined;
5477
+ category?: string | null | undefined;
5478
+ }[] | null | undefined;
5479
+ title?: string | undefined;
5480
+ priority?: "low" | "medium" | "high" | undefined;
5481
+ }>>;
5482
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5483
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5484
+ kind: z.ZodString;
5485
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5486
+ }, "strip", z.ZodTypeAny, {
5487
+ kind: string;
5488
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5489
+ payload: Record<string, unknown>;
5490
+ }, {
5491
+ kind: string;
5492
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5493
+ payload: Record<string, unknown>;
5494
+ }>, "many">>;
5495
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5496
+ } | {
5497
+ type: "human_task";
5498
+ title: string;
5499
+ description?: string | undefined;
5500
+ assignee_ref?: string | undefined;
5501
+ })[];
5502
+ when?: ZAutomationConditionGroup | undefined;
5503
+ is_fallback?: boolean | undefined;
5504
+ }[];
5505
+ guards: {
5506
+ max_tasks_per_run: number;
5507
+ };
5508
+ description?: string | undefined;
5509
+ }, {
5510
+ name: string;
5511
+ id: string;
5512
+ trigger: {
5513
+ type: "cron";
5514
+ cron: {
5515
+ expression: string;
5516
+ timezone?: string | undefined;
5517
+ };
5518
+ } | {
5519
+ type: "webhook";
5520
+ };
5521
+ selection: {
5522
+ appointment: {
5523
+ date_window: {
5524
+ offset_days: number;
5525
+ offset_mode: "calendar" | "business";
5526
+ };
5527
+ calendar_ids?: string[] | undefined;
5528
+ status_in?: string[] | undefined;
5529
+ status_base_in?: string[] | undefined;
5530
+ appointment_type_not_in?: string[] | undefined;
5531
+ };
5532
+ target: "appointment";
5533
+ };
5534
+ branch_mode: "all" | "exclusive";
5535
+ branches: {
5536
+ name: string;
5537
+ id: string;
5538
+ outputs: ({
5539
+ type: "auto_task";
5540
+ kind: string;
5541
+ execute_at: {
5542
+ rule: "immediate";
5543
+ } | {
5544
+ base: "target_date" | "run_date";
5545
+ time: string;
5546
+ rule: "send_at_local";
5547
+ };
5548
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5549
+ payload?: Record<string, unknown> | undefined;
5550
+ retry?: z.objectInputType<{
5551
+ max_attempts: z.ZodNumber;
5552
+ attempt: z.ZodNumber;
5553
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5554
+ backoff_seconds: z.ZodNumber;
5555
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5556
+ last_error: z.ZodOptional<z.ZodObject<{
5557
+ message: z.ZodString;
5558
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5559
+ at: z.ZodDate;
5560
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5561
+ }, "strip", z.ZodTypeAny, {
5562
+ message: string;
5563
+ at: Date;
5564
+ code?: string | number | undefined;
5565
+ details?: Record<string, unknown> | undefined;
5566
+ }, {
5567
+ message: string;
5568
+ at: Date;
5569
+ code?: string | number | undefined;
5570
+ details?: Record<string, unknown> | undefined;
5571
+ }>>;
5572
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5573
+ on_failure?: z.objectInputType<{
5574
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5575
+ name: z.ZodOptional<z.ZodString>;
5576
+ ref: z.ZodOptional<z.ZodAny>;
5577
+ }, "strip", z.ZodTypeAny, {
5578
+ name?: string | undefined;
5579
+ ref?: any;
5580
+ }, {
5581
+ name?: string | undefined;
5582
+ ref?: any;
5583
+ }>>;
5584
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5585
+ title: z.ZodOptional<z.ZodString>;
5586
+ description: z.ZodOptional<z.ZodString>;
5587
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5588
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5589
+ name: z.ZodString;
5590
+ color: z.ZodOptional<z.ZodString>;
5591
+ hidden: z.ZodBoolean;
5592
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5593
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5594
+ }, "strip", z.ZodTypeAny, {
5595
+ name: string;
5596
+ hidden: boolean;
5597
+ base?: boolean | undefined;
5598
+ color?: string | undefined;
5599
+ category?: string | null | undefined;
5600
+ }, {
5601
+ name: string;
5602
+ hidden: boolean;
5603
+ base?: boolean | undefined;
5604
+ color?: string | undefined;
5605
+ category?: string | null | undefined;
5606
+ }>, "many">>>;
5607
+ }, "strip", z.ZodTypeAny, {
5608
+ description?: string | undefined;
5609
+ tags?: {
5610
+ name: string;
5611
+ hidden: boolean;
5612
+ base?: boolean | undefined;
5613
+ color?: string | undefined;
5614
+ category?: string | null | undefined;
5615
+ }[] | null | undefined;
5616
+ title?: string | undefined;
5617
+ priority?: "low" | "medium" | "high" | undefined;
5618
+ }, {
5619
+ description?: string | undefined;
5620
+ tags?: {
5621
+ name: string;
5622
+ hidden: boolean;
5623
+ base?: boolean | undefined;
5624
+ color?: string | undefined;
5625
+ category?: string | null | undefined;
5626
+ }[] | null | undefined;
5627
+ title?: string | undefined;
5628
+ priority?: "low" | "medium" | "high" | undefined;
5629
+ }>>;
5630
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5631
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5632
+ kind: z.ZodString;
5633
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5634
+ }, "strip", z.ZodTypeAny, {
5635
+ kind: string;
5636
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5637
+ payload: Record<string, unknown>;
5638
+ }, {
5639
+ kind: string;
5640
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5641
+ payload: Record<string, unknown>;
5642
+ }>, "many">>;
5643
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5644
+ } | {
5645
+ type: "human_task";
5646
+ title: string;
5647
+ description?: string | undefined;
5648
+ assignee_ref?: string | undefined;
5649
+ })[];
5650
+ when?: ZAutomationConditionGroup | undefined;
5651
+ is_fallback?: boolean | undefined;
5652
+ }[];
5653
+ guards: {
5654
+ max_tasks_per_run: number;
5655
+ };
5656
+ active?: boolean | undefined;
5657
+ description?: string | undefined;
5658
+ }>;
5659
+ expected_version: z.ZodNumber;
5660
+ }, "strip", z.ZodTypeAny, {
5661
+ routine: {
5662
+ name: string;
5663
+ id: string;
5664
+ active: boolean;
5665
+ trigger: {
5666
+ type: "cron";
5667
+ cron: {
5668
+ expression: string;
5669
+ timezone?: string | undefined;
5670
+ };
5671
+ } | {
5672
+ type: "webhook";
5673
+ };
5674
+ selection: {
5675
+ appointment: {
5676
+ date_window: {
5677
+ offset_days: number;
5678
+ offset_mode: "calendar" | "business";
5679
+ };
5680
+ calendar_ids?: string[] | undefined;
5681
+ status_in?: string[] | undefined;
5682
+ status_base_in?: string[] | undefined;
5683
+ appointment_type_not_in?: string[] | undefined;
5684
+ };
5685
+ target: "appointment";
5686
+ };
5687
+ branch_mode: "all" | "exclusive";
5688
+ branches: {
5689
+ name: string;
5690
+ id: string;
5691
+ outputs: ({
5692
+ type: "auto_task";
5693
+ kind: string;
5694
+ execute_at: {
5695
+ rule: "immediate";
5696
+ } | {
5697
+ base: "target_date" | "run_date";
5698
+ time: string;
5699
+ rule: "send_at_local";
5700
+ };
5701
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5702
+ payload: Record<string, unknown>;
5703
+ retry?: z.objectOutputType<{
5704
+ max_attempts: z.ZodNumber;
5705
+ attempt: z.ZodNumber;
5706
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5707
+ backoff_seconds: z.ZodNumber;
5708
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5709
+ last_error: z.ZodOptional<z.ZodObject<{
5710
+ message: z.ZodString;
5711
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5712
+ at: z.ZodDate;
5713
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5714
+ }, "strip", z.ZodTypeAny, {
5715
+ message: string;
5716
+ at: Date;
5717
+ code?: string | number | undefined;
5718
+ details?: Record<string, unknown> | undefined;
5719
+ }, {
5720
+ message: string;
5721
+ at: Date;
5722
+ code?: string | number | undefined;
5723
+ details?: Record<string, unknown> | undefined;
5724
+ }>>;
5725
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5726
+ on_failure?: z.objectOutputType<{
5727
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5728
+ name: z.ZodOptional<z.ZodString>;
5729
+ ref: z.ZodOptional<z.ZodAny>;
5730
+ }, "strip", z.ZodTypeAny, {
5731
+ name?: string | undefined;
5732
+ ref?: any;
5733
+ }, {
5734
+ name?: string | undefined;
5735
+ ref?: any;
5736
+ }>>;
5737
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5738
+ title: z.ZodOptional<z.ZodString>;
5739
+ description: z.ZodOptional<z.ZodString>;
5740
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5741
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5742
+ name: z.ZodString;
5743
+ color: z.ZodOptional<z.ZodString>;
5744
+ hidden: z.ZodBoolean;
5745
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5746
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5747
+ }, "strip", z.ZodTypeAny, {
5748
+ name: string;
5749
+ hidden: boolean;
5750
+ base?: boolean | undefined;
5751
+ color?: string | undefined;
5752
+ category?: string | null | undefined;
5753
+ }, {
5754
+ name: string;
5755
+ hidden: boolean;
5756
+ base?: boolean | undefined;
5757
+ color?: string | undefined;
5758
+ category?: string | null | undefined;
5759
+ }>, "many">>>;
5760
+ }, "strip", z.ZodTypeAny, {
5761
+ description?: string | undefined;
5762
+ tags?: {
5763
+ name: string;
5764
+ hidden: boolean;
5765
+ base?: boolean | undefined;
5766
+ color?: string | undefined;
5767
+ category?: string | null | undefined;
5768
+ }[] | null | undefined;
5769
+ title?: string | undefined;
5770
+ priority?: "low" | "medium" | "high" | undefined;
5771
+ }, {
5772
+ description?: string | undefined;
5773
+ tags?: {
5774
+ name: string;
5775
+ hidden: boolean;
5776
+ base?: boolean | undefined;
5777
+ color?: string | undefined;
5778
+ category?: string | null | undefined;
5779
+ }[] | null | undefined;
5780
+ title?: string | undefined;
5781
+ priority?: "low" | "medium" | "high" | undefined;
5782
+ }>>;
5783
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5784
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5785
+ kind: z.ZodString;
5786
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5787
+ }, "strip", z.ZodTypeAny, {
5788
+ kind: string;
5789
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5790
+ payload: Record<string, unknown>;
5791
+ }, {
5792
+ kind: string;
5793
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5794
+ payload: Record<string, unknown>;
5795
+ }>, "many">>;
5796
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5797
+ } | {
5798
+ type: "human_task";
5799
+ title: string;
5800
+ description?: string | undefined;
5801
+ assignee_ref?: string | undefined;
5802
+ })[];
5803
+ when?: ZAutomationConditionGroup | undefined;
5804
+ is_fallback?: boolean | undefined;
5805
+ }[];
5806
+ guards: {
5807
+ max_tasks_per_run: number;
5808
+ };
5809
+ description?: string | undefined;
5810
+ };
5811
+ expected_version: number;
5812
+ }, {
5813
+ routine: {
5814
+ name: string;
5815
+ id: string;
5816
+ trigger: {
5817
+ type: "cron";
5818
+ cron: {
5819
+ expression: string;
5820
+ timezone?: string | undefined;
5821
+ };
5822
+ } | {
5823
+ type: "webhook";
5824
+ };
5825
+ selection: {
5826
+ appointment: {
5827
+ date_window: {
5828
+ offset_days: number;
5829
+ offset_mode: "calendar" | "business";
5830
+ };
5831
+ calendar_ids?: string[] | undefined;
5832
+ status_in?: string[] | undefined;
5833
+ status_base_in?: string[] | undefined;
5834
+ appointment_type_not_in?: string[] | undefined;
5835
+ };
5836
+ target: "appointment";
5837
+ };
5838
+ branch_mode: "all" | "exclusive";
5839
+ branches: {
5840
+ name: string;
5841
+ id: string;
5842
+ outputs: ({
5843
+ type: "auto_task";
5844
+ kind: string;
5845
+ execute_at: {
5846
+ rule: "immediate";
5847
+ } | {
5848
+ base: "target_date" | "run_date";
5849
+ time: string;
5850
+ rule: "send_at_local";
5851
+ };
5852
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5853
+ payload?: Record<string, unknown> | undefined;
5854
+ retry?: z.objectInputType<{
5855
+ max_attempts: z.ZodNumber;
5856
+ attempt: z.ZodNumber;
5857
+ strategy: z.ZodEnum<["fixed", "exponential"]>;
5858
+ backoff_seconds: z.ZodNumber;
5859
+ next_attempt_at: z.ZodOptional<z.ZodDate>;
5860
+ last_error: z.ZodOptional<z.ZodObject<{
5861
+ message: z.ZodString;
5862
+ code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
5863
+ at: z.ZodDate;
5864
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5865
+ }, "strip", z.ZodTypeAny, {
5866
+ message: string;
5867
+ at: Date;
5868
+ code?: string | number | undefined;
5869
+ details?: Record<string, unknown> | undefined;
5870
+ }, {
5871
+ message: string;
5872
+ at: Date;
5873
+ code?: string | number | undefined;
5874
+ details?: Record<string, unknown> | undefined;
5875
+ }>>;
5876
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5877
+ on_failure?: z.objectInputType<{
5878
+ handoff_to_user: z.ZodOptional<z.ZodObject<{
5879
+ name: z.ZodOptional<z.ZodString>;
5880
+ ref: z.ZodOptional<z.ZodAny>;
5881
+ }, "strip", z.ZodTypeAny, {
5882
+ name?: string | undefined;
5883
+ ref?: any;
5884
+ }, {
5885
+ name?: string | undefined;
5886
+ ref?: any;
5887
+ }>>;
5888
+ create_handoff_task: z.ZodOptional<z.ZodObject<{
5889
+ title: z.ZodOptional<z.ZodString>;
5890
+ description: z.ZodOptional<z.ZodString>;
5891
+ priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high"]>>;
5892
+ tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
5893
+ name: z.ZodString;
5894
+ color: z.ZodOptional<z.ZodString>;
5895
+ hidden: z.ZodBoolean;
5896
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5897
+ base: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5898
+ }, "strip", z.ZodTypeAny, {
5899
+ name: string;
5900
+ hidden: boolean;
5901
+ base?: boolean | undefined;
5902
+ color?: string | undefined;
5903
+ category?: string | null | undefined;
5904
+ }, {
5905
+ name: string;
5906
+ hidden: boolean;
5907
+ base?: boolean | undefined;
5908
+ color?: string | undefined;
5909
+ category?: string | null | undefined;
5910
+ }>, "many">>>;
5911
+ }, "strip", z.ZodTypeAny, {
5912
+ description?: string | undefined;
5913
+ tags?: {
5914
+ name: string;
5915
+ hidden: boolean;
5916
+ base?: boolean | undefined;
5917
+ color?: string | undefined;
5918
+ category?: string | null | undefined;
5919
+ }[] | null | undefined;
5920
+ title?: string | undefined;
5921
+ priority?: "low" | "medium" | "high" | undefined;
5922
+ }, {
5923
+ description?: string | undefined;
5924
+ tags?: {
5925
+ name: string;
5926
+ hidden: boolean;
5927
+ base?: boolean | undefined;
5928
+ color?: string | undefined;
5929
+ category?: string | null | undefined;
5930
+ }[] | null | undefined;
5931
+ title?: string | undefined;
5932
+ priority?: "low" | "medium" | "high" | undefined;
5933
+ }>>;
5934
+ auto_fallbacks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5935
+ handler: z.ZodEnum<["notifications", "ai_agent", "invoices", "webhook", "custom", "lead_reactivation", "appointment_action", "appointment_reminder", "evo-integrations.sync-run"]>;
5936
+ kind: z.ZodString;
5937
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5938
+ }, "strip", z.ZodTypeAny, {
5939
+ kind: string;
5940
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5941
+ payload: Record<string, unknown>;
5942
+ }, {
5943
+ kind: string;
5944
+ handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5945
+ payload: Record<string, unknown>;
5946
+ }>, "many">>;
5947
+ }, z.ZodTypeAny, "passthrough"> | undefined;
5948
+ } | {
5949
+ type: "human_task";
5950
+ title: string;
5951
+ description?: string | undefined;
5952
+ assignee_ref?: string | undefined;
5953
+ })[];
5954
+ when?: ZAutomationConditionGroup | undefined;
5955
+ is_fallback?: boolean | undefined;
5956
+ }[];
5957
+ guards: {
5958
+ max_tasks_per_run: number;
5959
+ };
5960
+ active?: boolean | undefined;
5961
+ description?: string | undefined;
5962
+ };
5963
+ expected_version: number;
5964
+ }>;
5965
+ export declare const zHubAutomationConfigSchema: z.ZodObject<{
5966
+ active: z.ZodDefault<z.ZodBoolean>;
5967
+ limits: z.ZodOptional<z.ZodObject<{
5968
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5969
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5970
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5971
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5972
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5973
+ }, z.ZodTypeAny, "passthrough">>>;
5974
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5975
+ active: z.ZodDefault<z.ZodBoolean>;
5976
+ limits: z.ZodOptional<z.ZodObject<{
5977
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5978
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5979
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5980
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5981
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5982
+ }, z.ZodTypeAny, "passthrough">>>;
5983
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5984
+ active: z.ZodDefault<z.ZodBoolean>;
5985
+ limits: z.ZodOptional<z.ZodObject<{
5986
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5987
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
5988
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5989
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
5990
+ max_tasks_per_run_default: z.ZodOptional<z.ZodNumber>;
5991
+ }, z.ZodTypeAny, "passthrough">>>;
5992
+ }, z.ZodTypeAny, "passthrough">>;
5993
+ export declare const zAutomationDryRunRequestSchema: z.ZodObject<{
5994
+ run_date: z.ZodOptional<z.ZodString>;
5995
+ }, "strip", z.ZodTypeAny, {
5996
+ run_date?: string | undefined;
5997
+ }, {
5998
+ run_date?: string | undefined;
5999
+ }>;
6000
+ export declare const zAutomationTriggerRequestSchema: z.ZodObject<{
3316
6001
  run_date: z.ZodOptional<z.ZodString>;
3317
6002
  }, "strip", z.ZodTypeAny, {
3318
6003
  run_date?: string | undefined;