@saavn-labs/sdk 0.1.0 → 0.1.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.
- 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 +3 -3
- 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 +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './album';
|
|
2
|
-
export * from './artist';
|
|
3
|
-
export * from './song';
|
|
4
|
-
export * from './playlist';
|
|
1
|
+
export * from './album.js';
|
|
2
|
+
export * from './artist.js';
|
|
3
|
+
export * from './song.js';
|
|
4
|
+
export * from './playlist.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './album';
|
|
2
|
-
export * from './artist';
|
|
3
|
-
export * from './song';
|
|
4
|
-
export * from './playlist';
|
|
1
|
+
export * from './album.js';
|
|
2
|
+
export * from './artist.js';
|
|
3
|
+
export * from './song.js';
|
|
4
|
+
export * from './playlist.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SaavnGetDetails, SaavnGetReco, SaavnGetTrending, SaavnSearchResults, SaavnWebAPI, } from '../../saavn/operations';
|
|
2
|
-
import { runOperation } from '../../saavn/run-operation';
|
|
3
|
-
import { extractPermalinkToken } from '../../helpers/utils';
|
|
4
|
-
import { SDKError } from '../../helpers/errors';
|
|
1
|
+
import { SaavnGetDetails, SaavnGetReco, SaavnGetTrending, SaavnSearchResults, SaavnWebAPI, } from '../../saavn/operations/index.js';
|
|
2
|
+
import { runOperation } from '../../saavn/run-operation.js';
|
|
3
|
+
import { extractPermalinkToken } from '../../helpers/utils.js';
|
|
4
|
+
import { SDKError } from '../../helpers/errors.js';
|
|
5
5
|
/**
|
|
6
6
|
* Fetch an album by Saavn ID.
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SaavnGetDetails, SaavnSearchResults, SaavnWebAPI, } from '../../saavn/operations';
|
|
2
|
-
import { runOperation } from '../../saavn/run-operation';
|
|
3
|
-
import { extractPermalinkToken } from '../../helpers/utils';
|
|
4
|
-
import { SDKError } from '../../helpers/errors';
|
|
1
|
+
import { SaavnGetDetails, SaavnSearchResults, SaavnWebAPI, } from '../../saavn/operations/index.js';
|
|
2
|
+
import { runOperation } from '../../saavn/run-operation.js';
|
|
3
|
+
import { extractPermalinkToken } from '../../helpers/utils.js';
|
|
4
|
+
import { SDKError } from '../../helpers/errors.js';
|
|
5
5
|
/**
|
|
6
6
|
* Fetch an artist by Saavn ID.
|
|
7
7
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SDKError } from '../../helpers/errors';
|
|
2
|
-
import { SaavnGetTrending, SaavnSearchResults, SaavnWebRadio, } from '../../saavn/operations';
|
|
3
|
-
import { runOperation } from '../../saavn/run-operation';
|
|
1
|
+
import { SDKError } from '../../helpers/errors.js';
|
|
2
|
+
import { SaavnGetTrending, SaavnSearchResults, SaavnWebRadio, } from '../../saavn/operations/index.js';
|
|
3
|
+
import { runOperation } from '../../saavn/run-operation.js';
|
|
4
4
|
export function stringArrayToJSONStringArray(value) {
|
|
5
5
|
if (!Array.isArray(value) || value.length === 0) {
|
|
6
6
|
throw new SDKError('INVALID_PARAMS', 'Expected a non-empty array of strings');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SaavnGetDetails, SaavnGetReco, SaavnGetTrending, SaavnSearchResults, SaavnWebAPI, } from '../../saavn/operations';
|
|
2
|
-
import { runOperation } from '../../saavn/run-operation';
|
|
3
|
-
import { extractPermalinkToken } from '../../helpers/utils';
|
|
4
|
-
import { SDKError } from '../../helpers/errors';
|
|
1
|
+
import { SaavnGetDetails, SaavnGetReco, SaavnGetTrending, SaavnSearchResults, SaavnWebAPI, } from '../../saavn/operations/index.js';
|
|
2
|
+
import { runOperation } from '../../saavn/run-operation.js';
|
|
3
|
+
import { extractPermalinkToken } from '../../helpers/utils.js';
|
|
4
|
+
import { SDKError } from '../../helpers/errors.js';
|
|
5
5
|
/**
|
|
6
6
|
* Fetch a playlist by Saavn ID.
|
|
7
7
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SaavnGetDetails, SaavnGetReco, SaavnGetTrending, SaavnSearchResults, SaavnWebAPI, SaavnWebRadio, } from '../../saavn/operations';
|
|
2
|
-
import { runOperation } from '../../saavn/run-operation';
|
|
3
|
-
import { extractPermalinkToken } from '../../helpers/utils';
|
|
4
|
-
import { fetchStreamUrls } from '../../helpers/experimental/stream-urls';
|
|
5
|
-
import { SDKError } from '../../helpers/errors';
|
|
1
|
+
import { SaavnGetDetails, SaavnGetReco, SaavnGetTrending, SaavnSearchResults, SaavnWebAPI, SaavnWebRadio, } from '../../saavn/operations/index.js';
|
|
2
|
+
import { runOperation } from '../../saavn/run-operation.js';
|
|
3
|
+
import { extractPermalinkToken } from '../../helpers/utils.js';
|
|
4
|
+
import { fetchStreamUrls } from '../../helpers/experimental/stream-urls/index.js';
|
|
5
|
+
import { SDKError } from '../../helpers/errors.js';
|
|
6
6
|
/**
|
|
7
7
|
* Fetch a song or songs by Saavn ID.
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SDKError, experimentalError } from '../../../helpers/errors';
|
|
2
|
-
import { generateStreamUrlsNode } from './stream-urls.node';
|
|
3
|
-
import { generateStreamUrlsEdge } from './stream-urls.edge';
|
|
1
|
+
import { SDKError, experimentalError } from '../../../helpers/errors.js';
|
|
2
|
+
import { generateStreamUrlsNode } from './stream-urls.node.js';
|
|
3
|
+
import { generateStreamUrlsEdge } from './stream-urls.edge.js';
|
|
4
4
|
/**
|
|
5
5
|
* ⚠️ EXPERIMENTAL
|
|
6
6
|
*
|
package/dist/helpers/fetch.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module fetch
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
|
-
import { pickUserAgent } from './utils';
|
|
6
|
+
import { pickUserAgent } from './utils.js';
|
|
7
7
|
const BASE_URL = 'https://www.jiosaavn.com';
|
|
8
8
|
export const fetchFromSaavn = async ({ call, params = {}, context = 'web6dot0', baseUrl = BASE_URL, headers = {}, userAgents, timeoutMs, fetch: fetchImpl = globalThis.fetch, }) => {
|
|
9
9
|
const url = new URL(`${baseUrl}/api.php`);
|
package/dist/helpers/utils.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @module utils
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
|
-
import type { SaavnPermalinkToken } from '../types';
|
|
6
|
+
import type { SaavnPermalinkToken } from '../types.js';
|
|
7
7
|
export declare function pickUserAgent(custom?: readonly string[]): string;
|
|
8
8
|
/**
|
|
9
9
|
* Extract entity type and token from a JioSaavn share URL
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { ArtistModule as Artist } from './core/modules/artist.module';
|
|
2
|
-
export { AlbumModule as Album } from './core/modules/album.module';
|
|
3
|
-
export { SongModule as Song } from './core/modules/song.module';
|
|
4
|
-
export { PlaylistModule as Playlist } from './core/modules/playlist.module';
|
|
5
|
-
export { ExtrasModule as Extras } from './core/modules/extras.module';
|
|
6
|
-
export { SDKError } from './helpers/errors';
|
|
7
|
-
export type { SDKErrorCode } from './helpers/errors';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
1
|
+
export { ArtistModule as Artist } from './core/modules/artist.module.js';
|
|
2
|
+
export { AlbumModule as Album } from './core/modules/album.module.js';
|
|
3
|
+
export { SongModule as Song } from './core/modules/song.module.js';
|
|
4
|
+
export { PlaylistModule as Playlist } from './core/modules/playlist.module.js';
|
|
5
|
+
export { ExtrasModule as Extras } from './core/modules/extras.module.js';
|
|
6
|
+
export { SDKError } from './helpers/errors.js';
|
|
7
|
+
export type { SDKErrorCode } from './helpers/errors.js';
|
|
8
|
+
export { fetchFromSaavn } from "./helpers/fetch.js";
|
|
9
|
+
export * from './core/models/index.js';
|
|
10
|
+
export { schemas, type Schemas } from './schemas/index.js';
|
|
11
|
+
export type { EntityType, ClientConfig, Image, SaavnPermalinkToken, } from './types.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export { ArtistModule as Artist } from './core/modules/artist.module';
|
|
2
|
-
export { AlbumModule as Album } from './core/modules/album.module';
|
|
3
|
-
export { SongModule as Song } from './core/modules/song.module';
|
|
4
|
-
export { PlaylistModule as Playlist } from './core/modules/playlist.module';
|
|
5
|
-
export { ExtrasModule as Extras } from './core/modules/extras.module';
|
|
6
|
-
export { SDKError } from './helpers/errors';
|
|
7
|
-
export
|
|
8
|
-
export
|
|
1
|
+
export { ArtistModule as Artist } from './core/modules/artist.module.js';
|
|
2
|
+
export { AlbumModule as Album } from './core/modules/album.module.js';
|
|
3
|
+
export { SongModule as Song } from './core/modules/song.module.js';
|
|
4
|
+
export { PlaylistModule as Playlist } from './core/modules/playlist.module.js';
|
|
5
|
+
export { ExtrasModule as Extras } from './core/modules/extras.module.js';
|
|
6
|
+
export { SDKError } from './helpers/errors.js';
|
|
7
|
+
export { fetchFromSaavn } from "./helpers/fetch.js";
|
|
8
|
+
export * from './core/models/index.js';
|
|
9
|
+
export { schemas } from './schemas/index.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { Image } from '../types';
|
|
2
|
+
import type { Image } from '../types.js';
|
|
3
3
|
import type { Album, Artist, Playlist, Song } from '../core/models';
|
|
4
|
-
import type { SaavnArtistBase } from '../saavn/entities/base';
|
|
5
|
-
import type { SaavnAlbumEntity, SaavnArtistEntity, SaavnPlaylistEntity, SaavnSongEntity } from '../saavn/entities';
|
|
6
|
-
import type { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase } from '../saavn/entities/extras';
|
|
4
|
+
import type { SaavnArtistBase } from '../saavn/entities/base.js';
|
|
5
|
+
import type { SaavnAlbumEntity, SaavnArtistEntity, SaavnPlaylistEntity, SaavnSongEntity } from '../saavn/entities/index.js';
|
|
6
|
+
import type { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase } from '../saavn/entities/extras.js';
|
|
7
7
|
export declare function parseImageUrls(imageUrl?: string): Image[];
|
|
8
8
|
export declare function mapArtistBase(artist: z.infer<typeof SaavnArtistBase>): Artist;
|
|
9
9
|
export declare function mapAlbumEdgeCase(data: z.infer<typeof SaavnAlbumEdgeCase>): Album;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnAlbumBase, SaavnArtistMap, SaavnTrendingBase } from './base';
|
|
3
|
-
import { SaavnSongEntity } from './song.entity';
|
|
2
|
+
import { SaavnAlbumBase, SaavnArtistMap, SaavnTrendingBase } from './base.js';
|
|
3
|
+
import { SaavnSongEntity } from './song.entity.js';
|
|
4
4
|
export const SaavnAlbumEntity = z.lazy(() => SaavnAlbumBase.extend({
|
|
5
5
|
language: z.string(),
|
|
6
6
|
year: z.string(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnArtistBase } from './base';
|
|
3
|
-
import { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase, SaavnSongEntity } from '.';
|
|
2
|
+
import { SaavnArtistBase } from './base.js';
|
|
3
|
+
import { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase, SaavnSongEntity } from './index.js';
|
|
4
4
|
export const SaavnArtistEntity = z.lazy(() => SaavnArtistBase.omit({
|
|
5
5
|
id: true,
|
|
6
6
|
role: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnAlbumBase, SaavnAlbumCore, SaavnArtistBase, SaavnArtistMap, } from './base';
|
|
3
|
-
import { SaavnPlaylistSearchEntity } from './playlist.entity';
|
|
2
|
+
import { SaavnAlbumBase, SaavnAlbumCore, SaavnArtistBase, SaavnArtistMap, } from './base.js';
|
|
3
|
+
import { SaavnPlaylistSearchEntity } from './playlist.entity.js';
|
|
4
4
|
export const SaavnAlbumEdgeCase = SaavnAlbumBase.extend({
|
|
5
5
|
more_info: z.looseObject({
|
|
6
6
|
query: z.string(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './album.entity';
|
|
2
|
-
export * from './artist.entity';
|
|
3
|
-
export * from './playlist.entity';
|
|
4
|
-
export * from './song.entity';
|
|
5
|
-
export * from './show.entity';
|
|
6
|
-
export * from './extras';
|
|
1
|
+
export * from './album.entity.js';
|
|
2
|
+
export * from './artist.entity.js';
|
|
3
|
+
export * from './playlist.entity.js';
|
|
4
|
+
export * from './song.entity.js';
|
|
5
|
+
export * from './show.entity.js';
|
|
6
|
+
export * from './extras.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './album.entity';
|
|
2
|
-
export * from './artist.entity';
|
|
3
|
-
export * from './playlist.entity';
|
|
4
|
-
export * from './song.entity';
|
|
5
|
-
export * from './show.entity';
|
|
6
|
-
export * from './extras';
|
|
1
|
+
export * from './album.entity.js';
|
|
2
|
+
export * from './artist.entity.js';
|
|
3
|
+
export * from './playlist.entity.js';
|
|
4
|
+
export * from './song.entity.js';
|
|
5
|
+
export * from './show.entity.js';
|
|
6
|
+
export * from './extras.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnArtistBase, SaavnPlaylistBase, SaavnTrendingBase } from './base';
|
|
3
|
-
import { SaavnSongEntity } from './song.entity';
|
|
2
|
+
import { SaavnArtistBase, SaavnPlaylistBase, SaavnTrendingBase } from './base.js';
|
|
3
|
+
import { SaavnSongEntity } from './song.entity.js';
|
|
4
4
|
export const SaavnPlaylistEntity = z.lazy(() => SaavnPlaylistBase.extend({
|
|
5
5
|
header_desc: z.string(),
|
|
6
6
|
language: z.string(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnArtistMap, SaavnSongCore, SaavnSongBase, SaavnTrendingBase, } from './base';
|
|
2
|
+
import { SaavnArtistMap, SaavnSongCore, SaavnSongBase, SaavnTrendingBase, } from './base.js';
|
|
3
3
|
export const SaavnSongEntity = SaavnSongBase.extend({
|
|
4
4
|
more_info: z.looseObject({
|
|
5
5
|
music: z.string(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SaavnGetDetailsSchema } from './schema.ops';
|
|
1
|
+
import { SaavnGetDetailsSchema } from './schema.ops.js';
|
|
2
2
|
export declare const SaavnGetDetails: {
|
|
3
3
|
readonly album: {
|
|
4
4
|
readonly call: "content.getAlbumDetails";
|
|
@@ -114,7 +114,7 @@ export declare const SaavnGetDetails: {
|
|
|
114
114
|
}, import("zod/v4/core").$loose>;
|
|
115
115
|
}, import("zod/v4/core").$loose>>;
|
|
116
116
|
};
|
|
117
|
-
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.album.response>) => import("../../../core/models").Album;
|
|
117
|
+
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.album.response>) => import("../../../core/models/album.js").Album;
|
|
118
118
|
};
|
|
119
119
|
readonly artist: {
|
|
120
120
|
readonly call: "artist.getArtistPageDetails";
|
|
@@ -397,7 +397,7 @@ export declare const SaavnGetDetails: {
|
|
|
397
397
|
}, import("zod/v4/core").$loose>;
|
|
398
398
|
}, import("zod/v4/core").$loose>>;
|
|
399
399
|
};
|
|
400
|
-
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.artist.response>) => import("../../../core/models").Artist;
|
|
400
|
+
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.artist.response>) => import("../../../core/models/artist.js").Artist;
|
|
401
401
|
};
|
|
402
402
|
readonly playlist: {
|
|
403
403
|
readonly call: "playlist.getDetails";
|
|
@@ -510,7 +510,7 @@ export declare const SaavnGetDetails: {
|
|
|
510
510
|
}, import("zod/v4/core").$loose>;
|
|
511
511
|
}, import("zod/v4/core").$loose>>;
|
|
512
512
|
};
|
|
513
|
-
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.playlist.response>) => import("../../../core/models").Playlist;
|
|
513
|
+
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.playlist.response>) => import("../../../core/models/playlist.js").Playlist;
|
|
514
514
|
};
|
|
515
515
|
readonly songs: {
|
|
516
516
|
readonly call: "song.getDetails";
|
|
@@ -582,7 +582,7 @@ export declare const SaavnGetDetails: {
|
|
|
582
582
|
}, import("zod/v4/core").$loose>;
|
|
583
583
|
};
|
|
584
584
|
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.songs.response>) => {
|
|
585
|
-
songs: import("../../../core/models").Song[];
|
|
585
|
+
songs: import("../../../core/models/song.js").Song[];
|
|
586
586
|
};
|
|
587
587
|
};
|
|
588
588
|
readonly topAlbumsOfTheYear: {
|
|
@@ -700,7 +700,7 @@ export declare const SaavnGetDetails: {
|
|
|
700
700
|
}, import("zod/v4/core").$loose>;
|
|
701
701
|
}, import("zod/v4/core").$loose>>>;
|
|
702
702
|
};
|
|
703
|
-
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.topAlbumsOfTheYear.response>) => import("../../../core/models").Album[];
|
|
703
|
+
readonly mapper: (data: import("zod").infer<typeof SaavnGetDetailsSchema.topAlbumsOfTheYear.response>) => import("../../../core/models/album.js").Album[];
|
|
704
704
|
};
|
|
705
705
|
readonly topSearches: {
|
|
706
706
|
readonly call: "content.getTopSearches";
|
|
@@ -732,7 +732,7 @@ export declare const SaavnGetDetails: {
|
|
|
732
732
|
title: string;
|
|
733
733
|
subtitle: string;
|
|
734
734
|
url: string;
|
|
735
|
-
images: import("
|
|
735
|
+
images: import("../../../types.js").Image[];
|
|
736
736
|
type: "album" | "artist" | "song";
|
|
737
737
|
} | {
|
|
738
738
|
type: "album";
|
|
@@ -741,7 +741,7 @@ export declare const SaavnGetDetails: {
|
|
|
741
741
|
title: string;
|
|
742
742
|
subtitle: string;
|
|
743
743
|
url: string;
|
|
744
|
-
images: import("
|
|
744
|
+
images: import("../../../types.js").Image[];
|
|
745
745
|
} | {
|
|
746
746
|
type: "song";
|
|
747
747
|
album: string;
|
|
@@ -749,7 +749,7 @@ export declare const SaavnGetDetails: {
|
|
|
749
749
|
title: string;
|
|
750
750
|
subtitle: string;
|
|
751
751
|
url: string;
|
|
752
|
-
images: import("
|
|
752
|
+
images: import("../../../types.js").Image[];
|
|
753
753
|
})[];
|
|
754
754
|
};
|
|
755
755
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SaavnGetDetailsMapper } from './mapper.ops';
|
|
2
|
-
import { SaavnGetDetailsSchema } from './schema.ops';
|
|
1
|
+
import { SaavnGetDetailsMapper } from './mapper.ops.js';
|
|
2
|
+
import { SaavnGetDetailsSchema } from './schema.ops.js';
|
|
3
3
|
export const SaavnGetDetails = {
|
|
4
4
|
album: {
|
|
5
5
|
call: 'content.getAlbumDetails',
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnGetDetailsSchema } from './schema.ops';
|
|
2
|
+
import { SaavnGetDetailsSchema } from './schema.ops.js';
|
|
3
3
|
export declare const SaavnGetDetailsMapper: {
|
|
4
|
-
album: (data: z.infer<typeof SaavnGetDetailsSchema.album.response>) => import("../../../core/models").Album;
|
|
5
|
-
artist: (data: z.infer<typeof SaavnGetDetailsSchema.artist.response>) => import("../../../core/models").Artist;
|
|
6
|
-
playlist: (data: z.infer<typeof SaavnGetDetailsSchema.playlist.response>) => import("../../../core/models").Playlist;
|
|
4
|
+
album: (data: z.infer<typeof SaavnGetDetailsSchema.album.response>) => import("../../../core/models/album.js").Album;
|
|
5
|
+
artist: (data: z.infer<typeof SaavnGetDetailsSchema.artist.response>) => import("../../../core/models/artist.js").Artist;
|
|
6
|
+
playlist: (data: z.infer<typeof SaavnGetDetailsSchema.playlist.response>) => import("../../../core/models/playlist.js").Playlist;
|
|
7
7
|
songs: (data: z.infer<typeof SaavnGetDetailsSchema.songs.response>) => {
|
|
8
|
-
songs: import("../../../core/models").Song[];
|
|
8
|
+
songs: import("../../../core/models/song.js").Song[];
|
|
9
9
|
};
|
|
10
|
-
topAlbumsOfTheYear: (data: z.infer<typeof SaavnGetDetailsSchema.topAlbumsOfTheYear.response>) => import("../../../core/models").Album[];
|
|
10
|
+
topAlbumsOfTheYear: (data: z.infer<typeof SaavnGetDetailsSchema.topAlbumsOfTheYear.response>) => import("../../../core/models/album.js").Album[];
|
|
11
11
|
topSearches: (data: z.infer<typeof SaavnGetDetailsSchema.topSearches.response>) => ({
|
|
12
12
|
id: string;
|
|
13
13
|
title: string;
|
|
14
14
|
subtitle: string;
|
|
15
15
|
url: string;
|
|
16
|
-
images: import("
|
|
16
|
+
images: import("../../../types.js").Image[];
|
|
17
17
|
type: "album" | "artist" | "song";
|
|
18
18
|
} | {
|
|
19
19
|
type: "album";
|
|
@@ -22,7 +22,7 @@ export declare const SaavnGetDetailsMapper: {
|
|
|
22
22
|
title: string;
|
|
23
23
|
subtitle: string;
|
|
24
24
|
url: string;
|
|
25
|
-
images: import("
|
|
25
|
+
images: import("../../../types.js").Image[];
|
|
26
26
|
} | {
|
|
27
27
|
type: "song";
|
|
28
28
|
album: string;
|
|
@@ -30,6 +30,6 @@ export declare const SaavnGetDetailsMapper: {
|
|
|
30
30
|
title: string;
|
|
31
31
|
subtitle: string;
|
|
32
32
|
url: string;
|
|
33
|
-
images: import("
|
|
33
|
+
images: import("../../../types.js").Image[];
|
|
34
34
|
})[];
|
|
35
35
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { mapAlbum, mapArtist, mapPlaylist, mapSong, parseImageUrls, } from '../../common-mapper';
|
|
3
|
-
import { SaavnGetDetailsSchema } from './schema.ops';
|
|
2
|
+
import { mapAlbum, mapArtist, mapPlaylist, mapSong, parseImageUrls, } from '../../common-mapper.js';
|
|
3
|
+
import { SaavnGetDetailsSchema } from './schema.ops.js';
|
|
4
4
|
export const SaavnGetDetailsMapper = {
|
|
5
5
|
album: (data) => {
|
|
6
6
|
return mapAlbum(data);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnAlbumEntity, SaavnArtistEntity, SaavnPlaylistEntity, SaavnSongEntity, SaavnTopSearchesEntity, } from '../../entities';
|
|
3
|
-
import { CSVString, NonEmptyString, PositiveString, } from '../../primitives/string';
|
|
4
|
-
import { SaavnSortBySchema, SaavnSortOrderSchema, } from '../../primitives/enums';
|
|
2
|
+
import { SaavnAlbumEntity, SaavnArtistEntity, SaavnPlaylistEntity, SaavnSongEntity, SaavnTopSearchesEntity, } from '../../entities/index.js';
|
|
3
|
+
import { CSVString, NonEmptyString, PositiveString, } from '../../primitives/string.js';
|
|
4
|
+
import { SaavnSortBySchema, SaavnSortOrderSchema, } from '../../primitives/enums.js';
|
|
5
5
|
export const SaavnGetDetailsSchema = {
|
|
6
6
|
album: {
|
|
7
7
|
params: z.strictObject({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SaavnGetRecoSchema } from './schema.ops';
|
|
1
|
+
import { SaavnGetRecoSchema } from './schema.ops.js';
|
|
2
2
|
export declare const SaavnGetReco: {
|
|
3
3
|
albums: {
|
|
4
4
|
call: string;
|
|
@@ -27,7 +27,7 @@ export declare const SaavnGetReco: {
|
|
|
27
27
|
subtitle: string;
|
|
28
28
|
description: string;
|
|
29
29
|
url: string;
|
|
30
|
-
images: import("
|
|
30
|
+
images: import("../../../types.js").Image[];
|
|
31
31
|
language: string;
|
|
32
32
|
year: number;
|
|
33
33
|
stats: {
|
|
@@ -63,7 +63,7 @@ export declare const SaavnGetReco: {
|
|
|
63
63
|
title: string;
|
|
64
64
|
subtitle: string;
|
|
65
65
|
url: string;
|
|
66
|
-
images: import("
|
|
66
|
+
images: import("../../../types.js").Image[];
|
|
67
67
|
flags: {
|
|
68
68
|
isExplicit: boolean;
|
|
69
69
|
};
|
|
@@ -139,6 +139,6 @@ export declare const SaavnGetReco: {
|
|
|
139
139
|
}, import("zod/v4/core").$loose>;
|
|
140
140
|
}, import("zod/v4/core").$loose>>>;
|
|
141
141
|
};
|
|
142
|
-
mapper: (data: import("zod").infer<typeof SaavnGetRecoSchema.songs.response>) => import("../../../core/models").Song[];
|
|
142
|
+
mapper: (data: import("zod").infer<typeof SaavnGetRecoSchema.songs.response>) => import("../../../core/models/song.js").Song[];
|
|
143
143
|
};
|
|
144
144
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SaavnGetRecoMapper } from './mapper.ops';
|
|
2
|
-
import { SaavnGetRecoSchema } from './schema.ops';
|
|
1
|
+
import { SaavnGetRecoMapper } from './mapper.ops.js';
|
|
2
|
+
import { SaavnGetRecoSchema } from './schema.ops.js';
|
|
3
3
|
export const SaavnGetReco = {
|
|
4
4
|
albums: {
|
|
5
5
|
call: 'reco.getAlbumReco',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SaavnGetRecoSchema } from './schema.ops';
|
|
2
|
+
import { SaavnGetRecoSchema } from './schema.ops.js';
|
|
3
3
|
export declare const SaavnGetRecoMapper: {
|
|
4
4
|
albums: (data: z.infer<typeof SaavnGetRecoSchema.albums.response>) => {
|
|
5
5
|
id: string;
|
|
@@ -8,7 +8,7 @@ export declare const SaavnGetRecoMapper: {
|
|
|
8
8
|
subtitle: string;
|
|
9
9
|
description: string;
|
|
10
10
|
url: string;
|
|
11
|
-
images: import("
|
|
11
|
+
images: import("../../../types.js").Image[];
|
|
12
12
|
language: string;
|
|
13
13
|
year: number;
|
|
14
14
|
stats: {
|
|
@@ -24,7 +24,7 @@ export declare const SaavnGetRecoMapper: {
|
|
|
24
24
|
title: string;
|
|
25
25
|
subtitle: string;
|
|
26
26
|
url: string;
|
|
27
|
-
images: import("
|
|
27
|
+
images: import("../../../types.js").Image[];
|
|
28
28
|
flags: {
|
|
29
29
|
isExplicit: boolean;
|
|
30
30
|
};
|
|
@@ -32,5 +32,5 @@ export declare const SaavnGetRecoMapper: {
|
|
|
32
32
|
name: string;
|
|
33
33
|
};
|
|
34
34
|
}[];
|
|
35
|
-
songs: (data: z.infer<typeof SaavnGetRecoSchema.songs.response>) => import("../../../core/models").Song[];
|
|
35
|
+
songs: (data: z.infer<typeof SaavnGetRecoSchema.songs.response>) => import("../../../core/models/song.js").Song[];
|
|
36
36
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { mapSong, parseImageUrls, mapArtist } from '../../common-mapper';
|
|
3
|
-
import { SaavnGetRecoSchema } from './schema.ops';
|
|
2
|
+
import { mapSong, parseImageUrls, mapArtist } from '../../common-mapper.js';
|
|
3
|
+
import { SaavnGetRecoSchema } from './schema.ops.js';
|
|
4
4
|
export const SaavnGetRecoMapper = {
|
|
5
5
|
albums: (data) => {
|
|
6
6
|
return data.map((album) => ({
|
|
@@ -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,
|