sonovault 4.1.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.cjs +6 -1
- package/dist/index.d.cts +33 -10
- package/dist/index.d.ts +33 -10
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,6 +51,9 @@ const deluxe = await sv.releases.get(7, { edition: 16216 });
|
|
|
51
51
|
|
|
52
52
|
// Recording to composition (ISWC), for royalty and publishing workflows
|
|
53
53
|
const work = await sv.tracks.iswc({ isrc: "GBDUW0000053" });
|
|
54
|
+
|
|
55
|
+
// What a label released on one day (from / until are inclusive YYYY-MM-DD)
|
|
56
|
+
const friday = await sv.labels.releases(1, { from: "2026-09-11", until: "2026-09-11" });
|
|
54
57
|
```
|
|
55
58
|
|
|
56
59
|
## Bulk resolve
|
package/dist/index.cjs
CHANGED
|
@@ -50,7 +50,7 @@ var SonoVaultError = class extends Error {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// src/version.ts
|
|
53
|
-
var VERSION = "4.1
|
|
53
|
+
var VERSION = "4.2.1";
|
|
54
54
|
|
|
55
55
|
// src/client.ts
|
|
56
56
|
var SonoVault = class {
|
|
@@ -89,11 +89,16 @@ var SonoVault = class {
|
|
|
89
89
|
this.artists = {
|
|
90
90
|
search: (params) => this.request("/v1/artists/search", { query: params }),
|
|
91
91
|
get: (id) => this.request(`/v1/artists/${id}`),
|
|
92
|
+
/** An artist's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD` release dates. */
|
|
92
93
|
releases: (id, params = {}) => this.request(`/v1/artists/${id}/releases`, { query: params })
|
|
93
94
|
};
|
|
94
95
|
this.labels = {
|
|
95
96
|
search: (params) => this.request("/v1/labels/search", { query: params }),
|
|
96
97
|
get: (id) => this.request(`/v1/labels/${id}`),
|
|
98
|
+
/**
|
|
99
|
+
* A label's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD`
|
|
100
|
+
* release dates, so `{ from: "2026-09-11", until: "2026-09-11" }` lists one day.
|
|
101
|
+
*/
|
|
97
102
|
releases: (id, params = {}) => this.request(`/v1/labels/${id}/releases`, { query: params }),
|
|
98
103
|
artists: (id, params = {}) => this.request(`/v1/labels/${id}/artists`, { query: params })
|
|
99
104
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -66,6 +66,15 @@ interface Page<T> {
|
|
|
66
66
|
results: T[];
|
|
67
67
|
next_cursor: string | null;
|
|
68
68
|
}
|
|
69
|
+
/** Query params for an artist's or a label's release list. */
|
|
70
|
+
type ReleaseListParams = {
|
|
71
|
+
limit?: number;
|
|
72
|
+
cursor?: string;
|
|
73
|
+
/** Only releases dated on or after this day (`YYYY-MM-DD`). Undated releases are left out when `from` or `until` is set. */
|
|
74
|
+
from?: string;
|
|
75
|
+
/** Only releases dated on or before this day (`YYYY-MM-DD`). Pass the same day as `from` for a single release date. */
|
|
76
|
+
until?: string;
|
|
77
|
+
};
|
|
69
78
|
interface Artist {
|
|
70
79
|
id: number;
|
|
71
80
|
name: string;
|
|
@@ -177,6 +186,16 @@ interface ReleaseEdition {
|
|
|
177
186
|
track_count: number | null;
|
|
178
187
|
/** How many of this release's tracks sit on the edition. */
|
|
179
188
|
tracks_on_row: number;
|
|
189
|
+
/**
|
|
190
|
+
* The label that issued this pressing, as the provider names it. Pressings of
|
|
191
|
+
* one album often differ: the UK original and a US reissue each carry their own.
|
|
192
|
+
*/
|
|
193
|
+
label: {
|
|
194
|
+
id: number;
|
|
195
|
+
name: string;
|
|
196
|
+
} | null;
|
|
197
|
+
/** The pressing's catalog number, from Discogs and MusicBrainz. */
|
|
198
|
+
catalog_no: string | null;
|
|
180
199
|
}
|
|
181
200
|
interface Genre {
|
|
182
201
|
id: number;
|
|
@@ -214,7 +233,11 @@ interface IswcLookupResponse {
|
|
|
214
233
|
type ResolveInputType = "track_name" | "isrc" | "sonovault_id" | "spotify_id" | "applemusic_id" | "tidal_id" | "beatport_id" | "discogs_id" | "musicbrainz_id";
|
|
215
234
|
interface ResolveRequest {
|
|
216
235
|
input_type: ResolveInputType;
|
|
217
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* 1–100 entries. `{ artist, title }` objects for `track_name`, strings otherwise.
|
|
238
|
+
* For `discogs_id` each string is a Discogs track key (release ID plus track
|
|
239
|
+
* position, e.g. `2844-A`), not a bare release ID.
|
|
240
|
+
*/
|
|
218
241
|
items: (string | {
|
|
219
242
|
artist: string;
|
|
220
243
|
title: string;
|
|
@@ -372,6 +395,7 @@ declare class SonoVault {
|
|
|
372
395
|
isrc?: string;
|
|
373
396
|
spotify_id?: string;
|
|
374
397
|
beatport_id?: string;
|
|
398
|
+
/** Discogs track key: release ID plus track position, e.g. `2844-A`. A bare release ID matches nothing. */
|
|
375
399
|
discogs_id?: string;
|
|
376
400
|
musicbrainz_id?: string;
|
|
377
401
|
applemusic_id?: string;
|
|
@@ -408,10 +432,8 @@ declare class SonoVault {
|
|
|
408
432
|
cursor?: string;
|
|
409
433
|
}) => Promise<Page<Artist>>;
|
|
410
434
|
get: (id: number) => Promise<Artist>;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
cursor?: string;
|
|
414
|
-
}) => Promise<Page<Release>>;
|
|
435
|
+
/** An artist's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD` release dates. */
|
|
436
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
415
437
|
};
|
|
416
438
|
readonly labels: {
|
|
417
439
|
search: (params: {
|
|
@@ -420,10 +442,11 @@ declare class SonoVault {
|
|
|
420
442
|
cursor?: string;
|
|
421
443
|
}) => Promise<Page<Label>>;
|
|
422
444
|
get: (id: number) => Promise<Label>;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
445
|
+
/**
|
|
446
|
+
* A label's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD`
|
|
447
|
+
* release dates, so `{ from: "2026-09-11", until: "2026-09-11" }` lists one day.
|
|
448
|
+
*/
|
|
449
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
427
450
|
artists: (id: number, params?: {
|
|
428
451
|
limit?: number;
|
|
429
452
|
cursor?: string;
|
|
@@ -570,4 +593,4 @@ declare function verifyWebhookSignature(options: {
|
|
|
570
593
|
*/
|
|
571
594
|
declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T>;
|
|
572
595
|
|
|
573
|
-
export { type Artist, type Genre, type IdentifyResponse, type IdentifyResult, type IswcLookupResponse, type Label, type Page, type PlatformLink, type PlatformLinksResponse, type Release, type ReleaseEdition, type ReleaseTrack, type ResolveInputType, type ResolveRequest, type ResolveResponse, type ResolveResult, SonoVault, SonoVaultError, type SonoVaultOptions, type Stream, type StreamEvent, type StreamStatus, type StreamUpdateResponse, type Track, type TrackArtist, type TrackRelease, type Webhook, paginate, verifyWebhookSignature };
|
|
596
|
+
export { type Artist, type Genre, type IdentifyResponse, type IdentifyResult, type IswcLookupResponse, type Label, type Page, type PlatformLink, type PlatformLinksResponse, type Release, type ReleaseEdition, type ReleaseListParams, type ReleaseTrack, type ResolveInputType, type ResolveRequest, type ResolveResponse, type ResolveResult, SonoVault, SonoVaultError, type SonoVaultOptions, type Stream, type StreamEvent, type StreamStatus, type StreamUpdateResponse, type Track, type TrackArtist, type TrackRelease, type Webhook, paginate, verifyWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,15 @@ interface Page<T> {
|
|
|
66
66
|
results: T[];
|
|
67
67
|
next_cursor: string | null;
|
|
68
68
|
}
|
|
69
|
+
/** Query params for an artist's or a label's release list. */
|
|
70
|
+
type ReleaseListParams = {
|
|
71
|
+
limit?: number;
|
|
72
|
+
cursor?: string;
|
|
73
|
+
/** Only releases dated on or after this day (`YYYY-MM-DD`). Undated releases are left out when `from` or `until` is set. */
|
|
74
|
+
from?: string;
|
|
75
|
+
/** Only releases dated on or before this day (`YYYY-MM-DD`). Pass the same day as `from` for a single release date. */
|
|
76
|
+
until?: string;
|
|
77
|
+
};
|
|
69
78
|
interface Artist {
|
|
70
79
|
id: number;
|
|
71
80
|
name: string;
|
|
@@ -177,6 +186,16 @@ interface ReleaseEdition {
|
|
|
177
186
|
track_count: number | null;
|
|
178
187
|
/** How many of this release's tracks sit on the edition. */
|
|
179
188
|
tracks_on_row: number;
|
|
189
|
+
/**
|
|
190
|
+
* The label that issued this pressing, as the provider names it. Pressings of
|
|
191
|
+
* one album often differ: the UK original and a US reissue each carry their own.
|
|
192
|
+
*/
|
|
193
|
+
label: {
|
|
194
|
+
id: number;
|
|
195
|
+
name: string;
|
|
196
|
+
} | null;
|
|
197
|
+
/** The pressing's catalog number, from Discogs and MusicBrainz. */
|
|
198
|
+
catalog_no: string | null;
|
|
180
199
|
}
|
|
181
200
|
interface Genre {
|
|
182
201
|
id: number;
|
|
@@ -214,7 +233,11 @@ interface IswcLookupResponse {
|
|
|
214
233
|
type ResolveInputType = "track_name" | "isrc" | "sonovault_id" | "spotify_id" | "applemusic_id" | "tidal_id" | "beatport_id" | "discogs_id" | "musicbrainz_id";
|
|
215
234
|
interface ResolveRequest {
|
|
216
235
|
input_type: ResolveInputType;
|
|
217
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* 1–100 entries. `{ artist, title }` objects for `track_name`, strings otherwise.
|
|
238
|
+
* For `discogs_id` each string is a Discogs track key (release ID plus track
|
|
239
|
+
* position, e.g. `2844-A`), not a bare release ID.
|
|
240
|
+
*/
|
|
218
241
|
items: (string | {
|
|
219
242
|
artist: string;
|
|
220
243
|
title: string;
|
|
@@ -372,6 +395,7 @@ declare class SonoVault {
|
|
|
372
395
|
isrc?: string;
|
|
373
396
|
spotify_id?: string;
|
|
374
397
|
beatport_id?: string;
|
|
398
|
+
/** Discogs track key: release ID plus track position, e.g. `2844-A`. A bare release ID matches nothing. */
|
|
375
399
|
discogs_id?: string;
|
|
376
400
|
musicbrainz_id?: string;
|
|
377
401
|
applemusic_id?: string;
|
|
@@ -408,10 +432,8 @@ declare class SonoVault {
|
|
|
408
432
|
cursor?: string;
|
|
409
433
|
}) => Promise<Page<Artist>>;
|
|
410
434
|
get: (id: number) => Promise<Artist>;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
cursor?: string;
|
|
414
|
-
}) => Promise<Page<Release>>;
|
|
435
|
+
/** An artist's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD` release dates. */
|
|
436
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
415
437
|
};
|
|
416
438
|
readonly labels: {
|
|
417
439
|
search: (params: {
|
|
@@ -420,10 +442,11 @@ declare class SonoVault {
|
|
|
420
442
|
cursor?: string;
|
|
421
443
|
}) => Promise<Page<Label>>;
|
|
422
444
|
get: (id: number) => Promise<Label>;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
445
|
+
/**
|
|
446
|
+
* A label's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD`
|
|
447
|
+
* release dates, so `{ from: "2026-09-11", until: "2026-09-11" }` lists one day.
|
|
448
|
+
*/
|
|
449
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
427
450
|
artists: (id: number, params?: {
|
|
428
451
|
limit?: number;
|
|
429
452
|
cursor?: string;
|
|
@@ -570,4 +593,4 @@ declare function verifyWebhookSignature(options: {
|
|
|
570
593
|
*/
|
|
571
594
|
declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T>;
|
|
572
595
|
|
|
573
|
-
export { type Artist, type Genre, type IdentifyResponse, type IdentifyResult, type IswcLookupResponse, type Label, type Page, type PlatformLink, type PlatformLinksResponse, type Release, type ReleaseEdition, type ReleaseTrack, type ResolveInputType, type ResolveRequest, type ResolveResponse, type ResolveResult, SonoVault, SonoVaultError, type SonoVaultOptions, type Stream, type StreamEvent, type StreamStatus, type StreamUpdateResponse, type Track, type TrackArtist, type TrackRelease, type Webhook, paginate, verifyWebhookSignature };
|
|
596
|
+
export { type Artist, type Genre, type IdentifyResponse, type IdentifyResult, type IswcLookupResponse, type Label, type Page, type PlatformLink, type PlatformLinksResponse, type Release, type ReleaseEdition, type ReleaseListParams, type ReleaseTrack, type ResolveInputType, type ResolveRequest, type ResolveResponse, type ResolveResult, SonoVault, SonoVaultError, type SonoVaultOptions, type Stream, type StreamEvent, type StreamStatus, type StreamUpdateResponse, type Track, type TrackArtist, type TrackRelease, type Webhook, paginate, verifyWebhookSignature };
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var SonoVaultError = class extends Error {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// src/version.ts
|
|
24
|
-
var VERSION = "4.1
|
|
24
|
+
var VERSION = "4.2.1";
|
|
25
25
|
|
|
26
26
|
// src/client.ts
|
|
27
27
|
var SonoVault = class {
|
|
@@ -60,11 +60,16 @@ var SonoVault = class {
|
|
|
60
60
|
this.artists = {
|
|
61
61
|
search: (params) => this.request("/v1/artists/search", { query: params }),
|
|
62
62
|
get: (id) => this.request(`/v1/artists/${id}`),
|
|
63
|
+
/** An artist's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD` release dates. */
|
|
63
64
|
releases: (id, params = {}) => this.request(`/v1/artists/${id}/releases`, { query: params })
|
|
64
65
|
};
|
|
65
66
|
this.labels = {
|
|
66
67
|
search: (params) => this.request("/v1/labels/search", { query: params }),
|
|
67
68
|
get: (id) => this.request(`/v1/labels/${id}`),
|
|
69
|
+
/**
|
|
70
|
+
* A label's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD`
|
|
71
|
+
* release dates, so `{ from: "2026-09-11", until: "2026-09-11" }` lists one day.
|
|
72
|
+
*/
|
|
68
73
|
releases: (id, params = {}) => this.request(`/v1/labels/${id}/releases`, { query: params }),
|
|
69
74
|
artists: (id, params = {}) => this.request(`/v1/labels/${id}/artists`, { query: params })
|
|
70
75
|
};
|
package/package.json
CHANGED