@withpica/mcp-sdk 4.2.0 → 4.4.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
@@ -589,6 +589,8 @@ class WorksResource extends BaseResource {
589
589
  qp.set("has_publisher", String(params.has_publisher));
590
590
  if (params.has_lyrics !== undefined)
591
591
  qp.set("has_lyrics", String(params.has_lyrics));
592
+ if (params.has_audio !== undefined)
593
+ qp.set("has_audio", String(params.has_audio));
592
594
  const qs = qp.toString();
593
595
  return this.requestPaginated("GET", `/admin/works${qs ? `?${qs}` : ""}`);
594
596
  }
@@ -2817,6 +2819,20 @@ class BulkResource extends BaseResource {
2817
2819
  updates,
2818
2820
  });
2819
2821
  }
2822
+ /**
2823
+ * Like updateWorks, but the whole answer: updateWorks returns only the
2824
+ * updated works (`request()` narrows to `.data`), which drops `count` and
2825
+ * `refused`, so a caller can't tell which works were not updated.
2826
+ */
2827
+ async updateWorksWithResult(workIds, updates) {
2828
+ const json = await this.requestWithEnvelope("POST", "/admin/works/bulk-update", { ids: workIds, updates });
2829
+ return {
2830
+ data: Array.isArray(json.data) ? json.data : [],
2831
+ count: typeof json.count === "number" ? json.count : 0,
2832
+ refused: Array.isArray(json.refused) ? json.refused : [],
2833
+ ...(typeof json.message === "string" && { message: json.message }),
2834
+ };
2835
+ }
2820
2836
  async updatePeopleRoles(personIds, roles, action = "add") {
2821
2837
  return this.request("POST", "/admin/people/bulk-update-roles", {
2822
2838
  ids: personIds,