@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.
Files changed (62) hide show
  1. package/README.md +27 -21
  2. package/dist/core/models/album.d.ts +1 -1
  3. package/dist/core/models/artist.d.ts +1 -1
  4. package/dist/core/models/index.d.ts +4 -4
  5. package/dist/core/models/index.js +4 -4
  6. package/dist/core/models/playlist.d.ts +1 -1
  7. package/dist/core/models/song.d.ts +1 -1
  8. package/dist/core/modules/album.module.js +4 -4
  9. package/dist/core/modules/artist.module.js +4 -4
  10. package/dist/core/modules/extras.module.js +3 -3
  11. package/dist/core/modules/playlist.module.js +4 -4
  12. package/dist/core/modules/song.module.d.ts +1 -1
  13. package/dist/core/modules/song.module.js +5 -5
  14. package/dist/helpers/experimental/stream-urls/index.js +13 -4
  15. package/dist/helpers/experimental/stream-urls/stream-urls.edge.js +1 -1
  16. package/dist/helpers/fetch.js +1 -1
  17. package/dist/helpers/utils.d.ts +1 -1
  18. package/dist/index.d.ts +11 -10
  19. package/dist/index.js +9 -8
  20. package/dist/saavn/common-mapper.d.ts +4 -4
  21. package/dist/saavn/entities/album.entity.js +2 -2
  22. package/dist/saavn/entities/artist.entity.js +2 -2
  23. package/dist/saavn/entities/extras.js +2 -2
  24. package/dist/saavn/entities/index.d.ts +6 -6
  25. package/dist/saavn/entities/index.js +6 -6
  26. package/dist/saavn/entities/playlist.entity.js +2 -2
  27. package/dist/saavn/entities/song.entity.js +1 -1
  28. package/dist/saavn/operations/get-details/index.d.ts +9 -9
  29. package/dist/saavn/operations/get-details/index.js +2 -2
  30. package/dist/saavn/operations/get-details/mapper.ops.d.ts +9 -9
  31. package/dist/saavn/operations/get-details/mapper.ops.js +2 -2
  32. package/dist/saavn/operations/get-details/schema.ops.js +3 -3
  33. package/dist/saavn/operations/get-reco/index.d.ts +4 -4
  34. package/dist/saavn/operations/get-reco/index.js +2 -2
  35. package/dist/saavn/operations/get-reco/mapper.ops.d.ts +4 -4
  36. package/dist/saavn/operations/get-reco/mapper.ops.js +2 -2
  37. package/dist/saavn/operations/get-reco/schema.ops.js +3 -3
  38. package/dist/saavn/operations/get-trending/index.d.ts +5 -5
  39. package/dist/saavn/operations/get-trending/index.js +2 -2
  40. package/dist/saavn/operations/get-trending/mapper.ops.d.ts +2 -2
  41. package/dist/saavn/operations/get-trending/mapper.ops.js +2 -2
  42. package/dist/saavn/operations/get-trending/schema.ops.js +2 -2
  43. package/dist/saavn/operations/index.d.ts +6 -6
  44. package/dist/saavn/operations/index.js +6 -6
  45. package/dist/saavn/operations/search-results/index.d.ts +39 -39
  46. package/dist/saavn/operations/search-results/index.js +2 -2
  47. package/dist/saavn/operations/search-results/mapper.ops.d.ts +39 -39
  48. package/dist/saavn/operations/search-results/mapper.ops.js +2 -2
  49. package/dist/saavn/operations/search-results/schema.ops.js +3 -3
  50. package/dist/saavn/operations/web-api/index.d.ts +5 -5
  51. package/dist/saavn/operations/web-api/index.js +2 -2
  52. package/dist/saavn/operations/web-api/mapper.ops.d.ts +5 -5
  53. package/dist/saavn/operations/web-api/mapper.ops.js +2 -2
  54. package/dist/saavn/operations/web-api/schema.ops.js +3 -3
  55. package/dist/saavn/operations/web-radio/index.d.ts +2 -2
  56. package/dist/saavn/operations/web-radio/index.js +2 -2
  57. package/dist/saavn/operations/web-radio/mapper.ops.d.ts +2 -2
  58. package/dist/saavn/operations/web-radio/mapper.ops.js +2 -2
  59. package/dist/saavn/operations/web-radio/schema.ops.js +3 -3
  60. package/dist/saavn/run-operation.js +2 -2
  61. package/dist/schemas/index.js +6 -6
  62. package/package.json +3 -2
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- import { NonEmptyString, PositiveString } from '../../primitives/string';
3
- import { SaavnAlbumBase, SaavnPlaylistBase } from '../../entities/base';
4
- import { SaavnSongEntity } from '../../entities';
2
+ import { NonEmptyString, PositiveString } from '../../primitives/string.js';
3
+ import { SaavnAlbumBase, SaavnPlaylistBase } from '../../entities/base.js';
4
+ import { SaavnSongEntity } from '../../entities/index.js';
5
5
  export const SaavnGetRecoSchema = {
6
6
  albums: {
7
7
  params: z.strictObject({
@@ -1,4 +1,4 @@
1
- import { SaavnGetTrendingSchema } from './schema.ops';
1
+ import { SaavnGetTrendingSchema } from './schema.ops.js';
2
2
  export declare const SaavnGetTrending: {
3
3
  all: {
4
4
  call: string;
@@ -128,7 +128,7 @@ export declare const SaavnGetTrending: {
128
128
  }, import("zod/v4/core").$loose>;
129
129
  }, import("zod/v4/core").$loose>], "type">>;
130
130
  };
131
- mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.all.response>) => (import("../../../core/models").Album | import("../../../core/models").Song | import("../../../core/models").Playlist)[];
131
+ mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.all.response>) => (import("../../../core/models/album.js").Album | import("../../../core/models/song.js").Song | import("../../../core/models/playlist.js").Playlist)[];
132
132
  };
133
133
  albums: {
134
134
  call: string;
@@ -181,7 +181,7 @@ export declare const SaavnGetTrending: {
181
181
  }, import("zod/v4/core").$loose>;
182
182
  }, import("zod/v4/core").$loose>>;
183
183
  };
184
- mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.albums.response>) => import("../../../core/models").Album[];
184
+ mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.albums.response>) => import("../../../core/models/album.js").Album[];
185
185
  };
186
186
  playlists: {
187
187
  call: string;
@@ -213,7 +213,7 @@ export declare const SaavnGetTrending: {
213
213
  }, import("zod/v4/core").$loose>;
214
214
  }, import("zod/v4/core").$loose>>;
215
215
  };
216
- mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.playlists.response>) => import("../../../core/models").Playlist[];
216
+ mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.playlists.response>) => import("../../../core/models/playlist.js").Playlist[];
217
217
  };
218
218
  songs: {
219
219
  call: string;
@@ -283,6 +283,6 @@ export declare const SaavnGetTrending: {
283
283
  }, import("zod/v4/core").$loose>;
284
284
  }, import("zod/v4/core").$loose>>;
285
285
  };
286
- mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.songs.response>) => import("../../../core/models").Song[];
286
+ mapper: (data: import("zod").infer<typeof SaavnGetTrendingSchema.songs.response>) => import("../../../core/models/song.js").Song[];
287
287
  };
288
288
  };
@@ -1,5 +1,5 @@
1
- import { SaavnGetTrendingMapper } from './mapper.ops';
2
- import { SaavnGetTrendingSchema } from './schema.ops';
1
+ import { SaavnGetTrendingMapper } from './mapper.ops.js';
2
+ import { SaavnGetTrendingSchema } from './schema.ops.js';
3
3
  export const SaavnGetTrending = {
4
4
  all: {
5
5
  call: 'content.getTrending',
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- import { SaavnGetTrendingSchema } from './schema.ops';
2
+ import { SaavnGetTrendingSchema } from './schema.ops.js';
3
3
  import type { Album, Playlist, Song } from '../../../core/models';
4
- import type { SaavnTrendingAlbum, SaavnTrendingPlaylist, SaavnTrendingSongEntity } from '../../../saavn/entities';
4
+ import type { SaavnTrendingAlbum, SaavnTrendingPlaylist, SaavnTrendingSongEntity } from '../../../saavn/entities/index.js';
5
5
  export declare function mapTrendingAlbum(data: z.infer<typeof SaavnTrendingAlbum>): Album;
6
6
  export declare function mapTrendingPlaylist(data: z.infer<typeof SaavnTrendingPlaylist>): Playlist;
7
7
  export declare function mapTrendingSong(data: z.infer<typeof SaavnTrendingSongEntity>): Song;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { SaavnGetTrendingSchema } from './schema.ops';
3
- import { mapArtistBase, parseImageUrls } from '../../common-mapper';
2
+ import { SaavnGetTrendingSchema } from './schema.ops.js';
3
+ import { mapArtistBase, parseImageUrls } from '../../common-mapper.js';
4
4
  export function mapTrendingAlbum(data) {
5
5
  return {
6
6
  id: data.id,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { NonEmptyString } from '../../primitives/string';
3
- import { SaavnTrendingAlbum, SaavnTrendingPlaylist, SaavnTrendingSongEntity, } from '../../entities';
2
+ import { NonEmptyString } from '../../primitives/string.js';
3
+ import { SaavnTrendingAlbum, SaavnTrendingPlaylist, SaavnTrendingSongEntity, } from '../../entities/index.js';
4
4
  export const SaavnGetTrendingSchema = {
5
5
  all: {
6
6
  params: z.strictObject({}),
@@ -1,6 +1,6 @@
1
- export * from './get-details';
2
- export * from './get-reco';
3
- export * from './get-trending';
4
- export * from './search-results';
5
- export * from './web-api';
6
- export * from './web-radio';
1
+ export * from './get-details/index.js';
2
+ export * from './get-reco/index.js';
3
+ export * from './get-trending/index.js';
4
+ export * from './search-results/index.js';
5
+ export * from './web-api/index.js';
6
+ export * from './web-radio/index.js';
@@ -1,6 +1,6 @@
1
- export * from './get-details';
2
- export * from './get-reco';
3
- export * from './get-trending';
4
- export * from './search-results';
5
- export * from './web-api';
6
- export * from './web-radio';
1
+ export * from './get-details/index.js';
2
+ export * from './get-reco/index.js';
3
+ export * from './get-trending/index.js';
4
+ export * from './search-results/index.js';
5
+ export * from './web-api/index.js';
6
+ export * from './web-radio/index.js';
@@ -1,4 +1,4 @@
1
- import { SaavnSearchResultsSchema } from './schema.ops';
1
+ import { SaavnSearchResultsSchema } from './schema.ops.js';
2
2
  export declare const SaavnSearchResults: {
3
3
  all: {
4
4
  call: string;
@@ -195,7 +195,7 @@ export declare const SaavnSearchResults: {
195
195
  subtitle: any;
196
196
  description: any;
197
197
  url: any;
198
- images: import("../../..").Image[];
198
+ images: import("../../../types.js").Image[];
199
199
  flags: {
200
200
  isExplicit: boolean;
201
201
  isRadioPresent?: undefined;
@@ -208,7 +208,7 @@ export declare const SaavnSearchResults: {
208
208
  subtitle: any;
209
209
  description: any;
210
210
  url: any;
211
- images: import("../../..").Image[];
211
+ images: import("../../../types.js").Image[];
212
212
  flags: {
213
213
  isExplicit: boolean;
214
214
  isRadioPresent?: undefined;
@@ -219,7 +219,7 @@ export declare const SaavnSearchResults: {
219
219
  type: "artist";
220
220
  name: any;
221
221
  url: any;
222
- images: import("../../..").Image[];
222
+ images: import("../../../types.js").Image[];
223
223
  flags: {
224
224
  isRadioPresent: any;
225
225
  isExplicit?: undefined;
@@ -234,7 +234,7 @@ export declare const SaavnSearchResults: {
234
234
  subtitle: any;
235
235
  description: any;
236
236
  url: any;
237
- images: import("../../..").Image[];
237
+ images: import("../../../types.js").Image[];
238
238
  flags: {
239
239
  isExplicit: boolean;
240
240
  isRadioPresent?: undefined;
@@ -247,7 +247,7 @@ export declare const SaavnSearchResults: {
247
247
  subtitle: any;
248
248
  description: any;
249
249
  url: any;
250
- images: import("../../..").Image[];
250
+ images: import("../../../types.js").Image[];
251
251
  flags?: undefined;
252
252
  name?: undefined;
253
253
  } | null)[];
@@ -261,7 +261,7 @@ export declare const SaavnSearchResults: {
261
261
  subtitle: any;
262
262
  description: any;
263
263
  url: any;
264
- images: import("../../..").Image[];
264
+ images: import("../../../types.js").Image[];
265
265
  flags: {
266
266
  isExplicit: boolean;
267
267
  isRadioPresent?: undefined;
@@ -274,7 +274,7 @@ export declare const SaavnSearchResults: {
274
274
  subtitle: any;
275
275
  description: any;
276
276
  url: any;
277
- images: import("../../..").Image[];
277
+ images: import("../../../types.js").Image[];
278
278
  flags: {
279
279
  isExplicit: boolean;
280
280
  isRadioPresent?: undefined;
@@ -285,7 +285,7 @@ export declare const SaavnSearchResults: {
285
285
  type: "artist";
286
286
  name: any;
287
287
  url: any;
288
- images: import("../../..").Image[];
288
+ images: import("../../../types.js").Image[];
289
289
  flags: {
290
290
  isRadioPresent: any;
291
291
  isExplicit?: undefined;
@@ -300,7 +300,7 @@ export declare const SaavnSearchResults: {
300
300
  subtitle: any;
301
301
  description: any;
302
302
  url: any;
303
- images: import("../../..").Image[];
303
+ images: import("../../../types.js").Image[];
304
304
  flags: {
305
305
  isExplicit: boolean;
306
306
  isRadioPresent?: undefined;
@@ -313,7 +313,7 @@ export declare const SaavnSearchResults: {
313
313
  subtitle: any;
314
314
  description: any;
315
315
  url: any;
316
- images: import("../../..").Image[];
316
+ images: import("../../../types.js").Image[];
317
317
  flags?: undefined;
318
318
  name?: undefined;
319
319
  } | null)[];
@@ -327,7 +327,7 @@ export declare const SaavnSearchResults: {
327
327
  subtitle: any;
328
328
  description: any;
329
329
  url: any;
330
- images: import("../../..").Image[];
330
+ images: import("../../../types.js").Image[];
331
331
  flags: {
332
332
  isExplicit: boolean;
333
333
  isRadioPresent?: undefined;
@@ -340,7 +340,7 @@ export declare const SaavnSearchResults: {
340
340
  subtitle: any;
341
341
  description: any;
342
342
  url: any;
343
- images: import("../../..").Image[];
343
+ images: import("../../../types.js").Image[];
344
344
  flags: {
345
345
  isExplicit: boolean;
346
346
  isRadioPresent?: undefined;
@@ -351,7 +351,7 @@ export declare const SaavnSearchResults: {
351
351
  type: "artist";
352
352
  name: any;
353
353
  url: any;
354
- images: import("../../..").Image[];
354
+ images: import("../../../types.js").Image[];
355
355
  flags: {
356
356
  isRadioPresent: any;
357
357
  isExplicit?: undefined;
@@ -366,7 +366,7 @@ export declare const SaavnSearchResults: {
366
366
  subtitle: any;
367
367
  description: any;
368
368
  url: any;
369
- images: import("../../..").Image[];
369
+ images: import("../../../types.js").Image[];
370
370
  flags: {
371
371
  isExplicit: boolean;
372
372
  isRadioPresent?: undefined;
@@ -379,7 +379,7 @@ export declare const SaavnSearchResults: {
379
379
  subtitle: any;
380
380
  description: any;
381
381
  url: any;
382
- images: import("../../..").Image[];
382
+ images: import("../../../types.js").Image[];
383
383
  flags?: undefined;
384
384
  name?: undefined;
385
385
  } | null)[];
@@ -393,7 +393,7 @@ export declare const SaavnSearchResults: {
393
393
  subtitle: any;
394
394
  description: any;
395
395
  url: any;
396
- images: import("../../..").Image[];
396
+ images: import("../../../types.js").Image[];
397
397
  flags: {
398
398
  isExplicit: boolean;
399
399
  isRadioPresent?: undefined;
@@ -406,7 +406,7 @@ export declare const SaavnSearchResults: {
406
406
  subtitle: any;
407
407
  description: any;
408
408
  url: any;
409
- images: import("../../..").Image[];
409
+ images: import("../../../types.js").Image[];
410
410
  flags: {
411
411
  isExplicit: boolean;
412
412
  isRadioPresent?: undefined;
@@ -417,7 +417,7 @@ export declare const SaavnSearchResults: {
417
417
  type: "artist";
418
418
  name: any;
419
419
  url: any;
420
- images: import("../../..").Image[];
420
+ images: import("../../../types.js").Image[];
421
421
  flags: {
422
422
  isRadioPresent: any;
423
423
  isExplicit?: undefined;
@@ -432,7 +432,7 @@ export declare const SaavnSearchResults: {
432
432
  subtitle: any;
433
433
  description: any;
434
434
  url: any;
435
- images: import("../../..").Image[];
435
+ images: import("../../../types.js").Image[];
436
436
  flags: {
437
437
  isExplicit: boolean;
438
438
  isRadioPresent?: undefined;
@@ -445,7 +445,7 @@ export declare const SaavnSearchResults: {
445
445
  subtitle: any;
446
446
  description: any;
447
447
  url: any;
448
- images: import("../../..").Image[];
448
+ images: import("../../../types.js").Image[];
449
449
  flags?: undefined;
450
450
  name?: undefined;
451
451
  } | null)[];
@@ -459,7 +459,7 @@ export declare const SaavnSearchResults: {
459
459
  subtitle: any;
460
460
  description: any;
461
461
  url: any;
462
- images: import("../../..").Image[];
462
+ images: import("../../../types.js").Image[];
463
463
  flags: {
464
464
  isExplicit: boolean;
465
465
  isRadioPresent?: undefined;
@@ -472,7 +472,7 @@ export declare const SaavnSearchResults: {
472
472
  subtitle: any;
473
473
  description: any;
474
474
  url: any;
475
- images: import("../../..").Image[];
475
+ images: import("../../../types.js").Image[];
476
476
  flags: {
477
477
  isExplicit: boolean;
478
478
  isRadioPresent?: undefined;
@@ -483,7 +483,7 @@ export declare const SaavnSearchResults: {
483
483
  type: "artist";
484
484
  name: any;
485
485
  url: any;
486
- images: import("../../..").Image[];
486
+ images: import("../../../types.js").Image[];
487
487
  flags: {
488
488
  isRadioPresent: any;
489
489
  isExplicit?: undefined;
@@ -498,7 +498,7 @@ export declare const SaavnSearchResults: {
498
498
  subtitle: any;
499
499
  description: any;
500
500
  url: any;
501
- images: import("../../..").Image[];
501
+ images: import("../../../types.js").Image[];
502
502
  flags: {
503
503
  isExplicit: boolean;
504
504
  isRadioPresent?: undefined;
@@ -511,7 +511,7 @@ export declare const SaavnSearchResults: {
511
511
  subtitle: any;
512
512
  description: any;
513
513
  url: any;
514
- images: import("../../..").Image[];
514
+ images: import("../../../types.js").Image[];
515
515
  flags?: undefined;
516
516
  name?: undefined;
517
517
  } | null)[];
@@ -583,7 +583,7 @@ export declare const SaavnSearchResults: {
583
583
  mapper: (data: import("zod").infer<typeof SaavnSearchResultsSchema.albums.response>) => {
584
584
  total: number;
585
585
  start: number;
586
- results: import("../../../core/models").Album[];
586
+ results: import("../../../core/models/album.js").Album[];
587
587
  };
588
588
  };
589
589
  artists: {
@@ -624,7 +624,7 @@ export declare const SaavnSearchResults: {
624
624
  name: string;
625
625
  subtitle?: string;
626
626
  url: string;
627
- images: import("../../..").Image[];
627
+ images: import("../../../types.js").Image[];
628
628
  stats?: {
629
629
  followerCount?: number;
630
630
  fanCount?: number;
@@ -634,7 +634,7 @@ export declare const SaavnSearchResults: {
634
634
  available?: string[];
635
635
  };
636
636
  profile?: {
637
- bio?: import("../../..").BioSection[];
637
+ bio?: import("../../../index.js").BioSection[];
638
638
  dob?: string;
639
639
  };
640
640
  links?: {
@@ -652,20 +652,20 @@ export declare const SaavnSearchResults: {
652
652
  };
653
653
  };
654
654
  songs?: {
655
- top?: import("../../../core/models").Song[];
656
- latest?: import("../../../core/models").Song[];
655
+ top?: import("../../../core/models/song.js").Song[];
656
+ latest?: import("../../../core/models/song.js").Song[];
657
657
  };
658
658
  albums?: {
659
- top?: import("../../../core/models").Album[];
660
- singles?: import("../../../core/models").Album[];
661
- latest?: import("../../../core/models").Album[];
659
+ top?: import("../../../core/models/album.js").Album[];
660
+ singles?: import("../../../core/models/album.js").Album[];
661
+ latest?: import("../../../core/models/album.js").Album[];
662
662
  };
663
663
  playlists?: {
664
- dedicated?: import("../../../core/models").Playlist[];
665
- featured?: import("../../../core/models").Playlist[];
664
+ dedicated?: import("../../../core/models/playlist.js").Playlist[];
665
+ featured?: import("../../../core/models/playlist.js").Playlist[];
666
666
  };
667
667
  related?: {
668
- similar?: import("../../../core/models").Artist[];
668
+ similar?: import("../../../core/models/artist.js").Artist[];
669
669
  };
670
670
  }[];
671
671
  };
@@ -705,7 +705,7 @@ export declare const SaavnSearchResults: {
705
705
  mapper: (data: import("zod").infer<typeof SaavnSearchResultsSchema.playlists.response>) => {
706
706
  total: number;
707
707
  start: number;
708
- results: import("../../../core/models").Playlist[];
708
+ results: import("../../../core/models/playlist.js").Playlist[];
709
709
  };
710
710
  };
711
711
  songs: {
@@ -784,7 +784,7 @@ export declare const SaavnSearchResults: {
784
784
  mapper: (data: import("zod").infer<typeof SaavnSearchResultsSchema.songs.response>) => {
785
785
  total: number;
786
786
  start: number;
787
- results: import("../../../core/models").Song[];
787
+ results: import("../../../core/models/song.js").Song[];
788
788
  };
789
789
  };
790
790
  };
@@ -1,5 +1,5 @@
1
- import { SaavnSearchResultsMapper } from './mapper.ops';
2
- import { SaavnSearchResultsSchema } from './schema.ops';
1
+ import { SaavnSearchResultsMapper } from './mapper.ops.js';
2
+ import { SaavnSearchResultsSchema } from './schema.ops.js';
3
3
  export const SaavnSearchResults = {
4
4
  all: {
5
5
  call: 'autocomplete.get',