@withpica/mcp-sdk 4.1.0 → 4.3.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
@@ -2817,6 +2817,20 @@ class BulkResource extends BaseResource {
2817
2817
  updates,
2818
2818
  });
2819
2819
  }
2820
+ /**
2821
+ * Like updateWorks, but the whole answer: updateWorks returns only the
2822
+ * updated works (`request()` narrows to `.data`), which drops `count` and
2823
+ * `refused`, so a caller can't tell which works were not updated.
2824
+ */
2825
+ async updateWorksWithResult(workIds, updates) {
2826
+ const json = await this.requestWithEnvelope("POST", "/admin/works/bulk-update", { ids: workIds, updates });
2827
+ return {
2828
+ data: Array.isArray(json.data) ? json.data : [],
2829
+ count: typeof json.count === "number" ? json.count : 0,
2830
+ refused: Array.isArray(json.refused) ? json.refused : [],
2831
+ ...(typeof json.message === "string" && { message: json.message }),
2832
+ };
2833
+ }
2820
2834
  async updatePeopleRoles(personIds, roles, action = "add") {
2821
2835
  return this.request("POST", "/admin/people/bulk-update-roles", {
2822
2836
  ids: personIds,
@@ -4549,6 +4563,14 @@ class StatementsResource extends BaseResource {
4549
4563
  async getImport(id) {
4550
4564
  return this.request("GET", `/admin/statements/imports/${encodeURIComponent(id)}`);
4551
4565
  }
4566
+ /**
4567
+ * Remove an imported statement: its royalty lines and payment total go
4568
+ * (one transaction); an uploaded statement document it came from stays.
4569
+ * Refused (409 IMPORT_RUNNING) while it is still importing.
4570
+ */
4571
+ async removeImport(importBatchId) {
4572
+ return this.request("DELETE", `/admin/statements/${encodeURIComponent(importBatchId)}`);
4573
+ }
4552
4574
  }
4553
4575
  class SelectionsResource extends BaseResource {
4554
4576
  async list(params) {