v0-api 0.0.2 → 0.0.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.mts +28 -27
- package/dist/client.d.ts +28 -27
- package/dist/generated/components.d.mts +80 -68
- package/dist/generated/components.d.ts +80 -68
- package/dist/generated/components.js +157 -99
- package/dist/generated/components.mjs +156 -99
- package/dist/generated/mcp.d.mts +261 -0
- package/dist/generated/mcp.d.ts +261 -0
- package/dist/generated/mcp.js +554 -0
- package/dist/generated/mcp.mjs +524 -0
- package/dist/generated/schemas.d.mts +520 -151
- package/dist/generated/schemas.d.ts +520 -151
- package/dist/generated/schemas.js +106 -69
- package/dist/generated/schemas.mjs +100 -63
- package/dist/generated/types.d.mts +41 -0
- package/dist/generated/types.d.ts +41 -0
- package/dist/generated/types.js +12 -12
- package/dist/generated/types.mjs +12 -12
- package/dist/index.d.mts +50 -43
- package/dist/index.d.ts +50 -43
- package/dist/mcp.d.mts +1 -0
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +5 -0
- package/dist/mcp.mjs +1 -0
- package/dist/utils/fetcher.d.mts +1 -1
- package/dist/utils/fetcher.d.ts +1 -1
- package/dist/utils/mcp.d.mts +1 -0
- package/dist/utils/mcp.d.ts +1 -0
- package/dist/utils/mcp.js +2 -0
- package/dist/utils/mcp.mjs +1 -0
- package/package.json +14 -4
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.chatsCreate = chatsCreate;
|
|
7
|
+
exports.chatsFind = chatsFind;
|
|
8
|
+
exports.chatsInitCreate = chatsInitCreate;
|
|
9
|
+
exports.chatsDelete = chatsDelete;
|
|
10
|
+
exports.chatsGetById = chatsGetById;
|
|
11
|
+
exports.chatsUpdate = chatsUpdate;
|
|
12
|
+
exports.chatsFavorite = chatsFavorite;
|
|
13
|
+
exports.chatsFork = chatsFork;
|
|
14
|
+
exports.projectsGetByChatId = projectsGetByChatId;
|
|
15
|
+
exports.chatsSendMessage = chatsSendMessage;
|
|
16
|
+
exports.chatsGetMetadata = chatsGetMetadata;
|
|
17
|
+
exports.chatsResume = chatsResume;
|
|
18
|
+
exports.deploymentsFindLogs = deploymentsFindLogs;
|
|
19
|
+
exports.deploymentsFindErrors = deploymentsFindErrors;
|
|
20
|
+
exports.integrationsVercelProjectsFind = integrationsVercelProjectsFind;
|
|
21
|
+
exports.integrationsVercelProjectsCreate = integrationsVercelProjectsCreate;
|
|
22
|
+
exports.projectsFind = projectsFind;
|
|
23
|
+
exports.projectsCreate = projectsCreate;
|
|
24
|
+
exports.projectsAssign = projectsAssign;
|
|
25
|
+
exports.rateLimitsFind = rateLimitsFind;
|
|
26
|
+
exports.userGet = userGet;
|
|
27
|
+
exports.userGetBilling = userGetBilling;
|
|
28
|
+
exports.userGetPlan = userGetPlan;
|
|
29
|
+
exports.userGetScopes = userGetScopes;
|
|
30
|
+
exports.initMcpTools = initMcpTools;
|
|
31
|
+
const fetcher_1 = __importDefault(require("../utils/fetcher.js"));
|
|
32
|
+
const schemas_ts_1 = require("./schemas.js");
|
|
33
|
+
/**
|
|
34
|
+
* @description Create a new chat
|
|
35
|
+
* @summary Create Chat
|
|
36
|
+
* {@link /chats}
|
|
37
|
+
*/
|
|
38
|
+
async function chatsCreate({ config = {} }) {
|
|
39
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
40
|
+
const data = await request({
|
|
41
|
+
method: 'POST',
|
|
42
|
+
url: `/chats`,
|
|
43
|
+
...requestConfig,
|
|
44
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
45
|
+
});
|
|
46
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @description Find all chats
|
|
50
|
+
* @summary Find Chats
|
|
51
|
+
* {@link /chats}
|
|
52
|
+
*/
|
|
53
|
+
async function chatsFind({ queryParams, config = {} }) {
|
|
54
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
55
|
+
const data = await request({ method: 'GET', url: `/chats`, queryParams, ...requestConfig });
|
|
56
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @description Initialize a new chat from files
|
|
60
|
+
* @summary Initialize Chat
|
|
61
|
+
* {@link /chats/init}
|
|
62
|
+
*/
|
|
63
|
+
async function chatsInitCreate({ config = {} }) {
|
|
64
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
65
|
+
const data = await request({
|
|
66
|
+
method: 'POST',
|
|
67
|
+
url: `/chats/init`,
|
|
68
|
+
...requestConfig,
|
|
69
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
70
|
+
});
|
|
71
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @description Delete a chat
|
|
75
|
+
* @summary Delete Chat
|
|
76
|
+
* {@link /chats/:chatId}
|
|
77
|
+
*/
|
|
78
|
+
async function chatsDelete({ pathParams: { chatId }, config = {} }) {
|
|
79
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
80
|
+
if (!chatId) {
|
|
81
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
82
|
+
}
|
|
83
|
+
const data = await request({ method: 'DELETE', url: `/chats/${chatId}`, ...requestConfig });
|
|
84
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @description Get a chat
|
|
88
|
+
* @summary Get Chat
|
|
89
|
+
* {@link /chats/:chatId}
|
|
90
|
+
*/
|
|
91
|
+
async function chatsGetById({ pathParams: { chatId }, config = {} }) {
|
|
92
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
93
|
+
if (!chatId) {
|
|
94
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
95
|
+
}
|
|
96
|
+
const data = await request({ method: 'GET', url: `/chats/${chatId}`, ...requestConfig });
|
|
97
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @description Update a chat
|
|
101
|
+
* @summary Update Chat
|
|
102
|
+
* {@link /chats/:chatId}
|
|
103
|
+
*/
|
|
104
|
+
async function chatsUpdate({ pathParams: { chatId }, config = {} }) {
|
|
105
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
106
|
+
if (!chatId) {
|
|
107
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
108
|
+
}
|
|
109
|
+
const data = await request({
|
|
110
|
+
method: 'PATCH',
|
|
111
|
+
url: `/chats/${chatId}`,
|
|
112
|
+
...requestConfig,
|
|
113
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
114
|
+
});
|
|
115
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @description Favorite a chat
|
|
119
|
+
* @summary Favorite Chat
|
|
120
|
+
* {@link /chats/:chatId/favorite}
|
|
121
|
+
*/
|
|
122
|
+
async function chatsFavorite({ pathParams: { chatId }, config = {} }) {
|
|
123
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
124
|
+
if (!chatId) {
|
|
125
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
126
|
+
}
|
|
127
|
+
const data = await request({
|
|
128
|
+
method: 'PUT',
|
|
129
|
+
url: `/chats/${chatId}/favorite`,
|
|
130
|
+
...requestConfig,
|
|
131
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
132
|
+
});
|
|
133
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @description Fork a version in a chat
|
|
137
|
+
* @summary Fork Chat
|
|
138
|
+
* {@link /chats/:chatId/fork}
|
|
139
|
+
*/
|
|
140
|
+
async function chatsFork({ pathParams: { chatId }, config = {} }) {
|
|
141
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
142
|
+
if (!chatId) {
|
|
143
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
144
|
+
}
|
|
145
|
+
const data = await request({
|
|
146
|
+
method: 'POST',
|
|
147
|
+
url: `/chats/${chatId}/fork`,
|
|
148
|
+
...requestConfig,
|
|
149
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
150
|
+
});
|
|
151
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @description Get the project for a chat
|
|
155
|
+
* @summary Get Project by Chat ID
|
|
156
|
+
* {@link /chats/:chatId/project}
|
|
157
|
+
*/
|
|
158
|
+
async function projectsGetByChatId({ pathParams: { chatId }, config = {} }) {
|
|
159
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
160
|
+
if (!chatId) {
|
|
161
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
162
|
+
}
|
|
163
|
+
const data = await request({ method: 'GET', url: `/chats/${chatId}/project`, ...requestConfig });
|
|
164
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @description Create a new message in a chat
|
|
168
|
+
* @summary Create Message
|
|
169
|
+
* {@link /chats/:chatId/messages}
|
|
170
|
+
*/
|
|
171
|
+
async function chatsSendMessage({ pathParams: { chatId }, config = {} }) {
|
|
172
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
173
|
+
if (!chatId) {
|
|
174
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
175
|
+
}
|
|
176
|
+
const data = await request({
|
|
177
|
+
method: 'POST',
|
|
178
|
+
url: `/chats/${chatId}/messages`,
|
|
179
|
+
...requestConfig,
|
|
180
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
181
|
+
});
|
|
182
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* @description Get the metadata for a chat
|
|
186
|
+
* @summary Get Chat Metadata
|
|
187
|
+
* {@link /chats/:chatId/metadata}
|
|
188
|
+
*/
|
|
189
|
+
async function chatsGetMetadata({ pathParams: { chatId }, config = {} }) {
|
|
190
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
191
|
+
if (!chatId) {
|
|
192
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
193
|
+
}
|
|
194
|
+
const data = await request({ method: 'GET', url: `/chats/${chatId}/metadata`, ...requestConfig });
|
|
195
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* @description Resume a chat message
|
|
199
|
+
* @summary Resume Chat Message
|
|
200
|
+
* {@link /chats/:chatId/messages/:messageId/resume}
|
|
201
|
+
*/
|
|
202
|
+
async function chatsResume({ pathParams: { chatId, messageId }, config = {} }) {
|
|
203
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
204
|
+
if (!chatId) {
|
|
205
|
+
throw new Error(`Missing required path parameter: chatId`);
|
|
206
|
+
}
|
|
207
|
+
if (!messageId) {
|
|
208
|
+
throw new Error(`Missing required path parameter: messageId`);
|
|
209
|
+
}
|
|
210
|
+
const data = await request({ method: 'POST', url: `/chats/${chatId}/messages/${messageId}/resume`, ...requestConfig });
|
|
211
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* @description Find logs for a deployment
|
|
215
|
+
* @summary Find Deployment Logs
|
|
216
|
+
* {@link /deployments/:deploymentId/logs}
|
|
217
|
+
*/
|
|
218
|
+
async function deploymentsFindLogs({ pathParams: { deploymentId }, queryParams, config = {} }) {
|
|
219
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
220
|
+
if (!deploymentId) {
|
|
221
|
+
throw new Error(`Missing required path parameter: deploymentId`);
|
|
222
|
+
}
|
|
223
|
+
const data = await request({ method: 'GET', url: `/deployments/${deploymentId}/logs`, queryParams, ...requestConfig });
|
|
224
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @description Find errors for a deployment
|
|
228
|
+
* @summary Find Deployment Errors
|
|
229
|
+
* {@link /deployments/:deploymentId/errors}
|
|
230
|
+
*/
|
|
231
|
+
async function deploymentsFindErrors({ pathParams: { deploymentId }, config = {} }) {
|
|
232
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
233
|
+
if (!deploymentId) {
|
|
234
|
+
throw new Error(`Missing required path parameter: deploymentId`);
|
|
235
|
+
}
|
|
236
|
+
const data = await request({ method: 'GET', url: `/deployments/${deploymentId}/errors`, ...requestConfig });
|
|
237
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @description Find all Vercel projects
|
|
241
|
+
* @summary Find Vercel Projects
|
|
242
|
+
* {@link /integrations/vercel/projects}
|
|
243
|
+
*/
|
|
244
|
+
async function integrationsVercelProjectsFind({ config = {} }) {
|
|
245
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
246
|
+
const data = await request({ method: 'GET', url: `/integrations/vercel/projects`, ...requestConfig });
|
|
247
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* @description Create a new Vercel project
|
|
251
|
+
* @summary Create Vercel Project
|
|
252
|
+
* {@link /integrations/vercel/projects}
|
|
253
|
+
*/
|
|
254
|
+
async function integrationsVercelProjectsCreate({ config = {} }) {
|
|
255
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
256
|
+
const data = await request({
|
|
257
|
+
method: 'POST',
|
|
258
|
+
url: `/integrations/vercel/projects`,
|
|
259
|
+
...requestConfig,
|
|
260
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
261
|
+
});
|
|
262
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* @description Find all projects
|
|
266
|
+
* @summary Find Projects
|
|
267
|
+
* {@link /projects}
|
|
268
|
+
*/
|
|
269
|
+
async function projectsFind({ config = {} }) {
|
|
270
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
271
|
+
const data = await request({ method: 'GET', url: `/projects`, ...requestConfig });
|
|
272
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* @description Create a new project
|
|
276
|
+
* @summary Create Project
|
|
277
|
+
* {@link /projects}
|
|
278
|
+
*/
|
|
279
|
+
async function projectsCreate({ config = {} }) {
|
|
280
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
281
|
+
const data = await request({
|
|
282
|
+
method: 'POST',
|
|
283
|
+
url: `/projects`,
|
|
284
|
+
...requestConfig,
|
|
285
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
286
|
+
});
|
|
287
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* @description Assign a project to a chat
|
|
291
|
+
* @summary Assign Project to Chat
|
|
292
|
+
* {@link /projects/:projectId/assign}
|
|
293
|
+
*/
|
|
294
|
+
async function projectsAssign({ pathParams: { projectId }, config = {} }) {
|
|
295
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
296
|
+
if (!projectId) {
|
|
297
|
+
throw new Error(`Missing required path parameter: projectId`);
|
|
298
|
+
}
|
|
299
|
+
const data = await request({
|
|
300
|
+
method: 'POST',
|
|
301
|
+
url: `/projects/${projectId}/assign`,
|
|
302
|
+
...requestConfig,
|
|
303
|
+
headers: { 'Content-Type': 'applicationJson', ...requestConfig.headers }
|
|
304
|
+
});
|
|
305
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* @description Find the rate limit for a scope
|
|
309
|
+
* @summary Find Rate Limit
|
|
310
|
+
* {@link /rate-limits}
|
|
311
|
+
*/
|
|
312
|
+
async function rateLimitsFind({ queryParams, config = {} }) {
|
|
313
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
314
|
+
const data = await request({ method: 'GET', url: `/rate-limits`, queryParams, ...requestConfig });
|
|
315
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* @description Get the user
|
|
319
|
+
* @summary Get User
|
|
320
|
+
* {@link /user}
|
|
321
|
+
*/
|
|
322
|
+
async function userGet({ config = {} }) {
|
|
323
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
324
|
+
const data = await request({ method: 'GET', url: `/user`, ...requestConfig });
|
|
325
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* @description Get the billing for the user
|
|
329
|
+
* @summary Get Billing
|
|
330
|
+
* {@link /user/billing}
|
|
331
|
+
*/
|
|
332
|
+
async function userGetBilling({ queryParams, config = {} }) {
|
|
333
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
334
|
+
const data = await request({ method: 'GET', url: `/user/billing`, queryParams, ...requestConfig });
|
|
335
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @description Get the plan for the user
|
|
339
|
+
* @summary Get Plan
|
|
340
|
+
* {@link /user/plan}
|
|
341
|
+
*/
|
|
342
|
+
async function userGetPlan({ config = {} }) {
|
|
343
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
344
|
+
const data = await request({ method: 'GET', url: `/user/plan`, ...requestConfig });
|
|
345
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* @description Get all scopes for the user
|
|
349
|
+
* @summary Get User Scopes
|
|
350
|
+
* {@link /user/scopes}
|
|
351
|
+
*/
|
|
352
|
+
async function userGetScopes({ config = {} }) {
|
|
353
|
+
const { client: request = fetcher_1.default, ...requestConfig } = config;
|
|
354
|
+
const data = await request({ method: 'GET', url: `/user/scopes`, ...requestConfig });
|
|
355
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
356
|
+
}
|
|
357
|
+
function initMcpTools(serverLike, config) {
|
|
358
|
+
const server = serverLike;
|
|
359
|
+
server.tool('chatsCreate', 'Create a new chat', async () => {
|
|
360
|
+
try {
|
|
361
|
+
return await chatsCreate({ config });
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
server.tool('chatsFind', 'Find all chats', { queryParams: schemas_ts_1.chatsFindQueryParamsSchema }, async ({ queryParams }) => {
|
|
368
|
+
try {
|
|
369
|
+
return await chatsFind({ queryParams, config });
|
|
370
|
+
}
|
|
371
|
+
catch (error) {
|
|
372
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
server.tool('chatsInitCreate', 'Initialize a new chat from files', async () => {
|
|
376
|
+
try {
|
|
377
|
+
return await chatsInitCreate({ config });
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
server.tool('chatsDelete', 'Delete a chat', { chatId: schemas_ts_1.chatsDeletePathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
384
|
+
try {
|
|
385
|
+
return await chatsDelete({ pathParams: { chatId }, config });
|
|
386
|
+
}
|
|
387
|
+
catch (error) {
|
|
388
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
server.tool('chatsGetById', 'Get a chat', { chatId: schemas_ts_1.chatsGetByIdPathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
392
|
+
try {
|
|
393
|
+
return await chatsGetById({ pathParams: { chatId }, config });
|
|
394
|
+
}
|
|
395
|
+
catch (error) {
|
|
396
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
server.tool('chatsUpdate', 'Update a chat', { chatId: schemas_ts_1.chatsUpdatePathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
400
|
+
try {
|
|
401
|
+
return await chatsUpdate({ pathParams: { chatId }, config });
|
|
402
|
+
}
|
|
403
|
+
catch (error) {
|
|
404
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
server.tool('chatsFavorite', 'Favorite a chat', { chatId: schemas_ts_1.chatsFavoritePathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
408
|
+
try {
|
|
409
|
+
return await chatsFavorite({ pathParams: { chatId }, config });
|
|
410
|
+
}
|
|
411
|
+
catch (error) {
|
|
412
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
server.tool('chatsFork', 'Fork a version in a chat', { chatId: schemas_ts_1.chatsForkPathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
416
|
+
try {
|
|
417
|
+
return await chatsFork({ pathParams: { chatId }, config });
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
server.tool('projectsGetByChatId', 'Get the project for a chat', { chatId: schemas_ts_1.projectsGetByChatIdPathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
424
|
+
try {
|
|
425
|
+
return await projectsGetByChatId({ pathParams: { chatId }, config });
|
|
426
|
+
}
|
|
427
|
+
catch (error) {
|
|
428
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
server.tool('chatsSendMessage', 'Create a new message in a chat', { chatId: schemas_ts_1.chatsSendMessagePathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
432
|
+
try {
|
|
433
|
+
return await chatsSendMessage({ pathParams: { chatId }, config });
|
|
434
|
+
}
|
|
435
|
+
catch (error) {
|
|
436
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
server.tool('chatsGetMetadata', 'Get the metadata for a chat', { chatId: schemas_ts_1.chatsGetMetadataPathParamsSchema.shape.chatId }, async ({ chatId }) => {
|
|
440
|
+
try {
|
|
441
|
+
return await chatsGetMetadata({ pathParams: { chatId }, config });
|
|
442
|
+
}
|
|
443
|
+
catch (error) {
|
|
444
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
server.tool('chatsResume', 'Resume a chat message', { chatId: schemas_ts_1.chatsResumePathParamsSchema.shape.chatId, messageId: schemas_ts_1.chatsResumePathParamsSchema.shape.messageId }, async ({ chatId, messageId }) => {
|
|
448
|
+
try {
|
|
449
|
+
return await chatsResume({ pathParams: { chatId, messageId }, config });
|
|
450
|
+
}
|
|
451
|
+
catch (error) {
|
|
452
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
server.tool('deploymentsFindLogs', 'Find logs for a deployment', {
|
|
456
|
+
deploymentId: schemas_ts_1.deploymentsFindLogsPathParamsSchema.shape.deploymentId,
|
|
457
|
+
queryParams: schemas_ts_1.deploymentsFindLogsQueryParamsSchema
|
|
458
|
+
}, async ({ deploymentId, queryParams }) => {
|
|
459
|
+
try {
|
|
460
|
+
return await deploymentsFindLogs({ pathParams: { deploymentId }, queryParams, config });
|
|
461
|
+
}
|
|
462
|
+
catch (error) {
|
|
463
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
server.tool('deploymentsFindErrors', 'Find errors for a deployment', { deploymentId: schemas_ts_1.deploymentsFindErrorsPathParamsSchema.shape.deploymentId }, async ({ deploymentId }) => {
|
|
467
|
+
try {
|
|
468
|
+
return await deploymentsFindErrors({ pathParams: { deploymentId }, config });
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
server.tool('integrationsVercelProjectsFind', 'Find all Vercel projects', async () => {
|
|
475
|
+
try {
|
|
476
|
+
return await integrationsVercelProjectsFind({ config });
|
|
477
|
+
}
|
|
478
|
+
catch (error) {
|
|
479
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
server.tool('integrationsVercelProjectsCreate', 'Create a new Vercel project', async () => {
|
|
483
|
+
try {
|
|
484
|
+
return await integrationsVercelProjectsCreate({ config });
|
|
485
|
+
}
|
|
486
|
+
catch (error) {
|
|
487
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
server.tool('projectsFind', 'Find all projects', async () => {
|
|
491
|
+
try {
|
|
492
|
+
return await projectsFind({ config });
|
|
493
|
+
}
|
|
494
|
+
catch (error) {
|
|
495
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
server.tool('projectsCreate', 'Create a new project', async () => {
|
|
499
|
+
try {
|
|
500
|
+
return await projectsCreate({ config });
|
|
501
|
+
}
|
|
502
|
+
catch (error) {
|
|
503
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
server.tool('projectsAssign', 'Assign a project to a chat', { projectId: schemas_ts_1.projectsAssignPathParamsSchema.shape.projectId }, async ({ projectId }) => {
|
|
507
|
+
try {
|
|
508
|
+
return await projectsAssign({ pathParams: { projectId }, config });
|
|
509
|
+
}
|
|
510
|
+
catch (error) {
|
|
511
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
server.tool('rateLimitsFind', 'Find the rate limit for a scope', { queryParams: schemas_ts_1.rateLimitsFindQueryParamsSchema }, async ({ queryParams }) => {
|
|
515
|
+
try {
|
|
516
|
+
return await rateLimitsFind({ queryParams, config });
|
|
517
|
+
}
|
|
518
|
+
catch (error) {
|
|
519
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
server.tool('userGet', 'Get the user', async () => {
|
|
523
|
+
try {
|
|
524
|
+
return await userGet({ config });
|
|
525
|
+
}
|
|
526
|
+
catch (error) {
|
|
527
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
server.tool('userGetBilling', 'Get the billing for the user', { queryParams: schemas_ts_1.userGetBillingQueryParamsSchema }, async ({ queryParams }) => {
|
|
531
|
+
try {
|
|
532
|
+
return await userGetBilling({ queryParams, config });
|
|
533
|
+
}
|
|
534
|
+
catch (error) {
|
|
535
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
server.tool('userGetPlan', 'Get the plan for the user', async () => {
|
|
539
|
+
try {
|
|
540
|
+
return await userGetPlan({ config });
|
|
541
|
+
}
|
|
542
|
+
catch (error) {
|
|
543
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
server.tool('userGetScopes', 'Get all scopes for the user', async () => {
|
|
547
|
+
try {
|
|
548
|
+
return await userGetScopes({ config });
|
|
549
|
+
}
|
|
550
|
+
catch (error) {
|
|
551
|
+
return { isError: true, content: [{ type: 'text', text: JSON.stringify(error) }] };
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
}
|