sonovault 4.3.0 → 4.5.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 CHANGED
@@ -152,6 +152,8 @@ Runnable scripts live in [`examples/`](examples/): find an ISRC, resolve cross-p
152
152
  | `sv.genres` | `list` |
153
153
  | `sv.suggestions` | `submit`, `list` |
154
154
  | `sv.streams` | `create`, `list`, `get`, `update`, `history`, `report`, `live`, `stop` |
155
+
156
+ If a station moves to a new stream URL, `sv.streams.update(id, { url })` repoints the stream in place, keeping its id and history.
155
157
  | `sv.webhooks` | `create`, `list`, `get`, `update`, `delete`, `test`, `deliveries` |
156
158
 
157
159
  Some endpoints (audio identify, browse, stream monitoring) need a paid tier. See [pricing](https://sonovault.now/pricing). Everything else works on the free tier.
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.3.0";
53
+ var VERSION = "4.4.0";
54
54
 
55
55
  // src/client.ts
56
56
  var SonoVault = class {
@@ -130,6 +130,11 @@ var SonoVault = class {
130
130
  create: (body) => this.request("/v1/streams", { method: "POST", json: body }),
131
131
  list: () => this.request("/v1/streams"),
132
132
  get: (id) => this.request(`/v1/streams/${id}`),
133
+ /**
134
+ * Change a stream's `url`, `format`, `detection_mode` and/or
135
+ * `outage_notifications`. A new `url` keeps the stream's id, history and
136
+ * billing. Paid tiers.
137
+ */
133
138
  update: (id, body) => this.request(`/v1/streams/${id}`, { method: "PATCH", json: body }),
134
139
  history: (id, params = {}) => this.request(`/v1/streams/${id}/history`, { query: params }),
135
140
  report: (params) => this.request("/v1/streams/report", { query: params }),
package/dist/index.d.cts CHANGED
@@ -185,6 +185,15 @@ interface Release {
185
185
  * requested. Only returned by `releases.get()`.
186
186
  */
187
187
  edition?: number | null;
188
+ /**
189
+ * The UPC the release was delivered to digital stores with, picked from its
190
+ * digital editions (Beatport, then Apple Music, then Spotify, then
191
+ * MusicBrainz and Discogs digital editions whose title matches the release).
192
+ * 12 digits (UPC-A) when it fits, otherwise the 13-digit EAN. `null` when no
193
+ * digital edition carries one. Returned by `releases.get()` and
194
+ * `releases.new()`.
195
+ */
196
+ digital_upc?: string | null;
188
197
  [key: string]: unknown;
189
198
  }
190
199
  /**
@@ -195,7 +204,7 @@ interface Release {
195
204
  interface ReleaseEdition {
196
205
  id: number;
197
206
  /** The provider describing this edition. */
198
- source: "spotify" | "discogs" | "musicbrainz";
207
+ source: "spotify" | "discogs" | "musicbrainz" | "beatport" | "applemusic";
199
208
  /** The edition's ID at that provider. */
200
209
  external_id: string;
201
210
  /**
@@ -237,7 +246,7 @@ interface ReleaseEdition {
237
246
  id: number;
238
247
  name: string;
239
248
  } | null;
240
- /** The pressing's catalog number, from Discogs and MusicBrainz. */
249
+ /** The pressing's catalog number, from Discogs, MusicBrainz and Beatport. */
241
250
  catalog_no: string | null;
242
251
  }
243
252
  interface Genre {
@@ -267,9 +276,15 @@ interface PlatformLinksResponse {
267
276
  interface IswcLookupResponse {
268
277
  sonovault_id?: number;
269
278
  isrc?: string;
279
+ /**
280
+ * By ISRC: the works a source links to that exact ISRC (`basis: "isrc"`),
281
+ * or, when none is stated, every work on the recording (`basis: "recording"`).
282
+ * By id: every work on the recording.
283
+ */
270
284
  iswcs?: {
271
285
  iswc: string;
272
286
  title: string | null;
287
+ basis?: "isrc" | "recording";
273
288
  }[];
274
289
  [key: string]: unknown;
275
290
  }
@@ -352,6 +367,8 @@ interface StreamStatus extends Stream {
352
367
  */
353
368
  interface StreamUpdateResponse {
354
369
  id: string;
370
+ /** The stream URL now in force, as stored (it may be normalised). */
371
+ url?: string;
355
372
  format?: "electronic" | "classical" | "pop" | null;
356
373
  detection_mode?: "precise" | "balanced" | "broad";
357
374
  outage_notifications?: boolean;
@@ -537,6 +554,11 @@ declare class SonoVault {
537
554
  streams: Stream[];
538
555
  }>;
539
556
  get: (id: string) => Promise<StreamStatus>;
557
+ /**
558
+ * Change a stream's `url`, `format`, `detection_mode` and/or
559
+ * `outage_notifications`. A new `url` keeps the stream's id, history and
560
+ * billing. Paid tiers.
561
+ */
540
562
  update: (id: string, body: Record<string, unknown>) => Promise<StreamUpdateResponse>;
541
563
  history: (id: string, params?: {
542
564
  since?: string;
package/dist/index.d.ts CHANGED
@@ -185,6 +185,15 @@ interface Release {
185
185
  * requested. Only returned by `releases.get()`.
186
186
  */
187
187
  edition?: number | null;
188
+ /**
189
+ * The UPC the release was delivered to digital stores with, picked from its
190
+ * digital editions (Beatport, then Apple Music, then Spotify, then
191
+ * MusicBrainz and Discogs digital editions whose title matches the release).
192
+ * 12 digits (UPC-A) when it fits, otherwise the 13-digit EAN. `null` when no
193
+ * digital edition carries one. Returned by `releases.get()` and
194
+ * `releases.new()`.
195
+ */
196
+ digital_upc?: string | null;
188
197
  [key: string]: unknown;
189
198
  }
190
199
  /**
@@ -195,7 +204,7 @@ interface Release {
195
204
  interface ReleaseEdition {
196
205
  id: number;
197
206
  /** The provider describing this edition. */
198
- source: "spotify" | "discogs" | "musicbrainz";
207
+ source: "spotify" | "discogs" | "musicbrainz" | "beatport" | "applemusic";
199
208
  /** The edition's ID at that provider. */
200
209
  external_id: string;
201
210
  /**
@@ -237,7 +246,7 @@ interface ReleaseEdition {
237
246
  id: number;
238
247
  name: string;
239
248
  } | null;
240
- /** The pressing's catalog number, from Discogs and MusicBrainz. */
249
+ /** The pressing's catalog number, from Discogs, MusicBrainz and Beatport. */
241
250
  catalog_no: string | null;
242
251
  }
243
252
  interface Genre {
@@ -267,9 +276,15 @@ interface PlatformLinksResponse {
267
276
  interface IswcLookupResponse {
268
277
  sonovault_id?: number;
269
278
  isrc?: string;
279
+ /**
280
+ * By ISRC: the works a source links to that exact ISRC (`basis: "isrc"`),
281
+ * or, when none is stated, every work on the recording (`basis: "recording"`).
282
+ * By id: every work on the recording.
283
+ */
270
284
  iswcs?: {
271
285
  iswc: string;
272
286
  title: string | null;
287
+ basis?: "isrc" | "recording";
273
288
  }[];
274
289
  [key: string]: unknown;
275
290
  }
@@ -352,6 +367,8 @@ interface StreamStatus extends Stream {
352
367
  */
353
368
  interface StreamUpdateResponse {
354
369
  id: string;
370
+ /** The stream URL now in force, as stored (it may be normalised). */
371
+ url?: string;
355
372
  format?: "electronic" | "classical" | "pop" | null;
356
373
  detection_mode?: "precise" | "balanced" | "broad";
357
374
  outage_notifications?: boolean;
@@ -537,6 +554,11 @@ declare class SonoVault {
537
554
  streams: Stream[];
538
555
  }>;
539
556
  get: (id: string) => Promise<StreamStatus>;
557
+ /**
558
+ * Change a stream's `url`, `format`, `detection_mode` and/or
559
+ * `outage_notifications`. A new `url` keeps the stream's id, history and
560
+ * billing. Paid tiers.
561
+ */
540
562
  update: (id: string, body: Record<string, unknown>) => Promise<StreamUpdateResponse>;
541
563
  history: (id: string, params?: {
542
564
  since?: string;
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.3.0";
24
+ var VERSION = "4.4.0";
25
25
 
26
26
  // src/client.ts
27
27
  var SonoVault = class {
@@ -101,6 +101,11 @@ var SonoVault = class {
101
101
  create: (body) => this.request("/v1/streams", { method: "POST", json: body }),
102
102
  list: () => this.request("/v1/streams"),
103
103
  get: (id) => this.request(`/v1/streams/${id}`),
104
+ /**
105
+ * Change a stream's `url`, `format`, `detection_mode` and/or
106
+ * `outage_notifications`. A new `url` keeps the stream's id, history and
107
+ * billing. Paid tiers.
108
+ */
104
109
  update: (id, body) => this.request(`/v1/streams/${id}`, { method: "PATCH", json: body }),
105
110
  history: (id, params = {}) => this.request(`/v1/streams/${id}/history`, { query: params }),
106
111
  report: (params) => this.request("/v1/streams/report", { query: params }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sonovault",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
4
4
  "description": "TypeScript/Node client for the SonoVault music metadata API: ISRC, ISWC, genre, BPM, key, labels, release dates, and cross-platform IDs for 93M+ tracks.",
5
5
  "keywords": [
6
6
  "music",