@withpica/mcp-sdk 3.13.0 → 3.14.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 +15 -0
- package/dist/index.d.ts +51 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
PR #2118 (`fix/avatar-import-path-2026-09-03`) is merged into the release branch, so its changes ship in the version below; publish in the order mcp-utils → mcp-sdk → mcp-server.
|
|
15
|
+
|
|
16
|
+
## [3.14.0] - 2026-09-04
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- `MultimediaResource.importFromUrl` returns `MultimediaImportResult` (item + `via`, `source_url`, `profile_image`, `work_link` receipts) via `requestWithEnvelope` and accepts `person_id` (PR #2118, merged into this release).
|
|
21
|
+
- `requestWithEnvelope<T, TRest>` keeps top-level envelope fields (PR #2118).
|
|
22
|
+
|
|
23
|
+
- **`offset` on `AudioFilesResource.list()`, `NotesResource.list()`,
|
|
24
|
+
`SessionsResource.list()`** — companions to the mcp-server `offset`
|
|
25
|
+
additions on `pica_audio_query`/`pica_notes_query`/`pica_sessions_query`
|
|
26
|
+
(Task 10, 2026-09-03). Each forwards `offset` as a query-string param
|
|
27
|
+
exactly like the existing `limit`, omitted when not passed.
|
|
28
|
+
|
|
14
29
|
## [3.13.0] - 2026-08-26
|
|
15
30
|
|
|
16
31
|
The MPP pay rail (spec 2026-08-24 WS-B): a new resource to mint a pay link,
|
package/dist/index.d.ts
CHANGED
|
@@ -493,6 +493,37 @@ interface MultimediaItem {
|
|
|
493
493
|
created_at: string;
|
|
494
494
|
updated_at: string;
|
|
495
495
|
}
|
|
496
|
+
/**
|
|
497
|
+
* The full response of `POST /admin/multimedia/import-from-url`.
|
|
498
|
+
*
|
|
499
|
+
* The route returns the created row in `data` and its receipts as SIBLINGS
|
|
500
|
+
* of `data`: `via` (was the given URL a direct image, or a page whose
|
|
501
|
+
* declared og:image was followed?), the `source_url` actually downloaded,
|
|
502
|
+
* and the outcome of the two optional follow-on writes — `profile_image`
|
|
503
|
+
* (the person's avatar) and `work_link`. Those receipts are the only way a
|
|
504
|
+
* caller learns whether the artist photo was really set, so
|
|
505
|
+
* `MultimediaResource.importFromUrl` reads the whole envelope rather than
|
|
506
|
+
* `request()`'s `.data`. `item` is the created row (`data` on the wire).
|
|
507
|
+
*/
|
|
508
|
+
interface MultimediaImportResult {
|
|
509
|
+
item: MultimediaItem;
|
|
510
|
+
multimedia_id: string;
|
|
511
|
+
s3_url: string;
|
|
512
|
+
via: "direct" | "og:image";
|
|
513
|
+
source_url: string;
|
|
514
|
+
message: string;
|
|
515
|
+
profile_image?: {
|
|
516
|
+
person_id: string;
|
|
517
|
+
set: boolean;
|
|
518
|
+
code?: string;
|
|
519
|
+
reason?: string;
|
|
520
|
+
};
|
|
521
|
+
work_link?: {
|
|
522
|
+
work_id: string;
|
|
523
|
+
linked: boolean;
|
|
524
|
+
reason?: string;
|
|
525
|
+
};
|
|
526
|
+
}
|
|
496
527
|
interface Agreement {
|
|
497
528
|
id: string;
|
|
498
529
|
organisation_id: string;
|
|
@@ -861,12 +892,18 @@ declare class BaseResource {
|
|
|
861
892
|
* carries `twin`/`twin_error` as siblings of `data` — `request()`'s
|
|
862
893
|
* `return data.data || data` would otherwise silently drop them before
|
|
863
894
|
* the MCP tool ever sees a twin was created.
|
|
895
|
+
*
|
|
896
|
+
* `TRest` types any FURTHER siblings a specific route puts next to
|
|
897
|
+
* `data` (e.g. `POST /admin/multimedia/import-from-url` returns `via`,
|
|
898
|
+
* `source_url`, `profile_image`, `work_link`). It defaults to `unknown`,
|
|
899
|
+
* which is the identity for intersection, so the existing
|
|
900
|
+
* `requestWithEnvelope<Work>` call sites keep exactly the type they had.
|
|
864
901
|
*/
|
|
865
|
-
protected requestWithEnvelope<T>(method: string, path: string, body?: any): Promise<{
|
|
902
|
+
protected requestWithEnvelope<T, TRest = unknown>(method: string, path: string, body?: any): Promise<{
|
|
866
903
|
data: T;
|
|
867
904
|
twin?: unknown;
|
|
868
905
|
twin_error?: string;
|
|
869
|
-
}>;
|
|
906
|
+
} & TRest>;
|
|
870
907
|
/**
|
|
871
908
|
* Make a request whose SUCCESS body is raw text, not a JSON envelope —
|
|
872
909
|
* for routes that stream a generated file (e.g. `text/csv`) rather than
|
|
@@ -1479,6 +1516,7 @@ declare class AudioFilesResource extends BaseResource {
|
|
|
1479
1516
|
unassigned?: boolean;
|
|
1480
1517
|
query?: string;
|
|
1481
1518
|
limit?: number;
|
|
1519
|
+
offset?: number;
|
|
1482
1520
|
}): Promise<AudioFile[]>;
|
|
1483
1521
|
get(id: string): Promise<AudioFile>;
|
|
1484
1522
|
/**
|
|
@@ -1577,7 +1615,8 @@ declare class MultimediaResource extends BaseResource {
|
|
|
1577
1615
|
title?: string;
|
|
1578
1616
|
source?: string;
|
|
1579
1617
|
work_id?: string;
|
|
1580
|
-
|
|
1618
|
+
person_id?: string;
|
|
1619
|
+
}): Promise<MultimediaImportResult>;
|
|
1581
1620
|
linkYoutube(params: {
|
|
1582
1621
|
youtube_video_id: string;
|
|
1583
1622
|
title: string;
|
|
@@ -1795,6 +1834,7 @@ declare class NotesResource extends BaseResource {
|
|
|
1795
1834
|
work?: string;
|
|
1796
1835
|
person?: string;
|
|
1797
1836
|
limit?: number;
|
|
1837
|
+
offset?: number;
|
|
1798
1838
|
}): Promise<any[]>;
|
|
1799
1839
|
get(id: string): Promise<any>;
|
|
1800
1840
|
create(content: string, metadata?: {
|
|
@@ -3292,11 +3332,16 @@ interface ImportAnalysis {
|
|
|
3292
3332
|
};
|
|
3293
3333
|
}
|
|
3294
3334
|
interface ImportValidation {
|
|
3335
|
+
/** True when no row carries a severity "error" entry — warnings do not
|
|
3336
|
+
* invalidate a row, so `valid` can be true with `errors` non-empty. */
|
|
3295
3337
|
valid: boolean;
|
|
3296
3338
|
errors: Array<{
|
|
3297
3339
|
row: number;
|
|
3298
3340
|
field: string;
|
|
3299
|
-
message
|
|
3341
|
+
/** The server's ValidationError carries the text in `error`; `message`
|
|
3342
|
+
* is kept for callers that normalised it. Read `error ?? message`. */
|
|
3343
|
+
error?: string;
|
|
3344
|
+
message?: string;
|
|
3300
3345
|
severity: "error" | "warning";
|
|
3301
3346
|
}>;
|
|
3302
3347
|
validRowCount: number;
|
|
@@ -4405,6 +4450,7 @@ declare class ReleasesResource extends BaseResource {
|
|
|
4405
4450
|
declare class SessionsResource extends BaseResource {
|
|
4406
4451
|
list(params?: {
|
|
4407
4452
|
limit?: number;
|
|
4453
|
+
offset?: number;
|
|
4408
4454
|
}): Promise<any>;
|
|
4409
4455
|
get(id: string): Promise<any>;
|
|
4410
4456
|
create(data: Record<string, any>): Promise<any>;
|
|
@@ -4850,5 +4896,5 @@ export declare class PicaClient {
|
|
|
4850
4896
|
}): Promise<CatalogStats | Record<string, unknown>>;
|
|
4851
4897
|
constructor(config: PicaClientConfig);
|
|
4852
4898
|
}
|
|
4853
|
-
export type { Work, Person, Recording, PaginatedResult, PicaClientConfig, SyncSearchParams, SyncTrack, SyncSearchResult, LicenseEnquiryInput, LicenseEnquiry, BookingEnquiry, WorkCredit, WorkCreditsInput, PicaScore, PicaScorePillar, AudioFile, AudioAnalysisStatus, PresignedUploadResult, CompleteUploadResult, IdentifyResult, MultimediaItem, Agreement, AgreementWorkLink, CreateAgreementFromTemplateParams, AgreementSendForSignatureResult, AgreementSendForSignatureSentEntry, AgreementSendForSignatureSkippedEntry, AgreementSendForSignatureSkipReason, SyncPlacement, SyncPlacementSource, SyncPlacementRecording, SyncPlacementWithRelations, SyncPlacementContactInput, SyncPlacementRecordingInput, SyncPlacementSourceInput, CreateSyncPlacementInput, UpdateSyncPlacementInput, SyncPlacementQueryParams, SyncPlacementStatus, SyncPlacementVerificationStatus, SyncPlacementConfidentialityLevel, SyncPlacementSourceKind, CatalogStats, NotificationsSummary, CreateUploadSessionInput, CreateUploadSessionResult, };
|
|
4899
|
+
export type { Work, Person, Recording, PaginatedResult, PicaClientConfig, SyncSearchParams, SyncTrack, SyncSearchResult, LicenseEnquiryInput, LicenseEnquiry, BookingEnquiry, WorkCredit, WorkCreditsInput, PicaScore, PicaScorePillar, AudioFile, AudioAnalysisStatus, PresignedUploadResult, CompleteUploadResult, IdentifyResult, MultimediaItem, MultimediaImportResult, Agreement, AgreementWorkLink, CreateAgreementFromTemplateParams, AgreementSendForSignatureResult, AgreementSendForSignatureSentEntry, AgreementSendForSignatureSkippedEntry, AgreementSendForSignatureSkipReason, SyncPlacement, SyncPlacementSource, SyncPlacementRecording, SyncPlacementWithRelations, SyncPlacementContactInput, SyncPlacementRecordingInput, SyncPlacementSourceInput, CreateSyncPlacementInput, UpdateSyncPlacementInput, SyncPlacementQueryParams, SyncPlacementStatus, SyncPlacementVerificationStatus, SyncPlacementConfidentialityLevel, SyncPlacementSourceKind, CatalogStats, NotificationsSummary, CreateUploadSessionInput, CreateUploadSessionResult, };
|
|
4854
4900
|
//# sourceMappingURL=index.d.ts.map
|