@saavn-labs/sdk 0.1.0 → 0.1.2
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/README.md +27 -21
- package/dist/core/models/album.d.ts +1 -1
- package/dist/core/models/artist.d.ts +1 -1
- package/dist/core/models/index.d.ts +4 -4
- package/dist/core/models/index.js +4 -4
- package/dist/core/models/playlist.d.ts +1 -1
- package/dist/core/models/song.d.ts +1 -1
- package/dist/core/modules/album.module.js +4 -4
- package/dist/core/modules/artist.module.js +4 -4
- package/dist/core/modules/extras.module.js +3 -3
- package/dist/core/modules/playlist.module.js +4 -4
- package/dist/core/modules/song.module.d.ts +1 -1
- package/dist/core/modules/song.module.js +5 -5
- package/dist/helpers/experimental/stream-urls/index.js +13 -4
- package/dist/helpers/experimental/stream-urls/stream-urls.edge.js +1 -1
- package/dist/helpers/fetch.js +1 -1
- package/dist/helpers/utils.d.ts +1 -1
- package/dist/index.d.ts +11 -10
- package/dist/index.js +9 -8
- package/dist/saavn/common-mapper.d.ts +4 -4
- package/dist/saavn/entities/album.entity.js +2 -2
- package/dist/saavn/entities/artist.entity.js +2 -2
- package/dist/saavn/entities/extras.js +2 -2
- package/dist/saavn/entities/index.d.ts +6 -6
- package/dist/saavn/entities/index.js +6 -6
- package/dist/saavn/entities/playlist.entity.js +2 -2
- package/dist/saavn/entities/song.entity.js +1 -1
- package/dist/saavn/operations/get-details/index.d.ts +9 -9
- package/dist/saavn/operations/get-details/index.js +2 -2
- package/dist/saavn/operations/get-details/mapper.ops.d.ts +9 -9
- package/dist/saavn/operations/get-details/mapper.ops.js +2 -2
- package/dist/saavn/operations/get-details/schema.ops.js +3 -3
- package/dist/saavn/operations/get-reco/index.d.ts +4 -4
- package/dist/saavn/operations/get-reco/index.js +2 -2
- package/dist/saavn/operations/get-reco/mapper.ops.d.ts +4 -4
- package/dist/saavn/operations/get-reco/mapper.ops.js +2 -2
- package/dist/saavn/operations/get-reco/schema.ops.js +3 -3
- package/dist/saavn/operations/get-trending/index.d.ts +5 -5
- package/dist/saavn/operations/get-trending/index.js +2 -2
- package/dist/saavn/operations/get-trending/mapper.ops.d.ts +2 -2
- package/dist/saavn/operations/get-trending/mapper.ops.js +2 -2
- package/dist/saavn/operations/get-trending/schema.ops.js +2 -2
- package/dist/saavn/operations/index.d.ts +6 -6
- package/dist/saavn/operations/index.js +6 -6
- package/dist/saavn/operations/search-results/index.d.ts +39 -39
- package/dist/saavn/operations/search-results/index.js +2 -2
- package/dist/saavn/operations/search-results/mapper.ops.d.ts +39 -39
- package/dist/saavn/operations/search-results/mapper.ops.js +2 -2
- package/dist/saavn/operations/search-results/schema.ops.js +3 -3
- package/dist/saavn/operations/web-api/index.d.ts +5 -5
- package/dist/saavn/operations/web-api/index.js +2 -2
- package/dist/saavn/operations/web-api/mapper.ops.d.ts +5 -5
- package/dist/saavn/operations/web-api/mapper.ops.js +2 -2
- package/dist/saavn/operations/web-api/schema.ops.js +3 -3
- package/dist/saavn/operations/web-radio/index.d.ts +2 -2
- package/dist/saavn/operations/web-radio/index.js +2 -2
- package/dist/saavn/operations/web-radio/mapper.ops.d.ts +2 -2
- package/dist/saavn/operations/web-radio/mapper.ops.js +2 -2
- package/dist/saavn/operations/web-radio/schema.ops.js +3 -3
- package/dist/saavn/run-operation.js +2 -2
- package/dist/schemas/index.js +6 -6
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnSearchResultsSchema } from './schema.ops';
|
|
2
|
+
import { SaavnSearchResultsSchema } from './schema.ops.js';
|
|
3
3
|
export declare const SaavnSearchResultsMapper: {
|
|
4
4
|
all: (data: z.infer<typeof SaavnSearchResultsSchema.all.response>) => {
|
|
5
5
|
albums: {
|
|
@@ -11,7 +11,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
11
11
|
subtitle: any;
|
|
12
12
|
description: any;
|
|
13
13
|
url: any;
|
|
14
|
-
images: import("
|
|
14
|
+
images: import("../../../types.js").Image[];
|
|
15
15
|
flags: {
|
|
16
16
|
isExplicit: boolean;
|
|
17
17
|
isRadioPresent?: undefined;
|
|
@@ -24,7 +24,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
24
24
|
subtitle: any;
|
|
25
25
|
description: any;
|
|
26
26
|
url: any;
|
|
27
|
-
images: import("
|
|
27
|
+
images: import("../../../types.js").Image[];
|
|
28
28
|
flags: {
|
|
29
29
|
isExplicit: boolean;
|
|
30
30
|
isRadioPresent?: undefined;
|
|
@@ -35,7 +35,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
35
35
|
type: "artist";
|
|
36
36
|
name: any;
|
|
37
37
|
url: any;
|
|
38
|
-
images: import("
|
|
38
|
+
images: import("../../../types.js").Image[];
|
|
39
39
|
flags: {
|
|
40
40
|
isRadioPresent: any;
|
|
41
41
|
isExplicit?: undefined;
|
|
@@ -50,7 +50,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
50
50
|
subtitle: any;
|
|
51
51
|
description: any;
|
|
52
52
|
url: any;
|
|
53
|
-
images: import("
|
|
53
|
+
images: import("../../../types.js").Image[];
|
|
54
54
|
flags: {
|
|
55
55
|
isExplicit: boolean;
|
|
56
56
|
isRadioPresent?: undefined;
|
|
@@ -63,7 +63,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
63
63
|
subtitle: any;
|
|
64
64
|
description: any;
|
|
65
65
|
url: any;
|
|
66
|
-
images: import("
|
|
66
|
+
images: import("../../../types.js").Image[];
|
|
67
67
|
flags?: undefined;
|
|
68
68
|
name?: undefined;
|
|
69
69
|
} | null)[];
|
|
@@ -77,7 +77,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
77
77
|
subtitle: any;
|
|
78
78
|
description: any;
|
|
79
79
|
url: any;
|
|
80
|
-
images: import("
|
|
80
|
+
images: import("../../../types.js").Image[];
|
|
81
81
|
flags: {
|
|
82
82
|
isExplicit: boolean;
|
|
83
83
|
isRadioPresent?: undefined;
|
|
@@ -90,7 +90,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
90
90
|
subtitle: any;
|
|
91
91
|
description: any;
|
|
92
92
|
url: any;
|
|
93
|
-
images: import("
|
|
93
|
+
images: import("../../../types.js").Image[];
|
|
94
94
|
flags: {
|
|
95
95
|
isExplicit: boolean;
|
|
96
96
|
isRadioPresent?: undefined;
|
|
@@ -101,7 +101,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
101
101
|
type: "artist";
|
|
102
102
|
name: any;
|
|
103
103
|
url: any;
|
|
104
|
-
images: import("
|
|
104
|
+
images: import("../../../types.js").Image[];
|
|
105
105
|
flags: {
|
|
106
106
|
isRadioPresent: any;
|
|
107
107
|
isExplicit?: undefined;
|
|
@@ -116,7 +116,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
116
116
|
subtitle: any;
|
|
117
117
|
description: any;
|
|
118
118
|
url: any;
|
|
119
|
-
images: import("
|
|
119
|
+
images: import("../../../types.js").Image[];
|
|
120
120
|
flags: {
|
|
121
121
|
isExplicit: boolean;
|
|
122
122
|
isRadioPresent?: undefined;
|
|
@@ -129,7 +129,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
129
129
|
subtitle: any;
|
|
130
130
|
description: any;
|
|
131
131
|
url: any;
|
|
132
|
-
images: import("
|
|
132
|
+
images: import("../../../types.js").Image[];
|
|
133
133
|
flags?: undefined;
|
|
134
134
|
name?: undefined;
|
|
135
135
|
} | null)[];
|
|
@@ -143,7 +143,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
143
143
|
subtitle: any;
|
|
144
144
|
description: any;
|
|
145
145
|
url: any;
|
|
146
|
-
images: import("
|
|
146
|
+
images: import("../../../types.js").Image[];
|
|
147
147
|
flags: {
|
|
148
148
|
isExplicit: boolean;
|
|
149
149
|
isRadioPresent?: undefined;
|
|
@@ -156,7 +156,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
156
156
|
subtitle: any;
|
|
157
157
|
description: any;
|
|
158
158
|
url: any;
|
|
159
|
-
images: import("
|
|
159
|
+
images: import("../../../types.js").Image[];
|
|
160
160
|
flags: {
|
|
161
161
|
isExplicit: boolean;
|
|
162
162
|
isRadioPresent?: undefined;
|
|
@@ -167,7 +167,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
167
167
|
type: "artist";
|
|
168
168
|
name: any;
|
|
169
169
|
url: any;
|
|
170
|
-
images: import("
|
|
170
|
+
images: import("../../../types.js").Image[];
|
|
171
171
|
flags: {
|
|
172
172
|
isRadioPresent: any;
|
|
173
173
|
isExplicit?: undefined;
|
|
@@ -182,7 +182,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
182
182
|
subtitle: any;
|
|
183
183
|
description: any;
|
|
184
184
|
url: any;
|
|
185
|
-
images: import("
|
|
185
|
+
images: import("../../../types.js").Image[];
|
|
186
186
|
flags: {
|
|
187
187
|
isExplicit: boolean;
|
|
188
188
|
isRadioPresent?: undefined;
|
|
@@ -195,7 +195,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
195
195
|
subtitle: any;
|
|
196
196
|
description: any;
|
|
197
197
|
url: any;
|
|
198
|
-
images: import("
|
|
198
|
+
images: import("../../../types.js").Image[];
|
|
199
199
|
flags?: undefined;
|
|
200
200
|
name?: undefined;
|
|
201
201
|
} | null)[];
|
|
@@ -209,7 +209,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
209
209
|
subtitle: any;
|
|
210
210
|
description: any;
|
|
211
211
|
url: any;
|
|
212
|
-
images: import("
|
|
212
|
+
images: import("../../../types.js").Image[];
|
|
213
213
|
flags: {
|
|
214
214
|
isExplicit: boolean;
|
|
215
215
|
isRadioPresent?: undefined;
|
|
@@ -222,7 +222,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
222
222
|
subtitle: any;
|
|
223
223
|
description: any;
|
|
224
224
|
url: any;
|
|
225
|
-
images: import("
|
|
225
|
+
images: import("../../../types.js").Image[];
|
|
226
226
|
flags: {
|
|
227
227
|
isExplicit: boolean;
|
|
228
228
|
isRadioPresent?: undefined;
|
|
@@ -233,7 +233,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
233
233
|
type: "artist";
|
|
234
234
|
name: any;
|
|
235
235
|
url: any;
|
|
236
|
-
images: import("
|
|
236
|
+
images: import("../../../types.js").Image[];
|
|
237
237
|
flags: {
|
|
238
238
|
isRadioPresent: any;
|
|
239
239
|
isExplicit?: undefined;
|
|
@@ -248,7 +248,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
248
248
|
subtitle: any;
|
|
249
249
|
description: any;
|
|
250
250
|
url: any;
|
|
251
|
-
images: import("
|
|
251
|
+
images: import("../../../types.js").Image[];
|
|
252
252
|
flags: {
|
|
253
253
|
isExplicit: boolean;
|
|
254
254
|
isRadioPresent?: undefined;
|
|
@@ -261,7 +261,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
261
261
|
subtitle: any;
|
|
262
262
|
description: any;
|
|
263
263
|
url: any;
|
|
264
|
-
images: import("
|
|
264
|
+
images: import("../../../types.js").Image[];
|
|
265
265
|
flags?: undefined;
|
|
266
266
|
name?: undefined;
|
|
267
267
|
} | null)[];
|
|
@@ -275,7 +275,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
275
275
|
subtitle: any;
|
|
276
276
|
description: any;
|
|
277
277
|
url: any;
|
|
278
|
-
images: import("
|
|
278
|
+
images: import("../../../types.js").Image[];
|
|
279
279
|
flags: {
|
|
280
280
|
isExplicit: boolean;
|
|
281
281
|
isRadioPresent?: undefined;
|
|
@@ -288,7 +288,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
288
288
|
subtitle: any;
|
|
289
289
|
description: any;
|
|
290
290
|
url: any;
|
|
291
|
-
images: import("
|
|
291
|
+
images: import("../../../types.js").Image[];
|
|
292
292
|
flags: {
|
|
293
293
|
isExplicit: boolean;
|
|
294
294
|
isRadioPresent?: undefined;
|
|
@@ -299,7 +299,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
299
299
|
type: "artist";
|
|
300
300
|
name: any;
|
|
301
301
|
url: any;
|
|
302
|
-
images: import("
|
|
302
|
+
images: import("../../../types.js").Image[];
|
|
303
303
|
flags: {
|
|
304
304
|
isRadioPresent: any;
|
|
305
305
|
isExplicit?: undefined;
|
|
@@ -314,7 +314,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
314
314
|
subtitle: any;
|
|
315
315
|
description: any;
|
|
316
316
|
url: any;
|
|
317
|
-
images: import("
|
|
317
|
+
images: import("../../../types.js").Image[];
|
|
318
318
|
flags: {
|
|
319
319
|
isExplicit: boolean;
|
|
320
320
|
isRadioPresent?: undefined;
|
|
@@ -327,7 +327,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
327
327
|
subtitle: any;
|
|
328
328
|
description: any;
|
|
329
329
|
url: any;
|
|
330
|
-
images: import("
|
|
330
|
+
images: import("../../../types.js").Image[];
|
|
331
331
|
flags?: undefined;
|
|
332
332
|
name?: undefined;
|
|
333
333
|
} | null)[];
|
|
@@ -340,7 +340,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
340
340
|
albums: (data: z.infer<typeof SaavnSearchResultsSchema.albums.response>) => {
|
|
341
341
|
total: number;
|
|
342
342
|
start: number;
|
|
343
|
-
results: import("../../../core/models").Album[];
|
|
343
|
+
results: import("../../../core/models/album.js").Album[];
|
|
344
344
|
};
|
|
345
345
|
artists: (data: z.infer<typeof SaavnSearchResultsSchema.artists.response>) => {
|
|
346
346
|
total: number;
|
|
@@ -355,7 +355,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
355
355
|
name: string;
|
|
356
356
|
subtitle?: string;
|
|
357
357
|
url: string;
|
|
358
|
-
images: import("
|
|
358
|
+
images: import("../../../types.js").Image[];
|
|
359
359
|
stats?: {
|
|
360
360
|
followerCount?: number;
|
|
361
361
|
fanCount?: number;
|
|
@@ -365,7 +365,7 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
365
365
|
available?: string[];
|
|
366
366
|
};
|
|
367
367
|
profile?: {
|
|
368
|
-
bio?: import("
|
|
368
|
+
bio?: import("../../../index.js").BioSection[];
|
|
369
369
|
dob?: string;
|
|
370
370
|
};
|
|
371
371
|
links?: {
|
|
@@ -383,31 +383,31 @@ export declare const SaavnSearchResultsMapper: {
|
|
|
383
383
|
};
|
|
384
384
|
};
|
|
385
385
|
songs?: {
|
|
386
|
-
top?: import("../../../core/models").Song[];
|
|
387
|
-
latest?: import("../../../core/models").Song[];
|
|
386
|
+
top?: import("../../../core/models/song.js").Song[];
|
|
387
|
+
latest?: import("../../../core/models/song.js").Song[];
|
|
388
388
|
};
|
|
389
389
|
albums?: {
|
|
390
|
-
top?: import("../../../core/models").Album[];
|
|
391
|
-
singles?: import("../../../core/models").Album[];
|
|
392
|
-
latest?: import("../../../core/models").Album[];
|
|
390
|
+
top?: import("../../../core/models/album.js").Album[];
|
|
391
|
+
singles?: import("../../../core/models/album.js").Album[];
|
|
392
|
+
latest?: import("../../../core/models/album.js").Album[];
|
|
393
393
|
};
|
|
394
394
|
playlists?: {
|
|
395
|
-
dedicated?: import("../../../core/models").Playlist[];
|
|
396
|
-
featured?: import("../../../core/models").Playlist[];
|
|
395
|
+
dedicated?: import("../../../core/models/playlist.js").Playlist[];
|
|
396
|
+
featured?: import("../../../core/models/playlist.js").Playlist[];
|
|
397
397
|
};
|
|
398
398
|
related?: {
|
|
399
|
-
similar?: import("../../../core/models").Artist[];
|
|
399
|
+
similar?: import("../../../core/models/artist.js").Artist[];
|
|
400
400
|
};
|
|
401
401
|
}[];
|
|
402
402
|
};
|
|
403
403
|
playlists: (data: z.infer<typeof SaavnSearchResultsSchema.playlists.response>) => {
|
|
404
404
|
total: number;
|
|
405
405
|
start: number;
|
|
406
|
-
results: import("../../../core/models").Playlist[];
|
|
406
|
+
results: import("../../../core/models/playlist.js").Playlist[];
|
|
407
407
|
};
|
|
408
408
|
songs: (data: z.infer<typeof SaavnSearchResultsSchema.songs.response>) => {
|
|
409
409
|
total: number;
|
|
410
410
|
start: number;
|
|
411
|
-
results: import("../../../core/models").Song[];
|
|
411
|
+
results: import("../../../core/models/song.js").Song[];
|
|
412
412
|
};
|
|
413
413
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { mapAlbumEdgeCase, mapPlaylistEdgeCase, mapSong, mapArtistBase, mapSearchAllBase, } from '../../common-mapper';
|
|
3
|
-
import { SaavnSearchResultsSchema } from './schema.ops';
|
|
2
|
+
import { mapAlbumEdgeCase, mapPlaylistEdgeCase, mapSong, mapArtistBase, mapSearchAllBase, } from '../../common-mapper.js';
|
|
3
|
+
import { SaavnSearchResultsSchema } from './schema.ops.js';
|
|
4
4
|
function normalizeSection(section) {
|
|
5
5
|
return {
|
|
6
6
|
position: section?.position ?? 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { NonEmptyString, PositiveString } from '../../primitives/string';
|
|
3
|
-
import { SaavnArtistBase } from '../../entities/base';
|
|
4
|
-
import { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase, SaavnSongEntity, SaavnSearchAlbumEntity, SaavnArtistSearchEntity, SaavnPlaylistSearchEntity, SaavnSongSearchEntity, SaavnShowEntity, } from '../../entities';
|
|
2
|
+
import { NonEmptyString, PositiveString } from '../../primitives/string.js';
|
|
3
|
+
import { SaavnArtistBase } from '../../entities/base.js';
|
|
4
|
+
import { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase, SaavnSongEntity, SaavnSearchAlbumEntity, SaavnArtistSearchEntity, SaavnPlaylistSearchEntity, SaavnSongSearchEntity, SaavnShowEntity, } from '../../entities/index.js';
|
|
5
5
|
const PageString = z.string().regex(/^\d+$/);
|
|
6
6
|
export const SaavnSearchResultsSchema = {
|
|
7
7
|
all: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SaavnWebAPISchema } from './schema.ops';
|
|
1
|
+
import { SaavnWebAPISchema } from './schema.ops.js';
|
|
2
2
|
export declare const SaavnWebAPI: {
|
|
3
3
|
album: {
|
|
4
4
|
call: string;
|
|
@@ -115,7 +115,7 @@ export declare const SaavnWebAPI: {
|
|
|
115
115
|
}, import("zod/v4/core").$loose>;
|
|
116
116
|
}, import("zod/v4/core").$loose>>;
|
|
117
117
|
};
|
|
118
|
-
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.album.response>) => import("../../../core/models").Album;
|
|
118
|
+
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.album.response>) => import("../../../core/models/album.js").Album;
|
|
119
119
|
};
|
|
120
120
|
artist: {
|
|
121
121
|
call: string;
|
|
@@ -399,7 +399,7 @@ export declare const SaavnWebAPI: {
|
|
|
399
399
|
}, import("zod/v4/core").$loose>;
|
|
400
400
|
}, import("zod/v4/core").$loose>>;
|
|
401
401
|
};
|
|
402
|
-
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.artist.response>) => import("../../../core/models").Artist;
|
|
402
|
+
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.artist.response>) => import("../../../core/models/artist.js").Artist;
|
|
403
403
|
};
|
|
404
404
|
label: {
|
|
405
405
|
call: string;
|
|
@@ -525,7 +525,7 @@ export declare const SaavnWebAPI: {
|
|
|
525
525
|
}, import("zod/v4/core").$loose>;
|
|
526
526
|
}, import("zod/v4/core").$loose>>;
|
|
527
527
|
};
|
|
528
|
-
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.playlist.response>) => import("../../../core/models").Playlist;
|
|
528
|
+
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.playlist.response>) => import("../../../core/models/playlist.js").Playlist;
|
|
529
529
|
};
|
|
530
530
|
songs: {
|
|
531
531
|
call: string;
|
|
@@ -598,7 +598,7 @@ export declare const SaavnWebAPI: {
|
|
|
598
598
|
}, import("zod/v4/core").$loose>;
|
|
599
599
|
};
|
|
600
600
|
mapper: (data: import("zod").infer<typeof SaavnWebAPISchema.songs.response>) => {
|
|
601
|
-
songs: import("../../../core/models").Song[];
|
|
601
|
+
songs: import("../../../core/models/song.js").Song[];
|
|
602
602
|
};
|
|
603
603
|
};
|
|
604
604
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SaavnWebAPIMapper } from './mapper.ops';
|
|
2
|
-
import { SaavnWebAPISchema } from './schema.ops';
|
|
1
|
+
import { SaavnWebAPIMapper } from './mapper.ops.js';
|
|
2
|
+
import { SaavnWebAPISchema } from './schema.ops.js';
|
|
3
3
|
export const SaavnWebAPI = {
|
|
4
4
|
album: {
|
|
5
5
|
call: 'webapi.get',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnWebAPISchema } from './schema.ops';
|
|
2
|
+
import { SaavnWebAPISchema } from './schema.ops.js';
|
|
3
3
|
export declare const SaavnWebAPIMapper: {
|
|
4
|
-
album: (data: z.infer<typeof SaavnWebAPISchema.album.response>) => import("../../../core/models").Album;
|
|
5
|
-
artist: (data: z.infer<typeof SaavnWebAPISchema.artist.response>) => import("../../../core/models").Artist;
|
|
4
|
+
album: (data: z.infer<typeof SaavnWebAPISchema.album.response>) => import("../../../core/models/album.js").Album;
|
|
5
|
+
artist: (data: z.infer<typeof SaavnWebAPISchema.artist.response>) => import("../../../core/models/artist.js").Artist;
|
|
6
6
|
label: (data: z.infer<typeof SaavnWebAPISchema.label.response>) => any;
|
|
7
|
-
playlist: (data: z.infer<typeof SaavnWebAPISchema.playlist.response>) => import("../../../core/models").Playlist;
|
|
7
|
+
playlist: (data: z.infer<typeof SaavnWebAPISchema.playlist.response>) => import("../../../core/models/playlist.js").Playlist;
|
|
8
8
|
songs: (data: z.infer<typeof SaavnWebAPISchema.songs.response>) => {
|
|
9
|
-
songs: import("../../../core/models").Song[];
|
|
9
|
+
songs: import("../../../core/models/song.js").Song[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { mapAlbum, mapArtist, mapPlaylist, mapSong } from '../../common-mapper';
|
|
3
|
-
import { SaavnWebAPISchema } from './schema.ops';
|
|
2
|
+
import { mapAlbum, mapArtist, mapPlaylist, mapSong } from '../../common-mapper.js';
|
|
3
|
+
import { SaavnWebAPISchema } from './schema.ops.js';
|
|
4
4
|
export const SaavnWebAPIMapper = {
|
|
5
5
|
album: (data) => {
|
|
6
6
|
return mapAlbum(data);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { NonEmptyString, PositiveString } from '../../primitives/string';
|
|
3
|
-
import { SaavnSortBySchema, SaavnSortOrderSchema, } from '../../primitives/enums';
|
|
4
|
-
import { SaavnAlbumEntity, SaavnArtistEntity, SaavnPlaylistEntity, SaavnSongEntity, } from '../../entities';
|
|
2
|
+
import { NonEmptyString, PositiveString } from '../../primitives/string.js';
|
|
3
|
+
import { SaavnSortBySchema, SaavnSortOrderSchema, } from '../../primitives/enums.js';
|
|
4
|
+
import { SaavnAlbumEntity, SaavnArtistEntity, SaavnPlaylistEntity, SaavnSongEntity, } from '../../entities/index.js';
|
|
5
5
|
export const SaavnWebAPISchema = {
|
|
6
6
|
album: {
|
|
7
7
|
params: z.strictObject({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SaavnWebRadioSchema } from './schema.ops';
|
|
1
|
+
import { SaavnWebRadioSchema } from './schema.ops.js';
|
|
2
2
|
export declare const SaavnWebRadio: {
|
|
3
3
|
createEntityStation: {
|
|
4
4
|
call: string;
|
|
@@ -175,7 +175,7 @@ export declare const SaavnWebRadio: {
|
|
|
175
175
|
};
|
|
176
176
|
mapper: (data: import("zod").infer<typeof SaavnWebRadioSchema.songs.response>) => {
|
|
177
177
|
stationId: string | undefined;
|
|
178
|
-
songs: import("../../../core/models").Song[];
|
|
178
|
+
songs: import("../../../core/models/song.js").Song[];
|
|
179
179
|
};
|
|
180
180
|
};
|
|
181
181
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SaavnWebRadioMapper } from './mapper.ops';
|
|
2
|
-
import { SaavnWebRadioSchema } from './schema.ops';
|
|
1
|
+
import { SaavnWebRadioMapper } from './mapper.ops.js';
|
|
2
|
+
import { SaavnWebRadioSchema } from './schema.ops.js';
|
|
3
3
|
export const SaavnWebRadio = {
|
|
4
4
|
createEntityStation: {
|
|
5
5
|
call: 'webradio.createEntityStation',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnWebRadioSchema } from './schema.ops';
|
|
2
|
+
import { SaavnWebRadioSchema } from './schema.ops.js';
|
|
3
3
|
export declare const SaavnWebRadioMapper: {
|
|
4
4
|
createEntityStation: (data: z.infer<typeof SaavnWebRadioSchema.createEntityStation.response>) => {
|
|
5
5
|
stationId: string;
|
|
@@ -9,6 +9,6 @@ export declare const SaavnWebRadioMapper: {
|
|
|
9
9
|
};
|
|
10
10
|
songs: (data: z.infer<typeof SaavnWebRadioSchema.songs.response>) => {
|
|
11
11
|
stationId: string | undefined;
|
|
12
|
-
songs: import("../../../core/models").Song[];
|
|
12
|
+
songs: import("../../../core/models/song.js").Song[];
|
|
13
13
|
};
|
|
14
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { mapSong } from '../../common-mapper';
|
|
3
|
-
import { SaavnWebRadioSchema } from './schema.ops';
|
|
2
|
+
import { mapSong } from '../../common-mapper.js';
|
|
3
|
+
import { SaavnWebRadioSchema } from './schema.ops.js';
|
|
4
4
|
export const SaavnWebRadioMapper = {
|
|
5
5
|
createEntityStation: (data) => {
|
|
6
6
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { JSONStringArray, NonEmptyString, PositiveString, } from '../../primitives/string';
|
|
3
|
-
import { SaavnExplicitFlagSchema } from '../../primitives/enums';
|
|
4
|
-
import { SaavnSongEntity } from '../../entities';
|
|
2
|
+
import { JSONStringArray, NonEmptyString, PositiveString, } from '../../primitives/string.js';
|
|
3
|
+
import { SaavnExplicitFlagSchema } from '../../primitives/enums.js';
|
|
4
|
+
import { SaavnSongEntity } from '../../entities/index.js';
|
|
5
5
|
const WebRadioSingleSong = z.looseObject({
|
|
6
6
|
song: SaavnSongEntity,
|
|
7
7
|
stationid: z.string(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z, ZodError } from 'zod';
|
|
2
|
-
import { fetchFromSaavn } from '../helpers/fetch';
|
|
3
|
-
import { fromZodError, networkError, internalError, SDKError, detectSaavnApiError, } from '../helpers/errors';
|
|
2
|
+
import { fetchFromSaavn } from '../helpers/fetch.js';
|
|
3
|
+
import { fromZodError, networkError, internalError, SDKError, detectSaavnApiError, } from '../helpers/errors.js';
|
|
4
4
|
export async function runOperation(op, input) {
|
|
5
5
|
let parsedParams;
|
|
6
6
|
try {
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SaavnGetDetailsSchema } from '../saavn/operations/get-details/schema.ops';
|
|
2
|
-
import { SaavnGetRecoSchema } from '../saavn/operations/get-reco/schema.ops';
|
|
3
|
-
import { SaavnGetTrendingSchema } from '../saavn/operations/get-trending/schema.ops';
|
|
4
|
-
import { SaavnSearchResultsSchema } from '../saavn/operations/search-results/schema.ops';
|
|
5
|
-
import { SaavnWebAPISchema } from '../saavn/operations/web-api/schema.ops';
|
|
6
|
-
import { SaavnWebRadioSchema } from '../saavn/operations/web-radio/schema.ops';
|
|
1
|
+
import { SaavnGetDetailsSchema } from '../saavn/operations/get-details/schema.ops.js';
|
|
2
|
+
import { SaavnGetRecoSchema } from '../saavn/operations/get-reco/schema.ops.js';
|
|
3
|
+
import { SaavnGetTrendingSchema } from '../saavn/operations/get-trending/schema.ops.js';
|
|
4
|
+
import { SaavnSearchResultsSchema } from '../saavn/operations/search-results/schema.ops.js';
|
|
5
|
+
import { SaavnWebAPISchema } from '../saavn/operations/web-api/schema.ops.js';
|
|
6
|
+
import { SaavnWebRadioSchema } from '../saavn/operations/web-radio/schema.ops.js';
|
|
7
7
|
export const schemas = {
|
|
8
8
|
details: SaavnGetDetailsSchema,
|
|
9
9
|
recommendations: SaavnGetRecoSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saavn-labs/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A low-level, type-safe TypeScript SDK over JioSaavn’s native API, built for developers who want full control, predictable contracts, and long-term stability.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"repository": {
|
|
58
58
|
"type": "git",
|
|
59
|
-
"url": "https://github.com/saavn-labs/sdk.git"
|
|
59
|
+
"url": "git+https://github.com/saavn-labs/sdk.git"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/bun": "latest",
|
|
73
|
+
"@types/node": "^25.0.9",
|
|
73
74
|
"prettier": "^3.7.4",
|
|
74
75
|
"tsc-alias": "^1.8.16",
|
|
75
76
|
"typescript": "^5.9.3",
|