@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,274 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SaavnArtistEntity: z.ZodLazy<z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"artist">;
|
|
4
|
+
image: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
artistId: z.ZodString;
|
|
7
|
+
subtitle: z.ZodString;
|
|
8
|
+
follower_count: z.ZodString;
|
|
9
|
+
isVerified: z.ZodBoolean;
|
|
10
|
+
isRadioPresent: z.ZodBoolean;
|
|
11
|
+
dominantLanguage: z.ZodString;
|
|
12
|
+
dominantType: z.ZodString;
|
|
13
|
+
bio: z.ZodString;
|
|
14
|
+
dob: z.ZodString;
|
|
15
|
+
fb: z.ZodString;
|
|
16
|
+
twitter: z.ZodString;
|
|
17
|
+
wiki: z.ZodString;
|
|
18
|
+
availableLanguages: z.ZodArray<z.ZodString>;
|
|
19
|
+
fan_count: z.ZodString;
|
|
20
|
+
is_followed: z.ZodBoolean;
|
|
21
|
+
topSongs: z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
title: z.ZodString;
|
|
24
|
+
subtitle: z.ZodString;
|
|
25
|
+
type: z.ZodLiteral<"song">;
|
|
26
|
+
perma_url: z.ZodString;
|
|
27
|
+
image: z.ZodString;
|
|
28
|
+
explicit_content: z.ZodString;
|
|
29
|
+
header_desc: z.ZodString;
|
|
30
|
+
language: z.ZodString;
|
|
31
|
+
year: z.ZodString;
|
|
32
|
+
play_count: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
33
|
+
more_info: z.ZodObject<{
|
|
34
|
+
music: z.ZodString;
|
|
35
|
+
album_id: z.ZodString;
|
|
36
|
+
album: z.ZodString;
|
|
37
|
+
label: z.ZodString;
|
|
38
|
+
label_id: z.ZodNullable<z.ZodString>;
|
|
39
|
+
origin: z.ZodString;
|
|
40
|
+
is_dolby_content: z.ZodBoolean;
|
|
41
|
+
encrypted_media_url: z.ZodString;
|
|
42
|
+
encrypted_drm_media_url: z.ZodString;
|
|
43
|
+
album_url: z.ZodString;
|
|
44
|
+
duration: z.ZodString;
|
|
45
|
+
has_lyrics: z.ZodString;
|
|
46
|
+
lyrics_snippet: z.ZodString;
|
|
47
|
+
lyrics_id: z.ZodOptional<z.ZodString>;
|
|
48
|
+
copyright_text: z.ZodString;
|
|
49
|
+
release_date: z.ZodNullable<z.ZodString>;
|
|
50
|
+
label_url: z.ZodOptional<z.ZodString>;
|
|
51
|
+
vcode: z.ZodOptional<z.ZodString>;
|
|
52
|
+
vlink: z.ZodOptional<z.ZodString>;
|
|
53
|
+
artistMap: z.ZodLazy<z.ZodObject<{
|
|
54
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
role: z.ZodString;
|
|
58
|
+
image: z.ZodString;
|
|
59
|
+
type: z.ZodLiteral<"artist">;
|
|
60
|
+
perma_url: z.ZodString;
|
|
61
|
+
}, z.core.$loose>>;
|
|
62
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
role: z.ZodString;
|
|
66
|
+
image: z.ZodString;
|
|
67
|
+
type: z.ZodLiteral<"artist">;
|
|
68
|
+
perma_url: z.ZodString;
|
|
69
|
+
}, z.core.$loose>>;
|
|
70
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
role: z.ZodString;
|
|
74
|
+
image: z.ZodString;
|
|
75
|
+
type: z.ZodLiteral<"artist">;
|
|
76
|
+
perma_url: z.ZodString;
|
|
77
|
+
}, z.core.$loose>>;
|
|
78
|
+
}, z.core.$loose>>;
|
|
79
|
+
}, z.core.$loose>;
|
|
80
|
+
}, z.core.$loose>>>;
|
|
81
|
+
topAlbums: z.ZodArray<z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
title: z.ZodString;
|
|
84
|
+
subtitle: z.ZodString;
|
|
85
|
+
type: z.ZodLiteral<"album">;
|
|
86
|
+
image: z.ZodString;
|
|
87
|
+
perma_url: z.ZodString;
|
|
88
|
+
explicit_content: z.ZodString;
|
|
89
|
+
header_desc: z.ZodString;
|
|
90
|
+
language: z.ZodString;
|
|
91
|
+
year: z.ZodString;
|
|
92
|
+
play_count: z.ZodString;
|
|
93
|
+
more_info: z.ZodObject<{
|
|
94
|
+
query: z.ZodString;
|
|
95
|
+
text: z.ZodString;
|
|
96
|
+
music: z.ZodNullable<z.ZodString>;
|
|
97
|
+
song_count: z.ZodString;
|
|
98
|
+
artistMap: z.ZodObject<{
|
|
99
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
role: z.ZodString;
|
|
103
|
+
image: z.ZodString;
|
|
104
|
+
type: z.ZodLiteral<"artist">;
|
|
105
|
+
perma_url: z.ZodString;
|
|
106
|
+
}, z.core.$loose>>;
|
|
107
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
role: z.ZodString;
|
|
111
|
+
image: z.ZodString;
|
|
112
|
+
type: z.ZodLiteral<"artist">;
|
|
113
|
+
perma_url: z.ZodString;
|
|
114
|
+
}, z.core.$loose>>;
|
|
115
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
name: z.ZodString;
|
|
118
|
+
role: z.ZodString;
|
|
119
|
+
image: z.ZodString;
|
|
120
|
+
type: z.ZodLiteral<"artist">;
|
|
121
|
+
perma_url: z.ZodString;
|
|
122
|
+
}, z.core.$loose>>;
|
|
123
|
+
}, z.core.$loose>;
|
|
124
|
+
}, z.core.$loose>;
|
|
125
|
+
}, z.core.$loose>>;
|
|
126
|
+
topEpisodes: z.ZodArray<z.ZodAny>;
|
|
127
|
+
dedicated_artist_playlist: z.ZodArray<z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
title: z.ZodString;
|
|
130
|
+
subtitle: z.ZodString;
|
|
131
|
+
type: z.ZodLiteral<"playlist">;
|
|
132
|
+
image: z.ZodString;
|
|
133
|
+
perma_url: z.ZodString;
|
|
134
|
+
explicit_content: z.ZodString;
|
|
135
|
+
more_info: z.ZodObject<{
|
|
136
|
+
firstname: z.ZodString;
|
|
137
|
+
lastname: z.ZodOptional<z.ZodString>;
|
|
138
|
+
artist_name: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
139
|
+
entity_type: z.ZodString;
|
|
140
|
+
is_dolby_content: z.ZodNullable<z.ZodBoolean>;
|
|
141
|
+
language: z.ZodString;
|
|
142
|
+
uid: z.ZodString;
|
|
143
|
+
song_count: z.ZodString;
|
|
144
|
+
}, z.core.$loose>;
|
|
145
|
+
}, z.core.$loose>>;
|
|
146
|
+
featured_artist_playlist: z.ZodArray<z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
title: z.ZodString;
|
|
149
|
+
subtitle: z.ZodString;
|
|
150
|
+
type: z.ZodLiteral<"playlist">;
|
|
151
|
+
image: z.ZodString;
|
|
152
|
+
perma_url: z.ZodString;
|
|
153
|
+
explicit_content: z.ZodString;
|
|
154
|
+
more_info: z.ZodObject<{
|
|
155
|
+
firstname: z.ZodString;
|
|
156
|
+
lastname: z.ZodOptional<z.ZodString>;
|
|
157
|
+
artist_name: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
158
|
+
entity_type: z.ZodString;
|
|
159
|
+
is_dolby_content: z.ZodNullable<z.ZodBoolean>;
|
|
160
|
+
language: z.ZodString;
|
|
161
|
+
uid: z.ZodString;
|
|
162
|
+
song_count: z.ZodString;
|
|
163
|
+
}, z.core.$loose>;
|
|
164
|
+
}, z.core.$loose>>;
|
|
165
|
+
singles: z.ZodArray<z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
title: z.ZodString;
|
|
168
|
+
subtitle: z.ZodString;
|
|
169
|
+
type: z.ZodLiteral<"album">;
|
|
170
|
+
image: z.ZodString;
|
|
171
|
+
perma_url: z.ZodString;
|
|
172
|
+
explicit_content: z.ZodString;
|
|
173
|
+
header_desc: z.ZodString;
|
|
174
|
+
language: z.ZodString;
|
|
175
|
+
year: z.ZodString;
|
|
176
|
+
play_count: z.ZodString;
|
|
177
|
+
more_info: z.ZodObject<{
|
|
178
|
+
query: z.ZodString;
|
|
179
|
+
text: z.ZodString;
|
|
180
|
+
music: z.ZodNullable<z.ZodString>;
|
|
181
|
+
song_count: z.ZodString;
|
|
182
|
+
artistMap: z.ZodObject<{
|
|
183
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
name: z.ZodString;
|
|
186
|
+
role: z.ZodString;
|
|
187
|
+
image: z.ZodString;
|
|
188
|
+
type: z.ZodLiteral<"artist">;
|
|
189
|
+
perma_url: z.ZodString;
|
|
190
|
+
}, z.core.$loose>>;
|
|
191
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
name: z.ZodString;
|
|
194
|
+
role: z.ZodString;
|
|
195
|
+
image: z.ZodString;
|
|
196
|
+
type: z.ZodLiteral<"artist">;
|
|
197
|
+
perma_url: z.ZodString;
|
|
198
|
+
}, z.core.$loose>>;
|
|
199
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
name: z.ZodString;
|
|
202
|
+
role: z.ZodString;
|
|
203
|
+
image: z.ZodString;
|
|
204
|
+
type: z.ZodLiteral<"artist">;
|
|
205
|
+
perma_url: z.ZodString;
|
|
206
|
+
}, z.core.$loose>>;
|
|
207
|
+
}, z.core.$loose>;
|
|
208
|
+
}, z.core.$loose>;
|
|
209
|
+
}, z.core.$loose>>;
|
|
210
|
+
latest_release: z.ZodArray<z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
title: z.ZodString;
|
|
213
|
+
subtitle: z.ZodString;
|
|
214
|
+
type: z.ZodLiteral<"album">;
|
|
215
|
+
image: z.ZodString;
|
|
216
|
+
perma_url: z.ZodString;
|
|
217
|
+
explicit_content: z.ZodString;
|
|
218
|
+
header_desc: z.ZodString;
|
|
219
|
+
language: z.ZodString;
|
|
220
|
+
year: z.ZodString;
|
|
221
|
+
play_count: z.ZodString;
|
|
222
|
+
more_info: z.ZodObject<{
|
|
223
|
+
query: z.ZodString;
|
|
224
|
+
text: z.ZodString;
|
|
225
|
+
music: z.ZodNullable<z.ZodString>;
|
|
226
|
+
song_count: z.ZodString;
|
|
227
|
+
artistMap: z.ZodObject<{
|
|
228
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
229
|
+
id: z.ZodString;
|
|
230
|
+
name: z.ZodString;
|
|
231
|
+
role: z.ZodString;
|
|
232
|
+
image: z.ZodString;
|
|
233
|
+
type: z.ZodLiteral<"artist">;
|
|
234
|
+
perma_url: z.ZodString;
|
|
235
|
+
}, z.core.$loose>>;
|
|
236
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
name: z.ZodString;
|
|
239
|
+
role: z.ZodString;
|
|
240
|
+
image: z.ZodString;
|
|
241
|
+
type: z.ZodLiteral<"artist">;
|
|
242
|
+
perma_url: z.ZodString;
|
|
243
|
+
}, z.core.$loose>>;
|
|
244
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
245
|
+
id: z.ZodString;
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
role: z.ZodString;
|
|
248
|
+
image: z.ZodString;
|
|
249
|
+
type: z.ZodLiteral<"artist">;
|
|
250
|
+
perma_url: z.ZodString;
|
|
251
|
+
}, z.core.$loose>>;
|
|
252
|
+
}, z.core.$loose>;
|
|
253
|
+
}, z.core.$loose>;
|
|
254
|
+
description: z.ZodString;
|
|
255
|
+
}, z.core.$loose>>;
|
|
256
|
+
similarArtists: z.ZodArray<z.ZodAny>;
|
|
257
|
+
urls: z.ZodObject<{
|
|
258
|
+
albums: z.ZodString;
|
|
259
|
+
bio: z.ZodString;
|
|
260
|
+
comments: z.ZodString;
|
|
261
|
+
songs: z.ZodString;
|
|
262
|
+
overview: z.ZodString;
|
|
263
|
+
}, z.core.$loose>;
|
|
264
|
+
}, z.core.$loose>>;
|
|
265
|
+
export declare const SaavnArtistSearchEntity: z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
title: z.ZodString;
|
|
268
|
+
image: z.ZodString;
|
|
269
|
+
type: z.ZodLiteral<"artist">;
|
|
270
|
+
isRadioPresent: z.ZodBoolean;
|
|
271
|
+
ctr: z.ZodNumber;
|
|
272
|
+
description: z.ZodString;
|
|
273
|
+
position: z.ZodNumber;
|
|
274
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SaavnArtistBase } from './base';
|
|
3
|
+
import { SaavnAlbumEdgeCase, SaavnPlaylistEdgeCase, SaavnSongEntity } from '.';
|
|
4
|
+
export const SaavnArtistEntity = z.lazy(() => SaavnArtistBase.omit({
|
|
5
|
+
id: true,
|
|
6
|
+
role: true,
|
|
7
|
+
perma_url: true,
|
|
8
|
+
}).extend({
|
|
9
|
+
artistId: z.string(),
|
|
10
|
+
subtitle: z.string(),
|
|
11
|
+
follower_count: z.string(),
|
|
12
|
+
isVerified: z.boolean(),
|
|
13
|
+
isRadioPresent: z.boolean(),
|
|
14
|
+
dominantLanguage: z.string(),
|
|
15
|
+
dominantType: z.string(),
|
|
16
|
+
bio: z.string(),
|
|
17
|
+
dob: z.string(),
|
|
18
|
+
fb: z.string(),
|
|
19
|
+
twitter: z.string(),
|
|
20
|
+
wiki: z.string(),
|
|
21
|
+
availableLanguages: z.array(z.string()),
|
|
22
|
+
fan_count: z.string(),
|
|
23
|
+
is_followed: z.boolean(),
|
|
24
|
+
topSongs: z.array(z.lazy(() => SaavnSongEntity)),
|
|
25
|
+
topAlbums: z.array(SaavnAlbumEdgeCase),
|
|
26
|
+
topEpisodes: z.array(z.any()),
|
|
27
|
+
dedicated_artist_playlist: z.array(SaavnPlaylistEdgeCase),
|
|
28
|
+
featured_artist_playlist: z.array(SaavnPlaylistEdgeCase),
|
|
29
|
+
singles: z.array(SaavnAlbumEdgeCase),
|
|
30
|
+
latest_release: z.array(SaavnAlbumEdgeCase.extend({ description: z.string() })),
|
|
31
|
+
similarArtists: z.array(z.any()),
|
|
32
|
+
urls: z.looseObject({
|
|
33
|
+
albums: z.string(),
|
|
34
|
+
bio: z.string(),
|
|
35
|
+
comments: z.string(),
|
|
36
|
+
songs: z.string(),
|
|
37
|
+
overview: z.string(),
|
|
38
|
+
}),
|
|
39
|
+
}));
|
|
40
|
+
export const SaavnArtistSearchEntity = z.looseObject({
|
|
41
|
+
id: z.string(),
|
|
42
|
+
title: z.string(),
|
|
43
|
+
image: z.string(),
|
|
44
|
+
type: z.literal('artist'),
|
|
45
|
+
isRadioPresent: z.boolean(),
|
|
46
|
+
ctr: z.number(),
|
|
47
|
+
description: z.string(),
|
|
48
|
+
position: z.number(),
|
|
49
|
+
});
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SaavnAlbumCore: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
subtitle: z.ZodString;
|
|
6
|
+
type: z.ZodLiteral<"album">;
|
|
7
|
+
image: z.ZodString;
|
|
8
|
+
perma_url: z.ZodString;
|
|
9
|
+
explicit_content: z.ZodString;
|
|
10
|
+
}, z.core.$loose>;
|
|
11
|
+
export declare const SaavnAlbumBase: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
subtitle: z.ZodString;
|
|
15
|
+
type: z.ZodLiteral<"album">;
|
|
16
|
+
image: z.ZodString;
|
|
17
|
+
perma_url: z.ZodString;
|
|
18
|
+
explicit_content: z.ZodString;
|
|
19
|
+
header_desc: z.ZodString;
|
|
20
|
+
language: z.ZodString;
|
|
21
|
+
year: z.ZodString;
|
|
22
|
+
play_count: z.ZodString;
|
|
23
|
+
}, z.core.$loose>;
|
|
24
|
+
export declare const SaavnArtistAlbumBase: z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
title: z.ZodString;
|
|
27
|
+
subtitle: z.ZodString;
|
|
28
|
+
type: z.ZodLiteral<"album">;
|
|
29
|
+
image: z.ZodString;
|
|
30
|
+
perma_url: z.ZodString;
|
|
31
|
+
explicit_content: z.ZodString;
|
|
32
|
+
header_desc: z.ZodString;
|
|
33
|
+
language: z.ZodString;
|
|
34
|
+
year: z.ZodString;
|
|
35
|
+
play_count: z.ZodString;
|
|
36
|
+
more_info: z.ZodObject<{
|
|
37
|
+
song_count: z.ZodString;
|
|
38
|
+
}, z.core.$loose>;
|
|
39
|
+
}, z.core.$loose>;
|
|
40
|
+
export declare const SaavnArtistBase: z.ZodObject<{
|
|
41
|
+
id: z.ZodString;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
role: z.ZodString;
|
|
44
|
+
image: z.ZodString;
|
|
45
|
+
type: z.ZodLiteral<"artist">;
|
|
46
|
+
perma_url: z.ZodString;
|
|
47
|
+
}, z.core.$loose>;
|
|
48
|
+
export declare const SaavnArtistMap: 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
|
+
export declare const SaavnPlaylistBase: z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
title: z.ZodString;
|
|
77
|
+
subtitle: z.ZodString;
|
|
78
|
+
type: z.ZodLiteral<"playlist">;
|
|
79
|
+
image: z.ZodString;
|
|
80
|
+
perma_url: z.ZodString;
|
|
81
|
+
explicit_content: z.ZodString;
|
|
82
|
+
}, z.core.$loose>;
|
|
83
|
+
export declare const SaavnSongCore: z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
title: z.ZodString;
|
|
86
|
+
subtitle: z.ZodString;
|
|
87
|
+
type: z.ZodLiteral<"song">;
|
|
88
|
+
perma_url: z.ZodString;
|
|
89
|
+
image: z.ZodString;
|
|
90
|
+
explicit_content: z.ZodString;
|
|
91
|
+
}, z.core.$loose>;
|
|
92
|
+
export declare const SaavnSongBase: z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
subtitle: z.ZodString;
|
|
96
|
+
type: z.ZodLiteral<"song">;
|
|
97
|
+
perma_url: z.ZodString;
|
|
98
|
+
image: z.ZodString;
|
|
99
|
+
explicit_content: z.ZodString;
|
|
100
|
+
header_desc: z.ZodString;
|
|
101
|
+
language: z.ZodString;
|
|
102
|
+
year: z.ZodString;
|
|
103
|
+
play_count: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
104
|
+
}, z.core.$loose>;
|
|
105
|
+
export declare const SaavnTrendingBase: z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
title: z.ZodString;
|
|
108
|
+
subtitle: z.ZodString;
|
|
109
|
+
header_desc: z.ZodString;
|
|
110
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"album">, z.ZodLiteral<"playlist">, z.ZodLiteral<"song">]>;
|
|
111
|
+
perma_url: z.ZodString;
|
|
112
|
+
image: z.ZodString;
|
|
113
|
+
language: z.ZodString;
|
|
114
|
+
year: z.ZodString;
|
|
115
|
+
play_count: z.ZodString;
|
|
116
|
+
explicit_content: z.ZodString;
|
|
117
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const SaavnAlbumCore = z.looseObject({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
title: z.string(),
|
|
5
|
+
subtitle: z.string(),
|
|
6
|
+
type: z.literal('album'),
|
|
7
|
+
image: z.string(),
|
|
8
|
+
perma_url: z.string(),
|
|
9
|
+
explicit_content: z.string(),
|
|
10
|
+
});
|
|
11
|
+
export const SaavnAlbumBase = SaavnAlbumCore.extend({
|
|
12
|
+
header_desc: z.string(),
|
|
13
|
+
language: z.string(),
|
|
14
|
+
year: z.string(),
|
|
15
|
+
play_count: z.string(),
|
|
16
|
+
});
|
|
17
|
+
export const SaavnArtistAlbumBase = SaavnAlbumBase.extend({
|
|
18
|
+
more_info: z.looseObject({
|
|
19
|
+
song_count: z.string(),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
export const SaavnArtistBase = z.looseObject({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
name: z.string(),
|
|
25
|
+
role: z.string(),
|
|
26
|
+
image: z.string(),
|
|
27
|
+
type: z.literal('artist'),
|
|
28
|
+
perma_url: z.string(),
|
|
29
|
+
});
|
|
30
|
+
export const SaavnArtistMap = z.looseObject({
|
|
31
|
+
primary_artists: z.array(SaavnArtistBase),
|
|
32
|
+
featured_artists: z.array(SaavnArtistBase),
|
|
33
|
+
artists: z.array(SaavnArtistBase),
|
|
34
|
+
});
|
|
35
|
+
export const SaavnPlaylistBase = z.looseObject({
|
|
36
|
+
id: z.string(),
|
|
37
|
+
title: z.string(),
|
|
38
|
+
subtitle: z.string(),
|
|
39
|
+
type: z.literal('playlist'),
|
|
40
|
+
image: z.string(),
|
|
41
|
+
perma_url: z.string(),
|
|
42
|
+
explicit_content: z.string(),
|
|
43
|
+
});
|
|
44
|
+
export const SaavnSongCore = z.looseObject({
|
|
45
|
+
id: z.string(),
|
|
46
|
+
title: z.string(),
|
|
47
|
+
subtitle: z.string(),
|
|
48
|
+
type: z.literal('song'),
|
|
49
|
+
perma_url: z.string(),
|
|
50
|
+
image: z.string(),
|
|
51
|
+
explicit_content: z.string(),
|
|
52
|
+
});
|
|
53
|
+
export const SaavnSongBase = SaavnSongCore.extend({
|
|
54
|
+
header_desc: z.string(),
|
|
55
|
+
language: z.string(),
|
|
56
|
+
year: z.string(),
|
|
57
|
+
play_count: z.union([z.string(), z.number()]),
|
|
58
|
+
});
|
|
59
|
+
export const SaavnTrendingBase = z.looseObject({
|
|
60
|
+
id: z.string(),
|
|
61
|
+
title: z.string(),
|
|
62
|
+
subtitle: z.string(),
|
|
63
|
+
header_desc: z.string(),
|
|
64
|
+
type: z.union([z.literal('album'), z.literal('playlist'), z.literal('song')]),
|
|
65
|
+
perma_url: z.string(),
|
|
66
|
+
image: z.string(),
|
|
67
|
+
language: z.string(),
|
|
68
|
+
year: z.string(),
|
|
69
|
+
play_count: z.string(),
|
|
70
|
+
explicit_content: z.string(),
|
|
71
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SaavnAlbumEdgeCase: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
subtitle: z.ZodString;
|
|
6
|
+
type: z.ZodLiteral<"album">;
|
|
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
|
+
more_info: z.ZodObject<{
|
|
15
|
+
query: z.ZodString;
|
|
16
|
+
text: z.ZodString;
|
|
17
|
+
music: z.ZodNullable<z.ZodString>;
|
|
18
|
+
song_count: z.ZodString;
|
|
19
|
+
artistMap: z.ZodObject<{
|
|
20
|
+
primary_artists: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
role: z.ZodString;
|
|
24
|
+
image: z.ZodString;
|
|
25
|
+
type: z.ZodLiteral<"artist">;
|
|
26
|
+
perma_url: z.ZodString;
|
|
27
|
+
}, z.core.$loose>>;
|
|
28
|
+
featured_artists: z.ZodArray<z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
role: z.ZodString;
|
|
32
|
+
image: z.ZodString;
|
|
33
|
+
type: z.ZodLiteral<"artist">;
|
|
34
|
+
perma_url: z.ZodString;
|
|
35
|
+
}, z.core.$loose>>;
|
|
36
|
+
artists: z.ZodArray<z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
role: z.ZodString;
|
|
40
|
+
image: z.ZodString;
|
|
41
|
+
type: z.ZodLiteral<"artist">;
|
|
42
|
+
perma_url: z.ZodString;
|
|
43
|
+
}, z.core.$loose>>;
|
|
44
|
+
}, z.core.$loose>;
|
|
45
|
+
}, z.core.$loose>;
|
|
46
|
+
}, z.core.$loose>;
|
|
47
|
+
export declare const SaavnPlaylistEdgeCase: z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
title: z.ZodString;
|
|
50
|
+
subtitle: z.ZodString;
|
|
51
|
+
type: z.ZodLiteral<"playlist">;
|
|
52
|
+
image: z.ZodString;
|
|
53
|
+
perma_url: z.ZodString;
|
|
54
|
+
explicit_content: z.ZodString;
|
|
55
|
+
more_info: z.ZodObject<{
|
|
56
|
+
firstname: z.ZodString;
|
|
57
|
+
lastname: z.ZodOptional<z.ZodString>;
|
|
58
|
+
artist_name: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
59
|
+
entity_type: z.ZodString;
|
|
60
|
+
is_dolby_content: z.ZodNullable<z.ZodBoolean>;
|
|
61
|
+
language: z.ZodString;
|
|
62
|
+
uid: z.ZodString;
|
|
63
|
+
song_count: z.ZodString;
|
|
64
|
+
}, z.core.$loose>;
|
|
65
|
+
}, z.core.$loose>;
|
|
66
|
+
export declare const SaavnSearchAlbumEntity: z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
title: z.ZodString;
|
|
69
|
+
subtitle: z.ZodString;
|
|
70
|
+
type: z.ZodLiteral<"album">;
|
|
71
|
+
image: z.ZodString;
|
|
72
|
+
perma_url: z.ZodString;
|
|
73
|
+
explicit_content: z.ZodString;
|
|
74
|
+
description: z.ZodString;
|
|
75
|
+
more_info: z.ZodObject<{
|
|
76
|
+
music: z.ZodNullable<z.ZodString>;
|
|
77
|
+
ctr: z.ZodNumber;
|
|
78
|
+
year: z.ZodString;
|
|
79
|
+
language: z.ZodString;
|
|
80
|
+
song_pids: z.ZodString;
|
|
81
|
+
}, z.core.$loose>;
|
|
82
|
+
}, z.core.$loose>;
|
|
83
|
+
export declare const SaavnTopSearchesEntity: z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
title: z.ZodString;
|
|
86
|
+
subtitle: z.ZodString;
|
|
87
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"album">, z.ZodLiteral<"artist">, z.ZodLiteral<"song">]>;
|
|
88
|
+
image: z.ZodString;
|
|
89
|
+
perma_url: z.ZodString;
|
|
90
|
+
explicit_content: z.ZodString;
|
|
91
|
+
more_info: z.ZodObject<{
|
|
92
|
+
album: z.ZodString;
|
|
93
|
+
artistMap: 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
|
+
}, z.core.$loose>;
|
|
102
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SaavnAlbumBase, SaavnAlbumCore, SaavnArtistBase, SaavnArtistMap, } from './base';
|
|
3
|
+
import { SaavnPlaylistSearchEntity } from './playlist.entity';
|
|
4
|
+
export const SaavnAlbumEdgeCase = SaavnAlbumBase.extend({
|
|
5
|
+
more_info: z.looseObject({
|
|
6
|
+
query: z.string(),
|
|
7
|
+
text: z.string(),
|
|
8
|
+
music: z.string().nullable(),
|
|
9
|
+
song_count: z.string(),
|
|
10
|
+
artistMap: SaavnArtistMap,
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
export const SaavnPlaylistEdgeCase = SaavnPlaylistSearchEntity.omit({
|
|
14
|
+
description: true,
|
|
15
|
+
}).extend({
|
|
16
|
+
more_info: SaavnPlaylistSearchEntity.shape.more_info.extend({
|
|
17
|
+
uid: z.string(),
|
|
18
|
+
song_count: z.string(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
export const SaavnSearchAlbumEntity = SaavnAlbumCore.extend({
|
|
22
|
+
description: z.string(),
|
|
23
|
+
more_info: z.looseObject({
|
|
24
|
+
music: z.string().nullable(),
|
|
25
|
+
ctr: z.number(),
|
|
26
|
+
year: z.string(),
|
|
27
|
+
language: z.string(),
|
|
28
|
+
song_pids: z.string(),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
export const SaavnTopSearchesEntity = z.looseObject({
|
|
32
|
+
id: z.string(),
|
|
33
|
+
title: z.string(),
|
|
34
|
+
subtitle: z.string(),
|
|
35
|
+
type: z.union([z.literal('album'), z.literal('artist'), z.literal('song')]),
|
|
36
|
+
image: z.string(),
|
|
37
|
+
perma_url: z.string(),
|
|
38
|
+
explicit_content: z.string(),
|
|
39
|
+
more_info: z.looseObject({
|
|
40
|
+
album: z.string(),
|
|
41
|
+
artistMap: z.array(SaavnArtistBase),
|
|
42
|
+
}),
|
|
43
|
+
});
|