@audius/sdk 1.0.26 → 1.0.27

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.
@@ -1,368 +1,344 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/Track",
4
- "definitions": {
5
- "Track": {
6
- "type": "object",
7
- "additionalProperties": true,
8
- "$comment": "Additional properties enabled because the data return by discovery providers may contain other properties like blockhash, is_current, which are not strictly part of the metadata.",
9
- "properties": {
10
- "title": {
11
- "type": "string",
12
- "default": null
13
- },
14
- "length": {
15
- "type": ["integer", "null"],
16
- "default": null
17
- },
18
- "cover_art": {
19
- "type": ["string", "null"],
20
- "default": null,
21
- "$ref": "#/definitions/CID"
22
- },
23
- "cover_art_sizes": {
24
- "$comment": "type can be null if attached as a stem",
25
- "type": ["string", "null"],
26
- "default": null,
27
- "$ref": "#/definitions/CID"
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/Track",
4
+ "definitions": {
5
+ "Track": {
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "$comment": "Additional properties enabled because the data return by discovery providers may contain other properties like blockhash, is_current, which are not strictly part of the metadata.",
9
+ "properties": {
10
+ "title": {
11
+ "type": "string",
12
+ "default": null
13
+ },
14
+ "length": {
15
+ "type": ["integer", "null"],
16
+ "default": null
17
+ },
18
+ "cover_art": {
19
+ "type": ["string", "null"],
20
+ "default": null,
21
+ "$ref": "#/definitions/CID"
22
+ },
23
+ "cover_art_sizes": {
24
+ "$comment": "type can be null if attached as a stem",
25
+ "type": ["string", "null"],
26
+ "default": null,
27
+ "$ref": "#/definitions/CID"
28
+ },
29
+ "tags": {
30
+ "type": ["string", "null"],
31
+ "default": null
32
+ },
33
+ "genre": {
34
+ "$comment": "genre can be null if attached as a stem",
35
+ "type": ["string", "null"],
36
+ "default": null
37
+ },
38
+ "mood": {
39
+ "type": ["string", "null"],
40
+ "default": null
41
+ },
42
+ "credits_splits": {
43
+ "type": ["string", "null"],
44
+ "default": null
45
+ },
46
+ "create_date": {
47
+ "type": ["string", "null"],
48
+ "default": null
49
+ },
50
+ "release_date": {
51
+ "type": ["string", "null"],
52
+ "default": null
53
+ },
54
+ "file_type": {
55
+ "type": ["string", "null"],
56
+ "default": null
57
+ },
58
+ "description": {
59
+ "type": ["string", "null"],
60
+ "default": null
61
+ },
62
+ "license": {
63
+ "type": ["string", "null"],
64
+ "default": null
65
+ },
66
+ "isrc": {
67
+ "type": ["string", "null"],
68
+ "default": null
69
+ },
70
+ "iswc": {
71
+ "type": ["string", "null"],
72
+ "default": null
73
+ },
74
+ "track_segments": {
75
+ "type": "array",
76
+ "minItems": 1,
77
+ "items": {
78
+ "$ref": "#/definitions/TrackSegment"
79
+ },
80
+ "default": [],
81
+ "$comment": "default set to empty array to unblock stalling indexing. if set to null, discprov db will reject because of not-NULL constraint"
82
+ },
83
+ "is_unlisted": {
84
+ "type": "boolean",
85
+ "default": false
86
+ },
87
+ "field_visibility": {
88
+ "type": "object",
89
+ "$ref": "#/definitions/FieldVisibility",
90
+ "default": {
91
+ "mood": true,
92
+ "tags": true,
93
+ "genre": true,
94
+ "share": true,
95
+ "play_count": true,
96
+ "remixes": true
97
+ }
98
+ },
99
+ "download": {
100
+ "type": ["object", "null"],
101
+ "$ref": "#/definitions/Download",
102
+ "default": {
103
+ "cid": null,
104
+ "is_downloadable": false,
105
+ "requires_follow": false
106
+ }
107
+ },
108
+ "stem_of": {
109
+ "type": ["object", "null"],
110
+ "$ref": "#/definitions/StemOf",
111
+ "default": null
112
+ },
113
+ "remix_of": {
114
+ "type": ["object", "null"],
115
+ "$ref": "#/definitions/RemixOf",
116
+ "default": null
117
+ },
118
+ "is_premium": {
119
+ "type": "boolean",
120
+ "default": false
121
+ },
122
+ "premium_conditions": {
123
+ "type": ["object", "null"],
124
+ "items": {
125
+ "oneOf": [
126
+ {
127
+ "type": "null"
128
+ },
129
+ {
130
+ "$ref": "#/definitions/PremiumConditionsNFTCollection"
28
131
  },
29
- "tags": {
30
- "type": ["string", "null"],
31
- "default": null
32
- },
33
- "genre": {
34
- "$comment": "genre can be null if attached as a stem",
35
- "type": ["string", "null"],
36
- "default": null
37
- },
38
- "mood": {
39
- "type": ["string", "null"],
40
- "default": null
41
- },
42
- "credits_splits": {
43
- "type": ["string", "null"],
44
- "default": null
45
- },
46
- "create_date": {
47
- "type": ["string", "null"],
48
- "default": null
49
- },
50
- "release_date": {
51
- "type": ["string", "null"],
52
- "default": null
53
- },
54
- "file_type": {
55
- "type": ["string", "null"],
56
- "default": null
57
- },
58
- "description": {
59
- "type": ["string", "null"],
60
- "default": null
61
- },
62
- "license": {
63
- "type": ["string", "null"],
64
- "default": null
65
- },
66
- "isrc": {
67
- "type": ["string", "null"],
68
- "default": null
69
- },
70
- "iswc": {
71
- "type": ["string", "null"],
72
- "default": null
73
- },
74
- "track_segments": {
75
- "type": "array",
76
- "minItems": 1,
77
- "items": {
78
- "$ref": "#/definitions/TrackSegment"
79
- },
80
- "default": [],
81
- "$comment": "default set to empty array to unblock stalling indexing. if set to null, discprov db will reject because of not-NULL constraint"
82
- },
83
- "is_unlisted": {
84
- "type": "boolean",
85
- "default": false
86
- },
87
- "field_visibility": {
88
- "type": "object",
89
- "$ref": "#/definitions/FieldVisibility",
90
- "default": {
91
- "mood": true,
92
- "tags": true,
93
- "genre": true,
94
- "share": true,
95
- "play_count": true,
96
- "remixes": true
97
- }
98
- },
99
- "download": {
100
- "type": ["object", "null"],
101
- "$ref": "#/definitions/Download",
102
- "default": {
103
- "cid": null,
104
- "is_downloadable": false,
105
- "requires_follow": false
106
- }
107
- },
108
- "stem_of": {
109
- "type": ["object", "null"],
110
- "$ref": "#/definitions/StemOf",
111
- "default": null
112
- },
113
- "remix_of": {
114
- "type": ["object", "null"],
115
- "$ref": "#/definitions/RemixOf",
116
- "default": null
117
- },
118
- "is_premium": {
119
- "type": "boolean",
120
- "default": false
121
- },
122
- "premium_conditions": {
123
- "type": ["object", "null"],
124
- "items": {
125
- "oneOf": [
126
- {
127
- "type": "null"
128
- },
129
- {
130
- "$ref": "#/definitions/PremiumConditionsNFTCollection"
131
- },
132
- {
133
- "$ref": "#/definitions/PremiumConditionsFollowUserId"
134
- }
135
- ]
136
- }
137
- }
138
- },
139
- "required": [
140
- "cover_art",
141
- "cover_art_sizes",
142
- "create_date",
143
- "credits_splits",
144
- "description",
145
- "download",
146
- "field_visibility",
147
- "file_type",
148
- "genre",
149
- "is_unlisted",
150
- "isrc",
151
- "iswc",
152
- "length",
153
- "license",
154
- "mood",
155
- "release_date",
156
- "remix_of",
157
- "stem_of",
158
- "tags",
159
- "title",
160
- "track_segments",
161
- "is_premium",
162
- "premium_conditions"
163
- ],
164
- "title": "Track"
165
- },
166
- "RemixOf": {
167
- "type": ["object", "null"],
168
- "additionalProperties": false,
169
- "properties": {
170
- "tracks": {
171
- "type": "array",
172
- "minItems": 1,
173
- "items": {
174
- "$ref": "#/definitions/TrackElement"
175
- }
176
- }
177
- },
178
- "required": [
179
- "tracks"
180
- ],
181
- "title": "RemixOf"
182
- },
183
- "TrackElement": {
184
- "type": "object",
185
- "additionalProperties": false,
186
- "properties": {
187
- "parent_track_id": {
188
- "type": "integer"
189
- }
190
- },
191
- "required": [
192
- "parent_track_id"
193
- ],
194
- "title": "TrackElement"
195
- },
196
- "Download": {
197
- "type": ["object", "null"],
198
- "additionalProperties": false,
199
- "properties": {
200
- "cid": {
201
- "type": ["string", "null"],
202
- "$ref": "#/definitions/CID"
203
- },
204
- "is_downloadable": {
205
- "type": "boolean"
206
- },
207
- "requires_follow": {
208
- "type": "boolean"
209
- }
210
- },
211
- "required": [
212
- "cid",
213
- "is_downloadable",
214
- "requires_follow"
215
- ],
216
- "title": "Download"
217
- },
218
- "FieldVisibility": {
219
- "type": "object",
220
- "additionalProperties": false,
221
- "properties": {
222
- "mood": {
223
- "type": "boolean"
224
- },
225
- "tags": {
226
- "type": "boolean"
227
- },
228
- "genre": {
229
- "type": "boolean"
230
- },
231
- "share": {
232
- "type": "boolean"
233
- },
234
- "play_count": {
235
- "type": "boolean"
236
- },
237
- "remixes": {
238
- "type": "boolean"
239
- }
240
- },
241
- "required": [
242
- ],
243
- "$comment": "No required fields for FieldVisibility because it causes backwards compatibility issues. If we added a new property, we don't want old records to fail if all properties are not specified(and overwrite the values with the defaults), but we also don't want to set new properties especially on the discovery provider because then we'd be writing properties not present in the metadata written on chain.",
244
- "title": "FieldVisibility"
245
- },
246
- "StemOf": {
247
- "type": ["object", "null"],
248
- "additionalProperties": false,
249
- "properties": {
250
- "category": {
251
- "type": "string"
252
- },
253
- "parent_track_id": {
254
- "type": "integer"
255
- }
256
- },
257
- "required": [
258
- "category",
259
- "parent_track_id"
260
- ],
261
- "title": "StemOf"
262
- },
263
- "TrackSegment": {
264
- "type": "object",
265
- "additionalProperties": false,
266
- "properties": {
267
- "duration": {
268
- "type": "number"
269
- },
270
- "multihash": {
271
- "type": "string",
272
- "$ref": "#/definitions/CID"
273
- }
274
- },
275
- "required": [
276
- "duration",
277
- "multihash"
278
- ],
279
- "title": "TrackSegment"
280
- },
281
- "CID": {
282
- "type": ["string", "null"],
283
- "minLength": 46,
284
- "maxLength": 46,
285
- "pattern": "^Qm[a-zA-Z0-9]{44}$",
286
- "title": "CID"
287
- },
288
- "PremiumConditionsNFTCollection": {
289
- "type": "object",
290
- "additionalProperties": false,
291
- "properties": {
292
- "nft_collection": {
293
- "type": "object",
294
- "items": {
295
- "oneOf": [
296
- {
297
- "$ref": "#/definitions/PremiumConditionsEthNFTCollection"
298
- },
299
- {
300
- "$ref": "#/definitions/PremiumConditionsSolNFTCollection"
301
- }
302
- ]
303
- }
304
- }
305
- },
306
- "required": [
307
- "nft_collection"
308
- ],
309
- "title": "PremiumConditionsNFTCollection"
310
- },
311
- "PremiumConditionsEthNFTCollection": {
312
- "type": "object",
313
- "additionalProperties": false,
314
- "properties": {
315
- "chain": {
316
- "type": "string",
317
- "const": "eth"
318
- },
319
- "address": {
320
- "type": "string"
321
- },
322
- "standard": {
323
- "enum": [
324
- "ERC721",
325
- "ERC1155"
326
- ]
327
- }
328
- },
329
- "required": [
330
- "chain",
331
- "address",
332
- "standard"
333
- ],
334
- "title": "PremiumConditionsEthNFTCollection"
335
- },
336
- "PremiumConditionsSolNFTCollection": {
337
- "type": "object",
338
- "additionalProperties": false,
339
- "properties": {
340
- "chain": {
341
- "type": "string",
342
- "const": "sol"
343
- },
344
- "name": {
345
- "type": "string"
346
- }
347
- },
348
- "required": [
349
- "chain",
350
- "name"
351
- ],
352
- "title": "PremiumConditionsSolNFTCollection"
353
- },
354
- "PremiumConditionsFollowUserId": {
355
- "type": "object",
356
- "additionalProperties": false,
357
- "properties": {
358
- "follow_user_id": {
359
- "type": "number"
360
- }
361
- },
362
- "required": [
363
- "follow_user_id"
364
- ],
365
- "title": "PremiumConditionsFollowUserId"
132
+ {
133
+ "$ref": "#/definitions/PremiumConditionsFollowUserId"
134
+ }
135
+ ]
136
+ }
137
+ },
138
+ "is_playlist_upload": {
139
+ "type": "boolean",
140
+ "default": false
141
+ }
142
+ },
143
+ "required": [
144
+ "cover_art",
145
+ "cover_art_sizes",
146
+ "create_date",
147
+ "credits_splits",
148
+ "description",
149
+ "download",
150
+ "field_visibility",
151
+ "file_type",
152
+ "genre",
153
+ "is_unlisted",
154
+ "isrc",
155
+ "iswc",
156
+ "length",
157
+ "license",
158
+ "mood",
159
+ "release_date",
160
+ "remix_of",
161
+ "stem_of",
162
+ "tags",
163
+ "title",
164
+ "track_segments",
165
+ "is_premium",
166
+ "premium_conditions",
167
+ "is_playlist_upload"
168
+ ],
169
+ "title": "Track"
170
+ },
171
+ "RemixOf": {
172
+ "type": ["object", "null"],
173
+ "additionalProperties": false,
174
+ "properties": {
175
+ "tracks": {
176
+ "type": "array",
177
+ "minItems": 1,
178
+ "items": {
179
+ "$ref": "#/definitions/TrackElement"
180
+ }
181
+ }
182
+ },
183
+ "required": ["tracks"],
184
+ "title": "RemixOf"
185
+ },
186
+ "TrackElement": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "parent_track_id": {
191
+ "type": "integer"
192
+ }
193
+ },
194
+ "required": ["parent_track_id"],
195
+ "title": "TrackElement"
196
+ },
197
+ "Download": {
198
+ "type": ["object", "null"],
199
+ "additionalProperties": false,
200
+ "properties": {
201
+ "cid": {
202
+ "type": ["string", "null"],
203
+ "$ref": "#/definitions/CID"
204
+ },
205
+ "is_downloadable": {
206
+ "type": "boolean"
207
+ },
208
+ "requires_follow": {
209
+ "type": "boolean"
210
+ }
211
+ },
212
+ "required": ["cid", "is_downloadable", "requires_follow"],
213
+ "title": "Download"
214
+ },
215
+ "FieldVisibility": {
216
+ "type": "object",
217
+ "additionalProperties": false,
218
+ "properties": {
219
+ "mood": {
220
+ "type": "boolean"
221
+ },
222
+ "tags": {
223
+ "type": "boolean"
224
+ },
225
+ "genre": {
226
+ "type": "boolean"
227
+ },
228
+ "share": {
229
+ "type": "boolean"
230
+ },
231
+ "play_count": {
232
+ "type": "boolean"
233
+ },
234
+ "remixes": {
235
+ "type": "boolean"
236
+ }
237
+ },
238
+ "required": [],
239
+ "$comment": "No required fields for FieldVisibility because it causes backwards compatibility issues. If we added a new property, we don't want old records to fail if all properties are not specified(and overwrite the values with the defaults), but we also don't want to set new properties especially on the discovery provider because then we'd be writing properties not present in the metadata written on chain.",
240
+ "title": "FieldVisibility"
241
+ },
242
+ "StemOf": {
243
+ "type": ["object", "null"],
244
+ "additionalProperties": false,
245
+ "properties": {
246
+ "category": {
247
+ "type": "string"
248
+ },
249
+ "parent_track_id": {
250
+ "type": "integer"
251
+ }
252
+ },
253
+ "required": ["category", "parent_track_id"],
254
+ "title": "StemOf"
255
+ },
256
+ "TrackSegment": {
257
+ "type": "object",
258
+ "additionalProperties": false,
259
+ "properties": {
260
+ "duration": {
261
+ "type": "number"
262
+ },
263
+ "multihash": {
264
+ "type": "string",
265
+ "$ref": "#/definitions/CID"
266
+ }
267
+ },
268
+ "required": ["duration", "multihash"],
269
+ "title": "TrackSegment"
270
+ },
271
+ "CID": {
272
+ "type": ["string", "null"],
273
+ "minLength": 46,
274
+ "maxLength": 46,
275
+ "pattern": "^Qm[a-zA-Z0-9]{44}$",
276
+ "title": "CID"
277
+ },
278
+ "PremiumConditionsNFTCollection": {
279
+ "type": "object",
280
+ "additionalProperties": false,
281
+ "properties": {
282
+ "nft_collection": {
283
+ "type": "object",
284
+ "items": {
285
+ "oneOf": [
286
+ {
287
+ "$ref": "#/definitions/PremiumConditionsEthNFTCollection"
288
+ },
289
+ {
290
+ "$ref": "#/definitions/PremiumConditionsSolNFTCollection"
291
+ }
292
+ ]
293
+ }
294
+ }
295
+ },
296
+ "required": ["nft_collection"],
297
+ "title": "PremiumConditionsNFTCollection"
298
+ },
299
+ "PremiumConditionsEthNFTCollection": {
300
+ "type": "object",
301
+ "additionalProperties": false,
302
+ "properties": {
303
+ "chain": {
304
+ "type": "string",
305
+ "const": "eth"
306
+ },
307
+ "address": {
308
+ "type": "string"
309
+ },
310
+ "standard": {
311
+ "enum": ["ERC721", "ERC1155"]
312
+ }
313
+ },
314
+ "required": ["chain", "address", "standard"],
315
+ "title": "PremiumConditionsEthNFTCollection"
316
+ },
317
+ "PremiumConditionsSolNFTCollection": {
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "properties": {
321
+ "chain": {
322
+ "type": "string",
323
+ "const": "sol"
324
+ },
325
+ "name": {
326
+ "type": "string"
327
+ }
328
+ },
329
+ "required": ["chain", "name"],
330
+ "title": "PremiumConditionsSolNFTCollection"
331
+ },
332
+ "PremiumConditionsFollowUserId": {
333
+ "type": "object",
334
+ "additionalProperties": false,
335
+ "properties": {
336
+ "follow_user_id": {
337
+ "type": "number"
366
338
  }
339
+ },
340
+ "required": ["follow_user_id"],
341
+ "title": "PremiumConditionsFollowUserId"
367
342
  }
368
- }
343
+ }
344
+ }