tokportal-mcp 1.4.2 → 1.4.3
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/client.d.ts +5 -0
- package/dist/client.js +4 -0
- package/dist/index.js +9 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ export declare class TokPortalClient {
|
|
|
54
54
|
external_ref?: string;
|
|
55
55
|
}): Promise<unknown>;
|
|
56
56
|
getBundle(bundleRef: string): Promise<unknown>;
|
|
57
|
+
updateBundle(bundleRef: string, params: {
|
|
58
|
+
auto_finalize_videos?: boolean;
|
|
59
|
+
external_ref?: string | null;
|
|
60
|
+
title?: string | null;
|
|
61
|
+
}): Promise<unknown>;
|
|
57
62
|
publishBundle(bundleRef: string): Promise<unknown>;
|
|
58
63
|
unpublishBundle(bundleRef: string): Promise<unknown>;
|
|
59
64
|
addVideoSlots(bundleRef: string, quantity: number): Promise<unknown>;
|
package/dist/client.js
CHANGED
|
@@ -86,6 +86,10 @@ class TokPortalClient {
|
|
|
86
86
|
const id = await this.resolveBundleId(bundleRef);
|
|
87
87
|
return this.request('GET', `/bundles/${id}`);
|
|
88
88
|
}
|
|
89
|
+
async updateBundle(bundleRef, params) {
|
|
90
|
+
const id = await this.resolveBundleId(bundleRef);
|
|
91
|
+
return this.request('PATCH', `/bundles/${id}`, params);
|
|
92
|
+
}
|
|
89
93
|
async publishBundle(bundleRef) {
|
|
90
94
|
const id = await this.resolveBundleId(bundleRef);
|
|
91
95
|
return this.request('POST', `/bundles/${id}/publish`);
|
package/dist/index.js
CHANGED
|
@@ -107,6 +107,15 @@ server.tool('get_bundle', 'Get full state of a bundle including account config a
|
|
|
107
107
|
const result = await client.getBundle(bundle_id);
|
|
108
108
|
return { content: [{ type: 'text', text: fmt(result) }] };
|
|
109
109
|
});
|
|
110
|
+
server.tool('update_bundle', 'Update bundle settings (auto_finalize_videos, external_ref, title). Can be used at any time regardless of bundle status.', {
|
|
111
|
+
bundle_id: zod_1.z.string().describe('Bundle ID — UUID or your external_ref'),
|
|
112
|
+
auto_finalize_videos: zod_1.z.boolean().optional().describe('Toggle auto-approval of videos'),
|
|
113
|
+
external_ref: zod_1.z.string().nullable().optional().describe('Your own reference ID (max 200 chars, must be unique). Set to null to clear.'),
|
|
114
|
+
title: zod_1.z.string().nullable().optional().describe('Bundle title (max 200 chars). Set to null to clear.'),
|
|
115
|
+
}, async ({ bundle_id, ...params }) => {
|
|
116
|
+
const result = await client.updateBundle(bundle_id, params);
|
|
117
|
+
return { content: [{ type: 'text', text: fmt(result) }] };
|
|
118
|
+
});
|
|
110
119
|
server.tool('publish_bundle', 'Publish a bundle. Account must be configured and at least one video configured.', {
|
|
111
120
|
bundle_id: zod_1.z.string().describe('Bundle ID — UUID or your external_ref'),
|
|
112
121
|
}, async ({ bundle_id }) => {
|