@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,71 @@
1
+ /**
2
+ * An action a source will permit on one playlist's items. Item-scoped: neither value covers the playlist's own name or description
3
+ * generated from [PlaylistPermission](../../../../../apps/api/data/contracts/playlists/playlists.types.ck#L8)
4
+ */
5
+ export type PlaylistPermission = 'read' | 'edit';
6
+ /**
7
+ * One record as its PROVIDER describes it, plus what the catalog can say about the same copy.
8
+ *
9
+ * The first half mirrors the plugin SDK's `ProviderTrack` and stays the provider's answer: this is a
10
+ * listing of what a playlist holds, not of what the station has ingested. The three ids below are the
11
+ * station's own and are absent for anything it has never seen, which on most playlists is plenty of
12
+ * rows — a playlist is a provider's list and the library is what a sync has walked
13
+ * generated from [CatalogTrack](../../../../../apps/api/data/contracts/playlists/playlists.types.ck#L28)
14
+ */
15
+ export interface CatalogTrack {
16
+ /** The PROVIDER's id for this copy, which is what an import names it by. Never a `deadair.tracks` id */
17
+ id: string;
18
+ title: string;
19
+ /** Ordered, primary artist first. Empty array if the provider genuinely has none */
20
+ artists: string[];
21
+ album?: string;
22
+ durationMs?: number;
23
+ isrc?: string;
24
+ artworkUrl?: string;
25
+ /** The canonical `deadair.tracks` row this copy is bound to, when the catalog holds one */
26
+ trackId?: string;
27
+ /** The canonical artist behind that row */
28
+ artistId?: string;
29
+ /** The release that row was ingested inside. Absent for a single ingested outside any */
30
+ albumId?: string;
31
+ }
32
+ /**
33
+ * One catalog-capable plugin that could not be listed
34
+ * generated from [CatalogSourceError](../../../../../apps/api/data/contracts/playlists/playlists.types.ck#L42)
35
+ */
36
+ export interface CatalogSourceError {
37
+ pluginId: string;
38
+ pluginName: string;
39
+ message: string;
40
+ }
41
+ /**
42
+ * A playlist a catalog-capable plugin offers, tagged with the plugin it came from so an aggregated list is addressable
43
+ * generated from [CatalogPlaylist](../../../../../apps/api/data/contracts/playlists/playlists.types.ck#L11)
44
+ */
45
+ export interface CatalogPlaylist {
46
+ pluginId: string;
47
+ pluginName: string;
48
+ id: string;
49
+ name: string;
50
+ description?: string;
51
+ trackCount?: number;
52
+ artworkUrl?: string;
53
+ /** What the SOURCE permits on this playlist's items, not what this actor may do. Empty means the source permits nothing; absent means it did not say */
54
+ permissions?: PlaylistPermission[];
55
+ }
56
+ /**
57
+ * generated from [CatalogPlaylistTracks](../../../../../apps/api/data/contracts/playlists/playlists.types.ck#L53)
58
+ */
59
+ export interface CatalogPlaylistTracks {
60
+ pluginId: string;
61
+ playlistId: string;
62
+ tracks: CatalogTrack[];
63
+ }
64
+ /**
65
+ * generated from [CatalogPlaylistPage](../../../../../apps/api/data/contracts/playlists/playlists.types.ck#L48)
66
+ */
67
+ export interface CatalogPlaylistPage {
68
+ playlists: CatalogPlaylist[];
69
+ errors: CatalogSourceError[];
70
+ }
71
+ //# sourceMappingURL=playlists.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playlists.types.d.ts","sourceRoot":"","sources":["../../../src/playlists/types/playlists.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IACzB,wGAAwG;IACxG,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,oFAAoF;IACpF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wJAAwJ;IACxJ,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAChC"}
@@ -0,0 +1,37 @@
1
+ import type { SdkFetch } from '../sdk-options.js';
2
+ import type { PlayoutChartInput, PlayoutPlaylistInput, PlayoutStatus } from './types/playout.types.js';
3
+ export declare class PlayoutClient {
4
+ private fetch;
5
+ constructor(fetch: SdkFetch);
6
+ /**
7
+ * @name Get playout status
8
+ * @description What the station is playing and what is queued behind it. The console polls this
9
+ */
10
+ getPlayoutStatus(): Promise<PlayoutStatus>;
11
+ /**
12
+ * @name Play a playlist
13
+ * @description Loads a plugin playlist into the running order and starts handing it to the player. Replaces whatever was queued; what is on air finishes rather than being cut off
14
+ */
15
+ playAPlaylist(body: PlayoutPlaylistInput): Promise<PlayoutStatus>;
16
+ /**
17
+ * @name Play a chart
18
+ * @description Builds the running order from a published chart and starts handing it to the player. The same replacement a playlist makes, from a document somebody else ranked
19
+ */
20
+ playAChart(body: PlayoutChartInput): Promise<PlayoutStatus>;
21
+ /**
22
+ * @name Skip the current item
23
+ * @description Ends the item on air so the next one starts immediately. The station owns the decoder, so this lands at once rather than waiting out audio already committed to a player
24
+ */
25
+ skipTheCurrentItem(): Promise<PlayoutStatus>;
26
+ /**
27
+ * @name Start playout
28
+ * @description Puts the station back on air with the running order it already has, picking it up where Stop left it. Distinct from putting a playlist on air, which builds a new broadcast and throws away what was there. Refused when there is nothing left to resume
29
+ */
30
+ startPlayout(): Promise<PlayoutStatus>;
31
+ /**
32
+ * @name Stop playout
33
+ * @description Stands the station down: stops what is on air at once and hands the mount back. The running order is LEFT as it is, so `/playout/start` can pick it up where this stopped it. deadair holds the mount on a lease it renews while it has something to play, so stopping goes quiet rather than falling through to a bed nobody programmed
34
+ */
35
+ stopPlayout(): Promise<PlayoutStatus>;
36
+ }
37
+ //# sourceMappingURL=playout.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playout.client.d.ts","sourceRoot":"","sources":["../../src/playout/playout.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEvG,qBAAa,aAAa;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAEnC;;;OAGG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;IAKhD;;;OAGG;IACG,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;IASvE;;;OAGG;IACG,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IASjE;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,aAAa,CAAC;IAKlD;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC;IAK5C;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC;CAI9C"}
@@ -0,0 +1,2 @@
1
+ export * from './playout.types.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/playout/types/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * The plugin playlist to load into the running order
3
+ * generated from [PlayoutPlaylistInput](../../../../../apps/api/data/contracts/playout/playout.types.ck#L7)
4
+ */
5
+ export interface PlayoutPlaylistInput {
6
+ pluginId: string;
7
+ playlistId: string;
8
+ }
9
+ /**
10
+ * The published chart to build the running order from
11
+ * generated from [PlayoutChartInput](../../../../../apps/api/data/contracts/playout/playout.types.ck#L12)
12
+ */
13
+ export interface PlayoutChartInput {
14
+ /** As `pluginId:chartId`, which is how `GET /charts` lists them */
15
+ chartId: string;
16
+ /** Which way round to play it. Absent is `countdown`, which opens on the lowest rank and ends on number one */
17
+ chartOrder?: 'countdown' | 'ranked' | 'unordered';
18
+ }
19
+ /**
20
+ * One item in the running order, as the console sees it
21
+ * generated from [PlayoutItem](../../../../../apps/api/data/contracts/playout/playout.types.ck#L17)
22
+ */
23
+ export interface PlayoutItem {
24
+ /** deadair's own id for this item, not the provider's: a playlist may hold the same track twice */
25
+ id: string;
26
+ pluginId: string;
27
+ /** The track's id in its plugin's id space */
28
+ externalId: string;
29
+ title: string;
30
+ artists: string[];
31
+ /** Integer milliseconds. Deliberately not the `duration` scalar, which is a Luxon `Duration` over an ISO-8601 string */
32
+ durationMs?: number;
33
+ album?: string;
34
+ /** The locally cached cover where there is one, the provider's URL otherwise */
35
+ artworkUrl?: string;
36
+ /** First release year, when the catalog knows one */
37
+ year?: number;
38
+ /** The canonical `deadair.tracks` id, when this item is a track the catalog holds. Absent for anything the catalog has never seen */
39
+ trackId?: string;
40
+ }
41
+ /**
42
+ * A stream container still running config the app has replaced. Icecast and Liquidsoap read
43
+ * their rendered config ONCE, at startup, and nothing restarts or signals them when it is
44
+ * re-rendered — so a reseeded secret leaves a process holding credentials that match nothing,
45
+ * and the symptom names something else entirely (every listener refused, or no mount at all).
46
+ * The app cannot restart a sibling container and should not be able to, so it reports.
47
+ * generated from [StreamConfigWarning](../../../../../apps/api/data/contracts/playout/playout.types.ck#L41)
48
+ */
49
+ export interface StreamConfigWarning {
50
+ /** Which one is behind */
51
+ container: 'icecast' | 'liquidsoap';
52
+ /** What is wrong and how it is known, in a sentence */
53
+ detail: string;
54
+ /** The exact command that adopts the new config, which is the only thing that does */
55
+ restart: string;
56
+ }
57
+ /**
58
+ * Which gate is keeping the station quiet, or `airing` when none of them is. Ordered by cause: a
59
+ * stalled transport loop makes every reading under it stale, so it is ruled out first
60
+ * generated from [SilenceCause](../../../../../apps/api/data/contracts/playout/playout.types.ck#L49)
61
+ */
62
+ export type SilenceCause = 'airing' | 'transportStalled' | 'controlDenied' | 'streamUnreachable' | 'configNotAdopted' | 'stoodDown' | 'noProgramme' | 'noAudience' | 'warmingUp' | 'waitingOnAudio' | 'notDriving' | 'starved';
63
+ /**
64
+ * How one gate is doing. `waiting` is its own state rather than a mild fault, because a station
65
+ * idling for want of a listener and a station that cannot reach its stream are both silent and only
66
+ * one of them is something to go and fix
67
+ * generated from [SilenceState](../../../../../apps/api/data/contracts/playout/playout.types.ck#L67)
68
+ */
69
+ export type SilenceState = 'ok' | 'waiting' | 'fault';
70
+ /**
71
+ * One mount the station is publishing right now
72
+ * generated from [PlayoutMount](../../../../../apps/api/data/contracts/playout/playout.types.ck#L84)
73
+ */
74
+ export interface PlayoutMount {
75
+ format: 'mp3' | 'opus' | 'aac' | 'flac';
76
+ /** Same-origin path, on the same terms as `PlayoutStatus.mountPath` */
77
+ path: string;
78
+ /** Absent for FLAC, which is lossless and has no rate to set */
79
+ bitrateKbps?: number;
80
+ }
81
+ /**
82
+ * Which rundown item Liquidsoap has just started playing
83
+ * generated from [PlayoutAiredQuery](../../../../../apps/api/data/contracts/playout/playout.types.ck#L104)
84
+ */
85
+ export interface PlayoutAiredQuery {
86
+ /** The id the app put on the pushed uri's `annotate:` metadata */
87
+ item: string;
88
+ }
89
+ /**
90
+ * Which way the running order went, and how long it had been that way
91
+ * generated from [PlayoutStarveQuery](../../../../../apps/api/data/contracts/playout/playout.types.ck#L108)
92
+ */
93
+ export interface PlayoutStarveQuery {
94
+ /** `starved`: the queue stopped producing while deadair was driving, so the mount fell through to the local bed. `recovered`: it is producing again */
95
+ state: 'starved' | 'recovered';
96
+ /** How long the PREVIOUS state lasted, in milliseconds. On a recovery this is the length of the gap, which is the number worth reading */
97
+ forMs: number;
98
+ }
99
+ /**
100
+ * What the PLAYER says is airing, which is not the same as what was last handed to it
101
+ * generated from [PlayoutNowPlaying](../../../../../apps/api/data/contracts/playout/playout.types.ck#L30)
102
+ */
103
+ export interface PlayoutNowPlaying {
104
+ item: PlayoutItem;
105
+ /** Unix epoch millis, as observed when the player reported it */
106
+ startedAt: number;
107
+ /** The decoder's own countdown, absent when it cannot say. It leads the listener by the encoder and client buffers */
108
+ remainingMs?: number;
109
+ }
110
+ /**
111
+ * One gate's answer about itself
112
+ * generated from [SilenceCheck](../../../../../apps/api/data/contracts/playout/playout.types.ck#L69)
113
+ */
114
+ export interface SilenceCheck {
115
+ /** Never `airing`, which is the absence of a blocking gate rather than a gate */
116
+ code: SilenceCause;
117
+ state: SilenceState;
118
+ /** What this gate is doing right now, whether or not it is the one blocking */
119
+ detail: string;
120
+ /** What would clear it, where there is something an operator can actually do */
121
+ remedy?: string;
122
+ }
123
+ /**
124
+ * Why the station cannot be heard, as one answer
125
+ * generated from [StationSilence](../../../../../apps/api/data/contracts/playout/playout.types.ck#L76)
126
+ */
127
+ export interface StationSilence {
128
+ /** Whether the station believes its programme is reaching the mount. NOT whether anybody is hearing it: a station can be audible with no listeners in `always` mode, and can have listeners while airing the local bed */
129
+ audible: boolean;
130
+ cause: SilenceCause;
131
+ detail: string;
132
+ remedy?: string;
133
+ /** Every gate, in the order they are judged, so a console can say what it ruled out. A `configNotAdopted` fault appears here and is never the cause, because a station can air perfectly well while it is true */
134
+ checks: SilenceCheck[];
135
+ }
136
+ /**
137
+ * The station's transport, as one reading
138
+ * generated from [PlayoutStatus](../../../../../apps/api/data/contracts/playout/playout.types.ck#L90)
139
+ */
140
+ export interface PlayoutStatus {
141
+ /** Whether Liquidsoap's control API is answering at all. False means nothing can air, whatever the running order holds */
142
+ streamUp: boolean;
143
+ /** Whether the station is actually broadcasting. deadair holds the mount on a lease it renews only while it has a programme, so a reachable stream with nothing to play is up and NOT on air: it is connected, and airing silence */
144
+ onAir: boolean;
145
+ /** Same-origin path of the Icecast MP3 mount, which is always published and is the one a console names when it can only name one. A path rather than a URL: the browser reaches Icecast through whatever edge served the SPA, never at the address the app itself uses */
146
+ mountPath: string;
147
+ /** Every mount being published, MP3 first, so a console can offer the others rather than implying the station is only on one. Never empty: MP3 has no switch. A format the operator has not switched on is absent rather than present and disabled, because every consumer of this wants the mounts that are actually there */
148
+ mounts: PlayoutMount[];
149
+ nowPlaying?: PlayoutNowPlaying;
150
+ /** Waiting here, in order. Excludes what the player already holds */
151
+ upNext: PlayoutItem[];
152
+ /** How many items are waiting in total, of which `upNext` is the head */
153
+ queuedCount: number;
154
+ /** How many clients Icecast has attached to the mount. Zero both for "nobody is listening" and for an Icecast that is not answering, which `audience` is where to tell apart */
155
+ listeners: number;
156
+ /** Whether the station counts as having an audience, which lingers for a minute past the last listener so a reconnecting player does not cut the broadcast */
157
+ audience: boolean;
158
+ /** Containers running config the app has since replaced. Empty is the ordinary state, and so is empty for anything the app has no evidence about: a warning here has never been a guess */
159
+ staleStreamConfig: StreamConfigWarning[];
160
+ /** Which gate is keeping the station quiet, composed from every one of them rather than inferred from the fields above. `streamUp`, `onAir`, `audience` and `queuedCount` each answer for one gate and a console reading them alone has to guess at the rest */
161
+ silence: StationSilence;
162
+ }
163
+ //# sourceMappingURL=playout.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playout.types.d.ts","sourceRoot":"","sources":["../../../src/playout/types/playout.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,+GAA+G;IAC/G,UAAU,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,mGAAmG;IACnG,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wHAAwH;IACxH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qIAAqI;IACrI,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,GAAG,YAAY,CAAC;IACpC,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,M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CAAC,EAAE,MAAM,CAAC;IAChB,kNAAkN;IAClN,MAAM,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,0HAA0H;IAC1H,QAAQ,EAAE,OAAO,CAAC;IAClB,qOAAqO;IACrO,KAAK,EAAE,OAAO,CAAC;IACf,0QAA0Q;IAC1Q,SAAS,EAAE,MAAM,CAAC;IAClB,+TAA+T;IAC/T,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,qEAAqE;IACrE,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,gLAAgL;IAChL,SAAS,EAAE,MAAM,CAAC;IAClB,8JAA8J;IAC9J,QAAQ,EAAE,OAAO,CAAC;IAClB,2LAA2L;IAC3L,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,gQAAgQ;IAChQ,OAAO,EAAE,cAAc,CAAC;CAC3B"}
@@ -0,0 +1,107 @@
1
+ import type { SdkFetch } from '../sdk-options.js';
2
+ import type { PluginConfigInput, PluginDetail, PluginFieldSuggestions, PluginGrantInput, PluginGrantList, PluginImportResult, PluginLogLevelInput, PluginLogPage, PluginLogQuery, PluginOAuthCallbackQuery, PluginOAuthResult, PluginOAuthStart, PluginSummary, PluginTestResult } from './types/plugins.types.js';
3
+ export declare class PluginsClient {
4
+ private fetch;
5
+ constructor(fetch: SdkFetch);
6
+ /**
7
+ * @name List plugins
8
+ * @description Lists every plugin the host knows about
9
+ */
10
+ listPlugins(): Promise<PluginSummary[]>;
11
+ /**
12
+ * @name List plugin grants
13
+ * @description Every capability an installed plugin is asking the operator for, with the answer so far
14
+ */
15
+ listPluginGrants(): Promise<PluginGrantList>;
16
+ /**
17
+ * @name Rescan plugins
18
+ * @description Rescans the mounted plugin directory: registers new plugins, unloads removed ones
19
+ */
20
+ rescanPlugins(): Promise<PluginSummary[]>;
21
+ /**
22
+ * @name Import plugin
23
+ * @description Takes a plugin in from the browser as the tarball npm pack writes and puts it in the plugins directory. It lands disabled, and a newer version of an installed plugin replaces the older one
24
+ */
25
+ importPlugin(body: FormData): Promise<PluginImportResult>;
26
+ /**
27
+ * @name Get plugin
28
+ * @description One plugin, including its stored non-secret configuration and last error
29
+ */
30
+ getPlugin(id: string): Promise<PluginDetail>;
31
+ /**
32
+ * @name Remove plugin
33
+ * @description Removes a plugin the operator installed: stops it and deletes its folder. Its settings are kept, so importing it again brings them back. A bundled plugin is refused
34
+ */
35
+ removePlugin(id: string): Promise<PluginSummary[]>;
36
+ /**
37
+ * @name Update plugin configuration
38
+ * @description Validates against the plugin's own config schema, encrypts secrets, persists, and reinitializes
39
+ */
40
+ updatePluginConfiguration(id: string, body: PluginConfigInput): Promise<PluginDetail>;
41
+ /**
42
+ * @name Enable plugin
43
+ * @description Enables a plugin without resubmitting its configuration
44
+ */
45
+ enablePlugin(id: string): Promise<PluginDetail>;
46
+ /**
47
+ * @name Disable plugin
48
+ * @description Disables a plugin and tears its instance down, keeping its configuration
49
+ */
50
+ disablePlugin(id: string): Promise<PluginDetail>;
51
+ /**
52
+ * @name Decide plugin grant
53
+ * @description Answers one capability this plugin asked for. Takes effect on the next fetch, with no reload
54
+ */
55
+ decidePluginGrant(id: string, body: PluginGrantInput): Promise<PluginGrantList>;
56
+ /**
57
+ * @name Reload plugin
58
+ * @description Reapplies the plugin's stored configuration: disposes the running instance and initializes it again
59
+ */
60
+ reloadPlugin(id: string): Promise<PluginDetail>;
61
+ /**
62
+ * @name Test plugin connection
63
+ * @description Runs the plugin's own `testConnection()` through the invoker
64
+ */
65
+ testPluginConnection(id: string): Promise<PluginTestResult>;
66
+ /**
67
+ * @name Suggest plugin config options
68
+ * @description Asks the plugin what to offer for its config fields right now, through the invoker
69
+ */
70
+ suggestPluginConfigOptions(id: string): Promise<PluginFieldSuggestions>;
71
+ /**
72
+ * @name Get plugin logs
73
+ * @description Returns the plugin's buffered log lines at or above the current log level
74
+ */
75
+ getPluginLogs(id: string, query?: PluginLogQuery): Promise<PluginLogPage>;
76
+ /**
77
+ * @name Download plugin logs
78
+ * @description Streams the plugin's full retained log as a plain-text attachment
79
+ */
80
+ downloadPluginLogs(id: string): Promise<{
81
+ data: string;
82
+ headers: {
83
+ contentDisposition?: string;
84
+ };
85
+ }>;
86
+ /**
87
+ * @name Set plugin log level
88
+ * @description Sets the minimum severity the plugin's log store retains going forward
89
+ */
90
+ setPluginLogLevel(id: string, body: PluginLogLevelInput): Promise<PluginDetail>;
91
+ /**
92
+ * @name Start plugin OAuth authorization
93
+ * @description Reports where to send the operator for the provider's consent screen
94
+ */
95
+ startPluginOAuthAuthorization(id: string): Promise<PluginOAuthStart>;
96
+ /**
97
+ * @name Disconnect plugin OAuth
98
+ * @description Forgets the plugin's stored OAuth tokens and reinitializes it
99
+ */
100
+ disconnectPluginOAuth(id: string): Promise<PluginDetail>;
101
+ /**
102
+ * @name Complete plugin OAuth authorization
103
+ * @description Completes the flow. Anonymous: the provider redirects the browser here with no session of ours
104
+ */
105
+ completePluginOAuthAuthorization(id: string, query?: PluginOAuthCallbackQuery): Promise<PluginOAuthResult>;
106
+ }
107
+ //# sourceMappingURL=plugins.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.client.d.ts","sourceRoot":"","sources":["../../src/plugins/plugins.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EACR,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACnB,MAAM,0BAA0B,CAAC;AAGlC,qBAAa,aAAa;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAA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AM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE;YAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IAMzG;;;OAGG;IACG,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IASrF;;;OAGG;IACG,6BAA6B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAK1E;;;OAGG;IACG,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAK9D;;;OAGG;IACG,gCAAgC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAOnH"}
@@ -0,0 +1,2 @@
1
+ export * from './plugins.types.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/types/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC"}