@deadair/sdk 0.41.0 → 0.43.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.
Files changed (31) hide show
  1. package/dist/art/art.client.d.ts +16 -1
  2. package/dist/art/art.client.d.ts.map +1 -1
  3. package/dist/art/types/art.types.d.ts +25 -0
  4. package/dist/art/types/art.types.d.ts.map +1 -1
  5. package/dist/catalog/catalog.client.d.ts +16 -1
  6. package/dist/catalog/catalog.client.d.ts.map +1 -1
  7. package/dist/catalog/types/catalog.types.d.ts +61 -23
  8. package/dist/catalog/types/catalog.types.d.ts.map +1 -1
  9. package/dist/director/director.client.d.ts +36 -0
  10. package/dist/director/director.client.d.ts.map +1 -1
  11. package/dist/director/types/director.types.d.ts +10 -6
  12. package/dist/director/types/director.types.d.ts.map +1 -1
  13. package/dist/director/types/index.d.ts +1 -0
  14. package/dist/director/types/index.d.ts.map +1 -1
  15. package/dist/director/types/rules.types.d.ts +97 -0
  16. package/dist/director/types/rules.types.d.ts.map +1 -0
  17. package/dist/index.js +314 -86
  18. package/dist/index.js.map +1 -1
  19. package/dist/nowplaying/types/nowplaying.types.d.ts +3 -1
  20. package/dist/nowplaying/types/nowplaying.types.d.ts.map +1 -1
  21. package/dist/personas/types/personas.types.d.ts +6 -6
  22. package/dist/personas/types/personas.types.d.ts.map +1 -1
  23. package/dist/playout/playout.client.d.ts +6 -1
  24. package/dist/playout/playout.client.d.ts.map +1 -1
  25. package/dist/playout/types/playout.types.d.ts +19 -12
  26. package/dist/playout/types/playout.types.d.ts.map +1 -1
  27. package/dist/schedule/types/schedule.types.d.ts +11 -5
  28. package/dist/schedule/types/schedule.types.d.ts.map +1 -1
  29. package/dist/station/types/station.types.d.ts +65 -30
  30. package/dist/station/types/station.types.d.ts.map +1 -1
  31. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ import { DateTime } from 'luxon';
2
+ /**
3
+ * A never-play rule: a KIND of record the station must not play. Absolute, like a dislike, and
4
+ * exclude-only: there is no "only these" rule, because one could leave the station nothing to play.
5
+ * Every scope is optional and an absent one means "always"
6
+ * generated from [BlockRule](../../../../../apps/api/data/contracts/director/rules.types.ck#L10)
7
+ */
8
+ export interface BlockRule {
9
+ id: string;
10
+ /** `genre` refuses any record tagged with this genre or a kind of it (`Punk Rock` under `Punk`, never `Pop` under `Pop Punk`, never `Trap` under `Rap`). `tag` refuses a record carrying exactly this tag */
11
+ field: 'genre' | 'tag';
12
+ /** The genre or tag, as you would write it */
13
+ value: string;
14
+ /** First day it holds, as `MM-DD`. With `seasonTo`; a season starting after it ends wraps the year end */
15
+ seasonFrom?: string;
16
+ /** Last day it holds, as `MM-DD` */
17
+ seasonTo?: string;
18
+ /** First hour of the station's day it holds. With `untilHour`; a window starting after it ends wraps midnight */
19
+ fromHour?: number;
20
+ /** The hour it stops holding, exclusive */
21
+ untilHour?: number;
22
+ /** Only while the station is in one of these modes. Absent or empty means every mode */
23
+ modes?: ('rotation' | 'setlist' | 'feature')[];
24
+ /** Only during these schedule blocks. Absent or empty means whatever is on */
25
+ slotIds?: string[];
26
+ /** When it stops holding. Absent means until it is removed */
27
+ endsAt?: DateTime;
28
+ /** Whether it holds right now, on the station's clock, for what is on air */
29
+ inForce: boolean;
30
+ }
31
+ export interface BlockRuleInput {
32
+ /** `genre` refuses any record tagged with this genre or a kind of it (`Punk Rock` under `Punk`, never `Pop` under `Pop Punk`, never `Trap` under `Rap`). `tag` refuses a record carrying exactly this tag */
33
+ field: 'genre' | 'tag';
34
+ /** The genre or tag, as you would write it */
35
+ value: string;
36
+ /** First day it holds, as `MM-DD`. With `seasonTo`; a season starting after it ends wraps the year end */
37
+ seasonFrom?: string;
38
+ /** Last day it holds, as `MM-DD` */
39
+ seasonTo?: string;
40
+ /** First hour of the station's day it holds. With `untilHour`; a window starting after it ends wraps midnight */
41
+ fromHour?: number;
42
+ /** The hour it stops holding, exclusive */
43
+ untilHour?: number;
44
+ /** Only while the station is in one of these modes. Absent or empty means every mode */
45
+ modes?: ('rotation' | 'setlist' | 'feature')[];
46
+ /** Only during these schedule blocks. Absent or empty means whatever is on */
47
+ slotIds?: string[];
48
+ /** When it stops holding. Absent means until it is removed */
49
+ endsAt?: DateTime;
50
+ }
51
+ /** Rehydrates every wire-encoded scalar in a BlockRule into its runtime type. Mutates and returns `raw`. */
52
+ export declare function reviveBlockRule(raw: BlockRule): BlockRule;
53
+ /**
54
+ * A lean toward some genres for a while. The opposite of a rule: the station favours them when it
55
+ * chooses records, and still plays anything else rather than run dry
56
+ * generated from [GenreSteer](../../../../../apps/api/data/contracts/director/rules.types.ck#L31)
57
+ */
58
+ export interface GenreSteer {
59
+ /** What to favour, as genres. A record tagged with any of them, or a kind of one, is preferred */
60
+ genres: string[];
61
+ /** When the station goes back to choosing as it ordinarily does */
62
+ endsAt: DateTime;
63
+ }
64
+ /** Rehydrates every wire-encoded scalar in a GenreSteer into its runtime type. Mutates and returns `raw`. */
65
+ export declare function reviveGenreSteer(raw: GenreSteer): GenreSteer;
66
+ /**
67
+ * Lean the station toward some genres for a number of hours
68
+ * generated from [GenreSteerInput](../../../../../apps/api/data/contracts/director/rules.types.ck#L42)
69
+ */
70
+ export interface GenreSteerInput {
71
+ genres: string[];
72
+ /** How long it lasts, from now */
73
+ hours: number;
74
+ }
75
+ /**
76
+ * Every rule on the station, newest first
77
+ * generated from [BlockRuleList](../../../../../apps/api/data/contracts/director/rules.types.ck#L25)
78
+ */
79
+ export interface BlockRuleList {
80
+ rules: BlockRule[];
81
+ }
82
+ export interface BlockRuleListInput {
83
+ rules: BlockRuleInput[];
84
+ }
85
+ /** Rehydrates every wire-encoded scalar in a BlockRuleList into its runtime type. Mutates and returns `raw`. */
86
+ export declare function reviveBlockRuleList(raw: BlockRuleList): BlockRuleList;
87
+ /**
88
+ * The lean in force, or none
89
+ * generated from [GenreSteerReading](../../../../../apps/api/data/contracts/director/rules.types.ck#L37)
90
+ */
91
+ export interface GenreSteerReading {
92
+ /** Absent when nothing is leaning the station, including once one has run out */
93
+ steer?: GenreSteer;
94
+ }
95
+ /** Rehydrates every wire-encoded scalar in a GenreSteerReading into its runtime type. Mutates and returns `raw`. */
96
+ export declare function reviveGenreSteerReading(raw: GenreSteerReading): GenreSteerReading;
97
+ //# sourceMappingURL=rules.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.types.d.ts","sourceRoot":"","sources":["../../../src/director/types/rules.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjC;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,6MAA6M;IAC7M,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC;IACvB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,KAAK,CAAC,EAAE,CAAC,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC,EAAE,CAAC;IAC/C,8EAA8E;IAC9E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,6EAA6E;IAC7E,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC3B,6MAA6M;IAC7M,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC;IACvB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,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