@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,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom Fields Tools
|
|
3
|
+
* CRUD operations for custom field definitions and contact custom field values
|
|
4
|
+
*/
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Custom Field Definitions
|
|
7
|
+
// ============================================================================
|
|
8
|
+
export async function listCustomFields(apiClient, _args) {
|
|
9
|
+
const response = await apiClient.get('/v1/custom-fields');
|
|
10
|
+
return {
|
|
11
|
+
content: [
|
|
12
|
+
{
|
|
13
|
+
type: 'text',
|
|
14
|
+
text: JSON.stringify(response, null, 2),
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export async function getCustomField(apiClient, args) {
|
|
20
|
+
const response = await apiClient.get(`/v1/custom-fields/${args.id}`);
|
|
21
|
+
return {
|
|
22
|
+
content: [
|
|
23
|
+
{
|
|
24
|
+
type: 'text',
|
|
25
|
+
text: JSON.stringify(response, null, 2),
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export async function createCustomField(apiClient, args) {
|
|
31
|
+
const response = await apiClient.post('/v1/custom-fields', args);
|
|
32
|
+
return {
|
|
33
|
+
content: [
|
|
34
|
+
{
|
|
35
|
+
type: 'text',
|
|
36
|
+
text: JSON.stringify(response, null, 2),
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export async function updateCustomField(apiClient, args) {
|
|
42
|
+
const { id, ...data } = args;
|
|
43
|
+
const response = await apiClient.put(`/v1/custom-fields/${id}`, data);
|
|
44
|
+
return {
|
|
45
|
+
content: [
|
|
46
|
+
{
|
|
47
|
+
type: 'text',
|
|
48
|
+
text: JSON.stringify(response, null, 2),
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export async function deleteCustomField(apiClient, args) {
|
|
54
|
+
await apiClient.delete(`/v1/custom-fields/${args.id}`);
|
|
55
|
+
return {
|
|
56
|
+
content: [
|
|
57
|
+
{
|
|
58
|
+
type: 'text',
|
|
59
|
+
text: 'Custom field deleted successfully',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export async function reorderCustomFields(apiClient, args) {
|
|
65
|
+
const response = await apiClient.put('/v1/custom-fields/reorder', { fieldIds: args.fieldIds });
|
|
66
|
+
return {
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: 'text',
|
|
70
|
+
text: JSON.stringify(response, null, 2),
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export async function bulkDeleteCustomFields(apiClient, args) {
|
|
76
|
+
const response = await apiClient.post('/v1/custom-fields/bulk-delete', { ids: args.ids });
|
|
77
|
+
return {
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: 'text',
|
|
81
|
+
text: JSON.stringify(response, null, 2),
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
// ============================================================================
|
|
87
|
+
// Contact Custom Field Values
|
|
88
|
+
// ============================================================================
|
|
89
|
+
export async function getContactCustomFields(apiClient, args) {
|
|
90
|
+
const response = await apiClient.get(`/v1/contacts/${args.contactId}/custom-fields`);
|
|
91
|
+
return {
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: 'text',
|
|
95
|
+
text: JSON.stringify(response, null, 2),
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export async function setContactCustomFields(apiClient, args) {
|
|
101
|
+
const { contactId, ...data } = args;
|
|
102
|
+
const response = await apiClient.put(`/v1/contacts/${contactId}/custom-fields`, data);
|
|
103
|
+
return {
|
|
104
|
+
content: [
|
|
105
|
+
{
|
|
106
|
+
type: 'text',
|
|
107
|
+
text: JSON.stringify(response, null, 2),
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export async function setContactCustomFieldValue(apiClient, args) {
|
|
113
|
+
const response = await apiClient.put(`/v1/contacts/${args.contactId}/custom-fields/${args.fieldId}`, { value: args.value });
|
|
114
|
+
return {
|
|
115
|
+
content: [
|
|
116
|
+
{
|
|
117
|
+
type: 'text',
|
|
118
|
+
text: JSON.stringify(response, null, 2),
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export async function deleteContactCustomFieldValue(apiClient, args) {
|
|
124
|
+
await apiClient.delete(`/v1/contacts/${args.contactId}/custom-fields/${args.fieldId}`);
|
|
125
|
+
return {
|
|
126
|
+
content: [
|
|
127
|
+
{
|
|
128
|
+
type: 'text',
|
|
129
|
+
text: 'Contact custom field value deleted successfully',
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export const customFieldTools = [
|
|
135
|
+
// Custom Field Definitions
|
|
136
|
+
{
|
|
137
|
+
name: 'list_custom_fields',
|
|
138
|
+
description: 'List all custom field definitions sorted by display order',
|
|
139
|
+
inputSchema: {
|
|
140
|
+
type: 'object',
|
|
141
|
+
properties: {},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'get_custom_field',
|
|
146
|
+
description: 'Get a specific custom field definition by ID',
|
|
147
|
+
inputSchema: {
|
|
148
|
+
type: 'object',
|
|
149
|
+
properties: {
|
|
150
|
+
id: { type: 'number', description: 'Custom field definition ID' },
|
|
151
|
+
},
|
|
152
|
+
required: ['id'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: 'create_custom_field',
|
|
157
|
+
description: 'Create a new custom field definition. The field key must be unique within the account.',
|
|
158
|
+
inputSchema: {
|
|
159
|
+
type: 'object',
|
|
160
|
+
properties: {
|
|
161
|
+
key: { type: 'string', description: 'Unique field key (e.g. customer_id)' },
|
|
162
|
+
name: { type: 'string', description: 'Display name' },
|
|
163
|
+
type: { type: 'string', description: 'Field type (text, number, date, boolean, select)' },
|
|
164
|
+
options: { type: 'array', items: { type: 'string' }, description: 'Options for select type fields' },
|
|
165
|
+
},
|
|
166
|
+
required: ['key', 'name', 'type'],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'update_custom_field',
|
|
171
|
+
description: 'Update a custom field definition. The field key cannot be changed.',
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
properties: {
|
|
175
|
+
id: { type: 'number', description: 'Custom field definition ID' },
|
|
176
|
+
name: { type: 'string', description: 'Display name' },
|
|
177
|
+
options: { type: 'array', items: { type: 'string' }, description: 'Options for select type fields' },
|
|
178
|
+
},
|
|
179
|
+
required: ['id'],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: 'delete_custom_field',
|
|
184
|
+
description: 'Delete a custom field definition and all its values across all contacts',
|
|
185
|
+
inputSchema: {
|
|
186
|
+
type: 'object',
|
|
187
|
+
properties: {
|
|
188
|
+
id: { type: 'number', description: 'Custom field definition ID' },
|
|
189
|
+
},
|
|
190
|
+
required: ['id'],
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'reorder_custom_fields',
|
|
195
|
+
description: 'Reorder custom field definitions. Provide all field IDs in desired order.',
|
|
196
|
+
inputSchema: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
properties: {
|
|
199
|
+
fieldIds: { type: 'array', items: { type: 'number' }, description: 'Array of field IDs in desired display order' },
|
|
200
|
+
},
|
|
201
|
+
required: ['fieldIds'],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'bulk_delete_custom_fields',
|
|
206
|
+
description: 'Delete multiple custom field definitions at once (max 100)',
|
|
207
|
+
inputSchema: {
|
|
208
|
+
type: 'object',
|
|
209
|
+
properties: {
|
|
210
|
+
ids: { type: 'array', items: { type: 'number' }, description: 'Array of custom field IDs to delete' },
|
|
211
|
+
},
|
|
212
|
+
required: ['ids'],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
// Contact Custom Field Values
|
|
216
|
+
{
|
|
217
|
+
name: 'get_contact_custom_fields',
|
|
218
|
+
description: 'Get all custom field values for a specific contact',
|
|
219
|
+
inputSchema: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
properties: {
|
|
222
|
+
contactId: { type: 'number', description: 'Contact/Recipient ID' },
|
|
223
|
+
},
|
|
224
|
+
required: ['contactId'],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: 'set_contact_custom_fields',
|
|
229
|
+
description: 'Set multiple custom field values for a contact at once',
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: 'object',
|
|
232
|
+
properties: {
|
|
233
|
+
contactId: { type: 'number', description: 'Contact/Recipient ID' },
|
|
234
|
+
values: { type: 'object', description: 'Key-value pairs of field keys and their values' },
|
|
235
|
+
},
|
|
236
|
+
required: ['contactId', 'values'],
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'set_contact_custom_field_value',
|
|
241
|
+
description: 'Set a single custom field value for a contact',
|
|
242
|
+
inputSchema: {
|
|
243
|
+
type: 'object',
|
|
244
|
+
properties: {
|
|
245
|
+
contactId: { type: 'number', description: 'Contact/Recipient ID' },
|
|
246
|
+
fieldId: { type: 'number', description: 'Custom field definition ID' },
|
|
247
|
+
value: { type: 'string', description: 'Value to set (use null to clear)' },
|
|
248
|
+
},
|
|
249
|
+
required: ['contactId', 'fieldId'],
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'delete_contact_custom_field_value',
|
|
254
|
+
description: 'Remove the value of a custom field for a specific contact',
|
|
255
|
+
inputSchema: {
|
|
256
|
+
type: 'object',
|
|
257
|
+
properties: {
|
|
258
|
+
contactId: { type: 'number', description: 'Contact/Recipient ID' },
|
|
259
|
+
fieldId: { type: 'number', description: 'Custom field definition ID' },
|
|
260
|
+
},
|
|
261
|
+
required: ['contactId', 'fieldId'],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
];
|
|
265
|
+
//# sourceMappingURL=custom-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-fields.js","sourceRoot":"","sources":["../../../src/tools/app/custom-fields.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,SAAoB,EAAE,KAAU;IACrE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAE1D,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAA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,WAAW,EAAE,wDAAwD;QACrE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;gBAClE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gDAAgD,EAAE;aAC1F;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;SAClC;KACF;IACD;QACE,IAAI,EAAE,gCAAgC;QACtC,WAAW,EAAE,+CAA+C;QAC5D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;gBAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;gBACtE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kCAAkC,EAAE;aAC3E;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;SACnC;KACF;IACD;QACE,IAAI,EAAE,mCAAmC;QACzC,WAAW,EAAE,2DAA2D;QACxE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;gBAClE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;aACvE;YACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;SACnC;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { ApiClient } from '../../client/api-client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashboard Widgets Tools
|
|
4
|
+
* Dashboard widget types and user widget management
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDashboardOverview(apiClient: ApiClient, _args: any): Promise<any>;
|
|
7
|
+
export declare function getDashboardWidgetTypes(apiClient: ApiClient, _args: any): Promise<any>;
|
|
8
|
+
export declare function listDashboardWidgets(apiClient: ApiClient, _args: any): Promise<any>;
|
|
9
|
+
export declare function getDashboardWidget(apiClient: ApiClient, args: {
|
|
10
|
+
id: number;
|
|
11
|
+
}): Promise<any>;
|
|
12
|
+
export declare function addDashboardWidget(apiClient: ApiClient, args: any): Promise<any>;
|
|
13
|
+
export declare function updateDashboardWidget(apiClient: ApiClient, args: any): Promise<any>;
|
|
14
|
+
export declare function removeDashboardWidget(apiClient: ApiClient, args: {
|
|
15
|
+
id: number;
|
|
16
|
+
}): Promise<any>;
|
|
17
|
+
export declare const dashboardWidgetTools: ({
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: string;
|
|
22
|
+
properties: {
|
|
23
|
+
id?: undefined;
|
|
24
|
+
widgetTypeId?: undefined;
|
|
25
|
+
positionX?: undefined;
|
|
26
|
+
positionY?: undefined;
|
|
27
|
+
width?: undefined;
|
|
28
|
+
height?: undefined;
|
|
29
|
+
visible?: undefined;
|
|
30
|
+
};
|
|
31
|
+
required?: undefined;
|
|
32
|
+
};
|
|
33
|
+
} | {
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: string;
|
|
38
|
+
properties: {
|
|
39
|
+
id: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
widgetTypeId?: undefined;
|
|
44
|
+
positionX?: undefined;
|
|
45
|
+
positionY?: undefined;
|
|
46
|
+
width?: undefined;
|
|
47
|
+
height?: undefined;
|
|
48
|
+
visible?: undefined;
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
};
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
inputSchema: {
|
|
56
|
+
type: string;
|
|
57
|
+
properties: {
|
|
58
|
+
widgetTypeId: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
positionX: {
|
|
63
|
+
type: string;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
positionY: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
width: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
height: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
visible: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
id?: undefined;
|
|
83
|
+
};
|
|
84
|
+
required: string[];
|
|
85
|
+
};
|
|
86
|
+
} | {
|
|
87
|
+
name: string;
|
|
88
|
+
description: string;
|
|
89
|
+
inputSchema: {
|
|
90
|
+
type: string;
|
|
91
|
+
properties: {
|
|
92
|
+
id: {
|
|
93
|
+
type: string;
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
96
|
+
positionX: {
|
|
97
|
+
type: string;
|
|
98
|
+
description: string;
|
|
99
|
+
};
|
|
100
|
+
positionY: {
|
|
101
|
+
type: string;
|
|
102
|
+
description: string;
|
|
103
|
+
};
|
|
104
|
+
width: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
height: {
|
|
109
|
+
type: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
visible: {
|
|
113
|
+
type: string;
|
|
114
|
+
description: string;
|
|
115
|
+
};
|
|
116
|
+
widgetTypeId?: undefined;
|
|
117
|
+
};
|
|
118
|
+
required: string[];
|
|
119
|
+
};
|
|
120
|
+
})[];
|
|
121
|
+
//# sourceMappingURL=dashboard-widgets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-widgets.d.ts","sourceRoot":"","sources":["../../../src/tools/app/dashboard-widgets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;GAGG;AAEH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAWzF;AAED,wBAAsB,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAW5F;AAED,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAWzF;AAED,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAWjG;AAED,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAWtF;AAED,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAYzF;AAED,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAWpG;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+EhC,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Widgets Tools
|
|
3
|
+
* Dashboard widget types and user widget management
|
|
4
|
+
*/
|
|
5
|
+
export async function getDashboardOverview(apiClient, _args) {
|
|
6
|
+
const response = await apiClient.get('/v1/dashboard');
|
|
7
|
+
return {
|
|
8
|
+
content: [
|
|
9
|
+
{
|
|
10
|
+
type: 'text',
|
|
11
|
+
text: JSON.stringify(response, null, 2),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export async function getDashboardWidgetTypes(apiClient, _args) {
|
|
17
|
+
const response = await apiClient.get('/v1/dashboard/widget-types');
|
|
18
|
+
return {
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: JSON.stringify(response, null, 2),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export async function listDashboardWidgets(apiClient, _args) {
|
|
28
|
+
const response = await apiClient.get('/v1/dashboard/widgets');
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{
|
|
32
|
+
type: 'text',
|
|
33
|
+
text: JSON.stringify(response, null, 2),
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export async function getDashboardWidget(apiClient, args) {
|
|
39
|
+
const response = await apiClient.get(`/v1/dashboard/widgets/${args.id}`);
|
|
40
|
+
return {
|
|
41
|
+
content: [
|
|
42
|
+
{
|
|
43
|
+
type: 'text',
|
|
44
|
+
text: JSON.stringify(response, null, 2),
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export async function addDashboardWidget(apiClient, args) {
|
|
50
|
+
const response = await apiClient.post('/v1/dashboard/widgets', args);
|
|
51
|
+
return {
|
|
52
|
+
content: [
|
|
53
|
+
{
|
|
54
|
+
type: 'text',
|
|
55
|
+
text: JSON.stringify(response, null, 2),
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export async function updateDashboardWidget(apiClient, args) {
|
|
61
|
+
const { id, ...data } = args;
|
|
62
|
+
const response = await apiClient.put(`/v1/dashboard/widgets/${id}`, data);
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: JSON.stringify(response, null, 2),
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export async function removeDashboardWidget(apiClient, args) {
|
|
73
|
+
await apiClient.delete(`/v1/dashboard/widgets/${args.id}`);
|
|
74
|
+
return {
|
|
75
|
+
content: [
|
|
76
|
+
{
|
|
77
|
+
type: 'text',
|
|
78
|
+
text: 'Dashboard widget removed successfully',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export const dashboardWidgetTools = [
|
|
84
|
+
{
|
|
85
|
+
name: 'get_dashboard_overview',
|
|
86
|
+
description: 'Get dashboard overview with widgets and widget types',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'get_dashboard_widget_types',
|
|
94
|
+
description: 'Get all available dashboard widget types that can be added to the dashboard',
|
|
95
|
+
inputSchema: {
|
|
96
|
+
type: 'object',
|
|
97
|
+
properties: {},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'list_dashboard_widgets',
|
|
102
|
+
description: "Get all widgets configured on the user's dashboard, ordered by position",
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
properties: {},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'get_dashboard_widget',
|
|
110
|
+
description: 'Get a specific dashboard widget by ID with position, size, and type details',
|
|
111
|
+
inputSchema: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
properties: {
|
|
114
|
+
id: { type: 'number', description: 'Widget instance ID' },
|
|
115
|
+
},
|
|
116
|
+
required: ['id'],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'add_dashboard_widget',
|
|
121
|
+
description: 'Add a new widget to the dashboard. Specify widget type and optional position/size.',
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: 'object',
|
|
124
|
+
properties: {
|
|
125
|
+
widgetTypeId: { type: 'number', description: 'Widget type ID' },
|
|
126
|
+
positionX: { type: 'number', description: 'X position on grid' },
|
|
127
|
+
positionY: { type: 'number', description: 'Y position on grid' },
|
|
128
|
+
width: { type: 'number', description: 'Widget width in grid units' },
|
|
129
|
+
height: { type: 'number', description: 'Widget height in grid units' },
|
|
130
|
+
visible: { type: 'boolean', description: 'Widget visibility' },
|
|
131
|
+
},
|
|
132
|
+
required: ['widgetTypeId'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'update_dashboard_widget',
|
|
137
|
+
description: "Update a widget's position, size, or visibility on the dashboard",
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {
|
|
141
|
+
id: { type: 'number', description: 'Widget instance ID' },
|
|
142
|
+
positionX: { type: 'number', description: 'X position on grid' },
|
|
143
|
+
positionY: { type: 'number', description: 'Y position on grid' },
|
|
144
|
+
width: { type: 'number', description: 'Widget width in grid units' },
|
|
145
|
+
height: { type: 'number', description: 'Widget height in grid units' },
|
|
146
|
+
visible: { type: 'boolean', description: 'Widget visibility' },
|
|
147
|
+
},
|
|
148
|
+
required: ['id'],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'remove_dashboard_widget',
|
|
153
|
+
description: 'Remove a widget from the dashboard. Some widgets may be non-removable.',
|
|
154
|
+
inputSchema: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
properties: {
|
|
157
|
+
id: { type: 'number', description: 'Widget instance ID' },
|
|
158
|
+
},
|
|
159
|
+
required: ['id'],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
];
|
|
163
|
+
//# sourceMappingURL=dashboard-widgets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-widgets.js","sourceRoot":"","sources":["../../../src/tools/app/dashboard-widgets.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAAoB,EAAE,KAAU;IACzE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAEtD,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,uBAAuB,CAAC,SAAoB,EAAE,KAAU;IAC5E,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,4BAA4B,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,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAAoB,EAAE,KAAU;IACzE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAE9D,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,kBAAkB,CAAC,SAAoB,EA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tE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE;aAC/D;YACD,QAAQ,EAAE,CAAC,cAAc,CAAC;SAC3B;KACF;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,kEAAkE;QAC/E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;gBACzD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;gBAChE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;gBAChE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;gBACpE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gBACtE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE;aAC/D;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;IACD;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,wEAAwE;QACrF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;aAC1D;YACD,QAAQ,EAAE,CAAC,IAAI,CAAC;SACjB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ApiClient } from '../../client/api-client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Dashboard Tools
|
|
4
|
+
* Dashboard overview statistics
|
|
5
|
+
*
|
|
6
|
+
* NOTE: Dashboard widget CRUD is in dashboard-widgets.ts
|
|
7
|
+
* This file provides the dashboard overview endpoint.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDashboardStats(apiClient: ApiClient): Promise<any>;
|
|
10
|
+
export declare const dashboardTools: {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: string;
|
|
15
|
+
properties: {};
|
|
16
|
+
};
|
|
17
|
+
}[];
|
|
18
|
+
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../src/tools/app/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;;GAMG;AAEH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAW1E;AAED,eAAO,MAAM,cAAc;;;;;;;GAS1B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Tools
|
|
3
|
+
* Dashboard overview statistics
|
|
4
|
+
*
|
|
5
|
+
* NOTE: Dashboard widget CRUD is in dashboard-widgets.ts
|
|
6
|
+
* This file provides the dashboard overview endpoint.
|
|
7
|
+
*/
|
|
8
|
+
export async function getDashboardStats(apiClient) {
|
|
9
|
+
const response = await apiClient.get('/v1/dashboard');
|
|
10
|
+
return {
|
|
11
|
+
content: [
|
|
12
|
+
{
|
|
13
|
+
type: 'text',
|
|
14
|
+
text: JSON.stringify(response, null, 2),
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export const dashboardTools = [
|
|
20
|
+
{
|
|
21
|
+
name: 'get_dashboard_stats',
|
|
22
|
+
description: 'Get dashboard overview with widgets and widget types',
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/tools/app/dashboard.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAAoB;IAC1D,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAEtD,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,MAAM,cAAc,GAAG;IAC5B;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;KACF;CACF,CAAC"}
|