v0-api 0.1.4 → 0.2.1

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.
@@ -1,1498 +1,68 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- function notEmpty(value) {
4
- return value !== null && value !== undefined;
5
- }
6
- function compactObject(obj) {
7
- return Object.fromEntries(Object.entries(obj).filter(([, value])=>notEmpty(value)));
8
- }
3
+ var components = require('./components-da0zh5te.cjs');
9
4
 
10
- async function client({ url, method, body, headers, queryParams, signal, token = null, baseUrl = "", fetchImpl = fetch }) {
11
- try {
12
- const requestHeaders = compactObject({
13
- "Content-Type": "application/json",
14
- Authorization: token ? `Bearer ${token}` : undefined,
15
- ...headers
16
- });
17
- /**
18
- * As the fetch API is being used, when multipart/form-data is specified
19
- * the Content-Type header must be deleted so that the browser can set
20
- * the correct boundary.
21
- * https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects#sending_files_using_a_formdata_object
22
- */ if (requestHeaders["Content-Type"]?.toLowerCase().includes("multipart/form-data")) {
23
- delete requestHeaders["Content-Type"];
24
- }
25
- const payload = body instanceof FormData ? body : requestHeaders["Content-Type"] === "application/json" ? JSON.stringify(body) : body;
26
- const fullUrl = `${baseUrl}${resolveUrl(url, queryParams)}`;
27
- const response = await fetchImpl(fullUrl, {
28
- signal,
29
- method: method.toUpperCase(),
30
- body: payload,
31
- headers: requestHeaders
32
- });
33
- if (!response.ok) {
34
- let error;
35
- try {
36
- error = await response.json();
37
- } catch (e) {
38
- error = {
39
- status: "unknown",
40
- payload: e instanceof Error ? `Unexpected error (${e.message})` : "Unexpected error"
41
- };
42
- }
43
- throw error;
44
- }
45
- if (response.headers?.get("content-type")?.includes("json")) {
46
- return await response.json();
47
- } else {
48
- // if it is not a json response, assume it is a blob and cast it to TData
49
- return await response.text();
50
- }
51
- } catch (e) {
52
- const errorObject = {
53
- name: "unknown",
54
- message: e?.message ? `${e?.message}` : "Network error"
55
- };
56
- throw errorObject;
57
- }
58
- }
59
- const resolveUrl = (url, queryParams = {})=>{
60
- let query = new URLSearchParams(queryParams).toString();
61
- if (query) query = `?${query}`;
62
- return url + query;
63
- };
64
5
 
65
- /**
66
- * @summary Create Chat
67
- * @description Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.
68
- * @link /chats
69
- */ async function chatsCreate({ config } = {}) {
70
- const { client: request = client, ...requestConfig } = config ?? {};
71
- const data = await request({
72
- method: "POST",
73
- url: `/chats`,
74
- ...requestConfig,
75
- headers: {
76
- ...requestConfig.headers
77
- }
78
- });
79
- return data;
80
- }
81
- /**
82
- * @summary Find Chats
83
- * @description Retrieves a list of existing chats, with support for pagination and filtering by favorite status, Vercel project, or Git branch. Helps manage and navigate chat history.
84
- * @link /chats
85
- */ async function chatsFind({ queryParams, config } = {}) {
86
- const { client: request = client, ...requestConfig } = config ?? {};
87
- const data = await request({
88
- method: "GET",
89
- url: `/chats`,
90
- queryParams,
91
- ...requestConfig,
92
- headers: {
93
- ...requestConfig.headers
94
- }
95
- });
96
- return data;
97
- }
98
- /**
99
- * @summary Initialize Chat
100
- * @description Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets.
101
- * @link /chats/init
102
- */ async function chatsInit({ config } = {}) {
103
- const { client: request = client, ...requestConfig } = config ?? {};
104
- const data = await request({
105
- method: "POST",
106
- url: `/chats/init`,
107
- ...requestConfig,
108
- headers: {
109
- ...requestConfig.headers
110
- }
111
- });
112
- return data;
113
- }
114
- /**
115
- * @summary Delete Chat
116
- * @description Deletes a specific chat based on the provided chatId. The chat and its contents are moved to trash and stop being retrievable immediately, then retained for 30 days before being permanently removed.
117
- * @link /chats/{chatId}
118
- */ async function chatsDelete({ pathParams, config } = {}) {
119
- const { client: request = client, ...requestConfig } = config ?? {};
120
- if (!pathParams.chatId) {
121
- throw new Error(`Missing required path parameter: chatId`);
122
- }
123
- const data = await request({
124
- method: "DELETE",
125
- url: `/chats/${pathParams.chatId}`,
126
- ...requestConfig,
127
- headers: {
128
- ...requestConfig.headers
129
- }
130
- });
131
- return data;
132
- }
133
- /**
134
- * @summary Get Chat
135
- * @description Retrieves the full details of a specific chat using its `chatId`. Includes messages, metadata, and associated configuration.
136
- * @link /chats/{chatId}
137
- */ async function chatsGetById({ pathParams, config } = {}) {
138
- const { client: request = client, ...requestConfig } = config ?? {};
139
- if (!pathParams.chatId) {
140
- throw new Error(`Missing required path parameter: chatId`);
141
- }
142
- const data = await request({
143
- method: "GET",
144
- url: `/chats/${pathParams.chatId}`,
145
- ...requestConfig,
146
- headers: {
147
- ...requestConfig.headers
148
- }
149
- });
150
- return data;
151
- }
152
- /**
153
- * @summary Update Chat
154
- * @description Updates the metadata of an existing chat using its `chatId`. Supports changes to the chat name and privacy setting.
155
- * @link /chats/{chatId}
156
- */ async function chatsUpdate({ pathParams, config } = {}) {
157
- const { client: request = client, ...requestConfig } = config ?? {};
158
- if (!pathParams.chatId) {
159
- throw new Error(`Missing required path parameter: chatId`);
160
- }
161
- const data = await request({
162
- method: "PATCH",
163
- url: `/chats/${pathParams.chatId}`,
164
- ...requestConfig,
165
- headers: {
166
- ...requestConfig.headers
167
- }
168
- });
169
- return data;
170
- }
171
- /**
172
- * @summary Favorite Chat
173
- * @description Marks or unmarks a chat as a favorite using its `chatId`. This helps with organizing and quickly accessing important chats.
174
- * @link /chats/{chatId}/favorite
175
- */ async function chatsFavorite({ pathParams, config } = {}) {
176
- const { client: request = client, ...requestConfig } = config ?? {};
177
- if (!pathParams.chatId) {
178
- throw new Error(`Missing required path parameter: chatId`);
179
- }
180
- const data = await request({
181
- method: "PUT",
182
- url: `/chats/${pathParams.chatId}/favorite`,
183
- ...requestConfig,
184
- headers: {
185
- ...requestConfig.headers
186
- }
187
- });
188
- return data;
189
- }
190
- /**
191
- * @summary Fork Chat
192
- * @description Creates a new chat fork (duplicate) from a specific version within a chat created through Platform API v1. To duplicate chats created in v0 web or Platform API v2, use POST /v2/chats/{chatId}/duplicate.
193
- * @link /chats/{chatId}/fork
194
- */ async function chatsFork({ pathParams, config } = {}) {
195
- const { client: request = client, ...requestConfig } = config ?? {};
196
- if (!pathParams.chatId) {
197
- throw new Error(`Missing required path parameter: chatId`);
198
- }
199
- const data = await request({
200
- method: "POST",
201
- url: `/chats/${pathParams.chatId}/fork`,
202
- ...requestConfig,
203
- headers: {
204
- ...requestConfig.headers
205
- }
206
- });
207
- return data;
208
- }
209
- /**
210
- * @summary Get Project by Chat ID
211
- * @description Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.
212
- * @link /chats/{chatId}/project
213
- */ async function projectsGetByChatId({ pathParams, config } = {}) {
214
- const { client: request = client, ...requestConfig } = config ?? {};
215
- if (!pathParams.chatId) {
216
- throw new Error(`Missing required path parameter: chatId`);
217
- }
218
- const data = await request({
219
- method: "GET",
220
- url: `/chats/${pathParams.chatId}/project`,
221
- ...requestConfig,
222
- headers: {
223
- ...requestConfig.headers
224
- }
225
- });
226
- return data;
227
- }
228
- /**
229
- * @summary Find Chat Messages
230
- * @description Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.
231
- * @link /chats/{chatId}/messages
232
- */ async function chatsFindMessages({ pathParams, queryParams, config } = {}) {
233
- const { client: request = client, ...requestConfig } = config ?? {};
234
- if (!pathParams.chatId) {
235
- throw new Error(`Missing required path parameter: chatId`);
236
- }
237
- const data = await request({
238
- method: "GET",
239
- url: `/chats/${pathParams.chatId}/messages`,
240
- queryParams,
241
- ...requestConfig,
242
- headers: {
243
- ...requestConfig.headers
244
- }
245
- });
246
- return data;
247
- }
248
- /**
249
- * @summary Send Message
250
- * @description Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.
251
- * @link /chats/{chatId}/messages
252
- */ async function chatsSendMessage({ pathParams, config } = {}) {
253
- const { client: request = client, ...requestConfig } = config ?? {};
254
- if (!pathParams.chatId) {
255
- throw new Error(`Missing required path parameter: chatId`);
256
- }
257
- const data = await request({
258
- method: "POST",
259
- url: `/chats/${pathParams.chatId}/messages`,
260
- ...requestConfig,
261
- headers: {
262
- ...requestConfig.headers
263
- }
264
- });
265
- return data;
266
- }
267
- /**
268
- * @summary Get Chat Message
269
- * @description Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.
270
- * @link /chats/{chatId}/messages/{messageId}
271
- */ async function chatsGetMessage({ pathParams, config } = {}) {
272
- const { client: request = client, ...requestConfig } = config ?? {};
273
- if (!pathParams.chatId) {
274
- throw new Error(`Missing required path parameter: chatId`);
275
- }
276
- if (!pathParams.messageId) {
277
- throw new Error(`Missing required path parameter: messageId`);
278
- }
279
- const data = await request({
280
- method: "GET",
281
- url: `/chats/${pathParams.chatId}/messages/${pathParams.messageId}`,
282
- ...requestConfig,
283
- headers: {
284
- ...requestConfig.headers
285
- }
286
- });
287
- return data;
288
- }
289
- /**
290
- * @summary Find Chat Versions
291
- * @description Retrieves a list of all versions (iterations) for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes version status and demo URLs.
292
- * @link /chats/{chatId}/versions
293
- */ async function chatsFindVersions({ pathParams, queryParams, config } = {}) {
294
- const { client: request = client, ...requestConfig } = config ?? {};
295
- if (!pathParams.chatId) {
296
- throw new Error(`Missing required path parameter: chatId`);
297
- }
298
- const data = await request({
299
- method: "GET",
300
- url: `/chats/${pathParams.chatId}/versions`,
301
- queryParams,
302
- ...requestConfig,
303
- headers: {
304
- ...requestConfig.headers
305
- }
306
- });
307
- return data;
308
- }
309
- /**
310
- * @summary Get Chat Version
311
- * @description Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.
312
- * @link /chats/{chatId}/versions/{versionId}
313
- */ async function chatsGetVersion({ pathParams, queryParams, config } = {}) {
314
- const { client: request = client, ...requestConfig } = config ?? {};
315
- if (!pathParams.chatId) {
316
- throw new Error(`Missing required path parameter: chatId`);
317
- }
318
- if (!pathParams.versionId) {
319
- throw new Error(`Missing required path parameter: versionId`);
320
- }
321
- const data = await request({
322
- method: "GET",
323
- url: `/chats/${pathParams.chatId}/versions/${pathParams.versionId}`,
324
- queryParams,
325
- ...requestConfig,
326
- headers: {
327
- ...requestConfig.headers
328
- }
329
- });
330
- return data;
331
- }
332
- /**
333
- * @summary Update Chat Version Files
334
- * @description Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.
335
- * @link /chats/{chatId}/versions/{versionId}
336
- */ async function chatsUpdateVersion({ pathParams, config } = {}) {
337
- const { client: request = client, ...requestConfig } = config ?? {};
338
- if (!pathParams.chatId) {
339
- throw new Error(`Missing required path parameter: chatId`);
340
- }
341
- if (!pathParams.versionId) {
342
- throw new Error(`Missing required path parameter: versionId`);
343
- }
344
- const data = await request({
345
- method: "PATCH",
346
- url: `/chats/${pathParams.chatId}/versions/${pathParams.versionId}`,
347
- ...requestConfig,
348
- headers: {
349
- ...requestConfig.headers
350
- }
351
- });
352
- return data;
353
- }
354
- /**
355
- * @summary Download version files
356
- * @description Download all files for a specific chat version as a zip or tarball archive. Use includeDefaultFiles=true to include all deployment files (package.json, configuration files, etc.) or false/omitted to return only the generated source files.
357
- * @link /chats/{chatId}/versions/{versionId}/download
358
- */ async function chatsDownloadVersion({ pathParams, queryParams, config } = {}) {
359
- const { client: request = client, ...requestConfig } = config ?? {};
360
- if (!pathParams.chatId) {
361
- throw new Error(`Missing required path parameter: chatId`);
362
- }
363
- if (!pathParams.versionId) {
364
- throw new Error(`Missing required path parameter: versionId`);
365
- }
366
- const data = await request({
367
- method: "GET",
368
- url: `/chats/${pathParams.chatId}/versions/${pathParams.versionId}/download`,
369
- queryParams,
370
- ...requestConfig,
371
- headers: {
372
- ...requestConfig.headers
373
- }
374
- });
375
- return data;
376
- }
377
- /**
378
- * @summary Delete Chat Version Files
379
- * @description Deletes source files from a specific chat version (block). Files are removed from the version and a new source version is created.
380
- * @link /chats/{chatId}/versions/{versionId}/files/delete
381
- */ async function chatsDeleteVersionFiles({ pathParams, config } = {}) {
382
- const { client: request = client, ...requestConfig } = config ?? {};
383
- if (!pathParams.chatId) {
384
- throw new Error(`Missing required path parameter: chatId`);
385
- }
386
- if (!pathParams.versionId) {
387
- throw new Error(`Missing required path parameter: versionId`);
388
- }
389
- const data = await request({
390
- method: "POST",
391
- url: `/chats/${pathParams.chatId}/versions/${pathParams.versionId}/files/delete`,
392
- ...requestConfig,
393
- headers: {
394
- ...requestConfig.headers
395
- }
396
- });
397
- return data;
398
- }
399
- /**
400
- * @summary Resume Message
401
- * @description Reconnects to an active assistant message stream and returns it as Server-Sent Events. This does not restart or continue a stopped generation.
402
- * @link /chats/{chatId}/messages/{messageId}/resume
403
- */ async function chatsResume({ pathParams, config } = {}) {
404
- const { client: request = client, ...requestConfig } = config ?? {};
405
- if (!pathParams.chatId) {
406
- throw new Error(`Missing required path parameter: chatId`);
407
- }
408
- if (!pathParams.messageId) {
409
- throw new Error(`Missing required path parameter: messageId`);
410
- }
411
- const data = await request({
412
- method: "POST",
413
- url: `/chats/${pathParams.chatId}/messages/${pathParams.messageId}/resume`,
414
- ...requestConfig,
415
- headers: {
416
- ...requestConfig.headers
417
- }
418
- });
419
- return data;
420
- }
421
- /**
422
- * @summary Stop Message
423
- * @description Stops an in-flight message generation in a chat. Useful for cancelling a streaming response that is still being generated.
424
- * @link /chats/{chatId}/messages/{messageId}/stop
425
- */ async function chatsStop({ pathParams, config } = {}) {
426
- const { client: request = client, ...requestConfig } = config ?? {};
427
- if (!pathParams.chatId) {
428
- throw new Error(`Missing required path parameter: chatId`);
429
- }
430
- if (!pathParams.messageId) {
431
- throw new Error(`Missing required path parameter: messageId`);
432
- }
433
- const data = await request({
434
- method: "POST",
435
- url: `/chats/${pathParams.chatId}/messages/${pathParams.messageId}/stop`,
436
- ...requestConfig,
437
- headers: {
438
- ...requestConfig.headers
439
- }
440
- });
441
- return data;
442
- }
443
- /**
444
- * @summary Resolve Task
445
- * @description Resolves a pending task in a chat, continuing the conversation. The latest message in the active chat fork must be an assistant message currently blocked on a matching task (integration setup, plan approval, question answers, or permission grants).
446
- * @link /chats/{chatId}/tasks/resolve
447
- */ async function chatsResolveTask({ pathParams, config } = {}) {
448
- const { client: request = client, ...requestConfig } = config ?? {};
449
- if (!pathParams.chatId) {
450
- throw new Error(`Missing required path parameter: chatId`);
451
- }
452
- const data = await request({
453
- method: "POST",
454
- url: `/chats/${pathParams.chatId}/tasks/resolve`,
455
- ...requestConfig,
456
- headers: {
457
- ...requestConfig.headers
458
- }
459
- });
460
- return data;
461
- }
462
- /**
463
- * @summary Find Deployments
464
- * @description Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.
465
- * @link /deployments
466
- */ async function deploymentsFind({ queryParams, config } = {}) {
467
- const { client: request = client, ...requestConfig } = config ?? {};
468
- const data = await request({
469
- method: "GET",
470
- url: `/deployments`,
471
- queryParams,
472
- ...requestConfig,
473
- headers: {
474
- ...requestConfig.headers
475
- }
476
- });
477
- return data;
478
- }
479
- /**
480
- * @summary Create Deployment
481
- * @description Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.
482
- * @link /deployments
483
- */ async function deploymentsCreate({ config } = {}) {
484
- const { client: request = client, ...requestConfig } = config ?? {};
485
- const data = await request({
486
- method: "POST",
487
- url: `/deployments`,
488
- ...requestConfig,
489
- headers: {
490
- ...requestConfig.headers
491
- }
492
- });
493
- return data;
494
- }
495
- /**
496
- * @summary Get Deployment
497
- * @description Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL.
498
- * @link /deployments/{deploymentId}
499
- */ async function deploymentsGetById({ pathParams, config } = {}) {
500
- const { client: request = client, ...requestConfig } = config ?? {};
501
- if (!pathParams.deploymentId) {
502
- throw new Error(`Missing required path parameter: deploymentId`);
503
- }
504
- const data = await request({
505
- method: "GET",
506
- url: `/deployments/${pathParams.deploymentId}`,
507
- ...requestConfig,
508
- headers: {
509
- ...requestConfig.headers
510
- }
511
- });
512
- return data;
513
- }
514
- /**
515
- * @summary Delete Deployment
516
- * @description Delete a deployment by ID. This will delete the deployment from Vercel.
517
- * @link /deployments/{deploymentId}
518
- */ async function deploymentsDelete({ pathParams, config } = {}) {
519
- const { client: request = client, ...requestConfig } = config ?? {};
520
- if (!pathParams.deploymentId) {
521
- throw new Error(`Missing required path parameter: deploymentId`);
522
- }
523
- const data = await request({
524
- method: "DELETE",
525
- url: `/deployments/${pathParams.deploymentId}`,
526
- ...requestConfig,
527
- headers: {
528
- ...requestConfig.headers
529
- }
530
- });
531
- return data;
532
- }
533
- /**
534
- * @summary Find Deployment Logs
535
- * @description Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.
536
- * @link /deployments/{deploymentId}/logs
537
- */ async function deploymentsFindLogs({ pathParams, queryParams, config } = {}) {
538
- const { client: request = client, ...requestConfig } = config ?? {};
539
- if (!pathParams.deploymentId) {
540
- throw new Error(`Missing required path parameter: deploymentId`);
541
- }
542
- const data = await request({
543
- method: "GET",
544
- url: `/deployments/${pathParams.deploymentId}/logs`,
545
- queryParams,
546
- ...requestConfig,
547
- headers: {
548
- ...requestConfig.headers
549
- }
550
- });
551
- return data;
552
- }
553
- /**
554
- * @summary Find Deployment Errors
555
- * @description Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.
556
- * @link /deployments/{deploymentId}/errors
557
- */ async function deploymentsFindErrors({ pathParams, config } = {}) {
558
- const { client: request = client, ...requestConfig } = config ?? {};
559
- if (!pathParams.deploymentId) {
560
- throw new Error(`Missing required path parameter: deploymentId`);
561
- }
562
- const data = await request({
563
- method: "GET",
564
- url: `/deployments/${pathParams.deploymentId}/errors`,
565
- ...requestConfig,
566
- headers: {
567
- ...requestConfig.headers
568
- }
569
- });
570
- return data;
571
- }
572
- /**
573
- * @summary Find Hooks
574
- * @description Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.
575
- * @link /hooks
576
- */ async function hooksFind({ config } = {}) {
577
- const { client: request = client, ...requestConfig } = config ?? {};
578
- const data = await request({
579
- method: "GET",
580
- url: `/hooks`,
581
- ...requestConfig,
582
- headers: {
583
- ...requestConfig.headers
584
- }
585
- });
586
- return data;
587
- }
588
- /**
589
- * @summary Create Hook
590
- * @description Creates a new webhook that listens for specific events. Supports optional association with a chat.
591
- * @link /hooks
592
- */ async function hooksCreate({ config } = {}) {
593
- const { client: request = client, ...requestConfig } = config ?? {};
594
- const data = await request({
595
- method: "POST",
596
- url: `/hooks`,
597
- ...requestConfig,
598
- headers: {
599
- ...requestConfig.headers
600
- }
601
- });
602
- return data;
603
- }
604
- /**
605
- * @summary Get Hook
606
- * @description Retrieves the details of a specific webhook using its ID.
607
- * @link /hooks/{hookId}
608
- */ async function hooksGetById({ pathParams, config } = {}) {
609
- const { client: request = client, ...requestConfig } = config ?? {};
610
- if (!pathParams.hookId) {
611
- throw new Error(`Missing required path parameter: hookId`);
612
- }
613
- const data = await request({
614
- method: "GET",
615
- url: `/hooks/${pathParams.hookId}`,
616
- ...requestConfig,
617
- headers: {
618
- ...requestConfig.headers
619
- }
620
- });
621
- return data;
622
- }
623
- /**
624
- * @summary Update Hook
625
- * @description Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.
626
- * @link /hooks/{hookId}
627
- */ async function hooksUpdate({ pathParams, config } = {}) {
628
- const { client: request = client, ...requestConfig } = config ?? {};
629
- if (!pathParams.hookId) {
630
- throw new Error(`Missing required path parameter: hookId`);
631
- }
632
- const data = await request({
633
- method: "PATCH",
634
- url: `/hooks/${pathParams.hookId}`,
635
- ...requestConfig,
636
- headers: {
637
- ...requestConfig.headers
638
- }
639
- });
640
- return data;
641
- }
642
- /**
643
- * @summary Delete Hook
644
- * @description Deletes a webhook based on its ID. This action is irreversible.
645
- * @link /hooks/{hookId}
646
- */ async function hooksDelete({ pathParams, config } = {}) {
647
- const { client: request = client, ...requestConfig } = config ?? {};
648
- if (!pathParams.hookId) {
649
- throw new Error(`Missing required path parameter: hookId`);
650
- }
651
- const data = await request({
652
- method: "DELETE",
653
- url: `/hooks/${pathParams.hookId}`,
654
- ...requestConfig,
655
- headers: {
656
- ...requestConfig.headers
657
- }
658
- });
659
- return data;
660
- }
661
- /**
662
- * @summary Find Vercel Projects
663
- * @description Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.
664
- * @link /integrations/vercel/projects
665
- */ async function integrationsVercelProjectsFind({ config } = {}) {
666
- const { client: request = client, ...requestConfig } = config ?? {};
667
- const data = await request({
668
- method: "GET",
669
- url: `/integrations/vercel/projects`,
670
- ...requestConfig,
671
- headers: {
672
- ...requestConfig.headers
673
- }
674
- });
675
- return data;
676
- }
677
- /**
678
- * @summary Create Vercel Project
679
- * @description Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.
680
- * @link /integrations/vercel/projects
681
- */ async function integrationsVercelProjectsCreate({ config } = {}) {
682
- const { client: request = client, ...requestConfig } = config ?? {};
683
- const data = await request({
684
- method: "POST",
685
- url: `/integrations/vercel/projects`,
686
- ...requestConfig,
687
- headers: {
688
- ...requestConfig.headers
689
- }
690
- });
691
- return data;
692
- }
693
- /**
694
- * @summary Find Projects
695
- * @description Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.
696
- * @link /projects
697
- */ async function projectsFind({ config } = {}) {
698
- const { client: request = client, ...requestConfig } = config ?? {};
699
- const data = await request({
700
- method: "GET",
701
- url: `/projects`,
702
- ...requestConfig,
703
- headers: {
704
- ...requestConfig.headers
705
- }
706
- });
707
- return data;
708
- }
709
- /**
710
- * @summary Create Project
711
- * @description Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.
712
- * @link /projects
713
- */ async function projectsCreate({ config } = {}) {
714
- const { client: request = client, ...requestConfig } = config ?? {};
715
- const data = await request({
716
- method: "POST",
717
- url: `/projects`,
718
- ...requestConfig,
719
- headers: {
720
- ...requestConfig.headers
721
- }
722
- });
723
- return data;
724
- }
725
- /**
726
- * @summary Get Project by ID
727
- * @description Retrieves the details of a specific v0 project by its ID.
728
- * @link /projects/{projectId}
729
- */ async function projectsGetById({ pathParams, config } = {}) {
730
- const { client: request = client, ...requestConfig } = config ?? {};
731
- if (!pathParams.projectId) {
732
- throw new Error(`Missing required path parameter: projectId`);
733
- }
734
- const data = await request({
735
- method: "GET",
736
- url: `/projects/${pathParams.projectId}`,
737
- ...requestConfig,
738
- headers: {
739
- ...requestConfig.headers
740
- }
741
- });
742
- return data;
743
- }
744
- /**
745
- * @summary Update Project
746
- * @description Updates the metadata of an existing project using its `projectId`. Supports changes to the project name and privacy setting.
747
- * @link /projects/{projectId}
748
- */ async function projectsUpdate({ pathParams, config } = {}) {
749
- const { client: request = client, ...requestConfig } = config ?? {};
750
- if (!pathParams.projectId) {
751
- throw new Error(`Missing required path parameter: projectId`);
752
- }
753
- const data = await request({
754
- method: "PATCH",
755
- url: `/projects/${pathParams.projectId}`,
756
- ...requestConfig,
757
- headers: {
758
- ...requestConfig.headers
759
- }
760
- });
761
- return data;
762
- }
763
- /**
764
- * @summary Delete Project
765
- * @description Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.
766
- * @link /projects/{projectId}
767
- */ async function projectsDelete({ pathParams, queryParams, config } = {}) {
768
- const { client: request = client, ...requestConfig } = config ?? {};
769
- if (!pathParams.projectId) {
770
- throw new Error(`Missing required path parameter: projectId`);
771
- }
772
- const data = await request({
773
- method: "DELETE",
774
- url: `/projects/${pathParams.projectId}`,
775
- queryParams,
776
- ...requestConfig,
777
- headers: {
778
- ...requestConfig.headers
779
- }
780
- });
781
- return data;
782
- }
783
- /**
784
- * @summary Assign Project to Chat
785
- * @description Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.
786
- * @link /projects/{projectId}/assign
787
- */ async function projectsAssign({ pathParams, config } = {}) {
788
- const { client: request = client, ...requestConfig } = config ?? {};
789
- if (!pathParams.projectId) {
790
- throw new Error(`Missing required path parameter: projectId`);
791
- }
792
- const data = await request({
793
- method: "POST",
794
- url: `/projects/${pathParams.projectId}/assign`,
795
- ...requestConfig,
796
- headers: {
797
- ...requestConfig.headers
798
- }
799
- });
800
- return data;
801
- }
802
- /**
803
- * @summary Find Environment Variables
804
- * @description Retrieves all environment variables for a given project.
805
- * @link /projects/{projectId}/env-vars
806
- */ async function projectsFindEnvVars({ pathParams, queryParams, config } = {}) {
807
- const { client: request = client, ...requestConfig } = config ?? {};
808
- if (!pathParams.projectId) {
809
- throw new Error(`Missing required path parameter: projectId`);
810
- }
811
- const data = await request({
812
- method: "GET",
813
- url: `/projects/${pathParams.projectId}/env-vars`,
814
- queryParams,
815
- ...requestConfig,
816
- headers: {
817
- ...requestConfig.headers
818
- }
819
- });
820
- return data;
821
- }
822
- /**
823
- * @summary Create Environment Variables
824
- * @description Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.
825
- * @link /projects/{projectId}/env-vars
826
- */ async function projectsCreateEnvVars({ pathParams, queryParams, config } = {}) {
827
- const { client: request = client, ...requestConfig } = config ?? {};
828
- if (!pathParams.projectId) {
829
- throw new Error(`Missing required path parameter: projectId`);
830
- }
831
- const data = await request({
832
- method: "POST",
833
- url: `/projects/${pathParams.projectId}/env-vars`,
834
- queryParams,
835
- ...requestConfig,
836
- headers: {
837
- ...requestConfig.headers
838
- }
839
- });
840
- return data;
841
- }
842
- /**
843
- * @summary Update Environment Variables
844
- * @description Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.
845
- * @link /projects/{projectId}/env-vars
846
- */ async function projectsUpdateEnvVars({ pathParams, queryParams, config } = {}) {
847
- const { client: request = client, ...requestConfig } = config ?? {};
848
- if (!pathParams.projectId) {
849
- throw new Error(`Missing required path parameter: projectId`);
850
- }
851
- const data = await request({
852
- method: "PATCH",
853
- url: `/projects/${pathParams.projectId}/env-vars`,
854
- queryParams,
855
- ...requestConfig,
856
- headers: {
857
- ...requestConfig.headers
858
- }
859
- });
860
- return data;
861
- }
862
- /**
863
- * @summary Delete Environment Variables
864
- * @description Deletes multiple environment variables for a given project by their IDs.
865
- * @link /projects/{projectId}/env-vars/delete
866
- */ async function projectsDeleteEnvVars({ pathParams, config } = {}) {
867
- const { client: request = client, ...requestConfig } = config ?? {};
868
- if (!pathParams.projectId) {
869
- throw new Error(`Missing required path parameter: projectId`);
870
- }
871
- const data = await request({
872
- method: "POST",
873
- url: `/projects/${pathParams.projectId}/env-vars/delete`,
874
- ...requestConfig,
875
- headers: {
876
- ...requestConfig.headers
877
- }
878
- });
879
- return data;
880
- }
881
- /**
882
- * @summary Get Environment Variable
883
- * @description Retrieves a specific environment variable for a given project by its ID, including its value.
884
- * @link /projects/{projectId}/env-vars/{environmentVariableId}
885
- */ async function projectsGetEnvVar({ pathParams, queryParams, config } = {}) {
886
- const { client: request = client, ...requestConfig } = config ?? {};
887
- if (!pathParams.projectId) {
888
- throw new Error(`Missing required path parameter: projectId`);
889
- }
890
- if (!pathParams.environmentVariableId) {
891
- throw new Error(`Missing required path parameter: environmentVariableId`);
892
- }
893
- const data = await request({
894
- method: "GET",
895
- url: `/projects/${pathParams.projectId}/env-vars/${pathParams.environmentVariableId}`,
896
- queryParams,
897
- ...requestConfig,
898
- headers: {
899
- ...requestConfig.headers
900
- }
901
- });
902
- return data;
903
- }
904
- /**
905
- * @summary Find Rate Limit
906
- * @description Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.
907
- * @link /rate-limits
908
- */ async function rateLimitsFind({ queryParams, config } = {}) {
909
- const { client: request = client, ...requestConfig } = config ?? {};
910
- const data = await request({
911
- method: "GET",
912
- url: `/rate-limits`,
913
- queryParams,
914
- ...requestConfig,
915
- headers: {
916
- ...requestConfig.headers
917
- }
918
- });
919
- return data;
920
- }
921
- /**
922
- * @summary Get User
923
- * @description Retrieves information about the authenticated user, including their ID, name, email, and account metadata.
924
- * @link /user
925
- */ async function userGet({ config } = {}) {
926
- const { client: request = client, ...requestConfig } = config ?? {};
927
- const data = await request({
928
- method: "GET",
929
- url: `/user`,
930
- ...requestConfig,
931
- headers: {
932
- ...requestConfig.headers
933
- }
934
- });
935
- return data;
936
- }
937
- /**
938
- * @summary Get Billing
939
- * @description Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).
940
- * @link /user/billing
941
- */ async function userGetBilling({ queryParams, config } = {}) {
942
- const { client: request = client, ...requestConfig } = config ?? {};
943
- const data = await request({
944
- method: "GET",
945
- url: `/user/billing`,
946
- queryParams,
947
- ...requestConfig,
948
- headers: {
949
- ...requestConfig.headers
950
- }
951
- });
952
- return data;
953
- }
954
- /**
955
- * @summary Get Plan
956
- * @description Returns the current subscription plan for the authenticated user, including tier details and feature limits.
957
- * @link /user/plan
958
- */ async function userGetPlan({ config } = {}) {
959
- const { client: request = client, ...requestConfig } = config ?? {};
960
- const data = await request({
961
- method: "GET",
962
- url: `/user/plan`,
963
- ...requestConfig,
964
- headers: {
965
- ...requestConfig.headers
966
- }
967
- });
968
- return data;
969
- }
970
- /**
971
- * @summary Get User Scopes
972
- * @description Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.
973
- * @link /user/scopes
974
- */ async function userGetScopes({ config } = {}) {
975
- const { client: request = client, ...requestConfig } = config ?? {};
976
- const data = await request({
977
- method: "GET",
978
- url: `/user/scopes`,
979
- ...requestConfig,
980
- headers: {
981
- ...requestConfig.headers
982
- }
983
- });
984
- return data;
985
- }
986
- /**
987
- * @summary Restore Block
988
- * @description Restores a block to a specific version.
989
- * @link /chats/{chatId}/versions/{versionId}/restore
990
- */ async function chatsRestore({ pathParams, config } = {}) {
991
- const { client: request = client, ...requestConfig } = config ?? {};
992
- if (!pathParams.chatId) {
993
- throw new Error(`Missing required path parameter: chatId`);
994
- }
995
- if (!pathParams.versionId) {
996
- throw new Error(`Missing required path parameter: versionId`);
997
- }
998
- const data = await request({
999
- method: "POST",
1000
- url: `/chats/${pathParams.chatId}/versions/${pathParams.versionId}/restore`,
1001
- ...requestConfig,
1002
- headers: {
1003
- ...requestConfig.headers
1004
- }
1005
- });
1006
- return data;
1007
- }
1008
- /**
1009
- * @summary Get Usage Report
1010
- * @description Retrieves detailed usage events for the authenticated user or team, including costs, event types, models used, and metadata. Shows the same data as displayed in the usage dashboard. Can be filtered by chatId to show usage for a specific chat, or by userId to show usage for a specific user.
1011
- * @link /reports/usage
1012
- */ async function reportsGetUsage({ queryParams, config } = {}) {
1013
- const { client: request = client, ...requestConfig } = config ?? {};
1014
- const data = await request({
1015
- method: "GET",
1016
- url: `/reports/usage`,
1017
- queryParams,
1018
- ...requestConfig,
1019
- headers: {
1020
- ...requestConfig.headers
1021
- }
1022
- });
1023
- return data;
1024
- }
1025
- /**
1026
- * @summary Get AI Usage Report
1027
- * @description Retrieves v0 AI usage events for the authenticated user or active team scope.
1028
- * @link /reports/usage/ai
1029
- */ async function reportsGetAIUsage({ queryParams, config } = {}) {
1030
- const { client: request = client, ...requestConfig } = config ?? {};
1031
- const data = await request({
1032
- method: "GET",
1033
- url: `/reports/usage/ai`,
1034
- queryParams,
1035
- ...requestConfig,
1036
- headers: {
1037
- ...requestConfig.headers
1038
- }
1039
- });
1040
- return data;
1041
- }
1042
- /**
1043
- * @summary Get User Activity Report
1044
- * @description Retrieves aggregated user activity data for team members, including chat counts, message counts, and activity timestamps. Only available for Enterprise teams with OWNER or BILLING role. Shows the same data as displayed in the Usage settings for Enterprise teams.
1045
- * @link /reports/user-activity
1046
- */ async function reportsGetUserActivity({ queryParams, config } = {}) {
1047
- const { client: request = client, ...requestConfig } = config ?? {};
1048
- const data = await request({
1049
- method: "GET",
1050
- url: `/reports/user-activity`,
1051
- queryParams,
1052
- ...requestConfig,
1053
- headers: {
1054
- ...requestConfig.headers
1055
- }
1056
- });
1057
- return data;
1058
- }
1059
- /**
1060
- * @summary List MCP Servers
1061
- * @description Retrieves all MCP servers configured for the authenticated user.
1062
- * @link /mcp-servers
1063
- */ async function mcpServersFind({ config } = {}) {
1064
- const { client: request = client, ...requestConfig } = config ?? {};
1065
- const data = await request({
1066
- method: "GET",
1067
- url: `/mcp-servers`,
1068
- ...requestConfig,
1069
- headers: {
1070
- ...requestConfig.headers
1071
- }
1072
- });
1073
- return data;
1074
- }
1075
- /**
1076
- * @summary Create MCP Server
1077
- * @description Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers.
1078
- * @link /mcp-servers
1079
- */ async function mcpServersCreate({ config } = {}) {
1080
- const { client: request = client, ...requestConfig } = config ?? {};
1081
- const data = await request({
1082
- method: "POST",
1083
- url: `/mcp-servers`,
1084
- ...requestConfig,
1085
- headers: {
1086
- ...requestConfig.headers
1087
- }
1088
- });
1089
- return data;
1090
- }
1091
- /**
1092
- * @summary Get MCP Server
1093
- * @description Retrieves the details of a specific MCP server by its ID.
1094
- * @link /mcp-servers/{mcpServerId}
1095
- */ async function mcpServersGetById({ pathParams, config } = {}) {
1096
- const { client: request = client, ...requestConfig } = config ?? {};
1097
- if (!pathParams.mcpServerId) {
1098
- throw new Error(`Missing required path parameter: mcpServerId`);
1099
- }
1100
- const data = await request({
1101
- method: "GET",
1102
- url: `/mcp-servers/${pathParams.mcpServerId}`,
1103
- ...requestConfig,
1104
- headers: {
1105
- ...requestConfig.headers
1106
- }
1107
- });
1108
- return data;
1109
- }
1110
- /**
1111
- * @summary Update MCP Server
1112
- * @description Updates the configuration of an existing MCP server, including its name, URL, description, enabled status, and authentication settings.
1113
- * @link /mcp-servers/{mcpServerId}
1114
- */ async function mcpServersUpdate({ pathParams, config } = {}) {
1115
- const { client: request = client, ...requestConfig } = config ?? {};
1116
- if (!pathParams.mcpServerId) {
1117
- throw new Error(`Missing required path parameter: mcpServerId`);
1118
- }
1119
- const data = await request({
1120
- method: "PATCH",
1121
- url: `/mcp-servers/${pathParams.mcpServerId}`,
1122
- ...requestConfig,
1123
- headers: {
1124
- ...requestConfig.headers
1125
- }
1126
- });
1127
- return data;
1128
- }
1129
- /**
1130
- * @summary Delete MCP Server
1131
- * @description Deletes an MCP server based on its ID. This action is irreversible and will also remove any associated OAuth tokens.
1132
- * @link /mcp-servers/{mcpServerId}
1133
- */ async function mcpServersDelete({ pathParams, config } = {}) {
1134
- const { client: request = client, ...requestConfig } = config ?? {};
1135
- if (!pathParams.mcpServerId) {
1136
- throw new Error(`Missing required path parameter: mcpServerId`);
1137
- }
1138
- const data = await request({
1139
- method: "DELETE",
1140
- url: `/mcp-servers/${pathParams.mcpServerId}`,
1141
- ...requestConfig,
1142
- headers: {
1143
- ...requestConfig.headers
1144
- }
1145
- });
1146
- return data;
1147
- }
1148
- /**
1149
- * @summary Create MCP Server OAuth Authorization URL
1150
- * @description Creates an OAuth authorization URL for an OAuth MCP server. Redirect the user to the returned URL, and the Platform API OAuth callback will store the resulting tokens before redirecting to your returnUrl.
1151
- * @link /mcp-servers/{mcpServerId}/oauth/authorize
1152
- */ async function mcpServersCreateOAuthAuthorizationUrl({ pathParams, config } = {}) {
1153
- const { client: request = client, ...requestConfig } = config ?? {};
1154
- if (!pathParams.mcpServerId) {
1155
- throw new Error(`Missing required path parameter: mcpServerId`);
1156
- }
1157
- const data = await request({
1158
- method: "POST",
1159
- url: `/mcp-servers/${pathParams.mcpServerId}/oauth/authorize`,
1160
- ...requestConfig,
1161
- headers: {
1162
- ...requestConfig.headers
1163
- }
1164
- });
1165
- return data;
1166
- }
1167
- const operationsByPath = {
1168
- "POST /chats": chatsCreate,
1169
- "GET /chats": chatsFind,
1170
- "POST /chats/init": chatsInit,
1171
- "DELETE /chats/{chatId}": chatsDelete,
1172
- "GET /chats/{chatId}": chatsGetById,
1173
- "PATCH /chats/{chatId}": chatsUpdate,
1174
- "PUT /chats/{chatId}/favorite": chatsFavorite,
1175
- "POST /chats/{chatId}/fork": chatsFork,
1176
- "GET /chats/{chatId}/project": projectsGetByChatId,
1177
- "GET /chats/{chatId}/messages": chatsFindMessages,
1178
- "POST /chats/{chatId}/messages": chatsSendMessage,
1179
- "GET /chats/{chatId}/messages/{messageId}": chatsGetMessage,
1180
- "GET /chats/{chatId}/versions": chatsFindVersions,
1181
- "GET /chats/{chatId}/versions/{versionId}": chatsGetVersion,
1182
- "PATCH /chats/{chatId}/versions/{versionId}": chatsUpdateVersion,
1183
- "GET /chats/{chatId}/versions/{versionId}/download": chatsDownloadVersion,
1184
- "POST /chats/{chatId}/versions/{versionId}/files/delete": chatsDeleteVersionFiles,
1185
- "POST /chats/{chatId}/messages/{messageId}/resume": chatsResume,
1186
- "POST /chats/{chatId}/messages/{messageId}/stop": chatsStop,
1187
- "POST /chats/{chatId}/tasks/resolve": chatsResolveTask,
1188
- "GET /deployments": deploymentsFind,
1189
- "POST /deployments": deploymentsCreate,
1190
- "GET /deployments/{deploymentId}": deploymentsGetById,
1191
- "DELETE /deployments/{deploymentId}": deploymentsDelete,
1192
- "GET /deployments/{deploymentId}/logs": deploymentsFindLogs,
1193
- "GET /deployments/{deploymentId}/errors": deploymentsFindErrors,
1194
- "GET /hooks": hooksFind,
1195
- "POST /hooks": hooksCreate,
1196
- "GET /hooks/{hookId}": hooksGetById,
1197
- "PATCH /hooks/{hookId}": hooksUpdate,
1198
- "DELETE /hooks/{hookId}": hooksDelete,
1199
- "GET /integrations/vercel/projects": integrationsVercelProjectsFind,
1200
- "POST /integrations/vercel/projects": integrationsVercelProjectsCreate,
1201
- "GET /projects": projectsFind,
1202
- "POST /projects": projectsCreate,
1203
- "GET /projects/{projectId}": projectsGetById,
1204
- "PATCH /projects/{projectId}": projectsUpdate,
1205
- "DELETE /projects/{projectId}": projectsDelete,
1206
- "POST /projects/{projectId}/assign": projectsAssign,
1207
- "GET /projects/{projectId}/env-vars": projectsFindEnvVars,
1208
- "POST /projects/{projectId}/env-vars": projectsCreateEnvVars,
1209
- "PATCH /projects/{projectId}/env-vars": projectsUpdateEnvVars,
1210
- "POST /projects/{projectId}/env-vars/delete": projectsDeleteEnvVars,
1211
- "GET /projects/{projectId}/env-vars/{environmentVariableId}": projectsGetEnvVar,
1212
- "GET /rate-limits": rateLimitsFind,
1213
- "GET /user": userGet,
1214
- "GET /user/billing": userGetBilling,
1215
- "GET /user/plan": userGetPlan,
1216
- "GET /user/scopes": userGetScopes,
1217
- "POST /chats/{chatId}/versions/{versionId}/restore": chatsRestore,
1218
- "GET /reports/usage": reportsGetUsage,
1219
- "GET /reports/usage/ai": reportsGetAIUsage,
1220
- "GET /reports/user-activity": reportsGetUserActivity,
1221
- "GET /mcp-servers": mcpServersFind,
1222
- "POST /mcp-servers": mcpServersCreate,
1223
- "GET /mcp-servers/{mcpServerId}": mcpServersGetById,
1224
- "PATCH /mcp-servers/{mcpServerId}": mcpServersUpdate,
1225
- "DELETE /mcp-servers/{mcpServerId}": mcpServersDelete,
1226
- "POST /mcp-servers/{mcpServerId}/oauth/authorize": mcpServersCreateOAuthAuthorizationUrl
1227
- };
1228
- const operationsByTag = {
1229
- chats: {
1230
- chatsCreate,
1231
- chatsFind,
1232
- chatsInit,
1233
- chatsDelete,
1234
- chatsGetById,
1235
- chatsUpdate,
1236
- chatsFavorite,
1237
- chatsFork,
1238
- chatsFindMessages,
1239
- chatsSendMessage,
1240
- chatsGetMessage,
1241
- chatsFindVersions,
1242
- chatsGetVersion,
1243
- chatsUpdateVersion,
1244
- chatsDownloadVersion,
1245
- chatsDeleteVersionFiles,
1246
- chatsResume,
1247
- chatsStop,
1248
- chatsResolveTask,
1249
- chatsRestore
1250
- },
1251
- projects: {
1252
- projectsGetByChatId,
1253
- projectsFind,
1254
- projectsCreate,
1255
- projectsGetById,
1256
- projectsUpdate,
1257
- projectsDelete,
1258
- projectsAssign,
1259
- projectsFindEnvVars,
1260
- projectsCreateEnvVars,
1261
- projectsUpdateEnvVars,
1262
- projectsDeleteEnvVars,
1263
- projectsGetEnvVar
1264
- },
1265
- deployments: {
1266
- deploymentsFind,
1267
- deploymentsCreate,
1268
- deploymentsGetById,
1269
- deploymentsDelete,
1270
- deploymentsFindLogs,
1271
- deploymentsFindErrors
1272
- },
1273
- hooks: {
1274
- hooksFind,
1275
- hooksCreate,
1276
- hooksGetById,
1277
- hooksUpdate,
1278
- hooksDelete
1279
- },
1280
- integrations: {
1281
- integrationsVercelProjectsFind,
1282
- integrationsVercelProjectsCreate
1283
- },
1284
- ratelimits: {
1285
- rateLimitsFind
1286
- },
1287
- user: {
1288
- userGet,
1289
- userGetBilling,
1290
- userGetPlan,
1291
- userGetScopes
1292
- },
1293
- reports: {
1294
- reportsGetUsage,
1295
- reportsGetAIUsage,
1296
- reportsGetUserActivity
1297
- },
1298
- mcpservers: {
1299
- mcpServersFind,
1300
- mcpServersCreate,
1301
- mcpServersGetById,
1302
- mcpServersUpdate,
1303
- mcpServersDelete,
1304
- mcpServersCreateOAuthAuthorizationUrl
1305
- }
1306
- };
1307
- const tagDictionary = {
1308
- chats: {
1309
- POST: [
1310
- "chatsCreate",
1311
- "chatsInit",
1312
- "chatsFork",
1313
- "chatsSendMessage",
1314
- "chatsDeleteVersionFiles",
1315
- "chatsResume",
1316
- "chatsStop",
1317
- "chatsResolveTask",
1318
- "chatsRestore"
1319
- ],
1320
- GET: [
1321
- "chatsFind",
1322
- "chatsGetById",
1323
- "chatsFindMessages",
1324
- "chatsGetMessage",
1325
- "chatsFindVersions",
1326
- "chatsGetVersion",
1327
- "chatsDownloadVersion"
1328
- ],
1329
- DELETE: [
1330
- "chatsDelete"
1331
- ],
1332
- PATCH: [
1333
- "chatsUpdate",
1334
- "chatsUpdateVersion"
1335
- ],
1336
- PUT: [
1337
- "chatsFavorite"
1338
- ]
1339
- },
1340
- projects: {
1341
- GET: [
1342
- "projectsGetByChatId",
1343
- "projectsFind",
1344
- "projectsGetById",
1345
- "projectsFindEnvVars",
1346
- "projectsGetEnvVar"
1347
- ],
1348
- POST: [
1349
- "projectsCreate",
1350
- "projectsAssign",
1351
- "projectsCreateEnvVars",
1352
- "projectsDeleteEnvVars"
1353
- ],
1354
- PATCH: [
1355
- "projectsUpdate",
1356
- "projectsUpdateEnvVars"
1357
- ],
1358
- DELETE: [
1359
- "projectsDelete"
1360
- ]
1361
- },
1362
- deployments: {
1363
- GET: [
1364
- "deploymentsFind",
1365
- "deploymentsGetById",
1366
- "deploymentsFindLogs",
1367
- "deploymentsFindErrors"
1368
- ],
1369
- POST: [
1370
- "deploymentsCreate"
1371
- ],
1372
- DELETE: [
1373
- "deploymentsDelete"
1374
- ]
1375
- },
1376
- hooks: {
1377
- GET: [
1378
- "hooksFind",
1379
- "hooksGetById"
1380
- ],
1381
- POST: [
1382
- "hooksCreate"
1383
- ],
1384
- PATCH: [
1385
- "hooksUpdate"
1386
- ],
1387
- DELETE: [
1388
- "hooksDelete"
1389
- ]
1390
- },
1391
- integrations: {
1392
- GET: [
1393
- "integrationsVercelProjectsFind"
1394
- ],
1395
- POST: [
1396
- "integrationsVercelProjectsCreate"
1397
- ]
1398
- },
1399
- ratelimits: {
1400
- GET: [
1401
- "rateLimitsFind"
1402
- ]
1403
- },
1404
- user: {
1405
- GET: [
1406
- "userGet",
1407
- "userGetBilling",
1408
- "userGetPlan",
1409
- "userGetScopes"
1410
- ]
1411
- },
1412
- reports: {
1413
- GET: [
1414
- "reportsGetUsage",
1415
- "reportsGetAIUsage",
1416
- "reportsGetUserActivity"
1417
- ]
1418
- },
1419
- mcpservers: {
1420
- GET: [
1421
- "mcpServersFind",
1422
- "mcpServersGetById"
1423
- ],
1424
- POST: [
1425
- "mcpServersCreate",
1426
- "mcpServersCreateOAuthAuthorizationUrl"
1427
- ],
1428
- PATCH: [
1429
- "mcpServersUpdate"
1430
- ],
1431
- DELETE: [
1432
- "mcpServersDelete"
1433
- ]
1434
- }
1435
- };
1436
6
 
1437
- exports.chatsCreate = chatsCreate;
1438
- exports.chatsDelete = chatsDelete;
1439
- exports.chatsDeleteVersionFiles = chatsDeleteVersionFiles;
1440
- exports.chatsDownloadVersion = chatsDownloadVersion;
1441
- exports.chatsFavorite = chatsFavorite;
1442
- exports.chatsFind = chatsFind;
1443
- exports.chatsFindMessages = chatsFindMessages;
1444
- exports.chatsFindVersions = chatsFindVersions;
1445
- exports.chatsFork = chatsFork;
1446
- exports.chatsGetById = chatsGetById;
1447
- exports.chatsGetMessage = chatsGetMessage;
1448
- exports.chatsGetVersion = chatsGetVersion;
1449
- exports.chatsInit = chatsInit;
1450
- exports.chatsResolveTask = chatsResolveTask;
1451
- exports.chatsRestore = chatsRestore;
1452
- exports.chatsResume = chatsResume;
1453
- exports.chatsSendMessage = chatsSendMessage;
1454
- exports.chatsStop = chatsStop;
1455
- exports.chatsUpdate = chatsUpdate;
1456
- exports.chatsUpdateVersion = chatsUpdateVersion;
1457
- exports.deploymentsCreate = deploymentsCreate;
1458
- exports.deploymentsDelete = deploymentsDelete;
1459
- exports.deploymentsFind = deploymentsFind;
1460
- exports.deploymentsFindErrors = deploymentsFindErrors;
1461
- exports.deploymentsFindLogs = deploymentsFindLogs;
1462
- exports.deploymentsGetById = deploymentsGetById;
1463
- exports.hooksCreate = hooksCreate;
1464
- exports.hooksDelete = hooksDelete;
1465
- exports.hooksFind = hooksFind;
1466
- exports.hooksGetById = hooksGetById;
1467
- exports.hooksUpdate = hooksUpdate;
1468
- exports.integrationsVercelProjectsCreate = integrationsVercelProjectsCreate;
1469
- exports.integrationsVercelProjectsFind = integrationsVercelProjectsFind;
1470
- exports.mcpServersCreate = mcpServersCreate;
1471
- exports.mcpServersCreateOAuthAuthorizationUrl = mcpServersCreateOAuthAuthorizationUrl;
1472
- exports.mcpServersDelete = mcpServersDelete;
1473
- exports.mcpServersFind = mcpServersFind;
1474
- exports.mcpServersGetById = mcpServersGetById;
1475
- exports.mcpServersUpdate = mcpServersUpdate;
1476
- exports.operationsByPath = operationsByPath;
1477
- exports.operationsByTag = operationsByTag;
1478
- exports.projectsAssign = projectsAssign;
1479
- exports.projectsCreate = projectsCreate;
1480
- exports.projectsCreateEnvVars = projectsCreateEnvVars;
1481
- exports.projectsDelete = projectsDelete;
1482
- exports.projectsDeleteEnvVars = projectsDeleteEnvVars;
1483
- exports.projectsFind = projectsFind;
1484
- exports.projectsFindEnvVars = projectsFindEnvVars;
1485
- exports.projectsGetByChatId = projectsGetByChatId;
1486
- exports.projectsGetById = projectsGetById;
1487
- exports.projectsGetEnvVar = projectsGetEnvVar;
1488
- exports.projectsUpdate = projectsUpdate;
1489
- exports.projectsUpdateEnvVars = projectsUpdateEnvVars;
1490
- exports.rateLimitsFind = rateLimitsFind;
1491
- exports.reportsGetAIUsage = reportsGetAIUsage;
1492
- exports.reportsGetUsage = reportsGetUsage;
1493
- exports.reportsGetUserActivity = reportsGetUserActivity;
1494
- exports.tagDictionary = tagDictionary;
1495
- exports.userGet = userGet;
1496
- exports.userGetBilling = userGetBilling;
1497
- exports.userGetPlan = userGetPlan;
1498
- exports.userGetScopes = userGetScopes;
7
+ exports.chatsCreate = components.chatsCreate;
8
+ exports.chatsDelete = components.chatsDelete;
9
+ exports.chatsDeleteVersionFiles = components.chatsDeleteVersionFiles;
10
+ exports.chatsDownloadVersion = components.chatsDownloadVersion;
11
+ exports.chatsFavorite = components.chatsFavorite;
12
+ exports.chatsFind = components.chatsFind;
13
+ exports.chatsFindMessages = components.chatsFindMessages;
14
+ exports.chatsFindVersions = components.chatsFindVersions;
15
+ exports.chatsFork = components.chatsFork;
16
+ exports.chatsGetById = components.chatsGetById;
17
+ exports.chatsGetMessage = components.chatsGetMessage;
18
+ exports.chatsGetVersion = components.chatsGetVersion;
19
+ exports.chatsInit = components.chatsInit;
20
+ exports.chatsResolveTask = components.chatsResolveTask;
21
+ exports.chatsRestore = components.chatsRestore;
22
+ exports.chatsResume = components.chatsResume;
23
+ exports.chatsSendMessage = components.chatsSendMessage;
24
+ exports.chatsStop = components.chatsStop;
25
+ exports.chatsUpdate = components.chatsUpdate;
26
+ exports.chatsUpdateVersion = components.chatsUpdateVersion;
27
+ exports.deploymentsCreate = components.deploymentsCreate;
28
+ exports.deploymentsDelete = components.deploymentsDelete;
29
+ exports.deploymentsFind = components.deploymentsFind;
30
+ exports.deploymentsFindErrors = components.deploymentsFindErrors;
31
+ exports.deploymentsFindLogs = components.deploymentsFindLogs;
32
+ exports.deploymentsGetById = components.deploymentsGetById;
33
+ exports.hooksCreate = components.hooksCreate;
34
+ exports.hooksDelete = components.hooksDelete;
35
+ exports.hooksFind = components.hooksFind;
36
+ exports.hooksGetById = components.hooksGetById;
37
+ exports.hooksUpdate = components.hooksUpdate;
38
+ exports.integrationsVercelProjectsCreate = components.integrationsVercelProjectsCreate;
39
+ exports.integrationsVercelProjectsFind = components.integrationsVercelProjectsFind;
40
+ exports.mcpServersCreate = components.mcpServersCreate;
41
+ exports.mcpServersCreateOAuthAuthorizationUrl = components.mcpServersCreateOAuthAuthorizationUrl;
42
+ exports.mcpServersDelete = components.mcpServersDelete;
43
+ exports.mcpServersFind = components.mcpServersFind;
44
+ exports.mcpServersGetById = components.mcpServersGetById;
45
+ exports.mcpServersUpdate = components.mcpServersUpdate;
46
+ exports.operationsByPath = components.operationsByPath;
47
+ exports.operationsByTag = components.operationsByTag;
48
+ exports.projectsAssign = components.projectsAssign;
49
+ exports.projectsCreate = components.projectsCreate;
50
+ exports.projectsCreateEnvVars = components.projectsCreateEnvVars;
51
+ exports.projectsDelete = components.projectsDelete;
52
+ exports.projectsDeleteEnvVars = components.projectsDeleteEnvVars;
53
+ exports.projectsFind = components.projectsFind;
54
+ exports.projectsFindEnvVars = components.projectsFindEnvVars;
55
+ exports.projectsGetByChatId = components.projectsGetByChatId;
56
+ exports.projectsGetById = components.projectsGetById;
57
+ exports.projectsGetEnvVar = components.projectsGetEnvVar;
58
+ exports.projectsUpdate = components.projectsUpdate;
59
+ exports.projectsUpdateEnvVars = components.projectsUpdateEnvVars;
60
+ exports.rateLimitsFind = components.rateLimitsFind;
61
+ exports.reportsGetAIUsage = components.reportsGetAIUsage;
62
+ exports.reportsGetUsage = components.reportsGetUsage;
63
+ exports.reportsGetUserActivity = components.reportsGetUserActivity;
64
+ exports.tagDictionary = components.tagDictionary;
65
+ exports.userGet = components.userGet;
66
+ exports.userGetBilling = components.userGetBilling;
67
+ exports.userGetPlan = components.userGetPlan;
68
+ exports.userGetScopes = components.userGetScopes;