sonovault 4.0.0 → 4.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/README.md +6 -0
- package/dist/index.cjs +7 -2
- package/dist/index.d.cts +68 -3
- package/dist/index.d.ts +68 -3
- package/dist/index.js +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -43,6 +43,12 @@ for (const t of release.tracks ?? []) {
|
|
|
43
43
|
console.log(t.disc_number, t.track_number, t.title); // 1 1 One More Time
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// One record groups every edition of an album, so pick the one you mean
|
|
47
|
+
for (const e of release.editions ?? []) {
|
|
48
|
+
console.log(e.id, e.format, e.release_date, e.track_count); // 16216 cd 2001-03-12 14
|
|
49
|
+
}
|
|
50
|
+
const deluxe = await sv.releases.get(7, { edition: 16216 });
|
|
51
|
+
|
|
46
52
|
// Recording to composition (ISWC), for royalty and publishing workflows
|
|
47
53
|
const work = await sv.tracks.iswc({ isrc: "GBDUW0000053" });
|
|
48
54
|
```
|
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.1.0";
|
|
54
54
|
|
|
55
55
|
// src/client.ts
|
|
56
56
|
var SonoVault = class {
|
|
@@ -99,7 +99,12 @@ var SonoVault = class {
|
|
|
99
99
|
};
|
|
100
100
|
this.releases = {
|
|
101
101
|
search: (params) => this.request("/v1/releases/search", { query: params }),
|
|
102
|
-
|
|
102
|
+
/**
|
|
103
|
+
* One release with its tracklist and the editions behind it. Pass
|
|
104
|
+
* `edition` (an `id` from the response's `editions`) to render that
|
|
105
|
+
* edition's track numbering instead of the default consensus.
|
|
106
|
+
*/
|
|
107
|
+
get: (id, params = {}) => this.request(`/v1/releases/${id}`, { query: params }),
|
|
103
108
|
/** Newly released albums (GET /v1/releases/new). Paid tiers. */
|
|
104
109
|
latest: (params = {}) => this.request("/v1/releases/new", { query: params })
|
|
105
110
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -115,11 +115,69 @@ interface Release {
|
|
|
115
115
|
musicbrainz_release_group_ids?: string[];
|
|
116
116
|
/**
|
|
117
117
|
* The tracklist, in playing order (disc, then track number), with any track
|
|
118
|
-
* whose position is unknown last.
|
|
118
|
+
* whose position is unknown last. Numbering comes from the edition named by
|
|
119
|
+
* `edition`, or from a consensus across the release's editions when none was
|
|
120
|
+
* named.
|
|
119
121
|
*/
|
|
120
122
|
tracks?: ReleaseTrack[];
|
|
123
|
+
/**
|
|
124
|
+
* The real editions behind this release, at most 20. A SonoVault release
|
|
125
|
+
* groups every edition of an album onto one record, so the single, the
|
|
126
|
+
* album, the deluxe and the box set share one ID; these are the editions
|
|
127
|
+
* behind it. Chosen so each is a genuinely different edition rather than
|
|
128
|
+
* twenty pressings of the same one. Only returned by `releases.get()`.
|
|
129
|
+
*/
|
|
130
|
+
editions?: ReleaseEdition[];
|
|
131
|
+
/**
|
|
132
|
+
* The edition whose numbering `tracks` uses. `null` unless an edition was
|
|
133
|
+
* requested. Only returned by `releases.get()`.
|
|
134
|
+
*/
|
|
135
|
+
edition?: number | null;
|
|
121
136
|
[key: string]: unknown;
|
|
122
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* One real edition behind a release: a specific pressing, issue or digital
|
|
140
|
+
* album as one provider describes it. Pass its `id` to
|
|
141
|
+
* `releases.get(id, { edition })` to render that edition's track numbering.
|
|
142
|
+
*/
|
|
143
|
+
interface ReleaseEdition {
|
|
144
|
+
id: number;
|
|
145
|
+
/** The provider describing this edition. */
|
|
146
|
+
source: "spotify" | "discogs" | "musicbrainz";
|
|
147
|
+
/** The edition's ID at that provider. */
|
|
148
|
+
external_id: string;
|
|
149
|
+
/**
|
|
150
|
+
* The provider's identity for the album across all its editions: a
|
|
151
|
+
* MusicBrainz release-group MBID or a Discogs master ID. `null` for Spotify,
|
|
152
|
+
* which has no such concept.
|
|
153
|
+
*/
|
|
154
|
+
group_external_id: string | null;
|
|
155
|
+
/** The edition's own title, which often carries what makes it distinct. */
|
|
156
|
+
title: string | null;
|
|
157
|
+
edition_kind: "album" | "single" | "ep" | "compilation" | "live" | "remix" | "soundtrack" | "other" | null;
|
|
158
|
+
format: "cd" | "vinyl" | "cassette" | "digital" | "dvd" | "mixed" | "other" | null;
|
|
159
|
+
/** `false` for a release the provider marks unofficial, such as a bootleg. */
|
|
160
|
+
official: boolean | null;
|
|
161
|
+
/**
|
|
162
|
+
* The edition's release date, `YYYY-MM-DD`. Read it with `date_precision`: a
|
|
163
|
+
* month-precision date is reported as the first of the month.
|
|
164
|
+
*/
|
|
165
|
+
release_date: string | null;
|
|
166
|
+
date_precision: "day" | "month" | "year" | null;
|
|
167
|
+
/** Barcode or UPC, digits only, so editions can be matched across providers. */
|
|
168
|
+
barcode: string | null;
|
|
169
|
+
/** Where the edition was issued, as the provider names it. Not an ISO code. */
|
|
170
|
+
country: string | null;
|
|
171
|
+
/** How many discs, records or tapes the edition spans. */
|
|
172
|
+
medium_count: number | null;
|
|
173
|
+
/**
|
|
174
|
+
* The provider's own total for the edition, including tracks SonoVault does
|
|
175
|
+
* not hold. Compare with `tracks_on_row` to see the gap.
|
|
176
|
+
*/
|
|
177
|
+
track_count: number | null;
|
|
178
|
+
/** How many of this release's tracks sit on the edition. */
|
|
179
|
+
tracks_on_row: number;
|
|
180
|
+
}
|
|
123
181
|
interface Genre {
|
|
124
182
|
id: number;
|
|
125
183
|
name: string;
|
|
@@ -378,7 +436,14 @@ declare class SonoVault {
|
|
|
378
436
|
limit?: number;
|
|
379
437
|
cursor?: string;
|
|
380
438
|
}) => Promise<Page<Release>>;
|
|
381
|
-
|
|
439
|
+
/**
|
|
440
|
+
* One release with its tracklist and the editions behind it. Pass
|
|
441
|
+
* `edition` (an `id` from the response's `editions`) to render that
|
|
442
|
+
* edition's track numbering instead of the default consensus.
|
|
443
|
+
*/
|
|
444
|
+
get: (id: number, params?: {
|
|
445
|
+
edition?: number;
|
|
446
|
+
}) => Promise<Release>;
|
|
382
447
|
/** Newly released albums (GET /v1/releases/new). Paid tiers. */
|
|
383
448
|
latest: (params?: {
|
|
384
449
|
limit?: number;
|
|
@@ -505,4 +570,4 @@ declare function verifyWebhookSignature(options: {
|
|
|
505
570
|
*/
|
|
506
571
|
declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T>;
|
|
507
572
|
|
|
508
|
-
export { type Artist, type Genre, type IdentifyResponse, type IdentifyResult, type IswcLookupResponse, type Label, type Page, type PlatformLink, type PlatformLinksResponse, type Release, 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -115,11 +115,69 @@ interface Release {
|
|
|
115
115
|
musicbrainz_release_group_ids?: string[];
|
|
116
116
|
/**
|
|
117
117
|
* The tracklist, in playing order (disc, then track number), with any track
|
|
118
|
-
* whose position is unknown last.
|
|
118
|
+
* whose position is unknown last. Numbering comes from the edition named by
|
|
119
|
+
* `edition`, or from a consensus across the release's editions when none was
|
|
120
|
+
* named.
|
|
119
121
|
*/
|
|
120
122
|
tracks?: ReleaseTrack[];
|
|
123
|
+
/**
|
|
124
|
+
* The real editions behind this release, at most 20. A SonoVault release
|
|
125
|
+
* groups every edition of an album onto one record, so the single, the
|
|
126
|
+
* album, the deluxe and the box set share one ID; these are the editions
|
|
127
|
+
* behind it. Chosen so each is a genuinely different edition rather than
|
|
128
|
+
* twenty pressings of the same one. Only returned by `releases.get()`.
|
|
129
|
+
*/
|
|
130
|
+
editions?: ReleaseEdition[];
|
|
131
|
+
/**
|
|
132
|
+
* The edition whose numbering `tracks` uses. `null` unless an edition was
|
|
133
|
+
* requested. Only returned by `releases.get()`.
|
|
134
|
+
*/
|
|
135
|
+
edition?: number | null;
|
|
121
136
|
[key: string]: unknown;
|
|
122
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* One real edition behind a release: a specific pressing, issue or digital
|
|
140
|
+
* album as one provider describes it. Pass its `id` to
|
|
141
|
+
* `releases.get(id, { edition })` to render that edition's track numbering.
|
|
142
|
+
*/
|
|
143
|
+
interface ReleaseEdition {
|
|
144
|
+
id: number;
|
|
145
|
+
/** The provider describing this edition. */
|
|
146
|
+
source: "spotify" | "discogs" | "musicbrainz";
|
|
147
|
+
/** The edition's ID at that provider. */
|
|
148
|
+
external_id: string;
|
|
149
|
+
/**
|
|
150
|
+
* The provider's identity for the album across all its editions: a
|
|
151
|
+
* MusicBrainz release-group MBID or a Discogs master ID. `null` for Spotify,
|
|
152
|
+
* which has no such concept.
|
|
153
|
+
*/
|
|
154
|
+
group_external_id: string | null;
|
|
155
|
+
/** The edition's own title, which often carries what makes it distinct. */
|
|
156
|
+
title: string | null;
|
|
157
|
+
edition_kind: "album" | "single" | "ep" | "compilation" | "live" | "remix" | "soundtrack" | "other" | null;
|
|
158
|
+
format: "cd" | "vinyl" | "cassette" | "digital" | "dvd" | "mixed" | "other" | null;
|
|
159
|
+
/** `false` for a release the provider marks unofficial, such as a bootleg. */
|
|
160
|
+
official: boolean | null;
|
|
161
|
+
/**
|
|
162
|
+
* The edition's release date, `YYYY-MM-DD`. Read it with `date_precision`: a
|
|
163
|
+
* month-precision date is reported as the first of the month.
|
|
164
|
+
*/
|
|
165
|
+
release_date: string | null;
|
|
166
|
+
date_precision: "day" | "month" | "year" | null;
|
|
167
|
+
/** Barcode or UPC, digits only, so editions can be matched across providers. */
|
|
168
|
+
barcode: string | null;
|
|
169
|
+
/** Where the edition was issued, as the provider names it. Not an ISO code. */
|
|
170
|
+
country: string | null;
|
|
171
|
+
/** How many discs, records or tapes the edition spans. */
|
|
172
|
+
medium_count: number | null;
|
|
173
|
+
/**
|
|
174
|
+
* The provider's own total for the edition, including tracks SonoVault does
|
|
175
|
+
* not hold. Compare with `tracks_on_row` to see the gap.
|
|
176
|
+
*/
|
|
177
|
+
track_count: number | null;
|
|
178
|
+
/** How many of this release's tracks sit on the edition. */
|
|
179
|
+
tracks_on_row: number;
|
|
180
|
+
}
|
|
123
181
|
interface Genre {
|
|
124
182
|
id: number;
|
|
125
183
|
name: string;
|
|
@@ -378,7 +436,14 @@ declare class SonoVault {
|
|
|
378
436
|
limit?: number;
|
|
379
437
|
cursor?: string;
|
|
380
438
|
}) => Promise<Page<Release>>;
|
|
381
|
-
|
|
439
|
+
/**
|
|
440
|
+
* One release with its tracklist and the editions behind it. Pass
|
|
441
|
+
* `edition` (an `id` from the response's `editions`) to render that
|
|
442
|
+
* edition's track numbering instead of the default consensus.
|
|
443
|
+
*/
|
|
444
|
+
get: (id: number, params?: {
|
|
445
|
+
edition?: number;
|
|
446
|
+
}) => Promise<Release>;
|
|
382
447
|
/** Newly released albums (GET /v1/releases/new). Paid tiers. */
|
|
383
448
|
latest: (params?: {
|
|
384
449
|
limit?: number;
|
|
@@ -505,4 +570,4 @@ declare function verifyWebhookSignature(options: {
|
|
|
505
570
|
*/
|
|
506
571
|
declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T>;
|
|
507
572
|
|
|
508
|
-
export { type Artist, type Genre, type IdentifyResponse, type IdentifyResult, type IswcLookupResponse, type Label, type Page, type PlatformLink, type PlatformLinksResponse, type Release, 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 };
|
|
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 };
|
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.1.0";
|
|
25
25
|
|
|
26
26
|
// src/client.ts
|
|
27
27
|
var SonoVault = class {
|
|
@@ -70,7 +70,12 @@ var SonoVault = class {
|
|
|
70
70
|
};
|
|
71
71
|
this.releases = {
|
|
72
72
|
search: (params) => this.request("/v1/releases/search", { query: params }),
|
|
73
|
-
|
|
73
|
+
/**
|
|
74
|
+
* One release with its tracklist and the editions behind it. Pass
|
|
75
|
+
* `edition` (an `id` from the response's `editions`) to render that
|
|
76
|
+
* edition's track numbering instead of the default consensus.
|
|
77
|
+
*/
|
|
78
|
+
get: (id, params = {}) => this.request(`/v1/releases/${id}`, { query: params }),
|
|
74
79
|
/** Newly released albums (GET /v1/releases/new). Paid tiers. */
|
|
75
80
|
latest: (params = {}) => this.request("/v1/releases/new", { query: params })
|
|
76
81
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonovault",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "TypeScript/Node client for the SonoVault music metadata API
|
|
3
|
+
"version": "4.1.0",
|
|
4
|
+
"description": "TypeScript/Node client for the SonoVault music metadata API \u2014 ISRC, ISWC, genre, labels, release dates, and cross-platform IDs for 93M+ tracks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"music",
|
|
7
7
|
"metadata",
|