@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.
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/activity/activity.client.d.ts +12 -0
- package/dist/activity/activity.client.d.ts.map +1 -0
- package/dist/activity/types/activity.types.d.ts +60 -0
- package/dist/activity/types/activity.types.d.ts.map +1 -0
- package/dist/activity/types/index.d.ts +2 -0
- package/dist/activity/types/index.d.ts.map +1 -0
- package/dist/art/art.client.d.ts +21 -0
- package/dist/art/art.client.d.ts.map +1 -0
- package/dist/authentication/authentication.client.d.ts +33 -0
- package/dist/authentication/authentication.client.d.ts.map +1 -0
- package/dist/authentication/authentication.factor.client.d.ts +41 -0
- package/dist/authentication/authentication.factor.client.d.ts.map +1 -0
- package/dist/authentication/authentication.sessions.client.d.ts +20 -0
- package/dist/authentication/authentication.sessions.client.d.ts.map +1 -0
- package/dist/authentication/types/authentication.types.d.ts +846 -0
- package/dist/authentication/types/authentication.types.d.ts.map +1 -0
- package/dist/authentication/types/index.d.ts +3 -0
- package/dist/authentication/types/index.d.ts.map +1 -0
- package/dist/authentication/types/registration.types.d.ts +336 -0
- package/dist/authentication/types/registration.types.d.ts.map +1 -0
- package/dist/catalog/catalog.client.d.ts +96 -0
- package/dist/catalog/catalog.client.d.ts.map +1 -0
- package/dist/catalog/types/catalog.types.d.ts +593 -0
- package/dist/catalog/types/catalog.types.d.ts.map +1 -0
- package/dist/catalog/types/index.d.ts +2 -0
- package/dist/catalog/types/index.d.ts.map +1 -0
- package/dist/charts/charts.client.d.ts +17 -0
- package/dist/charts/charts.client.d.ts.map +1 -0
- package/dist/charts/types/charts.types.d.ts +54 -0
- package/dist/charts/types/charts.types.d.ts.map +1 -0
- package/dist/charts/types/index.d.ts +2 -0
- package/dist/charts/types/index.d.ts.map +1 -0
- package/dist/deadair.sdk.d.ts +49 -0
- package/dist/deadair.sdk.d.ts.map +1 -0
- package/dist/director/director.client.d.ts +98 -0
- package/dist/director/director.client.d.ts.map +1 -0
- package/dist/director/types/clock.types.d.ts +57 -0
- package/dist/director/types/clock.types.d.ts.map +1 -0
- package/dist/director/types/director.types.d.ts +212 -0
- package/dist/director/types/director.types.d.ts.map +1 -0
- package/dist/director/types/index.d.ts +3 -0
- package/dist/director/types/index.d.ts.map +1 -0
- package/dist/history/history.client.d.ts +12 -0
- package/dist/history/history.client.d.ts.map +1 -0
- package/dist/history/types/history.types.d.ts +44 -0
- package/dist/history/types/history.types.d.ts.map +1 -0
- package/dist/history/types/index.d.ts +2 -0
- package/dist/history/types/index.d.ts.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3509 -0
- package/dist/index.js.map +1 -0
- package/dist/news/news.client.d.ts +17 -0
- package/dist/news/news.client.d.ts.map +1 -0
- package/dist/news/types/index.d.ts +2 -0
- package/dist/news/types/index.d.ts.map +1 -0
- package/dist/news/types/news.types.d.ts +61 -0
- package/dist/news/types/news.types.d.ts.map +1 -0
- package/dist/nowplaying/nowplaying.client.d.ts +12 -0
- package/dist/nowplaying/nowplaying.client.d.ts.map +1 -0
- package/dist/nowplaying/types/index.d.ts +2 -0
- package/dist/nowplaying/types/index.d.ts.map +1 -0
- package/dist/nowplaying/types/nowplaying.types.d.ts +59 -0
- package/dist/nowplaying/types/nowplaying.types.d.ts.map +1 -0
- package/dist/onboarding/onboarding.client.d.ts +11 -0
- package/dist/onboarding/onboarding.client.d.ts.map +1 -0
- package/dist/onboarding/types/index.d.ts +2 -0
- package/dist/onboarding/types/index.d.ts.map +1 -0
- package/dist/onboarding/types/onboarding.types.d.ts +41 -0
- package/dist/onboarding/types/onboarding.types.d.ts.map +1 -0
- package/dist/personas/personas.client.d.ts +167 -0
- package/dist/personas/personas.client.d.ts.map +1 -0
- package/dist/personas/types/index.d.ts +2 -0
- package/dist/personas/types/index.d.ts.map +1 -0
- package/dist/personas/types/personas.types.d.ts +545 -0
- package/dist/personas/types/personas.types.d.ts.map +1 -0
- package/dist/playlists/playlists.client.d.ts +17 -0
- package/dist/playlists/playlists.client.d.ts.map +1 -0
- package/dist/playlists/types/index.d.ts +2 -0
- package/dist/playlists/types/index.d.ts.map +1 -0
- package/dist/playlists/types/playlists.types.d.ts +71 -0
- package/dist/playlists/types/playlists.types.d.ts.map +1 -0
- package/dist/playout/playout.client.d.ts +37 -0
- package/dist/playout/playout.client.d.ts.map +1 -0
- package/dist/playout/types/index.d.ts +2 -0
- package/dist/playout/types/index.d.ts.map +1 -0
- package/dist/playout/types/playout.types.d.ts +163 -0
- package/dist/playout/types/playout.types.d.ts.map +1 -0
- package/dist/plugins/plugins.client.d.ts +107 -0
- package/dist/plugins/plugins.client.d.ts.map +1 -0
- package/dist/plugins/types/index.d.ts +2 -0
- package/dist/plugins/types/index.d.ts.map +1 -0
- package/dist/plugins/types/plugins.types.d.ts +330 -0
- package/dist/plugins/types/plugins.types.d.ts.map +1 -0
- package/dist/productions/productions.client.d.ts +22 -0
- package/dist/productions/productions.client.d.ts.map +1 -0
- package/dist/productions/types/index.d.ts +2 -0
- package/dist/productions/types/index.d.ts.map +1 -0
- package/dist/productions/types/productions.types.d.ts +90 -0
- package/dist/productions/types/productions.types.d.ts.map +1 -0
- package/dist/render/render.client.d.ts +210 -0
- package/dist/render/render.client.d.ts.map +1 -0
- package/dist/render/types/index.d.ts +2 -0
- package/dist/render/types/index.d.ts.map +1 -0
- package/dist/render/types/render.types.d.ts +518 -0
- package/dist/render/types/render.types.d.ts.map +1 -0
- package/dist/schedule/schedule.client.d.ts +37 -0
- package/dist/schedule/schedule.client.d.ts.map +1 -0
- package/dist/schedule/types/index.d.ts +2 -0
- package/dist/schedule/types/index.d.ts.map +1 -0
- package/dist/schedule/types/schedule.types.d.ts +119 -0
- package/dist/schedule/types/schedule.types.d.ts.map +1 -0
- package/dist/sdk-options.d.ts +45 -0
- package/dist/sdk-options.d.ts.map +1 -0
- package/dist/settings/settings.client.d.ts +17 -0
- package/dist/settings/settings.client.d.ts.map +1 -0
- package/dist/settings/types/index.d.ts +2 -0
- package/dist/settings/types/index.d.ts.map +1 -0
- package/dist/settings/types/settings.types.d.ts +35 -0
- package/dist/settings/types/settings.types.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +2 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/pagination.d.ts +34 -0
- package/dist/shared/types/pagination.d.ts.map +1 -0
- package/dist/station/station.client.d.ts +49 -0
- package/dist/station/station.client.d.ts.map +1 -0
- package/dist/station/types/index.d.ts +4 -0
- package/dist/station/types/index.d.ts.map +1 -0
- package/dist/station/types/logs.types.d.ts +73 -0
- package/dist/station/types/logs.types.d.ts.map +1 -0
- package/dist/station/types/station.types.d.ts +120 -0
- package/dist/station/types/station.types.d.ts.map +1 -0
- package/dist/station/types/traces.types.d.ts +91 -0
- package/dist/station/types/traces.types.d.ts.map +1 -0
- package/dist/storage/storage.client.d.ts +12 -0
- package/dist/storage/storage.client.d.ts.map +1 -0
- package/dist/storage/types/index.d.ts +2 -0
- package/dist/storage/types/index.d.ts.map +1 -0
- package/dist/storage/types/storage.types.d.ts +59 -0
- package/dist/storage/types/storage.types.d.ts.map +1 -0
- package/dist/stream/stream.client.d.ts +32 -0
- package/dist/stream/stream.client.d.ts.map +1 -0
- package/dist/stream/types/index.d.ts +2 -0
- package/dist/stream/types/index.d.ts.map +1 -0
- package/dist/stream/types/stream.types.d.ts +47 -0
- package/dist/stream/types/stream.types.d.ts.map +1 -0
- package/dist/topics/topics.client.d.ts +32 -0
- package/dist/topics/topics.client.d.ts.map +1 -0
- package/dist/topics/types/index.d.ts +2 -0
- package/dist/topics/types/index.d.ts.map +1 -0
- package/dist/topics/types/topics.types.d.ts +65 -0
- package/dist/topics/types/topics.types.d.ts.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One stretch of the station's day: from this time, on these days, the station plays this
|
|
3
|
+
* generated from [ScheduleSlot](../../../../../apps/api/data/contracts/schedule/schedule.types.ck#L8)
|
|
4
|
+
*/
|
|
5
|
+
export interface ScheduleSlot {
|
|
6
|
+
id: string;
|
|
7
|
+
/** What the operator calls this stretch of the day. Becomes the broadcast's name */
|
|
8
|
+
label: string;
|
|
9
|
+
/** When it starts, as minutes past midnight on the station's clock */
|
|
10
|
+
startsAtMinutes: number;
|
|
11
|
+
/** When it stops, in the same terms. Before the start means the block runs past midnight, which is ordinary for a late show; equal to it means a full twenty-four hours */
|
|
12
|
+
endsAtMinutes: number;
|
|
13
|
+
/** The weekdays it runs on, Sunday 0. Absent or empty means every day */
|
|
14
|
+
days?: number[];
|
|
15
|
+
/** The plugin the records come from. Absent, with no playlist, is a slot the station fills itself */
|
|
16
|
+
sourcePluginId?: string;
|
|
17
|
+
sourcePlaylistId?: string;
|
|
18
|
+
/** A published chart to play instead, as `pluginId:chartId`. An ALTERNATIVE to the playlist pair rather than a companion, and it wins if both are sent: a playlist names copies the station can already fetch and a chart names records it has to look up */
|
|
19
|
+
sourceChartId?: string;
|
|
20
|
+
/** Which way round that chart is played. Absent is `countdown`, which ends on number one. Ignored without `sourceChartId` */
|
|
21
|
+
sourceChartOrder?: 'countdown' | 'ranked' | 'unordered';
|
|
22
|
+
/** Who hosts this stretch of the day. Absent means the station's own active persona */
|
|
23
|
+
personaId?: string;
|
|
24
|
+
/** What this stretch of the day is asked to play, in the operator's own words. The same ceiling `PutOnAirInput.brief` has, because a changeover builds one of those from this and the two boxes are one field set on the console */
|
|
25
|
+
brief?: string;
|
|
26
|
+
/** The earliest release year this stretch of the day plays. Absent means no lower bound, and a record whose year the catalog does not know is played whatever the period */
|
|
27
|
+
eraFrom?: number;
|
|
28
|
+
/** The latest release year, on the same terms. Set with `eraFrom` for a decade; either may stand alone */
|
|
29
|
+
eraTo?: number;
|
|
30
|
+
/** Whether somebody phones in during this stretch of the day. Absent leaves the station's own setting standing, exactly as it does when an operator briefs a broadcast by hand; a `setlist` or a `feature` takes no calls whatever this says */
|
|
31
|
+
callins?: boolean;
|
|
32
|
+
mode: 'rotation' | 'setlist' | 'feature';
|
|
33
|
+
onEnd: 'extend' | 'repeat' | 'stop';
|
|
34
|
+
}
|
|
35
|
+
export interface ScheduleSlotInput {
|
|
36
|
+
/** What the operator calls this stretch of the day. Becomes the broadcast's name */
|
|
37
|
+
label: string;
|
|
38
|
+
/** When it starts, as minutes past midnight on the station's clock */
|
|
39
|
+
startsAtMinutes: number;
|
|
40
|
+
/** When it stops, in the same terms. Before the start means the block runs past midnight, which is ordinary for a late show; equal to it means a full twenty-four hours */
|
|
41
|
+
endsAtMinutes: number;
|
|
42
|
+
/** The weekdays it runs on, Sunday 0. Absent or empty means every day */
|
|
43
|
+
days?: number[];
|
|
44
|
+
/** The plugin the records come from. Absent, with no playlist, is a slot the station fills itself */
|
|
45
|
+
sourcePluginId?: string;
|
|
46
|
+
sourcePlaylistId?: string;
|
|
47
|
+
/** A published chart to play instead, as `pluginId:chartId`. An ALTERNATIVE to the playlist pair rather than a companion, and it wins if both are sent: a playlist names copies the station can already fetch and a chart names records it has to look up */
|
|
48
|
+
sourceChartId?: string;
|
|
49
|
+
/** Which way round that chart is played. Absent is `countdown`, which ends on number one. Ignored without `sourceChartId` */
|
|
50
|
+
sourceChartOrder?: 'countdown' | 'ranked' | 'unordered';
|
|
51
|
+
/** Who hosts this stretch of the day. Absent means the station's own active persona */
|
|
52
|
+
personaId?: string;
|
|
53
|
+
/** What this stretch of the day is asked to play, in the operator's own words. The same ceiling `PutOnAirInput.brief` has, because a changeover builds one of those from this and the two boxes are one field set on the console */
|
|
54
|
+
brief?: string;
|
|
55
|
+
/** The earliest release year this stretch of the day plays. Absent means no lower bound, and a record whose year the catalog does not know is played whatever the period */
|
|
56
|
+
eraFrom?: number;
|
|
57
|
+
/** The latest release year, on the same terms. Set with `eraFrom` for a decade; either may stand alone */
|
|
58
|
+
eraTo?: number;
|
|
59
|
+
/** Whether somebody phones in during this stretch of the day. Absent leaves the station's own setting standing, exactly as it does when an operator briefs a broadcast by hand; a `setlist` or a `feature` takes no calls whatever this says */
|
|
60
|
+
callins?: boolean;
|
|
61
|
+
mode: 'rotation' | 'setlist' | 'feature';
|
|
62
|
+
onEnd: 'extend' | 'repeat' | 'stop';
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A window of the station's day to draw
|
|
66
|
+
* generated from [ScheduleTimetableQuery](../../../../../apps/api/data/contracts/schedule/schedule.types.ck#L32)
|
|
67
|
+
*/
|
|
68
|
+
export interface ScheduleTimetableQuery {
|
|
69
|
+
/** The first day to draw, as `YYYY-MM-DD` on the station's own calendar. Absent means the station's today, which is the only way a caller that does not know the station's timezone can anchor */
|
|
70
|
+
from?: string;
|
|
71
|
+
/** How many days from `from`. Defaults to a week */
|
|
72
|
+
days?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* One block: this slot, on this day, between these two times
|
|
76
|
+
* generated from [ScheduleOccurrence](../../../../../apps/api/data/contracts/schedule/schedule.types.ck#L45)
|
|
77
|
+
*/
|
|
78
|
+
export interface ScheduleOccurrence {
|
|
79
|
+
slotId: string;
|
|
80
|
+
label: string;
|
|
81
|
+
/** `YYYY-MM-DD HH:mm:ss` on the station's own clock, deliberately carrying no timezone offset: it is a reading rather than a moment, so it draws as written wherever the console is running */
|
|
82
|
+
start: string;
|
|
83
|
+
/** The same, exclusive. Every block stays inside one day, so a slot running past midnight arrives as two */
|
|
84
|
+
end: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* generated from [ScheduleSlotList](../../../../../apps/api/data/contracts/schedule/schedule.types.ck#L27)
|
|
88
|
+
*/
|
|
89
|
+
export interface ScheduleSlotList {
|
|
90
|
+
slots: ScheduleSlot[];
|
|
91
|
+
}
|
|
92
|
+
export interface ScheduleSlotListInput {
|
|
93
|
+
slots: ScheduleSlotInput[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The station's day as blocks, ready to draw
|
|
97
|
+
* generated from [ScheduleTimetable](../../../../../apps/api/data/contracts/schedule/schedule.types.ck#L38)
|
|
98
|
+
*/
|
|
99
|
+
export interface ScheduleTimetable {
|
|
100
|
+
/** The range actually drawn, echoed so a caller steps forward and back by adding days to a string rather than by knowing the station's timezone */
|
|
101
|
+
from: string;
|
|
102
|
+
days: number;
|
|
103
|
+
occurrences: ScheduleOccurrence[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Which slot the clock says should be on right now, and what follows it
|
|
107
|
+
* generated from [ScheduleNow](../../../../../apps/api/data/contracts/schedule/schedule.types.ck#L53)
|
|
108
|
+
*/
|
|
109
|
+
export interface ScheduleNow {
|
|
110
|
+
/** What time it is on the station's own clock, in the same zone-naive `YYYY-MM-DD HH:mm:ss` shape as a block's ends. It is here so a caller can say how much of the block is left without knowing the station's timezone: subtracting two readings taken in one frame is arithmetic, deriving one is not */
|
|
111
|
+
now: string;
|
|
112
|
+
/** The slot in force at this instant. Absent means the station has no schedule */
|
|
113
|
+
slotId?: string;
|
|
114
|
+
/** The slot the running order actually belongs to. Different from the one above while an operator's own choice holds, which it does until the next slot begins */
|
|
115
|
+
airingSlotId?: string;
|
|
116
|
+
/** The block on now, if there is one, and the few that follow it, earliest first. Empty for a station with nothing scheduled from here on. A gap is simply absent, exactly as it is on the timetable: what plays there is the sustaining source rather than a block */
|
|
117
|
+
upcoming: ScheduleOccurrence[];
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=schedule.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.types.d.ts","sourceRoot":"","sources":["../../../src/schedule/types/schedule.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,eAAe,EAAE,MAAM,CAAC;IACxB,2KAA2K;IAC3K,aAAa,EAA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readonly statusText: string;
|
|
4
|
+
readonly body: TBody;
|
|
5
|
+
readonly headers: Headers;
|
|
6
|
+
constructor(status: number, statusText: string, body: TBody, headers: Headers);
|
|
7
|
+
}
|
|
8
|
+
export interface SdkRequestInit extends RequestInit {
|
|
9
|
+
/**
|
|
10
|
+
* Statuses this operation declares as values rather than errors — a 304 from
|
|
11
|
+
* conditional-GET middleware, or an error status the service returns deliberately.
|
|
12
|
+
* Anything else at or above 400 still throws SdkError.
|
|
13
|
+
*/
|
|
14
|
+
expectStatuses?: number[];
|
|
15
|
+
}
|
|
16
|
+
export type SdkFetch = (url: string, init: SdkRequestInit) => Promise<Response>;
|
|
17
|
+
export interface SdkOptions {
|
|
18
|
+
baseUrl: string;
|
|
19
|
+
headers?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>);
|
|
20
|
+
fetch?: SdkFetch;
|
|
21
|
+
/** Called once per request to produce a unique X-Request-ID header value */
|
|
22
|
+
requestIdFactory?: () => string;
|
|
23
|
+
}
|
|
24
|
+
export declare const bigIntReplacer: (_: string, value: any) => any;
|
|
25
|
+
export declare const bigIntReviver: (_: string, value: any) => any;
|
|
26
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
27
|
+
[key: string]: JsonValue;
|
|
28
|
+
};
|
|
29
|
+
export declare function readContentType(res: Response): string;
|
|
30
|
+
export declare function createSdkFetch(options: SdkOptions): SdkFetch;
|
|
31
|
+
export declare function buildQueryString(query: object | undefined): string;
|
|
32
|
+
export declare function buildHeaders(headers: object | undefined): Record<string, string>;
|
|
33
|
+
export declare function parseBigIntHeader(name: string, value: string): bigint;
|
|
34
|
+
/**
|
|
35
|
+
* Read a JSON response body.
|
|
36
|
+
*
|
|
37
|
+
* No reviver: `bigIntReviver` matches any string of the form `123n` anywhere in the
|
|
38
|
+
* document, so a contract with no bigint field would still have a legitimate string like
|
|
39
|
+
* "123n" silently turned into a BigInt. Clients whose contracts do use bigint import
|
|
40
|
+
* `parseJsonWithBigInt` under this name instead.
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseJson<T>(res: Response): Promise<T>;
|
|
43
|
+
/** `parseJson` for contracts that declare a bigint, applying the `123n` reviver. */
|
|
44
|
+
export declare function parseJsonWithBigInt<T>(res: Response): Promise<T>;
|
|
45
|
+
//# sourceMappingURL=sdk-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk-options.d.ts","sourceRoot":"","sources":["../src/sdk-options.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ,CAAC,KAAK,GAAG,OAAO,CAAE,SAAQ,KAAK;aAE5B,MAAM,EAAE,MAAM;aACd,UAAU,EAAE,MAAM;aAClB,IAAI,EAAE,KAAK;aACX,OAAO,EAAE,OAAO;gBAHhB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,OAAO;CAKvC;AAED,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEhF,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpG,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,MAAM,CAAC;CACnC;AAED,eAAO,MAAM,cAAc,GAAI,GAAG,MAAM,EAAE,OAAO,GAAG,KAAG,GAKtD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,GAAG,MAAM,EAAE,OAAO,GAAG,KAAG,GAKrD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEtG,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAErD;AAYD,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,QAAQ,CAoB5D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAYlE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAShF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGrE;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAE5D;AAED,oFAAoF;AACpF,wBAAsB,mBAAmB,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAEtE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SdkFetch } from '../sdk-options.js';
|
|
2
|
+
import type { StationSettings, StationSettingsInput } from './types/settings.types.js';
|
|
3
|
+
export declare class SettingsClient {
|
|
4
|
+
private fetch;
|
|
5
|
+
constructor(fetch: SdkFetch);
|
|
6
|
+
/**
|
|
7
|
+
* @name Get settings
|
|
8
|
+
* @description Every station setting, its descriptor and its current value
|
|
9
|
+
*/
|
|
10
|
+
getSettings(): Promise<StationSettings>;
|
|
11
|
+
/**
|
|
12
|
+
* @name Update settings
|
|
13
|
+
* @description Applies a submitted settings form and answers with the settings as they now stand
|
|
14
|
+
*/
|
|
15
|
+
updateSettings(body: StationSettingsInput): Promise<StationSettings>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=settings.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.client.d.ts","sourceRoot":"","sources":["../../src/settings/settings.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEvF,qBAAa,cAAc;IACX,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAEnC;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,eAAe,CAAC;IAK7C;;;OAGG;IACG,cAAc,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;CAQ7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/settings/types/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ConfigFieldDescriptor } from '../../plugins/types/plugins.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Which part of the console owns a setting. Every one of these but `schedule` and `personas` is a section of the settings page; `schedule` is edited on the schedule page, beside the timetable it describes, and `personas` on the characters page, beside the names it stands behind.
|
|
4
|
+
* generated from [SettingGroup](../../../../../apps/api/data/contracts/settings/settings.types.ck#L7)
|
|
5
|
+
*/
|
|
6
|
+
export type SettingGroup = 'station' | 'stream' | 'housekeeping' | 'mail' | 'rotation' | 'playout' | 'render' | 'llm' | 'analysis' | 'schedule' | 'personas';
|
|
7
|
+
/**
|
|
8
|
+
* A submitted settings form. Partial: a key that is present is written, a key that is absent is left
|
|
9
|
+
* alone, so a console may send one field. A secret submitted blank clears it
|
|
10
|
+
* generated from [StationSettingsInput](../../../../../apps/api/data/contracts/settings/settings.types.ck#L42)
|
|
11
|
+
*/
|
|
12
|
+
export interface StationSettingsInput {
|
|
13
|
+
values: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A station setting as the console needs to render it. `ConfigFieldDescriptor` is the plugins area's,
|
|
17
|
+
* and shared deliberately: a plugin's settings form and the station's are the same problem, and the
|
|
18
|
+
* console renders both with one component
|
|
19
|
+
* generated from [StationSettingDescriptor](../../../../../apps/api/data/contracts/settings/settings.types.ck#L29)
|
|
20
|
+
*/
|
|
21
|
+
export interface StationSettingDescriptor extends ConfigFieldDescriptor {
|
|
22
|
+
group: SettingGroup;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Every station setting, with what it is currently worth
|
|
26
|
+
* generated from [StationSettings](../../../../../apps/api/data/contracts/settings/settings.types.ck#L34)
|
|
27
|
+
*/
|
|
28
|
+
export interface StationSettings {
|
|
29
|
+
descriptors: StationSettingDescriptor[];
|
|
30
|
+
/** Every NON-secret setting, with defaults filled in for whatever is not stored */
|
|
31
|
+
values: Record<string, unknown>;
|
|
32
|
+
/** One entry per `secret` setting: whether a value is currently stored. Never the value itself */
|
|
33
|
+
configured: Record<string, boolean>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=settings.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.types.d.ts","sourceRoot":"","sources":["../../../src/settings/types/settings.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAElF;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAEtI;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACnE,KAAK,EAAE,YAAY,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,kGAAkG;IAClG,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/types/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a pagination object
|
|
3
|
+
* generated from [Pagination](../../../../../apps/api/data/contracts/shared/pagination.ck#L7)
|
|
4
|
+
*/
|
|
5
|
+
export interface Pagination {
|
|
6
|
+
/** The page number */
|
|
7
|
+
page?: number;
|
|
8
|
+
/** The page size */
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
/** The sort order */
|
|
11
|
+
sort?: 'asc' | 'desc';
|
|
12
|
+
/** The total number of items */
|
|
13
|
+
total: number;
|
|
14
|
+
}
|
|
15
|
+
export interface PaginationInput {
|
|
16
|
+
/** The page number */
|
|
17
|
+
page?: number;
|
|
18
|
+
/** The page size */
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
/** The sort order */
|
|
21
|
+
sort?: 'asc' | 'desc';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* generated from [PaginationWithActive](../../../../../apps/api/data/contracts/shared/pagination.ck#L14)
|
|
25
|
+
*/
|
|
26
|
+
export interface PaginationWithActive extends Pagination {
|
|
27
|
+
/** Optionally filter by whether the items are active */
|
|
28
|
+
active?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface PaginationWithActiveInput extends PaginationInput {
|
|
31
|
+
/** Optionally filter by whether the items are active */
|
|
32
|
+
active?: boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/shared/types/pagination.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC5B,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACpD,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAC9D,wDAAwD;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SdkFetch } from '../sdk-options.js';
|
|
2
|
+
import type { LogPage, LogQuery, LogSourceList } from './types/logs.types.js';
|
|
3
|
+
import type { StationAttention, StationCheckup } from './types/station.types.js';
|
|
4
|
+
import type { TraceDetail, TracesPage, TracesQuery } from './types/traces.types.js';
|
|
5
|
+
export declare class StationClient {
|
|
6
|
+
private fetch;
|
|
7
|
+
constructor(fetch: SdkFetch);
|
|
8
|
+
/**
|
|
9
|
+
* @name List logs
|
|
10
|
+
* @description Every log this install has, present or not, with its size and when it was last written
|
|
11
|
+
*/
|
|
12
|
+
listLogs(): Promise<LogSourceList>;
|
|
13
|
+
/**
|
|
14
|
+
* @name Read log
|
|
15
|
+
* @description A tail of one log, newest first
|
|
16
|
+
*/
|
|
17
|
+
readLog(id: string, query?: LogQuery): Promise<LogPage>;
|
|
18
|
+
/**
|
|
19
|
+
* @name Download log
|
|
20
|
+
* @description The retained log as a plain-text attachment, oldest first, as the file is written
|
|
21
|
+
*/
|
|
22
|
+
downloadLog(id: string): Promise<{
|
|
23
|
+
data: string;
|
|
24
|
+
headers: {
|
|
25
|
+
contentDisposition?: string;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* @name Read station attention
|
|
30
|
+
* @description Everything wrong or waiting, worst first, each with the console page that can act on it
|
|
31
|
+
*/
|
|
32
|
+
readStationAttention(): Promise<StationAttention>;
|
|
33
|
+
/**
|
|
34
|
+
* @name Read station checkup
|
|
35
|
+
* @description The loops the station runs and how much of the library it has looked at
|
|
36
|
+
*/
|
|
37
|
+
readStationCheckup(): Promise<StationCheckup>;
|
|
38
|
+
/**
|
|
39
|
+
* @name Read traces
|
|
40
|
+
* @description Recent decisions, newest first, folded to one row each
|
|
41
|
+
*/
|
|
42
|
+
readTraces(query?: TracesQuery): Promise<TracesPage>;
|
|
43
|
+
/**
|
|
44
|
+
* @name Read trace
|
|
45
|
+
* @description One decision: every call it made, and the decisions on either side of it
|
|
46
|
+
*/
|
|
47
|
+
readTrace(id: string): Promise<TraceDetail>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=station.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"station.client.d.ts","sourceRoot":"","sources":["../../src/station/station.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEjF,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGpF,qBAAa,aAAa;IACV,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAEnC;;;OAGG;IACG,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;IAKxC;;;OAGG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ7D;;;OAGG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE;YAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IAMlG;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvD;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,cAAc,CAAC;IAKnD;;;OAGG;IACG,UAAU,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAQ1D;;;OAGG;IACG,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAIpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/station/types/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
/**
|
|
3
|
+
* Five values, where `PluginLogLevel` next door has four. The plugin enum is the narrower one on
|
|
4
|
+
* purpose — that is the vocabulary a plugin's own `PluginLogger` offers — while `api.log` is written
|
|
5
|
+
* by `DeadairLogger`, which tees every level the app-wide `Logger` has, `trace` included. Narrowing
|
|
6
|
+
* here would make a `trace` line unrepresentable in the type of the surface that reads the file it
|
|
7
|
+
* is in.
|
|
8
|
+
* generated from [LogLevel](../../../../../apps/api/data/contracts/station/logs.types.ck#L12)
|
|
9
|
+
*/
|
|
10
|
+
export type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
|
11
|
+
/**
|
|
12
|
+
* One log file this install has, whether or not anything has been written to it
|
|
13
|
+
* generated from [LogSource](../../../../../apps/api/data/contracts/station/logs.types.ck#L14)
|
|
14
|
+
*/
|
|
15
|
+
export interface LogSource {
|
|
16
|
+
/** A closed set the API owns: `api`, `liquidsoap`, `shim`. Never a path */
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
/** What writes it, in a sentence, because "shim" means nothing to somebody who has not read the tree */
|
|
20
|
+
description: string;
|
|
21
|
+
/** Whether the file is there at all. A station that never ran the stream has no stream logs, which is a state rather than a fault */
|
|
22
|
+
present: boolean;
|
|
23
|
+
/** Whether its lines carry a level, so the console knows whether to offer the filter */
|
|
24
|
+
levels: boolean;
|
|
25
|
+
/** Retained size across every segment. Zero when absent */
|
|
26
|
+
bytes: number;
|
|
27
|
+
/** Absent when nothing has ever been written */
|
|
28
|
+
lastWriteAt?: DateTime;
|
|
29
|
+
}
|
|
30
|
+
/** Rehydrates every wire-encoded scalar in a LogSource into its runtime type. Mutates and returns `raw`. */
|
|
31
|
+
export declare function reviveLogSource(raw: LogSource): LogSource;
|
|
32
|
+
/**
|
|
33
|
+
* One line, as far as it could be read back
|
|
34
|
+
* generated from [LogLine](../../../../../apps/api/data/contracts/station/logs.types.ck#L28)
|
|
35
|
+
*/
|
|
36
|
+
export interface LogLine {
|
|
37
|
+
/** Absent on a line this API did not write, and on one of its own that did not parse */
|
|
38
|
+
ts?: string;
|
|
39
|
+
/** Absent for the same two reasons */
|
|
40
|
+
level?: LogLevel;
|
|
41
|
+
/** Must match MAX_LINE_BYTES_CEILING in apps/api/src/logging/rotating.log.store.ts. Change both together */
|
|
42
|
+
text: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* generated from [LogQuery](../../../../../apps/api/data/contracts/station/logs.types.ck#L41)
|
|
46
|
+
*/
|
|
47
|
+
export interface LogQuery {
|
|
48
|
+
limit?: number;
|
|
49
|
+
/** Ignored by a source whose lines carry no level */
|
|
50
|
+
level?: LogLevel;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* generated from [LogSourceList](../../../../../apps/api/data/contracts/station/logs.types.ck#L24)
|
|
54
|
+
*/
|
|
55
|
+
export interface LogSourceList {
|
|
56
|
+
/** Every source, in a fixed order, including the ones that are not present */
|
|
57
|
+
sources: LogSource[];
|
|
58
|
+
}
|
|
59
|
+
/** Rehydrates every wire-encoded scalar in a LogSourceList into its runtime type. Mutates and returns `raw`. */
|
|
60
|
+
export declare function reviveLogSourceList(raw: LogSourceList): LogSourceList;
|
|
61
|
+
/**
|
|
62
|
+
* generated from [LogPage](../../../../../apps/api/data/contracts/station/logs.types.ck#L34)
|
|
63
|
+
*/
|
|
64
|
+
export interface LogPage {
|
|
65
|
+
sourceId: string;
|
|
66
|
+
/** The minimum severity that was applied. Absent when the source carries no levels, so a filter that did nothing cannot look as though it worked */
|
|
67
|
+
level?: LogLevel;
|
|
68
|
+
/** Whether the read hit its byte budget, so the oldest line here is not the file's first */
|
|
69
|
+
truncated: boolean;
|
|
70
|
+
/** Newest first, as the plugin log page, the activity feed and the script history all send */
|
|
71
|
+
lines: LogLine[];
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=logs.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.types.d.ts","sourceRoot":"","sources":["../../../src/station/types/logs.types.ts"],"names":[],"mappings":"AACA,OAAO,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ACnB,8FAA8F;IAC9F,KAAK,EAAE,OAAO,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
/**
|
|
3
|
+
* One concrete thing an attention row is about, so the reason does not live a page away.
|
|
4
|
+
*
|
|
5
|
+
* The row above it counts and categorises; this names. "4 records have no copy left that will play"
|
|
6
|
+
* is a category an operator can do nothing with until they know WHICH four and WHY each one, and
|
|
7
|
+
* every one of those facts was already stored — the fetch error on `track_audio.last_error`, the
|
|
8
|
+
* provider's refusal on `track_sources.playable` — and reachable only by finding the record and
|
|
9
|
+
* hovering a cell on its page. This is that fact travelling with the row that counted it.
|
|
10
|
+
* generated from [AttentionEvidence](../../../../../apps/api/data/contracts/station/station.types.ck#L14)
|
|
11
|
+
*/
|
|
12
|
+
export interface AttentionEvidence {
|
|
13
|
+
/** The thing itself, as an operator would name it: a record's title and who made it */
|
|
14
|
+
label: string;
|
|
15
|
+
/** Why THIS one, in the station's own sentence. The row's `detail` says what the category means; this says what happened here */
|
|
16
|
+
reason: string;
|
|
17
|
+
/** The page holding the whole of it. Absent where there is no page for it, which the running order can hold: a record the catalog never ingested has none */
|
|
18
|
+
route?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One loop the station runs, and when it last came round.
|
|
22
|
+
*
|
|
23
|
+
* Two timestamps and no verdict, because the loop cannot supply one: a five-second reconcile and a
|
|
24
|
+
* nightly sweep are both healthy and no single threshold describes both. `Heartbeat` itself takes
|
|
25
|
+
* this position — it answers how long it has been and lets the reader decide — and a `stalled`
|
|
26
|
+
* boolean here would be this module inventing the threshold that file deliberately refuses to.
|
|
27
|
+
*
|
|
28
|
+
* `lastBeat` is absent until a loop finishes its first pass, which is why `startedAt` is there: from
|
|
29
|
+
* the two of them a reader can tell a loop that has never completed anything from one that stopped.
|
|
30
|
+
* generated from [StationHeartbeat](../../../../../apps/api/data/contracts/station/station.types.ck#L45)
|
|
31
|
+
*/
|
|
32
|
+
export interface StationHeartbeat {
|
|
33
|
+
name: string;
|
|
34
|
+
/** When the loop registered, which is when it was last (re)started */
|
|
35
|
+
startedAt: DateTime;
|
|
36
|
+
/** When it last completed a pass. Absent until it completes its first */
|
|
37
|
+
lastBeat?: DateTime;
|
|
38
|
+
}
|
|
39
|
+
export interface StationHeartbeatInput {
|
|
40
|
+
}
|
|
41
|
+
/** Rehydrates every wire-encoded scalar in a StationHeartbeat into its runtime type. Mutates and returns `raw`. */
|
|
42
|
+
export declare function reviveStationHeartbeat(raw: StationHeartbeat): StationHeartbeat;
|
|
43
|
+
/**
|
|
44
|
+
* How much of the library the station has actually looked at.
|
|
45
|
+
*
|
|
46
|
+
* The counts `/catalog/tracks` already answers with, lifted out of a page of rows: a check-up wants
|
|
47
|
+
* the sentence "13 of 581 measured" without asking for thirteen tracks to get it.
|
|
48
|
+
* generated from [StationBacklog](../../../../../apps/api/data/contracts/station/station.types.ck#L55)
|
|
49
|
+
*/
|
|
50
|
+
export interface StationBacklog {
|
|
51
|
+
total: number;
|
|
52
|
+
cached: number;
|
|
53
|
+
measured: number;
|
|
54
|
+
}
|
|
55
|
+
export interface StationBacklogInput {
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* One thing that wants the operator's attention, or the fact that nothing does
|
|
59
|
+
* generated from [AttentionItem](../../../../../apps/api/data/contracts/station/station.types.ck#L21)
|
|
60
|
+
*/
|
|
61
|
+
export interface AttentionItem {
|
|
62
|
+
/** What this is, as a stable key: `silence`, `benchedCopies`, `noPersona`. The console groups and counts on it rather than on the sentence */
|
|
63
|
+
code: string;
|
|
64
|
+
/** `failure` is the station not doing its job, `warning` is something failing beside a station that is working, and `notice` is a thing nobody has set up yet. A notice is not a fault and must not be drawn as one */
|
|
65
|
+
severity: 'failure' | 'warning' | 'notice';
|
|
66
|
+
/** The line an operator reads first */
|
|
67
|
+
title: string;
|
|
68
|
+
/** The whole of it, in a sentence. Where the station already has words for a fact, these are those words rather than a second phrasing of them */
|
|
69
|
+
detail: string;
|
|
70
|
+
/** The console page that can do something about it */
|
|
71
|
+
route: string;
|
|
72
|
+
/** How many things this is about, where that is a number rather than a state */
|
|
73
|
+
count?: number;
|
|
74
|
+
/** A HANDFUL of the things this row is about, never all of them: this answer is polled and a row about four hundred records must not be four hundred sentences. `count` stays the true figure, and a console showing fewer than it says so */
|
|
75
|
+
evidence?: AttentionEvidence[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* One reading of the machinery, for a page that assembles the station's health.
|
|
79
|
+
*
|
|
80
|
+
* It carries ONLY the two signals nothing else exposes. Everything else a check-up shows — the
|
|
81
|
+
* silence verdict, the listener count, what needs somebody, the plugin statuses, the disk — is
|
|
82
|
+
* already on a contract the console reads, and composing them again here would be a second answer
|
|
83
|
+
* that can disagree with the first. `/playout/status` in particular is polled every two seconds for
|
|
84
|
+
* the transport strip, so asking for it a second way would be a second reading of the same fact.
|
|
85
|
+
*
|
|
86
|
+
* Each section is OPTIONAL and absent means that reader failed. A page saying what is wrong is the
|
|
87
|
+
* worst place for one broken reader to take the whole answer down, which is the rule
|
|
88
|
+
* `StationAttentionService` already works to. `revision` is the one exception and says so on its
|
|
89
|
+
* own line: it cannot fail, so absent there means something else.
|
|
90
|
+
*
|
|
91
|
+
* The revision is on THIS contract rather than composed from `/health`, which also reports it, and
|
|
92
|
+
* that is not the second-answer problem the paragraph above describes. Both read one string from one
|
|
93
|
+
* place at boot, so they cannot disagree. What they differ in is who can reach them: `/health` is
|
|
94
|
+
* `operation(internal)`, deliberately, so it generates no SDK method and the console cannot call it
|
|
95
|
+
* — which would leave "which build is this" answerable only from a shell, the one thing carrying it
|
|
96
|
+
* here exists to fix.
|
|
97
|
+
* generated from [StationCheckup](../../../../../apps/api/data/contracts/station/station.types.ck#L80)
|
|
98
|
+
*/
|
|
99
|
+
export interface StationCheckup {
|
|
100
|
+
/** When this reading was taken, so a stale page cannot pass itself off as now */
|
|
101
|
+
readAt: DateTime;
|
|
102
|
+
/** The commit this station was built from, as the image's `org.opencontainers.image.revision` label says it. Unlike the sections below, absent is not a failed reader: it means nothing stamped this build, which is what a development tree and a hand-built image both are */
|
|
103
|
+
revision?: string;
|
|
104
|
+
/** The release this station is, as the image's `org.opencontainers.image.version` label says it. Absent on the same terms as `revision` and for a second reason: only a tagged build carries one, so a station following `latest` reports a commit and no version */
|
|
105
|
+
version?: string;
|
|
106
|
+
heartbeats?: StationHeartbeat[];
|
|
107
|
+
backlog?: StationBacklog;
|
|
108
|
+
}
|
|
109
|
+
export interface StationCheckupInput {
|
|
110
|
+
}
|
|
111
|
+
/** Rehydrates every wire-encoded scalar in a StationCheckup into its runtime type. Mutates and returns `raw`. */
|
|
112
|
+
export declare function reviveStationCheckup(raw: StationCheckup): StationCheckup;
|
|
113
|
+
/**
|
|
114
|
+
* Everything wrong or waiting, worst first
|
|
115
|
+
* generated from [StationAttention](../../../../../apps/api/data/contracts/station/station.types.ck#L32)
|
|
116
|
+
*/
|
|
117
|
+
export interface StationAttention {
|
|
118
|
+
items: AttentionItem[];
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=station.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"station.types.d.ts","sourceRoot":"","sources":["../../../src/station/types/station.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAYjC;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAC9B,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAC;IACd,iIAAiI;IACjI,MAAM,EAAE,MAAM,CAAC;IACf,6JAA6J;IAC7J,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,SAAS,EAAE,QAAQ,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,QAAQ,CA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