@withpica/mcp-server 1.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/.claude/settings.local.json +5 -0
- package/CHANGELOG.md +1850 -0
- package/README.md +304 -0
- package/assets/fonts/GeistSans-Light.woff2 +0 -0
- package/assets/fonts/InstrumentSerif-Italic.woff2 +0 -0
- package/assets/fonts/InstrumentSerif-Regular.woff2 +0 -0
- package/dist/apps/download.d.ts +2 -0
- package/dist/apps/download.d.ts.map +1 -0
- package/dist/apps/download.js +125 -0
- package/dist/apps/download.js.map +1 -0
- package/dist/apps/generated/shared-bundle.d.ts +5 -0
- package/dist/apps/generated/shared-bundle.d.ts.map +1 -0
- package/dist/apps/generated/shared-bundle.js +7 -0
- package/dist/apps/generated/shared-bundle.js.map +1 -0
- package/dist/apps/release.d.ts +2 -0
- package/dist/apps/release.d.ts.map +1 -0
- package/dist/apps/release.js +69 -0
- package/dist/apps/release.js.map +1 -0
- package/dist/apps/shared.d.ts +15 -0
- package/dist/apps/shared.d.ts.map +1 -0
- package/dist/apps/shared.js +480 -0
- package/dist/apps/shared.js.map +1 -0
- package/dist/apps/upload.d.ts +2 -0
- package/dist/apps/upload.d.ts.map +1 -0
- package/dist/apps/upload.js +280 -0
- package/dist/apps/upload.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +73 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +86 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +645 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/agent-guide.d.ts +15 -0
- package/dist/resources/agent-guide.d.ts.map +1 -0
- package/dist/resources/agent-guide.js +284 -0
- package/dist/resources/agent-guide.js.map +1 -0
- package/dist/resources/index.d.ts +66 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +510 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/llms-primer.d.ts +2 -0
- package/dist/resources/llms-primer.d.ts.map +1 -0
- package/dist/resources/llms-primer.js +68 -0
- package/dist/resources/llms-primer.js.map +1 -0
- package/dist/resources/required-schemas.generated.d.ts +455 -0
- package/dist/resources/required-schemas.generated.d.ts.map +1 -0
- package/dist/resources/required-schemas.generated.js +1041 -0
- package/dist/resources/required-schemas.generated.js.map +1 -0
- package/dist/resources/required-schemas.source.d.ts +53 -0
- package/dist/resources/required-schemas.source.d.ts.map +1 -0
- package/dist/resources/required-schemas.source.js +493 -0
- package/dist/resources/required-schemas.source.js.map +1 -0
- package/dist/resources/welcome.d.ts +14 -0
- package/dist/resources/welcome.d.ts.map +1 -0
- package/dist/resources/welcome.js +26 -0
- package/dist/resources/welcome.js.map +1 -0
- package/dist/server-instructions.d.ts +60 -0
- package/dist/server-instructions.d.ts.map +1 -0
- package/dist/server-instructions.js +93 -0
- package/dist/server-instructions.js.map +1 -0
- package/dist/server.d.ts +52 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +334 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/access-simulate.d.ts +23 -0
- package/dist/tools/access-simulate.d.ts.map +1 -0
- package/dist/tools/access-simulate.js +162 -0
- package/dist/tools/access-simulate.js.map +1 -0
- package/dist/tools/agent-identity.d.ts +36 -0
- package/dist/tools/agent-identity.d.ts.map +1 -0
- package/dist/tools/agent-identity.js +274 -0
- package/dist/tools/agent-identity.js.map +1 -0
- package/dist/tools/agreement-types.d.ts +27 -0
- package/dist/tools/agreement-types.d.ts.map +1 -0
- package/dist/tools/agreement-types.js +281 -0
- package/dist/tools/agreement-types.js.map +1 -0
- package/dist/tools/agreements.d.ts +20 -0
- package/dist/tools/agreements.d.ts.map +1 -0
- package/dist/tools/agreements.js +282 -0
- package/dist/tools/agreements.js.map +1 -0
- package/dist/tools/analytics.d.ts +20 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +130 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/app-tools.d.ts +15 -0
- package/dist/tools/app-tools.d.ts.map +1 -0
- package/dist/tools/app-tools.js +388 -0
- package/dist/tools/app-tools.js.map +1 -0
- package/dist/tools/assets.d.ts +25 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js +454 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/audio-files.d.ts +20 -0
- package/dist/tools/audio-files.d.ts.map +1 -0
- package/dist/tools/audio-files.js +409 -0
- package/dist/tools/audio-files.js.map +1 -0
- package/dist/tools/audit.d.ts +19 -0
- package/dist/tools/audit.d.ts.map +1 -0
- package/dist/tools/audit.js +58 -0
- package/dist/tools/audit.js.map +1 -0
- package/dist/tools/auth.d.ts +22 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +212 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/bulk.d.ts +22 -0
- package/dist/tools/bulk.d.ts.map +1 -0
- package/dist/tools/bulk.js +164 -0
- package/dist/tools/bulk.js.map +1 -0
- package/dist/tools/calendar.d.ts +15 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +68 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/collaborators.d.ts +21 -0
- package/dist/tools/collaborators.d.ts.map +1 -0
- package/dist/tools/collaborators.js +381 -0
- package/dist/tools/collaborators.js.map +1 -0
- package/dist/tools/comparisons.d.ts +22 -0
- package/dist/tools/comparisons.d.ts.map +1 -0
- package/dist/tools/comparisons.js +80 -0
- package/dist/tools/comparisons.js.map +1 -0
- package/dist/tools/credits.d.ts +39 -0
- package/dist/tools/credits.d.ts.map +1 -0
- package/dist/tools/credits.js +541 -0
- package/dist/tools/credits.js.map +1 -0
- package/dist/tools/custody-hints.d.ts +16 -0
- package/dist/tools/custody-hints.d.ts.map +1 -0
- package/dist/tools/custody-hints.js +27 -0
- package/dist/tools/custody-hints.js.map +1 -0
- package/dist/tools/custody.d.ts +38 -0
- package/dist/tools/custody.d.ts.map +1 -0
- package/dist/tools/custody.js +281 -0
- package/dist/tools/custody.js.map +1 -0
- package/dist/tools/dashboard.d.ts +22 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +258 -0
- package/dist/tools/dashboard.js.map +1 -0
- package/dist/tools/directory.d.ts +15 -0
- package/dist/tools/directory.d.ts.map +1 -0
- package/dist/tools/directory.js +107 -0
- package/dist/tools/directory.js.map +1 -0
- package/dist/tools/discovery.d.ts +49 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +851 -0
- package/dist/tools/discovery.js.map +1 -0
- package/dist/tools/disputes.d.ts +18 -0
- package/dist/tools/disputes.d.ts.map +1 -0
- package/dist/tools/disputes.js +62 -0
- package/dist/tools/disputes.js.map +1 -0
- package/dist/tools/documents.d.ts +15 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +37 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/duplicates.d.ts +25 -0
- package/dist/tools/duplicates.d.ts.map +1 -0
- package/dist/tools/duplicates.js +108 -0
- package/dist/tools/duplicates.js.map +1 -0
- package/dist/tools/enrichment.d.ts +56 -0
- package/dist/tools/enrichment.d.ts.map +1 -0
- package/dist/tools/enrichment.js +616 -0
- package/dist/tools/enrichment.js.map +1 -0
- package/dist/tools/exports.d.ts +19 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/exports.js +184 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/feedback.d.ts +22 -0
- package/dist/tools/feedback.d.ts.map +1 -0
- package/dist/tools/feedback.js +100 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/forbidden-keywords.d.ts +62 -0
- package/dist/tools/forbidden-keywords.d.ts.map +1 -0
- package/dist/tools/forbidden-keywords.js +99 -0
- package/dist/tools/forbidden-keywords.js.map +1 -0
- package/dist/tools/gap-hints.d.ts +53 -0
- package/dist/tools/gap-hints.d.ts.map +1 -0
- package/dist/tools/gap-hints.js +245 -0
- package/dist/tools/gap-hints.js.map +1 -0
- package/dist/tools/groups.d.ts +29 -0
- package/dist/tools/groups.d.ts.map +1 -0
- package/dist/tools/groups.js +186 -0
- package/dist/tools/groups.js.map +1 -0
- package/dist/tools/import-documents.d.ts +21 -0
- package/dist/tools/import-documents.d.ts.map +1 -0
- package/dist/tools/import-documents.js +206 -0
- package/dist/tools/import-documents.js.map +1 -0
- package/dist/tools/import.d.ts +31 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +610 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/index.d.ts +293 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +1182 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integrations.d.ts +19 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +120 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/labels.d.ts +20 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +48 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/licensing.d.ts +40 -0
- package/dist/tools/licensing.d.ts.map +1 -0
- package/dist/tools/licensing.js +436 -0
- package/dist/tools/licensing.js.map +1 -0
- package/dist/tools/memory.d.ts +21 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +120 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/metadata.d.ts +15 -0
- package/dist/tools/metadata.d.ts.map +1 -0
- package/dist/tools/metadata.js +1532 -0
- package/dist/tools/metadata.js.map +1 -0
- package/dist/tools/multimedia.d.ts +19 -0
- package/dist/tools/multimedia.d.ts.map +1 -0
- package/dist/tools/multimedia.js +371 -0
- package/dist/tools/multimedia.js.map +1 -0
- package/dist/tools/my-reported-issues.d.ts +32 -0
- package/dist/tools/my-reported-issues.d.ts.map +1 -0
- package/dist/tools/my-reported-issues.js +123 -0
- package/dist/tools/my-reported-issues.js.map +1 -0
- package/dist/tools/notes.d.ts +21 -0
- package/dist/tools/notes.d.ts.map +1 -0
- package/dist/tools/notes.js +115 -0
- package/dist/tools/notes.js.map +1 -0
- package/dist/tools/notifications.d.ts +28 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +417 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/onboarding.d.ts +24 -0
- package/dist/tools/onboarding.d.ts.map +1 -0
- package/dist/tools/onboarding.js +81 -0
- package/dist/tools/onboarding.js.map +1 -0
- package/dist/tools/people.d.ts +254 -0
- package/dist/tools/people.d.ts.map +1 -0
- package/dist/tools/people.js +481 -0
- package/dist/tools/people.js.map +1 -0
- package/dist/tools/projects.d.ts +20 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +316 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/public-filter.d.ts +43 -0
- package/dist/tools/public-filter.d.ts.map +1 -0
- package/dist/tools/public-filter.js +356 -0
- package/dist/tools/public-filter.js.map +1 -0
- package/dist/tools/publishers.d.ts +30 -0
- package/dist/tools/publishers.d.ts.map +1 -0
- package/dist/tools/publishers.js +105 -0
- package/dist/tools/publishers.js.map +1 -0
- package/dist/tools/purchases.d.ts +27 -0
- package/dist/tools/purchases.d.ts.map +1 -0
- package/dist/tools/purchases.js +9 -0
- package/dist/tools/purchases.js.map +1 -0
- package/dist/tools/recording-attribution-hints.d.ts +24 -0
- package/dist/tools/recording-attribution-hints.d.ts.map +1 -0
- package/dist/tools/recording-attribution-hints.js +27 -0
- package/dist/tools/recording-attribution-hints.js.map +1 -0
- package/dist/tools/recordings.d.ts +96 -0
- package/dist/tools/recordings.d.ts.map +1 -0
- package/dist/tools/recordings.js +564 -0
- package/dist/tools/recordings.js.map +1 -0
- package/dist/tools/recovery-hints.d.ts +40 -0
- package/dist/tools/recovery-hints.d.ts.map +1 -0
- package/dist/tools/recovery-hints.js +827 -0
- package/dist/tools/recovery-hints.js.map +1 -0
- package/dist/tools/release-rich.d.ts +31 -0
- package/dist/tools/release-rich.d.ts.map +1 -0
- package/dist/tools/release-rich.js +245 -0
- package/dist/tools/release-rich.js.map +1 -0
- package/dist/tools/releases.d.ts +36 -0
- package/dist/tools/releases.d.ts.map +1 -0
- package/dist/tools/releases.js +649 -0
- package/dist/tools/releases.js.map +1 -0
- package/dist/tools/report-issue.d.ts +21 -0
- package/dist/tools/report-issue.d.ts.map +1 -0
- package/dist/tools/report-issue.js +101 -0
- package/dist/tools/report-issue.js.map +1 -0
- package/dist/tools/royalties.d.ts +23 -0
- package/dist/tools/royalties.d.ts.map +1 -0
- package/dist/tools/royalties.js +262 -0
- package/dist/tools/royalties.js.map +1 -0
- package/dist/tools/search.d.ts +30 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +115 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/send.d.ts +17 -0
- package/dist/tools/send.d.ts.map +1 -0
- package/dist/tools/send.js +188 -0
- package/dist/tools/send.js.map +1 -0
- package/dist/tools/sessions.d.ts +18 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +153 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/settings.d.ts +23 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +365 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/share-links.d.ts +22 -0
- package/dist/tools/share-links.d.ts.map +1 -0
- package/dist/tools/share-links.js +188 -0
- package/dist/tools/share-links.js.map +1 -0
- package/dist/tools/signup.d.ts +26 -0
- package/dist/tools/signup.d.ts.map +1 -0
- package/dist/tools/signup.js +266 -0
- package/dist/tools/signup.js.map +1 -0
- package/dist/tools/split-sheets.d.ts +25 -0
- package/dist/tools/split-sheets.d.ts.map +1 -0
- package/dist/tools/split-sheets.js +309 -0
- package/dist/tools/split-sheets.js.map +1 -0
- package/dist/tools/storage-config.d.ts +13 -0
- package/dist/tools/storage-config.d.ts.map +1 -0
- package/dist/tools/storage-config.js +245 -0
- package/dist/tools/storage-config.js.map +1 -0
- package/dist/tools/subscription.d.ts +60 -0
- package/dist/tools/subscription.d.ts.map +1 -0
- package/dist/tools/subscription.js +440 -0
- package/dist/tools/subscription.js.map +1 -0
- package/dist/tools/sync-placements.d.ts +31 -0
- package/dist/tools/sync-placements.d.ts.map +1 -0
- package/dist/tools/sync-placements.js +431 -0
- package/dist/tools/sync-placements.js.map +1 -0
- package/dist/tools/team.d.ts +22 -0
- package/dist/tools/team.d.ts.map +1 -0
- package/dist/tools/team.js +144 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/telegram.d.ts +21 -0
- package/dist/tools/telegram.d.ts.map +1 -0
- package/dist/tools/telegram.js +144 -0
- package/dist/tools/telegram.js.map +1 -0
- package/dist/tools/uploads.d.ts +17 -0
- package/dist/tools/uploads.d.ts.map +1 -0
- package/dist/tools/uploads.js +165 -0
- package/dist/tools/uploads.js.map +1 -0
- package/dist/tools/works.d.ts +71 -0
- package/dist/tools/works.d.ts.map +1 -0
- package/dist/tools/works.js +694 -0
- package/dist/tools/works.js.map +1 -0
- package/package.json +54 -0
- package/scripts/build-required-schemas.ts +233 -0
- package/scripts/bundle-apps.ts +61 -0
- package/scripts/refresh-schema-mirror.ts +182 -0
- package/server.json +20 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { elicitBulkConfirmation, formatSuccess, formatList, } from "@withpica/mcp-utils";
|
|
3
|
+
export class CollaboratorsTools {
|
|
4
|
+
pica;
|
|
5
|
+
constructor(pica) {
|
|
6
|
+
this.pica = pica;
|
|
7
|
+
}
|
|
8
|
+
getTools() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
definition: {
|
|
12
|
+
name: "pica_collaborators_invite",
|
|
13
|
+
description: "Invite a collaborator to a work by email. Creates the person if they don't exist, sends an invite email, and sets up their credit on the work. Requires the work ID, person details (name + email), the inviter's person ID, and credit details.",
|
|
14
|
+
workflows: "infrastructure",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
work_id: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "The work ID to invite the collaborator to",
|
|
21
|
+
},
|
|
22
|
+
name: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Full name of the collaborator",
|
|
25
|
+
},
|
|
26
|
+
email: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Email address of the collaborator",
|
|
29
|
+
},
|
|
30
|
+
role: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Role on the work (e.g. 'producer', 'songwriter', 'drummer', 'vocalist')",
|
|
33
|
+
},
|
|
34
|
+
invited_by: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "Person ID of the person sending the invite (the catalog owner). Use pica_people_query to find this ID.",
|
|
37
|
+
},
|
|
38
|
+
credit_type: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Type of credit (e.g. 'production', 'songwriting', 'drums', 'vocals', 'mixing')",
|
|
41
|
+
},
|
|
42
|
+
percentage_split: {
|
|
43
|
+
type: "number",
|
|
44
|
+
description: "Percentage split for this credit (0-100)",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: ["work_id", "name", "email", "invited_by", "credit_type"],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
executor: this.inviteCollaborator.bind(this),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
definition: {
|
|
54
|
+
name: "pica_collaborators_invites_list",
|
|
55
|
+
description: "Sender-side: list collaboration invites you have sent. Filter by status (pending / verified / confirmed / expired / cancelled / disputed) or by work. For the recipient-side equivalent see pica_collaborators_incoming_list.",
|
|
56
|
+
workflows: "infrastructure",
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: "object",
|
|
59
|
+
properties: {
|
|
60
|
+
status: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "Filter by status (default: 'pending')",
|
|
63
|
+
enum: [
|
|
64
|
+
"pending",
|
|
65
|
+
"verified",
|
|
66
|
+
"confirmed",
|
|
67
|
+
"expired",
|
|
68
|
+
"cancelled",
|
|
69
|
+
"disputed",
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
work_id: {
|
|
73
|
+
type: "string",
|
|
74
|
+
description: "Filter invites for a specific work",
|
|
75
|
+
},
|
|
76
|
+
limit: {
|
|
77
|
+
type: "number",
|
|
78
|
+
description: "Maximum results to return (default: 50, max: 100)",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
executor: this.listInvites.bind(this),
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
definition: {
|
|
87
|
+
name: "pica_collaborators_incoming_list",
|
|
88
|
+
description: "List collaboration invites addressed to YOUR email across every inviting org. Returns pending invites by default — pass status to see disputed/confirmed history. Each row includes work_title, inviter_org_name, credit_type, and percentage_split so you can decide whether to accept.",
|
|
89
|
+
workflows: "infrastructure",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
status: {
|
|
94
|
+
type: "string",
|
|
95
|
+
description: "Filter by status (default: 'pending')",
|
|
96
|
+
enum: [
|
|
97
|
+
"pending",
|
|
98
|
+
"verified",
|
|
99
|
+
"confirmed",
|
|
100
|
+
"expired",
|
|
101
|
+
"cancelled",
|
|
102
|
+
"disputed",
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
limit: {
|
|
106
|
+
type: "number",
|
|
107
|
+
description: "Maximum results to return (default: 50, max: 100)",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
executor: this.listIncoming.bind(this),
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
definition: {
|
|
116
|
+
name: "pica_collaborators_accept",
|
|
117
|
+
description: "Accept a collaboration invite addressed to your email. Writes a real work_credits row on the inviter's work and notifies them. Fails if the invite is not addressed to your authenticated email. Use pica_collaborators_incoming_list to find the invite_id first.",
|
|
118
|
+
workflows: "infrastructure",
|
|
119
|
+
inputSchema: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
invite_id: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "The invite id to accept",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
required: ["invite_id"],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
executor: this.acceptInvite.bind(this),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
definition: {
|
|
134
|
+
name: "pica_collaborators_dispute",
|
|
135
|
+
description: 'Dispute a collaboration invite addressed to your email ("that\'s not me" or "I wasn\'t on this work"). Flips the invite to disputed and notifies the inviter. Does NOT create any credits.',
|
|
136
|
+
workflows: "infrastructure",
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: "object",
|
|
139
|
+
properties: {
|
|
140
|
+
invite_id: {
|
|
141
|
+
type: "string",
|
|
142
|
+
description: "The invite id to dispute",
|
|
143
|
+
},
|
|
144
|
+
reason: {
|
|
145
|
+
type: "string",
|
|
146
|
+
description: "Optional freeform reason for the dispute",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
required: ["invite_id"],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
executor: this.disputeInvite.bind(this),
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
definition: {
|
|
156
|
+
name: "pica_collaborators_invite_bulk",
|
|
157
|
+
description: "Send multiple collaboration invites in one call. Thin wrapper over pica_collaborators_invite — same per-row schema, returns per-row { ok, email, invite?, error? } so partial failures are visible.",
|
|
158
|
+
workflows: "infrastructure",
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: "object",
|
|
161
|
+
properties: {
|
|
162
|
+
invites: {
|
|
163
|
+
type: "array",
|
|
164
|
+
description: "Array of invites to send",
|
|
165
|
+
items: {
|
|
166
|
+
type: "object",
|
|
167
|
+
properties: {
|
|
168
|
+
work_id: {
|
|
169
|
+
type: "string",
|
|
170
|
+
description: "UUID of the work to invite the collaborator to",
|
|
171
|
+
},
|
|
172
|
+
name: {
|
|
173
|
+
type: "string",
|
|
174
|
+
description: "Full name of the collaborator",
|
|
175
|
+
},
|
|
176
|
+
email: {
|
|
177
|
+
type: "string",
|
|
178
|
+
description: "Email address to send the invite to",
|
|
179
|
+
},
|
|
180
|
+
role: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "Role on the work (e.g. writer, producer)",
|
|
183
|
+
},
|
|
184
|
+
invited_by: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "Name of the person sending the invite",
|
|
187
|
+
},
|
|
188
|
+
credit_type: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description: "Type of credit (e.g. writer, composer, producer)",
|
|
191
|
+
},
|
|
192
|
+
percentage_split: {
|
|
193
|
+
type: "number",
|
|
194
|
+
description: "Split percentage (0-100)",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
required: [
|
|
198
|
+
"work_id",
|
|
199
|
+
"name",
|
|
200
|
+
"email",
|
|
201
|
+
"invited_by",
|
|
202
|
+
"credit_type",
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
dry_run: {
|
|
207
|
+
type: "boolean",
|
|
208
|
+
description: "When true, returns { dry_run: true, would_affect, sample } without sending any invite emails. Bulk invites send real email — preview before committing.",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
required: ["invites"],
|
|
212
|
+
},
|
|
213
|
+
previewMode: "dry_run",
|
|
214
|
+
},
|
|
215
|
+
executor: this.inviteBulk.bind(this),
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
definition: {
|
|
219
|
+
name: "pica_collaborators_invite_resend",
|
|
220
|
+
description: "Resend a pending collaboration invite. Regenerates the invite token and sends a new email.",
|
|
221
|
+
workflows: "infrastructure",
|
|
222
|
+
inputSchema: {
|
|
223
|
+
type: "object",
|
|
224
|
+
properties: {
|
|
225
|
+
invite_id: {
|
|
226
|
+
type: "string",
|
|
227
|
+
description: "The invite ID to resend",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
required: ["invite_id"],
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
executor: this.resendInvite.bind(this),
|
|
234
|
+
},
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
async inviteCollaborator(args) {
|
|
238
|
+
const result = await this.pica.collaborators.invite({
|
|
239
|
+
workId: args.work_id,
|
|
240
|
+
personData: {
|
|
241
|
+
name: args.name,
|
|
242
|
+
email: args.email,
|
|
243
|
+
role: args.role,
|
|
244
|
+
},
|
|
245
|
+
invitedBy: args.invited_by,
|
|
246
|
+
creditData: {
|
|
247
|
+
credit_type: args.credit_type,
|
|
248
|
+
percentage_split: args.percentage_split,
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
const hints = [
|
|
252
|
+
{
|
|
253
|
+
gap: "collaborator_missing_identifiers",
|
|
254
|
+
suggestion: `Enrich ${args.name} with ISNI or IPI for royalty collection (pica_resolve_person)`,
|
|
255
|
+
severity: "important",
|
|
256
|
+
},
|
|
257
|
+
];
|
|
258
|
+
return formatSuccess(`Invite sent to ${args.name} (${args.email}) for credit "${args.credit_type}" on work ${args.work_id}.`, result, hints);
|
|
259
|
+
}
|
|
260
|
+
async listInvites(args) {
|
|
261
|
+
// ADR-157 sub-step 4b (superseded form): the original plan surfaced
|
|
262
|
+
// an "events since last review" watermark hint, but sub-step 4a
|
|
263
|
+
// already delivers confirmed/disputed receipts instantly via
|
|
264
|
+
// Telegram — making the duplicated completion-hint surface
|
|
265
|
+
// redundant. ADR-160 reinforces the receipts-layer principle. All
|
|
266
|
+
// that remains is nudging unpaired orgs towards Telegram, via a
|
|
267
|
+
// single parallel call to the existing telegram status endpoint.
|
|
268
|
+
// Status-check failure degrades to "no nudge" so the primary read
|
|
269
|
+
// path stays resilient.
|
|
270
|
+
const [invites, telegramStatus] = await Promise.all([
|
|
271
|
+
this.pica.collaborators.listInvites({
|
|
272
|
+
status: args.status,
|
|
273
|
+
workId: args.work_id,
|
|
274
|
+
limit: args.limit,
|
|
275
|
+
}),
|
|
276
|
+
this.pica.telegram.getStatus().catch(() => null),
|
|
277
|
+
]);
|
|
278
|
+
const hints = [];
|
|
279
|
+
if (telegramStatus && telegramStatus.connected === false) {
|
|
280
|
+
hints.push({
|
|
281
|
+
gap: "telegram_not_connected",
|
|
282
|
+
suggestion: "Want collaborator accept/dispute receipts delivered instantly? Pair Telegram with pica_telegram_connect — the message body is the receipt, no dashboard trip.",
|
|
283
|
+
severity: "nice_to_have",
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
return formatList(invites, {
|
|
287
|
+
status: args.status || "pending",
|
|
288
|
+
completion_hints: hints,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
async resendInvite(args) {
|
|
292
|
+
const result = await this.pica.collaborators.resendInvite(args.invite_id);
|
|
293
|
+
return formatSuccess(`Invite ${args.invite_id} resent successfully.`, result);
|
|
294
|
+
}
|
|
295
|
+
async listIncoming(args) {
|
|
296
|
+
const invites = await this.pica.collaborators.listIncoming({
|
|
297
|
+
status: args.status,
|
|
298
|
+
limit: args.limit,
|
|
299
|
+
});
|
|
300
|
+
const hints = [];
|
|
301
|
+
if (invites.length > 0) {
|
|
302
|
+
hints.push({
|
|
303
|
+
gap: "pending_incoming_invites",
|
|
304
|
+
suggestion: `You have ${invites.length} pending invite${invites.length === 1 ? "" : "s"}. Accept with pica_collaborators_accept or reject with pica_collaborators_dispute.`,
|
|
305
|
+
severity: "important",
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
return formatList(invites, {
|
|
309
|
+
status: args.status || "pending",
|
|
310
|
+
count: invites.length,
|
|
311
|
+
completion_hints: hints,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
async acceptInvite(args) {
|
|
315
|
+
const result = await this.pica.collaborators.accept(args.invite_id);
|
|
316
|
+
const hints = [
|
|
317
|
+
{
|
|
318
|
+
gap: "credit_attested",
|
|
319
|
+
suggestion: "Your credit is now live on the inviter's work. Use pica_works_query to see works you're credited on.",
|
|
320
|
+
severity: "nice_to_have",
|
|
321
|
+
},
|
|
322
|
+
];
|
|
323
|
+
return formatSuccess(`Invite ${args.invite_id} accepted. Credit written.`, result, hints);
|
|
324
|
+
}
|
|
325
|
+
async disputeInvite(args) {
|
|
326
|
+
const result = await this.pica.collaborators.dispute(args.invite_id, args.reason);
|
|
327
|
+
return formatSuccess(`Invite ${args.invite_id} disputed. The inviter has been notified.`, result);
|
|
328
|
+
}
|
|
329
|
+
async inviteBulk(args, ctx) {
|
|
330
|
+
// ADR-199 Stream 5b — dry_run preview before invite-email send.
|
|
331
|
+
// Bulk invites send real email through Postmark; dry_run lets the
|
|
332
|
+
// caller verify the recipient list before triggering the send.
|
|
333
|
+
if (args.dry_run === true) {
|
|
334
|
+
const invites = args.invites || [];
|
|
335
|
+
const sample = invites.slice(0, 3).map((i) => ({
|
|
336
|
+
email: i.email,
|
|
337
|
+
name: i.name,
|
|
338
|
+
work_id: i.work_id,
|
|
339
|
+
credit_type: i.credit_type,
|
|
340
|
+
}));
|
|
341
|
+
return formatSuccess(`Dry run — would send ${invites.length} collaboration invite(s)`, {
|
|
342
|
+
dry_run: true,
|
|
343
|
+
would_affect: invites.map((i) => i.email),
|
|
344
|
+
sample,
|
|
345
|
+
target_count: invites.length,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
// ADR-200 Phase 1 — Class D form-confirmation gate. Bulk invites
|
|
349
|
+
// dispatch real email through Postmark; once sent, they cannot be
|
|
350
|
+
// unsent. Surface the recipient count and a sample for the user to
|
|
351
|
+
// confirm before the batch fires.
|
|
352
|
+
const invitesArr = args.invites || [];
|
|
353
|
+
const sampleEmails = invitesArr
|
|
354
|
+
.slice(0, 3)
|
|
355
|
+
.map((i) => i.email)
|
|
356
|
+
.join(", ");
|
|
357
|
+
const tail = invitesArr.length > 3 ? `, +${invitesArr.length - 3} more` : "";
|
|
358
|
+
const gate = await elicitBulkConfirmation({
|
|
359
|
+
server: ctx?.server,
|
|
360
|
+
args,
|
|
361
|
+
action: "Send bulk collaboration invites",
|
|
362
|
+
impactSummary: `${invitesArr.length} invite(s) (${sampleEmails}${tail})`,
|
|
363
|
+
warning: "Each invite triggers a real email; sent emails cannot be recalled.",
|
|
364
|
+
});
|
|
365
|
+
if (gate.kind === "abort")
|
|
366
|
+
return gate.result;
|
|
367
|
+
const results = await this.pica.collaborators.inviteBulk(invitesArr.map((i) => ({
|
|
368
|
+
workId: i.work_id,
|
|
369
|
+
personData: { name: i.name, email: i.email, role: i.role },
|
|
370
|
+
invitedBy: i.invited_by,
|
|
371
|
+
creditData: {
|
|
372
|
+
credit_type: i.credit_type,
|
|
373
|
+
percentage_split: i.percentage_split,
|
|
374
|
+
},
|
|
375
|
+
})));
|
|
376
|
+
const okCount = results.filter((r) => r.ok).length;
|
|
377
|
+
const failCount = results.length - okCount;
|
|
378
|
+
return formatSuccess(`Bulk invite complete: ${okCount} sent, ${failCount} failed.`, { results, ok: okCount, failed: failCount });
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=collaborators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaborators.js","sourceRoot":"","sources":["../../src/tools/collaborators.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA0B7D,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,UAAU,GAEX,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,kBAAkB;IACrB,IAAI,CAAa;IAEzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CA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ACxD,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC;QAC3C,OAAO,aAAa,CAClB,yBAAyB,OAAO,UAAU,SAAS,UAAU,EAC7D,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAC5C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comparison Tools - MCP tools for comparing enrichment sources vs catalog data
|
|
3
|
+
* and registration status across PROs.
|
|
4
|
+
*
|
|
5
|
+
* ADR-116 Phase 2: Comparative views
|
|
6
|
+
*
|
|
7
|
+
* These tools return structured comparisons that agents can reason over directly,
|
|
8
|
+
* eliminating the need for 4-6 separate tool calls to assemble context manually.
|
|
9
|
+
*/
|
|
10
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
11
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
12
|
+
export declare class ComparisonTools {
|
|
13
|
+
private pica;
|
|
14
|
+
constructor(pica: PicaClient);
|
|
15
|
+
getTools(): Array<{
|
|
16
|
+
definition: ToolDefinition;
|
|
17
|
+
executor: ToolExecutor;
|
|
18
|
+
}>;
|
|
19
|
+
private enrichmentCompare;
|
|
20
|
+
private registrationsCompare;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=comparisons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comparisons.d.ts","sourceRoot":"","sources":["../../src/tools/comparisons.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,eAAe;IAC1B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAsD3D,iBAAiB;YAqBjB,oBAAoB;CAkBnC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { formatSuccess } from "@withpica/mcp-utils";
|
|
3
|
+
export class ComparisonTools {
|
|
4
|
+
pica;
|
|
5
|
+
constructor(pica) {
|
|
6
|
+
this.pica = pica;
|
|
7
|
+
}
|
|
8
|
+
getTools() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
definition: {
|
|
12
|
+
name: "pica_enrichment_compare",
|
|
13
|
+
description: "Compare enrichment source data vs catalog for a work or person. " +
|
|
14
|
+
"Returns a side-by-side comparison showing what each source (MusicBrainz, MLC, Spotify, " +
|
|
15
|
+
"YouTube, Discogs, ISNI) has vs what's in the catalog, with match status and suggested actions. " +
|
|
16
|
+
"Use this to identify gaps, discrepancies, and enrichment opportunities.",
|
|
17
|
+
workflows: "infrastructure",
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
entity_type: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Type of entity to compare",
|
|
24
|
+
enum: ["work", "person"],
|
|
25
|
+
},
|
|
26
|
+
entity_id: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Work ID or Person ID",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ["entity_type", "entity_id"],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
executor: this.enrichmentCompare.bind(this),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
definition: {
|
|
38
|
+
name: "pica_registrations_compare",
|
|
39
|
+
description: "Compare registration status across PROs (PRS, MCPS, PPL, VPL) for a work. " +
|
|
40
|
+
"Returns which PROs the work is registered with, registration dates/IDs, and " +
|
|
41
|
+
"suggested actions for missing registrations. Also identifies cascade opportunities " +
|
|
42
|
+
"(e.g. ISRC available → PPL registration is ready).",
|
|
43
|
+
workflows: "infrastructure",
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
work_id: {
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Work ID to check registrations for",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ["work_id"],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
executor: this.registrationsCompare.bind(this),
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
async enrichmentCompare(args) {
|
|
60
|
+
const result = await this.pica.comparisons.enrichmentCompare({
|
|
61
|
+
entityType: args.entity_type,
|
|
62
|
+
entityId: args.entity_id,
|
|
63
|
+
});
|
|
64
|
+
// SDK request() unwraps data.data, so result is the inner object directly
|
|
65
|
+
const data = result;
|
|
66
|
+
const fieldCount = data.fields?.length || 0;
|
|
67
|
+
const fieldsWithValue = data.fields?.filter((f) => f.currentValue != null).length || 0;
|
|
68
|
+
const actionCount = data.suggestedActions?.length || 0;
|
|
69
|
+
return formatSuccess(`Enrichment comparison for "${data.title}": ${fieldsWithValue}/${fieldCount} fields populated. ${actionCount} suggested action${actionCount !== 1 ? "s" : ""}.`, result);
|
|
70
|
+
}
|
|
71
|
+
async registrationsCompare(args) {
|
|
72
|
+
const result = await this.pica.comparisons.registrationsCompare(args.work_id);
|
|
73
|
+
const data = result;
|
|
74
|
+
const registeredCount = data.registrations?.filter((r) => r.registered === true).length || 0;
|
|
75
|
+
const totalPros = data.registrations?.length || 0;
|
|
76
|
+
const actionCount = data.suggestedActions?.length || 0;
|
|
77
|
+
return formatSuccess(`Registration status for "${data.title}": ${registeredCount}/${totalPros} PROs registered. ${actionCount} suggested action${actionCount !== 1 ? "s" : ""}.`, result);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=comparisons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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aAAa,EAAE,MAAM,IAAI,CAAC,CAAC;QAClD,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC,CAAC;QAEvD,OAAO,aAAa,CAClB,4BAA4B,IAAI,CAAC,KAAK,MAAM,eAAe,IAAI,SAAS,qBAAqB,WAAW,oBAAoB,WAAW,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAC3J,MAAM,CACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Credits Tools - MCP tools for managing work credits (collaborators and splits)
|
|
3
|
+
*
|
|
4
|
+
* Per ADR-213 (2026-04-30) this module also hosts pica_recording_credits_update
|
|
5
|
+
* — the first-party recording-side write tool that closes the work/recording
|
|
6
|
+
* credit-write asymmetry. It writes to the `recording_credits` table (NOT the
|
|
7
|
+
* trade-secret enrichment-cascade-fed `credits` table; see
|
|
8
|
+
* .claude/rules/ip-protection.md). Roles use the 16-entry RECORDING_CREDIT_ROLES
|
|
9
|
+
* enum defined inline below; the canonical source is
|
|
10
|
+
* lib/services/recording-credits.ts.
|
|
11
|
+
*/
|
|
12
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
13
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
14
|
+
export declare class CreditsTools {
|
|
15
|
+
private pica;
|
|
16
|
+
constructor(pica: PicaClient);
|
|
17
|
+
getTools(): Array<{
|
|
18
|
+
definition: ToolDefinition;
|
|
19
|
+
executor: ToolExecutor;
|
|
20
|
+
}>;
|
|
21
|
+
private listCredits;
|
|
22
|
+
private updateCredits;
|
|
23
|
+
/**
|
|
24
|
+
* ADR-213 Primitive B — pica_recording_credits_update
|
|
25
|
+
*
|
|
26
|
+
* Writes a single first-party recording credit to the recording_credits
|
|
27
|
+
* table via POST /admin/recordings/{recording_id}/credits.
|
|
28
|
+
*
|
|
29
|
+
* Validates role against RECORDING_CREDIT_ROLES (16 entries) before the
|
|
30
|
+
* round trip so we get a structured error rather than a generic 400 from
|
|
31
|
+
* the route. credited_name is required (NOT NULL on the table); the route
|
|
32
|
+
* also validates this but we surface it earlier.
|
|
33
|
+
*
|
|
34
|
+
* On success, includes a notification to the credited person if person_id
|
|
35
|
+
* is set, mirroring the work-side updateCredits notification flow.
|
|
36
|
+
*/
|
|
37
|
+
private updateRecordingCredits;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=credits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/tools/credits.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAsCtE,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAuQ3D,WAAW;YA2BX,aAAa;IAqM3B;;;;;;;;;;;;;OAaG;YACW,sBAAsB;CA2GrC"}
|