@instantkom/mcp-server 1.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/LICENSE +21 -0
- package/README.md +274 -0
- package/dist/client/api-client.d.ts +76 -0
- package/dist/client/api-client.d.ts.map +1 -0
- package/dist/client/api-client.js +234 -0
- package/dist/client/api-client.js.map +1 -0
- package/dist/index.public.d.ts +23 -0
- package/dist/index.public.d.ts.map +1 -0
- package/dist/index.public.js +79 -0
- package/dist/index.public.js.map +1 -0
- package/dist/tools/app/account.d.ts +46 -0
- package/dist/tools/app/account.d.ts.map +1 -0
- package/dist/tools/app/account.js +69 -0
- package/dist/tools/app/account.js.map +1 -0
- package/dist/tools/app/analytics.d.ts +78 -0
- package/dist/tools/app/analytics.d.ts.map +1 -0
- package/dist/tools/app/analytics.js +158 -0
- package/dist/tools/app/analytics.js.map +1 -0
- package/dist/tools/app/api-keys.d.ts +195 -0
- package/dist/tools/app/api-keys.d.ts.map +1 -0
- package/dist/tools/app/api-keys.js +203 -0
- package/dist/tools/app/api-keys.js.map +1 -0
- package/dist/tools/app/billing.d.ts +78 -0
- package/dist/tools/app/billing.d.ts.map +1 -0
- package/dist/tools/app/billing.js +117 -0
- package/dist/tools/app/billing.js.map +1 -0
- package/dist/tools/app/bots.d.ts +641 -0
- package/dist/tools/app/bots.d.ts.map +1 -0
- package/dist/tools/app/bots.js +599 -0
- package/dist/tools/app/bots.js.map +1 -0
- package/dist/tools/app/broadcasts.d.ts +165 -0
- package/dist/tools/app/broadcasts.d.ts.map +1 -0
- package/dist/tools/app/broadcasts.js +219 -0
- package/dist/tools/app/broadcasts.js.map +1 -0
- package/dist/tools/app/channels.d.ts +126 -0
- package/dist/tools/app/channels.d.ts.map +1 -0
- package/dist/tools/app/channels.js +198 -0
- package/dist/tools/app/channels.js.map +1 -0
- package/dist/tools/app/chats.d.ts +90 -0
- package/dist/tools/app/chats.d.ts.map +1 -0
- package/dist/tools/app/chats.js +162 -0
- package/dist/tools/app/chats.js.map +1 -0
- package/dist/tools/app/contacts.d.ts +153 -0
- package/dist/tools/app/contacts.d.ts.map +1 -0
- package/dist/tools/app/contacts.js +186 -0
- package/dist/tools/app/contacts.js.map +1 -0
- package/dist/tools/app/coupons.d.ts +37 -0
- package/dist/tools/app/coupons.d.ts.map +1 -0
- package/dist/tools/app/coupons.js +70 -0
- package/dist/tools/app/coupons.js.map +1 -0
- package/dist/tools/app/custom-fields.d.ts +301 -0
- package/dist/tools/app/custom-fields.d.ts.map +1 -0
- package/dist/tools/app/custom-fields.js +265 -0
- package/dist/tools/app/custom-fields.js.map +1 -0
- package/dist/tools/app/dashboard-widgets.d.ts +121 -0
- package/dist/tools/app/dashboard-widgets.d.ts.map +1 -0
- package/dist/tools/app/dashboard-widgets.js +163 -0
- package/dist/tools/app/dashboard-widgets.js.map +1 -0
- package/dist/tools/app/dashboard.d.ts +18 -0
- package/dist/tools/app/dashboard.d.ts.map +1 -0
- package/dist/tools/app/dashboard.js +29 -0
- package/dist/tools/app/dashboard.js.map +1 -0
- package/dist/tools/app/ecommerce.d.ts +95 -0
- package/dist/tools/app/ecommerce.d.ts.map +1 -0
- package/dist/tools/app/ecommerce.js +109 -0
- package/dist/tools/app/ecommerce.js.map +1 -0
- package/dist/tools/app/events.d.ts +53 -0
- package/dist/tools/app/events.d.ts.map +1 -0
- package/dist/tools/app/events.js +66 -0
- package/dist/tools/app/events.js.map +1 -0
- package/dist/tools/app/exports.d.ts +81 -0
- package/dist/tools/app/exports.d.ts.map +1 -0
- package/dist/tools/app/exports.js +125 -0
- package/dist/tools/app/exports.js.map +1 -0
- package/dist/tools/app/feeds.d.ts +113 -0
- package/dist/tools/app/feeds.d.ts.map +1 -0
- package/dist/tools/app/feeds.js +166 -0
- package/dist/tools/app/feeds.js.map +1 -0
- package/dist/tools/app/flow-edges.d.ts +122 -0
- package/dist/tools/app/flow-edges.d.ts.map +1 -0
- package/dist/tools/app/flow-edges.js +130 -0
- package/dist/tools/app/flow-edges.js.map +1 -0
- package/dist/tools/app/flow-nodes.d.ts +122 -0
- package/dist/tools/app/flow-nodes.d.ts.map +1 -0
- package/dist/tools/app/flow-nodes.js +130 -0
- package/dist/tools/app/flow-nodes.js.map +1 -0
- package/dist/tools/app/flows.d.ts +136 -0
- package/dist/tools/app/flows.d.ts.map +1 -0
- package/dist/tools/app/flows.js +141 -0
- package/dist/tools/app/flows.js.map +1 -0
- package/dist/tools/app/funnels.d.ts +96 -0
- package/dist/tools/app/funnels.d.ts.map +1 -0
- package/dist/tools/app/funnels.js +127 -0
- package/dist/tools/app/funnels.js.map +1 -0
- package/dist/tools/app/index.d.ts +51 -0
- package/dist/tools/app/index.d.ts.map +1 -0
- package/dist/tools/app/index.js +121 -0
- package/dist/tools/app/index.js.map +1 -0
- package/dist/tools/app/media.d.ts +44 -0
- package/dist/tools/app/media.d.ts.map +1 -0
- package/dist/tools/app/media.js +183 -0
- package/dist/tools/app/media.js.map +1 -0
- package/dist/tools/app/message-events.d.ts +69 -0
- package/dist/tools/app/message-events.d.ts.map +1 -0
- package/dist/tools/app/message-events.js +72 -0
- package/dist/tools/app/message-events.js.map +1 -0
- package/dist/tools/app/messages.d.ts +380 -0
- package/dist/tools/app/messages.d.ts.map +1 -0
- package/dist/tools/app/messages.js +345 -0
- package/dist/tools/app/messages.js.map +1 -0
- package/dist/tools/app/object-folders.d.ts +82 -0
- package/dist/tools/app/object-folders.d.ts.map +1 -0
- package/dist/tools/app/object-folders.js +123 -0
- package/dist/tools/app/object-folders.js.map +1 -0
- package/dist/tools/app/plans.d.ts +53 -0
- package/dist/tools/app/plans.d.ts.map +1 -0
- package/dist/tools/app/plans.js +70 -0
- package/dist/tools/app/plans.js.map +1 -0
- package/dist/tools/app/polls.d.ts +227 -0
- package/dist/tools/app/polls.d.ts.map +1 -0
- package/dist/tools/app/polls.js +256 -0
- package/dist/tools/app/polls.js.map +1 -0
- package/dist/tools/app/qr-codes.d.ts +103 -0
- package/dist/tools/app/qr-codes.d.ts.map +1 -0
- package/dist/tools/app/qr-codes.js +160 -0
- package/dist/tools/app/qr-codes.js.map +1 -0
- package/dist/tools/app/segmentations.d.ts +132 -0
- package/dist/tools/app/segmentations.d.ts.map +1 -0
- package/dist/tools/app/segmentations.js +237 -0
- package/dist/tools/app/segmentations.js.map +1 -0
- package/dist/tools/app/settings.d.ts +75 -0
- package/dist/tools/app/settings.d.ts.map +1 -0
- package/dist/tools/app/settings.js +96 -0
- package/dist/tools/app/settings.js.map +1 -0
- package/dist/tools/app/shortlinks.d.ts +103 -0
- package/dist/tools/app/shortlinks.d.ts.map +1 -0
- package/dist/tools/app/shortlinks.js +158 -0
- package/dist/tools/app/shortlinks.js.map +1 -0
- package/dist/tools/app/super-widgets.d.ts +95 -0
- package/dist/tools/app/super-widgets.d.ts.map +1 -0
- package/dist/tools/app/super-widgets.js +124 -0
- package/dist/tools/app/super-widgets.js.map +1 -0
- package/dist/tools/app/tags.d.ts +267 -0
- package/dist/tools/app/tags.d.ts.map +1 -0
- package/dist/tools/app/tags.js +363 -0
- package/dist/tools/app/tags.js.map +1 -0
- package/dist/tools/app/team-members.d.ts +141 -0
- package/dist/tools/app/team-members.d.ts.map +1 -0
- package/dist/tools/app/team-members.js +195 -0
- package/dist/tools/app/team-members.js.map +1 -0
- package/dist/tools/app/templates.d.ts +212 -0
- package/dist/tools/app/templates.d.ts.map +1 -0
- package/dist/tools/app/templates.js +270 -0
- package/dist/tools/app/templates.js.map +1 -0
- package/dist/tools/app/tickets.d.ts +277 -0
- package/dist/tools/app/tickets.d.ts.map +1 -0
- package/dist/tools/app/tickets.js +266 -0
- package/dist/tools/app/tickets.js.map +1 -0
- package/dist/tools/app/users.d.ts +70 -0
- package/dist/tools/app/users.d.ts.map +1 -0
- package/dist/tools/app/users.js +72 -0
- package/dist/tools/app/users.js.map +1 -0
- package/dist/tools/app/webhooks.d.ts +61 -0
- package/dist/tools/app/webhooks.d.ts.map +1 -0
- package/dist/tools/app/webhooks.js +85 -0
- package/dist/tools/app/webhooks.js.map +1 -0
- package/dist/tools/app/widgets.d.ts +103 -0
- package/dist/tools/app/widgets.d.ts.map +1 -0
- package/dist/tools/app/widgets.js +128 -0
- package/dist/tools/app/widgets.js.map +1 -0
- package/dist/tools/public/health.d.ts +16 -0
- package/dist/tools/public/health.d.ts.map +1 -0
- package/dist/tools/public/health.js +27 -0
- package/dist/tools/public/health.js.map +1 -0
- package/dist/tools/public/index.d.ts +15 -0
- package/dist/tools/public/index.d.ts.map +1 -0
- package/dist/tools/public/index.js +10 -0
- package/dist/tools/public/index.js.map +1 -0
- package/dist/tools/tool-router.d.ts +21 -0
- package/dist/tools/tool-router.d.ts.map +1 -0
- package/dist/tools/tool-router.js +118 -0
- package/dist/tools/tool-router.js.map +1 -0
- package/dist/types/index.d.ts +73 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Tools - Messages Operations
|
|
3
|
+
*/
|
|
4
|
+
export async function listMessages(apiClient, args) {
|
|
5
|
+
const response = await apiClient.get('/v1/messages', args);
|
|
6
|
+
return {
|
|
7
|
+
content: [
|
|
8
|
+
{
|
|
9
|
+
type: 'text',
|
|
10
|
+
text: JSON.stringify(response, null, 2),
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export async function getMessage(apiClient, args) {
|
|
16
|
+
const response = await apiClient.get(`/v1/messages/${args.id}`);
|
|
17
|
+
return {
|
|
18
|
+
content: [
|
|
19
|
+
{
|
|
20
|
+
type: 'text',
|
|
21
|
+
text: JSON.stringify(response, null, 2),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export async function sendMessage(apiClient, args) {
|
|
27
|
+
const response = await apiClient.post('/v1/messages', args);
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: 'text',
|
|
32
|
+
text: JSON.stringify(response, null, 2),
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export async function updateMessage(apiClient, args) {
|
|
38
|
+
const { id, ...data } = args;
|
|
39
|
+
const response = await apiClient.put(`/v1/messages/${id}`, data);
|
|
40
|
+
return {
|
|
41
|
+
content: [
|
|
42
|
+
{
|
|
43
|
+
type: 'text',
|
|
44
|
+
text: JSON.stringify(response, null, 2),
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export async function deleteMessage(apiClient, args) {
|
|
50
|
+
const response = await apiClient.delete(`/v1/messages/${args.id}`);
|
|
51
|
+
return {
|
|
52
|
+
content: [
|
|
53
|
+
{
|
|
54
|
+
type: 'text',
|
|
55
|
+
text: 'Message deleted successfully',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export async function getInboxUnreadCount(apiClient, _args) {
|
|
61
|
+
const response = await apiClient.get('/v1/messages/inbox/unread-count');
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: JSON.stringify(response, null, 2),
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export async function bulkSpamMessages(apiClient, args) {
|
|
72
|
+
const response = await apiClient.put('/v1/messages/bulk/spam', args);
|
|
73
|
+
return {
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: 'text',
|
|
77
|
+
text: JSON.stringify(response, null, 2),
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
export async function markMessageSpam(apiClient, args) {
|
|
83
|
+
const { id, ...data } = args;
|
|
84
|
+
const response = await apiClient.put(`/v1/messages/${id}/spam`, data);
|
|
85
|
+
return {
|
|
86
|
+
content: [
|
|
87
|
+
{
|
|
88
|
+
type: 'text',
|
|
89
|
+
text: JSON.stringify(response, null, 2),
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export async function createTicketFromMessage(apiClient, args) {
|
|
95
|
+
const { id, ...data } = args;
|
|
96
|
+
const response = await apiClient.post(`/v1/messages/${id}/create-ticket`, data);
|
|
97
|
+
return {
|
|
98
|
+
content: [
|
|
99
|
+
{
|
|
100
|
+
type: 'text',
|
|
101
|
+
text: JSON.stringify(response, null, 2),
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export async function getMessageReactions(apiClient, args) {
|
|
107
|
+
const params = {};
|
|
108
|
+
if (args.page)
|
|
109
|
+
params.page = args.page;
|
|
110
|
+
if (args.limit)
|
|
111
|
+
params.limit = args.limit;
|
|
112
|
+
const response = await apiClient.get(`/v1/messages/${args.id}/reactions`, params);
|
|
113
|
+
return {
|
|
114
|
+
content: [
|
|
115
|
+
{
|
|
116
|
+
type: 'text',
|
|
117
|
+
text: JSON.stringify(response, null, 2),
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export const messageTools = [
|
|
123
|
+
{
|
|
124
|
+
name: 'list_messages',
|
|
125
|
+
description: 'List messages with optional filtering by channel and contact',
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
channelId: {
|
|
130
|
+
type: 'number',
|
|
131
|
+
description: 'Filter by channel ID',
|
|
132
|
+
},
|
|
133
|
+
contactId: {
|
|
134
|
+
type: 'number',
|
|
135
|
+
description: 'Filter by contact ID',
|
|
136
|
+
},
|
|
137
|
+
page: {
|
|
138
|
+
type: 'number',
|
|
139
|
+
description: 'Page number (default: 1)',
|
|
140
|
+
},
|
|
141
|
+
limit: {
|
|
142
|
+
type: 'number',
|
|
143
|
+
description: 'Items per page (default: 10)',
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
required: [],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'get_message',
|
|
151
|
+
description: 'Get a specific message by ID',
|
|
152
|
+
inputSchema: {
|
|
153
|
+
type: 'object',
|
|
154
|
+
properties: {
|
|
155
|
+
id: {
|
|
156
|
+
type: 'number',
|
|
157
|
+
description: 'Message ID',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
required: ['id'],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'send_message',
|
|
165
|
+
description: 'Send a message to a contact via a channel. Pass templateId to send an approved WhatsApp template (bypasses 24h messaging window).',
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: 'object',
|
|
168
|
+
properties: {
|
|
169
|
+
recipientId: {
|
|
170
|
+
type: 'number',
|
|
171
|
+
description: 'Recipient ID',
|
|
172
|
+
},
|
|
173
|
+
message: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
description: 'Message content (max 4096 characters)',
|
|
176
|
+
},
|
|
177
|
+
messageType: {
|
|
178
|
+
type: 'string',
|
|
179
|
+
description: 'Message type',
|
|
180
|
+
enum: ['text', 'image', 'video', 'audio', 'document'],
|
|
181
|
+
},
|
|
182
|
+
templateId: {
|
|
183
|
+
type: 'number',
|
|
184
|
+
description: 'Optional WhatsApp template ID. When set, the message is sent as an approved template, bypassing the 24-hour messaging window. Must be active (status=3) and belong to the same channel as the recipient.',
|
|
185
|
+
},
|
|
186
|
+
buttons: {
|
|
187
|
+
type: 'array',
|
|
188
|
+
description: 'Content buttons (JSON array)',
|
|
189
|
+
},
|
|
190
|
+
headerFooter: {
|
|
191
|
+
type: 'object',
|
|
192
|
+
description: 'Header/Footer content (JSON object)',
|
|
193
|
+
},
|
|
194
|
+
isLocked: {
|
|
195
|
+
type: 'boolean',
|
|
196
|
+
description: 'Whether the message should be locked',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
required: ['recipientId', 'message', 'messageType'],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: 'update_message',
|
|
204
|
+
description: 'Update an existing message',
|
|
205
|
+
inputSchema: {
|
|
206
|
+
type: 'object',
|
|
207
|
+
properties: {
|
|
208
|
+
id: {
|
|
209
|
+
type: 'number',
|
|
210
|
+
description: 'Message ID',
|
|
211
|
+
},
|
|
212
|
+
message: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Message content (max 4096 characters)',
|
|
215
|
+
},
|
|
216
|
+
messageType: {
|
|
217
|
+
type: 'string',
|
|
218
|
+
description: 'Message type',
|
|
219
|
+
enum: ['text', 'image', 'video', 'audio', 'document'],
|
|
220
|
+
},
|
|
221
|
+
buttons: {
|
|
222
|
+
type: 'array',
|
|
223
|
+
description: 'Content buttons (JSON array)',
|
|
224
|
+
},
|
|
225
|
+
headerFooter: {
|
|
226
|
+
type: 'object',
|
|
227
|
+
description: 'Header/Footer content (JSON object)',
|
|
228
|
+
},
|
|
229
|
+
isLocked: {
|
|
230
|
+
type: 'boolean',
|
|
231
|
+
description: 'Whether the message should be locked',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
required: ['id'],
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'delete_message',
|
|
239
|
+
description: 'Delete a message',
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
id: {
|
|
244
|
+
type: 'number',
|
|
245
|
+
description: 'Message ID',
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
required: ['id'],
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: 'get_inbox_unread_count',
|
|
253
|
+
description: 'Get the total number of unread received messages (inbox)',
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: 'object',
|
|
256
|
+
properties: {},
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'bulk_spam_messages',
|
|
261
|
+
description: 'Bulk mark or unmark messages as spam (max 100 per request)',
|
|
262
|
+
inputSchema: {
|
|
263
|
+
type: 'object',
|
|
264
|
+
properties: {
|
|
265
|
+
messageIds: {
|
|
266
|
+
type: 'array',
|
|
267
|
+
items: { type: 'number' },
|
|
268
|
+
description: 'Array of message IDs to update',
|
|
269
|
+
},
|
|
270
|
+
spam: {
|
|
271
|
+
type: 'boolean',
|
|
272
|
+
description: 'Set to true to mark as spam, false to unmark',
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
required: ['messageIds', 'spam'],
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: 'mark_message_spam',
|
|
280
|
+
description: 'Mark or unmark a single message as spam',
|
|
281
|
+
inputSchema: {
|
|
282
|
+
type: 'object',
|
|
283
|
+
properties: {
|
|
284
|
+
id: {
|
|
285
|
+
type: 'number',
|
|
286
|
+
description: 'Message ID',
|
|
287
|
+
},
|
|
288
|
+
spam: {
|
|
289
|
+
type: 'boolean',
|
|
290
|
+
description: 'Set to true to mark as spam, false to unmark',
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
required: ['id', 'spam'],
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: 'create_ticket_from_message',
|
|
298
|
+
description: 'Convert an inbox message into a support ticket',
|
|
299
|
+
inputSchema: {
|
|
300
|
+
type: 'object',
|
|
301
|
+
properties: {
|
|
302
|
+
id: {
|
|
303
|
+
type: 'number',
|
|
304
|
+
description: 'Message ID',
|
|
305
|
+
},
|
|
306
|
+
subject: {
|
|
307
|
+
type: 'string',
|
|
308
|
+
description: 'Ticket subject (optional)',
|
|
309
|
+
},
|
|
310
|
+
priority: {
|
|
311
|
+
type: 'string',
|
|
312
|
+
description: 'Ticket priority (low, normal, high, urgent)',
|
|
313
|
+
},
|
|
314
|
+
assignedTo: {
|
|
315
|
+
type: 'number',
|
|
316
|
+
description: 'Team member ID to assign the ticket to',
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
required: ['id'],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: 'get_message_reactions',
|
|
324
|
+
description: 'Get all reply messages (reactions) to a specific message',
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: 'object',
|
|
327
|
+
properties: {
|
|
328
|
+
id: {
|
|
329
|
+
type: 'number',
|
|
330
|
+
description: 'Message ID',
|
|
331
|
+
},
|
|
332
|
+
page: {
|
|
333
|
+
type: 'number',
|
|
334
|
+
description: 'Page number (default: 1)',
|
|
335
|
+
},
|
|
336
|
+
limit: {
|
|
337
|
+
type: 'number',
|
|
338
|
+
description: 'Items per page (default: 10)',
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
required: ['id'],
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
];
|
|
345
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/tools/app/messages.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,SAAoB,EACpB,IAAmE;IAEnE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAY,cAAc,EAAE,IAAI,CAAC,CAAC;IAGtE,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aACxC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAoB,EAAE,IAAoB;IACzE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAU,gBAAgB,IAA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B;iBAC5C;aACF;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { ApiClient } from '../../client/api-client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Object Folders Tools
|
|
4
|
+
* Folder organization for objects
|
|
5
|
+
*/
|
|
6
|
+
export declare function listObjectFolders(apiClient: ApiClient, args: any): Promise<any>;
|
|
7
|
+
export declare function getObjectFolder(apiClient: ApiClient, args: {
|
|
8
|
+
id: number;
|
|
9
|
+
}): Promise<any>;
|
|
10
|
+
export declare function createObjectFolder(apiClient: ApiClient, args: any): Promise<any>;
|
|
11
|
+
export declare function updateObjectFolder(apiClient: ApiClient, args: any): Promise<any>;
|
|
12
|
+
export declare function deleteObjectFolder(apiClient: ApiClient, args: {
|
|
13
|
+
id: number;
|
|
14
|
+
}): Promise<any>;
|
|
15
|
+
export declare const objectFolderTools: ({
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
type: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
id?: undefined;
|
|
26
|
+
name?: undefined;
|
|
27
|
+
};
|
|
28
|
+
required?: undefined;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {
|
|
36
|
+
id: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
type?: undefined;
|
|
41
|
+
name?: undefined;
|
|
42
|
+
};
|
|
43
|
+
required: string[];
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
name: string;
|
|
47
|
+
description: string;
|
|
48
|
+
inputSchema: {
|
|
49
|
+
type: string;
|
|
50
|
+
properties: {
|
|
51
|
+
name: {
|
|
52
|
+
type: string;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
type: {
|
|
56
|
+
type: string;
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
id?: undefined;
|
|
60
|
+
};
|
|
61
|
+
required: string[];
|
|
62
|
+
};
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
description: string;
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: string;
|
|
68
|
+
properties: {
|
|
69
|
+
id: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
name: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
type?: undefined;
|
|
78
|
+
};
|
|
79
|
+
required: string[];
|
|
80
|
+
};
|
|
81
|
+
})[];
|
|
82
|
+
//# sourceMappingURL=object-folders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-folders.d.ts","sourceRoot":"","sources":["../../../src/tools/app/object-folders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;GAGG;AAEH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAerF;AAED,wBAAsB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAW9F;AAED,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAWtF;AAED,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAYtF;AAED,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAWjG;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyD7B,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Object Folders Tools
|
|
3
|
+
* Folder organization for objects
|
|
4
|
+
*/
|
|
5
|
+
export async function listObjectFolders(apiClient, args) {
|
|
6
|
+
const params = new URLSearchParams();
|
|
7
|
+
if (args.type)
|
|
8
|
+
params.append('type', args.type);
|
|
9
|
+
const query = params.toString() ? `?${params.toString()}` : '';
|
|
10
|
+
const response = await apiClient.get(`/v1/object-folders${query}`);
|
|
11
|
+
return {
|
|
12
|
+
content: [
|
|
13
|
+
{
|
|
14
|
+
type: 'text',
|
|
15
|
+
text: JSON.stringify(response, null, 2),
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export async function getObjectFolder(apiClient, args) {
|
|
21
|
+
const response = await apiClient.get(`/v1/object-folders/${args.id}`);
|
|
22
|
+
return {
|
|
23
|
+
content: [
|
|
24
|
+
{
|
|
25
|
+
type: 'text',
|
|
26
|
+
text: JSON.stringify(response, null, 2),
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export async function createObjectFolder(apiClient, args) {
|
|
32
|
+
const response = await apiClient.post('/v1/object-folders', args);
|
|
33
|
+
return {
|
|
34
|
+
content: [
|
|
35
|
+
{
|
|
36
|
+
type: 'text',
|
|
37
|
+
text: JSON.stringify(response, null, 2),
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export async function updateObjectFolder(apiClient, args) {
|
|
43
|
+
const { id, ...data } = args;
|
|
44
|
+
const response = await apiClient.put(`/v1/object-folders/${id}`, data);
|
|
45
|
+
return {
|
|
46
|
+
content: [
|
|
47
|
+
{
|
|
48
|
+
type: 'text',
|
|
49
|
+
text: JSON.stringify(response, null, 2),
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export async function deleteObjectFolder(apiClient, args) {
|
|
55
|
+
await apiClient.delete(`/v1/object-folders/${args.id}`);
|
|
56
|
+
return {
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
59
|
+
type: 'text',
|
|
60
|
+
text: 'Object folder deleted successfully',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export const objectFolderTools = [
|
|
66
|
+
{
|
|
67
|
+
name: 'list_object_folders',
|
|
68
|
+
description: 'List all object folders',
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
type: { type: 'string', description: 'Filter by object type' },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'get_object_folder',
|
|
78
|
+
description: 'Get a specific folder by ID',
|
|
79
|
+
inputSchema: {
|
|
80
|
+
type: 'object',
|
|
81
|
+
properties: {
|
|
82
|
+
id: { type: 'number', description: 'Folder ID' },
|
|
83
|
+
},
|
|
84
|
+
required: ['id'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'create_object_folder',
|
|
89
|
+
description: 'Create a new object folder',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
name: { type: 'string', description: 'Folder name' },
|
|
94
|
+
type: { type: 'string', description: 'Object type' },
|
|
95
|
+
},
|
|
96
|
+
required: ['name', 'type'],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'update_object_folder',
|
|
101
|
+
description: 'Update an existing folder',
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
properties: {
|
|
105
|
+
id: { type: 'number', description: 'Folder ID' },
|
|
106
|
+
name: { type: 'string', description: 'Folder name' },
|
|
107
|
+
},
|
|
108
|
+
required: ['id'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'delete_object_folder',
|
|
113
|
+
description: 'Delete a folder',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
id: { type: 'number', description: 'Folder ID' },
|
|
118
|
+
},
|
|
119
|
+
required: ['id'],
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
//# sourceMappingURL=object-folders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-folders.js","sourceRoot":"","sources":["../../../src/tools/app/object-folders.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAAoB,EAAE,IAAS;IACrE,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,IAAI,IAAI,CAAC,IAAI;QAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/D,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,qBAAqB,KAAK,EAAE,CAAC,CAAC;IAEnE,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aACxC;SACF;KACF,CAAC;AACJ,C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B;KACF;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE;aACjD;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ApiClient } from '../../client/api-client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Plans Tools
|
|
4
|
+
* Subscription plans and pricing
|
|
5
|
+
*/
|
|
6
|
+
export declare function listPlans(apiClient: ApiClient): Promise<any>;
|
|
7
|
+
export declare function getPlan(apiClient: ApiClient, args: {
|
|
8
|
+
id: number;
|
|
9
|
+
}): Promise<any>;
|
|
10
|
+
export declare function subscribeToPlan(apiClient: ApiClient, args: {
|
|
11
|
+
planId: number;
|
|
12
|
+
}): Promise<any>;
|
|
13
|
+
export declare const planTools: ({
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: string;
|
|
18
|
+
properties: {
|
|
19
|
+
id?: undefined;
|
|
20
|
+
planId?: undefined;
|
|
21
|
+
};
|
|
22
|
+
required?: undefined;
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: string;
|
|
29
|
+
properties: {
|
|
30
|
+
id: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
planId?: undefined;
|
|
35
|
+
};
|
|
36
|
+
required: string[];
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: string;
|
|
43
|
+
properties: {
|
|
44
|
+
planId: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
id?: undefined;
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
};
|
|
52
|
+
})[];
|
|
53
|
+
//# sourceMappingURL=plans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../../src/tools/app/plans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;GAGG;AAEH,wBAAsB,SAAS,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAWlE;AAED,wBAAsB,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAWtF;AAED,wBAAsB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAWlG;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BrB,CAAC"}
|