@deadair/sdk 0.41.0 → 0.42.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/dist/art/art.client.d.ts +16 -1
- package/dist/art/art.client.d.ts.map +1 -1
- package/dist/art/types/art.types.d.ts +25 -0
- package/dist/art/types/art.types.d.ts.map +1 -1
- package/dist/index.js +60 -10
- package/dist/index.js.map +1 -1
- package/dist/nowplaying/types/nowplaying.types.d.ts +3 -1
- package/dist/nowplaying/types/nowplaying.types.d.ts.map +1 -1
- package/dist/personas/types/personas.types.d.ts +6 -6
- package/dist/personas/types/personas.types.d.ts.map +1 -1
- package/dist/schedule/types/schedule.types.d.ts +2 -0
- package/dist/schedule/types/schedule.types.d.ts.map +1 -1
- package/dist/station/types/station.types.d.ts +65 -30
- package/dist/station/types/station.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/art/art.client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SdkFetch } from '../sdk-options.js';
|
|
2
|
-
import type { BreakArtworkList } from './types/art.types.js';
|
|
2
|
+
import type { BreakArtworkList, PersonaPortraitList } from './types/art.types.js';
|
|
3
3
|
export declare class ArtClient {
|
|
4
4
|
private fetch;
|
|
5
5
|
constructor(fetch: SdkFetch);
|
|
@@ -48,5 +48,20 @@ export declare class ArtClient {
|
|
|
48
48
|
} | {
|
|
49
49
|
status: 304;
|
|
50
50
|
}>;
|
|
51
|
+
/**
|
|
52
|
+
* @name List persona portraits
|
|
53
|
+
* @description Every persona that has a portrait
|
|
54
|
+
*/
|
|
55
|
+
listPersonaPortraits(): Promise<PersonaPortraitList>;
|
|
56
|
+
/**
|
|
57
|
+
* @name Replace persona portrait
|
|
58
|
+
* @description Puts a picture on a persona. A persona that already had one keeps its URL, so a player holding it picks up the new picture
|
|
59
|
+
*/
|
|
60
|
+
replacePersonaPortrait(personaId: string, body: FormData): Promise<PersonaPortraitList>;
|
|
61
|
+
/**
|
|
62
|
+
* @name Remove persona portrait
|
|
63
|
+
* @description Takes a persona's picture away. A player shows the record's cover instead
|
|
64
|
+
*/
|
|
65
|
+
removePersonaPortrait(personaId: string): Promise<PersonaPortraitList>;
|
|
51
66
|
}
|
|
52
67
|
//# sourceMappingURL=art.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"art.client.d.ts","sourceRoot":"","sources":["../../src/art/art.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"art.client.d.ts","sourceRoot":"","sources":["../../src/art/art.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAElF,qBAAa,SAAS;IACN,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAEnC;;;OAGG;IACG,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKnD;;;OAGG;IACG,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQlF;;;OAGG;IACG,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAKjE;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAC3B;QACI,MAAM,EAAE,GAAG,CAAC;QACZ,WAAW,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC;QACrE,IAAI,EAAE,IAAI,CAAC;QACX,OAAO,EAAE;YAAE,YAAY,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACrD,GACD;QAAE,MAAM,EAAE,GAAG,CAAA;KAAE,CACpB;IAkBD;;;OAGG;IACG,UAAU,CACZ,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,GACjB,OAAO,CACJ;QACI,MAAM,EAAE,GAAG,CAAC;QACZ,WAAW,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC;QACrE,IAAI,EAAE,IAAI,CAAC;QACX,OAAO,EAAE;YAAE,YAAY,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACrD,GACD;QAAE,MAAM,EAAE,GAAG,CAAA;KAAE,CACpB;IAkBD;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAK1D;;;OAGG;IACG,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ7F;;;OAGG;IACG,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAI/E"}
|
|
@@ -29,6 +29,24 @@ export interface BreakArtworkUpload {
|
|
|
29
29
|
/** The image itself. jpeg, png, webp or gif, decided by its BYTES rather than by its name or its declared type, and at most 4 MB */
|
|
30
30
|
file: Blob;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* A presenter's picture, which a listener's player shows while that persona is on air
|
|
34
|
+
* generated from [PersonaPortrait](../../../../../apps/api/data/contracts/art/art.types.ck#L35)
|
|
35
|
+
*/
|
|
36
|
+
export interface PersonaPortrait {
|
|
37
|
+
/** The persona it belongs to */
|
|
38
|
+
personaId: string;
|
|
39
|
+
/** Where the station serves it, as a path under the API root. The same shape and the same route a record's cover uses */
|
|
40
|
+
url: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A portrait arriving from the browser, as multipart form parts. Documentation rather than validation, as for a break's picture
|
|
44
|
+
* generated from [PersonaPortraitUpload](../../../../../apps/api/data/contracts/art/art.types.ck#L46)
|
|
45
|
+
*/
|
|
46
|
+
export interface PersonaPortraitUpload {
|
|
47
|
+
/** The image itself. jpeg, png, webp or gif, decided by its BYTES, and at most 4 MB */
|
|
48
|
+
file: Blob;
|
|
49
|
+
}
|
|
32
50
|
/**
|
|
33
51
|
* Every kind the station holds a picture for, kind by kind
|
|
34
52
|
* generated from [BreakArtworkList](../../../../../apps/api/data/contracts/art/art.types.ck#L21)
|
|
@@ -36,4 +54,11 @@ export interface BreakArtworkUpload {
|
|
|
36
54
|
export interface BreakArtworkList {
|
|
37
55
|
breaks: BreakArtwork[];
|
|
38
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Every persona that has a portrait
|
|
59
|
+
* generated from [PersonaPortraitList](../../../../../apps/api/data/contracts/art/art.types.ck#L41)
|
|
60
|
+
*/
|
|
61
|
+
export interface PersonaPortraitList {
|
|
62
|
+
portraits: PersonaPortrait[];
|
|
63
|
+
}
|
|
39
64
|
//# sourceMappingURL=art.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"art.types.d.ts","sourceRoot":"","sources":["../../../src/art/types/art.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IACzB,6IAA6I;IAC7I,IAAI,EAAE,MAAM,CAAC;IACb,yHAAyH;IACzH,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,2GAA2G;IAC3G,UAAU,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IAC/B,oIAAoI;IACpI,IAAI,EAAE,IAAI,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,YAAY,EAAE,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"art.types.d.ts","sourceRoot":"","sources":["../../../src/art/types/art.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IACzB,6IAA6I;IAC7I,IAAI,EAAE,MAAM,CAAC;IACb,yHAAyH;IACzH,GAAG,EAAE,MAAM,CAAC;IACZ,4FAA4F;IAC5F,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,2GAA2G;IAC3G,UAAU,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IAC/B,oIAAoI;IACpI,IAAI,EAAE,IAAI,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,yHAAyH;IACzH,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,uFAAuF;IACvF,IAAI,EAAE,IAAI,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,eAAe,EAAE,CAAC;CAChC"}
|
package/dist/index.js
CHANGED
|
@@ -251,6 +251,37 @@ var ArtClient = class {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* @name List persona portraits
|
|
256
|
+
* @description Every persona that has a portrait
|
|
257
|
+
*/
|
|
258
|
+
async listPersonaPortraits() {
|
|
259
|
+
const result = await this.fetch(`/art/personas`, {
|
|
260
|
+
method: "GET"
|
|
261
|
+
});
|
|
262
|
+
return await parseJson(result);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @name Replace persona portrait
|
|
266
|
+
* @description Puts a picture on a persona. A persona that already had one keeps its URL, so a player holding it picks up the new picture
|
|
267
|
+
*/
|
|
268
|
+
async replacePersonaPortrait(personaId, body) {
|
|
269
|
+
const result = await this.fetch(`/art/personas/${encodeURIComponent(personaId)}`, {
|
|
270
|
+
method: "POST",
|
|
271
|
+
body
|
|
272
|
+
});
|
|
273
|
+
return await parseJson(result);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* @name Remove persona portrait
|
|
277
|
+
* @description Takes a persona's picture away. A player shows the record's cover instead
|
|
278
|
+
*/
|
|
279
|
+
async removePersonaPortrait(personaId) {
|
|
280
|
+
const result = await this.fetch(`/art/personas/${encodeURIComponent(personaId)}`, {
|
|
281
|
+
method: "DELETE"
|
|
282
|
+
});
|
|
283
|
+
return await parseJson(result);
|
|
284
|
+
}
|
|
254
285
|
};
|
|
255
286
|
|
|
256
287
|
// src/authentication/types/authentication.types.ts
|
|
@@ -4126,6 +4157,12 @@ function reviveStationHeartbeat(raw) {
|
|
|
4126
4157
|
return raw;
|
|
4127
4158
|
}
|
|
4128
4159
|
__name(reviveStationHeartbeat, "reviveStationHeartbeat");
|
|
4160
|
+
function reviveStationModelHolder(raw) {
|
|
4161
|
+
const __o0 = raw;
|
|
4162
|
+
__o0["heldSince"] = __dt17(__o0["heldSince"], "StationModelHolder.heldSince");
|
|
4163
|
+
return raw;
|
|
4164
|
+
}
|
|
4165
|
+
__name(reviveStationModelHolder, "reviveStationModelHolder");
|
|
4129
4166
|
function reviveStationRelease(raw) {
|
|
4130
4167
|
const __o0 = raw;
|
|
4131
4168
|
if (__o0["date"] != null) {
|
|
@@ -4134,20 +4171,14 @@ function reviveStationRelease(raw) {
|
|
|
4134
4171
|
return raw;
|
|
4135
4172
|
}
|
|
4136
4173
|
__name(reviveStationRelease, "reviveStationRelease");
|
|
4137
|
-
function
|
|
4174
|
+
function reviveStationModel(raw) {
|
|
4138
4175
|
const __o0 = raw;
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
{
|
|
4142
|
-
const __a1 = __o0["heartbeats"];
|
|
4143
|
-
for (let __i2 = 0; __i2 < __a1.length; __i2++) {
|
|
4144
|
-
reviveStationHeartbeat(__a1[__i2]);
|
|
4145
|
-
}
|
|
4146
|
-
}
|
|
4176
|
+
if (__o0["holder"] != null) {
|
|
4177
|
+
reviveStationModelHolder(__o0["holder"]);
|
|
4147
4178
|
}
|
|
4148
4179
|
return raw;
|
|
4149
4180
|
}
|
|
4150
|
-
__name(
|
|
4181
|
+
__name(reviveStationModel, "reviveStationModel");
|
|
4151
4182
|
function reviveStationReleases(raw) {
|
|
4152
4183
|
const __o0 = raw;
|
|
4153
4184
|
{
|
|
@@ -4168,6 +4199,23 @@ function reviveStationReleases(raw) {
|
|
|
4168
4199
|
return raw;
|
|
4169
4200
|
}
|
|
4170
4201
|
__name(reviveStationReleases, "reviveStationReleases");
|
|
4202
|
+
function reviveStationCheckup(raw) {
|
|
4203
|
+
const __o0 = raw;
|
|
4204
|
+
__o0["readAt"] = __dt17(__o0["readAt"], "StationCheckup.readAt");
|
|
4205
|
+
if (__o0["heartbeats"] != null) {
|
|
4206
|
+
{
|
|
4207
|
+
const __a1 = __o0["heartbeats"];
|
|
4208
|
+
for (let __i2 = 0; __i2 < __a1.length; __i2++) {
|
|
4209
|
+
reviveStationHeartbeat(__a1[__i2]);
|
|
4210
|
+
}
|
|
4211
|
+
}
|
|
4212
|
+
}
|
|
4213
|
+
if (__o0["model"] != null) {
|
|
4214
|
+
reviveStationModel(__o0["model"]);
|
|
4215
|
+
}
|
|
4216
|
+
return raw;
|
|
4217
|
+
}
|
|
4218
|
+
__name(reviveStationCheckup, "reviveStationCheckup");
|
|
4171
4219
|
|
|
4172
4220
|
// src/station/types/traces.types.ts
|
|
4173
4221
|
import { DateTime as DateTime18 } from "luxon";
|
|
@@ -4707,6 +4755,8 @@ export {
|
|
|
4707
4755
|
reviveSessionFactor,
|
|
4708
4756
|
reviveStationCheckup,
|
|
4709
4757
|
reviveStationHeartbeat,
|
|
4758
|
+
reviveStationModel,
|
|
4759
|
+
reviveStationModelHolder,
|
|
4710
4760
|
reviveStationPlaylist,
|
|
4711
4761
|
reviveStationPlaylistDetail,
|
|
4712
4762
|
reviveStationPlaylistList,
|