sonovault 4.1.0 → 4.2.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/README.md +3 -0
- package/dist/index.cjs +6 -1
- package/dist/index.d.cts +27 -9
- package/dist/index.d.ts +27 -9
- 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.
|
|
53
|
+
var VERSION = "4.2.0";
|
|
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;
|
|
@@ -408,10 +427,8 @@ declare class SonoVault {
|
|
|
408
427
|
cursor?: string;
|
|
409
428
|
}) => Promise<Page<Artist>>;
|
|
410
429
|
get: (id: number) => Promise<Artist>;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
cursor?: string;
|
|
414
|
-
}) => Promise<Page<Release>>;
|
|
430
|
+
/** An artist's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD` release dates. */
|
|
431
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
415
432
|
};
|
|
416
433
|
readonly labels: {
|
|
417
434
|
search: (params: {
|
|
@@ -420,10 +437,11 @@ declare class SonoVault {
|
|
|
420
437
|
cursor?: string;
|
|
421
438
|
}) => Promise<Page<Label>>;
|
|
422
439
|
get: (id: number) => Promise<Label>;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
440
|
+
/**
|
|
441
|
+
* A label's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD`
|
|
442
|
+
* release dates, so `{ from: "2026-09-11", until: "2026-09-11" }` lists one day.
|
|
443
|
+
*/
|
|
444
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
427
445
|
artists: (id: number, params?: {
|
|
428
446
|
limit?: number;
|
|
429
447
|
cursor?: string;
|
|
@@ -570,4 +588,4 @@ declare function verifyWebhookSignature(options: {
|
|
|
570
588
|
*/
|
|
571
589
|
declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T>;
|
|
572
590
|
|
|
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 };
|
|
591
|
+
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;
|
|
@@ -408,10 +427,8 @@ declare class SonoVault {
|
|
|
408
427
|
cursor?: string;
|
|
409
428
|
}) => Promise<Page<Artist>>;
|
|
410
429
|
get: (id: number) => Promise<Artist>;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
cursor?: string;
|
|
414
|
-
}) => Promise<Page<Release>>;
|
|
430
|
+
/** An artist's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD` release dates. */
|
|
431
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
415
432
|
};
|
|
416
433
|
readonly labels: {
|
|
417
434
|
search: (params: {
|
|
@@ -420,10 +437,11 @@ declare class SonoVault {
|
|
|
420
437
|
cursor?: string;
|
|
421
438
|
}) => Promise<Page<Label>>;
|
|
422
439
|
get: (id: number) => Promise<Label>;
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
440
|
+
/**
|
|
441
|
+
* A label's releases, newest first. `from` / `until` are inclusive `YYYY-MM-DD`
|
|
442
|
+
* release dates, so `{ from: "2026-09-11", until: "2026-09-11" }` lists one day.
|
|
443
|
+
*/
|
|
444
|
+
releases: (id: number, params?: ReleaseListParams) => Promise<Page<Release>>;
|
|
427
445
|
artists: (id: number, params?: {
|
|
428
446
|
limit?: number;
|
|
429
447
|
cursor?: string;
|
|
@@ -570,4 +588,4 @@ declare function verifyWebhookSignature(options: {
|
|
|
570
588
|
*/
|
|
571
589
|
declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T>;
|
|
572
590
|
|
|
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 };
|
|
591
|
+
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.
|
|
24
|
+
var VERSION = "4.2.0";
|
|
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