evo360-types 1.3.409 → 1.3.411

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.
@@ -90,6 +90,11 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
90
90
  status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
91
91
  status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
92
92
  appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
+ professional_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
+ procedure_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
+ insurance_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
96
+ address_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
97
+ payment_status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
93
98
  }, "strip", z.ZodTypeAny, {
94
99
  date_window: {
95
100
  offset_days: number;
@@ -99,6 +104,11 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
99
104
  status_in?: string[] | undefined;
100
105
  status_base_in?: string[] | undefined;
101
106
  appointment_type_not_in?: string[] | undefined;
107
+ professional_names?: string[] | undefined;
108
+ procedure_names?: string[] | undefined;
109
+ insurance_names?: string[] | undefined;
110
+ address_names?: string[] | undefined;
111
+ payment_status_in?: string[] | undefined;
102
112
  }, {
103
113
  date_window: {
104
114
  offset_days: number;
@@ -108,6 +118,11 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
108
118
  status_in?: string[] | undefined;
109
119
  status_base_in?: string[] | undefined;
110
120
  appointment_type_not_in?: string[] | undefined;
121
+ professional_names?: string[] | undefined;
122
+ procedure_names?: string[] | undefined;
123
+ insurance_names?: string[] | undefined;
124
+ address_names?: string[] | undefined;
125
+ payment_status_in?: string[] | undefined;
111
126
  }>;
112
127
  }, "strip", z.ZodTypeAny, {
113
128
  appointment: {
@@ -119,6 +134,11 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
119
134
  status_in?: string[] | undefined;
120
135
  status_base_in?: string[] | undefined;
121
136
  appointment_type_not_in?: string[] | undefined;
137
+ professional_names?: string[] | undefined;
138
+ procedure_names?: string[] | undefined;
139
+ insurance_names?: string[] | undefined;
140
+ address_names?: string[] | undefined;
141
+ payment_status_in?: string[] | undefined;
122
142
  };
123
143
  target: "appointment";
124
144
  }, {
@@ -131,6 +151,11 @@ export declare const zAutomationAppointmentSelectionSchema: z.ZodObject<{
131
151
  status_in?: string[] | undefined;
132
152
  status_base_in?: string[] | undefined;
133
153
  appointment_type_not_in?: string[] | undefined;
154
+ professional_names?: string[] | undefined;
155
+ procedure_names?: string[] | undefined;
156
+ insurance_names?: string[] | undefined;
157
+ address_names?: string[] | undefined;
158
+ payment_status_in?: string[] | undefined;
134
159
  };
135
160
  target: "appointment";
136
161
  }>;
@@ -151,6 +176,11 @@ export declare const zAutomationSelectionSchema: z.ZodObject<{
151
176
  status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
152
177
  status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
178
  appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
179
+ professional_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
180
+ procedure_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
181
+ insurance_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
182
+ address_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
183
+ payment_status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
154
184
  }, "strip", z.ZodTypeAny, {
155
185
  date_window: {
156
186
  offset_days: number;
@@ -160,6 +190,11 @@ export declare const zAutomationSelectionSchema: z.ZodObject<{
160
190
  status_in?: string[] | undefined;
161
191
  status_base_in?: string[] | undefined;
162
192
  appointment_type_not_in?: string[] | undefined;
193
+ professional_names?: string[] | undefined;
194
+ procedure_names?: string[] | undefined;
195
+ insurance_names?: string[] | undefined;
196
+ address_names?: string[] | undefined;
197
+ payment_status_in?: string[] | undefined;
163
198
  }, {
164
199
  date_window: {
165
200
  offset_days: number;
@@ -169,6 +204,11 @@ export declare const zAutomationSelectionSchema: z.ZodObject<{
169
204
  status_in?: string[] | undefined;
170
205
  status_base_in?: string[] | undefined;
171
206
  appointment_type_not_in?: string[] | undefined;
207
+ professional_names?: string[] | undefined;
208
+ procedure_names?: string[] | undefined;
209
+ insurance_names?: string[] | undefined;
210
+ address_names?: string[] | undefined;
211
+ payment_status_in?: string[] | undefined;
172
212
  }>;
173
213
  }, "strip", z.ZodTypeAny, {
174
214
  appointment: {
@@ -180,6 +220,11 @@ export declare const zAutomationSelectionSchema: z.ZodObject<{
180
220
  status_in?: string[] | undefined;
181
221
  status_base_in?: string[] | undefined;
182
222
  appointment_type_not_in?: string[] | undefined;
223
+ professional_names?: string[] | undefined;
224
+ procedure_names?: string[] | undefined;
225
+ insurance_names?: string[] | undefined;
226
+ address_names?: string[] | undefined;
227
+ payment_status_in?: string[] | undefined;
183
228
  };
184
229
  target: "appointment";
185
230
  }, {
@@ -192,6 +237,11 @@ export declare const zAutomationSelectionSchema: z.ZodObject<{
192
237
  status_in?: string[] | undefined;
193
238
  status_base_in?: string[] | undefined;
194
239
  appointment_type_not_in?: string[] | undefined;
240
+ professional_names?: string[] | undefined;
241
+ procedure_names?: string[] | undefined;
242
+ insurance_names?: string[] | undefined;
243
+ address_names?: string[] | undefined;
244
+ payment_status_in?: string[] | undefined;
195
245
  };
196
246
  target: "appointment";
197
247
  }>;
@@ -232,6 +282,15 @@ export declare const zAutomationExecuteAtSchema: z.ZodDiscriminatedUnion<"rule",
232
282
  base: "target_date" | "run_date";
233
283
  time: string;
234
284
  rule: "send_at_local";
285
+ }>, z.ZodObject<{
286
+ rule: z.ZodLiteral<"relative_to_appointment">;
287
+ offset_minutes: z.ZodNumber;
288
+ }, "strip", z.ZodTypeAny, {
289
+ rule: "relative_to_appointment";
290
+ offset_minutes: number;
291
+ }, {
292
+ rule: "relative_to_appointment";
293
+ offset_minutes: number;
235
294
  }>]>;
236
295
  export declare const zAutomationAutoTaskOutputSchema: z.ZodObject<{
237
296
  type: z.ZodLiteral<"auto_task">;
@@ -256,6 +315,15 @@ export declare const zAutomationAutoTaskOutputSchema: z.ZodObject<{
256
315
  base: "target_date" | "run_date";
257
316
  time: string;
258
317
  rule: "send_at_local";
318
+ }>, z.ZodObject<{
319
+ rule: z.ZodLiteral<"relative_to_appointment">;
320
+ offset_minutes: z.ZodNumber;
321
+ }, "strip", z.ZodTypeAny, {
322
+ rule: "relative_to_appointment";
323
+ offset_minutes: number;
324
+ }, {
325
+ rule: "relative_to_appointment";
326
+ offset_minutes: number;
259
327
  }>]>;
260
328
  retry: z.ZodOptional<z.ZodObject<{
261
329
  max_attempts: z.ZodNumber;
@@ -544,6 +612,9 @@ export declare const zAutomationAutoTaskOutputSchema: z.ZodObject<{
544
612
  base: "target_date" | "run_date";
545
613
  time: string;
546
614
  rule: "send_at_local";
615
+ } | {
616
+ rule: "relative_to_appointment";
617
+ offset_minutes: number;
547
618
  };
548
619
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
549
620
  payload: Record<string, unknown>;
@@ -650,6 +721,9 @@ export declare const zAutomationAutoTaskOutputSchema: z.ZodObject<{
650
721
  base: "target_date" | "run_date";
651
722
  time: string;
652
723
  rule: "send_at_local";
724
+ } | {
725
+ rule: "relative_to_appointment";
726
+ offset_minutes: number;
653
727
  };
654
728
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
655
729
  payload?: Record<string, unknown> | undefined;
@@ -787,6 +861,15 @@ export declare const zAutomationOutputSchema: z.ZodDiscriminatedUnion<"type", [z
787
861
  base: "target_date" | "run_date";
788
862
  time: string;
789
863
  rule: "send_at_local";
864
+ }>, z.ZodObject<{
865
+ rule: z.ZodLiteral<"relative_to_appointment">;
866
+ offset_minutes: z.ZodNumber;
867
+ }, "strip", z.ZodTypeAny, {
868
+ rule: "relative_to_appointment";
869
+ offset_minutes: number;
870
+ }, {
871
+ rule: "relative_to_appointment";
872
+ offset_minutes: number;
790
873
  }>]>;
791
874
  retry: z.ZodOptional<z.ZodObject<{
792
875
  max_attempts: z.ZodNumber;
@@ -1075,6 +1158,9 @@ export declare const zAutomationOutputSchema: z.ZodDiscriminatedUnion<"type", [z
1075
1158
  base: "target_date" | "run_date";
1076
1159
  time: string;
1077
1160
  rule: "send_at_local";
1161
+ } | {
1162
+ rule: "relative_to_appointment";
1163
+ offset_minutes: number;
1078
1164
  };
1079
1165
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1080
1166
  payload: Record<string, unknown>;
@@ -1181,6 +1267,9 @@ export declare const zAutomationOutputSchema: z.ZodDiscriminatedUnion<"type", [z
1181
1267
  base: "target_date" | "run_date";
1182
1268
  time: string;
1183
1269
  rule: "send_at_local";
1270
+ } | {
1271
+ rule: "relative_to_appointment";
1272
+ offset_minutes: number;
1184
1273
  };
1185
1274
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1186
1275
  payload?: Record<string, unknown> | undefined;
@@ -1322,6 +1411,15 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
1322
1411
  base: "target_date" | "run_date";
1323
1412
  time: string;
1324
1413
  rule: "send_at_local";
1414
+ }>, z.ZodObject<{
1415
+ rule: z.ZodLiteral<"relative_to_appointment">;
1416
+ offset_minutes: z.ZodNumber;
1417
+ }, "strip", z.ZodTypeAny, {
1418
+ rule: "relative_to_appointment";
1419
+ offset_minutes: number;
1420
+ }, {
1421
+ rule: "relative_to_appointment";
1422
+ offset_minutes: number;
1325
1423
  }>]>;
1326
1424
  retry: z.ZodOptional<z.ZodObject<{
1327
1425
  max_attempts: z.ZodNumber;
@@ -1610,6 +1708,9 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
1610
1708
  base: "target_date" | "run_date";
1611
1709
  time: string;
1612
1710
  rule: "send_at_local";
1711
+ } | {
1712
+ rule: "relative_to_appointment";
1713
+ offset_minutes: number;
1613
1714
  };
1614
1715
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1615
1716
  payload: Record<string, unknown>;
@@ -1716,6 +1817,9 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
1716
1817
  base: "target_date" | "run_date";
1717
1818
  time: string;
1718
1819
  rule: "send_at_local";
1820
+ } | {
1821
+ rule: "relative_to_appointment";
1822
+ offset_minutes: number;
1719
1823
  };
1720
1824
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1721
1825
  payload?: Record<string, unknown> | undefined;
@@ -1841,6 +1945,9 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
1841
1945
  base: "target_date" | "run_date";
1842
1946
  time: string;
1843
1947
  rule: "send_at_local";
1948
+ } | {
1949
+ rule: "relative_to_appointment";
1950
+ offset_minutes: number;
1844
1951
  };
1845
1952
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1846
1953
  payload: Record<string, unknown>;
@@ -1958,6 +2065,9 @@ export declare const zAutomationBranchSchema: z.ZodObject<{
1958
2065
  base: "target_date" | "run_date";
1959
2066
  time: string;
1960
2067
  rule: "send_at_local";
2068
+ } | {
2069
+ rule: "relative_to_appointment";
2070
+ offset_minutes: number;
1961
2071
  };
1962
2072
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
1963
2073
  payload?: Record<string, unknown> | undefined;
@@ -2119,6 +2229,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2119
2229
  status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2120
2230
  status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2121
2231
  appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2232
+ professional_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2233
+ procedure_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2234
+ insurance_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2235
+ address_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2236
+ payment_status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2122
2237
  }, "strip", z.ZodTypeAny, {
2123
2238
  date_window: {
2124
2239
  offset_days: number;
@@ -2128,6 +2243,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2128
2243
  status_in?: string[] | undefined;
2129
2244
  status_base_in?: string[] | undefined;
2130
2245
  appointment_type_not_in?: string[] | undefined;
2246
+ professional_names?: string[] | undefined;
2247
+ procedure_names?: string[] | undefined;
2248
+ insurance_names?: string[] | undefined;
2249
+ address_names?: string[] | undefined;
2250
+ payment_status_in?: string[] | undefined;
2131
2251
  }, {
2132
2252
  date_window: {
2133
2253
  offset_days: number;
@@ -2137,6 +2257,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2137
2257
  status_in?: string[] | undefined;
2138
2258
  status_base_in?: string[] | undefined;
2139
2259
  appointment_type_not_in?: string[] | undefined;
2260
+ professional_names?: string[] | undefined;
2261
+ procedure_names?: string[] | undefined;
2262
+ insurance_names?: string[] | undefined;
2263
+ address_names?: string[] | undefined;
2264
+ payment_status_in?: string[] | undefined;
2140
2265
  }>;
2141
2266
  }, "strip", z.ZodTypeAny, {
2142
2267
  appointment: {
@@ -2148,6 +2273,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2148
2273
  status_in?: string[] | undefined;
2149
2274
  status_base_in?: string[] | undefined;
2150
2275
  appointment_type_not_in?: string[] | undefined;
2276
+ professional_names?: string[] | undefined;
2277
+ procedure_names?: string[] | undefined;
2278
+ insurance_names?: string[] | undefined;
2279
+ address_names?: string[] | undefined;
2280
+ payment_status_in?: string[] | undefined;
2151
2281
  };
2152
2282
  target: "appointment";
2153
2283
  }, {
@@ -2160,6 +2290,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2160
2290
  status_in?: string[] | undefined;
2161
2291
  status_base_in?: string[] | undefined;
2162
2292
  appointment_type_not_in?: string[] | undefined;
2293
+ professional_names?: string[] | undefined;
2294
+ procedure_names?: string[] | undefined;
2295
+ insurance_names?: string[] | undefined;
2296
+ address_names?: string[] | undefined;
2297
+ payment_status_in?: string[] | undefined;
2163
2298
  };
2164
2299
  target: "appointment";
2165
2300
  }>;
@@ -2192,6 +2327,15 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2192
2327
  base: "target_date" | "run_date";
2193
2328
  time: string;
2194
2329
  rule: "send_at_local";
2330
+ }>, z.ZodObject<{
2331
+ rule: z.ZodLiteral<"relative_to_appointment">;
2332
+ offset_minutes: z.ZodNumber;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ rule: "relative_to_appointment";
2335
+ offset_minutes: number;
2336
+ }, {
2337
+ rule: "relative_to_appointment";
2338
+ offset_minutes: number;
2195
2339
  }>]>;
2196
2340
  retry: z.ZodOptional<z.ZodObject<{
2197
2341
  max_attempts: z.ZodNumber;
@@ -2480,6 +2624,9 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2480
2624
  base: "target_date" | "run_date";
2481
2625
  time: string;
2482
2626
  rule: "send_at_local";
2627
+ } | {
2628
+ rule: "relative_to_appointment";
2629
+ offset_minutes: number;
2483
2630
  };
2484
2631
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2485
2632
  payload: Record<string, unknown>;
@@ -2586,6 +2733,9 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2586
2733
  base: "target_date" | "run_date";
2587
2734
  time: string;
2588
2735
  rule: "send_at_local";
2736
+ } | {
2737
+ rule: "relative_to_appointment";
2738
+ offset_minutes: number;
2589
2739
  };
2590
2740
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2591
2741
  payload?: Record<string, unknown> | undefined;
@@ -2711,6 +2861,9 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2711
2861
  base: "target_date" | "run_date";
2712
2862
  time: string;
2713
2863
  rule: "send_at_local";
2864
+ } | {
2865
+ rule: "relative_to_appointment";
2866
+ offset_minutes: number;
2714
2867
  };
2715
2868
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2716
2869
  payload: Record<string, unknown>;
@@ -2828,6 +2981,9 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
2828
2981
  base: "target_date" | "run_date";
2829
2982
  time: string;
2830
2983
  rule: "send_at_local";
2984
+ } | {
2985
+ rule: "relative_to_appointment";
2986
+ offset_minutes: number;
2831
2987
  };
2832
2988
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
2833
2989
  payload?: Record<string, unknown> | undefined;
@@ -3002,6 +3158,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3002
3158
  status_in?: string[] | undefined;
3003
3159
  status_base_in?: string[] | undefined;
3004
3160
  appointment_type_not_in?: string[] | undefined;
3161
+ professional_names?: string[] | undefined;
3162
+ procedure_names?: string[] | undefined;
3163
+ insurance_names?: string[] | undefined;
3164
+ address_names?: string[] | undefined;
3165
+ payment_status_in?: string[] | undefined;
3005
3166
  };
3006
3167
  target: "appointment";
3007
3168
  };
@@ -3018,6 +3179,9 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3018
3179
  base: "target_date" | "run_date";
3019
3180
  time: string;
3020
3181
  rule: "send_at_local";
3182
+ } | {
3183
+ rule: "relative_to_appointment";
3184
+ offset_minutes: number;
3021
3185
  };
3022
3186
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3023
3187
  payload: Record<string, unknown>;
@@ -3165,6 +3329,11 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3165
3329
  status_in?: string[] | undefined;
3166
3330
  status_base_in?: string[] | undefined;
3167
3331
  appointment_type_not_in?: string[] | undefined;
3332
+ professional_names?: string[] | undefined;
3333
+ procedure_names?: string[] | undefined;
3334
+ insurance_names?: string[] | undefined;
3335
+ address_names?: string[] | undefined;
3336
+ payment_status_in?: string[] | undefined;
3168
3337
  };
3169
3338
  target: "appointment";
3170
3339
  };
@@ -3181,6 +3350,9 @@ export declare const zAutomationRoutineSchema: z.ZodObject<{
3181
3350
  base: "target_date" | "run_date";
3182
3351
  time: string;
3183
3352
  rule: "send_at_local";
3353
+ } | {
3354
+ rule: "relative_to_appointment";
3355
+ offset_minutes: number;
3184
3356
  };
3185
3357
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3186
3358
  payload?: Record<string, unknown> | undefined;
@@ -3360,6 +3532,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3360
3532
  status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3361
3533
  status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3362
3534
  appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3535
+ professional_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3536
+ procedure_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3537
+ insurance_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3538
+ address_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3539
+ payment_status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3363
3540
  }, "strip", z.ZodTypeAny, {
3364
3541
  date_window: {
3365
3542
  offset_days: number;
@@ -3369,6 +3546,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3369
3546
  status_in?: string[] | undefined;
3370
3547
  status_base_in?: string[] | undefined;
3371
3548
  appointment_type_not_in?: string[] | undefined;
3549
+ professional_names?: string[] | undefined;
3550
+ procedure_names?: string[] | undefined;
3551
+ insurance_names?: string[] | undefined;
3552
+ address_names?: string[] | undefined;
3553
+ payment_status_in?: string[] | undefined;
3372
3554
  }, {
3373
3555
  date_window: {
3374
3556
  offset_days: number;
@@ -3378,6 +3560,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3378
3560
  status_in?: string[] | undefined;
3379
3561
  status_base_in?: string[] | undefined;
3380
3562
  appointment_type_not_in?: string[] | undefined;
3563
+ professional_names?: string[] | undefined;
3564
+ procedure_names?: string[] | undefined;
3565
+ insurance_names?: string[] | undefined;
3566
+ address_names?: string[] | undefined;
3567
+ payment_status_in?: string[] | undefined;
3381
3568
  }>;
3382
3569
  }, "strip", z.ZodTypeAny, {
3383
3570
  appointment: {
@@ -3389,6 +3576,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3389
3576
  status_in?: string[] | undefined;
3390
3577
  status_base_in?: string[] | undefined;
3391
3578
  appointment_type_not_in?: string[] | undefined;
3579
+ professional_names?: string[] | undefined;
3580
+ procedure_names?: string[] | undefined;
3581
+ insurance_names?: string[] | undefined;
3582
+ address_names?: string[] | undefined;
3583
+ payment_status_in?: string[] | undefined;
3392
3584
  };
3393
3585
  target: "appointment";
3394
3586
  }, {
@@ -3401,6 +3593,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3401
3593
  status_in?: string[] | undefined;
3402
3594
  status_base_in?: string[] | undefined;
3403
3595
  appointment_type_not_in?: string[] | undefined;
3596
+ professional_names?: string[] | undefined;
3597
+ procedure_names?: string[] | undefined;
3598
+ insurance_names?: string[] | undefined;
3599
+ address_names?: string[] | undefined;
3600
+ payment_status_in?: string[] | undefined;
3404
3601
  };
3405
3602
  target: "appointment";
3406
3603
  }>;
@@ -3433,6 +3630,15 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3433
3630
  base: "target_date" | "run_date";
3434
3631
  time: string;
3435
3632
  rule: "send_at_local";
3633
+ }>, z.ZodObject<{
3634
+ rule: z.ZodLiteral<"relative_to_appointment">;
3635
+ offset_minutes: z.ZodNumber;
3636
+ }, "strip", z.ZodTypeAny, {
3637
+ rule: "relative_to_appointment";
3638
+ offset_minutes: number;
3639
+ }, {
3640
+ rule: "relative_to_appointment";
3641
+ offset_minutes: number;
3436
3642
  }>]>;
3437
3643
  retry: z.ZodOptional<z.ZodObject<{
3438
3644
  max_attempts: z.ZodNumber;
@@ -3721,6 +3927,9 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3721
3927
  base: "target_date" | "run_date";
3722
3928
  time: string;
3723
3929
  rule: "send_at_local";
3930
+ } | {
3931
+ rule: "relative_to_appointment";
3932
+ offset_minutes: number;
3724
3933
  };
3725
3934
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3726
3935
  payload: Record<string, unknown>;
@@ -3827,6 +4036,9 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3827
4036
  base: "target_date" | "run_date";
3828
4037
  time: string;
3829
4038
  rule: "send_at_local";
4039
+ } | {
4040
+ rule: "relative_to_appointment";
4041
+ offset_minutes: number;
3830
4042
  };
3831
4043
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3832
4044
  payload?: Record<string, unknown> | undefined;
@@ -3952,6 +4164,9 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
3952
4164
  base: "target_date" | "run_date";
3953
4165
  time: string;
3954
4166
  rule: "send_at_local";
4167
+ } | {
4168
+ rule: "relative_to_appointment";
4169
+ offset_minutes: number;
3955
4170
  };
3956
4171
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
3957
4172
  payload: Record<string, unknown>;
@@ -4069,6 +4284,9 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4069
4284
  base: "target_date" | "run_date";
4070
4285
  time: string;
4071
4286
  rule: "send_at_local";
4287
+ } | {
4288
+ rule: "relative_to_appointment";
4289
+ offset_minutes: number;
4072
4290
  };
4073
4291
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4074
4292
  payload?: Record<string, unknown> | undefined;
@@ -4205,6 +4423,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4205
4423
  status_in?: string[] | undefined;
4206
4424
  status_base_in?: string[] | undefined;
4207
4425
  appointment_type_not_in?: string[] | undefined;
4426
+ professional_names?: string[] | undefined;
4427
+ procedure_names?: string[] | undefined;
4428
+ insurance_names?: string[] | undefined;
4429
+ address_names?: string[] | undefined;
4430
+ payment_status_in?: string[] | undefined;
4208
4431
  };
4209
4432
  target: "appointment";
4210
4433
  };
@@ -4221,6 +4444,9 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4221
4444
  base: "target_date" | "run_date";
4222
4445
  time: string;
4223
4446
  rule: "send_at_local";
4447
+ } | {
4448
+ rule: "relative_to_appointment";
4449
+ offset_minutes: number;
4224
4450
  };
4225
4451
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4226
4452
  payload: Record<string, unknown>;
@@ -4353,6 +4579,11 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4353
4579
  status_in?: string[] | undefined;
4354
4580
  status_base_in?: string[] | undefined;
4355
4581
  appointment_type_not_in?: string[] | undefined;
4582
+ professional_names?: string[] | undefined;
4583
+ procedure_names?: string[] | undefined;
4584
+ insurance_names?: string[] | undefined;
4585
+ address_names?: string[] | undefined;
4586
+ payment_status_in?: string[] | undefined;
4356
4587
  };
4357
4588
  target: "appointment";
4358
4589
  };
@@ -4369,6 +4600,9 @@ export declare const zAutomationRoutineWriteSchema: z.ZodObject<{
4369
4600
  base: "target_date" | "run_date";
4370
4601
  time: string;
4371
4602
  rule: "send_at_local";
4603
+ } | {
4604
+ rule: "relative_to_appointment";
4605
+ offset_minutes: number;
4372
4606
  };
4373
4607
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4374
4608
  payload?: Record<string, unknown> | undefined;
@@ -4535,6 +4769,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4535
4769
  status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4536
4770
  status_base_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4537
4771
  appointment_type_not_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4772
+ professional_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4773
+ procedure_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4774
+ insurance_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4775
+ address_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4776
+ payment_status_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4538
4777
  }, "strip", z.ZodTypeAny, {
4539
4778
  date_window: {
4540
4779
  offset_days: number;
@@ -4544,6 +4783,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4544
4783
  status_in?: string[] | undefined;
4545
4784
  status_base_in?: string[] | undefined;
4546
4785
  appointment_type_not_in?: string[] | undefined;
4786
+ professional_names?: string[] | undefined;
4787
+ procedure_names?: string[] | undefined;
4788
+ insurance_names?: string[] | undefined;
4789
+ address_names?: string[] | undefined;
4790
+ payment_status_in?: string[] | undefined;
4547
4791
  }, {
4548
4792
  date_window: {
4549
4793
  offset_days: number;
@@ -4553,6 +4797,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4553
4797
  status_in?: string[] | undefined;
4554
4798
  status_base_in?: string[] | undefined;
4555
4799
  appointment_type_not_in?: string[] | undefined;
4800
+ professional_names?: string[] | undefined;
4801
+ procedure_names?: string[] | undefined;
4802
+ insurance_names?: string[] | undefined;
4803
+ address_names?: string[] | undefined;
4804
+ payment_status_in?: string[] | undefined;
4556
4805
  }>;
4557
4806
  }, "strip", z.ZodTypeAny, {
4558
4807
  appointment: {
@@ -4564,6 +4813,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4564
4813
  status_in?: string[] | undefined;
4565
4814
  status_base_in?: string[] | undefined;
4566
4815
  appointment_type_not_in?: string[] | undefined;
4816
+ professional_names?: string[] | undefined;
4817
+ procedure_names?: string[] | undefined;
4818
+ insurance_names?: string[] | undefined;
4819
+ address_names?: string[] | undefined;
4820
+ payment_status_in?: string[] | undefined;
4567
4821
  };
4568
4822
  target: "appointment";
4569
4823
  }, {
@@ -4576,6 +4830,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4576
4830
  status_in?: string[] | undefined;
4577
4831
  status_base_in?: string[] | undefined;
4578
4832
  appointment_type_not_in?: string[] | undefined;
4833
+ professional_names?: string[] | undefined;
4834
+ procedure_names?: string[] | undefined;
4835
+ insurance_names?: string[] | undefined;
4836
+ address_names?: string[] | undefined;
4837
+ payment_status_in?: string[] | undefined;
4579
4838
  };
4580
4839
  target: "appointment";
4581
4840
  }>;
@@ -4608,6 +4867,15 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4608
4867
  base: "target_date" | "run_date";
4609
4868
  time: string;
4610
4869
  rule: "send_at_local";
4870
+ }>, z.ZodObject<{
4871
+ rule: z.ZodLiteral<"relative_to_appointment">;
4872
+ offset_minutes: z.ZodNumber;
4873
+ }, "strip", z.ZodTypeAny, {
4874
+ rule: "relative_to_appointment";
4875
+ offset_minutes: number;
4876
+ }, {
4877
+ rule: "relative_to_appointment";
4878
+ offset_minutes: number;
4611
4879
  }>]>;
4612
4880
  retry: z.ZodOptional<z.ZodObject<{
4613
4881
  max_attempts: z.ZodNumber;
@@ -4896,6 +5164,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
4896
5164
  base: "target_date" | "run_date";
4897
5165
  time: string;
4898
5166
  rule: "send_at_local";
5167
+ } | {
5168
+ rule: "relative_to_appointment";
5169
+ offset_minutes: number;
4899
5170
  };
4900
5171
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
4901
5172
  payload: Record<string, unknown>;
@@ -5002,6 +5273,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5002
5273
  base: "target_date" | "run_date";
5003
5274
  time: string;
5004
5275
  rule: "send_at_local";
5276
+ } | {
5277
+ rule: "relative_to_appointment";
5278
+ offset_minutes: number;
5005
5279
  };
5006
5280
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5007
5281
  payload?: Record<string, unknown> | undefined;
@@ -5127,6 +5401,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5127
5401
  base: "target_date" | "run_date";
5128
5402
  time: string;
5129
5403
  rule: "send_at_local";
5404
+ } | {
5405
+ rule: "relative_to_appointment";
5406
+ offset_minutes: number;
5130
5407
  };
5131
5408
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5132
5409
  payload: Record<string, unknown>;
@@ -5244,6 +5521,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5244
5521
  base: "target_date" | "run_date";
5245
5522
  time: string;
5246
5523
  rule: "send_at_local";
5524
+ } | {
5525
+ rule: "relative_to_appointment";
5526
+ offset_minutes: number;
5247
5527
  };
5248
5528
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5249
5529
  payload?: Record<string, unknown> | undefined;
@@ -5380,6 +5660,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5380
5660
  status_in?: string[] | undefined;
5381
5661
  status_base_in?: string[] | undefined;
5382
5662
  appointment_type_not_in?: string[] | undefined;
5663
+ professional_names?: string[] | undefined;
5664
+ procedure_names?: string[] | undefined;
5665
+ insurance_names?: string[] | undefined;
5666
+ address_names?: string[] | undefined;
5667
+ payment_status_in?: string[] | undefined;
5383
5668
  };
5384
5669
  target: "appointment";
5385
5670
  };
@@ -5396,6 +5681,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5396
5681
  base: "target_date" | "run_date";
5397
5682
  time: string;
5398
5683
  rule: "send_at_local";
5684
+ } | {
5685
+ rule: "relative_to_appointment";
5686
+ offset_minutes: number;
5399
5687
  };
5400
5688
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5401
5689
  payload: Record<string, unknown>;
@@ -5528,6 +5816,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5528
5816
  status_in?: string[] | undefined;
5529
5817
  status_base_in?: string[] | undefined;
5530
5818
  appointment_type_not_in?: string[] | undefined;
5819
+ professional_names?: string[] | undefined;
5820
+ procedure_names?: string[] | undefined;
5821
+ insurance_names?: string[] | undefined;
5822
+ address_names?: string[] | undefined;
5823
+ payment_status_in?: string[] | undefined;
5531
5824
  };
5532
5825
  target: "appointment";
5533
5826
  };
@@ -5544,6 +5837,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5544
5837
  base: "target_date" | "run_date";
5545
5838
  time: string;
5546
5839
  rule: "send_at_local";
5840
+ } | {
5841
+ rule: "relative_to_appointment";
5842
+ offset_minutes: number;
5547
5843
  };
5548
5844
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5549
5845
  payload?: Record<string, unknown> | undefined;
@@ -5681,6 +5977,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5681
5977
  status_in?: string[] | undefined;
5682
5978
  status_base_in?: string[] | undefined;
5683
5979
  appointment_type_not_in?: string[] | undefined;
5980
+ professional_names?: string[] | undefined;
5981
+ procedure_names?: string[] | undefined;
5982
+ insurance_names?: string[] | undefined;
5983
+ address_names?: string[] | undefined;
5984
+ payment_status_in?: string[] | undefined;
5684
5985
  };
5685
5986
  target: "appointment";
5686
5987
  };
@@ -5697,6 +5998,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5697
5998
  base: "target_date" | "run_date";
5698
5999
  time: string;
5699
6000
  rule: "send_at_local";
6001
+ } | {
6002
+ rule: "relative_to_appointment";
6003
+ offset_minutes: number;
5700
6004
  };
5701
6005
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5702
6006
  payload: Record<string, unknown>;
@@ -5832,6 +6136,11 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5832
6136
  status_in?: string[] | undefined;
5833
6137
  status_base_in?: string[] | undefined;
5834
6138
  appointment_type_not_in?: string[] | undefined;
6139
+ professional_names?: string[] | undefined;
6140
+ procedure_names?: string[] | undefined;
6141
+ insurance_names?: string[] | undefined;
6142
+ address_names?: string[] | undefined;
6143
+ payment_status_in?: string[] | undefined;
5835
6144
  };
5836
6145
  target: "appointment";
5837
6146
  };
@@ -5848,6 +6157,9 @@ export declare const zAutomationRoutineUpdateRequestSchema: z.ZodObject<{
5848
6157
  base: "target_date" | "run_date";
5849
6158
  time: string;
5850
6159
  rule: "send_at_local";
6160
+ } | {
6161
+ rule: "relative_to_appointment";
6162
+ offset_minutes: number;
5851
6163
  };
5852
6164
  handler: "notifications" | "ai_agent" | "invoices" | "webhook" | "custom" | "lead_reactivation" | "appointment_action" | "appointment_reminder" | "evo-integrations.sync-run";
5853
6165
  payload?: Record<string, unknown> | undefined;
@@ -34,9 +34,16 @@ exports.zAutomationAppointmentSelectionSchema = zod_1.z.object({
34
34
  appointment: zod_1.z.object({
35
35
  calendar_ids: zod_1.z.array(zod_1.z.string()).optional(),
36
36
  date_window: exports.zAutomationDateWindowSchema,
37
+ // String filters accept the wildcard `*` (case-insensitive glob); without
38
+ // `*` = exact match (Q21). Sourced from the appointment embeds.
37
39
  status_in: zod_1.z.array(zod_1.z.string()).optional(),
38
40
  status_base_in: zod_1.z.array(zod_1.z.string()).optional(),
39
41
  appointment_type_not_in: zod_1.z.array(zod_1.z.string()).optional(),
42
+ professional_names: zod_1.z.array(zod_1.z.string()).optional(),
43
+ procedure_names: zod_1.z.array(zod_1.z.string()).optional(),
44
+ insurance_names: zod_1.z.array(zod_1.z.string()).optional(),
45
+ address_names: zod_1.z.array(zod_1.z.string()).optional(),
46
+ payment_status_in: zod_1.z.array(zod_1.z.string()).optional(),
40
47
  }),
41
48
  });
42
49
  exports.zAutomationSelectionSchema = exports.zAutomationAppointmentSelectionSchema;
@@ -72,6 +79,11 @@ exports.zAutomationExecuteAtSchema = zod_1.z.discriminatedUnion("rule", [
72
79
  time: zod_1.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "expected HH:mm"),
73
80
  base: zod_1.z.enum(["target_date", "run_date"]),
74
81
  }),
82
+ // Q20.7: appointment.startDate + offset_minutes (negative = before).
83
+ zod_1.z.object({
84
+ rule: zod_1.z.literal("relative_to_appointment"),
85
+ offset_minutes: zod_1.z.number().int(),
86
+ }),
75
87
  ]);
76
88
  exports.zAutomationAutoTaskOutputSchema = zod_1.z.object({
77
89
  type: zod_1.z.literal("auto_task"),
@@ -41,9 +41,16 @@ export const zAutomationAppointmentSelectionSchema = z.object({
41
41
  appointment: z.object({
42
42
  calendar_ids: z.array(z.string()).optional(),
43
43
  date_window: zAutomationDateWindowSchema,
44
+ // String filters accept the wildcard `*` (case-insensitive glob); without
45
+ // `*` = exact match (Q21). Sourced from the appointment embeds.
44
46
  status_in: z.array(z.string()).optional(),
45
47
  status_base_in: z.array(z.string()).optional(),
46
48
  appointment_type_not_in: z.array(z.string()).optional(),
49
+ professional_names: z.array(z.string()).optional(),
50
+ procedure_names: z.array(z.string()).optional(),
51
+ insurance_names: z.array(z.string()).optional(),
52
+ address_names: z.array(z.string()).optional(),
53
+ payment_status_in: z.array(z.string()).optional(),
47
54
  }),
48
55
  });
49
56
 
@@ -97,6 +104,11 @@ export const zAutomationExecuteAtSchema = z.discriminatedUnion("rule", [
97
104
  time: z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "expected HH:mm"),
98
105
  base: z.enum(["target_date", "run_date"]),
99
106
  }),
107
+ // Q20.7: appointment.startDate + offset_minutes (negative = before).
108
+ z.object({
109
+ rule: z.literal("relative_to_appointment"),
110
+ offset_minutes: z.number().int(),
111
+ }),
100
112
  ]);
101
113
 
102
114
  export const zAutomationAutoTaskOutputSchema = z.object({
@@ -29,10 +29,24 @@ export interface IAutomationAppointmentSelection {
29
29
  status_in?: string[];
30
30
  status_base_in?: string[];
31
31
  appointment_type_not_in?: string[];
32
+ professional_names?: string[];
33
+ procedure_names?: string[];
34
+ insurance_names?: string[];
35
+ address_names?: string[];
36
+ payment_status_in?: string[];
32
37
  };
33
38
  }
34
39
  export type IAutomationSelection = IAutomationAppointmentSelection;
35
- export declare const AUTOMATION_APPOINTMENT_FACTS: readonly ["appointment.status", "appointment.status_base", "appointment.appointment_type", "appointment.appointment_base_type", "appointment.appointment_mode", "appointment.professional_id", "appointment.procedure_ids", "appointment.payment_status", "appointment.calendar_id"];
40
+ export interface IAutomationFilterValues {
41
+ professionals: string[];
42
+ procedures: string[];
43
+ insurances: string[];
44
+ addresses: string[];
45
+ statuses: string[];
46
+ status_bases: string[];
47
+ appointment_types: string[];
48
+ }
49
+ export declare const AUTOMATION_APPOINTMENT_FACTS: readonly ["appointment.status", "appointment.status_base", "appointment.appointment_type", "appointment.appointment_base_type", "appointment.appointment_mode", "appointment.professional_id", "appointment.procedure_ids", "appointment.professional_name", "appointment.procedure_names", "appointment.insurance_name", "appointment.address_name", "appointment.payment_status", "appointment.calendar_id"];
36
50
  export type AutomationAppointmentFact = (typeof AUTOMATION_APPOINTMENT_FACTS)[number];
37
51
  export type AutomationFact = AutomationAppointmentFact;
38
52
  export declare const AutomationOperatorEnum: {
@@ -67,6 +81,9 @@ export type IAutomationExecuteAt = {
67
81
  rule: "send_at_local";
68
82
  time: string;
69
83
  base: "target_date" | "run_date";
84
+ } | {
85
+ rule: "relative_to_appointment";
86
+ offset_minutes: number;
70
87
  };
71
88
  export interface IAutomationAutoTaskOutput {
72
89
  type: "auto_task";
@@ -47,9 +47,16 @@ exports.AUTOMATION_APPOINTMENT_FACTS = [
47
47
  "appointment.appointment_base_type",
48
48
  // 'telemedicine' | 'in_person'
49
49
  "appointment.appointment_mode",
50
- // Derived from professional.professionalRef.id
50
+ // Derived from professional.professionalRef.id. On external calendars the
51
+ // reliable value is the name (Q21) — professional_id kept for internal.
51
52
  "appointment.professional_id",
52
53
  "appointment.procedure_ids",
54
+ // Embed-sourced names (Q20-C passthrough); reliable across adapters.
55
+ "appointment.professional_name",
56
+ // string[] — matches if ANY procedure name matches.
57
+ "appointment.procedure_names",
58
+ "appointment.insurance_name",
59
+ "appointment.address_name",
53
60
  "appointment.payment_status",
54
61
  "appointment.calendar_id",
55
62
  ];
@@ -68,18 +68,47 @@ export interface IAutomationDateWindow {
68
68
  export interface IAutomationAppointmentSelection {
69
69
  target: "appointment";
70
70
  appointment: {
71
- // Empty/omitted = all calendars of the tenant.
71
+ // Empty/omitted = all calendars of the tenant. GUI enforces exactly 1
72
+ // (Q21-A: single-calendar unlocks rich filter-values); calendar_ids[] kept
73
+ // for engine/seed compat (multi-calendar = N routines).
72
74
  calendar_ids?: string[];
73
75
  date_window: IAutomationDateWindow;
74
- // Filters applied in memory over the day window (no server-side status query).
76
+ // Filters applied in memory over the day window (no server-side query).
77
+ // String filters accept the wildcard `*` (case-insensitive glob); without
78
+ // `*` they are exact matches (Q21). Sourced from the appointment embeds
79
+ // (passthrough from the sync, per the Q20-C investigation).
75
80
  status_in?: string[];
76
81
  status_base_in?: string[];
77
82
  appointment_type_not_in?: string[];
83
+ // professional.display_name
84
+ professional_names?: string[];
85
+ // matches if ANY procedures[].name matches
86
+ procedure_names?: string[];
87
+ // insurance.name
88
+ insurance_names?: string[];
89
+ // address.address_name (note: NOT address.Name of the legacy n8n shape)
90
+ address_names?: string[];
91
+ // payment.status — fixed local enum (pending/partial/paid/not_informed)
92
+ payment_status_in?: string[];
78
93
  };
79
94
  }
80
95
 
81
96
  export type IAutomationSelection = IAutomationAppointmentSelection;
82
97
 
98
+ // Distinct filter values for a calendar, built from a limited window of local
99
+ // appointments (GET /routines/filter-values?calendar_id=). Feeds the GUI's
100
+ // selection filters and branch conditions with real, per-calendar suggestions
101
+ // (Q20-C: distinct-local, no adapter capability). Sorted pt-BR, capped per field.
102
+ export interface IAutomationFilterValues {
103
+ professionals: string[];
104
+ procedures: string[];
105
+ insurances: string[];
106
+ addresses: string[];
107
+ statuses: string[];
108
+ status_bases: string[];
109
+ appointment_types: string[];
110
+ }
111
+
83
112
  // ------------------------------------------------------
84
113
  // Fact catalog (F1: appointment domain facts only — Q15: no patient.* facts)
85
114
  // ------------------------------------------------------
@@ -91,9 +120,16 @@ export const AUTOMATION_APPOINTMENT_FACTS = [
91
120
  "appointment.appointment_base_type",
92
121
  // 'telemedicine' | 'in_person'
93
122
  "appointment.appointment_mode",
94
- // Derived from professional.professionalRef.id
123
+ // Derived from professional.professionalRef.id. On external calendars the
124
+ // reliable value is the name (Q21) — professional_id kept for internal.
95
125
  "appointment.professional_id",
96
126
  "appointment.procedure_ids",
127
+ // Embed-sourced names (Q20-C passthrough); reliable across adapters.
128
+ "appointment.professional_name",
129
+ // string[] — matches if ANY procedure name matches.
130
+ "appointment.procedure_names",
131
+ "appointment.insurance_name",
132
+ "appointment.address_name",
97
133
  "appointment.payment_status",
98
134
  "appointment.calendar_id",
99
135
  ] as const;
@@ -151,6 +187,11 @@ export type AutomationOutputType =
151
187
  // - immediate: now (Task Runner picks it up on the next tick)
152
188
  // - send_at_local: HH:mm resolved in the tenant timezone, anchored to the
153
189
  // target date or the run date.
190
+ // - relative_to_appointment: appointment.startDate + offset_minutes (Q20.7).
191
+ // Negative = before the appointment (e.g. -120 = 2h before). The routine
192
+ // runs once (e.g. 6am); each task is scheduled relative to its own target.
193
+ // If the computed time already passed at run time, the materializer clamps
194
+ // it to "now" (with a log).
154
195
  export type IAutomationExecuteAt =
155
196
  | { rule: "immediate" }
156
197
  | {
@@ -158,6 +199,11 @@ export type IAutomationExecuteAt =
158
199
  // "HH:mm" (24h)
159
200
  time: string;
160
201
  base: "target_date" | "run_date";
202
+ }
203
+ | {
204
+ rule: "relative_to_appointment";
205
+ // Signed minutes offset from appointment.startDate (negative = before).
206
+ offset_minutes: number;
161
207
  };
162
208
 
163
209
  export interface IAutomationAutoTaskOutput {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.409",
3
+ "version": "1.3.411",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",