@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
|
-
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.1",
|
|
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"
|