@deadair/sdk 0.40.0 → 0.41.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.
|
@@ -5,7 +5,7 @@ export declare class RequestsClient {
|
|
|
5
5
|
constructor(fetch: SdkFetch);
|
|
6
6
|
/**
|
|
7
7
|
* @name Search requestable records
|
|
8
|
-
* @description Records the station could be asked to play, matching a title or an artist
|
|
8
|
+
* @description Records the station could be asked to play, matching a title or an artist. When the station holds few, the music providers are asked too
|
|
9
9
|
*/
|
|
10
10
|
searchRequestableRecords(query: {
|
|
11
11
|
q: string;
|
|
@@ -1,32 +1,56 @@
|
|
|
1
1
|
import { DateTime } from 'luxon';
|
|
2
2
|
/**
|
|
3
|
-
* A record the station
|
|
4
|
-
* generated from [
|
|
3
|
+
* A music provider's copy of a record the station has not taken in yet
|
|
4
|
+
* generated from [RequestableSource](../../../../../apps/api/data/contracts/requests/requests.types.ck#L7)
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
artist: string;
|
|
12
|
-
album?: string;
|
|
13
|
-
year?: number;
|
|
6
|
+
export interface RequestableSource {
|
|
7
|
+
/** The plugin that carries it */
|
|
8
|
+
pluginId: string;
|
|
9
|
+
/** That plugin's own id for the record */
|
|
10
|
+
externalId: string;
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
|
-
* generated from [RequestStatus](../../../../../apps/api/data/contracts/requests/requests.types.ck#
|
|
13
|
+
* generated from [RequestStatus](../../../../../apps/api/data/contracts/requests/requests.types.ck#L26)
|
|
17
14
|
*/
|
|
18
15
|
export type RequestStatus = 'waiting' | 'pending' | 'queued' | 'aired' | 'declined' | 'expired';
|
|
19
16
|
/**
|
|
20
|
-
* generated from [RequestSource](../../../../../apps/api/data/contracts/requests/requests.types.ck#
|
|
17
|
+
* generated from [RequestSource](../../../../../apps/api/data/contracts/requests/requests.types.ck#L28)
|
|
21
18
|
*/
|
|
22
19
|
export type RequestSource = 'app' | 'chat';
|
|
20
|
+
/**
|
|
21
|
+
* Turn a request down
|
|
22
|
+
* generated from [ListenerRequestDecline](../../../../../apps/api/data/contracts/requests/requests.types.ck#L56)
|
|
23
|
+
*/
|
|
24
|
+
export interface ListenerRequestDecline {
|
|
25
|
+
/** What to tell the listener. Omit for a plain no */
|
|
26
|
+
reason?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A record the station could be asked for: one it holds, or one a music provider carries
|
|
30
|
+
* generated from [RequestableTrack](../../../../../apps/api/data/contracts/requests/requests.types.ck#L12)
|
|
31
|
+
*/
|
|
32
|
+
export interface RequestableTrack {
|
|
33
|
+
/** What to send as `trackId` to make the request. Absent for a record from a provider, which is asked for by `source` instead */
|
|
34
|
+
trackId?: string;
|
|
35
|
+
/** Where a record the station does not hold yet comes from. Send it as `source` to ask for it */
|
|
36
|
+
source?: RequestableSource;
|
|
37
|
+
/** The provider, as the station names it, for a record from one */
|
|
38
|
+
sourceName?: string;
|
|
39
|
+
title: string;
|
|
40
|
+
/** The lead artist */
|
|
41
|
+
artist: string;
|
|
42
|
+
album?: string;
|
|
43
|
+
year?: number;
|
|
44
|
+
}
|
|
23
45
|
/**
|
|
24
46
|
* Ask the station to play a record
|
|
25
|
-
* generated from [ListenerRequestCreate](../../../../../apps/api/data/contracts/requests/requests.types.ck#
|
|
47
|
+
* generated from [ListenerRequestCreate](../../../../../apps/api/data/contracts/requests/requests.types.ck#L48)
|
|
26
48
|
*/
|
|
27
49
|
export interface ListenerRequestCreate {
|
|
28
|
-
/** A record from the request search */
|
|
29
|
-
trackId
|
|
50
|
+
/** A record from the request search that the station holds. Send this or `source`, never both */
|
|
51
|
+
trackId?: string;
|
|
52
|
+
/** A record from the request search that a provider carries. The station takes it in, then decides on the request as usual */
|
|
53
|
+
source?: RequestableSource;
|
|
30
54
|
/** What the station should call you. Omitted, you are "a listener": your account's email address is never shown or read out */
|
|
31
55
|
name?: string;
|
|
32
56
|
/** Dedicate it to somebody. The station may say this name on air */
|
|
@@ -34,24 +58,9 @@ export interface ListenerRequestCreate {
|
|
|
34
58
|
/** A few words to go with it. The presenter may put them in their own words on air, and leaves out anything unfit to broadcast; the words themselves are never read out */
|
|
35
59
|
message?: string;
|
|
36
60
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Turn a request down
|
|
39
|
-
* generated from [ListenerRequestDecline](../../../../../apps/api/data/contracts/requests/requests.types.ck#L48)
|
|
40
|
-
*/
|
|
41
|
-
export interface ListenerRequestDecline {
|
|
42
|
-
/** What to tell the listener. Omit for a plain no */
|
|
43
|
-
reason?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Records matching a search, best matches first
|
|
47
|
-
* generated from [RequestableTrackList](../../../../../apps/api/data/contracts/requests/requests.types.ck#L15)
|
|
48
|
-
*/
|
|
49
|
-
export interface RequestableTrackList {
|
|
50
|
-
tracks: RequestableTrack[];
|
|
51
|
-
}
|
|
52
61
|
/**
|
|
53
62
|
* A record somebody asked the station to play, and what became of it
|
|
54
|
-
* generated from [ListenerRequest](../../../../../apps/api/data/contracts/requests/requests.types.ck#
|
|
63
|
+
* generated from [ListenerRequest](../../../../../apps/api/data/contracts/requests/requests.types.ck#L30)
|
|
55
64
|
*/
|
|
56
65
|
export interface ListenerRequest {
|
|
57
66
|
id: string;
|
|
@@ -77,9 +86,16 @@ export interface ListenerRequest {
|
|
|
77
86
|
}
|
|
78
87
|
/** Rehydrates every wire-encoded scalar in a ListenerRequest into its runtime type. Mutates and returns `raw`. */
|
|
79
88
|
export declare function reviveListenerRequest(raw: ListenerRequest): ListenerRequest;
|
|
89
|
+
/**
|
|
90
|
+
* Records matching a search, best matches first, the station's own before any a provider carries
|
|
91
|
+
* generated from [RequestableTrackList](../../../../../apps/api/data/contracts/requests/requests.types.ck#L22)
|
|
92
|
+
*/
|
|
93
|
+
export interface RequestableTrackList {
|
|
94
|
+
tracks: RequestableTrack[];
|
|
95
|
+
}
|
|
80
96
|
/**
|
|
81
97
|
* Requests, newest first
|
|
82
|
-
* generated from [ListenerRequestList](../../../../../apps/api/data/contracts/requests/requests.types.ck#
|
|
98
|
+
* generated from [ListenerRequestList](../../../../../apps/api/data/contracts/requests/requests.types.ck#L44)
|
|
83
99
|
*/
|
|
84
100
|
export interface ListenerRequestList {
|
|
85
101
|
requests: ListenerRequest[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.types.d.ts","sourceRoot":"","sources":["../../../src/requests/types/requests.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjC;;;GAGG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"requests.types.d.ts","sourceRoot":"","sources":["../../../src/requests/types/requests.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjC;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAEhG;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACnC,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,iIAAiI;IACjI,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,s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