@audius/sdk 3.0.8-beta.4 → 3.0.8-beta.5
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/.nvmrc +1 -1
- package/dist/AudiusLibs.d.ts +3 -1
- package/dist/index.cjs.js +348 -248
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +348 -248
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +348 -248
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +313 -230
- package/dist/native-libs.js.map +1 -1
- package/dist/sdk/api/albums/types.d.ts +36 -36
- package/dist/sdk/api/playlists/types.d.ts +82 -82
- package/dist/sdk/api/tracks/TrackUploadHelper.d.ts +6 -6
- package/dist/services/discoveryProvider/DiscoveryProvider.d.ts +14 -0
- package/dist/services/web3Manager/Web3Manager.d.ts +5 -1
- package/dist/web-libs.js +313 -230
- package/dist/web-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/AudiusLibs.ts +15 -1
- package/src/services/discoveryProvider/DiscoveryProvider.ts +21 -0
- package/src/services/web3Manager/Web3Manager.ts +41 -11
|
@@ -101,7 +101,11 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
101
101
|
* Track metadata is populated from the album if fields are missing
|
|
102
102
|
*/
|
|
103
103
|
trackMetadatas: z.ZodArray<z.ZodObject<{
|
|
104
|
+
mood: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>>;
|
|
105
|
+
genre: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodEnum<[Genre, ...Genre[]]>>, Genre | null, Genre | null>>;
|
|
104
106
|
description: z.ZodOptional<z.ZodString>;
|
|
107
|
+
title: z.ZodString;
|
|
108
|
+
aiAttributionUserId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
105
109
|
download: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
106
110
|
cid: z.ZodString;
|
|
107
111
|
isDownloadable: z.ZodBoolean;
|
|
@@ -115,14 +119,6 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
115
119
|
isDownloadable: boolean;
|
|
116
120
|
requiresFollow: boolean;
|
|
117
121
|
}>>>;
|
|
118
|
-
genre: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodEnum<[Genre, ...Genre[]]>>, Genre | null, Genre | null>>;
|
|
119
|
-
isrc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
-
iswc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
-
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
-
mood: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>>;
|
|
123
|
-
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
124
|
-
title: z.ZodString;
|
|
125
|
-
aiAttributionUserId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
126
122
|
fieldVisibility: z.ZodOptional<z.ZodObject<{
|
|
127
123
|
mood: z.ZodOptional<z.ZodBoolean>;
|
|
128
124
|
tags: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -145,8 +141,12 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
145
141
|
playCount?: boolean | undefined;
|
|
146
142
|
remixes?: boolean | undefined;
|
|
147
143
|
}>>;
|
|
144
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
148
145
|
isPremium: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
isrc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
147
|
isUnlisted: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
iswc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
150
|
premiumConditions: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
151
151
|
chain: z.ZodLiteral<"eth">;
|
|
152
152
|
address: z.ZodString;
|
|
@@ -225,19 +225,15 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
225
225
|
previewCid: z.ZodOptional<z.ZodString>;
|
|
226
226
|
}, "strip", z.ZodTypeAny, {
|
|
227
227
|
title: string;
|
|
228
|
+
mood?: Mood | null | undefined;
|
|
229
|
+
genre?: Genre | null | undefined;
|
|
228
230
|
description?: string | undefined;
|
|
231
|
+
aiAttributionUserId?: number | undefined;
|
|
229
232
|
download?: {
|
|
230
233
|
cid: string;
|
|
231
234
|
isDownloadable: boolean;
|
|
232
235
|
requiresFollow: boolean;
|
|
233
236
|
} | null | undefined;
|
|
234
|
-
genre?: Genre | null | undefined;
|
|
235
|
-
isrc?: string | null | undefined;
|
|
236
|
-
iswc?: string | null | undefined;
|
|
237
|
-
license?: string | null | undefined;
|
|
238
|
-
mood?: Mood | null | undefined;
|
|
239
|
-
tags?: string | undefined;
|
|
240
|
-
aiAttributionUserId?: number | undefined;
|
|
241
237
|
fieldVisibility?: {
|
|
242
238
|
mood?: boolean | undefined;
|
|
243
239
|
tags?: boolean | undefined;
|
|
@@ -246,8 +242,12 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
246
242
|
playCount?: boolean | undefined;
|
|
247
243
|
remixes?: boolean | undefined;
|
|
248
244
|
} | undefined;
|
|
245
|
+
tags?: string | undefined;
|
|
249
246
|
isPremium?: boolean | undefined;
|
|
247
|
+
isrc?: string | null | undefined;
|
|
250
248
|
isUnlisted?: boolean | undefined;
|
|
249
|
+
iswc?: string | null | undefined;
|
|
250
|
+
license?: string | null | undefined;
|
|
251
251
|
premiumConditions?: {
|
|
252
252
|
address: string;
|
|
253
253
|
name: string;
|
|
@@ -278,19 +278,15 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
278
278
|
previewCid?: string | undefined;
|
|
279
279
|
}, {
|
|
280
280
|
title: string;
|
|
281
|
+
mood?: Mood | null | undefined;
|
|
282
|
+
genre?: Genre | null | undefined;
|
|
281
283
|
description?: string | undefined;
|
|
284
|
+
aiAttributionUserId?: string | undefined;
|
|
282
285
|
download?: {
|
|
283
286
|
cid: string;
|
|
284
287
|
isDownloadable: boolean;
|
|
285
288
|
requiresFollow: boolean;
|
|
286
289
|
} | null | undefined;
|
|
287
|
-
genre?: Genre | null | undefined;
|
|
288
|
-
isrc?: string | null | undefined;
|
|
289
|
-
iswc?: string | null | undefined;
|
|
290
|
-
license?: string | null | undefined;
|
|
291
|
-
mood?: Mood | null | undefined;
|
|
292
|
-
tags?: string | undefined;
|
|
293
|
-
aiAttributionUserId?: string | undefined;
|
|
294
290
|
fieldVisibility?: {
|
|
295
291
|
mood?: boolean | undefined;
|
|
296
292
|
tags?: boolean | undefined;
|
|
@@ -299,8 +295,12 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
299
295
|
playCount?: boolean | undefined;
|
|
300
296
|
remixes?: boolean | undefined;
|
|
301
297
|
} | undefined;
|
|
298
|
+
tags?: string | undefined;
|
|
302
299
|
isPremium?: boolean | undefined;
|
|
300
|
+
isrc?: string | null | undefined;
|
|
303
301
|
isUnlisted?: boolean | undefined;
|
|
302
|
+
iswc?: string | null | undefined;
|
|
303
|
+
license?: string | null | undefined;
|
|
304
304
|
premiumConditions?: {
|
|
305
305
|
address: string;
|
|
306
306
|
name: string;
|
|
@@ -367,19 +367,15 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
367
367
|
} | undefined);
|
|
368
368
|
trackMetadatas: {
|
|
369
369
|
title: string;
|
|
370
|
+
mood?: Mood | null | undefined;
|
|
371
|
+
genre?: Genre | null | undefined;
|
|
370
372
|
description?: string | undefined;
|
|
373
|
+
aiAttributionUserId?: number | undefined;
|
|
371
374
|
download?: {
|
|
372
375
|
cid: string;
|
|
373
376
|
isDownloadable: boolean;
|
|
374
377
|
requiresFollow: boolean;
|
|
375
378
|
} | null | undefined;
|
|
376
|
-
genre?: Genre | null | undefined;
|
|
377
|
-
isrc?: string | null | undefined;
|
|
378
|
-
iswc?: string | null | undefined;
|
|
379
|
-
license?: string | null | undefined;
|
|
380
|
-
mood?: Mood | null | undefined;
|
|
381
|
-
tags?: string | undefined;
|
|
382
|
-
aiAttributionUserId?: number | undefined;
|
|
383
379
|
fieldVisibility?: {
|
|
384
380
|
mood?: boolean | undefined;
|
|
385
381
|
tags?: boolean | undefined;
|
|
@@ -388,8 +384,12 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
388
384
|
playCount?: boolean | undefined;
|
|
389
385
|
remixes?: boolean | undefined;
|
|
390
386
|
} | undefined;
|
|
387
|
+
tags?: string | undefined;
|
|
391
388
|
isPremium?: boolean | undefined;
|
|
389
|
+
isrc?: string | null | undefined;
|
|
392
390
|
isUnlisted?: boolean | undefined;
|
|
391
|
+
iswc?: string | null | undefined;
|
|
392
|
+
license?: string | null | undefined;
|
|
393
393
|
premiumConditions?: {
|
|
394
394
|
address: string;
|
|
395
395
|
name: string;
|
|
@@ -445,19 +445,15 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
445
445
|
} | undefined);
|
|
446
446
|
trackMetadatas: {
|
|
447
447
|
title: string;
|
|
448
|
+
mood?: Mood | null | undefined;
|
|
449
|
+
genre?: Genre | null | undefined;
|
|
448
450
|
description?: string | undefined;
|
|
451
|
+
aiAttributionUserId?: string | undefined;
|
|
449
452
|
download?: {
|
|
450
453
|
cid: string;
|
|
451
454
|
isDownloadable: boolean;
|
|
452
455
|
requiresFollow: boolean;
|
|
453
456
|
} | null | undefined;
|
|
454
|
-
genre?: Genre | null | undefined;
|
|
455
|
-
isrc?: string | null | undefined;
|
|
456
|
-
iswc?: string | null | undefined;
|
|
457
|
-
license?: string | null | undefined;
|
|
458
|
-
mood?: Mood | null | undefined;
|
|
459
|
-
tags?: string | undefined;
|
|
460
|
-
aiAttributionUserId?: string | undefined;
|
|
461
457
|
fieldVisibility?: {
|
|
462
458
|
mood?: boolean | undefined;
|
|
463
459
|
tags?: boolean | undefined;
|
|
@@ -466,8 +462,12 @@ export declare const createUploadAlbumSchema: () => z.ZodObject<{
|
|
|
466
462
|
playCount?: boolean | undefined;
|
|
467
463
|
remixes?: boolean | undefined;
|
|
468
464
|
} | undefined;
|
|
465
|
+
tags?: string | undefined;
|
|
469
466
|
isPremium?: boolean | undefined;
|
|
467
|
+
isrc?: string | null | undefined;
|
|
470
468
|
isUnlisted?: boolean | undefined;
|
|
469
|
+
iswc?: string | null | undefined;
|
|
470
|
+
license?: string | null | undefined;
|
|
471
471
|
premiumConditions?: {
|
|
472
472
|
address: string;
|
|
473
473
|
name: string;
|
|
@@ -64,11 +64,11 @@ export declare const CreatePlaylistSchema: z.ZodObject<{
|
|
|
64
64
|
}>;
|
|
65
65
|
export declare type CreatePlaylistRequest = z.input<typeof CreatePlaylistSchema>;
|
|
66
66
|
export declare const createUpdatePlaylistMetadataSchema: () => z.ZodObject<{
|
|
67
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
68
|
-
genre: z.ZodOptional<z.ZodEnum<[Genre, ...Genre[]]>>;
|
|
69
|
-
license: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
70
67
|
mood: z.ZodOptional<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>;
|
|
68
|
+
genre: z.ZodOptional<z.ZodEnum<[Genre, ...Genre[]]>>;
|
|
69
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
71
70
|
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
71
|
+
license: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
72
72
|
releaseDate: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
|
|
73
73
|
playlistName: z.ZodOptional<z.ZodString>;
|
|
74
74
|
upc: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -87,11 +87,11 @@ export declare const createUpdatePlaylistMetadataSchema: () => z.ZodObject<{
|
|
|
87
87
|
metadataTimestamp?: number | undefined;
|
|
88
88
|
}>, "many">>;
|
|
89
89
|
}, "strict", z.ZodTypeAny, {
|
|
90
|
-
description?: string | undefined;
|
|
91
|
-
genre?: Genre | undefined;
|
|
92
|
-
license?: string | undefined;
|
|
93
90
|
mood?: Mood | undefined;
|
|
91
|
+
genre?: Genre | undefined;
|
|
92
|
+
description?: string | undefined;
|
|
94
93
|
tags?: string | undefined;
|
|
94
|
+
license?: string | undefined;
|
|
95
95
|
releaseDate?: Date | undefined;
|
|
96
96
|
playlistName?: string | undefined;
|
|
97
97
|
upc?: string | undefined;
|
|
@@ -102,11 +102,11 @@ export declare const createUpdatePlaylistMetadataSchema: () => z.ZodObject<{
|
|
|
102
102
|
metadataTimestamp?: number | undefined;
|
|
103
103
|
}[] | undefined;
|
|
104
104
|
}, {
|
|
105
|
-
description?: string | undefined;
|
|
106
|
-
genre?: Genre | undefined;
|
|
107
|
-
license?: string | undefined;
|
|
108
105
|
mood?: Mood | undefined;
|
|
106
|
+
genre?: Genre | undefined;
|
|
107
|
+
description?: string | undefined;
|
|
109
108
|
tags?: string | undefined;
|
|
109
|
+
license?: string | undefined;
|
|
110
110
|
releaseDate?: Date | undefined;
|
|
111
111
|
playlistName?: string | undefined;
|
|
112
112
|
upc?: string | undefined;
|
|
@@ -137,11 +137,11 @@ export declare const createUpdatePlaylistSchema: () => z.ZodObject<{
|
|
|
137
137
|
name?: string | undefined;
|
|
138
138
|
}>>;
|
|
139
139
|
metadata: z.ZodObject<{
|
|
140
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
141
|
-
genre: z.ZodOptional<z.ZodEnum<[Genre, ...Genre[]]>>;
|
|
142
|
-
license: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
143
140
|
mood: z.ZodOptional<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>;
|
|
141
|
+
genre: z.ZodOptional<z.ZodEnum<[Genre, ...Genre[]]>>;
|
|
142
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
144
143
|
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
144
|
+
license: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
145
145
|
releaseDate: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
|
|
146
146
|
playlistName: z.ZodOptional<z.ZodString>;
|
|
147
147
|
upc: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -160,11 +160,11 @@ export declare const createUpdatePlaylistSchema: () => z.ZodObject<{
|
|
|
160
160
|
metadataTimestamp?: number | undefined;
|
|
161
161
|
}>, "many">>;
|
|
162
162
|
}, "strict", z.ZodTypeAny, {
|
|
163
|
-
description?: string | undefined;
|
|
164
|
-
genre?: Genre | undefined;
|
|
165
|
-
license?: string | undefined;
|
|
166
163
|
mood?: Mood | undefined;
|
|
164
|
+
genre?: Genre | undefined;
|
|
165
|
+
description?: string | undefined;
|
|
167
166
|
tags?: string | undefined;
|
|
167
|
+
license?: string | undefined;
|
|
168
168
|
releaseDate?: Date | undefined;
|
|
169
169
|
playlistName?: string | undefined;
|
|
170
170
|
upc?: string | undefined;
|
|
@@ -175,11 +175,11 @@ export declare const createUpdatePlaylistSchema: () => z.ZodObject<{
|
|
|
175
175
|
metadataTimestamp?: number | undefined;
|
|
176
176
|
}[] | undefined;
|
|
177
177
|
}, {
|
|
178
|
-
description?: string | undefined;
|
|
179
|
-
genre?: Genre | undefined;
|
|
180
|
-
license?: string | undefined;
|
|
181
178
|
mood?: Mood | undefined;
|
|
179
|
+
genre?: Genre | undefined;
|
|
180
|
+
description?: string | undefined;
|
|
182
181
|
tags?: string | undefined;
|
|
182
|
+
license?: string | undefined;
|
|
183
183
|
releaseDate?: Date | undefined;
|
|
184
184
|
playlistName?: string | undefined;
|
|
185
185
|
upc?: string | undefined;
|
|
@@ -194,11 +194,11 @@ export declare const createUpdatePlaylistSchema: () => z.ZodObject<{
|
|
|
194
194
|
}, "strict", z.ZodTypeAny, {
|
|
195
195
|
userId: number;
|
|
196
196
|
metadata: {
|
|
197
|
-
description?: string | undefined;
|
|
198
|
-
genre?: Genre | undefined;
|
|
199
|
-
license?: string | undefined;
|
|
200
197
|
mood?: Mood | undefined;
|
|
198
|
+
genre?: Genre | undefined;
|
|
199
|
+
description?: string | undefined;
|
|
201
200
|
tags?: string | undefined;
|
|
201
|
+
license?: string | undefined;
|
|
202
202
|
releaseDate?: Date | undefined;
|
|
203
203
|
playlistName?: string | undefined;
|
|
204
204
|
upc?: string | undefined;
|
|
@@ -218,11 +218,11 @@ export declare const createUpdatePlaylistSchema: () => z.ZodObject<{
|
|
|
218
218
|
}, {
|
|
219
219
|
userId: string;
|
|
220
220
|
metadata: {
|
|
221
|
-
description?: string | undefined;
|
|
222
|
-
genre?: Genre | undefined;
|
|
223
|
-
license?: string | undefined;
|
|
224
221
|
mood?: Mood | undefined;
|
|
222
|
+
genre?: Genre | undefined;
|
|
223
|
+
description?: string | undefined;
|
|
225
224
|
tags?: string | undefined;
|
|
225
|
+
license?: string | undefined;
|
|
226
226
|
releaseDate?: Date | undefined;
|
|
227
227
|
playlistName?: string | undefined;
|
|
228
228
|
upc?: string | undefined;
|
|
@@ -271,7 +271,11 @@ declare const createUploadPlaylistMetadataSchema: () => z.ZodObject<{
|
|
|
271
271
|
}>;
|
|
272
272
|
export declare type PlaylistMetadata = z.input<ReturnType<typeof createUploadPlaylistMetadataSchema>>;
|
|
273
273
|
declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
274
|
+
mood: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>>;
|
|
275
|
+
genre: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodEnum<[Genre, ...Genre[]]>>, Genre | null, Genre | null>>;
|
|
274
276
|
description: z.ZodOptional<z.ZodString>;
|
|
277
|
+
title: z.ZodString;
|
|
278
|
+
aiAttributionUserId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
275
279
|
download: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
276
280
|
cid: z.ZodString;
|
|
277
281
|
isDownloadable: z.ZodBoolean;
|
|
@@ -285,14 +289,6 @@ declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
|
285
289
|
isDownloadable: boolean;
|
|
286
290
|
requiresFollow: boolean;
|
|
287
291
|
}>>>;
|
|
288
|
-
genre: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodEnum<[Genre, ...Genre[]]>>, Genre | null, Genre | null>>;
|
|
289
|
-
isrc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
290
|
-
iswc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
291
|
-
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
|
-
mood: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>>;
|
|
293
|
-
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
294
|
-
title: z.ZodString;
|
|
295
|
-
aiAttributionUserId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
296
292
|
fieldVisibility: z.ZodOptional<z.ZodObject<{
|
|
297
293
|
mood: z.ZodOptional<z.ZodBoolean>;
|
|
298
294
|
tags: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -315,8 +311,12 @@ declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
|
315
311
|
playCount?: boolean | undefined;
|
|
316
312
|
remixes?: boolean | undefined;
|
|
317
313
|
}>>;
|
|
314
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
318
315
|
isPremium: z.ZodOptional<z.ZodBoolean>;
|
|
316
|
+
isrc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
319
317
|
isUnlisted: z.ZodOptional<z.ZodBoolean>;
|
|
318
|
+
iswc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
319
|
+
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
320
320
|
premiumConditions: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
321
321
|
chain: z.ZodLiteral<"eth">;
|
|
322
322
|
address: z.ZodString;
|
|
@@ -395,19 +395,15 @@ declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
|
395
395
|
previewCid: z.ZodOptional<z.ZodString>;
|
|
396
396
|
}, "strip", z.ZodTypeAny, {
|
|
397
397
|
title: string;
|
|
398
|
+
mood?: Mood | null | undefined;
|
|
399
|
+
genre?: Genre | null | undefined;
|
|
398
400
|
description?: string | undefined;
|
|
401
|
+
aiAttributionUserId?: number | undefined;
|
|
399
402
|
download?: {
|
|
400
403
|
cid: string;
|
|
401
404
|
isDownloadable: boolean;
|
|
402
405
|
requiresFollow: boolean;
|
|
403
406
|
} | null | undefined;
|
|
404
|
-
genre?: Genre | null | undefined;
|
|
405
|
-
isrc?: string | null | undefined;
|
|
406
|
-
iswc?: string | null | undefined;
|
|
407
|
-
license?: string | null | undefined;
|
|
408
|
-
mood?: Mood | null | undefined;
|
|
409
|
-
tags?: string | undefined;
|
|
410
|
-
aiAttributionUserId?: number | undefined;
|
|
411
407
|
fieldVisibility?: {
|
|
412
408
|
mood?: boolean | undefined;
|
|
413
409
|
tags?: boolean | undefined;
|
|
@@ -416,8 +412,12 @@ declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
|
416
412
|
playCount?: boolean | undefined;
|
|
417
413
|
remixes?: boolean | undefined;
|
|
418
414
|
} | undefined;
|
|
415
|
+
tags?: string | undefined;
|
|
419
416
|
isPremium?: boolean | undefined;
|
|
417
|
+
isrc?: string | null | undefined;
|
|
420
418
|
isUnlisted?: boolean | undefined;
|
|
419
|
+
iswc?: string | null | undefined;
|
|
420
|
+
license?: string | null | undefined;
|
|
421
421
|
premiumConditions?: {
|
|
422
422
|
address: string;
|
|
423
423
|
name: string;
|
|
@@ -448,19 +448,15 @@ declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
|
448
448
|
previewCid?: string | undefined;
|
|
449
449
|
}, {
|
|
450
450
|
title: string;
|
|
451
|
+
mood?: Mood | null | undefined;
|
|
452
|
+
genre?: Genre | null | undefined;
|
|
451
453
|
description?: string | undefined;
|
|
454
|
+
aiAttributionUserId?: string | undefined;
|
|
452
455
|
download?: {
|
|
453
456
|
cid: string;
|
|
454
457
|
isDownloadable: boolean;
|
|
455
458
|
requiresFollow: boolean;
|
|
456
459
|
} | null | undefined;
|
|
457
|
-
genre?: Genre | null | undefined;
|
|
458
|
-
isrc?: string | null | undefined;
|
|
459
|
-
iswc?: string | null | undefined;
|
|
460
|
-
license?: string | null | undefined;
|
|
461
|
-
mood?: Mood | null | undefined;
|
|
462
|
-
tags?: string | undefined;
|
|
463
|
-
aiAttributionUserId?: string | undefined;
|
|
464
460
|
fieldVisibility?: {
|
|
465
461
|
mood?: boolean | undefined;
|
|
466
462
|
tags?: boolean | undefined;
|
|
@@ -469,8 +465,12 @@ declare const createPlaylistTrackMetadataSchema: () => z.ZodObject<{
|
|
|
469
465
|
playCount?: boolean | undefined;
|
|
470
466
|
remixes?: boolean | undefined;
|
|
471
467
|
} | undefined;
|
|
468
|
+
tags?: string | undefined;
|
|
472
469
|
isPremium?: boolean | undefined;
|
|
470
|
+
isrc?: string | null | undefined;
|
|
473
471
|
isUnlisted?: boolean | undefined;
|
|
472
|
+
iswc?: string | null | undefined;
|
|
473
|
+
license?: string | null | undefined;
|
|
474
474
|
premiumConditions?: {
|
|
475
475
|
address: string;
|
|
476
476
|
name: string;
|
|
@@ -556,7 +556,11 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
556
556
|
* Track metadata is populated from the playlist if fields are missing
|
|
557
557
|
*/
|
|
558
558
|
trackMetadatas: z.ZodArray<z.ZodObject<{
|
|
559
|
+
mood: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>>;
|
|
560
|
+
genre: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodEnum<[Genre, ...Genre[]]>>, Genre | null, Genre | null>>;
|
|
559
561
|
description: z.ZodOptional<z.ZodString>;
|
|
562
|
+
title: z.ZodString;
|
|
563
|
+
aiAttributionUserId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
560
564
|
download: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
561
565
|
cid: z.ZodString;
|
|
562
566
|
isDownloadable: z.ZodBoolean;
|
|
@@ -570,14 +574,6 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
570
574
|
isDownloadable: boolean;
|
|
571
575
|
requiresFollow: boolean;
|
|
572
576
|
}>>>;
|
|
573
|
-
genre: z.ZodOptional<z.ZodEffects<z.ZodNullable<z.ZodEnum<[Genre, ...Genre[]]>>, Genre | null, Genre | null>>;
|
|
574
|
-
isrc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
575
|
-
iswc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
576
|
-
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
577
|
-
mood: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<[Mood, ...Mood[]]>>>>;
|
|
578
|
-
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
579
|
-
title: z.ZodString;
|
|
580
|
-
aiAttributionUserId: z.ZodOptional<z.ZodEffects<z.ZodString, number, string>>;
|
|
581
577
|
fieldVisibility: z.ZodOptional<z.ZodObject<{
|
|
582
578
|
mood: z.ZodOptional<z.ZodBoolean>;
|
|
583
579
|
tags: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -600,8 +596,12 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
600
596
|
playCount?: boolean | undefined;
|
|
601
597
|
remixes?: boolean | undefined;
|
|
602
598
|
}>>;
|
|
599
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
603
600
|
isPremium: z.ZodOptional<z.ZodBoolean>;
|
|
601
|
+
isrc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
604
602
|
isUnlisted: z.ZodOptional<z.ZodBoolean>;
|
|
603
|
+
iswc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
604
|
+
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
605
605
|
premiumConditions: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
606
606
|
chain: z.ZodLiteral<"eth">;
|
|
607
607
|
address: z.ZodString;
|
|
@@ -680,19 +680,15 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
680
680
|
previewCid: z.ZodOptional<z.ZodString>;
|
|
681
681
|
}, "strip", z.ZodTypeAny, {
|
|
682
682
|
title: string;
|
|
683
|
+
mood?: Mood | null | undefined;
|
|
684
|
+
genre?: Genre | null | undefined;
|
|
683
685
|
description?: string | undefined;
|
|
686
|
+
aiAttributionUserId?: number | undefined;
|
|
684
687
|
download?: {
|
|
685
688
|
cid: string;
|
|
686
689
|
isDownloadable: boolean;
|
|
687
690
|
requiresFollow: boolean;
|
|
688
691
|
} | null | undefined;
|
|
689
|
-
genre?: Genre | null | undefined;
|
|
690
|
-
isrc?: string | null | undefined;
|
|
691
|
-
iswc?: string | null | undefined;
|
|
692
|
-
license?: string | null | undefined;
|
|
693
|
-
mood?: Mood | null | undefined;
|
|
694
|
-
tags?: string | undefined;
|
|
695
|
-
aiAttributionUserId?: number | undefined;
|
|
696
692
|
fieldVisibility?: {
|
|
697
693
|
mood?: boolean | undefined;
|
|
698
694
|
tags?: boolean | undefined;
|
|
@@ -701,8 +697,12 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
701
697
|
playCount?: boolean | undefined;
|
|
702
698
|
remixes?: boolean | undefined;
|
|
703
699
|
} | undefined;
|
|
700
|
+
tags?: string | undefined;
|
|
704
701
|
isPremium?: boolean | undefined;
|
|
702
|
+
isrc?: string | null | undefined;
|
|
705
703
|
isUnlisted?: boolean | undefined;
|
|
704
|
+
iswc?: string | null | undefined;
|
|
705
|
+
license?: string | null | undefined;
|
|
706
706
|
premiumConditions?: {
|
|
707
707
|
address: string;
|
|
708
708
|
name: string;
|
|
@@ -733,19 +733,15 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
733
733
|
previewCid?: string | undefined;
|
|
734
734
|
}, {
|
|
735
735
|
title: string;
|
|
736
|
+
mood?: Mood | null | undefined;
|
|
737
|
+
genre?: Genre | null | undefined;
|
|
736
738
|
description?: string | undefined;
|
|
739
|
+
aiAttributionUserId?: string | undefined;
|
|
737
740
|
download?: {
|
|
738
741
|
cid: string;
|
|
739
742
|
isDownloadable: boolean;
|
|
740
743
|
requiresFollow: boolean;
|
|
741
744
|
} | null | undefined;
|
|
742
|
-
genre?: Genre | null | undefined;
|
|
743
|
-
isrc?: string | null | undefined;
|
|
744
|
-
iswc?: string | null | undefined;
|
|
745
|
-
license?: string | null | undefined;
|
|
746
|
-
mood?: Mood | null | undefined;
|
|
747
|
-
tags?: string | undefined;
|
|
748
|
-
aiAttributionUserId?: string | undefined;
|
|
749
745
|
fieldVisibility?: {
|
|
750
746
|
mood?: boolean | undefined;
|
|
751
747
|
tags?: boolean | undefined;
|
|
@@ -754,8 +750,12 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
754
750
|
playCount?: boolean | undefined;
|
|
755
751
|
remixes?: boolean | undefined;
|
|
756
752
|
} | undefined;
|
|
753
|
+
tags?: string | undefined;
|
|
757
754
|
isPremium?: boolean | undefined;
|
|
755
|
+
isrc?: string | null | undefined;
|
|
758
756
|
isUnlisted?: boolean | undefined;
|
|
757
|
+
iswc?: string | null | undefined;
|
|
758
|
+
license?: string | null | undefined;
|
|
759
759
|
premiumConditions?: {
|
|
760
760
|
address: string;
|
|
761
761
|
name: string;
|
|
@@ -822,19 +822,15 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
822
822
|
} | undefined);
|
|
823
823
|
trackMetadatas: {
|
|
824
824
|
title: string;
|
|
825
|
+
mood?: Mood | null | undefined;
|
|
826
|
+
genre?: Genre | null | undefined;
|
|
825
827
|
description?: string | undefined;
|
|
828
|
+
aiAttributionUserId?: number | undefined;
|
|
826
829
|
download?: {
|
|
827
830
|
cid: string;
|
|
828
831
|
isDownloadable: boolean;
|
|
829
832
|
requiresFollow: boolean;
|
|
830
833
|
} | null | undefined;
|
|
831
|
-
genre?: Genre | null | undefined;
|
|
832
|
-
isrc?: string | null | undefined;
|
|
833
|
-
iswc?: string | null | undefined;
|
|
834
|
-
license?: string | null | undefined;
|
|
835
|
-
mood?: Mood | null | undefined;
|
|
836
|
-
tags?: string | undefined;
|
|
837
|
-
aiAttributionUserId?: number | undefined;
|
|
838
834
|
fieldVisibility?: {
|
|
839
835
|
mood?: boolean | undefined;
|
|
840
836
|
tags?: boolean | undefined;
|
|
@@ -843,8 +839,12 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
843
839
|
playCount?: boolean | undefined;
|
|
844
840
|
remixes?: boolean | undefined;
|
|
845
841
|
} | undefined;
|
|
842
|
+
tags?: string | undefined;
|
|
846
843
|
isPremium?: boolean | undefined;
|
|
844
|
+
isrc?: string | null | undefined;
|
|
847
845
|
isUnlisted?: boolean | undefined;
|
|
846
|
+
iswc?: string | null | undefined;
|
|
847
|
+
license?: string | null | undefined;
|
|
848
848
|
premiumConditions?: {
|
|
849
849
|
address: string;
|
|
850
850
|
name: string;
|
|
@@ -900,19 +900,15 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
900
900
|
} | undefined);
|
|
901
901
|
trackMetadatas: {
|
|
902
902
|
title: string;
|
|
903
|
+
mood?: Mood | null | undefined;
|
|
904
|
+
genre?: Genre | null | undefined;
|
|
903
905
|
description?: string | undefined;
|
|
906
|
+
aiAttributionUserId?: string | undefined;
|
|
904
907
|
download?: {
|
|
905
908
|
cid: string;
|
|
906
909
|
isDownloadable: boolean;
|
|
907
910
|
requiresFollow: boolean;
|
|
908
911
|
} | null | undefined;
|
|
909
|
-
genre?: Genre | null | undefined;
|
|
910
|
-
isrc?: string | null | undefined;
|
|
911
|
-
iswc?: string | null | undefined;
|
|
912
|
-
license?: string | null | undefined;
|
|
913
|
-
mood?: Mood | null | undefined;
|
|
914
|
-
tags?: string | undefined;
|
|
915
|
-
aiAttributionUserId?: string | undefined;
|
|
916
912
|
fieldVisibility?: {
|
|
917
913
|
mood?: boolean | undefined;
|
|
918
914
|
tags?: boolean | undefined;
|
|
@@ -921,8 +917,12 @@ export declare const createUploadPlaylistSchema: () => z.ZodObject<{
|
|
|
921
917
|
playCount?: boolean | undefined;
|
|
922
918
|
remixes?: boolean | undefined;
|
|
923
919
|
} | undefined;
|
|
920
|
+
tags?: string | undefined;
|
|
924
921
|
isPremium?: boolean | undefined;
|
|
922
|
+
isrc?: string | null | undefined;
|
|
925
923
|
isUnlisted?: boolean | undefined;
|
|
924
|
+
iswc?: string | null | undefined;
|
|
925
|
+
license?: string | null | undefined;
|
|
926
926
|
premiumConditions?: {
|
|
927
927
|
address: string;
|
|
928
928
|
name: string;
|
|
@@ -19,13 +19,9 @@ export declare class TrackUploadHelper extends BaseAPI {
|
|
|
19
19
|
coverArtSizes: string;
|
|
20
20
|
duration: number;
|
|
21
21
|
title: string;
|
|
22
|
-
description?: string | undefined;
|
|
23
|
-
genre?: import("../..").Genre | null | undefined;
|
|
24
|
-
isrc?: string | null | undefined;
|
|
25
|
-
iswc?: string | null | undefined;
|
|
26
|
-
license?: string | null | undefined;
|
|
27
22
|
mood?: import("../..").Mood | null | undefined;
|
|
28
|
-
|
|
23
|
+
genre?: import("../..").Genre | null | undefined;
|
|
24
|
+
description?: string | undefined;
|
|
29
25
|
aiAttributionUserId?: number | undefined;
|
|
30
26
|
fieldVisibility?: {
|
|
31
27
|
mood?: boolean | undefined;
|
|
@@ -35,8 +31,12 @@ export declare class TrackUploadHelper extends BaseAPI {
|
|
|
35
31
|
playCount?: boolean | undefined;
|
|
36
32
|
remixes?: boolean | undefined;
|
|
37
33
|
} | undefined;
|
|
34
|
+
tags?: string | undefined;
|
|
38
35
|
isPremium?: boolean | undefined;
|
|
36
|
+
isrc?: string | null | undefined;
|
|
39
37
|
isUnlisted?: boolean | undefined;
|
|
38
|
+
iswc?: string | null | undefined;
|
|
39
|
+
license?: string | null | undefined;
|
|
40
40
|
premiumConditions?: {
|
|
41
41
|
address: string;
|
|
42
42
|
name: string;
|
|
@@ -7,6 +7,7 @@ import type { CurrentUser, UserStateManager } from '../../userStateManager';
|
|
|
7
7
|
import type { EthContracts } from '../ethContracts';
|
|
8
8
|
import type { Web3Manager } from '../web3Manager';
|
|
9
9
|
import { DiscoveryNodeSelector, Middleware } from '../../sdk';
|
|
10
|
+
import type { TransactionReceipt } from 'web3-core';
|
|
10
11
|
declare type RequestParams = {
|
|
11
12
|
queryParams: Record<string, string>;
|
|
12
13
|
endpoint: string;
|
|
@@ -60,6 +61,16 @@ export declare type UserProfile = {
|
|
|
60
61
|
sub: number;
|
|
61
62
|
iat: string;
|
|
62
63
|
};
|
|
64
|
+
export declare type DiscoveryRelayBody = {
|
|
65
|
+
contractRegistryKey?: string | null;
|
|
66
|
+
contractAddress?: string | null;
|
|
67
|
+
senderAddress?: string | null;
|
|
68
|
+
encodedABI?: string | null;
|
|
69
|
+
gasLimit?: number | null;
|
|
70
|
+
handle?: string | null;
|
|
71
|
+
nethermindContractAddress?: string | null;
|
|
72
|
+
nethermindEncodedAbi?: string | null;
|
|
73
|
+
};
|
|
63
74
|
/**
|
|
64
75
|
* Constructs a service class for a discovery node
|
|
65
76
|
* @param whitelist whether or not to only include specified nodes in selection
|
|
@@ -471,6 +482,9 @@ export declare class DiscoveryProvider {
|
|
|
471
482
|
encodedUserId: string;
|
|
472
483
|
blockNumber?: number;
|
|
473
484
|
}): Promise<Nullable<UserReplicaSet> | undefined>;
|
|
485
|
+
relay(data: DiscoveryRelayBody): Promise<{
|
|
486
|
+
receipt: TransactionReceipt;
|
|
487
|
+
} | null | undefined>;
|
|
474
488
|
/**
|
|
475
489
|
* Retrieves an unclaimed ID
|
|
476
490
|
* @return encoded ID
|
|
@@ -9,6 +9,7 @@ import type Web3Type from 'web3';
|
|
|
9
9
|
import type { HttpProvider, TransactionReceipt } from 'web3-core';
|
|
10
10
|
import type { EIP712TypedData } from 'eth-sig-util';
|
|
11
11
|
import type { AudiusLibs } from '../../AudiusLibs';
|
|
12
|
+
import type { DiscoveryProvider } from '../discoveryProvider';
|
|
12
13
|
export declare type Web3ManagerConfig = {
|
|
13
14
|
web3Config: Web3Config;
|
|
14
15
|
identityService: Nullable<IdentityService>;
|
|
@@ -26,10 +27,13 @@ export declare class Web3Manager {
|
|
|
26
27
|
useExternalWeb3: boolean | undefined;
|
|
27
28
|
ownerWallet?: EthereumWallet;
|
|
28
29
|
userSuppliedHandle?: string;
|
|
29
|
-
|
|
30
|
+
discoveryProvider: Nullable<DiscoveryProvider>;
|
|
31
|
+
constructor({ web3Config, identityService, hedgehog, isServer, }: Web3ManagerConfig);
|
|
30
32
|
init(): Promise<void>;
|
|
31
33
|
getWeb3(): Web3Type;
|
|
32
34
|
setWeb3(web3: Web3Type): void;
|
|
35
|
+
setDiscoveryProvider(discoveryProvider: DiscoveryProvider): void;
|
|
36
|
+
useDiscoveryRelay(): boolean;
|
|
33
37
|
getWalletAddress(): any;
|
|
34
38
|
setOwnerWallet(ownerWallet: EthereumWallet): void;
|
|
35
39
|
web3IsExternal(): boolean | undefined;
|