@deadair/sdk 0.7.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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/activity/activity.client.d.ts +12 -0
  4. package/dist/activity/activity.client.d.ts.map +1 -0
  5. package/dist/activity/types/activity.types.d.ts +60 -0
  6. package/dist/activity/types/activity.types.d.ts.map +1 -0
  7. package/dist/activity/types/index.d.ts +2 -0
  8. package/dist/activity/types/index.d.ts.map +1 -0
  9. package/dist/art/art.client.d.ts +21 -0
  10. package/dist/art/art.client.d.ts.map +1 -0
  11. package/dist/authentication/authentication.client.d.ts +33 -0
  12. package/dist/authentication/authentication.client.d.ts.map +1 -0
  13. package/dist/authentication/authentication.factor.client.d.ts +41 -0
  14. package/dist/authentication/authentication.factor.client.d.ts.map +1 -0
  15. package/dist/authentication/authentication.sessions.client.d.ts +20 -0
  16. package/dist/authentication/authentication.sessions.client.d.ts.map +1 -0
  17. package/dist/authentication/types/authentication.types.d.ts +846 -0
  18. package/dist/authentication/types/authentication.types.d.ts.map +1 -0
  19. package/dist/authentication/types/index.d.ts +3 -0
  20. package/dist/authentication/types/index.d.ts.map +1 -0
  21. package/dist/authentication/types/registration.types.d.ts +336 -0
  22. package/dist/authentication/types/registration.types.d.ts.map +1 -0
  23. package/dist/catalog/catalog.client.d.ts +96 -0
  24. package/dist/catalog/catalog.client.d.ts.map +1 -0
  25. package/dist/catalog/types/catalog.types.d.ts +593 -0
  26. package/dist/catalog/types/catalog.types.d.ts.map +1 -0
  27. package/dist/catalog/types/index.d.ts +2 -0
  28. package/dist/catalog/types/index.d.ts.map +1 -0
  29. package/dist/charts/charts.client.d.ts +17 -0
  30. package/dist/charts/charts.client.d.ts.map +1 -0
  31. package/dist/charts/types/charts.types.d.ts +54 -0
  32. package/dist/charts/types/charts.types.d.ts.map +1 -0
  33. package/dist/charts/types/index.d.ts +2 -0
  34. package/dist/charts/types/index.d.ts.map +1 -0
  35. package/dist/deadair.sdk.d.ts +49 -0
  36. package/dist/deadair.sdk.d.ts.map +1 -0
  37. package/dist/director/director.client.d.ts +98 -0
  38. package/dist/director/director.client.d.ts.map +1 -0
  39. package/dist/director/types/clock.types.d.ts +57 -0
  40. package/dist/director/types/clock.types.d.ts.map +1 -0
  41. package/dist/director/types/director.types.d.ts +212 -0
  42. package/dist/director/types/director.types.d.ts.map +1 -0
  43. package/dist/director/types/index.d.ts +3 -0
  44. package/dist/director/types/index.d.ts.map +1 -0
  45. package/dist/history/history.client.d.ts +12 -0
  46. package/dist/history/history.client.d.ts.map +1 -0
  47. package/dist/history/types/history.types.d.ts +44 -0
  48. package/dist/history/types/history.types.d.ts.map +1 -0
  49. package/dist/history/types/index.d.ts +2 -0
  50. package/dist/history/types/index.d.ts.map +1 -0
  51. package/dist/index.d.ts +49 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +3509 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/news/news.client.d.ts +17 -0
  56. package/dist/news/news.client.d.ts.map +1 -0
  57. package/dist/news/types/index.d.ts +2 -0
  58. package/dist/news/types/index.d.ts.map +1 -0
  59. package/dist/news/types/news.types.d.ts +61 -0
  60. package/dist/news/types/news.types.d.ts.map +1 -0
  61. package/dist/nowplaying/nowplaying.client.d.ts +12 -0
  62. package/dist/nowplaying/nowplaying.client.d.ts.map +1 -0
  63. package/dist/nowplaying/types/index.d.ts +2 -0
  64. package/dist/nowplaying/types/index.d.ts.map +1 -0
  65. package/dist/nowplaying/types/nowplaying.types.d.ts +59 -0
  66. package/dist/nowplaying/types/nowplaying.types.d.ts.map +1 -0
  67. package/dist/onboarding/onboarding.client.d.ts +11 -0
  68. package/dist/onboarding/onboarding.client.d.ts.map +1 -0
  69. package/dist/onboarding/types/index.d.ts +2 -0
  70. package/dist/onboarding/types/index.d.ts.map +1 -0
  71. package/dist/onboarding/types/onboarding.types.d.ts +41 -0
  72. package/dist/onboarding/types/onboarding.types.d.ts.map +1 -0
  73. package/dist/personas/personas.client.d.ts +167 -0
  74. package/dist/personas/personas.client.d.ts.map +1 -0
  75. package/dist/personas/types/index.d.ts +2 -0
  76. package/dist/personas/types/index.d.ts.map +1 -0
  77. package/dist/personas/types/personas.types.d.ts +545 -0
  78. package/dist/personas/types/personas.types.d.ts.map +1 -0
  79. package/dist/playlists/playlists.client.d.ts +17 -0
  80. package/dist/playlists/playlists.client.d.ts.map +1 -0
  81. package/dist/playlists/types/index.d.ts +2 -0
  82. package/dist/playlists/types/index.d.ts.map +1 -0
  83. package/dist/playlists/types/playlists.types.d.ts +71 -0
  84. package/dist/playlists/types/playlists.types.d.ts.map +1 -0
  85. package/dist/playout/playout.client.d.ts +37 -0
  86. package/dist/playout/playout.client.d.ts.map +1 -0
  87. package/dist/playout/types/index.d.ts +2 -0
  88. package/dist/playout/types/index.d.ts.map +1 -0
  89. package/dist/playout/types/playout.types.d.ts +163 -0
  90. package/dist/playout/types/playout.types.d.ts.map +1 -0
  91. package/dist/plugins/plugins.client.d.ts +107 -0
  92. package/dist/plugins/plugins.client.d.ts.map +1 -0
  93. package/dist/plugins/types/index.d.ts +2 -0
  94. package/dist/plugins/types/index.d.ts.map +1 -0
  95. package/dist/plugins/types/plugins.types.d.ts +330 -0
  96. package/dist/plugins/types/plugins.types.d.ts.map +1 -0
  97. package/dist/productions/productions.client.d.ts +22 -0
  98. package/dist/productions/productions.client.d.ts.map +1 -0
  99. package/dist/productions/types/index.d.ts +2 -0
  100. package/dist/productions/types/index.d.ts.map +1 -0
  101. package/dist/productions/types/productions.types.d.ts +90 -0
  102. package/dist/productions/types/productions.types.d.ts.map +1 -0
  103. package/dist/render/render.client.d.ts +210 -0
  104. package/dist/render/render.client.d.ts.map +1 -0
  105. package/dist/render/types/index.d.ts +2 -0
  106. package/dist/render/types/index.d.ts.map +1 -0
  107. package/dist/render/types/render.types.d.ts +518 -0
  108. package/dist/render/types/render.types.d.ts.map +1 -0
  109. package/dist/schedule/schedule.client.d.ts +37 -0
  110. package/dist/schedule/schedule.client.d.ts.map +1 -0
  111. package/dist/schedule/types/index.d.ts +2 -0
  112. package/dist/schedule/types/index.d.ts.map +1 -0
  113. package/dist/schedule/types/schedule.types.d.ts +119 -0
  114. package/dist/schedule/types/schedule.types.d.ts.map +1 -0
  115. package/dist/sdk-options.d.ts +45 -0
  116. package/dist/sdk-options.d.ts.map +1 -0
  117. package/dist/settings/settings.client.d.ts +17 -0
  118. package/dist/settings/settings.client.d.ts.map +1 -0
  119. package/dist/settings/types/index.d.ts +2 -0
  120. package/dist/settings/types/index.d.ts.map +1 -0
  121. package/dist/settings/types/settings.types.d.ts +35 -0
  122. package/dist/settings/types/settings.types.d.ts.map +1 -0
  123. package/dist/shared/types/index.d.ts +2 -0
  124. package/dist/shared/types/index.d.ts.map +1 -0
  125. package/dist/shared/types/pagination.d.ts +34 -0
  126. package/dist/shared/types/pagination.d.ts.map +1 -0
  127. package/dist/station/station.client.d.ts +49 -0
  128. package/dist/station/station.client.d.ts.map +1 -0
  129. package/dist/station/types/index.d.ts +4 -0
  130. package/dist/station/types/index.d.ts.map +1 -0
  131. package/dist/station/types/logs.types.d.ts +73 -0
  132. package/dist/station/types/logs.types.d.ts.map +1 -0
  133. package/dist/station/types/station.types.d.ts +120 -0
  134. package/dist/station/types/station.types.d.ts.map +1 -0
  135. package/dist/station/types/traces.types.d.ts +91 -0
  136. package/dist/station/types/traces.types.d.ts.map +1 -0
  137. package/dist/storage/storage.client.d.ts +12 -0
  138. package/dist/storage/storage.client.d.ts.map +1 -0
  139. package/dist/storage/types/index.d.ts +2 -0
  140. package/dist/storage/types/index.d.ts.map +1 -0
  141. package/dist/storage/types/storage.types.d.ts +59 -0
  142. package/dist/storage/types/storage.types.d.ts.map +1 -0
  143. package/dist/stream/stream.client.d.ts +32 -0
  144. package/dist/stream/stream.client.d.ts.map +1 -0
  145. package/dist/stream/types/index.d.ts +2 -0
  146. package/dist/stream/types/index.d.ts.map +1 -0
  147. package/dist/stream/types/stream.types.d.ts +47 -0
  148. package/dist/stream/types/stream.types.d.ts.map +1 -0
  149. package/dist/topics/topics.client.d.ts +32 -0
  150. package/dist/topics/topics.client.d.ts.map +1 -0
  151. package/dist/topics/types/index.d.ts +2 -0
  152. package/dist/topics/types/index.d.ts.map +1 -0
  153. package/dist/topics/types/topics.types.d.ts +65 -0
  154. package/dist/topics/types/topics.types.d.ts.map +1 -0
  155. package/package.json +53 -0
@@ -0,0 +1,54 @@
1
+ /**
2
+ * A chart one installed plugin offers
3
+ * generated from [StationChart](../../../../../apps/api/data/contracts/charts/charts.types.ck#L7)
4
+ */
5
+ export interface StationChart {
6
+ /** Unique across the station: the plugin's own id for the chart, qualified with the plugin that offered it. Two services both calling something `top-100` stay distinct */
7
+ id: string;
8
+ pluginId: string;
9
+ name: string;
10
+ /** ISO 3166-1 alpha-2, when the chart is national. Absent means global */
11
+ country?: string;
12
+ genre?: string;
13
+ description?: string;
14
+ }
15
+ /**
16
+ * One record's place in a chart
17
+ * generated from [ChartRecord](../../../../../apps/api/data/contracts/charts/charts.types.ck#L20)
18
+ */
19
+ export interface ChartRecord {
20
+ rank: number;
21
+ title: string;
22
+ /** The lead artist alone. The other credits are in `featuring` */
23
+ artist: string;
24
+ featuring?: string[];
25
+ album?: string;
26
+ year?: number;
27
+ /** Best position this record has reached, where the source tracks it */
28
+ peak?: number;
29
+ /** How many editions it has appeared in, where the source tracks it */
30
+ weeksOn?: number;
31
+ }
32
+ /**
33
+ * generated from [ChartQuery](../../../../../apps/api/data/contracts/charts/charts.types.ck#L31)
34
+ */
35
+ export interface ChartQuery {
36
+ limit?: number;
37
+ /** Which edition, as `YYYY-MM-DD`. Absent means the current one, and a service that keeps no history answers with the current one either way */
38
+ date?: string;
39
+ }
40
+ /**
41
+ * generated from [StationChartList](../../../../../apps/api/data/contracts/charts/charts.types.ck#L16)
42
+ */
43
+ export interface StationChartList {
44
+ charts: StationChart[];
45
+ }
46
+ /**
47
+ * generated from [ChartPage](../../../../../apps/api/data/contracts/charts/charts.types.ck#L36)
48
+ */
49
+ export interface ChartPage {
50
+ chartId: string;
51
+ /** Ranked. Empty when the chart could not be read, which is deliberately not an error: a chart is something to look at, never something the station needs to air */
52
+ records: ChartRecord[];
53
+ }
54
+ //# sourceMappingURL=charts.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.types.d.ts","sourceRoot":"","sources":["../../../src/charts/types/charts.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,2KAA2K;IAC3K,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gJAAgJ;IAChJ,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,oKAAoK;IACpK,OAAO,EAAE,WAAW,EAAE,CAAC;CAC1B"}
@@ -0,0 +1,2 @@
1
+ export * from './charts.types.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/types/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { SdkOptions } from './sdk-options.js';
2
+ import { ActivityClient } from './activity/activity.client.js';
3
+ import { ArtClient } from './art/art.client.js';
4
+ import { AuthenticationClient } from './authentication/authentication.client.js';
5
+ import { CatalogClient } from './catalog/catalog.client.js';
6
+ import { ChartsClient } from './charts/charts.client.js';
7
+ import { DirectorClient } from './director/director.client.js';
8
+ import { HistoryClient } from './history/history.client.js';
9
+ import { NewsClient } from './news/news.client.js';
10
+ import { NowplayingClient } from './nowplaying/nowplaying.client.js';
11
+ import { OnboardingClient } from './onboarding/onboarding.client.js';
12
+ import { PersonasClient } from './personas/personas.client.js';
13
+ import { PlaylistsClient } from './playlists/playlists.client.js';
14
+ import { PlayoutClient } from './playout/playout.client.js';
15
+ import { PluginsClient } from './plugins/plugins.client.js';
16
+ import { ProductionsClient } from './productions/productions.client.js';
17
+ import { RenderClient } from './render/render.client.js';
18
+ import { ScheduleClient } from './schedule/schedule.client.js';
19
+ import { SettingsClient } from './settings/settings.client.js';
20
+ import { StationClient } from './station/station.client.js';
21
+ import { StorageClient } from './storage/storage.client.js';
22
+ import { StreamClient } from './stream/stream.client.js';
23
+ import { TopicsClient } from './topics/topics.client.js';
24
+ export declare class DeadairSdk {
25
+ readonly activity: ActivityClient;
26
+ readonly art: ArtClient;
27
+ readonly authentication: AuthenticationClient;
28
+ readonly catalog: CatalogClient;
29
+ readonly charts: ChartsClient;
30
+ readonly director: DirectorClient;
31
+ readonly history: HistoryClient;
32
+ readonly news: NewsClient;
33
+ readonly nowplaying: NowplayingClient;
34
+ readonly onboarding: OnboardingClient;
35
+ readonly personas: PersonasClient;
36
+ readonly playlists: PlaylistsClient;
37
+ readonly playout: PlayoutClient;
38
+ readonly plugins: PluginsClient;
39
+ readonly productions: ProductionsClient;
40
+ readonly render: RenderClient;
41
+ readonly schedule: ScheduleClient;
42
+ readonly settings: SettingsClient;
43
+ readonly station: StationClient;
44
+ readonly storage: StorageClient;
45
+ readonly stream: StreamClient;
46
+ readonly topics: TopicsClient;
47
+ constructor(options: SdkOptions);
48
+ }
49
+ //# sourceMappingURL=deadair.sdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deadair.sdk.d.ts","sourceRoot":"","sources":["../src/deadair.sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE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AAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;gBAElB,OAAO,EAAE,UAAU;CAyBlC"}
@@ -0,0 +1,98 @@
1
+ import type { SdkFetch } from '../sdk-options.js';
2
+ import type { ClockBandInput, ClockBandList } from './types/clock.types.js';
3
+ import type { AddStationSegmentInput, AddStationTrackInput, ExtendStationInput, HoldStationInput, MoveStationItemInput, PutOnAirInput, ReplanStationInput, SetStationAirInput, SetStationHostInput, StationAir, StationOrder } from './types/director.types.js';
4
+ export declare class DirectorClient {
5
+ private fetch;
6
+ constructor(fetch: SdkFetch);
7
+ /**
8
+ * @name List clock bands
9
+ * @description Every band on this station's clock, including the ones switched off, in the operator's own order
10
+ */
11
+ listClockBands(): Promise<ClockBandList>;
12
+ /**
13
+ * @name Create clock band
14
+ * @description Adds a band. It claims its first boundary on the next commit pass
15
+ */
16
+ createClockBand(body: ClockBandInput): Promise<ClockBandList>;
17
+ /**
18
+ * @name Update clock band
19
+ * @description Rewrites one band. Breaks it has already planted stay where they are: the running order is the memory
20
+ */
21
+ updateClockBand(id: string, body: ClockBandInput): Promise<ClockBandList>;
22
+ /**
23
+ * @name Delete clock band
24
+ * @description Removes a band, which costs it the boundaries it had not claimed yet and nothing else
25
+ */
26
+ deleteClockBand(id: string): Promise<ClockBandList>;
27
+ /**
28
+ * @name Get station air
29
+ * @description What the station is airing, and whether it is driving at all
30
+ */
31
+ getStationAir(): Promise<StationAir>;
32
+ /**
33
+ * @name Put the station on air
34
+ * @description Puts the station on air, building the running order from a playlist read at this moment. What is playing finishes: changing the programming is not a reason to cut a listener off mid-track
35
+ */
36
+ putTheStationOnAir(body: PutOnAirInput): Promise<StationAir>;
37
+ /**
38
+ * @name Set the air mode
39
+ * @description Changes what puts the station on air: only while somebody is listening, or whenever there is a programme. Takes effect at once rather than at the next boundary
40
+ */
41
+ setTheAirMode(body: SetStationAirInput): Promise<StationAir>;
42
+ /**
43
+ * @name Get the running order
44
+ * @description The live running order, item by item, each saying where it has got to
45
+ */
46
+ getTheRunningOrder(): Promise<StationOrder>;
47
+ /**
48
+ * @name Recast the broadcast
49
+ * @description Changes who is presenting this broadcast. Breaks already written for it in the outgoing character are written again in the new one
50
+ */
51
+ recastTheBroadcast(body: SetStationHostInput): Promise<StationOrder>;
52
+ /**
53
+ * @name Extend the running order
54
+ * @description Queues a refill and returns at once. Generating a set walks the catalog, and an operator pressing a button should not be held open through it
55
+ */
56
+ extendTheRunningOrder(body: ExtendStationInput): Promise<void>;
57
+ /**
58
+ * @name Replan the running order
59
+ * @description Queues a fresh set for everything the player is not already holding, and swaps it in once it exists. The old tail keeps playing until then, because emptying the running order first would take the station off air while the model was still choosing
60
+ */
61
+ replanTheRunningOrder(body: ReplanStationInput): Promise<void>;
62
+ /**
63
+ * @name Hold the station against the schedule
64
+ * @description Holds the running order against the schedule, so a block boundary does not take back what an operator put on. A takeover is otherwise stamped with whichever slot was in force and is replaced when that block ends, which is correct and gives nobody any warning
65
+ */
66
+ holdTheStationAgainstTheSchedule(body: HoldStationInput): Promise<StationAir>;
67
+ /**
68
+ * @name Release the station to the schedule
69
+ * @description Releases a hold, so the next block boundary changes the station over as it ordinarily would. A station with no hold is unchanged rather than refused
70
+ */
71
+ releaseTheStationToTheSchedule(): Promise<StationAir>;
72
+ /**
73
+ * @name Shuffle the running order
74
+ * @description Shuffles the records not yet handed to the player, and plants the breaks again around the new sequence. The head is already in the player's hands and is left alone
75
+ */
76
+ shuffleTheRunningOrder(): Promise<StationOrder>;
77
+ /**
78
+ * @name Add a segment to the running order
79
+ * @description Puts something the station says into the running order. A segment with no audio yet is refused here rather than accepted and skipped when it comes round, so an operator is told why it cannot play
80
+ */
81
+ addASegmentToTheRunningOrder(body: AddStationSegmentInput): Promise<StationOrder>;
82
+ /**
83
+ * @name Add a record to the running order
84
+ * @description Puts a catalog record into the running order. A record whose audio is not local yet is refused here rather than accepted and held or skipped when its slot comes round, so an operator asking for a specific one is told why it cannot play. What makes this worth having on its own is undo: dropping an item only ever marks a segment, but a track is spliced out of the order entirely, so nothing could put one back until this existed
85
+ */
86
+ addARecordToTheRunningOrder(body: AddStationTrackInput): Promise<StationOrder>;
87
+ /**
88
+ * @name Move a running order item
89
+ * @description Moves an item. A position already handed to the player is refused rather than clamped
90
+ */
91
+ moveARunningOrderItem(itemId: string, body: MoveStationItemInput): Promise<StationOrder>;
92
+ /**
93
+ * @name Remove a running order item
94
+ * @description Drops an item that has not been handed to the player yet
95
+ */
96
+ removeARunningOrderItem(itemId: string): Promise<StationOrder>;
97
+ }
98
+ //# sourceMappingURL=director.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director.client.d.ts","sourceRoot":"","sources":["../../src/director/director.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EACR,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACf,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,cAAc;IACX,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAEnC;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;IAK9C;;;OAGG;IACG,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IASnE;;;OAGG;IACG,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAS/E;;;OAGG;IACG,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKzD;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAK1C;;;OAGG;IACG,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IASlE;;;OAGG;IACG,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC;IASlE;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC;IAKjD;;;OAGG;IACG,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAS1E;;;OAGG;IACG,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpE;;;OAGG;IACG,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpE;;;OAGG;IACG,gCAAgC,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IASnF;;;OAGG;IACG,8BAA8B,IAAI,OAAO,CAAC,UAAU,CAAC;IAK3D;;;OAGG;IACG,sBAAsB,IAAI,OAAO,CAAC,YAAY,CAAC;IAKrD;;;OAGG;IACG,4BAA4B,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC;IASvF;;;OAGG;IACG,2BAA2B,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IASpF;;;OAGG;IACG,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IAS9F;;;OAGG;IACG,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CAIvE"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * One rule on the station's format clock: a sort of break, and when it happens
3
+ * generated from [ClockBand](../../../../../apps/api/data/contracts/director/clock.types.ck#L8)
4
+ */
5
+ export interface ClockBand {
6
+ id: string;
7
+ /** Which sort of break this slot wants, as `segments.kind` spells it. Free text: a station that wants sponsor spots writes `sponsor` and drops the recordings in */
8
+ kind: string;
9
+ /** `clock` is a time of day and `interval` is a spacing rule for a kind the station's own interval does not cover */
10
+ at: 'clock' | 'interval';
11
+ /** For a `clock` band: the hour it happens at. Absent means every hour, which is the common case */
12
+ hour?: number;
13
+ /** For a `clock` band: minutes past the hour */
14
+ minute?: number;
15
+ /** For an `interval` band: how far apart, in milliseconds */
16
+ everyMs?: number;
17
+ /** Where this sits in the operator's own order, which is what settles a boundary two rules both want */
18
+ position: number;
19
+ /** A rule turned off without being lost */
20
+ enabled: boolean;
21
+ /** What this band is about, as a subject of its own kind: a news category, later a weather location. Absent means it covers whatever it finds */
22
+ topicId?: string;
23
+ /** That subject's name, so a list can be drawn without a second call */
24
+ topicLabel?: string;
25
+ }
26
+ export interface ClockBandInput {
27
+ /** Which sort of break this slot wants, as `segments.kind` spells it. Free text: a station that wants sponsor spots writes `sponsor` and drops the recordings in */
28
+ kind: string;
29
+ /** `clock` is a time of day and `interval` is a spacing rule for a kind the station's own interval does not cover */
30
+ at: 'clock' | 'interval';
31
+ /** For a `clock` band: the hour it happens at. Absent means every hour, which is the common case */
32
+ hour?: number;
33
+ /** For a `clock` band: minutes past the hour */
34
+ minute?: number;
35
+ /** For an `interval` band: how far apart, in milliseconds */
36
+ everyMs?: number;
37
+ /** Where this sits in the operator's own order, which is what settles a boundary two rules both want */
38
+ position: number;
39
+ /** A rule turned off without being lost */
40
+ enabled: boolean;
41
+ /** What this band is about, as a subject of its own kind: a news category, later a weather location. Absent means it covers whatever it finds */
42
+ topicId?: string;
43
+ }
44
+ /**
45
+ * generated from [ClockBandList](../../../../../apps/api/data/contracts/director/clock.types.ck#L21)
46
+ */
47
+ export interface ClockBandList {
48
+ bands: ClockBand[];
49
+ /** Which sorts of break this station can actually make right now: one it can write and speak, one it has recordings of, or one it produces as an episode. A band naming anything else claims its boundary and then passes over it */
50
+ producibleKinds: string[];
51
+ }
52
+ export interface ClockBandListInput {
53
+ bands: ClockBandInput[];
54
+ /** Which sorts of break this station can actually make right now: one it can write and speak, one it has recordings of, or one it produces as an episode. A band naming anything else claims its boundary and then passes over it */
55
+ producibleKinds: string[];
56
+ }
57
+ //# sourceMappingURL=clock.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clock.types.d.ts","sourceRoot":"","sources":["../../../src/director/types/clock.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,oKAAoK;IACpK,IAAI,EAAE,MAAM,CAAC;IACb,qHAAqH;IACrH,EAAE,EAAE,OAAO,GAAG,UAAU,CAAC;IACzB,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wGAAwG;IACxG,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,iJAAiJ;IACjJ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC3B,oKAAoK;IACpK,IAAI,EAAE,MAAM,CAAC;IACb,qHAAqH;IACrH,EAAE,EAAE,OAAO,GAAG,UAAU,CAAC;IACzB,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wGAAwG;IACxG,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,iJAAiJ;IACjJ,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,qOAAqO;IACrO,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,qOAAqO;IACrO,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B"}
@@ -0,0 +1,212 @@
1
+ import type { Rating } from '../../catalog/types/catalog.types.js';
2
+ /**
3
+ * What kind of programming the station is running, which decides the rules it runs under
4
+ * generated from [StationMode](../../../../../apps/api/data/contracts/director/director.types.ck#L8)
5
+ */
6
+ export type StationMode = 'rotation' | 'setlist' | 'feature';
7
+ /**
8
+ * What the mount lease is renewed against: `audience` airs only while somebody is listening, `always` airs whenever there is a programme
9
+ * generated from [AirMode](../../../../../apps/api/data/contracts/director/director.types.ck#L11)
10
+ */
11
+ export type AirMode = 'audience' | 'always';
12
+ /**
13
+ * Who chose what is on air. `schedule` is a block the clock changed over to and `sustaining` is what it plays in the hours no block claims — both are the schedule driving. `operator` is a person, including one who took over inside a scheduled block, and it holds until the next block begins. `off` is a station stood down
14
+ * generated from [AirSource](../../../../../apps/api/data/contracts/director/director.types.ck#L25)
15
+ */
16
+ export type AirSource = 'off' | 'schedule' | 'sustaining' | 'operator';
17
+ /**
18
+ * How long to keep the schedule off the running order
19
+ * generated from [HoldStationInput](../../../../../apps/api/data/contracts/director/director.types.ck#L27)
20
+ */
21
+ export interface HoldStationInput {
22
+ /** How long the hold lasts, from now. ABSENT means until it is released by hand, which is the answer for an operator who does not know yet — a day is the ceiling because a hold nobody remembers setting is worse than one that lapses */
23
+ minutes?: number;
24
+ }
25
+ /**
26
+ * What the station does when the running order runs out
27
+ * generated from [StationOnEnd](../../../../../apps/api/data/contracts/director/director.types.ck#L36)
28
+ */
29
+ export type StationOnEnd = 'extend' | 'repeat' | 'stop';
30
+ /**
31
+ * Where an item of the running order has got to. `handed` is a promise and `airing` is a fact, which is the distinction everything here is built around. The three terminal states that are not `played` are three different facts on a page that has to say why the station is silent: `skipped` is the station passing over an item it reached, `removed` is an operator taking one out before its turn, and `unavailable` is a record the station could not obtain the audio for — the only one of the three an operator can act on, since it names a copy rather than a decision
32
+ * generated from [StationItemState](../../../../../apps/api/data/contracts/director/director.types.ck#L39)
33
+ */
34
+ export type StationItemState = 'planned' | 'handed' | 'airing' | 'played' | 'skipped' | 'unavailable' | 'removed';
35
+ /**
36
+ * Change who is presenting the broadcast that is on air
37
+ * generated from [SetStationHostInput](../../../../../apps/api/data/contracts/director/director.types.ck#L94)
38
+ */
39
+ export interface SetStationHostInput {
40
+ /** Who hosts it from here on. Absent hands it back to whichever persona the station has on air, which is what a broadcast that never named one already does */
41
+ personaId?: string;
42
+ }
43
+ /**
44
+ * Put something the station says into the running order
45
+ * generated from [AddStationSegmentInput](../../../../../apps/api/data/contracts/director/director.types.ck#L98)
46
+ */
47
+ export interface AddStationSegmentInput {
48
+ segmentId: string;
49
+ /** Where to put it. Absent puts it at the end. A position already handed to the player is refused */
50
+ atIndex?: number;
51
+ /** Play it OVER the record that follows, this far into it, rather than in the gap before it. Absent plays it between two records, which is the simpler path */
52
+ overAtMs?: number;
53
+ }
54
+ /**
55
+ * Put a catalog record into the running order. Refused at the door — 404 for a record the catalog does not hold, 422 for one whose audio is not local yet — rather than accepted and left to fail when it comes round
56
+ * generated from [AddStationTrackInput](../../../../../apps/api/data/contracts/director/director.types.ck#L104)
57
+ */
58
+ export interface AddStationTrackInput {
59
+ trackId: string;
60
+ /** Where to put it. Absent puts it at the end. A position already handed to the player is refused */
61
+ atIndex?: number;
62
+ }
63
+ /**
64
+ * Move an item within the running order
65
+ * generated from [MoveStationItemInput](../../../../../apps/api/data/contracts/director/director.types.ck#L109)
66
+ */
67
+ export interface MoveStationItemInput {
68
+ toIndex: number;
69
+ }
70
+ /**
71
+ * Add tracks to the running order now, rather than waiting for it to run short
72
+ * generated from [ExtendStationInput](../../../../../apps/api/data/contracts/director/director.types.ck#L113)
73
+ */
74
+ export interface ExtendStationInput {
75
+ count?: number;
76
+ }
77
+ /**
78
+ * Throw away everything the player is not already holding and programme it again. Unlike a shuffle, the records themselves change; unlike putting the station on air, the broadcast continues
79
+ * generated from [ReplanStationInput](../../../../../apps/api/data/contracts/director/director.types.ck#L117)
80
+ */
81
+ export interface ReplanStationInput {
82
+ /** How many records to programme. Absent is roughly an hour */
83
+ count?: number;
84
+ /** What the station should play from here on, in your own words. Absent keeps whatever this broadcast was already asked for; an empty string CLEARS it, which hands the programming back to the station's ordinary rotation. It steers every later refill too, not just this one batch */
85
+ brief?: string;
86
+ }
87
+ /**
88
+ * Change how the station decides to be on air
89
+ * generated from [SetStationAirInput](../../../../../apps/api/data/contracts/director/director.types.ck#L31)
90
+ */
91
+ export interface SetStationAirInput {
92
+ airMode: AirMode;
93
+ }
94
+ /**
95
+ * What the station is airing, and whether it is driving at all
96
+ * generated from [StationAir](../../../../../apps/api/data/contracts/director/director.types.ck#L13)
97
+ */
98
+ export interface StationAir {
99
+ /** False means the station was stood down. What it was playing is remembered so the console can still say what it was */
100
+ active: boolean;
101
+ /** What puts the station on air. In `audience` mode a station that is active with a full running order is still silent while nobody is connected, which is the intended state and not a fault */
102
+ airMode: AirMode;
103
+ /** What is on. Absent before the station has ever been given anything to play */
104
+ name?: string;
105
+ /** Who built what is on: `import` or `director` */
106
+ source?: string;
107
+ /** Items left before the running order runs out and `onEnd` decides what happens */
108
+ remaining: number;
109
+ /** Which slot of the schedule this broadcast belongs to. Absent means nothing scheduled it, which is every station with no schedule */
110
+ slotId?: string;
111
+ /** Who is driving the station right now */
112
+ airSource: AirSource;
113
+ /** Whether the schedule has been told to leave this broadcast alone. A takeover is otherwise replaced when the block it started inside ends */
114
+ held: boolean;
115
+ /** When that hold lapses, as an ISO-8601 instant. ABSENT WHILE `held` IS TRUE means until it is released by hand, which is a real state rather than a missing value — `Infinity` is not a thing JSON can carry, so the two facts are two fields */
116
+ holdUntil?: string;
117
+ }
118
+ /**
119
+ * Put the station on air, building its running order from the top
120
+ * generated from [PutOnAirInput](../../../../../apps/api/data/contracts/director/director.types.ck#L79)
121
+ */
122
+ export interface PutOnAirInput {
123
+ /** The plugin whose playlist to build from. Absent starts empty and lets the station generate its own programming */
124
+ pluginId?: string;
125
+ /** Required alongside `pluginId`. The playlist is READ at this moment rather than copied, so it is never edited by having been aired */
126
+ playlistId?: string;
127
+ /** A published chart to build from instead, as `pluginId:chartId`. An ALTERNATIVE to `pluginId` and `playlistId` rather than a companion: a chart names records where a playlist names copies, so its entries are looked up and ingested before they can air, and a station with `rotation.discover` off can play almost none of one */
128
+ chartId?: string;
129
+ /** Which way round to play it. `countdown` opens on the lowest rank and ends on number one, which is the shape a chart show has; `ranked` walks the published document from the top; `unordered` leaves the sequence to the station's own artist spacing. Absent is `countdown`. Ignored without `chartId` */
130
+ chartOrder?: 'countdown' | 'ranked' | 'unordered';
131
+ /** What to call this broadcast. Absent names it after the chart, or after the plugin, since only the surface that listed the source knows its own name for it */
132
+ name?: string;
133
+ /** What the station should play, in your own words: "heavy metal hits". It steers every refill for as long as this broadcast runs, not just the first batch, and it needs a model to programme with. Absent programmes the station the way its own rules do */
134
+ brief?: string;
135
+ /** Who is hosting this broadcast. It rides the running order for as long as the broadcast does, so the presenter cannot drift back mid-show. Absent uses whichever persona the station has on air */
136
+ personaId?: string;
137
+ /** The earliest release year this broadcast plays. Absent means no lower bound, and a record whose year the catalog does not know is played whatever the period */
138
+ eraFrom?: number;
139
+ /** The latest release year, on the same terms. Set with `eraFrom` for a decade; either may stand alone */
140
+ eraTo?: number;
141
+ /** Whether somebody phones in during this broadcast. A call is a short programme rather than a break: a few turns in a few voices, entering the running order as one block, spaced by `rotation.callinEveryMinutes`. Absent takes the station's own setting, which is off */
142
+ callins?: boolean;
143
+ mode?: StationMode;
144
+ onEnd?: StationOnEnd;
145
+ }
146
+ /**
147
+ * One item of the live running order, and where it has got to
148
+ * generated from [StationOrderItem](../../../../../apps/api/data/contracts/director/director.types.ck#L41)
149
+ */
150
+ export interface StationOrderItem {
151
+ /** What an edit names, what rides through the player, and what comes back on its readings */
152
+ id: string;
153
+ /** Whether this is a record or something the station says: an ident, a stinger, a talk break */
154
+ kind: 'track' | 'segment';
155
+ state: StationItemState;
156
+ /** The record's title, or the segment's label. What the mount is labelled with while it airs */
157
+ title: string;
158
+ /** Empty for a segment, which has no artist */
159
+ artists: string[];
160
+ durationMs?: number;
161
+ /** Absent on a segment: the station serves its own audio */
162
+ pluginId?: string;
163
+ /** Absent on a segment */
164
+ externalId?: string;
165
+ album?: string;
166
+ artworkUrl?: string;
167
+ year?: number;
168
+ /** The canonical catalog track, when this is one the catalog holds */
169
+ trackId?: string;
170
+ /** The canonical artist behind that track, so a console can reach their page from the running order. Absent on a segment, and on a record the catalog has never seen */
171
+ artistId?: string;
172
+ /** The release that track was ingested inside. Absent for the two reasons above and for a third: a single ingested outside any release has none */
173
+ albumId?: string;
174
+ /** What the station thinks of this record, read as the order is drawn rather than stored on it. Absent on a segment, and on a record the catalog has never seen */
175
+ rating?: Rating;
176
+ /** Which segment this plays. Present only on a segment */
177
+ segmentId?: string;
178
+ segmentState?: 'planned' | 'writing' | 'written' | 'rendering' | 'ready' | 'failed' | 'gone';
179
+ /** Whether the station can actually air this segment. One that cannot is SKIPPED when it comes round, rather than held open */
180
+ playable?: boolean;
181
+ /** Why this segment will not air, in a sentence. Present only on a failed one */
182
+ segmentError?: string;
183
+ /** What decided the words: the station's own templates, or the model that wrote them. Absent on a recording somebody made */
184
+ segmentWriter?: string;
185
+ /** Heard OVER the record that follows, this far into it, with the music ducked under it. Such an item is never handed to the player in its own right */
186
+ overAtMs?: number;
187
+ }
188
+ /**
189
+ * The station's live running order: what is airing, item by item
190
+ * generated from [StationOrder](../../../../../apps/api/data/contracts/director/director.types.ck#L65)
191
+ */
192
+ export interface StationOrder {
193
+ /** What is on, for a console to draw. A label for this broadcast rather than the name of a stored object */
194
+ name: string;
195
+ /** What the operator asked the station to play, in their own words. It keeps steering every refill until the station is put on air again, so a console should show it rather than only accept it */
196
+ brief?: string;
197
+ /** Who is hosting this broadcast, when it named somebody. Absent means whichever persona the station has on air */
198
+ personaId?: string;
199
+ /** What that host is called, resolved as the order is read so a console need not fetch the persona list to draw a name */
200
+ personaLabel?: string;
201
+ mode: StationMode;
202
+ onEnd: StationOnEnd;
203
+ /** Who built it: `import`, `chart` or `director` */
204
+ source: string;
205
+ /** Where more material is pulled from, when it came from a playlist */
206
+ sourcePluginId?: string;
207
+ sourcePlaylistId?: string;
208
+ /** The published chart this broadcast was built from, qualified with the plugin that offered it. Provenance rather than a binding: a chart is a fixed document, so it is read once and never topped up from */
209
+ sourceChartId?: string;
210
+ items: StationOrderItem[];
211
+ }
212
+ //# sourceMappingURL=director.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"director.types.d.ts","sourceRoot":"","sources":["../../../src/director/types/director.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE5C;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2OAA2O;IAC3O,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;AAElH;;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wKAAwK;IACxK,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mJAAmJ;IACnJ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mKAAmK;IACnK,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7F,+HAA+H;IAC/H,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6HAA6H;IAC7H,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wJAAwJ;IACxJ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,4GAA4G;IAC5G,IAAI,EAAE,MAAM,CAAC;IACb,oMAAoM;IACpM,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mHAAmH;IACnH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;IACpB,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+MAA+M;IAC/M,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC7B"}
@@ -0,0 +1,3 @@
1
+ export * from './clock.types.js';
2
+ export * from './director.types.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/director/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { SdkFetch } from '../sdk-options.js';
2
+ import type { HistoryPage, HistoryQuery } from './types/history.types.js';
3
+ export declare class HistoryClient {
4
+ private fetch;
5
+ constructor(fetch: SdkFetch);
6
+ /**
7
+ * @name Read history
8
+ * @description What the station played, newest first, one page at a time
9
+ */
10
+ readHistory(query?: HistoryQuery): Promise<HistoryPage>;
11
+ }
12
+ //# sourceMappingURL=history.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.client.d.ts","sourceRoot":"","sources":["../../src/history/history.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG1E,qBAAa,aAAa;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAEnC;;;OAGG;IACG,WAAW,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;CAOhE"}
@@ -0,0 +1,44 @@
1
+ import { DateTime } from 'luxon';
2
+ /**
3
+ * One record the station actually played
4
+ * generated from [HistoryEntry](../../../../../apps/api/data/contracts/history/history.types.ck#L7)
5
+ */
6
+ export interface HistoryEntry {
7
+ /** Unique across the history, and half of the cursor below */
8
+ id: string;
9
+ /** When it started, written when it began rather than when it was handed to the player */
10
+ airedAt: DateTime;
11
+ title: string;
12
+ /** The credit as written, whole: one line rather than a list, because that is the shape a release credits itself in and splitting it renames acts with a comma in their name */
13
+ artists: string;
14
+ /** Absent for anything aired straight from a provider, which the catalog holds no record for */
15
+ album?: string;
16
+ /** The station's own copy where it has one, as a path under the API root, and the upstream URL until then. Resolve it against the base the station is reached at */
17
+ artworkUrl?: string;
18
+ /** How long the recording runs, from the catalog rather than from the copy that played */
19
+ durationMs?: number;
20
+ /** The catalog track this was, for a client that wants to ask more about it. Absent for a record the catalog does not hold, and for one it has since forgotten */
21
+ trackId?: string;
22
+ }
23
+ /** Rehydrates every wire-encoded scalar in a HistoryEntry into its runtime type. Mutates and returns `raw`. */
24
+ export declare function reviveHistoryEntry(raw: HistoryEntry): HistoryEntry;
25
+ /**
26
+ * One page of the history, newest first
27
+ * generated from [HistoryQuery](../../../../../apps/api/data/contracts/history/history.types.ck#L18)
28
+ */
29
+ export interface HistoryQuery {
30
+ limit?: number;
31
+ /** Where the previous page ended. Opaque, and a keyset rather than an offset because rows arrive at the head continuously: an offset would re-show a row on every page as the station kept playing under it. Pass back whatever `nextBefore` said and nothing else */
32
+ before?: string;
33
+ }
34
+ /**
35
+ * generated from [HistoryPage](../../../../../apps/api/data/contracts/history/history.types.ck#L23)
36
+ */
37
+ export interface HistoryPage {
38
+ entries: HistoryEntry[];
39
+ /** The cursor for the page after this one, absent once the history has been read to its end */
40
+ nextBefore?: string;
41
+ }
42
+ /** Rehydrates every wire-encoded scalar in a HistoryPage into its runtime type. Mutates and returns `raw`. */
43
+ export declare function reviveHistoryPage(raw: HistoryPage): HistoryPage;
44
+ //# sourceMappingURL=history.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.types.d.ts","sourceRoot":"","sources":["../../../src/history/types/history.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAYjC;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,0FAA0F;IAC1F,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,gLAAgL;IAChL,OAAO,EAAE,MAAM,CAAC;IAChB,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oKAAoK;IACpK,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kKAAkK;IAClK,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,+GAA+G;AAC/G,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAIlE;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sQAAsQ;IACtQ,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,8GAA8G;AAC9G,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,WAAW,CAS/D"}
@@ -0,0 +1,2 @@
1
+ export * from './history.types.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/history/types/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC"}