@groovenet/contracts 1.2.0 → 1.4.0

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.
@@ -1,5 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export declare const playerIdSchema: z.ZodString;
3
+ export declare const availabilityPolicySchema: z.ZodEnum<{
4
+ allow_unknown: "allow_unknown";
5
+ always: "always";
6
+ ask: "ask";
7
+ }>;
3
8
  export declare const playerTrackRefSchema: z.ZodObject<{
4
9
  track_id: z.ZodString;
5
10
  friend_id: z.ZodNumber;
@@ -42,6 +47,11 @@ export declare const serverPlayerSchema: z.ZodObject<{
42
47
  id: z.ZodString;
43
48
  name: z.ZodString;
44
49
  engine_id: z.ZodString;
50
+ availability_policy: z.ZodEnum<{
51
+ allow_unknown: "allow_unknown";
52
+ always: "always";
53
+ ask: "ask";
54
+ }>;
45
55
  revision: z.ZodNumber;
46
56
  assigned_output: z.ZodNullable<z.ZodString>;
47
57
  state: z.ZodObject<{
@@ -78,11 +88,28 @@ export declare const createServerPlayerSchema: z.ZodObject<{
78
88
  engine_id: z.ZodString;
79
89
  }, z.core.$strict>;
80
90
  export declare const serverPlayerCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
81
- expected_revision: z.ZodNumber;
91
+ expected_revision: z.ZodOptional<z.ZodNumber>;
82
92
  type: z.ZodLiteral<"rename">;
83
93
  name: z.ZodString;
84
94
  }, z.core.$strict>, z.ZodObject<{
85
- expected_revision: z.ZodNumber;
95
+ expected_revision: z.ZodOptional<z.ZodNumber>;
96
+ type: z.ZodLiteral<"availability.set">;
97
+ availability_policy: z.ZodEnum<{
98
+ allow_unknown: "allow_unknown";
99
+ always: "always";
100
+ ask: "ask";
101
+ }>;
102
+ }, z.core.$strict>, z.ZodObject<{
103
+ expected_revision: z.ZodOptional<z.ZodNumber>;
104
+ allow_unknown: z.ZodDefault<z.ZodBoolean>;
105
+ takeover: z.ZodDefault<z.ZodBoolean>;
106
+ type: z.ZodLiteral<"session.join">;
107
+ tracks: z.ZodArray<z.ZodObject<{
108
+ track_id: z.ZodString;
109
+ friend_id: z.ZodNumber;
110
+ }, z.core.$strict>>;
111
+ }, z.core.$strict>, z.ZodObject<{
112
+ expected_revision: z.ZodOptional<z.ZodNumber>;
86
113
  type: z.ZodLiteral<"queue.add">;
87
114
  tracks: z.ZodArray<z.ZodObject<{
88
115
  track_id: z.ZodString;
@@ -90,60 +117,73 @@ export declare const serverPlayerCommandSchema: z.ZodDiscriminatedUnion<[z.ZodOb
90
117
  }, z.core.$strict>>;
91
118
  at: z.ZodOptional<z.ZodNumber>;
92
119
  }, z.core.$strict>, z.ZodObject<{
93
- expected_revision: z.ZodNumber;
120
+ expected_revision: z.ZodOptional<z.ZodNumber>;
94
121
  type: z.ZodLiteral<"queue.remove">;
95
122
  entry_id: z.ZodUUID;
96
123
  }, z.core.$strict>, z.ZodObject<{
97
- expected_revision: z.ZodNumber;
124
+ expected_revision: z.ZodOptional<z.ZodNumber>;
98
125
  type: z.ZodLiteral<"queue.move">;
99
126
  entry_id: z.ZodUUID;
100
127
  to: z.ZodNumber;
101
128
  }, z.core.$strict>, z.ZodObject<{
102
- expected_revision: z.ZodNumber;
129
+ expected_revision: z.ZodOptional<z.ZodNumber>;
103
130
  type: z.ZodLiteral<"queue.clear">;
104
131
  }, z.core.$strict>, z.ZodObject<{
105
- expected_revision: z.ZodNumber;
132
+ expected_revision: z.ZodOptional<z.ZodNumber>;
133
+ allow_unknown: z.ZodDefault<z.ZodBoolean>;
134
+ takeover: z.ZodDefault<z.ZodBoolean>;
135
+ type: z.ZodLiteral<"queue.replace">;
136
+ entries: z.ZodArray<z.ZodObject<{
137
+ track_id: z.ZodString;
138
+ friend_id: z.ZodNumber;
139
+ id: z.ZodOptional<z.ZodUUID>;
140
+ }, z.core.$strict>>;
141
+ current_entry_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
142
+ position: z.ZodOptional<z.ZodNumber>;
143
+ play: z.ZodDefault<z.ZodBoolean>;
144
+ }, z.core.$strict>, z.ZodObject<{
145
+ expected_revision: z.ZodOptional<z.ZodNumber>;
106
146
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
107
147
  takeover: z.ZodDefault<z.ZodBoolean>;
108
148
  type: z.ZodLiteral<"play">;
109
149
  entry_id: z.ZodOptional<z.ZodUUID>;
110
150
  }, z.core.$strict>, z.ZodObject<{
111
- expected_revision: z.ZodNumber;
151
+ expected_revision: z.ZodOptional<z.ZodNumber>;
112
152
  type: z.ZodLiteral<"pause">;
113
153
  }, z.core.$strict>, z.ZodObject<{
114
- expected_revision: z.ZodNumber;
154
+ expected_revision: z.ZodOptional<z.ZodNumber>;
115
155
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
116
156
  takeover: z.ZodDefault<z.ZodBoolean>;
117
157
  type: z.ZodLiteral<"resume">;
118
158
  }, z.core.$strict>, z.ZodObject<{
119
- expected_revision: z.ZodNumber;
159
+ expected_revision: z.ZodOptional<z.ZodNumber>;
120
160
  type: z.ZodLiteral<"stop">;
121
161
  }, z.core.$strict>, z.ZodObject<{
122
- expected_revision: z.ZodNumber;
162
+ expected_revision: z.ZodOptional<z.ZodNumber>;
123
163
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
124
164
  takeover: z.ZodDefault<z.ZodBoolean>;
125
165
  type: z.ZodLiteral<"next">;
126
166
  }, z.core.$strict>, z.ZodObject<{
127
- expected_revision: z.ZodNumber;
167
+ expected_revision: z.ZodOptional<z.ZodNumber>;
128
168
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
129
169
  takeover: z.ZodDefault<z.ZodBoolean>;
130
170
  type: z.ZodLiteral<"previous">;
131
171
  }, z.core.$strict>, z.ZodObject<{
132
- expected_revision: z.ZodNumber;
172
+ expected_revision: z.ZodOptional<z.ZodNumber>;
133
173
  type: z.ZodLiteral<"seek">;
134
174
  seconds: z.ZodNumber;
135
175
  }, z.core.$strict>, z.ZodObject<{
136
- expected_revision: z.ZodNumber;
176
+ expected_revision: z.ZodOptional<z.ZodNumber>;
137
177
  type: z.ZodLiteral<"volume">;
138
178
  volume: z.ZodNumber;
139
179
  }, z.core.$strict>, z.ZodObject<{
140
- expected_revision: z.ZodNumber;
180
+ expected_revision: z.ZodOptional<z.ZodNumber>;
141
181
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
142
182
  takeover: z.ZodDefault<z.ZodBoolean>;
143
183
  type: z.ZodLiteral<"output.select">;
144
184
  output_id: z.ZodString;
145
185
  }, z.core.$strict>, z.ZodObject<{
146
- expected_revision: z.ZodNumber;
186
+ expected_revision: z.ZodOptional<z.ZodNumber>;
147
187
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
148
188
  takeover: z.ZodDefault<z.ZodBoolean>;
149
189
  type: z.ZodLiteral<"output.transfer">;
@@ -163,7 +203,13 @@ export declare const speakerObservationSchema: z.ZodObject<{
163
203
  home_assistant: "home_assistant";
164
204
  unconfigured: "unconfigured";
165
205
  }>;
166
- sender_identity: z.ZodLiteral<"unknown">;
206
+ sender_identity: z.ZodEnum<{
207
+ foreign: "foreign";
208
+ groovenet: "groovenet";
209
+ unknown: "unknown";
210
+ }>;
211
+ sender_engine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ entity_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
213
  }, z.core.$strip>;
168
214
  export declare const serverPlayerDeviceSchema: z.ZodObject<{
169
215
  id: z.ZodString;
@@ -182,7 +228,13 @@ export declare const serverPlayerDeviceSchema: z.ZodObject<{
182
228
  home_assistant: "home_assistant";
183
229
  unconfigured: "unconfigured";
184
230
  }>;
185
- sender_identity: z.ZodLiteral<"unknown">;
231
+ sender_identity: z.ZodEnum<{
232
+ foreign: "foreign";
233
+ groovenet: "groovenet";
234
+ unknown: "unknown";
235
+ }>;
236
+ sender_engine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ entity_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
186
238
  }, z.core.$strip>;
187
239
  }, z.core.$strip>;
188
240
  export declare const serverPlayerCommandResultSchema: z.ZodObject<{
@@ -190,6 +242,11 @@ export declare const serverPlayerCommandResultSchema: z.ZodObject<{
190
242
  id: z.ZodString;
191
243
  name: z.ZodString;
192
244
  engine_id: z.ZodString;
245
+ availability_policy: z.ZodEnum<{
246
+ allow_unknown: "allow_unknown";
247
+ always: "always";
248
+ ask: "ask";
249
+ }>;
193
250
  revision: z.ZodNumber;
194
251
  assigned_output: z.ZodNullable<z.ZodString>;
195
252
  state: z.ZodObject<{
@@ -225,6 +282,11 @@ export declare const serverPlayerCommandResultSchema: z.ZodObject<{
225
282
  id: z.ZodString;
226
283
  name: z.ZodString;
227
284
  engine_id: z.ZodString;
285
+ availability_policy: z.ZodEnum<{
286
+ allow_unknown: "allow_unknown";
287
+ always: "always";
288
+ ask: "ask";
289
+ }>;
228
290
  revision: z.ZodNumber;
229
291
  assigned_output: z.ZodNullable<z.ZodString>;
230
292
  state: z.ZodObject<{
@@ -278,6 +340,11 @@ export declare const serverPlayerListSchema: z.ZodObject<{
278
340
  id: z.ZodString;
279
341
  name: z.ZodString;
280
342
  engine_id: z.ZodString;
343
+ availability_policy: z.ZodEnum<{
344
+ allow_unknown: "allow_unknown";
345
+ always: "always";
346
+ ask: "ask";
347
+ }>;
281
348
  revision: z.ZodNumber;
282
349
  assigned_output: z.ZodNullable<z.ZodString>;
283
350
  state: z.ZodObject<{
@@ -327,7 +394,13 @@ export declare const serverPlayerDeviceListSchema: z.ZodObject<{
327
394
  home_assistant: "home_assistant";
328
395
  unconfigured: "unconfigured";
329
396
  }>;
330
- sender_identity: z.ZodLiteral<"unknown">;
397
+ sender_identity: z.ZodEnum<{
398
+ foreign: "foreign";
399
+ groovenet: "groovenet";
400
+ unknown: "unknown";
401
+ }>;
402
+ sender_engine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
403
+ entity_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
331
404
  }, z.core.$strip>;
332
405
  }, z.core.$strip>>;
333
406
  }, z.core.$strip>;
@@ -340,6 +413,11 @@ export declare const serverPlayerEventSchema: z.ZodObject<{
340
413
  id: z.ZodString;
341
414
  name: z.ZodString;
342
415
  engine_id: z.ZodString;
416
+ availability_policy: z.ZodEnum<{
417
+ allow_unknown: "allow_unknown";
418
+ always: "always";
419
+ ask: "ask";
420
+ }>;
343
421
  revision: z.ZodNumber;
344
422
  assigned_output: z.ZodNullable<z.ZodString>;
345
423
  state: z.ZodObject<{
@@ -373,6 +451,137 @@ export declare const serverPlayerEventSchema: z.ZodObject<{
373
451
  worker_instance: z.ZodUUID;
374
452
  sequence: z.ZodNumber;
375
453
  }, z.core.$strip>;
454
+ export declare const serverPlayersEventSchema: z.ZodObject<{
455
+ type: z.ZodLiteral<"players">;
456
+ players: z.ZodArray<z.ZodObject<{
457
+ id: z.ZodString;
458
+ name: z.ZodString;
459
+ engine_id: z.ZodString;
460
+ availability_policy: z.ZodEnum<{
461
+ allow_unknown: "allow_unknown";
462
+ always: "always";
463
+ ask: "ask";
464
+ }>;
465
+ revision: z.ZodNumber;
466
+ assigned_output: z.ZodNullable<z.ZodString>;
467
+ state: z.ZodObject<{
468
+ queue: z.ZodArray<z.ZodObject<{
469
+ track_id: z.ZodString;
470
+ friend_id: z.ZodNumber;
471
+ id: z.ZodUUID;
472
+ title: z.ZodString;
473
+ artist: z.ZodString;
474
+ }, z.core.$strict>>;
475
+ current_entry_id: z.ZodNullable<z.ZodUUID>;
476
+ status: z.ZodEnum<{
477
+ ended: "ended";
478
+ error: "error";
479
+ loading: "loading";
480
+ paused: "paused";
481
+ playing: "playing";
482
+ stopped: "stopped";
483
+ }>;
484
+ position: z.ZodNumber;
485
+ duration: z.ZodNullable<z.ZodNumber>;
486
+ volume: z.ZodNumber;
487
+ desired_output: z.ZodNullable<z.ZodString>;
488
+ checkpoint: z.ZodBoolean;
489
+ error: z.ZodNullable<z.ZodObject<{
490
+ code: z.ZodString;
491
+ message: z.ZodString;
492
+ }, z.core.$strip>>;
493
+ }, z.core.$strict>;
494
+ }, z.core.$strict>>;
495
+ worker_instance: z.ZodUUID;
496
+ sequence: z.ZodNumber;
497
+ }, z.core.$strip>;
498
+ export declare const serverPlayersStreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
499
+ type: z.ZodLiteral<"players">;
500
+ players: z.ZodArray<z.ZodObject<{
501
+ id: z.ZodString;
502
+ name: z.ZodString;
503
+ engine_id: z.ZodString;
504
+ availability_policy: z.ZodEnum<{
505
+ allow_unknown: "allow_unknown";
506
+ always: "always";
507
+ ask: "ask";
508
+ }>;
509
+ revision: z.ZodNumber;
510
+ assigned_output: z.ZodNullable<z.ZodString>;
511
+ state: z.ZodObject<{
512
+ queue: z.ZodArray<z.ZodObject<{
513
+ track_id: z.ZodString;
514
+ friend_id: z.ZodNumber;
515
+ id: z.ZodUUID;
516
+ title: z.ZodString;
517
+ artist: z.ZodString;
518
+ }, z.core.$strict>>;
519
+ current_entry_id: z.ZodNullable<z.ZodUUID>;
520
+ status: z.ZodEnum<{
521
+ ended: "ended";
522
+ error: "error";
523
+ loading: "loading";
524
+ paused: "paused";
525
+ playing: "playing";
526
+ stopped: "stopped";
527
+ }>;
528
+ position: z.ZodNumber;
529
+ duration: z.ZodNullable<z.ZodNumber>;
530
+ volume: z.ZodNumber;
531
+ desired_output: z.ZodNullable<z.ZodString>;
532
+ checkpoint: z.ZodBoolean;
533
+ error: z.ZodNullable<z.ZodObject<{
534
+ code: z.ZodString;
535
+ message: z.ZodString;
536
+ }, z.core.$strip>>;
537
+ }, z.core.$strict>;
538
+ }, z.core.$strict>>;
539
+ worker_instance: z.ZodUUID;
540
+ sequence: z.ZodNumber;
541
+ }, z.core.$strip>, z.ZodObject<{
542
+ type: z.ZodLiteral<"snapshot">;
543
+ player: z.ZodObject<{
544
+ id: z.ZodString;
545
+ name: z.ZodString;
546
+ engine_id: z.ZodString;
547
+ availability_policy: z.ZodEnum<{
548
+ allow_unknown: "allow_unknown";
549
+ always: "always";
550
+ ask: "ask";
551
+ }>;
552
+ revision: z.ZodNumber;
553
+ assigned_output: z.ZodNullable<z.ZodString>;
554
+ state: z.ZodObject<{
555
+ queue: z.ZodArray<z.ZodObject<{
556
+ track_id: z.ZodString;
557
+ friend_id: z.ZodNumber;
558
+ id: z.ZodUUID;
559
+ title: z.ZodString;
560
+ artist: z.ZodString;
561
+ }, z.core.$strict>>;
562
+ current_entry_id: z.ZodNullable<z.ZodUUID>;
563
+ status: z.ZodEnum<{
564
+ ended: "ended";
565
+ error: "error";
566
+ loading: "loading";
567
+ paused: "paused";
568
+ playing: "playing";
569
+ stopped: "stopped";
570
+ }>;
571
+ position: z.ZodNumber;
572
+ duration: z.ZodNullable<z.ZodNumber>;
573
+ volume: z.ZodNumber;
574
+ desired_output: z.ZodNullable<z.ZodString>;
575
+ checkpoint: z.ZodBoolean;
576
+ error: z.ZodNullable<z.ZodObject<{
577
+ code: z.ZodString;
578
+ message: z.ZodString;
579
+ }, z.core.$strip>>;
580
+ }, z.core.$strict>;
581
+ }, z.core.$strict>;
582
+ worker_instance: z.ZodUUID;
583
+ sequence: z.ZodNumber;
584
+ }, z.core.$strip>], "type">;
376
585
  export declare const serverPlayerPositionSchema: z.ZodObject<{
377
586
  type: z.ZodLiteral<"position">;
378
587
  player_id: z.ZodString;
@@ -390,6 +599,11 @@ export declare const serverPlayerStreamEventSchema: z.ZodDiscriminatedUnion<[z.Z
390
599
  id: z.ZodString;
391
600
  name: z.ZodString;
392
601
  engine_id: z.ZodString;
602
+ availability_policy: z.ZodEnum<{
603
+ allow_unknown: "allow_unknown";
604
+ always: "always";
605
+ ask: "ask";
606
+ }>;
393
607
  revision: z.ZodNumber;
394
608
  assigned_output: z.ZodNullable<z.ZodString>;
395
609
  state: z.ZodObject<{
@@ -438,6 +652,11 @@ export declare const playerJsonSchemas: {
438
652
  id: z.ZodString;
439
653
  name: z.ZodString;
440
654
  engine_id: z.ZodString;
655
+ availability_policy: z.ZodEnum<{
656
+ allow_unknown: "allow_unknown";
657
+ always: "always";
658
+ ask: "ask";
659
+ }>;
441
660
  revision: z.ZodNumber;
442
661
  assigned_output: z.ZodNullable<z.ZodString>;
443
662
  state: z.ZodObject<{
@@ -474,11 +693,28 @@ export declare const playerJsonSchemas: {
474
693
  engine_id: z.ZodString;
475
694
  }, z.core.$strict>>;
476
695
  ServerPlayerCommand: z.core.ZodStandardJSONSchemaPayload<z.ZodDiscriminatedUnion<[z.ZodObject<{
477
- expected_revision: z.ZodNumber;
696
+ expected_revision: z.ZodOptional<z.ZodNumber>;
478
697
  type: z.ZodLiteral<"rename">;
479
698
  name: z.ZodString;
480
699
  }, z.core.$strict>, z.ZodObject<{
481
- expected_revision: z.ZodNumber;
700
+ expected_revision: z.ZodOptional<z.ZodNumber>;
701
+ type: z.ZodLiteral<"availability.set">;
702
+ availability_policy: z.ZodEnum<{
703
+ allow_unknown: "allow_unknown";
704
+ always: "always";
705
+ ask: "ask";
706
+ }>;
707
+ }, z.core.$strict>, z.ZodObject<{
708
+ expected_revision: z.ZodOptional<z.ZodNumber>;
709
+ allow_unknown: z.ZodDefault<z.ZodBoolean>;
710
+ takeover: z.ZodDefault<z.ZodBoolean>;
711
+ type: z.ZodLiteral<"session.join">;
712
+ tracks: z.ZodArray<z.ZodObject<{
713
+ track_id: z.ZodString;
714
+ friend_id: z.ZodNumber;
715
+ }, z.core.$strict>>;
716
+ }, z.core.$strict>, z.ZodObject<{
717
+ expected_revision: z.ZodOptional<z.ZodNumber>;
482
718
  type: z.ZodLiteral<"queue.add">;
483
719
  tracks: z.ZodArray<z.ZodObject<{
484
720
  track_id: z.ZodString;
@@ -486,60 +722,73 @@ export declare const playerJsonSchemas: {
486
722
  }, z.core.$strict>>;
487
723
  at: z.ZodOptional<z.ZodNumber>;
488
724
  }, z.core.$strict>, z.ZodObject<{
489
- expected_revision: z.ZodNumber;
725
+ expected_revision: z.ZodOptional<z.ZodNumber>;
490
726
  type: z.ZodLiteral<"queue.remove">;
491
727
  entry_id: z.ZodUUID;
492
728
  }, z.core.$strict>, z.ZodObject<{
493
- expected_revision: z.ZodNumber;
729
+ expected_revision: z.ZodOptional<z.ZodNumber>;
494
730
  type: z.ZodLiteral<"queue.move">;
495
731
  entry_id: z.ZodUUID;
496
732
  to: z.ZodNumber;
497
733
  }, z.core.$strict>, z.ZodObject<{
498
- expected_revision: z.ZodNumber;
734
+ expected_revision: z.ZodOptional<z.ZodNumber>;
499
735
  type: z.ZodLiteral<"queue.clear">;
500
736
  }, z.core.$strict>, z.ZodObject<{
501
- expected_revision: z.ZodNumber;
737
+ expected_revision: z.ZodOptional<z.ZodNumber>;
738
+ allow_unknown: z.ZodDefault<z.ZodBoolean>;
739
+ takeover: z.ZodDefault<z.ZodBoolean>;
740
+ type: z.ZodLiteral<"queue.replace">;
741
+ entries: z.ZodArray<z.ZodObject<{
742
+ track_id: z.ZodString;
743
+ friend_id: z.ZodNumber;
744
+ id: z.ZodOptional<z.ZodUUID>;
745
+ }, z.core.$strict>>;
746
+ current_entry_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
747
+ position: z.ZodOptional<z.ZodNumber>;
748
+ play: z.ZodDefault<z.ZodBoolean>;
749
+ }, z.core.$strict>, z.ZodObject<{
750
+ expected_revision: z.ZodOptional<z.ZodNumber>;
502
751
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
503
752
  takeover: z.ZodDefault<z.ZodBoolean>;
504
753
  type: z.ZodLiteral<"play">;
505
754
  entry_id: z.ZodOptional<z.ZodUUID>;
506
755
  }, z.core.$strict>, z.ZodObject<{
507
- expected_revision: z.ZodNumber;
756
+ expected_revision: z.ZodOptional<z.ZodNumber>;
508
757
  type: z.ZodLiteral<"pause">;
509
758
  }, z.core.$strict>, z.ZodObject<{
510
- expected_revision: z.ZodNumber;
759
+ expected_revision: z.ZodOptional<z.ZodNumber>;
511
760
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
512
761
  takeover: z.ZodDefault<z.ZodBoolean>;
513
762
  type: z.ZodLiteral<"resume">;
514
763
  }, z.core.$strict>, z.ZodObject<{
515
- expected_revision: z.ZodNumber;
764
+ expected_revision: z.ZodOptional<z.ZodNumber>;
516
765
  type: z.ZodLiteral<"stop">;
517
766
  }, z.core.$strict>, z.ZodObject<{
518
- expected_revision: z.ZodNumber;
767
+ expected_revision: z.ZodOptional<z.ZodNumber>;
519
768
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
520
769
  takeover: z.ZodDefault<z.ZodBoolean>;
521
770
  type: z.ZodLiteral<"next">;
522
771
  }, z.core.$strict>, z.ZodObject<{
523
- expected_revision: z.ZodNumber;
772
+ expected_revision: z.ZodOptional<z.ZodNumber>;
524
773
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
525
774
  takeover: z.ZodDefault<z.ZodBoolean>;
526
775
  type: z.ZodLiteral<"previous">;
527
776
  }, z.core.$strict>, z.ZodObject<{
528
- expected_revision: z.ZodNumber;
777
+ expected_revision: z.ZodOptional<z.ZodNumber>;
529
778
  type: z.ZodLiteral<"seek">;
530
779
  seconds: z.ZodNumber;
531
780
  }, z.core.$strict>, z.ZodObject<{
532
- expected_revision: z.ZodNumber;
781
+ expected_revision: z.ZodOptional<z.ZodNumber>;
533
782
  type: z.ZodLiteral<"volume">;
534
783
  volume: z.ZodNumber;
535
784
  }, z.core.$strict>, z.ZodObject<{
536
- expected_revision: z.ZodNumber;
785
+ expected_revision: z.ZodOptional<z.ZodNumber>;
537
786
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
538
787
  takeover: z.ZodDefault<z.ZodBoolean>;
539
788
  type: z.ZodLiteral<"output.select">;
540
789
  output_id: z.ZodString;
541
790
  }, z.core.$strict>, z.ZodObject<{
542
- expected_revision: z.ZodNumber;
791
+ expected_revision: z.ZodOptional<z.ZodNumber>;
543
792
  allow_unknown: z.ZodDefault<z.ZodBoolean>;
544
793
  takeover: z.ZodDefault<z.ZodBoolean>;
545
794
  type: z.ZodLiteral<"output.transfer">;
@@ -553,6 +802,11 @@ export declare const playerJsonSchemas: {
553
802
  id: z.ZodString;
554
803
  name: z.ZodString;
555
804
  engine_id: z.ZodString;
805
+ availability_policy: z.ZodEnum<{
806
+ allow_unknown: "allow_unknown";
807
+ always: "always";
808
+ ask: "ask";
809
+ }>;
556
810
  revision: z.ZodNumber;
557
811
  assigned_output: z.ZodNullable<z.ZodString>;
558
812
  state: z.ZodObject<{
@@ -588,6 +842,11 @@ export declare const playerJsonSchemas: {
588
842
  id: z.ZodString;
589
843
  name: z.ZodString;
590
844
  engine_id: z.ZodString;
845
+ availability_policy: z.ZodEnum<{
846
+ allow_unknown: "allow_unknown";
847
+ always: "always";
848
+ ask: "ask";
849
+ }>;
591
850
  revision: z.ZodNumber;
592
851
  assigned_output: z.ZodNullable<z.ZodString>;
593
852
  state: z.ZodObject<{
@@ -631,6 +890,11 @@ export declare const playerJsonSchemas: {
631
890
  id: z.ZodString;
632
891
  name: z.ZodString;
633
892
  engine_id: z.ZodString;
893
+ availability_policy: z.ZodEnum<{
894
+ allow_unknown: "allow_unknown";
895
+ always: "always";
896
+ ask: "ask";
897
+ }>;
634
898
  revision: z.ZodNumber;
635
899
  assigned_output: z.ZodNullable<z.ZodString>;
636
900
  state: z.ZodObject<{
@@ -680,7 +944,13 @@ export declare const playerJsonSchemas: {
680
944
  home_assistant: "home_assistant";
681
945
  unconfigured: "unconfigured";
682
946
  }>;
683
- sender_identity: z.ZodLiteral<"unknown">;
947
+ sender_identity: z.ZodEnum<{
948
+ foreign: "foreign";
949
+ groovenet: "groovenet";
950
+ unknown: "unknown";
951
+ }>;
952
+ sender_engine_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
953
+ entity_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
684
954
  }, z.core.$strip>;
685
955
  }, z.core.$strip>>;
686
956
  }, z.core.$strip>>;
@@ -693,6 +963,11 @@ export declare const playerJsonSchemas: {
693
963
  id: z.ZodString;
694
964
  name: z.ZodString;
695
965
  engine_id: z.ZodString;
966
+ availability_policy: z.ZodEnum<{
967
+ allow_unknown: "allow_unknown";
968
+ always: "always";
969
+ ask: "ask";
970
+ }>;
696
971
  revision: z.ZodNumber;
697
972
  assigned_output: z.ZodNullable<z.ZodString>;
698
973
  state: z.ZodObject<{
@@ -726,6 +1001,50 @@ export declare const playerJsonSchemas: {
726
1001
  worker_instance: z.ZodUUID;
727
1002
  sequence: z.ZodNumber;
728
1003
  }, z.core.$strip>>;
1004
+ ServerPlayersEvent: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
1005
+ type: z.ZodLiteral<"players">;
1006
+ players: z.ZodArray<z.ZodObject<{
1007
+ id: z.ZodString;
1008
+ name: z.ZodString;
1009
+ engine_id: z.ZodString;
1010
+ availability_policy: z.ZodEnum<{
1011
+ allow_unknown: "allow_unknown";
1012
+ always: "always";
1013
+ ask: "ask";
1014
+ }>;
1015
+ revision: z.ZodNumber;
1016
+ assigned_output: z.ZodNullable<z.ZodString>;
1017
+ state: z.ZodObject<{
1018
+ queue: z.ZodArray<z.ZodObject<{
1019
+ track_id: z.ZodString;
1020
+ friend_id: z.ZodNumber;
1021
+ id: z.ZodUUID;
1022
+ title: z.ZodString;
1023
+ artist: z.ZodString;
1024
+ }, z.core.$strict>>;
1025
+ current_entry_id: z.ZodNullable<z.ZodUUID>;
1026
+ status: z.ZodEnum<{
1027
+ ended: "ended";
1028
+ error: "error";
1029
+ loading: "loading";
1030
+ paused: "paused";
1031
+ playing: "playing";
1032
+ stopped: "stopped";
1033
+ }>;
1034
+ position: z.ZodNumber;
1035
+ duration: z.ZodNullable<z.ZodNumber>;
1036
+ volume: z.ZodNumber;
1037
+ desired_output: z.ZodNullable<z.ZodString>;
1038
+ checkpoint: z.ZodBoolean;
1039
+ error: z.ZodNullable<z.ZodObject<{
1040
+ code: z.ZodString;
1041
+ message: z.ZodString;
1042
+ }, z.core.$strip>>;
1043
+ }, z.core.$strict>;
1044
+ }, z.core.$strict>>;
1045
+ worker_instance: z.ZodUUID;
1046
+ sequence: z.ZodNumber;
1047
+ }, z.core.$strip>>;
729
1048
  ServerPlayerPosition: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
730
1049
  type: z.ZodLiteral<"position">;
731
1050
  player_id: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../src/players.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc,aAAgD,CAAC;AAE5E,eAAO,MAAM,oBAAoB;;;kBAAsG,CAAC;AACxI,eAAO,MAAM,sBAAsB;;;;;;kBAExB,CAAC;AACZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAUzB,CAAC;AACZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOpB,CAAC;AACZ,eAAO,MAAM,wBAAwB;;;;kBAA8E,CAAC;AAGpH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAgBpC,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;iBAMnC,CAAC;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;iBAKnC,CAAC;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO1C,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,kBAAkB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