@withpica/mcp-sdk 3.27.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/CHANGELOG.md +53 -0
- package/dist/index.d.ts +146 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
-
|
|
722
|
-
|
|
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
|
-
|
|
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);
|
|
@@ -2428,6 +2458,21 @@ class FeedbackResource extends BaseResource {
|
|
|
2428
2458
|
async submit(params) {
|
|
2429
2459
|
return this.request("POST", "/feedback", params);
|
|
2430
2460
|
}
|
|
2461
|
+
/**
|
|
2462
|
+
* The caller's own reports in their organisation, newest first, with
|
|
2463
|
+
* what the PICA team did about each (status + the note written for
|
|
2464
|
+
* them), plus counts for the briefing. GET /api/feedback; never another
|
|
2465
|
+
* account's or organisation's reports.
|
|
2466
|
+
*/
|
|
2467
|
+
async list(params) {
|
|
2468
|
+
const qs = new URLSearchParams();
|
|
2469
|
+
if (params?.status)
|
|
2470
|
+
qs.set("status", params.status);
|
|
2471
|
+
if (params?.limit !== undefined)
|
|
2472
|
+
qs.set("limit", String(params.limit));
|
|
2473
|
+
const query = qs.toString();
|
|
2474
|
+
return this.request("GET", `/feedback${query ? `?${query}` : ""}`);
|
|
2475
|
+
}
|
|
2431
2476
|
}
|
|
2432
2477
|
class BillingResource extends BaseResource {
|
|
2433
2478
|
/**
|
|
@@ -4493,7 +4538,8 @@ class ShareLinksResource extends BaseResource {
|
|
|
4493
4538
|
}
|
|
4494
4539
|
/**
|
|
4495
4540
|
* Update a narrow subset of share-link fields (name, description,
|
|
4496
|
-
* personal_message, expires_at, max_views, is_active, password
|
|
4541
|
+
* personal_message, expires_at, max_views, is_active, password,
|
|
4542
|
+
* revoke_recipient_ids).
|
|
4497
4543
|
* Permission-bearing fields are not updatable post-create — revoke
|
|
4498
4544
|
* and recreate to change permissions.
|
|
4499
4545
|
*/
|
|
@@ -4846,6 +4892,7 @@ export class PicaClient {
|
|
|
4846
4892
|
groups;
|
|
4847
4893
|
assistantInteractions;
|
|
4848
4894
|
shareSend;
|
|
4895
|
+
removed;
|
|
4849
4896
|
accessSimulate;
|
|
4850
4897
|
approvals;
|
|
4851
4898
|
// Registration Integrity Floor (spec 2026-07-09, Task 8).
|
|
@@ -4957,6 +5004,7 @@ export class PicaClient {
|
|
|
4957
5004
|
this.groups = new GroupsResource(baseUrl, config.apiKey, debug);
|
|
4958
5005
|
this.assistantInteractions = new AssistantInteractionsResource(baseUrl, config.apiKey, debug);
|
|
4959
5006
|
this.shareSend = new ShareSendResource(baseUrl, config.apiKey, debug);
|
|
5007
|
+
this.removed = new RemovedResource(baseUrl, config.apiKey, debug);
|
|
4960
5008
|
this.accessSimulate = new AccessSimulateResource(baseUrl, config.apiKey, debug);
|
|
4961
5009
|
this.approvals = new ApprovalsResource(baseUrl, config.apiKey, debug);
|
|
4962
5010
|
this.integrity = new IntegrityResource(baseUrl, config.apiKey, debug);
|