@tracearr/shared 2.2.0-beta.2 → 2.2.0-beta.3

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 (84) hide show
  1. package/dist/automations/__tests__/actions.test.d.ts +2 -0
  2. package/dist/automations/__tests__/actions.test.d.ts.map +1 -0
  3. package/dist/automations/__tests__/actions.test.js +68 -0
  4. package/dist/automations/__tests__/actions.test.js.map +1 -0
  5. package/dist/automations/__tests__/conditions.test.d.ts +2 -0
  6. package/dist/automations/__tests__/conditions.test.d.ts.map +1 -0
  7. package/dist/automations/__tests__/conditions.test.js +55 -0
  8. package/dist/automations/__tests__/conditions.test.js.map +1 -0
  9. package/dist/automations/__tests__/definition.test.d.ts +2 -0
  10. package/dist/automations/__tests__/definition.test.d.ts.map +1 -0
  11. package/dist/automations/__tests__/definition.test.js +376 -0
  12. package/dist/automations/__tests__/definition.test.js.map +1 -0
  13. package/dist/automations/__tests__/share.test.d.ts +2 -0
  14. package/dist/automations/__tests__/share.test.d.ts.map +1 -0
  15. package/dist/automations/__tests__/share.test.js +98 -0
  16. package/dist/automations/__tests__/share.test.js.map +1 -0
  17. package/dist/automations/__tests__/templates.test.d.ts +2 -0
  18. package/dist/automations/__tests__/templates.test.d.ts.map +1 -0
  19. package/dist/automations/__tests__/templates.test.js +278 -0
  20. package/dist/automations/__tests__/templates.test.js.map +1 -0
  21. package/dist/automations/__tests__/triggers.test.d.ts +2 -0
  22. package/dist/automations/__tests__/triggers.test.d.ts.map +1 -0
  23. package/dist/automations/__tests__/triggers.test.js +42 -0
  24. package/dist/automations/__tests__/triggers.test.js.map +1 -0
  25. package/dist/automations/actions.d.ts +783 -0
  26. package/dist/automations/actions.d.ts.map +1 -0
  27. package/dist/automations/actions.js +97 -0
  28. package/dist/automations/actions.js.map +1 -0
  29. package/dist/automations/conditions.d.ts +459 -0
  30. package/dist/automations/conditions.d.ts.map +1 -0
  31. package/dist/automations/conditions.js +460 -0
  32. package/dist/automations/conditions.js.map +1 -0
  33. package/dist/automations/definition.d.ts +1389 -0
  34. package/dist/automations/definition.d.ts.map +1 -0
  35. package/dist/automations/definition.js +215 -0
  36. package/dist/automations/definition.js.map +1 -0
  37. package/dist/automations/dryRun.d.ts +413 -0
  38. package/dist/automations/dryRun.d.ts.map +1 -0
  39. package/dist/automations/dryRun.js +9 -0
  40. package/dist/automations/dryRun.js.map +1 -0
  41. package/dist/automations/index.d.ts +8 -0
  42. package/dist/automations/index.d.ts.map +1 -0
  43. package/dist/automations/index.js +8 -0
  44. package/dist/automations/index.js.map +1 -0
  45. package/dist/automations/share.d.ts +27 -0
  46. package/dist/automations/share.d.ts.map +1 -0
  47. package/dist/automations/share.js +119 -0
  48. package/dist/automations/share.js.map +1 -0
  49. package/dist/automations/templates.d.ts +1304 -0
  50. package/dist/automations/templates.d.ts.map +1 -0
  51. package/dist/automations/templates.js +525 -0
  52. package/dist/automations/templates.js.map +1 -0
  53. package/dist/automations/triggers.d.ts +141 -0
  54. package/dist/automations/triggers.d.ts.map +1 -0
  55. package/dist/automations/triggers.js +172 -0
  56. package/dist/automations/triggers.js.map +1 -0
  57. package/dist/constants.d.ts +22 -40
  58. package/dist/constants.d.ts.map +1 -1
  59. package/dist/constants.js +25 -56
  60. package/dist/constants.js.map +1 -1
  61. package/dist/destinations.d.ts +21 -22
  62. package/dist/destinations.d.ts.map +1 -1
  63. package/dist/destinations.js +13 -2
  64. package/dist/destinations.js.map +1 -1
  65. package/dist/index.d.ts +10 -5
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +15 -9
  68. package/dist/index.js.map +1 -1
  69. package/dist/listQuery.d.ts +41 -0
  70. package/dist/listQuery.d.ts.map +1 -0
  71. package/dist/listQuery.js +33 -0
  72. package/dist/listQuery.js.map +1 -0
  73. package/dist/schemas.d.ts +152 -832
  74. package/dist/schemas.d.ts.map +1 -1
  75. package/dist/schemas.js +90 -287
  76. package/dist/schemas.js.map +1 -1
  77. package/dist/types.d.ts +51 -137
  78. package/dist/types.d.ts.map +1 -1
  79. package/dist/types.js.map +1 -1
  80. package/dist/violations.d.ts +2 -1
  81. package/dist/violations.d.ts.map +1 -1
  82. package/dist/violations.js +7 -0
  83. package/dist/violations.js.map +1 -1
  84. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/automations/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB;;;;;;;;iBAO3B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;iBAyB1B,CAAC;AAEL,eAAO,MAAM,mBAAmB;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;iBASjC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;iBAKpC,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAK3B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAMzB,CAAC;AAGH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAC;AACtD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,97 @@
1
+ import { z } from 'zod';
2
+ import { nodeFieldsShape, automationConditionsSchema } from './conditions.js';
3
+ import {} from './triggers.js';
4
+ export const sendActionSchema = z.object({
5
+ ...nodeFieldsShape,
6
+ type: z.literal('send'),
7
+ to: z.array(z.uuid()).min(1),
8
+ cooldown_minutes: z.number().int().nonnegative().optional(),
9
+ title: z.string().min(1).max(200).optional(),
10
+ body: z.string().min(1).max(2000).optional(),
11
+ });
12
+ export const trustActionSchema = z
13
+ .object({
14
+ ...nodeFieldsShape,
15
+ type: z.literal('trust'),
16
+ mode: z.enum(['adjust', 'set', 'reset']),
17
+ amount: z.number().int().min(-100).max(100).optional(),
18
+ value: z.number().int().min(0).max(100).optional(),
19
+ cooldown_minutes: z.number().int().nonnegative().optional(),
20
+ })
21
+ .superRefine((action, ctx) => {
22
+ if (action.mode === 'adjust' && action.amount === undefined) {
23
+ ctx.addIssue({ code: 'custom', message: 'adjust needs an amount' });
24
+ }
25
+ if (action.mode === 'set' && action.value === undefined) {
26
+ ctx.addIssue({ code: 'custom', message: 'set needs a value' });
27
+ }
28
+ if (action.mode === 'adjust' && action.value !== undefined) {
29
+ ctx.addIssue({ code: 'custom', message: 'adjust takes an amount, not a value' });
30
+ }
31
+ if (action.mode === 'set' && action.amount !== undefined) {
32
+ ctx.addIssue({ code: 'custom', message: 'set takes a value, not an amount' });
33
+ }
34
+ if (action.mode === 'reset' && (action.amount !== undefined || action.value !== undefined)) {
35
+ ctx.addIssue({ code: 'custom', message: 'reset takes no parameter' });
36
+ }
37
+ });
38
+ export const sessionTargetSchema = z.enum([
39
+ 'triggering',
40
+ 'oldest',
41
+ 'newest',
42
+ 'all_except_one',
43
+ 'all_user',
44
+ ]);
45
+ export const killStreamActionSchema = z.object({
46
+ ...nodeFieldsShape,
47
+ type: z.literal('kill_stream'),
48
+ /** Seconds to wait before killing. The kill only fires if the rule condition still holds after the wait; 0 (default) still re-checks once before killing. */
49
+ delay_seconds: z.number().int().min(0).max(300).optional(),
50
+ cooldown_minutes: z.number().int().nonnegative().optional(),
51
+ /** Message to display to user before termination. If omitted, terminates silently. */
52
+ message: z.string().min(1).max(500).optional(),
53
+ target: sessionTargetSchema.optional(),
54
+ });
55
+ export const messageClientActionSchema = z.object({
56
+ ...nodeFieldsShape,
57
+ type: z.literal('message_client'),
58
+ message: z.string().min(1).max(500),
59
+ target: sessionTargetSchema.optional(),
60
+ });
61
+ /** Everything an `if` branch may hold: the effects, with no further branching. */
62
+ export const leafActionSchema = z.discriminatedUnion('type', [
63
+ sendActionSchema,
64
+ trustActionSchema,
65
+ killStreamActionSchema,
66
+ messageClientActionSchema,
67
+ ]);
68
+ export const ifActionSchema = z.strictObject({
69
+ ...nodeFieldsShape,
70
+ type: z.literal('if'),
71
+ conditions: automationConditionsSchema,
72
+ then: z.array(leafActionSchema),
73
+ else: z.array(leafActionSchema),
74
+ });
75
+ // Union of all actions
76
+ export const actionSchema = z.discriminatedUnion('type', [
77
+ sendActionSchema,
78
+ trustActionSchema,
79
+ killStreamActionSchema,
80
+ messageClientActionSchema,
81
+ ifActionSchema,
82
+ ]);
83
+ // Rule actions container (actions are optional side-effects; violations are always auto-created)
84
+ export const automationActionsSchema = z.object({
85
+ actions: z.array(actionSchema),
86
+ });
87
+ export const LEAF_ACTION_TYPES = ['send', 'trust', 'kill_stream', 'message_client'];
88
+ export const ACTION_TYPES = [...LEAF_ACTION_TYPES, 'if'];
89
+ export const actionTypeSchema = z.enum(ACTION_TYPES);
90
+ export const ACTIONS = {
91
+ send: { group: 'notify', requires: 'install' },
92
+ trust: { group: 'policy', requires: 'account' },
93
+ kill_stream: { group: 'policy', requires: 'session' },
94
+ message_client: { group: 'policy', requires: 'session' },
95
+ if: { group: 'control', requires: 'install' },
96
+ };
97
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/automations/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAuB,MAAM,eAAe,CAAC;AAEpD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,GAAG,eAAe;IAClB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;IACvB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC3D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,GAAG,eAAe;IAClB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG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EAAE,SAAS,EAAE;IAC/C,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE;IACrD,cAAc,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE;IACxD,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE;CAI9C,CAAC"}
@@ -0,0 +1,459 @@
1
+ import { z } from 'zod';
2
+ import { type TriggerContext } from './triggers.js';
3
+ export declare const comparisonOperatorSchema: z.ZodEnum<{
4
+ eq: "eq";
5
+ neq: "neq";
6
+ gt: "gt";
7
+ gte: "gte";
8
+ lt: "lt";
9
+ lte: "lte";
10
+ }>;
11
+ export declare const arrayOperatorSchema: z.ZodEnum<{
12
+ in: "in";
13
+ not_in: "not_in";
14
+ }>;
15
+ export declare const stringOperatorSchema: z.ZodEnum<{
16
+ contains: "contains";
17
+ not_contains: "not_contains";
18
+ }>;
19
+ export declare const operatorSchema: z.ZodUnion<readonly [z.ZodEnum<{
20
+ eq: "eq";
21
+ neq: "neq";
22
+ gt: "gt";
23
+ gte: "gte";
24
+ lt: "lt";
25
+ lte: "lte";
26
+ }>, z.ZodEnum<{
27
+ in: "in";
28
+ not_in: "not_in";
29
+ }>, z.ZodEnum<{
30
+ contains: "contains";
31
+ not_contains: "not_contains";
32
+ }>]>;
33
+ export declare const sessionBehaviorFieldSchema: z.ZodEnum<{
34
+ concurrent_streams: "concurrent_streams";
35
+ active_session_distance_km: "active_session_distance_km";
36
+ travel_speed_kmh: "travel_speed_kmh";
37
+ unique_ips_in_window: "unique_ips_in_window";
38
+ unique_devices_in_window: "unique_devices_in_window";
39
+ inactive_days: "inactive_days";
40
+ current_pause_minutes: "current_pause_minutes";
41
+ total_pause_minutes: "total_pause_minutes";
42
+ }>;
43
+ export declare const streamQualityFieldSchema: z.ZodEnum<{
44
+ source_resolution: "source_resolution";
45
+ output_resolution: "output_resolution";
46
+ is_transcoding: "is_transcoding";
47
+ is_transcode_downgrade: "is_transcode_downgrade";
48
+ source_bitrate_mbps: "source_bitrate_mbps";
49
+ }>;
50
+ export declare const transcodingConditionValueSchema: z.ZodEnum<{
51
+ video: "video";
52
+ audio: "audio";
53
+ video_or_audio: "video_or_audio";
54
+ neither: "neither";
55
+ }>;
56
+ export declare const userAttributeFieldSchema: z.ZodEnum<{
57
+ user_id: "user_id";
58
+ trust_score: "trust_score";
59
+ account_age_days: "account_age_days";
60
+ }>;
61
+ export declare const deviceClientFieldSchema: z.ZodEnum<{
62
+ device_type: "device_type";
63
+ client_name: "client_name";
64
+ platform: "platform";
65
+ }>;
66
+ export declare const networkLocationFieldSchema: z.ZodEnum<{
67
+ is_local_network: "is_local_network";
68
+ country: "country";
69
+ ip_in_range: "ip_in_range";
70
+ }>;
71
+ export declare const scopeFieldSchema: z.ZodEnum<{
72
+ server_id: "server_id";
73
+ media_type: "media_type";
74
+ }>;
75
+ /** The `_after` fields read the value a library item ends the sync with. */
76
+ export declare const mediaFieldSchema: z.ZodEnum<{
77
+ library_item_type: "library_item_type";
78
+ library_name: "library_name";
79
+ resolution_after: "resolution_after";
80
+ dynamic_range_after: "dynamic_range_after";
81
+ video_codec_after: "video_codec_after";
82
+ audio_channels_after: "audio_channels_after";
83
+ file_size_after: "file_size_after";
84
+ }>;
85
+ export declare const conditionFieldSchema: z.ZodUnion<readonly [z.ZodEnum<{
86
+ concurrent_streams: "concurrent_streams";
87
+ active_session_distance_km: "active_session_distance_km";
88
+ travel_speed_kmh: "travel_speed_kmh";
89
+ unique_ips_in_window: "unique_ips_in_window";
90
+ unique_devices_in_window: "unique_devices_in_window";
91
+ inactive_days: "inactive_days";
92
+ current_pause_minutes: "current_pause_minutes";
93
+ total_pause_minutes: "total_pause_minutes";
94
+ }>, z.ZodEnum<{
95
+ source_resolution: "source_resolution";
96
+ output_resolution: "output_resolution";
97
+ is_transcoding: "is_transcoding";
98
+ is_transcode_downgrade: "is_transcode_downgrade";
99
+ source_bitrate_mbps: "source_bitrate_mbps";
100
+ }>, z.ZodEnum<{
101
+ user_id: "user_id";
102
+ trust_score: "trust_score";
103
+ account_age_days: "account_age_days";
104
+ }>, z.ZodEnum<{
105
+ device_type: "device_type";
106
+ client_name: "client_name";
107
+ platform: "platform";
108
+ }>, z.ZodEnum<{
109
+ is_local_network: "is_local_network";
110
+ country: "country";
111
+ ip_in_range: "ip_in_range";
112
+ }>, z.ZodEnum<{
113
+ server_id: "server_id";
114
+ media_type: "media_type";
115
+ }>, z.ZodEnum<{
116
+ library_item_type: "library_item_type";
117
+ library_name: "library_name";
118
+ resolution_after: "resolution_after";
119
+ dynamic_range_after: "dynamic_range_after";
120
+ video_codec_after: "video_codec_after";
121
+ audio_channels_after: "audio_channels_after";
122
+ file_size_after: "file_size_after";
123
+ }>]>;
124
+ export declare const videoResolutionSchema: z.ZodEnum<{
125
+ "4K": "4K";
126
+ "1080p": "1080p";
127
+ "720p": "720p";
128
+ "480p": "480p";
129
+ SD: "SD";
130
+ unknown: "unknown";
131
+ }>;
132
+ export declare const deviceTypeSchema: z.ZodEnum<{
133
+ unknown: "unknown";
134
+ mobile: "mobile";
135
+ tablet: "tablet";
136
+ tv: "tv";
137
+ desktop: "desktop";
138
+ browser: "browser";
139
+ }>;
140
+ export declare const platformSchema: z.ZodEnum<{
141
+ unknown: "unknown";
142
+ ios: "ios";
143
+ android: "android";
144
+ windows: "windows";
145
+ macos: "macos";
146
+ linux: "linux";
147
+ tvos: "tvos";
148
+ androidtv: "androidtv";
149
+ roku: "roku";
150
+ webos: "webos";
151
+ tizen: "tizen";
152
+ }>;
153
+ export declare const mediaTypeEnumSchema: z.ZodEnum<{
154
+ movie: "movie";
155
+ episode: "episode";
156
+ track: "track";
157
+ photo: "photo";
158
+ live: "live";
159
+ trailer: "trailer";
160
+ }>;
161
+ /** library_items.media_type, which is a wider vocabulary than a session's mediaType. */
162
+ export declare const libraryItemTypeSchema: z.ZodEnum<{
163
+ movie: "movie";
164
+ episode: "episode";
165
+ track: "track";
166
+ photo: "photo";
167
+ show: "show";
168
+ season: "season";
169
+ artist: "artist";
170
+ album: "album";
171
+ }>;
172
+ export declare const conditionValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>;
173
+ export declare const nodeFieldsShape: {
174
+ id: z.ZodOptional<z.ZodUUID>;
175
+ enabled: z.ZodOptional<z.ZodBoolean>;
176
+ };
177
+ export declare const conditionSchema: z.ZodObject<{
178
+ field: z.ZodUnion<readonly [z.ZodEnum<{
179
+ concurrent_streams: "concurrent_streams";
180
+ active_session_distance_km: "active_session_distance_km";
181
+ travel_speed_kmh: "travel_speed_kmh";
182
+ unique_ips_in_window: "unique_ips_in_window";
183
+ unique_devices_in_window: "unique_devices_in_window";
184
+ inactive_days: "inactive_days";
185
+ current_pause_minutes: "current_pause_minutes";
186
+ total_pause_minutes: "total_pause_minutes";
187
+ }>, z.ZodEnum<{
188
+ source_resolution: "source_resolution";
189
+ output_resolution: "output_resolution";
190
+ is_transcoding: "is_transcoding";
191
+ is_transcode_downgrade: "is_transcode_downgrade";
192
+ source_bitrate_mbps: "source_bitrate_mbps";
193
+ }>, z.ZodEnum<{
194
+ user_id: "user_id";
195
+ trust_score: "trust_score";
196
+ account_age_days: "account_age_days";
197
+ }>, z.ZodEnum<{
198
+ device_type: "device_type";
199
+ client_name: "client_name";
200
+ platform: "platform";
201
+ }>, z.ZodEnum<{
202
+ is_local_network: "is_local_network";
203
+ country: "country";
204
+ ip_in_range: "ip_in_range";
205
+ }>, z.ZodEnum<{
206
+ server_id: "server_id";
207
+ media_type: "media_type";
208
+ }>, z.ZodEnum<{
209
+ library_item_type: "library_item_type";
210
+ library_name: "library_name";
211
+ resolution_after: "resolution_after";
212
+ dynamic_range_after: "dynamic_range_after";
213
+ video_codec_after: "video_codec_after";
214
+ audio_channels_after: "audio_channels_after";
215
+ file_size_after: "file_size_after";
216
+ }>]>;
217
+ operator: z.ZodUnion<readonly [z.ZodEnum<{
218
+ eq: "eq";
219
+ neq: "neq";
220
+ gt: "gt";
221
+ gte: "gte";
222
+ lt: "lt";
223
+ lte: "lte";
224
+ }>, z.ZodEnum<{
225
+ in: "in";
226
+ not_in: "not_in";
227
+ }>, z.ZodEnum<{
228
+ contains: "contains";
229
+ not_contains: "not_contains";
230
+ }>]>;
231
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>;
232
+ params: z.ZodOptional<z.ZodObject<{
233
+ window_hours: z.ZodOptional<z.ZodNumber>;
234
+ exclude_same_device: z.ZodOptional<z.ZodBoolean>;
235
+ exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
236
+ count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
237
+ unknown: "unknown";
238
+ mobile: "mobile";
239
+ tablet: "tablet";
240
+ tv: "tv";
241
+ desktop: "desktop";
242
+ browser: "browser";
243
+ }>>>;
244
+ }, z.core.$strip>>;
245
+ id: z.ZodOptional<z.ZodUUID>;
246
+ enabled: z.ZodOptional<z.ZodBoolean>;
247
+ }, z.core.$strip>;
248
+ export declare const conditionGroupSchema: z.ZodObject<{
249
+ match: z.ZodOptional<z.ZodEnum<{
250
+ any: "any";
251
+ all: "all";
252
+ }>>;
253
+ conditions: z.ZodArray<z.ZodObject<{
254
+ field: z.ZodUnion<readonly [z.ZodEnum<{
255
+ concurrent_streams: "concurrent_streams";
256
+ active_session_distance_km: "active_session_distance_km";
257
+ travel_speed_kmh: "travel_speed_kmh";
258
+ unique_ips_in_window: "unique_ips_in_window";
259
+ unique_devices_in_window: "unique_devices_in_window";
260
+ inactive_days: "inactive_days";
261
+ current_pause_minutes: "current_pause_minutes";
262
+ total_pause_minutes: "total_pause_minutes";
263
+ }>, z.ZodEnum<{
264
+ source_resolution: "source_resolution";
265
+ output_resolution: "output_resolution";
266
+ is_transcoding: "is_transcoding";
267
+ is_transcode_downgrade: "is_transcode_downgrade";
268
+ source_bitrate_mbps: "source_bitrate_mbps";
269
+ }>, z.ZodEnum<{
270
+ user_id: "user_id";
271
+ trust_score: "trust_score";
272
+ account_age_days: "account_age_days";
273
+ }>, z.ZodEnum<{
274
+ device_type: "device_type";
275
+ client_name: "client_name";
276
+ platform: "platform";
277
+ }>, z.ZodEnum<{
278
+ is_local_network: "is_local_network";
279
+ country: "country";
280
+ ip_in_range: "ip_in_range";
281
+ }>, z.ZodEnum<{
282
+ server_id: "server_id";
283
+ media_type: "media_type";
284
+ }>, z.ZodEnum<{
285
+ library_item_type: "library_item_type";
286
+ library_name: "library_name";
287
+ resolution_after: "resolution_after";
288
+ dynamic_range_after: "dynamic_range_after";
289
+ video_codec_after: "video_codec_after";
290
+ audio_channels_after: "audio_channels_after";
291
+ file_size_after: "file_size_after";
292
+ }>]>;
293
+ operator: z.ZodUnion<readonly [z.ZodEnum<{
294
+ eq: "eq";
295
+ neq: "neq";
296
+ gt: "gt";
297
+ gte: "gte";
298
+ lt: "lt";
299
+ lte: "lte";
300
+ }>, z.ZodEnum<{
301
+ in: "in";
302
+ not_in: "not_in";
303
+ }>, z.ZodEnum<{
304
+ contains: "contains";
305
+ not_contains: "not_contains";
306
+ }>]>;
307
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>;
308
+ params: z.ZodOptional<z.ZodObject<{
309
+ window_hours: z.ZodOptional<z.ZodNumber>;
310
+ exclude_same_device: z.ZodOptional<z.ZodBoolean>;
311
+ exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
312
+ count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
313
+ unknown: "unknown";
314
+ mobile: "mobile";
315
+ tablet: "tablet";
316
+ tv: "tv";
317
+ desktop: "desktop";
318
+ browser: "browser";
319
+ }>>>;
320
+ }, z.core.$strip>>;
321
+ id: z.ZodOptional<z.ZodUUID>;
322
+ enabled: z.ZodOptional<z.ZodBoolean>;
323
+ }, z.core.$strip>>;
324
+ id: z.ZodOptional<z.ZodUUID>;
325
+ enabled: z.ZodOptional<z.ZodBoolean>;
326
+ }, z.core.$strip>;
327
+ export declare const automationConditionsSchema: z.ZodObject<{
328
+ groups: z.ZodArray<z.ZodObject<{
329
+ match: z.ZodOptional<z.ZodEnum<{
330
+ any: "any";
331
+ all: "all";
332
+ }>>;
333
+ conditions: z.ZodArray<z.ZodObject<{
334
+ field: z.ZodUnion<readonly [z.ZodEnum<{
335
+ concurrent_streams: "concurrent_streams";
336
+ active_session_distance_km: "active_session_distance_km";
337
+ travel_speed_kmh: "travel_speed_kmh";
338
+ unique_ips_in_window: "unique_ips_in_window";
339
+ unique_devices_in_window: "unique_devices_in_window";
340
+ inactive_days: "inactive_days";
341
+ current_pause_minutes: "current_pause_minutes";
342
+ total_pause_minutes: "total_pause_minutes";
343
+ }>, z.ZodEnum<{
344
+ source_resolution: "source_resolution";
345
+ output_resolution: "output_resolution";
346
+ is_transcoding: "is_transcoding";
347
+ is_transcode_downgrade: "is_transcode_downgrade";
348
+ source_bitrate_mbps: "source_bitrate_mbps";
349
+ }>, z.ZodEnum<{
350
+ user_id: "user_id";
351
+ trust_score: "trust_score";
352
+ account_age_days: "account_age_days";
353
+ }>, z.ZodEnum<{
354
+ device_type: "device_type";
355
+ client_name: "client_name";
356
+ platform: "platform";
357
+ }>, z.ZodEnum<{
358
+ is_local_network: "is_local_network";
359
+ country: "country";
360
+ ip_in_range: "ip_in_range";
361
+ }>, z.ZodEnum<{
362
+ server_id: "server_id";
363
+ media_type: "media_type";
364
+ }>, z.ZodEnum<{
365
+ library_item_type: "library_item_type";
366
+ library_name: "library_name";
367
+ resolution_after: "resolution_after";
368
+ dynamic_range_after: "dynamic_range_after";
369
+ video_codec_after: "video_codec_after";
370
+ audio_channels_after: "audio_channels_after";
371
+ file_size_after: "file_size_after";
372
+ }>]>;
373
+ operator: z.ZodUnion<readonly [z.ZodEnum<{
374
+ eq: "eq";
375
+ neq: "neq";
376
+ gt: "gt";
377
+ gte: "gte";
378
+ lt: "lt";
379
+ lte: "lte";
380
+ }>, z.ZodEnum<{
381
+ in: "in";
382
+ not_in: "not_in";
383
+ }>, z.ZodEnum<{
384
+ contains: "contains";
385
+ not_contains: "not_contains";
386
+ }>]>;
387
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>]>;
388
+ params: z.ZodOptional<z.ZodObject<{
389
+ window_hours: z.ZodOptional<z.ZodNumber>;
390
+ exclude_same_device: z.ZodOptional<z.ZodBoolean>;
391
+ exclude_same_ip: z.ZodOptional<z.ZodBoolean>;
392
+ count_device_types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
393
+ unknown: "unknown";
394
+ mobile: "mobile";
395
+ tablet: "tablet";
396
+ tv: "tv";
397
+ desktop: "desktop";
398
+ browser: "browser";
399
+ }>>>;
400
+ }, z.core.$strip>>;
401
+ id: z.ZodOptional<z.ZodUUID>;
402
+ enabled: z.ZodOptional<z.ZodBoolean>;
403
+ }, z.core.$strip>>;
404
+ id: z.ZodOptional<z.ZodUUID>;
405
+ enabled: z.ZodOptional<z.ZodBoolean>;
406
+ }, z.core.$strip>>;
407
+ }, z.core.$strip>;
408
+ export type ComparisonOperator = z.infer<typeof comparisonOperatorSchema>;
409
+ export type ArrayOperator = z.infer<typeof arrayOperatorSchema>;
410
+ export type StringOperator = z.infer<typeof stringOperatorSchema>;
411
+ export type Operator = z.infer<typeof operatorSchema>;
412
+ export type SessionBehaviorField = z.infer<typeof sessionBehaviorFieldSchema>;
413
+ export type StreamQualityField = z.infer<typeof streamQualityFieldSchema>;
414
+ export type UserAttributeField = z.infer<typeof userAttributeFieldSchema>;
415
+ export type DeviceClientField = z.infer<typeof deviceClientFieldSchema>;
416
+ export type NetworkLocationField = z.infer<typeof networkLocationFieldSchema>;
417
+ export type ScopeField = z.infer<typeof scopeFieldSchema>;
418
+ export type MediaField = z.infer<typeof mediaFieldSchema>;
419
+ export type LibraryItemType = z.infer<typeof libraryItemTypeSchema>;
420
+ export type ConditionField = z.infer<typeof conditionFieldSchema>;
421
+ export type TranscodingConditionValue = z.infer<typeof transcodingConditionValueSchema>;
422
+ export type VideoResolution = z.infer<typeof videoResolutionSchema>;
423
+ export type DeviceType = z.infer<typeof deviceTypeSchema>;
424
+ export type Platform = z.infer<typeof platformSchema>;
425
+ export type MediaTypeEnum = z.infer<typeof mediaTypeEnumSchema>;
426
+ export type ConditionValue = z.infer<typeof conditionValueSchema>;
427
+ export type Condition = z.infer<typeof conditionSchema>;
428
+ export type ConditionGroup = z.infer<typeof conditionGroupSchema>;
429
+ /** How a group combines its conditions; a group stored before it existed reads as 'any'. */
430
+ export type ConditionMatch = NonNullable<ConditionGroup['match']>;
431
+ export type AutomationConditions = z.infer<typeof automationConditionsSchema>;
432
+ export type ConditionValueType = 'number' | 'boolean' | 'text' | 'select' | 'multiSelect' | 'cidr';
433
+ export interface ConditionFieldDescriptor {
434
+ category: 'session_behavior' | 'stream_quality' | 'user_attributes' | 'device_client' | 'network_location' | 'scope' | 'media';
435
+ /** The narrowest trigger context that can supply this field. */
436
+ requires: TriggerContext;
437
+ operators: readonly Operator[];
438
+ valueType: ConditionValueType;
439
+ options?: readonly string[];
440
+ /** Options the client fetches instead of the catalog carrying them. */
441
+ dynamicSource?: 'users' | 'countries' | 'servers';
442
+ unit?: 'km' | 'kmh' | 'mbps' | 'days' | 'minutes' | 'hours' | 'gb';
443
+ min?: number;
444
+ max?: number;
445
+ step?: number;
446
+ flags: {
447
+ windowHours?: true;
448
+ excludeSameDevice?: true;
449
+ excludeSameIp?: true;
450
+ countDeviceTypes?: true;
451
+ };
452
+ /** Aggregates across every account behind one person when the context carries them. */
453
+ identityAware: boolean;
454
+ }
455
+ export declare const CONDITION_FIELDS: Record<ConditionField, ConditionFieldDescriptor>;
456
+ export declare const IDENTITY_AWARE_CONDITION_FIELDS: ("concurrent_streams" | "active_session_distance_km" | "travel_speed_kmh" | "unique_ips_in_window" | "unique_devices_in_window" | "inactive_days" | "current_pause_minutes" | "total_pause_minutes" | "source_resolution" | "output_resolution" | "is_transcoding" | "is_transcode_downgrade" | "source_bitrate_mbps" | "user_id" | "trust_score" | "account_age_days" | "device_type" | "client_name" | "platform" | "is_local_network" | "country" | "ip_in_range" | "server_id" | "media_type" | "library_item_type" | "library_name" | "resolution_after" | "dynamic_range_after" | "video_codec_after" | "audio_channels_after" | "file_size_after")[];
457
+ /** Every field a trigger of this context can supply; a definition with no triggers offers all of them. */
458
+ export declare function fieldsAvailableFor(context: TriggerContext | null): ConditionField[];
459
+ //# sourceMappingURL=conditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/automations/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAGrE,eAAO,MAAM,wBAAwB;;;;;;;EAAkD,CAAC;AACxF,eAAO,MAAM,mBAAmB;;;EAA2B,CAAC;AAC5D,eAAO,MAAM,oBAAoB;;;EAAuC,CAAC;AACzE,eAAO,MAAM,cAAc;;;;;;;;;;;;;IAIzB,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;EASrC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;EAK1C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;EAAyD,CAAC;AAE/F,eAAO,MAAM,uBAAuB;;;;EAAqD,CAAC;AAE1F,eAAO,MAAM,0BAA0B;;;;EAAyD,CAAC;AAEjG,eAAO,MAAM,gBAAgB;;;EAAsC,CAAC;AAEpE,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB;;;;;;;;EAQ3B,CAAC;AAEH,eAAO,MAA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