@talkspresso/mcp-server 1.4.0 → 1.4.2
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 +2 -2
- package/dist/setup-api.js +17 -1
- package/dist/tools/services.js +23 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ else if (args.includes('--help')) {
|
|
|
14
14
|
process.exit(0);
|
|
15
15
|
}
|
|
16
16
|
else if (args.includes('--version')) {
|
|
17
|
-
console.log('1.4.
|
|
17
|
+
console.log('1.4.2');
|
|
18
18
|
process.exit(0);
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
@@ -42,7 +42,7 @@ else {
|
|
|
42
42
|
const { registerSubscriptionTools } = await import('./tools/subscription.js');
|
|
43
43
|
const server = new McpServer({
|
|
44
44
|
name: 'talkspresso',
|
|
45
|
-
version: '1.4.
|
|
45
|
+
version: '1.4.2',
|
|
46
46
|
});
|
|
47
47
|
const apiClient = new TalkspressoClient();
|
|
48
48
|
registerAppointmentTools(server, apiClient);
|
package/dist/setup-api.js
CHANGED
|
@@ -50,7 +50,23 @@ export class SetupApiClient {
|
|
|
50
50
|
}
|
|
51
51
|
async createService(data) {
|
|
52
52
|
try {
|
|
53
|
-
const
|
|
53
|
+
const capacityType = data.type === 'video_call' ? 'single' : 'group';
|
|
54
|
+
const capacity = data.type === 'video_call' ? 1 : 50;
|
|
55
|
+
const isWebinar = data.type === 'webinar';
|
|
56
|
+
const response = await this.http.post('/service', {
|
|
57
|
+
title: data.title,
|
|
58
|
+
short_description: data.description,
|
|
59
|
+
long_description: '',
|
|
60
|
+
speaker_notes: '',
|
|
61
|
+
price: data.price,
|
|
62
|
+
duration: data.duration,
|
|
63
|
+
logistics: {
|
|
64
|
+
session_type: 'single',
|
|
65
|
+
capacity_type: capacityType,
|
|
66
|
+
capacity,
|
|
67
|
+
...(isWebinar ? { is_webinar: true } : {}),
|
|
68
|
+
},
|
|
69
|
+
});
|
|
54
70
|
return response.data?.data;
|
|
55
71
|
}
|
|
56
72
|
catch (err) {
|
package/dist/tools/services.js
CHANGED
|
@@ -12,7 +12,24 @@ export function registerServiceTools(server, client) {
|
|
|
12
12
|
duration: z.number().describe('Duration in minutes'),
|
|
13
13
|
type: z.enum(['video_call', 'group_session', 'workshop', 'webinar']).describe('Type of service'),
|
|
14
14
|
}, async (params) => {
|
|
15
|
-
const
|
|
15
|
+
const capacityType = params.type === 'video_call' ? 'single' : 'group';
|
|
16
|
+
const sessionType = 'single';
|
|
17
|
+
const capacity = params.type === 'video_call' ? 1 : 50;
|
|
18
|
+
const isWebinar = params.type === 'webinar';
|
|
19
|
+
const data = await client.post('/service', {
|
|
20
|
+
title: params.title,
|
|
21
|
+
short_description: params.description,
|
|
22
|
+
long_description: '',
|
|
23
|
+
speaker_notes: '',
|
|
24
|
+
price: params.price,
|
|
25
|
+
duration: params.duration,
|
|
26
|
+
logistics: {
|
|
27
|
+
session_type: sessionType,
|
|
28
|
+
capacity_type: capacityType,
|
|
29
|
+
capacity,
|
|
30
|
+
...(isWebinar ? { is_webinar: true } : {}),
|
|
31
|
+
},
|
|
32
|
+
});
|
|
16
33
|
return formatMcpResponse(data);
|
|
17
34
|
});
|
|
18
35
|
server.tool('get-service', 'Get detailed information about a specific service including pricing, duration, and logistics.', {
|
|
@@ -29,7 +46,11 @@ export function registerServiceTools(server, client) {
|
|
|
29
46
|
duration: z.number().optional().describe('New duration in minutes'),
|
|
30
47
|
status: z.enum(['active', 'inactive']).optional().describe('Service status'),
|
|
31
48
|
}, async (params) => {
|
|
32
|
-
const { id, ...
|
|
49
|
+
const { id, description, ...rest } = params;
|
|
50
|
+
const updateData = { ...rest };
|
|
51
|
+
if (description !== undefined) {
|
|
52
|
+
updateData.short_description = description;
|
|
53
|
+
}
|
|
33
54
|
const data = await client.put(`/service/${id}`, updateData);
|
|
34
55
|
return formatMcpResponse(data);
|
|
35
56
|
});
|
package/package.json
CHANGED