v0-api 0.0.4 → 0.1.4

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