@withpica/mcp-sdk 3.28.0 → 4.0.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
@@ -577,6 +577,14 @@ class WorksResource extends BaseResource {
577
577
  async delete(id) {
578
578
  return this.request("DELETE", `/admin/works/${id}`);
579
579
  }
580
+ /**
581
+ * Bring back a removed song (removing never deletes one). 409 when a live
582
+ * song now holds its title and artist or its tunecode, or when it was
583
+ * merged into another song.
584
+ */
585
+ async restore(id) {
586
+ return this.request("POST", `/admin/works/${id}/restore`);
587
+ }
580
588
  /**
581
589
  * @deprecated `works` has no `is_verified` column, so PATCH /admin/works/[id]
582
590
  * refuses this body (VALIDATION_ERROR "unknown field 'is_verified'") on every
@@ -718,8 +726,18 @@ class PeopleResource extends BaseResource {
718
726
  async update(id, updates) {
719
727
  return this.request("PATCH", `/admin/people/${id}`, updates);
720
728
  }
721
- async delete(id) {
722
- await this.request("DELETE", `/admin/people/${id}`);
729
+ /**
730
+ * Remove a person. Someone who still has credits is refused (409
731
+ * PERSON_HOLDS_CREDITS, with what they hold) unless `moveTo` names the live
732
+ * person their credits move to; the removal is then a person merge.
733
+ */
734
+ async delete(id, opts = {}) {
735
+ const qs = opts.moveTo ? `?move_to=${encodeURIComponent(opts.moveTo)}` : "";
736
+ return this.request("DELETE", `/admin/people/${id}${qs}`);
737
+ }
738
+ /** Bring back a removed person. 409 when they were merged into another. */
739
+ async restore(id) {
740
+ return this.request("POST", `/admin/people/${id}/restore`);
723
741
  }
724
742
  async enrichFromISNI(id, isni) {
725
743
  return this.request("POST", `/admin/people/${id}/enrich/isni`, {
@@ -1471,9 +1489,21 @@ class WorkspaceResource extends BaseResource {
1471
1489
  return this.request("GET", `/admin/events?limit=${limit || 20}`);
1472
1490
  }
1473
1491
  }
1474
- // ---------------------------------------------------------------------------
1475
- // ADR-231 — User-initiated asset sharing (creator MCP)
1476
- // ---------------------------------------------------------------------------
1492
+ /** What has been removed from the catalogue and can be brought back. */
1493
+ class RemovedResource extends BaseResource {
1494
+ /** One page of removed songs (the default) or people, newest changed first. */
1495
+ async list(params = {}) {
1496
+ const qp = new URLSearchParams();
1497
+ if (params.kind)
1498
+ qp.set("kind", params.kind);
1499
+ if (params.limit !== undefined)
1500
+ qp.set("limit", String(params.limit));
1501
+ if (params.offset !== undefined)
1502
+ qp.set("offset", String(params.offset));
1503
+ const q = qp.toString();
1504
+ return this.request("GET", `/admin/removed${q ? `?${q}` : ""}`);
1505
+ }
1506
+ }
1477
1507
  class ShareSendResource extends BaseResource {
1478
1508
  async send(args) {
1479
1509
  return this.request("POST", "/mcp/share-send", args);
@@ -4508,7 +4538,8 @@ class ShareLinksResource extends BaseResource {
4508
4538
  }
4509
4539
  /**
4510
4540
  * Update a narrow subset of share-link fields (name, description,
4511
- * personal_message, expires_at, max_views, is_active, password).
4541
+ * personal_message, expires_at, max_views, is_active, password,
4542
+ * revoke_recipient_ids).
4512
4543
  * Permission-bearing fields are not updatable post-create — revoke
4513
4544
  * and recreate to change permissions.
4514
4545
  */
@@ -4861,6 +4892,7 @@ export class PicaClient {
4861
4892
  groups;
4862
4893
  assistantInteractions;
4863
4894
  shareSend;
4895
+ removed;
4864
4896
  accessSimulate;
4865
4897
  approvals;
4866
4898
  // Registration Integrity Floor (spec 2026-07-09, Task 8).
@@ -4972,6 +5004,7 @@ export class PicaClient {
4972
5004
  this.groups = new GroupsResource(baseUrl, config.apiKey, debug);
4973
5005
  this.assistantInteractions = new AssistantInteractionsResource(baseUrl, config.apiKey, debug);
4974
5006
  this.shareSend = new ShareSendResource(baseUrl, config.apiKey, debug);
5007
+ this.removed = new RemovedResource(baseUrl, config.apiKey, debug);
4975
5008
  this.accessSimulate = new AccessSimulateResource(baseUrl, config.apiKey, debug);
4976
5009
  this.approvals = new ApprovalsResource(baseUrl, config.apiKey, debug);
4977
5010
  this.integrity = new IntegrityResource(baseUrl, config.apiKey, debug);