@deadair/sdk 0.82.0 → 0.83.1
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/dist/director/director.client.d.ts +55 -0
- package/dist/director/director.client.d.ts.map +1 -1
- package/dist/director/types/break.kinds.types.d.ts +145 -0
- package/dist/director/types/break.kinds.types.d.ts.map +1 -0
- package/dist/director/types/index.d.ts +1 -0
- package/dist/director/types/index.d.ts.map +1 -1
- package/dist/index.js +110 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,65 @@
|
|
|
1
1
|
import type { SdkFetch } from '../sdk-options.js';
|
|
2
|
+
import type { BreakKindFile, BreakKindImportPlan, BreakKindImportResult, BreakKindInput, BreakKindList } from './types/break.kinds.types.js';
|
|
2
3
|
import type { ClockBandInput, ClockBandList } from './types/clock.types.js';
|
|
3
4
|
import type { AddStationSegmentInput, AddStationTrackInput, ArtistRoute, ExtendStationInput, HoldStationInput, MoveStationItemInput, PutOnAirInput, QuietStationInput, ReplanStationInput, RequestStationBreakInput, RoutePreviewInput, SetStationAirInput, SetStationHostInput, StationAir, StationBreakRequest, StationOrder } from './types/director.types.js';
|
|
4
5
|
import type { BlockRuleInput, BlockRuleList, GenreSteerInput, GenreSteerReading } from './types/rules.types.js';
|
|
5
6
|
export declare class DirectorClient {
|
|
6
7
|
private fetch;
|
|
7
8
|
constructor(fetch: SdkFetch);
|
|
9
|
+
/**
|
|
10
|
+
* @name List break kinds
|
|
11
|
+
* @description Every kind of break you have written, switched on or not, in your own order
|
|
12
|
+
*/
|
|
13
|
+
listBreakKinds(): Promise<BreakKindList>;
|
|
14
|
+
/**
|
|
15
|
+
* @name Create break kind
|
|
16
|
+
* @description Writes a new kind of break. Nothing airs it until it is switched on and a band on the format clock names it
|
|
17
|
+
*/
|
|
18
|
+
createBreakKind(body: BreakKindInput): Promise<BreakKindList>;
|
|
19
|
+
/**
|
|
20
|
+
* @name Update break kind
|
|
21
|
+
* @description Rewrites one kind of break. Its key cannot change. A break already written keeps the words it was given
|
|
22
|
+
*/
|
|
23
|
+
updateBreakKind(id: string, body: BreakKindInput): Promise<BreakKindList>;
|
|
24
|
+
/**
|
|
25
|
+
* @name Delete break kind
|
|
26
|
+
* @description Removes a kind of break. Refused while a band on the format clock still names it
|
|
27
|
+
*/
|
|
28
|
+
deleteBreakKind(id: string): Promise<BreakKindList>;
|
|
29
|
+
/**
|
|
30
|
+
* @name Export break kinds
|
|
31
|
+
* @description Every kind of break you have written, as one file
|
|
32
|
+
*/
|
|
33
|
+
exportBreakKinds(): Promise<{
|
|
34
|
+
data: BreakKindFile;
|
|
35
|
+
headers: {
|
|
36
|
+
contentDisposition?: string;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* @name Export break kind
|
|
41
|
+
* @description One kind of break, as a file
|
|
42
|
+
*/
|
|
43
|
+
exportBreakKind(id: string): Promise<{
|
|
44
|
+
data: BreakKindFile;
|
|
45
|
+
headers: {
|
|
46
|
+
contentDisposition?: string;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* @name Preview break kind import
|
|
51
|
+
* @description Reads a file and reports what importing it would create, rewrite, skip and refuse. Writes nothing
|
|
52
|
+
*/
|
|
53
|
+
previewBreakKindImport(body: BreakKindFile, query?: {
|
|
54
|
+
replace?: string[];
|
|
55
|
+
}): Promise<BreakKindImportPlan>;
|
|
56
|
+
/**
|
|
57
|
+
* @name Import break kinds
|
|
58
|
+
* @description Writes a file into this station and answers with what it did. Every kind it writes arrives switched off
|
|
59
|
+
*/
|
|
60
|
+
importBreakKinds(body: BreakKindFile, query?: {
|
|
61
|
+
replace?: string[];
|
|
62
|
+
}): Promise<BreakKindImportResult>;
|
|
8
63
|
/**
|
|
9
64
|
* @name List clock bands
|
|
10
65
|
* @description Every band on this station's clock, including the ones switched off, in the operator's own order
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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M,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAKpE;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,aAAa,CAAC;IAKlD;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IASrE;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAKrD;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAS1E;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAKhD;;;OAGG;IACG,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IASpF;;;OAGG;IACG,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAIjE"}
|
|
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,aAAa,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7I,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,KAAK,EACR,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,YAAY,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,iBA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,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;IAKpE;;;OAGG;IACG,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAKzE;;;OAGG;IACG,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAKpE;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,aAAa,CAAC;IAKlD;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IASrE;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAKrD;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAS1E;;;OAGG;IACG,YAAY,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAKhD;;;OAGG;IACG,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IASpF;;;OAGG;IACG,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAIjE"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A kind of break you write yourself: a brief in prose, and what the presenter is shown while writing one
|
|
3
|
+
* generated from [BreakKind](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
4
|
+
*/
|
|
5
|
+
export interface BreakKind {
|
|
6
|
+
id: string;
|
|
7
|
+
/** The kind, as a band on the format clock names it: lowercase words joined by hyphens. Fixed once the kind is created, because every band and every break it ever planted carries it */
|
|
8
|
+
key: string;
|
|
9
|
+
/** What the console calls it. Never read out */
|
|
10
|
+
name: string;
|
|
11
|
+
/** What this kind of break is for and when to say nothing, written as an instruction to the presenter. The station's own rules for every break still apply on top of it */
|
|
12
|
+
brief: string;
|
|
13
|
+
/** Anything this kind owes beyond the rules every break owes, one per entry. Added to those rules, never in place of them */
|
|
14
|
+
rules: string[];
|
|
15
|
+
/** Whether the presenter is shown the record that has just finished */
|
|
16
|
+
showsPrevious: boolean;
|
|
17
|
+
/** Whether the presenter is shown the rest of this broadcast's records, to refer back to */
|
|
18
|
+
showsPlayed: boolean;
|
|
19
|
+
/** Whether the records shown carry the notes the station holds about them */
|
|
20
|
+
showsFacts: boolean;
|
|
21
|
+
/** Whether the presenter is shown their own notebook */
|
|
22
|
+
showsNotebook: boolean;
|
|
23
|
+
/** Whether the station writes this kind at all. A new or imported kind is off until you switch it on */
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
/** Your own order, for the list */
|
|
26
|
+
position: number;
|
|
27
|
+
}
|
|
28
|
+
export interface BreakKindInput {
|
|
29
|
+
/** The kind, as a band on the format clock names it: lowercase words joined by hyphens. Fixed once the kind is created, because every band and every break it ever planted carries it */
|
|
30
|
+
key: string;
|
|
31
|
+
/** What the console calls it. Never read out */
|
|
32
|
+
name: string;
|
|
33
|
+
/** What this kind of break is for and when to say nothing, written as an instruction to the presenter. The station's own rules for every break still apply on top of it */
|
|
34
|
+
brief: string;
|
|
35
|
+
/** Anything this kind owes beyond the rules every break owes, one per entry. Added to those rules, never in place of them */
|
|
36
|
+
rules: string[];
|
|
37
|
+
/** Whether the presenter is shown the record that has just finished */
|
|
38
|
+
showsPrevious: boolean;
|
|
39
|
+
/** Whether the presenter is shown the rest of this broadcast's records, to refer back to */
|
|
40
|
+
showsPlayed: boolean;
|
|
41
|
+
/** Whether the records shown carry the notes the station holds about them */
|
|
42
|
+
showsFacts: boolean;
|
|
43
|
+
/** Whether the presenter is shown their own notebook */
|
|
44
|
+
showsNotebook: boolean;
|
|
45
|
+
/** Whether the station writes this kind at all. A new or imported kind is off until you switch it on */
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
/** Your own order, for the list */
|
|
48
|
+
position: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* One kind of break in a file: everything that says what it is, and nothing about how this station has it set
|
|
52
|
+
* generated from [BreakKindFileKind](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
53
|
+
*/
|
|
54
|
+
export interface BreakKindFileKind {
|
|
55
|
+
/** What identifies the kind across two stations, and what a band on the format clock names */
|
|
56
|
+
key: string;
|
|
57
|
+
name: string;
|
|
58
|
+
brief: string;
|
|
59
|
+
rules: string[];
|
|
60
|
+
showsPrevious: boolean;
|
|
61
|
+
showsPlayed: boolean;
|
|
62
|
+
showsFacts: boolean;
|
|
63
|
+
showsNotebook: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Something to know before pressing Import
|
|
67
|
+
* generated from [BreakKindImportNotice](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
68
|
+
*/
|
|
69
|
+
export interface BreakKindImportNotice {
|
|
70
|
+
/** Which sort, so a console can group by it rather than parsing the sentence */
|
|
71
|
+
kind: 'format' | 'duplicate' | 'switched-off' | 'refused';
|
|
72
|
+
/** The whole of it, in the station's own words */
|
|
73
|
+
message: string;
|
|
74
|
+
}
|
|
75
|
+
export interface BreakKindImportNoticeInput {
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* generated from [BreakKindList](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
79
|
+
*/
|
|
80
|
+
export interface BreakKindList {
|
|
81
|
+
kinds: BreakKind[];
|
|
82
|
+
}
|
|
83
|
+
export interface BreakKindListInput {
|
|
84
|
+
kinds: BreakKindInput[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Kinds of break as a file, to move between stations. No id, no place in a list and no switch: a kind arrives switched off wherever it lands, so it is read back before it airs
|
|
88
|
+
* generated from [BreakKindFile](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
89
|
+
*/
|
|
90
|
+
export interface BreakKindFile {
|
|
91
|
+
/** What shape this is, so a file from a later build says so rather than being read wrongly */
|
|
92
|
+
format: string;
|
|
93
|
+
/** When it was exported, ISO-8601 */
|
|
94
|
+
takenAt: string;
|
|
95
|
+
/** The station it was taken from. Provenance only */
|
|
96
|
+
station?: string;
|
|
97
|
+
kinds: BreakKindFileKind[];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* One kind in a file, and what would become of it here
|
|
101
|
+
* generated from [BreakKindImportEntry](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
102
|
+
*/
|
|
103
|
+
export interface BreakKindImportEntry {
|
|
104
|
+
key: string;
|
|
105
|
+
name: string;
|
|
106
|
+
/** New here; already here and named in `replace`, so rewritten; already here and left alone; or a key this station uses for a break of its own, which no file can take */
|
|
107
|
+
outcome: 'create' | 'update' | 'skip' | 'refuse';
|
|
108
|
+
notices: BreakKindImportNotice[];
|
|
109
|
+
}
|
|
110
|
+
export interface BreakKindImportEntryInput {
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* What importing a file WOULD do here, worked out by the same code the import runs and written nowhere
|
|
114
|
+
* generated from [BreakKindImportPlan](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
115
|
+
*/
|
|
116
|
+
export interface BreakKindImportPlan {
|
|
117
|
+
/** What the file said it was */
|
|
118
|
+
format: string;
|
|
119
|
+
/** The station it was taken from, when it said */
|
|
120
|
+
station?: string;
|
|
121
|
+
/** When it was taken, when it said */
|
|
122
|
+
takenAt?: string;
|
|
123
|
+
/** About the file rather than any one kind in it */
|
|
124
|
+
notices: BreakKindImportNotice[];
|
|
125
|
+
kinds: BreakKindImportEntry[];
|
|
126
|
+
}
|
|
127
|
+
export interface BreakKindImportPlanInput {
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* What importing did, with the plan it did it from. All or nothing
|
|
131
|
+
* generated from [BreakKindImportResult](../../../../../apps/api/data/contracts/director/break.kinds.types.ck)
|
|
132
|
+
*/
|
|
133
|
+
export interface BreakKindImportResult {
|
|
134
|
+
plan: BreakKindImportPlan;
|
|
135
|
+
created: number;
|
|
136
|
+
/** Kinds rewritten from the file, and switched off until read back */
|
|
137
|
+
updated: number;
|
|
138
|
+
/** Kinds this station already held and was not asked to replace, or could not take */
|
|
139
|
+
skipped: number;
|
|
140
|
+
/** The list as it now stands */
|
|
141
|
+
kinds: BreakKind[];
|
|
142
|
+
}
|
|
143
|
+
export interface BreakKindImportResultInput {
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=break.kinds.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"break.kinds.types.d.ts","sourceRoot":"","sources":["../../../src/director/types/break.kinds.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,yLAAyL;IACzL,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,2KAA2K;IAC3K,KAAK,EAAE,MAAM,CAAC;IACd,6HAA6H;IAC7H,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,uEAAuE;IACvE,aAAa,EAAE,OAAO,CAAC;IACvB,4FAA4F;IAC5F,WAAW,EAAE,OAAO,CAAC;IACrB,6EAA6E;IAC7E,UAAU,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,aAAa,EAAE,OAAO,CAAC;IACvB,wGAAwG;IACxG,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAA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;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,0KAA0K;IAC1K,OAAO,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IACjD,OAAO,EAAE,qBAAqB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,yBAAyB;CAAG;AAE7C;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,KAAK,EAAE,oBAAoB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;CAAG;AAE5C;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;CAAG"}
|
|
@@ -1 +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;AACpC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/director/types/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1675,6 +1675,116 @@ var DirectorClient = class {
|
|
|
1675
1675
|
constructor(fetch2) {
|
|
1676
1676
|
this.fetch = fetch2;
|
|
1677
1677
|
}
|
|
1678
|
+
/**
|
|
1679
|
+
* @name List break kinds
|
|
1680
|
+
* @description Every kind of break you have written, switched on or not, in your own order
|
|
1681
|
+
*/
|
|
1682
|
+
async listBreakKinds() {
|
|
1683
|
+
const result = await this.fetch(`/breaks/kinds`, {
|
|
1684
|
+
method: "GET"
|
|
1685
|
+
});
|
|
1686
|
+
return await parseJson(result);
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* @name Create break kind
|
|
1690
|
+
* @description Writes a new kind of break. Nothing airs it until it is switched on and a band on the format clock names it
|
|
1691
|
+
*/
|
|
1692
|
+
async createBreakKind(body) {
|
|
1693
|
+
const result = await this.fetch(`/breaks/kinds`, {
|
|
1694
|
+
method: "POST",
|
|
1695
|
+
headers: {
|
|
1696
|
+
"Content-Type": "application/json"
|
|
1697
|
+
},
|
|
1698
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1699
|
+
});
|
|
1700
|
+
return await parseJson(result);
|
|
1701
|
+
}
|
|
1702
|
+
/**
|
|
1703
|
+
* @name Update break kind
|
|
1704
|
+
* @description Rewrites one kind of break. Its key cannot change. A break already written keeps the words it was given
|
|
1705
|
+
*/
|
|
1706
|
+
async updateBreakKind(id, body) {
|
|
1707
|
+
const result = await this.fetch(`/breaks/kinds/${encodeURIComponent(id)}`, {
|
|
1708
|
+
method: "PUT",
|
|
1709
|
+
headers: {
|
|
1710
|
+
"Content-Type": "application/json"
|
|
1711
|
+
},
|
|
1712
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1713
|
+
});
|
|
1714
|
+
return await parseJson(result);
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* @name Delete break kind
|
|
1718
|
+
* @description Removes a kind of break. Refused while a band on the format clock still names it
|
|
1719
|
+
*/
|
|
1720
|
+
async deleteBreakKind(id) {
|
|
1721
|
+
const result = await this.fetch(`/breaks/kinds/${encodeURIComponent(id)}`, {
|
|
1722
|
+
method: "DELETE"
|
|
1723
|
+
});
|
|
1724
|
+
return await parseJson(result);
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* @name Export break kinds
|
|
1728
|
+
* @description Every kind of break you have written, as one file
|
|
1729
|
+
*/
|
|
1730
|
+
async exportBreakKinds() {
|
|
1731
|
+
const result = await this.fetch(`/breaks/kinds/export`, {
|
|
1732
|
+
method: "GET"
|
|
1733
|
+
});
|
|
1734
|
+
const data = await parseJson(result);
|
|
1735
|
+
return {
|
|
1736
|
+
data,
|
|
1737
|
+
headers: {
|
|
1738
|
+
contentDisposition: result.headers.get("Content-Disposition") ?? void 0
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
}
|
|
1742
|
+
/**
|
|
1743
|
+
* @name Export break kind
|
|
1744
|
+
* @description One kind of break, as a file
|
|
1745
|
+
*/
|
|
1746
|
+
async exportBreakKind(id) {
|
|
1747
|
+
const result = await this.fetch(`/breaks/kinds/${encodeURIComponent(id)}/export`, {
|
|
1748
|
+
method: "GET"
|
|
1749
|
+
});
|
|
1750
|
+
const data = await parseJson(result);
|
|
1751
|
+
return {
|
|
1752
|
+
data,
|
|
1753
|
+
headers: {
|
|
1754
|
+
contentDisposition: result.headers.get("Content-Disposition") ?? void 0
|
|
1755
|
+
}
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* @name Preview break kind import
|
|
1760
|
+
* @description Reads a file and reports what importing it would create, rewrite, skip and refuse. Writes nothing
|
|
1761
|
+
*/
|
|
1762
|
+
async previewBreakKindImport(body, query) {
|
|
1763
|
+
const qs = buildQueryString(query);
|
|
1764
|
+
const result = await this.fetch(`/breaks/kinds/import/preview${qs}`, {
|
|
1765
|
+
method: "POST",
|
|
1766
|
+
headers: {
|
|
1767
|
+
"Content-Type": "application/json"
|
|
1768
|
+
},
|
|
1769
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1770
|
+
});
|
|
1771
|
+
return await parseJson(result);
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* @name Import break kinds
|
|
1775
|
+
* @description Writes a file into this station and answers with what it did. Every kind it writes arrives switched off
|
|
1776
|
+
*/
|
|
1777
|
+
async importBreakKinds(body, query) {
|
|
1778
|
+
const qs = buildQueryString(query);
|
|
1779
|
+
const result = await this.fetch(`/breaks/kinds/import${qs}`, {
|
|
1780
|
+
method: "POST",
|
|
1781
|
+
headers: {
|
|
1782
|
+
"Content-Type": "application/json"
|
|
1783
|
+
},
|
|
1784
|
+
body: JSON.stringify(body, bigIntReplacer)
|
|
1785
|
+
});
|
|
1786
|
+
return await parseJson(result);
|
|
1787
|
+
}
|
|
1678
1788
|
/**
|
|
1679
1789
|
* @name List clock bands
|
|
1680
1790
|
* @description Every band on this station's clock, including the ones switched off, in the operator's own order
|