@saavn-labs/sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +339 -0
- package/dist/core/models/album.d.ts +32 -0
- package/dist/core/models/album.js +1 -0
- package/dist/core/models/artist.d.ts +61 -0
- package/dist/core/models/artist.js +1 -0
- package/dist/core/models/index.d.ts +4 -0
- package/dist/core/models/index.js +4 -0
- package/dist/core/models/playlist.d.ts +35 -0
- package/dist/core/models/playlist.js +1 -0
- package/dist/core/models/song.d.ts +52 -0
- package/dist/core/models/song.js +1 -0
- package/dist/core/modules/album.module.d.ts +82 -0
- package/dist/core/modules/album.module.js +74 -0
- package/dist/core/modules/artist.module.d.ts +97 -0
- package/dist/core/modules/artist.module.js +49 -0
- package/dist/core/modules/extras.module.d.ts +385 -0
- package/dist/core/modules/extras.module.js +64 -0
- package/dist/core/modules/playlist.module.d.ts +79 -0
- package/dist/core/modules/playlist.module.js +74 -0
- package/dist/core/modules/song.module.d.ts +91 -0
- package/dist/core/modules/song.module.js +97 -0
- package/dist/helpers/errors.d.ts +25 -0
- package/dist/helpers/errors.js +84 -0
- package/dist/helpers/experimental/stream-urls/index.d.ts +20 -0
- package/dist/helpers/experimental/stream-urls/index.js +33 -0
- package/dist/helpers/experimental/stream-urls/stream-urls.edge.d.ts +4 -0
- package/dist/helpers/experimental/stream-urls/stream-urls.edge.js +38 -0
- package/dist/helpers/experimental/stream-urls/stream-urls.node.d.ts +4 -0
- package/dist/helpers/experimental/stream-urls/stream-urls.node.js +27 -0
- package/dist/helpers/fetch.d.ts +38 -0
- package/dist/helpers/fetch.js +38 -0
- package/dist/helpers/utils.d.ts +13 -0
- package/dist/helpers/utils.js +58 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +8 -0
- package/dist/saavn/common-mapper.d.ts +77 -0
- package/dist/saavn/common-mapper.js +348 -0
- package/dist/saavn/entities/album.entity.d.ts +151 -0
- package/dist/saavn/entities/album.entity.js +25 -0
- package/dist/saavn/entities/artist.entity.d.ts +274 -0
- package/dist/saavn/entities/artist.entity.js +49 -0
- package/dist/saavn/entities/base.d.ts +117 -0
- package/dist/saavn/entities/base.js +71 -0
- package/dist/saavn/entities/extras.d.ts +102 -0
- package/dist/saavn/entities/extras.js +43 -0
- package/dist/saavn/entities/index.d.ts +6 -0
- package/dist/saavn/entities/index.js +6 -0
- package/dist/saavn/entities/playlist.entity.d.ts +143 -0
- package/dist/saavn/entities/playlist.entity.js +55 -0
- package/dist/saavn/entities/show.entity.d.ts +14 -0
- package/dist/saavn/entities/show.entity.js +14 -0
- package/dist/saavn/entities/song.entity.d.ts +142 -0
- package/dist/saavn/entities/song.entity.js +48 -0
- package/dist/saavn/operations/get-details/index.d.ts +755 -0
- package/dist/saavn/operations/get-details/index.js +34 -0
- package/dist/saavn/operations/get-details/mapper.ops.d.ts +35 -0
- package/dist/saavn/operations/get-details/mapper.ops.js +55 -0
- package/dist/saavn/operations/get-details/schema.ops.d.ts +706 -0
- package/dist/saavn/operations/get-details/schema.ops.js +49 -0
- package/dist/saavn/operations/get-reco/index.d.ts +144 -0
- package/dist/saavn/operations/get-reco/index.js +19 -0
- package/dist/saavn/operations/get-reco/mapper.ops.d.ts +36 -0
- package/dist/saavn/operations/get-reco/mapper.ops.js +43 -0
- package/dist/saavn/operations/get-reco/schema.ops.d.ts +103 -0
- package/dist/saavn/operations/get-reco/schema.ops.js +28 -0
- package/dist/saavn/operations/get-trending/index.d.ts +288 -0
- package/dist/saavn/operations/get-trending/index.js +24 -0
- package/dist/saavn/operations/get-trending/mapper.ops.d.ts +13 -0
- package/dist/saavn/operations/get-trending/mapper.ops.js +134 -0
- package/dist/saavn/operations/get-trending/schema.ops.d.ts +272 -0
- package/dist/saavn/operations/get-trending/schema.ops.js +34 -0
- package/dist/saavn/operations/index.d.ts +6 -0
- package/dist/saavn/operations/index.js +6 -0
- package/dist/saavn/operations/search-results/index.d.ts +790 -0
- package/dist/saavn/operations/search-results/index.js +29 -0
- package/dist/saavn/operations/search-results/mapper.ops.d.ts +413 -0
- package/dist/saavn/operations/search-results/mapper.ops.js +80 -0
- package/dist/saavn/operations/search-results/schema.ops.d.ts +366 -0
- package/dist/saavn/operations/search-results/schema.ops.js +101 -0
- package/dist/saavn/operations/web-api/index.d.ts +604 -0
- package/dist/saavn/operations/web-api/index.js +29 -0
- package/dist/saavn/operations/web-api/mapper.ops.d.ts +11 -0
- package/dist/saavn/operations/web-api/mapper.ops.js +23 -0
- package/dist/saavn/operations/web-api/schema.ops.d.ts +582 -0
- package/dist/saavn/operations/web-api/schema.ops.js +50 -0
- package/dist/saavn/operations/web-radio/index.d.ts +181 -0
- package/dist/saavn/operations/web-radio/index.js +19 -0
- package/dist/saavn/operations/web-radio/mapper.ops.d.ts +14 -0
- package/dist/saavn/operations/web-radio/mapper.ops.js +35 -0
- package/dist/saavn/operations/web-radio/schema.ops.d.ts +162 -0
- package/dist/saavn/operations/web-radio/schema.ops.js +56 -0
- package/dist/saavn/primitives/enums.d.ts +17 -0
- package/dist/saavn/primitives/enums.js +4 -0
- package/dist/saavn/primitives/string.d.ts +5 -0
- package/dist/saavn/primitives/string.js +22 -0
- package/dist/saavn/run-operation.d.ts +12 -0
- package/dist/saavn/run-operation.js +39 -0
- package/dist/schemas/index.d.ts +2188 -0
- package/dist/schemas/index.js +14 -0
- package/dist/types.d.ts +24 -0
- package/dist/types.js +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SaavnPlaylistEntity: z.ZodLazy<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
subtitle: z.ZodString;
|
|
6
|
+
type: z.ZodLiteral<"playlist">;
|
|
7
|
+
image: z.ZodString;
|
|
8
|
+
perma_url: z.ZodString;
|
|
9
|
+
explicit_content: z.ZodString;
|
|
10
|
+
header_desc: z.ZodString;
|
|
11
|
+
language: z.ZodString;
|
|
12
|
+
year: z.ZodString;
|
|
13
|
+
play_count: z.ZodString;
|
|
14
|
+
list_count: z.ZodString;
|
|
15
|
+
list_type: z.ZodString;
|
|
16
|
+
list: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
title: z.ZodString;
|
|
19
|
+
subtitle: z.ZodString;
|
|
20
|
+
type: z.ZodLiteral<"song">;
|
|
21
|
+
perma_url: z.ZodString;
|
|
22
|
+
image: z.ZodString;
|
|
23
|
+
explicit_content: z.ZodString;
|
|
24
|
+
header_desc: z.ZodString;
|
|
25
|
+
language: z.ZodString;
|
|
26
|
+
year: z.ZodString;
|
|
27
|
+
play_count: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
28
|
+
more_info: z.ZodObject<{
|
|
29
|
+
music: z.ZodString;
|
|
30
|
+
album_id: z.ZodString;
|
|
31
|
+
album: z.ZodString;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
label_id: z.ZodNullable<z.ZodString>;
|
|
34
|
+
origin: z.ZodString;
|
|
35
|
+
is_dolby_content: z.ZodBoolean;
|
|
36
|
+
encrypted_media_url: z.ZodString;
|
|
37
|
+
encrypted_drm_media_url: z.ZodString;
|
|
38
|
+
album_url: z.ZodString;
|
|
39
|
+
duration: z.ZodString;
|
|
40
|
+
has_lyrics: z.ZodString;
|
|
41
|
+
lyrics_snippet: z.ZodString;
|
|
42
|
+
lyrics_id: z.ZodOptional<z.ZodString>;
|
|
43
|
+
copyright_text: z.ZodString;
|
|
44
|
+
release_date: z.ZodNullable<z.ZodString>;
|
|
45
|
+
label_url: z.ZodOptional<z.ZodString>;
|
|
46
|
+
vcode: z.ZodOptional<z.ZodString>;
|
|
47
|
+
vlink: z.ZodOptional<z.ZodString>;
|
|
48
|
+
artistMap: z.ZodLazy<z.ZodObject<{
|
|
49
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
role: z.ZodString;
|
|
53
|
+
image: z.ZodString;
|
|
54
|
+
type: z.ZodLiteral<"artist">;
|
|
55
|
+
perma_url: z.ZodString;
|
|
56
|
+
}, z.core.$loose>>;
|
|
57
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
name: z.ZodString;
|
|
60
|
+
role: z.ZodString;
|
|
61
|
+
image: z.ZodString;
|
|
62
|
+
type: z.ZodLiteral<"artist">;
|
|
63
|
+
perma_url: z.ZodString;
|
|
64
|
+
}, z.core.$loose>>;
|
|
65
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
role: z.ZodString;
|
|
69
|
+
image: z.ZodString;
|
|
70
|
+
type: z.ZodLiteral<"artist">;
|
|
71
|
+
perma_url: z.ZodString;
|
|
72
|
+
}, z.core.$loose>>;
|
|
73
|
+
}, z.core.$loose>>;
|
|
74
|
+
}, z.core.$loose>;
|
|
75
|
+
}, z.core.$loose>>>;
|
|
76
|
+
more_info: z.ZodObject<{
|
|
77
|
+
uid: z.ZodString;
|
|
78
|
+
contents: z.ZodString;
|
|
79
|
+
is_dolby_content: z.ZodBoolean;
|
|
80
|
+
last_updated: z.ZodString;
|
|
81
|
+
username: z.ZodString;
|
|
82
|
+
firstname: z.ZodString;
|
|
83
|
+
lastname: z.ZodString;
|
|
84
|
+
is_followed: z.ZodString;
|
|
85
|
+
follower_count: z.ZodString;
|
|
86
|
+
fan_count: z.ZodString;
|
|
87
|
+
playlist_type: z.ZodString;
|
|
88
|
+
images: z.ZodArray<z.ZodAny>;
|
|
89
|
+
user_image: z.ZodString;
|
|
90
|
+
initials: z.ZodString;
|
|
91
|
+
custom_username: z.ZodString;
|
|
92
|
+
video_count: z.ZodString;
|
|
93
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
role: z.ZodString;
|
|
97
|
+
image: z.ZodString;
|
|
98
|
+
type: z.ZodLiteral<"artist">;
|
|
99
|
+
perma_url: z.ZodString;
|
|
100
|
+
}, z.core.$loose>>;
|
|
101
|
+
subtitle_desc: z.ZodArray<z.ZodString>;
|
|
102
|
+
}, z.core.$loose>;
|
|
103
|
+
}, z.core.$loose>>;
|
|
104
|
+
export declare const SaavnPlaylistSearchEntity: z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
title: z.ZodString;
|
|
107
|
+
subtitle: z.ZodString;
|
|
108
|
+
type: z.ZodLiteral<"playlist">;
|
|
109
|
+
image: z.ZodString;
|
|
110
|
+
perma_url: z.ZodString;
|
|
111
|
+
explicit_content: z.ZodString;
|
|
112
|
+
description: z.ZodString;
|
|
113
|
+
more_info: z.ZodObject<{
|
|
114
|
+
firstname: z.ZodString;
|
|
115
|
+
lastname: z.ZodOptional<z.ZodString>;
|
|
116
|
+
artist_name: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
117
|
+
entity_type: z.ZodString;
|
|
118
|
+
is_dolby_content: z.ZodNullable<z.ZodBoolean>;
|
|
119
|
+
language: z.ZodString;
|
|
120
|
+
}, z.core.$loose>;
|
|
121
|
+
}, z.core.$loose>;
|
|
122
|
+
export declare const SaavnTrendingPlaylist: z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
title: z.ZodString;
|
|
125
|
+
subtitle: z.ZodString;
|
|
126
|
+
header_desc: z.ZodString;
|
|
127
|
+
perma_url: z.ZodString;
|
|
128
|
+
image: z.ZodString;
|
|
129
|
+
language: z.ZodString;
|
|
130
|
+
year: z.ZodString;
|
|
131
|
+
play_count: z.ZodString;
|
|
132
|
+
explicit_content: z.ZodString;
|
|
133
|
+
type: z.ZodLiteral<"playlist">;
|
|
134
|
+
more_info: z.ZodObject<{
|
|
135
|
+
listid: z.ZodString;
|
|
136
|
+
isWeekly: z.ZodString;
|
|
137
|
+
listname: z.ZodString;
|
|
138
|
+
firstname: z.ZodString;
|
|
139
|
+
song_count: z.ZodString;
|
|
140
|
+
follower_count: z.ZodString;
|
|
141
|
+
fan_count: z.ZodString;
|
|
142
|
+
}, z.core.$loose>;
|
|
143
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SaavnArtistBase, SaavnPlaylistBase, SaavnTrendingBase } from './base';
|
|
3
|
+
import { SaavnSongEntity } from './song.entity';
|
|
4
|
+
export const SaavnPlaylistEntity = z.lazy(() => SaavnPlaylistBase.extend({
|
|
5
|
+
header_desc: z.string(),
|
|
6
|
+
language: z.string(),
|
|
7
|
+
year: z.string(),
|
|
8
|
+
play_count: z.string(),
|
|
9
|
+
list_count: z.string(),
|
|
10
|
+
list_type: z.string(),
|
|
11
|
+
list: z.array(z.lazy(() => SaavnSongEntity)),
|
|
12
|
+
more_info: z.looseObject({
|
|
13
|
+
uid: z.string(),
|
|
14
|
+
contents: z.string(),
|
|
15
|
+
is_dolby_content: z.boolean(),
|
|
16
|
+
last_updated: z.string(),
|
|
17
|
+
username: z.string(),
|
|
18
|
+
firstname: z.string(),
|
|
19
|
+
lastname: z.string(),
|
|
20
|
+
is_followed: z.string(),
|
|
21
|
+
follower_count: z.string(),
|
|
22
|
+
fan_count: z.string(),
|
|
23
|
+
playlist_type: z.string(),
|
|
24
|
+
images: z.array(z.any()),
|
|
25
|
+
user_image: z.string(),
|
|
26
|
+
initials: z.string(),
|
|
27
|
+
custom_username: z.string(),
|
|
28
|
+
video_count: z.string(),
|
|
29
|
+
artists: z.array(SaavnArtistBase),
|
|
30
|
+
subtitle_desc: z.array(z.string()),
|
|
31
|
+
}),
|
|
32
|
+
}));
|
|
33
|
+
export const SaavnPlaylistSearchEntity = SaavnPlaylistBase.extend({
|
|
34
|
+
description: z.string(),
|
|
35
|
+
more_info: z.looseObject({
|
|
36
|
+
firstname: z.string(),
|
|
37
|
+
lastname: z.string().optional(),
|
|
38
|
+
artist_name: z.array(z.string()).nullable(),
|
|
39
|
+
entity_type: z.string(),
|
|
40
|
+
is_dolby_content: z.boolean().nullable(),
|
|
41
|
+
language: z.string(),
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
export const SaavnTrendingPlaylist = SaavnTrendingBase.extend({
|
|
45
|
+
type: z.literal('playlist'),
|
|
46
|
+
more_info: z.looseObject({
|
|
47
|
+
listid: z.string(),
|
|
48
|
+
isWeekly: z.string(),
|
|
49
|
+
listname: z.string(),
|
|
50
|
+
firstname: z.string(),
|
|
51
|
+
song_count: z.string(),
|
|
52
|
+
follower_count: z.string(),
|
|
53
|
+
fan_count: z.string(),
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SaavnShowEntity: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
subtitle: z.ZodString;
|
|
6
|
+
type: z.ZodLiteral<"show">;
|
|
7
|
+
image: z.ZodString;
|
|
8
|
+
perma_url: z.ZodString;
|
|
9
|
+
more_info: z.ZodObject<{
|
|
10
|
+
season_number: z.ZodNumber;
|
|
11
|
+
}, z.core.$loose>;
|
|
12
|
+
explicit_content: z.ZodString;
|
|
13
|
+
description: z.ZodString;
|
|
14
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const SaavnShowEntity = z.looseObject({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
title: z.string(),
|
|
5
|
+
subtitle: z.string(),
|
|
6
|
+
type: z.literal('show'),
|
|
7
|
+
image: z.string(),
|
|
8
|
+
perma_url: z.string(),
|
|
9
|
+
more_info: z.looseObject({
|
|
10
|
+
season_number: z.number(),
|
|
11
|
+
}),
|
|
12
|
+
explicit_content: z.string(),
|
|
13
|
+
description: z.string(),
|
|
14
|
+
});
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SaavnSongEntity: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
subtitle: z.ZodString;
|
|
6
|
+
type: z.ZodLiteral<"song">;
|
|
7
|
+
perma_url: z.ZodString;
|
|
8
|
+
image: z.ZodString;
|
|
9
|
+
explicit_content: z.ZodString;
|
|
10
|
+
header_desc: z.ZodString;
|
|
11
|
+
language: z.ZodString;
|
|
12
|
+
year: z.ZodString;
|
|
13
|
+
play_count: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
14
|
+
more_info: z.ZodObject<{
|
|
15
|
+
music: z.ZodString;
|
|
16
|
+
album_id: z.ZodString;
|
|
17
|
+
album: z.ZodString;
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
label_id: z.ZodNullable<z.ZodString>;
|
|
20
|
+
origin: z.ZodString;
|
|
21
|
+
is_dolby_content: z.ZodBoolean;
|
|
22
|
+
encrypted_media_url: z.ZodString;
|
|
23
|
+
encrypted_drm_media_url: z.ZodString;
|
|
24
|
+
album_url: z.ZodString;
|
|
25
|
+
duration: z.ZodString;
|
|
26
|
+
has_lyrics: z.ZodString;
|
|
27
|
+
lyrics_snippet: z.ZodString;
|
|
28
|
+
lyrics_id: z.ZodOptional<z.ZodString>;
|
|
29
|
+
copyright_text: z.ZodString;
|
|
30
|
+
release_date: z.ZodNullable<z.ZodString>;
|
|
31
|
+
label_url: z.ZodOptional<z.ZodString>;
|
|
32
|
+
vcode: z.ZodOptional<z.ZodString>;
|
|
33
|
+
vlink: z.ZodOptional<z.ZodString>;
|
|
34
|
+
artistMap: z.ZodLazy<z.ZodObject<{
|
|
35
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
role: z.ZodString;
|
|
39
|
+
image: z.ZodString;
|
|
40
|
+
type: z.ZodLiteral<"artist">;
|
|
41
|
+
perma_url: z.ZodString;
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
role: z.ZodString;
|
|
47
|
+
image: z.ZodString;
|
|
48
|
+
type: z.ZodLiteral<"artist">;
|
|
49
|
+
perma_url: z.ZodString;
|
|
50
|
+
}, z.core.$loose>>;
|
|
51
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
role: z.ZodString;
|
|
55
|
+
image: z.ZodString;
|
|
56
|
+
type: z.ZodLiteral<"artist">;
|
|
57
|
+
perma_url: z.ZodString;
|
|
58
|
+
}, z.core.$loose>>;
|
|
59
|
+
}, z.core.$loose>>;
|
|
60
|
+
}, z.core.$loose>;
|
|
61
|
+
}, z.core.$loose>;
|
|
62
|
+
export declare const SaavnSongSearchEntity: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
title: z.ZodString;
|
|
65
|
+
subtitle: z.ZodString;
|
|
66
|
+
type: z.ZodLiteral<"song">;
|
|
67
|
+
perma_url: z.ZodString;
|
|
68
|
+
image: z.ZodString;
|
|
69
|
+
explicit_content: z.ZodString;
|
|
70
|
+
description: z.ZodString;
|
|
71
|
+
more_info: z.ZodObject<{
|
|
72
|
+
album: z.ZodString;
|
|
73
|
+
album_id: z.ZodString;
|
|
74
|
+
ctr: z.ZodNumber;
|
|
75
|
+
score: z.ZodString;
|
|
76
|
+
vcode: z.ZodString;
|
|
77
|
+
vlink: z.ZodString;
|
|
78
|
+
primary_artists: z.ZodString;
|
|
79
|
+
singers: z.ZodString;
|
|
80
|
+
language: z.ZodString;
|
|
81
|
+
}, z.core.$loose>;
|
|
82
|
+
}, z.core.$loose>;
|
|
83
|
+
export declare const SaavnTrendingSongEntity: z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
title: z.ZodString;
|
|
86
|
+
subtitle: z.ZodString;
|
|
87
|
+
header_desc: z.ZodString;
|
|
88
|
+
perma_url: z.ZodString;
|
|
89
|
+
image: z.ZodString;
|
|
90
|
+
language: z.ZodString;
|
|
91
|
+
year: z.ZodString;
|
|
92
|
+
play_count: z.ZodString;
|
|
93
|
+
explicit_content: z.ZodString;
|
|
94
|
+
type: z.ZodLiteral<"song">;
|
|
95
|
+
more_info: z.ZodObject<{
|
|
96
|
+
music: z.ZodString;
|
|
97
|
+
album_id: z.ZodString;
|
|
98
|
+
album: z.ZodString;
|
|
99
|
+
label: z.ZodString;
|
|
100
|
+
label_id: z.ZodNullable<z.ZodString>;
|
|
101
|
+
origin: z.ZodString;
|
|
102
|
+
is_dolby_content: z.ZodBoolean;
|
|
103
|
+
encrypted_media_url: z.ZodString;
|
|
104
|
+
encrypted_drm_media_url: z.ZodString;
|
|
105
|
+
album_url: z.ZodString;
|
|
106
|
+
duration: z.ZodString;
|
|
107
|
+
has_lyrics: z.ZodString;
|
|
108
|
+
lyrics_snippet: z.ZodString;
|
|
109
|
+
lyrics_id: z.ZodOptional<z.ZodString>;
|
|
110
|
+
copyright_text: z.ZodString;
|
|
111
|
+
release_date: z.ZodNullable<z.ZodString>;
|
|
112
|
+
artistMap: z.ZodLazy<z.ZodObject<{
|
|
113
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
role: z.ZodString;
|
|
117
|
+
image: z.ZodString;
|
|
118
|
+
type: z.ZodLiteral<"artist">;
|
|
119
|
+
perma_url: z.ZodString;
|
|
120
|
+
}, z.core.$loose>>;
|
|
121
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
role: z.ZodString;
|
|
125
|
+
image: z.ZodString;
|
|
126
|
+
type: z.ZodLiteral<"artist">;
|
|
127
|
+
perma_url: z.ZodString;
|
|
128
|
+
}, z.core.$loose>>;
|
|
129
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
role: z.ZodString;
|
|
133
|
+
image: z.ZodString;
|
|
134
|
+
type: z.ZodLiteral<"artist">;
|
|
135
|
+
perma_url: z.ZodString;
|
|
136
|
+
}, z.core.$loose>>;
|
|
137
|
+
}, z.core.$loose>>;
|
|
138
|
+
vcode: z.ZodOptional<z.ZodString>;
|
|
139
|
+
vlink: z.ZodOptional<z.ZodString>;
|
|
140
|
+
label_url: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$loose>;
|
|
142
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SaavnArtistMap, SaavnSongCore, SaavnSongBase, SaavnTrendingBase, } from './base';
|
|
3
|
+
export const SaavnSongEntity = SaavnSongBase.extend({
|
|
4
|
+
more_info: z.looseObject({
|
|
5
|
+
music: z.string(),
|
|
6
|
+
album_id: z.string(),
|
|
7
|
+
album: z.string(),
|
|
8
|
+
label: z.string(),
|
|
9
|
+
label_id: z.string().nullable(),
|
|
10
|
+
origin: z.string(),
|
|
11
|
+
is_dolby_content: z.boolean(),
|
|
12
|
+
encrypted_media_url: z.string(),
|
|
13
|
+
encrypted_drm_media_url: z.string(),
|
|
14
|
+
album_url: z.string(),
|
|
15
|
+
duration: z.string(),
|
|
16
|
+
has_lyrics: z.string(),
|
|
17
|
+
lyrics_snippet: z.string(),
|
|
18
|
+
lyrics_id: z.string().optional(),
|
|
19
|
+
copyright_text: z.string(),
|
|
20
|
+
release_date: z.string().nullable(),
|
|
21
|
+
label_url: z.string().optional(),
|
|
22
|
+
vcode: z.string().optional(),
|
|
23
|
+
vlink: z.string().optional(),
|
|
24
|
+
artistMap: z.lazy(() => SaavnArtistMap),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
export const SaavnSongSearchEntity = SaavnSongCore.extend({
|
|
28
|
+
description: z.string(),
|
|
29
|
+
more_info: z.looseObject({
|
|
30
|
+
album: z.string(),
|
|
31
|
+
album_id: z.string(),
|
|
32
|
+
ctr: z.number(),
|
|
33
|
+
score: z.string(),
|
|
34
|
+
vcode: z.string(),
|
|
35
|
+
vlink: z.string(),
|
|
36
|
+
primary_artists: z.string(),
|
|
37
|
+
singers: z.string(),
|
|
38
|
+
language: z.string(),
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
export const SaavnTrendingSongEntity = SaavnTrendingBase.extend({
|
|
42
|
+
type: z.literal('song'),
|
|
43
|
+
more_info: SaavnSongEntity.shape.more_info.extend({
|
|
44
|
+
vcode: z.string().optional(),
|
|
45
|
+
vlink: z.string().optional(),
|
|
46
|
+
label_url: z.string().optional(),
|
|
47
|
+
}),
|
|
48
|
+
});
|