@withpica/mcp-sdk 3.14.0 → 3.16.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/dist/index.js CHANGED
@@ -391,6 +391,8 @@ class WorksResource extends BaseResource {
391
391
  qp.set("has_iswc", String(params.has_iswc));
392
392
  if (params.has_publisher !== undefined)
393
393
  qp.set("has_publisher", String(params.has_publisher));
394
+ if (params.has_lyrics !== undefined)
395
+ qp.set("has_lyrics", String(params.has_lyrics));
394
396
  const qs = qp.toString();
395
397
  return this.requestPaginated("GET", `/admin/works${qs ? `?${qs}` : ""}`);
396
398
  }
@@ -876,6 +878,18 @@ class AudioFilesResource extends BaseResource {
876
878
  async get(id) {
877
879
  return this.request("GET", `/admin/audio-files/${id}`);
878
880
  }
881
+ /**
882
+ * The stored Whisper transcript for one audio file, linked to a work or not.
883
+ *
884
+ * Until 2026-09-07 a transcript was readable only as `works.lyrics` after
885
+ * propagation, so a transcript on an unlinked file had no reader at all —
886
+ * 218 of 558 on prod. `has_transcript: false` is a normal answer, not an
887
+ * error, and `reaches_work` says whether this transcript can be seen
888
+ * anywhere else.
889
+ */
890
+ async getTranscript(id) {
891
+ return this.request("GET", `/admin/audio-files/${id}/transcript`);
892
+ }
879
893
  /**
880
894
  * Attach ALL orphan audio files whose suggested match is ISRC-high and
881
895
  * non-ambiguous, in one call. Pairings are recomputed server-side at
@@ -1747,6 +1761,8 @@ class HealthResource extends BaseResource {
1747
1761
  /**
1748
1762
  * ADR-273 — apply accepted fix actions from a prior plan. Requires planToken
1749
1763
  * from catalogHealthPlan; accept is a list of actionIds (or "all_safe_auto").
1764
+ * `selections` carries the human choice a resolve_person action needs
1765
+ * ({ actionId, chosenPersonId }); a selection also accepts its action.
1750
1766
  * Returns honest per-action met/unmet plus a fresh verdict.
1751
1767
  */
1752
1768
  async catalogHealthFix(body) {
@@ -3630,6 +3646,46 @@ class StatementsResource extends BaseResource {
3630
3646
  return this.request("POST", "/admin/statements/ingest-agent", payload);
3631
3647
  }
3632
3648
  }
3649
+ class SelectionsResource extends BaseResource {
3650
+ async list(params) {
3651
+ const qp = new URLSearchParams();
3652
+ if (params?.limit !== undefined)
3653
+ qp.set("limit", String(params.limit));
3654
+ if (params?.offset !== undefined)
3655
+ qp.set("offset", String(params.offset));
3656
+ const qs = qp.toString();
3657
+ const result = await this.request("GET", `/admin/selections${qs ? `?${qs}` : ""}`);
3658
+ return result.selections;
3659
+ }
3660
+ async create(data) {
3661
+ const result = await this.request("POST", "/admin/selections", data);
3662
+ return result.selection;
3663
+ }
3664
+ /**
3665
+ * Per-id read. `resolve: true` also resolves the predicate — the route
3666
+ * returns `{ selection, resolution }` instead of `{ selection }`, and
3667
+ * `resolution` is omitted below when the caller didn't ask for it.
3668
+ */
3669
+ async inspect(id, opts) {
3670
+ const qp = new URLSearchParams();
3671
+ if (opts?.resolve)
3672
+ qp.set("resolve", "true");
3673
+ if (opts?.limit !== undefined)
3674
+ qp.set("limit", String(opts.limit));
3675
+ if (opts?.offset !== undefined)
3676
+ qp.set("offset", String(opts.offset));
3677
+ const qs = qp.toString();
3678
+ const result = await this.request("GET", `/admin/selections/${id}${qs ? `?${qs}` : ""}`);
3679
+ return { selection: result.selection, resolution: result.resolution };
3680
+ }
3681
+ async update(id, data) {
3682
+ const result = await this.request("PATCH", `/admin/selections/${id}`, data);
3683
+ return result.selection;
3684
+ }
3685
+ async delete(id) {
3686
+ await this.request("DELETE", `/admin/selections/${id}`);
3687
+ }
3688
+ }
3633
3689
  class ShareLinksResource extends BaseResource {
3634
3690
  async list(params) {
3635
3691
  const qp = new URLSearchParams();
@@ -3962,6 +4018,8 @@ export class PicaClient {
3962
4018
  workForHire;
3963
4019
  royalties;
3964
4020
  statements;
4021
+ /** ADR-319 — saved catalog selections. */
4022
+ selections;
3965
4023
  shareLinks;
3966
4024
  consent;
3967
4025
  custody;
@@ -4076,6 +4134,7 @@ export class PicaClient {
4076
4134
  this.workForHire = new WorkForHireResource(baseUrl, config.apiKey, debug);
4077
4135
  this.royalties = new RoyaltiesResource(baseUrl, config.apiKey, debug);
4078
4136
  this.statements = new StatementsResource(baseUrl, config.apiKey, debug);
4137
+ this.selections = new SelectionsResource(baseUrl, config.apiKey, debug);
4079
4138
  this.shareLinks = new ShareLinksResource(baseUrl, config.apiKey, debug);
4080
4139
  this.consent = new ConsentResource(baseUrl, config.apiKey, debug);
4081
4140
  this.custody = new CustodyResource(baseUrl, config.apiKey, debug);