@tracearr/shared 2.2.3 → 2.2.4-beta.2

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.
Files changed (35) hide show
  1. package/dist/automations/__tests__/definition.test.js +2 -2
  2. package/dist/automations/__tests__/templates.test.js.map +1 -1
  3. package/dist/automations/actions.d.ts +219 -219
  4. package/dist/automations/actions.d.ts.map +1 -1
  5. package/dist/automations/conditions.d.ts +129 -129
  6. package/dist/automations/conditions.d.ts.map +1 -1
  7. package/dist/automations/definition.d.ts +330 -327
  8. package/dist/automations/definition.d.ts.map +1 -1
  9. package/dist/automations/dryRun.d.ts +99 -98
  10. package/dist/automations/dryRun.d.ts.map +1 -1
  11. package/dist/automations/share.d.ts.map +1 -1
  12. package/dist/automations/share.js.map +1 -1
  13. package/dist/automations/templates.d.ts +276 -274
  14. package/dist/automations/templates.d.ts.map +1 -1
  15. package/dist/automations/templates.js.map +1 -1
  16. package/dist/automations/triggers.d.ts +46 -40
  17. package/dist/automations/triggers.d.ts.map +1 -1
  18. package/dist/automations/triggers.js +1 -0
  19. package/dist/automations/triggers.js.map +1 -1
  20. package/dist/constants.d.ts +69 -69
  21. package/dist/constants.d.ts.map +1 -1
  22. package/dist/destinations.d.ts +37 -37
  23. package/dist/destinations.d.ts.map +1 -1
  24. package/dist/dynamicRange.d.ts +1 -1
  25. package/dist/dynamicRange.d.ts.map +1 -1
  26. package/dist/listQuery.d.ts +1 -1
  27. package/dist/media.js.map +1 -1
  28. package/dist/mediaServerLinks.js.map +1 -1
  29. package/dist/resolution.d.ts.map +1 -1
  30. package/dist/schemas.d.ts +123 -123
  31. package/dist/schemas.d.ts.map +1 -1
  32. package/dist/types.d.ts +2 -2
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/violations.js.map +1 -1
  35. package/package.json +2 -4
@@ -3,9 +3,9 @@ import type { AutomationActions } from './actions.js';
3
3
  import type { AutomationConditions, ConditionField, ConditionValue, Operator } from './conditions.js';
4
4
  import type { TriggerNode } from './triggers.js';
5
5
  import type { MediaType, ViolationSeverity } from '../types.js';
6
- export declare const AUTOMATION_KINDS: readonly ["policy", "notification"];
6
+ export declare const AUTOMATION_KINDS: readonly ['policy', 'notification'];
7
7
  export type AutomationKind = (typeof AUTOMATION_KINDS)[number];
8
- export declare const RUN_OUTCOMES: readonly ["completed", "stopped_by_condition", "error"];
8
+ export declare const RUN_OUTCOMES: readonly ['completed', 'stopped_by_condition', 'error'];
9
9
  export type RunOutcome = (typeof RUN_OUTCOMES)[number];
10
10
  /** Days a completed run survives when its automation names no retention of its own. */
11
11
  export declare const RETENTION_DEFAULTS: {
@@ -20,33 +20,36 @@ export declare const automationDefinitionSchema: z.ZodObject<{
20
20
  name: z.ZodString;
21
21
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
22
  kind: z.ZodEnum<{
23
- policy: "policy";
24
23
  notification: "notification";
24
+ policy: "policy";
25
25
  }>;
26
26
  severity: z.ZodNullable<z.ZodEnum<{
27
+ high: "high";
27
28
  low: "low";
28
29
  warning: "warning";
29
- high: "high";
30
30
  }>>;
31
31
  triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
32
+ id: z.ZodUUID;
33
+ enabled: z.ZodBoolean;
32
34
  type: z.ZodEnum<{
33
- "session.started": "session.started";
34
- "session.stopped": "session.stopped";
35
- "session.transcode_changed": "session.transcode_changed";
36
- "session.paused": "session.paused";
37
35
  "account.new_device": "account.new_device";
38
36
  "account.trust_changed": "account.trust_changed";
39
37
  "media.added": "media.added";
40
38
  "media.upgraded": "media.upgraded";
39
+ "plugin.update_available": "plugin.update_available";
41
40
  "server.down": "server.down";
42
41
  "server.up": "server.up";
43
- "plugin.update_available": "plugin.update_available";
44
42
  "server.update_available": "server.update_available";
43
+ "session.first_seen": "session.first_seen";
44
+ "session.paused": "session.paused";
45
+ "session.started": "session.started";
46
+ "session.stopped": "session.stopped";
47
+ "session.transcode_changed": "session.transcode_changed";
45
48
  "tracearr.update_available": "tracearr.update_available";
46
49
  }>;
50
+ }, z.core.$strict>, z.ZodObject<{
47
51
  id: z.ZodUUID;
48
52
  enabled: z.ZodBoolean;
49
- }, z.core.$strict>, z.ZodObject<{
50
53
  type: z.ZodLiteral<"session.held_for">;
51
54
  params: z.ZodObject<{
52
55
  minutes: z.ZodNumber;
@@ -55,69 +58,71 @@ export declare const automationDefinitionSchema: z.ZodObject<{
55
58
  total: "total";
56
59
  }>;
57
60
  }, z.core.$strict>;
61
+ }, z.core.$strict>, z.ZodObject<{
58
62
  id: z.ZodUUID;
59
63
  enabled: z.ZodBoolean;
60
- }, z.core.$strict>, z.ZodObject<{
61
64
  type: z.ZodLiteral<"account.inactive_for">;
62
65
  params: z.ZodObject<{
63
66
  days: z.ZodNumber;
64
67
  }, z.core.$strict>;
65
- id: z.ZodUUID;
66
- enabled: z.ZodBoolean;
67
68
  }, z.core.$strict>], "type">>;
68
69
  conditions: z.ZodObject<{
69
70
  groups: z.ZodArray<z.ZodObject<{
71
+ id: z.ZodOptional<z.ZodUUID>;
72
+ enabled: z.ZodOptional<z.ZodBoolean>;
70
73
  match: z.ZodOptional<z.ZodEnum<{
71
- any: "any";
72
74
  all: "all";
75
+ any: "any";
73
76
  }>>;
74
77
  conditions: z.ZodArray<z.ZodObject<{
78
+ id: z.ZodOptional<z.ZodUUID>;
79
+ enabled: z.ZodOptional<z.ZodBoolean>;
75
80
  field: z.ZodUnion<readonly [z.ZodEnum<{
76
- concurrent_streams: "concurrent_streams";
77
81
  active_session_distance_km: "active_session_distance_km";
78
- travel_speed_kmh: "travel_speed_kmh";
79
- unique_ips_in_window: "unique_ips_in_window";
80
- unique_devices_in_window: "unique_devices_in_window";
81
- inactive_days: "inactive_days";
82
+ concurrent_streams: "concurrent_streams";
82
83
  current_pause_minutes: "current_pause_minutes";
84
+ inactive_days: "inactive_days";
83
85
  total_pause_minutes: "total_pause_minutes";
86
+ travel_speed_kmh: "travel_speed_kmh";
87
+ unique_devices_in_window: "unique_devices_in_window";
88
+ unique_ips_in_window: "unique_ips_in_window";
84
89
  }>, z.ZodEnum<{
85
- source_resolution: "source_resolution";
86
- output_resolution: "output_resolution";
87
- is_transcoding: "is_transcoding";
88
90
  is_transcode_downgrade: "is_transcode_downgrade";
91
+ is_transcoding: "is_transcoding";
92
+ output_resolution: "output_resolution";
89
93
  source_bitrate_mbps: "source_bitrate_mbps";
94
+ source_resolution: "source_resolution";
90
95
  }>, z.ZodEnum<{
91
- user_id: "user_id";
92
- trust_score: "trust_score";
93
96
  account_age_days: "account_age_days";
97
+ trust_score: "trust_score";
98
+ user_id: "user_id";
94
99
  }>, z.ZodEnum<{
95
- device_type: "device_type";
96
100
  client_name: "client_name";
101
+ device_type: "device_type";
97
102
  platform: "platform";
98
103
  }>, z.ZodEnum<{
99
- is_local_network: "is_local_network";
100
104
  country: "country";
101
105
  ip_in_range: "ip_in_range";
106
+ is_local_network: "is_local_network";
102
107
  }>, z.ZodEnum<{
103
- server_id: "server_id";
104
108
  media_type: "media_type";
109
+ server_id: "server_id";
105
110
  }>, z.ZodEnum<{
111
+ audio_channels_after: "audio_channels_after";
112
+ dynamic_range_after: "dynamic_range_after";
113
+ file_size_after: "file_size_after";
106
114
  library_item_type: "library_item_type";
107
115
  library_name: "library_name";
108
116
  resolution_after: "resolution_after";
109
- dynamic_range_after: "dynamic_range_after";
110
117
  video_codec_after: "video_codec_after";
111
- audio_channels_after: "audio_channels_after";
112
- file_size_after: "file_size_after";
113
118
  }>]>;
114
119
  operator: z.ZodUnion<readonly [z.ZodEnum<{
115
120
  eq: "eq";
116
- neq: "neq";
117
121
  gt: "gt";
118
122
  gte: "gte";
119
123
  lt: "lt";
120
124
  lte: "lte";
125
+ neq: "neq";
121
126
  }>, z.ZodEnum<{
122
127
  in: "in";
123
128
  not_in: "not_in";
@@ -131,123 +136,125 @@ export declare const automationDefinitionSchema: z.ZodObject<{
131
136
  exclude_same_device: z.ZodOptional<z.ZodBoolean>;
132
137
  exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
133
138
  count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
134
- unknown: "unknown";
139
+ browser: "browser";
140
+ desktop: "desktop";
135
141
  mobile: "mobile";
136
142
  tablet: "tablet";
137
143
  tv: "tv";
138
- desktop: "desktop";
139
- browser: "browser";
144
+ unknown: "unknown";
140
145
  }>>>;
141
146
  }, z.core.$strip>>;
142
- id: z.ZodOptional<z.ZodUUID>;
143
- enabled: z.ZodOptional<z.ZodBoolean>;
144
147
  }, z.core.$strip>>;
145
- id: z.ZodOptional<z.ZodUUID>;
146
- enabled: z.ZodOptional<z.ZodBoolean>;
147
148
  }, z.core.$strip>>;
148
149
  }, z.core.$strip>;
149
150
  actions: z.ZodObject<{
150
151
  actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
152
+ id: z.ZodOptional<z.ZodUUID>;
153
+ enabled: z.ZodOptional<z.ZodBoolean>;
151
154
  type: z.ZodLiteral<"send">;
152
155
  to: z.ZodArray<z.ZodUUID>;
153
156
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
154
157
  title: z.ZodOptional<z.ZodString>;
155
158
  body: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strip>, z.ZodObject<{
156
160
  id: z.ZodOptional<z.ZodUUID>;
157
161
  enabled: z.ZodOptional<z.ZodBoolean>;
158
- }, z.core.$strip>, z.ZodObject<{
159
162
  type: z.ZodLiteral<"trust">;
160
163
  mode: z.ZodEnum<{
161
- set: "set";
162
164
  adjust: "adjust";
163
165
  reset: "reset";
166
+ set: "set";
164
167
  }>;
165
168
  amount: z.ZodOptional<z.ZodNumber>;
166
169
  value: z.ZodOptional<z.ZodNumber>;
167
170
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
171
+ }, z.core.$strip>, z.ZodObject<{
168
172
  id: z.ZodOptional<z.ZodUUID>;
169
173
  enabled: z.ZodOptional<z.ZodBoolean>;
170
- }, z.core.$strip>, z.ZodObject<{
171
174
  type: z.ZodLiteral<"kill_stream">;
172
175
  delay_seconds: z.ZodOptional<z.ZodNumber>;
173
176
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
174
177
  message: z.ZodOptional<z.ZodString>;
175
178
  target: z.ZodOptional<z.ZodEnum<{
176
- triggering: "triggering";
177
- oldest: "oldest";
178
- newest: "newest";
179
179
  all_except_one: "all_except_one";
180
180
  all_user: "all_user";
181
+ newest: "newest";
182
+ oldest: "oldest";
183
+ triggering: "triggering";
181
184
  }>>;
185
+ }, z.core.$strip>, z.ZodObject<{
182
186
  id: z.ZodOptional<z.ZodUUID>;
183
187
  enabled: z.ZodOptional<z.ZodBoolean>;
184
- }, z.core.$strip>, z.ZodObject<{
185
188
  type: z.ZodLiteral<"message_client">;
186
189
  message: z.ZodString;
187
190
  target: z.ZodOptional<z.ZodEnum<{
188
- triggering: "triggering";
189
- oldest: "oldest";
190
- newest: "newest";
191
191
  all_except_one: "all_except_one";
192
192
  all_user: "all_user";
193
+ newest: "newest";
194
+ oldest: "oldest";
195
+ triggering: "triggering";
193
196
  }>>;
197
+ }, z.core.$strip>, z.ZodObject<{
194
198
  id: z.ZodOptional<z.ZodUUID>;
195
199
  enabled: z.ZodOptional<z.ZodBoolean>;
196
- }, z.core.$strip>, z.ZodObject<{
197
200
  type: z.ZodLiteral<"if">;
198
201
  conditions: z.ZodObject<{
199
202
  groups: z.ZodArray<z.ZodObject<{
203
+ id: z.ZodOptional<z.ZodUUID>;
204
+ enabled: z.ZodOptional<z.ZodBoolean>;
200
205
  match: z.ZodOptional<z.ZodEnum<{
201
- any: "any";
202
206
  all: "all";
207
+ any: "any";
203
208
  }>>;
204
209
  conditions: z.ZodArray<z.ZodObject<{
210
+ id: z.ZodOptional<z.ZodUUID>;
211
+ enabled: z.ZodOptional<z.ZodBoolean>;
205
212
  field: z.ZodUnion<readonly [z.ZodEnum<{
206
- concurrent_streams: "concurrent_streams";
207
213
  active_session_distance_km: "active_session_distance_km";
208
- travel_speed_kmh: "travel_speed_kmh";
209
- unique_ips_in_window: "unique_ips_in_window";
210
- unique_devices_in_window: "unique_devices_in_window";
211
- inactive_days: "inactive_days";
214
+ concurrent_streams: "concurrent_streams";
212
215
  current_pause_minutes: "current_pause_minutes";
216
+ inactive_days: "inactive_days";
213
217
  total_pause_minutes: "total_pause_minutes";
218
+ travel_speed_kmh: "travel_speed_kmh";
219
+ unique_devices_in_window: "unique_devices_in_window";
220
+ unique_ips_in_window: "unique_ips_in_window";
214
221
  }>, z.ZodEnum<{
215
- source_resolution: "source_resolution";
216
- output_resolution: "output_resolution";
217
- is_transcoding: "is_transcoding";
218
222
  is_transcode_downgrade: "is_transcode_downgrade";
223
+ is_transcoding: "is_transcoding";
224
+ output_resolution: "output_resolution";
219
225
  source_bitrate_mbps: "source_bitrate_mbps";
226
+ source_resolution: "source_resolution";
220
227
  }>, z.ZodEnum<{
221
- user_id: "user_id";
222
- trust_score: "trust_score";
223
228
  account_age_days: "account_age_days";
229
+ trust_score: "trust_score";
230
+ user_id: "user_id";
224
231
  }>, z.ZodEnum<{
225
- device_type: "device_type";
226
232
  client_name: "client_name";
233
+ device_type: "device_type";
227
234
  platform: "platform";
228
235
  }>, z.ZodEnum<{
229
- is_local_network: "is_local_network";
230
236
  country: "country";
231
237
  ip_in_range: "ip_in_range";
238
+ is_local_network: "is_local_network";
232
239
  }>, z.ZodEnum<{
233
- server_id: "server_id";
234
240
  media_type: "media_type";
241
+ server_id: "server_id";
235
242
  }>, z.ZodEnum<{
243
+ audio_channels_after: "audio_channels_after";
244
+ dynamic_range_after: "dynamic_range_after";
245
+ file_size_after: "file_size_after";
236
246
  library_item_type: "library_item_type";
237
247
  library_name: "library_name";
238
248
  resolution_after: "resolution_after";
239
- dynamic_range_after: "dynamic_range_after";
240
249
  video_codec_after: "video_codec_after";
241
- audio_channels_after: "audio_channels_after";
242
- file_size_after: "file_size_after";
243
250
  }>]>;
244
251
  operator: z.ZodUnion<readonly [z.ZodEnum<{
245
252
  eq: "eq";
246
- neq: "neq";
247
253
  gt: "gt";
248
254
  gte: "gte";
249
255
  lt: "lt";
250
256
  lte: "lte";
257
+ neq: "neq";
251
258
  }>, z.ZodEnum<{
252
259
  in: "in";
253
260
  not_in: "not_in";
@@ -261,117 +268,111 @@ export declare const automationDefinitionSchema: z.ZodObject<{
261
268
  exclude_same_device: z.ZodOptional<z.ZodBoolean>;
262
269
  exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
263
270
  count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
264
- unknown: "unknown";
271
+ browser: "browser";
272
+ desktop: "desktop";
265
273
  mobile: "mobile";
266
274
  tablet: "tablet";
267
275
  tv: "tv";
268
- desktop: "desktop";
269
- browser: "browser";
276
+ unknown: "unknown";
270
277
  }>>>;
271
278
  }, z.core.$strip>>;
272
- id: z.ZodOptional<z.ZodUUID>;
273
- enabled: z.ZodOptional<z.ZodBoolean>;
274
279
  }, z.core.$strip>>;
275
- id: z.ZodOptional<z.ZodUUID>;
276
- enabled: z.ZodOptional<z.ZodBoolean>;
277
280
  }, z.core.$strip>>;
278
281
  }, z.core.$strip>;
279
282
  then: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
283
+ id: z.ZodOptional<z.ZodUUID>;
284
+ enabled: z.ZodOptional<z.ZodBoolean>;
280
285
  type: z.ZodLiteral<"send">;
281
286
  to: z.ZodArray<z.ZodUUID>;
282
287
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
283
288
  title: z.ZodOptional<z.ZodString>;
284
289
  body: z.ZodOptional<z.ZodString>;
290
+ }, z.core.$strip>, z.ZodObject<{
285
291
  id: z.ZodOptional<z.ZodUUID>;
286
292
  enabled: z.ZodOptional<z.ZodBoolean>;
287
- }, z.core.$strip>, z.ZodObject<{
288
293
  type: z.ZodLiteral<"trust">;
289
294
  mode: z.ZodEnum<{
290
- set: "set";
291
295
  adjust: "adjust";
292
296
  reset: "reset";
297
+ set: "set";
293
298
  }>;
294
299
  amount: z.ZodOptional<z.ZodNumber>;
295
300
  value: z.ZodOptional<z.ZodNumber>;
296
301
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
302
+ }, z.core.$strip>, z.ZodObject<{
297
303
  id: z.ZodOptional<z.ZodUUID>;
298
304
  enabled: z.ZodOptional<z.ZodBoolean>;
299
- }, z.core.$strip>, z.ZodObject<{
300
305
  type: z.ZodLiteral<"kill_stream">;
301
306
  delay_seconds: z.ZodOptional<z.ZodNumber>;
302
307
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
303
308
  message: z.ZodOptional<z.ZodString>;
304
309
  target: z.ZodOptional<z.ZodEnum<{
305
- triggering: "triggering";
306
- oldest: "oldest";
307
- newest: "newest";
308
310
  all_except_one: "all_except_one";
309
311
  all_user: "all_user";
312
+ newest: "newest";
313
+ oldest: "oldest";
314
+ triggering: "triggering";
310
315
  }>>;
316
+ }, z.core.$strip>, z.ZodObject<{
311
317
  id: z.ZodOptional<z.ZodUUID>;
312
318
  enabled: z.ZodOptional<z.ZodBoolean>;
313
- }, z.core.$strip>, z.ZodObject<{
314
319
  type: z.ZodLiteral<"message_client">;
315
320
  message: z.ZodString;
316
321
  target: z.ZodOptional<z.ZodEnum<{
317
- triggering: "triggering";
318
- oldest: "oldest";
319
- newest: "newest";
320
322
  all_except_one: "all_except_one";
321
323
  all_user: "all_user";
324
+ newest: "newest";
325
+ oldest: "oldest";
326
+ triggering: "triggering";
322
327
  }>>;
323
- id: z.ZodOptional<z.ZodUUID>;
324
- enabled: z.ZodOptional<z.ZodBoolean>;
325
328
  }, z.core.$strip>], "type">>;
326
329
  else: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
330
+ id: z.ZodOptional<z.ZodUUID>;
331
+ enabled: z.ZodOptional<z.ZodBoolean>;
327
332
  type: z.ZodLiteral<"send">;
328
333
  to: z.ZodArray<z.ZodUUID>;
329
334
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
330
335
  title: z.ZodOptional<z.ZodString>;
331
336
  body: z.ZodOptional<z.ZodString>;
337
+ }, z.core.$strip>, z.ZodObject<{
332
338
  id: z.ZodOptional<z.ZodUUID>;
333
339
  enabled: z.ZodOptional<z.ZodBoolean>;
334
- }, z.core.$strip>, z.ZodObject<{
335
340
  type: z.ZodLiteral<"trust">;
336
341
  mode: z.ZodEnum<{
337
- set: "set";
338
342
  adjust: "adjust";
339
343
  reset: "reset";
344
+ set: "set";
340
345
  }>;
341
346
  amount: z.ZodOptional<z.ZodNumber>;
342
347
  value: z.ZodOptional<z.ZodNumber>;
343
348
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
349
+ }, z.core.$strip>, z.ZodObject<{
344
350
  id: z.ZodOptional<z.ZodUUID>;
345
351
  enabled: z.ZodOptional<z.ZodBoolean>;
346
- }, z.core.$strip>, z.ZodObject<{
347
352
  type: z.ZodLiteral<"kill_stream">;
348
353
  delay_seconds: z.ZodOptional<z.ZodNumber>;
349
354
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
350
355
  message: z.ZodOptional<z.ZodString>;
351
356
  target: z.ZodOptional<z.ZodEnum<{
352
- triggering: "triggering";
353
- oldest: "oldest";
354
- newest: "newest";
355
357
  all_except_one: "all_except_one";
356
358
  all_user: "all_user";
359
+ newest: "newest";
360
+ oldest: "oldest";
361
+ triggering: "triggering";
357
362
  }>>;
363
+ }, z.core.$strip>, z.ZodObject<{
358
364
  id: z.ZodOptional<z.ZodUUID>;
359
365
  enabled: z.ZodOptional<z.ZodBoolean>;
360
- }, z.core.$strip>, z.ZodObject<{
361
366
  type: z.ZodLiteral<"message_client">;
362
367
  message: z.ZodString;
363
368
  target: z.ZodOptional<z.ZodEnum<{
364
- triggering: "triggering";
365
- oldest: "oldest";
366
- newest: "newest";
367
369
  all_except_one: "all_except_one";
368
370
  all_user: "all_user";
371
+ newest: "newest";
372
+ oldest: "oldest";
373
+ triggering: "triggering";
369
374
  }>>;
370
- id: z.ZodOptional<z.ZodUUID>;
371
- enabled: z.ZodOptional<z.ZodBoolean>;
372
375
  }, z.core.$strip>], "type">>;
373
- id: z.ZodOptional<z.ZodUUID>;
374
- enabled: z.ZodOptional<z.ZodBoolean>;
375
376
  }, z.core.$strict>], "type">>;
376
377
  }, z.core.$strip>;
377
378
  serverId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -386,33 +387,36 @@ export declare const createAutomationSchema: z.ZodObject<{
386
387
  name: z.ZodString;
387
388
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
388
389
  kind: z.ZodEnum<{
389
- policy: "policy";
390
390
  notification: "notification";
391
+ policy: "policy";
391
392
  }>;
392
393
  severity: z.ZodNullable<z.ZodEnum<{
394
+ high: "high";
393
395
  low: "low";
394
396
  warning: "warning";
395
- high: "high";
396
397
  }>>;
397
398
  triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
399
+ id: z.ZodUUID;
400
+ enabled: z.ZodBoolean;
398
401
  type: z.ZodEnum<{
399
- "session.started": "session.started";
400
- "session.stopped": "session.stopped";
401
- "session.transcode_changed": "session.transcode_changed";
402
- "session.paused": "session.paused";
403
402
  "account.new_device": "account.new_device";
404
403
  "account.trust_changed": "account.trust_changed";
405
404
  "media.added": "media.added";
406
405
  "media.upgraded": "media.upgraded";
406
+ "plugin.update_available": "plugin.update_available";
407
407
  "server.down": "server.down";
408
408
  "server.up": "server.up";
409
- "plugin.update_available": "plugin.update_available";
410
409
  "server.update_available": "server.update_available";
410
+ "session.first_seen": "session.first_seen";
411
+ "session.paused": "session.paused";
412
+ "session.started": "session.started";
413
+ "session.stopped": "session.stopped";
414
+ "session.transcode_changed": "session.transcode_changed";
411
415
  "tracearr.update_available": "tracearr.update_available";
412
416
  }>;
417
+ }, z.core.$strict>, z.ZodObject<{
413
418
  id: z.ZodUUID;
414
419
  enabled: z.ZodBoolean;
415
- }, z.core.$strict>, z.ZodObject<{
416
420
  type: z.ZodLiteral<"session.held_for">;
417
421
  params: z.ZodObject<{
418
422
  minutes: z.ZodNumber;
@@ -421,69 +425,71 @@ export declare const createAutomationSchema: z.ZodObject<{
421
425
  total: "total";
422
426
  }>;
423
427
  }, z.core.$strict>;
428
+ }, z.core.$strict>, z.ZodObject<{
424
429
  id: z.ZodUUID;
425
430
  enabled: z.ZodBoolean;
426
- }, z.core.$strict>, z.ZodObject<{
427
431
  type: z.ZodLiteral<"account.inactive_for">;
428
432
  params: z.ZodObject<{
429
433
  days: z.ZodNumber;
430
434
  }, z.core.$strict>;
431
- id: z.ZodUUID;
432
- enabled: z.ZodBoolean;
433
435
  }, z.core.$strict>], "type">>;
434
436
  conditions: z.ZodObject<{
435
437
  groups: z.ZodArray<z.ZodObject<{
438
+ id: z.ZodOptional<z.ZodUUID>;
439
+ enabled: z.ZodOptional<z.ZodBoolean>;
436
440
  match: z.ZodOptional<z.ZodEnum<{
437
- any: "any";
438
441
  all: "all";
442
+ any: "any";
439
443
  }>>;
440
444
  conditions: z.ZodArray<z.ZodObject<{
445
+ id: z.ZodOptional<z.ZodUUID>;
446
+ enabled: z.ZodOptional<z.ZodBoolean>;
441
447
  field: z.ZodUnion<readonly [z.ZodEnum<{
442
- concurrent_streams: "concurrent_streams";
443
448
  active_session_distance_km: "active_session_distance_km";
444
- travel_speed_kmh: "travel_speed_kmh";
445
- unique_ips_in_window: "unique_ips_in_window";
446
- unique_devices_in_window: "unique_devices_in_window";
447
- inactive_days: "inactive_days";
449
+ concurrent_streams: "concurrent_streams";
448
450
  current_pause_minutes: "current_pause_minutes";
451
+ inactive_days: "inactive_days";
449
452
  total_pause_minutes: "total_pause_minutes";
453
+ travel_speed_kmh: "travel_speed_kmh";
454
+ unique_devices_in_window: "unique_devices_in_window";
455
+ unique_ips_in_window: "unique_ips_in_window";
450
456
  }>, z.ZodEnum<{
451
- source_resolution: "source_resolution";
452
- output_resolution: "output_resolution";
453
- is_transcoding: "is_transcoding";
454
457
  is_transcode_downgrade: "is_transcode_downgrade";
458
+ is_transcoding: "is_transcoding";
459
+ output_resolution: "output_resolution";
455
460
  source_bitrate_mbps: "source_bitrate_mbps";
461
+ source_resolution: "source_resolution";
456
462
  }>, z.ZodEnum<{
457
- user_id: "user_id";
458
- trust_score: "trust_score";
459
463
  account_age_days: "account_age_days";
464
+ trust_score: "trust_score";
465
+ user_id: "user_id";
460
466
  }>, z.ZodEnum<{
461
- device_type: "device_type";
462
467
  client_name: "client_name";
468
+ device_type: "device_type";
463
469
  platform: "platform";
464
470
  }>, z.ZodEnum<{
465
- is_local_network: "is_local_network";
466
471
  country: "country";
467
472
  ip_in_range: "ip_in_range";
473
+ is_local_network: "is_local_network";
468
474
  }>, z.ZodEnum<{
469
- server_id: "server_id";
470
475
  media_type: "media_type";
476
+ server_id: "server_id";
471
477
  }>, z.ZodEnum<{
478
+ audio_channels_after: "audio_channels_after";
479
+ dynamic_range_after: "dynamic_range_after";
480
+ file_size_after: "file_size_after";
472
481
  library_item_type: "library_item_type";
473
482
  library_name: "library_name";
474
483
  resolution_after: "resolution_after";
475
- dynamic_range_after: "dynamic_range_after";
476
484
  video_codec_after: "video_codec_after";
477
- audio_channels_after: "audio_channels_after";
478
- file_size_after: "file_size_after";
479
485
  }>]>;
480
486
  operator: z.ZodUnion<readonly [z.ZodEnum<{
481
487
  eq: "eq";
482
- neq: "neq";
483
488
  gt: "gt";
484
489
  gte: "gte";
485
490
  lt: "lt";
486
491
  lte: "lte";
492
+ neq: "neq";
487
493
  }>, z.ZodEnum<{
488
494
  in: "in";
489
495
  not_in: "not_in";
@@ -497,123 +503,125 @@ export declare const createAutomationSchema: z.ZodObject<{
497
503
  exclude_same_device: z.ZodOptional<z.ZodBoolean>;
498
504
  exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
499
505
  count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
500
- unknown: "unknown";
506
+ browser: "browser";
507
+ desktop: "desktop";
501
508
  mobile: "mobile";
502
509
  tablet: "tablet";
503
510
  tv: "tv";
504
- desktop: "desktop";
505
- browser: "browser";
511
+ unknown: "unknown";
506
512
  }>>>;
507
513
  }, z.core.$strip>>;
508
- id: z.ZodOptional<z.ZodUUID>;
509
- enabled: z.ZodOptional<z.ZodBoolean>;
510
514
  }, z.core.$strip>>;
511
- id: z.ZodOptional<z.ZodUUID>;
512
- enabled: z.ZodOptional<z.ZodBoolean>;
513
515
  }, z.core.$strip>>;
514
516
  }, z.core.$strip>;
515
517
  actions: z.ZodObject<{
516
518
  actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
519
+ id: z.ZodOptional<z.ZodUUID>;
520
+ enabled: z.ZodOptional<z.ZodBoolean>;
517
521
  type: z.ZodLiteral<"send">;
518
522
  to: z.ZodArray<z.ZodUUID>;
519
523
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
520
524
  title: z.ZodOptional<z.ZodString>;
521
525
  body: z.ZodOptional<z.ZodString>;
526
+ }, z.core.$strip>, z.ZodObject<{
522
527
  id: z.ZodOptional<z.ZodUUID>;
523
528
  enabled: z.ZodOptional<z.ZodBoolean>;
524
- }, z.core.$strip>, z.ZodObject<{
525
529
  type: z.ZodLiteral<"trust">;
526
530
  mode: z.ZodEnum<{
527
- set: "set";
528
531
  adjust: "adjust";
529
532
  reset: "reset";
533
+ set: "set";
530
534
  }>;
531
535
  amount: z.ZodOptional<z.ZodNumber>;
532
536
  value: z.ZodOptional<z.ZodNumber>;
533
537
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
538
+ }, z.core.$strip>, z.ZodObject<{
534
539
  id: z.ZodOptional<z.ZodUUID>;
535
540
  enabled: z.ZodOptional<z.ZodBoolean>;
536
- }, z.core.$strip>, z.ZodObject<{
537
541
  type: z.ZodLiteral<"kill_stream">;
538
542
  delay_seconds: z.ZodOptional<z.ZodNumber>;
539
543
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
540
544
  message: z.ZodOptional<z.ZodString>;
541
545
  target: z.ZodOptional<z.ZodEnum<{
542
- triggering: "triggering";
543
- oldest: "oldest";
544
- newest: "newest";
545
546
  all_except_one: "all_except_one";
546
547
  all_user: "all_user";
548
+ newest: "newest";
549
+ oldest: "oldest";
550
+ triggering: "triggering";
547
551
  }>>;
552
+ }, z.core.$strip>, z.ZodObject<{
548
553
  id: z.ZodOptional<z.ZodUUID>;
549
554
  enabled: z.ZodOptional<z.ZodBoolean>;
550
- }, z.core.$strip>, z.ZodObject<{
551
555
  type: z.ZodLiteral<"message_client">;
552
556
  message: z.ZodString;
553
557
  target: z.ZodOptional<z.ZodEnum<{
554
- triggering: "triggering";
555
- oldest: "oldest";
556
- newest: "newest";
557
558
  all_except_one: "all_except_one";
558
559
  all_user: "all_user";
560
+ newest: "newest";
561
+ oldest: "oldest";
562
+ triggering: "triggering";
559
563
  }>>;
564
+ }, z.core.$strip>, z.ZodObject<{
560
565
  id: z.ZodOptional<z.ZodUUID>;
561
566
  enabled: z.ZodOptional<z.ZodBoolean>;
562
- }, z.core.$strip>, z.ZodObject<{
563
567
  type: z.ZodLiteral<"if">;
564
568
  conditions: z.ZodObject<{
565
569
  groups: z.ZodArray<z.ZodObject<{
570
+ id: z.ZodOptional<z.ZodUUID>;
571
+ enabled: z.ZodOptional<z.ZodBoolean>;
566
572
  match: z.ZodOptional<z.ZodEnum<{
567
- any: "any";
568
573
  all: "all";
574
+ any: "any";
569
575
  }>>;
570
576
  conditions: z.ZodArray<z.ZodObject<{
577
+ id: z.ZodOptional<z.ZodUUID>;
578
+ enabled: z.ZodOptional<z.ZodBoolean>;
571
579
  field: z.ZodUnion<readonly [z.ZodEnum<{
572
- concurrent_streams: "concurrent_streams";
573
580
  active_session_distance_km: "active_session_distance_km";
574
- travel_speed_kmh: "travel_speed_kmh";
575
- unique_ips_in_window: "unique_ips_in_window";
576
- unique_devices_in_window: "unique_devices_in_window";
577
- inactive_days: "inactive_days";
581
+ concurrent_streams: "concurrent_streams";
578
582
  current_pause_minutes: "current_pause_minutes";
583
+ inactive_days: "inactive_days";
579
584
  total_pause_minutes: "total_pause_minutes";
585
+ travel_speed_kmh: "travel_speed_kmh";
586
+ unique_devices_in_window: "unique_devices_in_window";
587
+ unique_ips_in_window: "unique_ips_in_window";
580
588
  }>, z.ZodEnum<{
581
- source_resolution: "source_resolution";
582
- output_resolution: "output_resolution";
583
- is_transcoding: "is_transcoding";
584
589
  is_transcode_downgrade: "is_transcode_downgrade";
590
+ is_transcoding: "is_transcoding";
591
+ output_resolution: "output_resolution";
585
592
  source_bitrate_mbps: "source_bitrate_mbps";
593
+ source_resolution: "source_resolution";
586
594
  }>, z.ZodEnum<{
587
- user_id: "user_id";
588
- trust_score: "trust_score";
589
595
  account_age_days: "account_age_days";
596
+ trust_score: "trust_score";
597
+ user_id: "user_id";
590
598
  }>, z.ZodEnum<{
591
- device_type: "device_type";
592
599
  client_name: "client_name";
600
+ device_type: "device_type";
593
601
  platform: "platform";
594
602
  }>, z.ZodEnum<{
595
- is_local_network: "is_local_network";
596
603
  country: "country";
597
604
  ip_in_range: "ip_in_range";
605
+ is_local_network: "is_local_network";
598
606
  }>, z.ZodEnum<{
599
- server_id: "server_id";
600
607
  media_type: "media_type";
608
+ server_id: "server_id";
601
609
  }>, z.ZodEnum<{
610
+ audio_channels_after: "audio_channels_after";
611
+ dynamic_range_after: "dynamic_range_after";
612
+ file_size_after: "file_size_after";
602
613
  library_item_type: "library_item_type";
603
614
  library_name: "library_name";
604
615
  resolution_after: "resolution_after";
605
- dynamic_range_after: "dynamic_range_after";
606
616
  video_codec_after: "video_codec_after";
607
- audio_channels_after: "audio_channels_after";
608
- file_size_after: "file_size_after";
609
617
  }>]>;
610
618
  operator: z.ZodUnion<readonly [z.ZodEnum<{
611
619
  eq: "eq";
612
- neq: "neq";
613
620
  gt: "gt";
614
621
  gte: "gte";
615
622
  lt: "lt";
616
623
  lte: "lte";
624
+ neq: "neq";
617
625
  }>, z.ZodEnum<{
618
626
  in: "in";
619
627
  not_in: "not_in";
@@ -627,117 +635,111 @@ export declare const createAutomationSchema: z.ZodObject<{
627
635
  exclude_same_device: z.ZodOptional<z.ZodBoolean>;
628
636
  exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
629
637
  count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
630
- unknown: "unknown";
638
+ browser: "browser";
639
+ desktop: "desktop";
631
640
  mobile: "mobile";
632
641
  tablet: "tablet";
633
642
  tv: "tv";
634
- desktop: "desktop";
635
- browser: "browser";
643
+ unknown: "unknown";
636
644
  }>>>;
637
645
  }, z.core.$strip>>;
638
- id: z.ZodOptional<z.ZodUUID>;
639
- enabled: z.ZodOptional<z.ZodBoolean>;
640
646
  }, z.core.$strip>>;
641
- id: z.ZodOptional<z.ZodUUID>;
642
- enabled: z.ZodOptional<z.ZodBoolean>;
643
647
  }, z.core.$strip>>;
644
648
  }, z.core.$strip>;
645
649
  then: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
650
+ id: z.ZodOptional<z.ZodUUID>;
651
+ enabled: z.ZodOptional<z.ZodBoolean>;
646
652
  type: z.ZodLiteral<"send">;
647
653
  to: z.ZodArray<z.ZodUUID>;
648
654
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
649
655
  title: z.ZodOptional<z.ZodString>;
650
656
  body: z.ZodOptional<z.ZodString>;
657
+ }, z.core.$strip>, z.ZodObject<{
651
658
  id: z.ZodOptional<z.ZodUUID>;
652
659
  enabled: z.ZodOptional<z.ZodBoolean>;
653
- }, z.core.$strip>, z.ZodObject<{
654
660
  type: z.ZodLiteral<"trust">;
655
661
  mode: z.ZodEnum<{
656
- set: "set";
657
662
  adjust: "adjust";
658
663
  reset: "reset";
664
+ set: "set";
659
665
  }>;
660
666
  amount: z.ZodOptional<z.ZodNumber>;
661
667
  value: z.ZodOptional<z.ZodNumber>;
662
668
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
669
+ }, z.core.$strip>, z.ZodObject<{
663
670
  id: z.ZodOptional<z.ZodUUID>;
664
671
  enabled: z.ZodOptional<z.ZodBoolean>;
665
- }, z.core.$strip>, z.ZodObject<{
666
672
  type: z.ZodLiteral<"kill_stream">;
667
673
  delay_seconds: z.ZodOptional<z.ZodNumber>;
668
674
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
669
675
  message: z.ZodOptional<z.ZodString>;
670
676
  target: z.ZodOptional<z.ZodEnum<{
671
- triggering: "triggering";
672
- oldest: "oldest";
673
- newest: "newest";
674
677
  all_except_one: "all_except_one";
675
678
  all_user: "all_user";
679
+ newest: "newest";
680
+ oldest: "oldest";
681
+ triggering: "triggering";
676
682
  }>>;
683
+ }, z.core.$strip>, z.ZodObject<{
677
684
  id: z.ZodOptional<z.ZodUUID>;
678
685
  enabled: z.ZodOptional<z.ZodBoolean>;
679
- }, z.core.$strip>, z.ZodObject<{
680
686
  type: z.ZodLiteral<"message_client">;
681
687
  message: z.ZodString;
682
688
  target: z.ZodOptional<z.ZodEnum<{
683
- triggering: "triggering";
684
- oldest: "oldest";
685
- newest: "newest";
686
689
  all_except_one: "all_except_one";
687
690
  all_user: "all_user";
691
+ newest: "newest";
692
+ oldest: "oldest";
693
+ triggering: "triggering";
688
694
  }>>;
689
- id: z.ZodOptional<z.ZodUUID>;
690
- enabled: z.ZodOptional<z.ZodBoolean>;
691
695
  }, z.core.$strip>], "type">>;
692
696
  else: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
697
+ id: z.ZodOptional<z.ZodUUID>;
698
+ enabled: z.ZodOptional<z.ZodBoolean>;
693
699
  type: z.ZodLiteral<"send">;
694
700
  to: z.ZodArray<z.ZodUUID>;
695
701
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
696
702
  title: z.ZodOptional<z.ZodString>;
697
703
  body: z.ZodOptional<z.ZodString>;
704
+ }, z.core.$strip>, z.ZodObject<{
698
705
  id: z.ZodOptional<z.ZodUUID>;
699
706
  enabled: z.ZodOptional<z.ZodBoolean>;
700
- }, z.core.$strip>, z.ZodObject<{
701
707
  type: z.ZodLiteral<"trust">;
702
708
  mode: z.ZodEnum<{
703
- set: "set";
704
709
  adjust: "adjust";
705
710
  reset: "reset";
711
+ set: "set";
706
712
  }>;
707
713
  amount: z.ZodOptional<z.ZodNumber>;
708
714
  value: z.ZodOptional<z.ZodNumber>;
709
715
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
716
+ }, z.core.$strip>, z.ZodObject<{
710
717
  id: z.ZodOptional<z.ZodUUID>;
711
718
  enabled: z.ZodOptional<z.ZodBoolean>;
712
- }, z.core.$strip>, z.ZodObject<{
713
719
  type: z.ZodLiteral<"kill_stream">;
714
720
  delay_seconds: z.ZodOptional<z.ZodNumber>;
715
721
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
716
722
  message: z.ZodOptional<z.ZodString>;
717
723
  target: z.ZodOptional<z.ZodEnum<{
718
- triggering: "triggering";
719
- oldest: "oldest";
720
- newest: "newest";
721
724
  all_except_one: "all_except_one";
722
725
  all_user: "all_user";
726
+ newest: "newest";
727
+ oldest: "oldest";
728
+ triggering: "triggering";
723
729
  }>>;
730
+ }, z.core.$strip>, z.ZodObject<{
724
731
  id: z.ZodOptional<z.ZodUUID>;
725
732
  enabled: z.ZodOptional<z.ZodBoolean>;
726
- }, z.core.$strip>, z.ZodObject<{
727
733
  type: z.ZodLiteral<"message_client">;
728
734
  message: z.ZodString;
729
735
  target: z.ZodOptional<z.ZodEnum<{
730
- triggering: "triggering";
731
- oldest: "oldest";
732
- newest: "newest";
733
736
  all_except_one: "all_except_one";
734
737
  all_user: "all_user";
738
+ newest: "newest";
739
+ oldest: "oldest";
740
+ triggering: "triggering";
735
741
  }>>;
736
- id: z.ZodOptional<z.ZodUUID>;
737
- enabled: z.ZodOptional<z.ZodBoolean>;
738
742
  }, z.core.$strip>], "type">>;
739
- id: z.ZodOptional<z.ZodUUID>;
740
- enabled: z.ZodOptional<z.ZodBoolean>;
741
743
  }, z.core.$strict>], "type">>;
742
744
  }, z.core.$strip>;
743
745
  serverId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -752,33 +754,36 @@ export declare const updateAutomationSchema: z.ZodObject<{
752
754
  name: z.ZodOptional<z.ZodString>;
753
755
  description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
754
756
  kind: z.ZodOptional<z.ZodEnum<{
755
- policy: "policy";
756
757
  notification: "notification";
758
+ policy: "policy";
757
759
  }>>;
758
760
  severity: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
761
+ high: "high";
759
762
  low: "low";
760
763
  warning: "warning";
761
- high: "high";
762
764
  }>>>;
763
765
  triggers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
766
+ id: z.ZodUUID;
767
+ enabled: z.ZodBoolean;
764
768
  type: z.ZodEnum<{
765
- "session.started": "session.started";
766
- "session.stopped": "session.stopped";
767
- "session.transcode_changed": "session.transcode_changed";
768
- "session.paused": "session.paused";
769
769
  "account.new_device": "account.new_device";
770
770
  "account.trust_changed": "account.trust_changed";
771
771
  "media.added": "media.added";
772
772
  "media.upgraded": "media.upgraded";
773
+ "plugin.update_available": "plugin.update_available";
773
774
  "server.down": "server.down";
774
775
  "server.up": "server.up";
775
- "plugin.update_available": "plugin.update_available";
776
776
  "server.update_available": "server.update_available";
777
+ "session.first_seen": "session.first_seen";
778
+ "session.paused": "session.paused";
779
+ "session.started": "session.started";
780
+ "session.stopped": "session.stopped";
781
+ "session.transcode_changed": "session.transcode_changed";
777
782
  "tracearr.update_available": "tracearr.update_available";
778
783
  }>;
784
+ }, z.core.$strict>, z.ZodObject<{
779
785
  id: z.ZodUUID;
780
786
  enabled: z.ZodBoolean;
781
- }, z.core.$strict>, z.ZodObject<{
782
787
  type: z.ZodLiteral<"session.held_for">;
783
788
  params: z.ZodObject<{
784
789
  minutes: z.ZodNumber;
@@ -787,69 +792,71 @@ export declare const updateAutomationSchema: z.ZodObject<{
787
792
  total: "total";
788
793
  }>;
789
794
  }, z.core.$strict>;
795
+ }, z.core.$strict>, z.ZodObject<{
790
796
  id: z.ZodUUID;
791
797
  enabled: z.ZodBoolean;
792
- }, z.core.$strict>, z.ZodObject<{
793
798
  type: z.ZodLiteral<"account.inactive_for">;
794
799
  params: z.ZodObject<{
795
800
  days: z.ZodNumber;
796
801
  }, z.core.$strict>;
797
- id: z.ZodUUID;
798
- enabled: z.ZodBoolean;
799
802
  }, z.core.$strict>], "type">>>;
800
803
  conditions: z.ZodOptional<z.ZodObject<{
801
804
  groups: z.ZodArray<z.ZodObject<{
805
+ id: z.ZodOptional<z.ZodUUID>;
806
+ enabled: z.ZodOptional<z.ZodBoolean>;
802
807
  match: z.ZodOptional<z.ZodEnum<{
803
- any: "any";
804
808
  all: "all";
809
+ any: "any";
805
810
  }>>;
806
811
  conditions: z.ZodArray<z.ZodObject<{
812
+ id: z.ZodOptional<z.ZodUUID>;
813
+ enabled: z.ZodOptional<z.ZodBoolean>;
807
814
  field: z.ZodUnion<readonly [z.ZodEnum<{
808
- concurrent_streams: "concurrent_streams";
809
815
  active_session_distance_km: "active_session_distance_km";
810
- travel_speed_kmh: "travel_speed_kmh";
811
- unique_ips_in_window: "unique_ips_in_window";
812
- unique_devices_in_window: "unique_devices_in_window";
813
- inactive_days: "inactive_days";
816
+ concurrent_streams: "concurrent_streams";
814
817
  current_pause_minutes: "current_pause_minutes";
818
+ inactive_days: "inactive_days";
815
819
  total_pause_minutes: "total_pause_minutes";
820
+ travel_speed_kmh: "travel_speed_kmh";
821
+ unique_devices_in_window: "unique_devices_in_window";
822
+ unique_ips_in_window: "unique_ips_in_window";
816
823
  }>, z.ZodEnum<{
817
- source_resolution: "source_resolution";
818
- output_resolution: "output_resolution";
819
- is_transcoding: "is_transcoding";
820
824
  is_transcode_downgrade: "is_transcode_downgrade";
825
+ is_transcoding: "is_transcoding";
826
+ output_resolution: "output_resolution";
821
827
  source_bitrate_mbps: "source_bitrate_mbps";
828
+ source_resolution: "source_resolution";
822
829
  }>, z.ZodEnum<{
823
- user_id: "user_id";
824
- trust_score: "trust_score";
825
830
  account_age_days: "account_age_days";
831
+ trust_score: "trust_score";
832
+ user_id: "user_id";
826
833
  }>, z.ZodEnum<{
827
- device_type: "device_type";
828
834
  client_name: "client_name";
835
+ device_type: "device_type";
829
836
  platform: "platform";
830
837
  }>, z.ZodEnum<{
831
- is_local_network: "is_local_network";
832
838
  country: "country";
833
839
  ip_in_range: "ip_in_range";
840
+ is_local_network: "is_local_network";
834
841
  }>, z.ZodEnum<{
835
- server_id: "server_id";
836
842
  media_type: "media_type";
843
+ server_id: "server_id";
837
844
  }>, z.ZodEnum<{
845
+ audio_channels_after: "audio_channels_after";
846
+ dynamic_range_after: "dynamic_range_after";
847
+ file_size_after: "file_size_after";
838
848
  library_item_type: "library_item_type";
839
849
  library_name: "library_name";
840
850
  resolution_after: "resolution_after";
841
- dynamic_range_after: "dynamic_range_after";
842
851
  video_codec_after: "video_codec_after";
843
- audio_channels_after: "audio_channels_after";
844
- file_size_after: "file_size_after";
845
852
  }>]>;
846
853
  operator: z.ZodUnion<readonly [z.ZodEnum<{
847
854
  eq: "eq";
848
- neq: "neq";
849
855
  gt: "gt";
850
856
  gte: "gte";
851
857
  lt: "lt";
852
858
  lte: "lte";
859
+ neq: "neq";
853
860
  }>, z.ZodEnum<{
854
861
  in: "in";
855
862
  not_in: "not_in";
@@ -863,123 +870,125 @@ export declare const updateAutomationSchema: z.ZodObject<{
863
870
  exclude_same_device: z.ZodOptional<z.ZodBoolean>;
864
871
  exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
865
872
  count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
866
- unknown: "unknown";
873
+ browser: "browser";
874
+ desktop: "desktop";
867
875
  mobile: "mobile";
868
876
  tablet: "tablet";
869
877
  tv: "tv";
870
- desktop: "desktop";
871
- browser: "browser";
878
+ unknown: "unknown";
872
879
  }>>>;
873
880
  }, z.core.$strip>>;
874
- id: z.ZodOptional<z.ZodUUID>;
875
- enabled: z.ZodOptional<z.ZodBoolean>;
876
881
  }, z.core.$strip>>;
877
- id: z.ZodOptional<z.ZodUUID>;
878
- enabled: z.ZodOptional<z.ZodBoolean>;
879
882
  }, z.core.$strip>>;
880
883
  }, z.core.$strip>>;
881
884
  actions: z.ZodOptional<z.ZodObject<{
882
885
  actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
886
+ id: z.ZodOptional<z.ZodUUID>;
887
+ enabled: z.ZodOptional<z.ZodBoolean>;
883
888
  type: z.ZodLiteral<"send">;
884
889
  to: z.ZodArray<z.ZodUUID>;
885
890
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
886
891
  title: z.ZodOptional<z.ZodString>;
887
892
  body: z.ZodOptional<z.ZodString>;
893
+ }, z.core.$strip>, z.ZodObject<{
888
894
  id: z.ZodOptional<z.ZodUUID>;
889
895
  enabled: z.ZodOptional<z.ZodBoolean>;
890
- }, z.core.$strip>, z.ZodObject<{
891
896
  type: z.ZodLiteral<"trust">;
892
897
  mode: z.ZodEnum<{
893
- set: "set";
894
898
  adjust: "adjust";
895
899
  reset: "reset";
900
+ set: "set";
896
901
  }>;
897
902
  amount: z.ZodOptional<z.ZodNumber>;
898
903
  value: z.ZodOptional<z.ZodNumber>;
899
904
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
905
+ }, z.core.$strip>, z.ZodObject<{
900
906
  id: z.ZodOptional<z.ZodUUID>;
901
907
  enabled: z.ZodOptional<z.ZodBoolean>;
902
- }, z.core.$strip>, z.ZodObject<{
903
908
  type: z.ZodLiteral<"kill_stream">;
904
909
  delay_seconds: z.ZodOptional<z.ZodNumber>;
905
910
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
906
911
  message: z.ZodOptional<z.ZodString>;
907
912
  target: z.ZodOptional<z.ZodEnum<{
908
- triggering: "triggering";
909
- oldest: "oldest";
910
- newest: "newest";
911
913
  all_except_one: "all_except_one";
912
914
  all_user: "all_user";
915
+ newest: "newest";
916
+ oldest: "oldest";
917
+ triggering: "triggering";
913
918
  }>>;
919
+ }, z.core.$strip>, z.ZodObject<{
914
920
  id: z.ZodOptional<z.ZodUUID>;
915
921
  enabled: z.ZodOptional<z.ZodBoolean>;
916
- }, z.core.$strip>, z.ZodObject<{
917
922
  type: z.ZodLiteral<"message_client">;
918
923
  message: z.ZodString;
919
924
  target: z.ZodOptional<z.ZodEnum<{
920
- triggering: "triggering";
921
- oldest: "oldest";
922
- newest: "newest";
923
925
  all_except_one: "all_except_one";
924
926
  all_user: "all_user";
927
+ newest: "newest";
928
+ oldest: "oldest";
929
+ triggering: "triggering";
925
930
  }>>;
931
+ }, z.core.$strip>, z.ZodObject<{
926
932
  id: z.ZodOptional<z.ZodUUID>;
927
933
  enabled: z.ZodOptional<z.ZodBoolean>;
928
- }, z.core.$strip>, z.ZodObject<{
929
934
  type: z.ZodLiteral<"if">;
930
935
  conditions: z.ZodObject<{
931
936
  groups: z.ZodArray<z.ZodObject<{
937
+ id: z.ZodOptional<z.ZodUUID>;
938
+ enabled: z.ZodOptional<z.ZodBoolean>;
932
939
  match: z.ZodOptional<z.ZodEnum<{
933
- any: "any";
934
940
  all: "all";
941
+ any: "any";
935
942
  }>>;
936
943
  conditions: z.ZodArray<z.ZodObject<{
944
+ id: z.ZodOptional<z.ZodUUID>;
945
+ enabled: z.ZodOptional<z.ZodBoolean>;
937
946
  field: z.ZodUnion<readonly [z.ZodEnum<{
938
- concurrent_streams: "concurrent_streams";
939
947
  active_session_distance_km: "active_session_distance_km";
940
- travel_speed_kmh: "travel_speed_kmh";
941
- unique_ips_in_window: "unique_ips_in_window";
942
- unique_devices_in_window: "unique_devices_in_window";
943
- inactive_days: "inactive_days";
948
+ concurrent_streams: "concurrent_streams";
944
949
  current_pause_minutes: "current_pause_minutes";
950
+ inactive_days: "inactive_days";
945
951
  total_pause_minutes: "total_pause_minutes";
952
+ travel_speed_kmh: "travel_speed_kmh";
953
+ unique_devices_in_window: "unique_devices_in_window";
954
+ unique_ips_in_window: "unique_ips_in_window";
946
955
  }>, z.ZodEnum<{
947
- source_resolution: "source_resolution";
948
- output_resolution: "output_resolution";
949
- is_transcoding: "is_transcoding";
950
956
  is_transcode_downgrade: "is_transcode_downgrade";
957
+ is_transcoding: "is_transcoding";
958
+ output_resolution: "output_resolution";
951
959
  source_bitrate_mbps: "source_bitrate_mbps";
960
+ source_resolution: "source_resolution";
952
961
  }>, z.ZodEnum<{
953
- user_id: "user_id";
954
- trust_score: "trust_score";
955
962
  account_age_days: "account_age_days";
963
+ trust_score: "trust_score";
964
+ user_id: "user_id";
956
965
  }>, z.ZodEnum<{
957
- device_type: "device_type";
958
966
  client_name: "client_name";
967
+ device_type: "device_type";
959
968
  platform: "platform";
960
969
  }>, z.ZodEnum<{
961
- is_local_network: "is_local_network";
962
970
  country: "country";
963
971
  ip_in_range: "ip_in_range";
972
+ is_local_network: "is_local_network";
964
973
  }>, z.ZodEnum<{
965
- server_id: "server_id";
966
974
  media_type: "media_type";
975
+ server_id: "server_id";
967
976
  }>, z.ZodEnum<{
977
+ audio_channels_after: "audio_channels_after";
978
+ dynamic_range_after: "dynamic_range_after";
979
+ file_size_after: "file_size_after";
968
980
  library_item_type: "library_item_type";
969
981
  library_name: "library_name";
970
982
  resolution_after: "resolution_after";
971
- dynamic_range_after: "dynamic_range_after";
972
983
  video_codec_after: "video_codec_after";
973
- audio_channels_after: "audio_channels_after";
974
- file_size_after: "file_size_after";
975
984
  }>]>;
976
985
  operator: z.ZodUnion<readonly [z.ZodEnum<{
977
986
  eq: "eq";
978
- neq: "neq";
979
987
  gt: "gt";
980
988
  gte: "gte";
981
989
  lt: "lt";
982
990
  lte: "lte";
991
+ neq: "neq";
983
992
  }>, z.ZodEnum<{
984
993
  in: "in";
985
994
  not_in: "not_in";
@@ -993,117 +1002,111 @@ export declare const updateAutomationSchema: z.ZodObject<{
993
1002
  exclude_same_device: z.ZodOptional<z.ZodBoolean>;
994
1003
  exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
995
1004
  count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
996
- unknown: "unknown";
1005
+ browser: "browser";
1006
+ desktop: "desktop";
997
1007
  mobile: "mobile";
998
1008
  tablet: "tablet";
999
1009
  tv: "tv";
1000
- desktop: "desktop";
1001
- browser: "browser";
1010
+ unknown: "unknown";
1002
1011
  }>>>;
1003
1012
  }, z.core.$strip>>;
1004
- id: z.ZodOptional<z.ZodUUID>;
1005
- enabled: z.ZodOptional<z.ZodBoolean>;
1006
1013
  }, z.core.$strip>>;
1007
- id: z.ZodOptional<z.ZodUUID>;
1008
- enabled: z.ZodOptional<z.ZodBoolean>;
1009
1014
  }, z.core.$strip>>;
1010
1015
  }, z.core.$strip>;
1011
1016
  then: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1017
+ id: z.ZodOptional<z.ZodUUID>;
1018
+ enabled: z.ZodOptional<z.ZodBoolean>;
1012
1019
  type: z.ZodLiteral<"send">;
1013
1020
  to: z.ZodArray<z.ZodUUID>;
1014
1021
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
1015
1022
  title: z.ZodOptional<z.ZodString>;
1016
1023
  body: z.ZodOptional<z.ZodString>;
1024
+ }, z.core.$strip>, z.ZodObject<{
1017
1025
  id: z.ZodOptional<z.ZodUUID>;
1018
1026
  enabled: z.ZodOptional<z.ZodBoolean>;
1019
- }, z.core.$strip>, z.ZodObject<{
1020
1027
  type: z.ZodLiteral<"trust">;
1021
1028
  mode: z.ZodEnum<{
1022
- set: "set";
1023
1029
  adjust: "adjust";
1024
1030
  reset: "reset";
1031
+ set: "set";
1025
1032
  }>;
1026
1033
  amount: z.ZodOptional<z.ZodNumber>;
1027
1034
  value: z.ZodOptional<z.ZodNumber>;
1028
1035
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
1036
+ }, z.core.$strip>, z.ZodObject<{
1029
1037
  id: z.ZodOptional<z.ZodUUID>;
1030
1038
  enabled: z.ZodOptional<z.ZodBoolean>;
1031
- }, z.core.$strip>, z.ZodObject<{
1032
1039
  type: z.ZodLiteral<"kill_stream">;
1033
1040
  delay_seconds: z.ZodOptional<z.ZodNumber>;
1034
1041
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
1035
1042
  message: z.ZodOptional<z.ZodString>;
1036
1043
  target: z.ZodOptional<z.ZodEnum<{
1037
- triggering: "triggering";
1038
- oldest: "oldest";
1039
- newest: "newest";
1040
1044
  all_except_one: "all_except_one";
1041
1045
  all_user: "all_user";
1046
+ newest: "newest";
1047
+ oldest: "oldest";
1048
+ triggering: "triggering";
1042
1049
  }>>;
1050
+ }, z.core.$strip>, z.ZodObject<{
1043
1051
  id: z.ZodOptional<z.ZodUUID>;
1044
1052
  enabled: z.ZodOptional<z.ZodBoolean>;
1045
- }, z.core.$strip>, z.ZodObject<{
1046
1053
  type: z.ZodLiteral<"message_client">;
1047
1054
  message: z.ZodString;
1048
1055
  target: z.ZodOptional<z.ZodEnum<{
1049
- triggering: "triggering";
1050
- oldest: "oldest";
1051
- newest: "newest";
1052
1056
  all_except_one: "all_except_one";
1053
1057
  all_user: "all_user";
1058
+ newest: "newest";
1059
+ oldest: "oldest";
1060
+ triggering: "triggering";
1054
1061
  }>>;
1055
- id: z.ZodOptional<z.ZodUUID>;
1056
- enabled: z.ZodOptional<z.ZodBoolean>;
1057
1062
  }, z.core.$strip>], "type">>;
1058
1063
  else: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1064
+ id: z.ZodOptional<z.ZodUUID>;
1065
+ enabled: z.ZodOptional<z.ZodBoolean>;
1059
1066
  type: z.ZodLiteral<"send">;
1060
1067
  to: z.ZodArray<z.ZodUUID>;
1061
1068
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
1062
1069
  title: z.ZodOptional<z.ZodString>;
1063
1070
  body: z.ZodOptional<z.ZodString>;
1071
+ }, z.core.$strip>, z.ZodObject<{
1064
1072
  id: z.ZodOptional<z.ZodUUID>;
1065
1073
  enabled: z.ZodOptional<z.ZodBoolean>;
1066
- }, z.core.$strip>, z.ZodObject<{
1067
1074
  type: z.ZodLiteral<"trust">;
1068
1075
  mode: z.ZodEnum<{
1069
- set: "set";
1070
1076
  adjust: "adjust";
1071
1077
  reset: "reset";
1078
+ set: "set";
1072
1079
  }>;
1073
1080
  amount: z.ZodOptional<z.ZodNumber>;
1074
1081
  value: z.ZodOptional<z.ZodNumber>;
1075
1082
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
1083
+ }, z.core.$strip>, z.ZodObject<{
1076
1084
  id: z.ZodOptional<z.ZodUUID>;
1077
1085
  enabled: z.ZodOptional<z.ZodBoolean>;
1078
- }, z.core.$strip>, z.ZodObject<{
1079
1086
  type: z.ZodLiteral<"kill_stream">;
1080
1087
  delay_seconds: z.ZodOptional<z.ZodNumber>;
1081
1088
  cooldown_minutes: z.ZodOptional<z.ZodNumber>;
1082
1089
  message: z.ZodOptional<z.ZodString>;
1083
1090
  target: z.ZodOptional<z.ZodEnum<{
1084
- triggering: "triggering";
1085
- oldest: "oldest";
1086
- newest: "newest";
1087
1091
  all_except_one: "all_except_one";
1088
1092
  all_user: "all_user";
1093
+ newest: "newest";
1094
+ oldest: "oldest";
1095
+ triggering: "triggering";
1089
1096
  }>>;
1097
+ }, z.core.$strip>, z.ZodObject<{
1090
1098
  id: z.ZodOptional<z.ZodUUID>;
1091
1099
  enabled: z.ZodOptional<z.ZodBoolean>;
1092
- }, z.core.$strip>, z.ZodObject<{
1093
1100
  type: z.ZodLiteral<"message_client">;
1094
1101
  message: z.ZodString;
1095
1102
  target: z.ZodOptional<z.ZodEnum<{
1096
- triggering: "triggering";
1097
- oldest: "oldest";
1098
- newest: "newest";
1099
1103
  all_except_one: "all_except_one";
1100
1104
  all_user: "all_user";
1105
+ newest: "newest";
1106
+ oldest: "oldest";
1107
+ triggering: "triggering";
1101
1108
  }>>;
1102
- id: z.ZodOptional<z.ZodUUID>;
1103
- enabled: z.ZodOptional<z.ZodBoolean>;
1104
1109
  }, z.core.$strip>], "type">>;
1105
- id: z.ZodOptional<z.ZodUUID>;
1106
- enabled: z.ZodOptional<z.ZodBoolean>;
1107
1110
  }, z.core.$strict>], "type">>;
1108
1111
  }, z.core.$strip>>;
1109
1112
  serverId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
@@ -1116,18 +1119,29 @@ export declare const updateAutomationSchema: z.ZodObject<{
1116
1119
  }, z.core.$strict>;
1117
1120
  export type CreateAutomationInput = z.infer<typeof createAutomationSchema>;
1118
1121
  export type UpdateAutomationInput = z.infer<typeof updateAutomationSchema>;
1119
- export declare const AUTOMATION_SORT_FIELDS: readonly ["name", "createdAt", "updatedAt", "kind", "isActive"];
1122
+ export declare const AUTOMATION_SORT_FIELDS: readonly ['name', 'createdAt', 'updatedAt', 'kind', 'isActive'];
1120
1123
  export type AutomationSortField = (typeof AUTOMATION_SORT_FIELDS)[number];
1121
1124
  /** The three ways a template arrives; a row no template wrote is the fourth answer. */
1122
- declare const TEMPLATE_SOURCES: readonly ["builtin", "import", "local"];
1125
+ declare const TEMPLATE_SOURCES: readonly ['builtin', 'import', 'local'];
1123
1126
  export declare const AUTOMATION_SOURCES: readonly ["builtin", "import", "local", "own"];
1124
1127
  export type AutomationSource = (typeof AUTOMATION_SOURCES)[number];
1125
1128
  export declare const automationListQuerySchema: z.ZodObject<{
1129
+ orderBy: z.ZodDefault<z.ZodEnum<{
1130
+ createdAt: "createdAt";
1131
+ isActive: "isActive";
1132
+ kind: "kind";
1133
+ name: "name";
1134
+ updatedAt: "updatedAt";
1135
+ }>>;
1136
+ orderDir: z.ZodOptional<z.ZodEnum<{
1137
+ asc: "asc";
1138
+ desc: "desc";
1139
+ }>>;
1126
1140
  page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1127
1141
  pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1128
1142
  kind: z.ZodOptional<z.ZodEnum<{
1129
- policy: "policy";
1130
1143
  notification: "notification";
1144
+ policy: "policy";
1131
1145
  }>>;
1132
1146
  enabled: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>, z.ZodTransform<boolean, string | boolean>>>;
1133
1147
  search: z.ZodOptional<z.ZodString>;
@@ -1139,41 +1153,30 @@ export declare const automationListQuerySchema: z.ZodObject<{
1139
1153
  }>>;
1140
1154
  serverId: z.ZodOptional<z.ZodUUID>;
1141
1155
  trigger: z.ZodOptional<z.ZodEnum<{
1142
- sessions: "sessions";
1143
1156
  accounts: "accounts";
1144
1157
  library: "library";
1145
1158
  servers: "servers";
1159
+ sessions: "sessions";
1146
1160
  updates: "updates";
1147
1161
  }>>;
1148
1162
  severity: z.ZodOptional<z.ZodEnum<{
1163
+ high: "high";
1149
1164
  low: "low";
1150
1165
  warning: "warning";
1151
- high: "high";
1152
- }>>;
1153
- orderBy: z.ZodDefault<z.ZodEnum<{
1154
- name: "name";
1155
- isActive: "isActive";
1156
- createdAt: "createdAt";
1157
- kind: "kind";
1158
- updatedAt: "updatedAt";
1159
- }>>;
1160
- orderDir: z.ZodOptional<z.ZodEnum<{
1161
- asc: "asc";
1162
- desc: "desc";
1163
1166
  }>>;
1164
1167
  }, z.core.$strip>;
1165
1168
  export type AutomationListQuery = z.infer<typeof automationListQuerySchema>;
1166
- export declare const RUN_SORT_FIELDS: readonly ["startedAt", "finishedAt", "outcome"];
1169
+ export declare const RUN_SORT_FIELDS: readonly ['startedAt', 'finishedAt', 'outcome'];
1167
1170
  export type RunSortField = (typeof RUN_SORT_FIELDS)[number];
1168
1171
  /** What a page of runs and a count of them filter on, so neither can drift. */
1169
1172
  export declare const runCountsQuerySchema: z.ZodObject<{
1170
1173
  kind: z.ZodOptional<z.ZodEnum<{
1171
- policy: "policy";
1172
1174
  notification: "notification";
1175
+ policy: "policy";
1173
1176
  }>>;
1174
1177
  outcome: z.ZodOptional<z.ZodEnum<{
1175
- error: "error";
1176
1178
  completed: "completed";
1179
+ error: "error";
1177
1180
  stopped_by_condition: "stopped_by_condition";
1178
1181
  }>>;
1179
1182
  automationId: z.ZodOptional<z.ZodUUID>;
@@ -1181,29 +1184,29 @@ export declare const runCountsQuerySchema: z.ZodObject<{
1181
1184
  endDate: z.ZodOptional<z.ZodISODate>;
1182
1185
  }, z.core.$strip>;
1183
1186
  export declare const runListQuerySchema: z.ZodObject<{
1187
+ orderBy: z.ZodDefault<z.ZodEnum<{
1188
+ finishedAt: "finishedAt";
1189
+ outcome: "outcome";
1190
+ startedAt: "startedAt";
1191
+ }>>;
1192
+ orderDir: z.ZodOptional<z.ZodEnum<{
1193
+ asc: "asc";
1194
+ desc: "desc";
1195
+ }>>;
1184
1196
  page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1185
1197
  pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1186
1198
  kind: z.ZodOptional<z.ZodEnum<{
1187
- policy: "policy";
1188
1199
  notification: "notification";
1200
+ policy: "policy";
1189
1201
  }>>;
1190
1202
  outcome: z.ZodOptional<z.ZodEnum<{
1191
- error: "error";
1192
1203
  completed: "completed";
1204
+ error: "error";
1193
1205
  stopped_by_condition: "stopped_by_condition";
1194
1206
  }>>;
1195
1207
  automationId: z.ZodOptional<z.ZodUUID>;
1196
1208
  startDate: z.ZodOptional<z.ZodISODate>;
1197
1209
  endDate: z.ZodOptional<z.ZodISODate>;
1198
- orderBy: z.ZodDefault<z.ZodEnum<{
1199
- startedAt: "startedAt";
1200
- finishedAt: "finishedAt";
1201
- outcome: "outcome";
1202
- }>>;
1203
- orderDir: z.ZodOptional<z.ZodEnum<{
1204
- asc: "asc";
1205
- desc: "desc";
1206
- }>>;
1207
1210
  }, z.core.$strip>;
1208
1211
  export type RunListQuery = z.infer<typeof runListQuerySchema>;
1209
1212
  /** How many runs each outcome holds, plus the newest run that did something. */
@@ -1211,7 +1214,7 @@ export type RunCounts = Record<RunOutcome, number> & {
1211
1214
  total: number;
1212
1215
  lastRunAt: string | null;
1213
1216
  };
1214
- export declare const NEAR_MISS_REASONS: readonly ["cooldown_active", "edge_replayed", "gate_blocked", "trigger_filter_failed"];
1217
+ export declare const NEAR_MISS_REASONS: readonly ['cooldown_active', 'edge_replayed', 'gate_blocked', 'trigger_filter_failed'];
1215
1218
  export type NearMissReason = (typeof NEAR_MISS_REASONS)[number];
1216
1219
  /** One entry of the capped ring: a trigger matched but the pipeline recorded no run. */
1217
1220
  export declare const nearMissEntrySchema: z.ZodObject<{