@rocksky/sdk 0.2.0 → 0.2.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.
Files changed (73) hide show
  1. package/dist/client.d.ts +37 -28
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/generated/types.d.ts +120 -0
  4. package/dist/generated/types.d.ts.map +1 -1
  5. package/dist/http.d.ts +1 -1
  6. package/dist/http.d.ts.map +1 -1
  7. package/dist/index.d.ts +17 -17
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +6 -1
  10. package/dist/namespaces/_helpers.d.ts +10 -4
  11. package/dist/namespaces/_helpers.d.ts.map +1 -1
  12. package/dist/namespaces/actor.d.ts +12 -12
  13. package/dist/namespaces/actor.d.ts.map +1 -1
  14. package/dist/namespaces/album.d.ts +6 -6
  15. package/dist/namespaces/album.d.ts.map +1 -1
  16. package/dist/namespaces/apikey.d.ts +7 -7
  17. package/dist/namespaces/apikey.d.ts.map +1 -1
  18. package/dist/namespaces/artist.d.ts +9 -9
  19. package/dist/namespaces/artist.d.ts.map +1 -1
  20. package/dist/namespaces/charts.d.ts +6 -6
  21. package/dist/namespaces/charts.d.ts.map +1 -1
  22. package/dist/namespaces/dropbox.d.ts +7 -7
  23. package/dist/namespaces/dropbox.d.ts.map +1 -1
  24. package/dist/namespaces/feed.d.ts +13 -13
  25. package/dist/namespaces/feed.d.ts.map +1 -1
  26. package/dist/namespaces/googledrive.d.ts +6 -6
  27. package/dist/namespaces/googledrive.d.ts.map +1 -1
  28. package/dist/namespaces/graph.d.ts +8 -8
  29. package/dist/namespaces/graph.d.ts.map +1 -1
  30. package/dist/namespaces/like.d.ts +7 -7
  31. package/dist/namespaces/like.d.ts.map +1 -1
  32. package/dist/namespaces/mirror.d.ts +5 -5
  33. package/dist/namespaces/mirror.d.ts.map +1 -1
  34. package/dist/namespaces/player.d.ts +14 -14
  35. package/dist/namespaces/player.d.ts.map +1 -1
  36. package/dist/namespaces/playlist.d.ts +11 -11
  37. package/dist/namespaces/playlist.d.ts.map +1 -1
  38. package/dist/namespaces/scrobble.d.ts +6 -6
  39. package/dist/namespaces/scrobble.d.ts.map +1 -1
  40. package/dist/namespaces/shout.d.ts +12 -12
  41. package/dist/namespaces/shout.d.ts.map +1 -1
  42. package/dist/namespaces/song.d.ts +8 -8
  43. package/dist/namespaces/song.d.ts.map +1 -1
  44. package/dist/namespaces/spotify.d.ts +9 -9
  45. package/dist/namespaces/spotify.d.ts.map +1 -1
  46. package/dist/namespaces/stats.d.ts +5 -5
  47. package/dist/namespaces/stats.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/src/client.ts +50 -33
  50. package/src/generated/types.ts +124 -0
  51. package/src/http.ts +2 -2
  52. package/src/index.ts +17 -17
  53. package/src/namespaces/_helpers.ts +23 -13
  54. package/src/namespaces/actor.ts +21 -21
  55. package/src/namespaces/album.ts +9 -9
  56. package/src/namespaces/apikey.ts +11 -11
  57. package/src/namespaces/artist.ts +15 -15
  58. package/src/namespaces/charts.ts +9 -9
  59. package/src/namespaces/dropbox.ts +11 -11
  60. package/src/namespaces/feed.ts +23 -23
  61. package/src/namespaces/googledrive.ts +9 -9
  62. package/src/namespaces/graph.ts +13 -13
  63. package/src/namespaces/like.ts +11 -11
  64. package/src/namespaces/mirror.ts +7 -7
  65. package/src/namespaces/player.ts +25 -25
  66. package/src/namespaces/playlist.ts +19 -19
  67. package/src/namespaces/scrobble.ts +9 -9
  68. package/src/namespaces/shout.ts +21 -21
  69. package/src/namespaces/song.ts +13 -13
  70. package/src/namespaces/spotify.ts +15 -15
  71. package/src/namespaces/stats.ts +7 -7
  72. package/src/pipe.ts +1 -1
  73. package/src/realtime.ts +2 -2
@@ -5,9 +5,9 @@ import type {
5
5
  GetArtistRecentListenersParams,
6
6
  GetArtistsParams,
7
7
  GetArtistTracksParams,
8
- } from "../generated/types";
9
- import type { RequestOptions } from "../types";
10
- import type { Call } from "./_helpers";
8
+ } from "../generated/types.js";
9
+ import type { RequestOptions } from "../types.js";
10
+ import type { Call } from "./_helpers.js";
11
11
 
12
12
  export type { GetArtistsParams, GetArtistTracksParams };
13
13
  export type ArtistListenersParams = GetArtistListenersParams;
@@ -15,52 +15,52 @@ export type ArtistListenersParams = GetArtistListenersParams;
15
15
  export class ArtistNamespace {
16
16
  constructor(private readonly call: Call) {}
17
17
 
18
- getArtist<T = unknown>(params: GetArtistParams, opts?: RequestOptions) {
19
- return this.call<T>("app.rocksky.artist.getArtist", "GET", {
18
+ getArtist(params: GetArtistParams, opts?: RequestOptions) {
19
+ return this.call("app.rocksky.artist.getArtist", "GET", {
20
20
  params,
21
21
  ...opts,
22
22
  });
23
23
  }
24
24
 
25
- getArtists<T = unknown>(params: GetArtistsParams = {}, opts?: RequestOptions) {
26
- return this.call<T>("app.rocksky.artist.getArtists", "GET", {
25
+ getArtists(params: GetArtistsParams = {}, opts?: RequestOptions) {
26
+ return this.call("app.rocksky.artist.getArtists", "GET", {
27
27
  params,
28
28
  ...opts,
29
29
  });
30
30
  }
31
31
 
32
- getArtistAlbums<T = unknown>(params: GetArtistAlbumsParams, opts?: RequestOptions) {
33
- return this.call<T>("app.rocksky.artist.getArtistAlbums", "GET", {
32
+ getArtistAlbums(params: GetArtistAlbumsParams, opts?: RequestOptions) {
33
+ return this.call("app.rocksky.artist.getArtistAlbums", "GET", {
34
34
  params,
35
35
  ...opts,
36
36
  });
37
37
  }
38
38
 
39
- getArtistTracks<T = unknown>(
39
+ getArtistTracks(
40
40
  params: GetArtistTracksParams = {},
41
41
  opts?: RequestOptions,
42
42
  ) {
43
- return this.call<T>("app.rocksky.artist.getArtistTracks", "GET", {
43
+ return this.call("app.rocksky.artist.getArtistTracks", "GET", {
44
44
  params,
45
45
  ...opts,
46
46
  });
47
47
  }
48
48
 
49
- getArtistListeners<T = unknown>(
49
+ getArtistListeners(
50
50
  params: GetArtistListenersParams,
51
51
  opts?: RequestOptions,
52
52
  ) {
53
- return this.call<T>("app.rocksky.artist.getArtistListeners", "GET", {
53
+ return this.call("app.rocksky.artist.getArtistListeners", "GET", {
54
54
  params,
55
55
  ...opts,
56
56
  });
57
57
  }
58
58
 
59
- getArtistRecentListeners<T = unknown>(
59
+ getArtistRecentListeners(
60
60
  params: GetArtistRecentListenersParams,
61
61
  opts?: RequestOptions,
62
62
  ) {
63
- return this.call<T>("app.rocksky.artist.getArtistRecentListeners", "GET", {
63
+ return this.call("app.rocksky.artist.getArtistRecentListeners", "GET", {
64
64
  params,
65
65
  ...opts,
66
66
  });
@@ -2,9 +2,9 @@ import type {
2
2
  GetScrobblesChartParams,
3
3
  GetTopArtistsParams,
4
4
  GetTopTracksParams,
5
- } from "../generated/types";
6
- import type { RequestOptions } from "../types";
7
- import type { Call } from "./_helpers";
5
+ } from "../generated/types.js";
6
+ import type { RequestOptions } from "../types.js";
7
+ import type { Call } from "./_helpers.js";
8
8
 
9
9
  export type ScrobblesChartParams = GetScrobblesChartParams;
10
10
  export type TopChartParams = GetTopArtistsParams;
@@ -12,25 +12,25 @@ export type TopChartParams = GetTopArtistsParams;
12
12
  export class ChartsNamespace {
13
13
  constructor(private readonly call: Call) {}
14
14
 
15
- getScrobblesChart<T = unknown>(
15
+ getScrobblesChart(
16
16
  params: ScrobblesChartParams = {},
17
17
  opts?: RequestOptions,
18
18
  ) {
19
- return this.call<T>("app.rocksky.charts.getScrobblesChart", "GET", {
19
+ return this.call("app.rocksky.charts.getScrobblesChart", "GET", {
20
20
  params,
21
21
  ...opts,
22
22
  });
23
23
  }
24
24
 
25
- getTopArtists<T = unknown>(params: GetTopArtistsParams = {}, opts?: RequestOptions) {
26
- return this.call<T>("app.rocksky.charts.getTopArtists", "GET", {
25
+ getTopArtists(params: GetTopArtistsParams = {}, opts?: RequestOptions) {
26
+ return this.call("app.rocksky.charts.getTopArtists", "GET", {
27
27
  params,
28
28
  ...opts,
29
29
  });
30
30
  }
31
31
 
32
- getTopTracks<T = unknown>(params: GetTopTracksParams = {}, opts?: RequestOptions) {
33
- return this.call<T>("app.rocksky.charts.getTopTracks", "GET", {
32
+ getTopTracks(params: GetTopTracksParams = {}, opts?: RequestOptions) {
33
+ return this.call("app.rocksky.charts.getTopTracks", "GET", {
34
34
  params,
35
35
  ...opts,
36
36
  });
@@ -3,48 +3,48 @@ import type {
3
3
  GetFilesParams,
4
4
  GetMetadataParams,
5
5
  GetTemporaryLinkParams,
6
- } from "../generated/types";
7
- import type { RequestOptions } from "../types";
8
- import type { Call } from "./_helpers";
6
+ } from "../generated/types.js";
7
+ import type { RequestOptions } from "../types.js";
8
+ import type { Call } from "./_helpers.js";
9
9
 
10
10
  export class DropboxNamespace {
11
11
  constructor(private readonly call: Call) {}
12
12
 
13
- getFiles<T = unknown>(
13
+ getFiles(
14
14
  params: GetFilesParams = {},
15
15
  opts?: RequestOptions,
16
16
  ) {
17
- return this.call<T>("app.rocksky.dropbox.getFiles", "GET", {
17
+ return this.call("app.rocksky.dropbox.getFiles", "GET", {
18
18
  params,
19
19
  requireAuth: true,
20
20
  ...opts,
21
21
  });
22
22
  }
23
23
 
24
- getMetadata<T = unknown>(params: GetMetadataParams, opts?: RequestOptions) {
25
- return this.call<T>("app.rocksky.dropbox.getMetadata", "GET", {
24
+ getMetadata(params: GetMetadataParams, opts?: RequestOptions) {
25
+ return this.call("app.rocksky.dropbox.getMetadata", "GET", {
26
26
  params,
27
27
  requireAuth: true,
28
28
  ...opts,
29
29
  });
30
30
  }
31
31
 
32
- getTemporaryLink<T = unknown>(
32
+ getTemporaryLink(
33
33
  params: GetTemporaryLinkParams,
34
34
  opts?: RequestOptions,
35
35
  ) {
36
- return this.call<T>("app.rocksky.dropbox.getTemporaryLink", "GET", {
36
+ return this.call("app.rocksky.dropbox.getTemporaryLink", "GET", {
37
37
  params,
38
38
  requireAuth: true,
39
39
  ...opts,
40
40
  });
41
41
  }
42
42
 
43
- downloadFile<T = unknown>(
43
+ downloadFile(
44
44
  params: DownloadFileParams,
45
45
  opts?: RequestOptions,
46
46
  ) {
47
- return this.call<T>("app.rocksky.dropbox.downloadFile", "GET", {
47
+ return this.call("app.rocksky.dropbox.downloadFile", "GET", {
48
48
  params,
49
49
  requireAuth: true,
50
50
  ...opts,
@@ -8,103 +8,103 @@ import type {
8
8
  GetRecommendationsParams,
9
9
  GetStoriesParams,
10
10
  SearchParams,
11
- } from "../generated/types";
12
- import type { RequestOptions } from "../types";
13
- import type { Call } from "./_helpers";
11
+ } from "../generated/types.js";
12
+ import type { RequestOptions } from "../types.js";
13
+ import type { Call } from "./_helpers.js";
14
14
 
15
15
  export type RecommendParams = GetRecommendationsParams;
16
16
 
17
17
  export class FeedNamespace {
18
18
  constructor(private readonly call: Call) {}
19
19
 
20
- search<T = unknown>(params: SearchParams, opts?: RequestOptions) {
21
- return this.call<T>("app.rocksky.feed.search", "GET", {
20
+ search(params: SearchParams, opts?: RequestOptions) {
21
+ return this.call("app.rocksky.feed.search", "GET", {
22
22
  params,
23
23
  ...opts,
24
24
  });
25
25
  }
26
26
 
27
- getFeed<T = unknown>(
27
+ getFeed(
28
28
  params: GetFeedParams,
29
29
  opts?: RequestOptions,
30
30
  ) {
31
- return this.call<T>("app.rocksky.feed.getFeed", "GET", {
31
+ return this.call("app.rocksky.feed.getFeed", "GET", {
32
32
  params,
33
33
  ...opts,
34
34
  });
35
35
  }
36
36
 
37
- getFeedGenerators<T = unknown>(
37
+ getFeedGenerators(
38
38
  params: GetFeedGeneratorsParams = {},
39
39
  opts?: RequestOptions,
40
40
  ) {
41
- return this.call<T>("app.rocksky.feed.getFeedGenerators", "GET", {
41
+ return this.call("app.rocksky.feed.getFeedGenerators", "GET", {
42
42
  params,
43
43
  ...opts,
44
44
  });
45
45
  }
46
46
 
47
- getFeedGenerator<T = unknown>(
47
+ getFeedGenerator(
48
48
  params: GetFeedGeneratorParams,
49
49
  opts?: RequestOptions,
50
50
  ) {
51
- return this.call<T>("app.rocksky.feed.getFeedGenerator", "GET", {
51
+ return this.call("app.rocksky.feed.getFeedGenerator", "GET", {
52
52
  params,
53
53
  ...opts,
54
54
  });
55
55
  }
56
56
 
57
- describeFeedGenerator<T = unknown>(opts?: RequestOptions) {
58
- return this.call<T>("app.rocksky.feed.describeFeedGenerator", "GET", {
57
+ describeFeedGenerator(opts?: RequestOptions) {
58
+ return this.call("app.rocksky.feed.describeFeedGenerator", "GET", {
59
59
  ...opts,
60
60
  });
61
61
  }
62
62
 
63
- getFeedSkeleton<T = unknown>(
63
+ getFeedSkeleton(
64
64
  params: GetFeedSkeletonParams,
65
65
  opts?: RequestOptions,
66
66
  ) {
67
- return this.call<T>("app.rocksky.feed.getFeedSkeleton", "GET", {
67
+ return this.call("app.rocksky.feed.getFeedSkeleton", "GET", {
68
68
  params,
69
69
  ...opts,
70
70
  });
71
71
  }
72
72
 
73
- getRecommendations<T = unknown>(
73
+ getRecommendations(
74
74
  params: GetRecommendationsParams,
75
75
  opts?: RequestOptions,
76
76
  ) {
77
- return this.call<T>("app.rocksky.feed.getRecommendations", "GET", {
77
+ return this.call("app.rocksky.feed.getRecommendations", "GET", {
78
78
  params,
79
79
  ...opts,
80
80
  });
81
81
  }
82
82
 
83
- getArtistRecommendations<T = unknown>(
83
+ getArtistRecommendations(
84
84
  params: GetArtistRecommendationsParams,
85
85
  opts?: RequestOptions,
86
86
  ) {
87
- return this.call<T>("app.rocksky.feed.getArtistRecommendations", "GET", {
87
+ return this.call("app.rocksky.feed.getArtistRecommendations", "GET", {
88
88
  params,
89
89
  ...opts,
90
90
  });
91
91
  }
92
92
 
93
- getAlbumRecommendations<T = unknown>(
93
+ getAlbumRecommendations(
94
94
  params: GetAlbumRecommendationsParams,
95
95
  opts?: RequestOptions,
96
96
  ) {
97
- return this.call<T>("app.rocksky.feed.getAlbumRecommendations", "GET", {
97
+ return this.call("app.rocksky.feed.getAlbumRecommendations", "GET", {
98
98
  params,
99
99
  ...opts,
100
100
  });
101
101
  }
102
102
 
103
- getStories<T = unknown>(
103
+ getStories(
104
104
  params: GetStoriesParams = {},
105
105
  opts?: RequestOptions,
106
106
  ) {
107
- return this.call<T>("app.rocksky.feed.getStories", "GET", {
107
+ return this.call("app.rocksky.feed.getStories", "GET", {
108
108
  params,
109
109
  ...opts,
110
110
  });
@@ -2,37 +2,37 @@ import type {
2
2
  DownloadFileParams,
3
3
  GetFileParams,
4
4
  GetFilesParams,
5
- } from "../generated/types";
6
- import type { RequestOptions } from "../types";
7
- import type { Call } from "./_helpers";
5
+ } from "../generated/types.js";
6
+ import type { RequestOptions } from "../types.js";
7
+ import type { Call } from "./_helpers.js";
8
8
 
9
9
  export class GoogleDriveNamespace {
10
10
  constructor(private readonly call: Call) {}
11
11
 
12
- getFile<T = unknown>(params: GetFileParams, opts?: RequestOptions) {
13
- return this.call<T>("app.rocksky.googledrive.getFile", "GET", {
12
+ getFile(params: GetFileParams, opts?: RequestOptions) {
13
+ return this.call("app.rocksky.googledrive.getFile", "GET", {
14
14
  params,
15
15
  requireAuth: true,
16
16
  ...opts,
17
17
  });
18
18
  }
19
19
 
20
- getFiles<T = unknown>(
20
+ getFiles(
21
21
  params: GetFilesParams = {},
22
22
  opts?: RequestOptions,
23
23
  ) {
24
- return this.call<T>("app.rocksky.googledrive.getFiles", "GET", {
24
+ return this.call("app.rocksky.googledrive.getFiles", "GET", {
25
25
  params,
26
26
  requireAuth: true,
27
27
  ...opts,
28
28
  });
29
29
  }
30
30
 
31
- downloadFile<T = unknown>(
31
+ downloadFile(
32
32
  params: DownloadFileParams,
33
33
  opts?: RequestOptions,
34
34
  ) {
35
- return this.call<T>("app.rocksky.googledrive.downloadFile", "GET", {
35
+ return this.call("app.rocksky.googledrive.downloadFile", "GET", {
36
36
  params,
37
37
  requireAuth: true,
38
38
  ...opts,
@@ -4,9 +4,9 @@ import type {
4
4
  GetFollowsParams,
5
5
  GetKnownFollowersParams,
6
6
  UnfollowAccountParams,
7
- } from "../generated/types";
8
- import type { RequestOptions } from "../types";
9
- import type { Call } from "./_helpers";
7
+ } from "../generated/types.js";
8
+ import type { RequestOptions } from "../types.js";
9
+ import type { Call } from "./_helpers.js";
10
10
 
11
11
  export type FollowListParams = GetFollowersParams;
12
12
  export type KnownFollowersParams = GetKnownFollowersParams;
@@ -14,47 +14,47 @@ export type KnownFollowersParams = GetKnownFollowersParams;
14
14
  export class GraphNamespace {
15
15
  constructor(private readonly call: Call) {}
16
16
 
17
- followAccount<T = unknown>(
17
+ followAccount(
18
18
  params: FollowAccountParams,
19
19
  opts?: RequestOptions,
20
20
  ) {
21
- return this.call<T>("app.rocksky.graph.followAccount", "POST", {
21
+ return this.call("app.rocksky.graph.followAccount", "POST", {
22
22
  params,
23
23
  requireAuth: true,
24
24
  ...opts,
25
25
  });
26
26
  }
27
27
 
28
- unfollowAccount<T = unknown>(
28
+ unfollowAccount(
29
29
  params: UnfollowAccountParams,
30
30
  opts?: RequestOptions,
31
31
  ) {
32
- return this.call<T>("app.rocksky.graph.unfollowAccount", "POST", {
32
+ return this.call("app.rocksky.graph.unfollowAccount", "POST", {
33
33
  params,
34
34
  requireAuth: true,
35
35
  ...opts,
36
36
  });
37
37
  }
38
38
 
39
- getFollowers<T = unknown>(params: GetFollowersParams, opts?: RequestOptions) {
40
- return this.call<T>("app.rocksky.graph.getFollowers", "GET", {
39
+ getFollowers(params: GetFollowersParams, opts?: RequestOptions) {
40
+ return this.call("app.rocksky.graph.getFollowers", "GET", {
41
41
  params,
42
42
  ...opts,
43
43
  });
44
44
  }
45
45
 
46
- getFollows<T = unknown>(params: GetFollowsParams, opts?: RequestOptions) {
47
- return this.call<T>("app.rocksky.graph.getFollows", "GET", {
46
+ getFollows(params: GetFollowsParams, opts?: RequestOptions) {
47
+ return this.call("app.rocksky.graph.getFollows", "GET", {
48
48
  params,
49
49
  ...opts,
50
50
  });
51
51
  }
52
52
 
53
- getKnownFollowers<T = unknown>(
53
+ getKnownFollowers(
54
54
  params: GetKnownFollowersParams,
55
55
  opts?: RequestOptions,
56
56
  ) {
57
- return this.call<T>("app.rocksky.graph.getKnownFollowers", "GET", {
57
+ return this.call("app.rocksky.graph.getKnownFollowers", "GET", {
58
58
  params,
59
59
  ...opts,
60
60
  });
@@ -3,41 +3,41 @@ import type {
3
3
  DislikeSongInput,
4
4
  LikeShoutInput,
5
5
  LikeSongInput,
6
- } from "../generated/types";
7
- import type { RequestOptions } from "../types";
8
- import type { Call } from "./_helpers";
6
+ } from "../generated/types.js";
7
+ import type { RequestOptions } from "../types.js";
8
+ import type { Call } from "./_helpers.js";
9
9
 
10
10
  export type LikeInput = LikeSongInput;
11
11
 
12
12
  export class LikeNamespace {
13
13
  constructor(private readonly call: Call) {}
14
14
 
15
- likeSong<T = unknown>(input: LikeSongInput = {}, opts?: RequestOptions) {
16
- return this.call<T>("app.rocksky.like.likeSong", "POST", {
15
+ likeSong(input: LikeSongInput = {}, opts?: RequestOptions) {
16
+ return this.call("app.rocksky.like.likeSong", "POST", {
17
17
  body: input,
18
18
  requireAuth: true,
19
19
  ...opts,
20
20
  });
21
21
  }
22
22
 
23
- dislikeSong<T = unknown>(input: DislikeSongInput = {}, opts?: RequestOptions) {
24
- return this.call<T>("app.rocksky.like.dislikeSong", "POST", {
23
+ dislikeSong(input: DislikeSongInput = {}, opts?: RequestOptions) {
24
+ return this.call("app.rocksky.like.dislikeSong", "POST", {
25
25
  body: input,
26
26
  requireAuth: true,
27
27
  ...opts,
28
28
  });
29
29
  }
30
30
 
31
- likeShout<T = unknown>(input: LikeShoutInput = {}, opts?: RequestOptions) {
32
- return this.call<T>("app.rocksky.like.likeShout", "POST", {
31
+ likeShout(input: LikeShoutInput = {}, opts?: RequestOptions) {
32
+ return this.call("app.rocksky.like.likeShout", "POST", {
33
33
  body: input,
34
34
  requireAuth: true,
35
35
  ...opts,
36
36
  });
37
37
  }
38
38
 
39
- dislikeShout<T = unknown>(input: DislikeShoutInput = {}, opts?: RequestOptions) {
40
- return this.call<T>("app.rocksky.like.dislikeShout", "POST", {
39
+ dislikeShout(input: DislikeShoutInput = {}, opts?: RequestOptions) {
40
+ return this.call("app.rocksky.like.dislikeShout", "POST", {
41
41
  body: input,
42
42
  requireAuth: true,
43
43
  ...opts,
@@ -1,24 +1,24 @@
1
- import type { PutMirrorSourceInput } from "../generated/types";
2
- import type { RequestOptions } from "../types";
3
- import type { Call } from "./_helpers";
1
+ import type { PutMirrorSourceInput } from "../generated/types.js";
2
+ import type { RequestOptions } from "../types.js";
3
+ import type { Call } from "./_helpers.js";
4
4
 
5
5
  export type { PutMirrorSourceInput };
6
6
 
7
7
  export class MirrorNamespace {
8
8
  constructor(private readonly call: Call) {}
9
9
 
10
- getMirrorSources<T = unknown>(opts?: RequestOptions) {
11
- return this.call<T>("app.rocksky.mirror.getMirrorSources", "GET", {
10
+ getMirrorSources(opts?: RequestOptions) {
11
+ return this.call("app.rocksky.mirror.getMirrorSources", "GET", {
12
12
  requireAuth: true,
13
13
  ...opts,
14
14
  });
15
15
  }
16
16
 
17
- putMirrorSource<T = unknown>(
17
+ putMirrorSource(
18
18
  input: PutMirrorSourceInput,
19
19
  opts?: RequestOptions,
20
20
  ) {
21
- return this.call<T>("app.rocksky.mirror.putMirrorSource", "POST", {
21
+ return this.call("app.rocksky.mirror.putMirrorSource", "POST", {
22
22
  body: input,
23
23
  requireAuth: true,
24
24
  ...opts,
@@ -10,114 +10,114 @@ import type {
10
10
  PlayParams,
11
11
  PreviousParams,
12
12
  SeekParams,
13
- } from "../generated/types";
14
- import type { RequestOptions } from "../types";
15
- import type { Call } from "./_helpers";
13
+ } from "../generated/types.js";
14
+ import type { RequestOptions } from "../types.js";
15
+ import type { Call } from "./_helpers.js";
16
16
 
17
17
  export class PlayerNamespace {
18
18
  constructor(private readonly call: Call) {}
19
19
 
20
- getCurrentlyPlaying<T = unknown>(
20
+ getCurrentlyPlaying(
21
21
  params: GetCurrentlyPlayingParams = {},
22
22
  opts?: RequestOptions,
23
23
  ) {
24
- return this.call<T>("app.rocksky.player.getCurrentlyPlaying", "GET", {
24
+ return this.call("app.rocksky.player.getCurrentlyPlaying", "GET", {
25
25
  params,
26
26
  ...opts,
27
27
  });
28
28
  }
29
29
 
30
- getPlaybackQueue<T = unknown>(
30
+ getPlaybackQueue(
31
31
  params: GetPlaybackQueueParams = {},
32
32
  opts?: RequestOptions,
33
33
  ) {
34
- return this.call<T>("app.rocksky.player.getPlaybackQueue", "GET", {
34
+ return this.call("app.rocksky.player.getPlaybackQueue", "GET", {
35
35
  params,
36
36
  ...opts,
37
37
  });
38
38
  }
39
39
 
40
- play<T = unknown>(params: PlayParams = {}, opts?: RequestOptions) {
41
- return this.call<T>("app.rocksky.player.play", "POST", {
40
+ play(params: PlayParams = {}, opts?: RequestOptions) {
41
+ return this.call("app.rocksky.player.play", "POST", {
42
42
  params,
43
43
  requireAuth: true,
44
44
  ...opts,
45
45
  });
46
46
  }
47
47
 
48
- pause<T = unknown>(params: PauseParams = {}, opts?: RequestOptions) {
49
- return this.call<T>("app.rocksky.player.pause", "POST", {
48
+ pause(params: PauseParams = {}, opts?: RequestOptions) {
49
+ return this.call("app.rocksky.player.pause", "POST", {
50
50
  params,
51
51
  requireAuth: true,
52
52
  ...opts,
53
53
  });
54
54
  }
55
55
 
56
- next<T = unknown>(params: NextParams = {}, opts?: RequestOptions) {
57
- return this.call<T>("app.rocksky.player.next", "POST", {
56
+ next(params: NextParams = {}, opts?: RequestOptions) {
57
+ return this.call("app.rocksky.player.next", "POST", {
58
58
  params,
59
59
  requireAuth: true,
60
60
  ...opts,
61
61
  });
62
62
  }
63
63
 
64
- previous<T = unknown>(params: PreviousParams = {}, opts?: RequestOptions) {
65
- return this.call<T>("app.rocksky.player.previous", "POST", {
64
+ previous(params: PreviousParams = {}, opts?: RequestOptions) {
65
+ return this.call("app.rocksky.player.previous", "POST", {
66
66
  params,
67
67
  requireAuth: true,
68
68
  ...opts,
69
69
  });
70
70
  }
71
71
 
72
- seek<T = unknown>(
72
+ seek(
73
73
  params: SeekParams,
74
74
  opts?: RequestOptions,
75
75
  ) {
76
- return this.call<T>("app.rocksky.player.seek", "POST", {
76
+ return this.call("app.rocksky.player.seek", "POST", {
77
77
  params,
78
78
  requireAuth: true,
79
79
  ...opts,
80
80
  });
81
81
  }
82
82
 
83
- playFile<T = unknown>(
83
+ playFile(
84
84
  params: PlayFileParams,
85
85
  opts?: RequestOptions,
86
86
  ) {
87
- return this.call<T>("app.rocksky.player.playFile", "POST", {
87
+ return this.call("app.rocksky.player.playFile", "POST", {
88
88
  params,
89
89
  requireAuth: true,
90
90
  ...opts,
91
91
  });
92
92
  }
93
93
 
94
- playDirectory<T = unknown>(
94
+ playDirectory(
95
95
  params: PlayDirectoryParams,
96
96
  opts?: RequestOptions,
97
97
  ) {
98
- return this.call<T>("app.rocksky.player.playDirectory", "POST", {
98
+ return this.call("app.rocksky.player.playDirectory", "POST", {
99
99
  params,
100
100
  requireAuth: true,
101
101
  ...opts,
102
102
  });
103
103
  }
104
104
 
105
- addItemsToQueue<T = unknown>(
105
+ addItemsToQueue(
106
106
  params: AddItemsToQueueParams,
107
107
  opts?: RequestOptions,
108
108
  ) {
109
- return this.call<T>("app.rocksky.player.addItemsToQueue", "POST", {
109
+ return this.call("app.rocksky.player.addItemsToQueue", "POST", {
110
110
  params,
111
111
  requireAuth: true,
112
112
  ...opts,
113
113
  });
114
114
  }
115
115
 
116
- addDirectoryToQueue<T = unknown>(
116
+ addDirectoryToQueue(
117
117
  params: AddDirectoryToQueueParams,
118
118
  opts?: RequestOptions,
119
119
  ) {
120
- return this.call<T>("app.rocksky.player.addDirectoryToQueue", "POST", {
120
+ return this.call("app.rocksky.player.addDirectoryToQueue", "POST", {
121
121
  params,
122
122
  ...opts,
123
123
  });