v0-api 0.0.3 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/components.cjs +1498 -0
  2. package/dist/components.d.cts +1011 -0
  3. package/dist/components.d.cts.map +1 -0
  4. package/dist/components.d.mts +1011 -0
  5. package/dist/components.d.mts.map +1 -0
  6. package/dist/components.mjs +1435 -0
  7. package/dist/effect.cjs +1334 -0
  8. package/dist/effect.d.cts +970 -0
  9. package/dist/effect.d.cts.map +1 -0
  10. package/dist/effect.d.mts +970 -0
  11. package/dist/effect.d.mts.map +1 -0
  12. package/dist/effect.mjs +1312 -0
  13. package/dist/index.cjs +5132 -0
  14. package/dist/index.d.cts +11385 -0
  15. package/dist/index.d.cts.map +1 -0
  16. package/dist/index.d.mts +11378 -228
  17. package/dist/index.d.mts.map +1 -0
  18. package/dist/index.d.ts +11378 -228
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.mjs +4311 -7
  21. package/dist/schemas.cjs +3229 -0
  22. package/dist/schemas.d.cts +1856 -0
  23. package/dist/schemas.d.cts.map +1 -0
  24. package/dist/schemas.d.mts +1856 -0
  25. package/dist/schemas.d.mts.map +1 -0
  26. package/dist/schemas.mjs +2488 -0
  27. package/dist/types.cjs +420 -0
  28. package/dist/types.d.cts +8429 -0
  29. package/dist/types.d.cts.map +1 -0
  30. package/dist/types.d.mts +8429 -0
  31. package/dist/types.d.mts.map +1 -0
  32. package/dist/types.mjs +343 -0
  33. package/package.json +84 -31
  34. package/README.md +0 -3
  35. package/dist/client.d.mts +0 -58
  36. package/dist/client.d.ts +0 -58
  37. package/dist/client.js +0 -53
  38. package/dist/client.mjs +0 -46
  39. package/dist/generated/components.d.mts +0 -353
  40. package/dist/generated/components.d.ts +0 -353
  41. package/dist/generated/components.js +0 -449
  42. package/dist/generated/components.mjs +0 -419
  43. package/dist/generated/mcp.d.mts +0 -261
  44. package/dist/generated/mcp.d.ts +0 -261
  45. package/dist/generated/mcp.js +0 -554
  46. package/dist/generated/mcp.mjs +0 -524
  47. package/dist/generated/schemas.d.mts +0 -1484
  48. package/dist/generated/schemas.d.ts +0 -1484
  49. package/dist/generated/schemas.js +0 -1133
  50. package/dist/generated/schemas.mjs +0 -1125
  51. package/dist/generated/types.d.mts +0 -1669
  52. package/dist/generated/types.d.ts +0 -1669
  53. package/dist/generated/types.js +0 -93
  54. package/dist/generated/types.mjs +0 -90
  55. package/dist/index.js +0 -49
  56. package/dist/mcp.d.mts +0 -1
  57. package/dist/mcp.d.ts +0 -1
  58. package/dist/mcp.js +0 -5
  59. package/dist/mcp.mjs +0 -1
  60. package/dist/utils/fetch.d.mts +0 -18
  61. package/dist/utils/fetch.d.ts +0 -18
  62. package/dist/utils/fetch.js +0 -8
  63. package/dist/utils/fetch.mjs +0 -5
  64. package/dist/utils/fetcher.d.mts +0 -22
  65. package/dist/utils/fetcher.d.ts +0 -22
  66. package/dist/utils/fetcher.js +0 -68
  67. package/dist/utils/fetcher.mjs +0 -65
  68. package/dist/utils/lang.d.mts +0 -1
  69. package/dist/utils/lang.d.ts +0 -1
  70. package/dist/utils/lang.js +0 -9
  71. package/dist/utils/lang.mjs +0 -6
  72. package/dist/utils/mcp.d.mts +0 -1
  73. package/dist/utils/mcp.d.ts +0 -1
  74. package/dist/utils/mcp.js +0 -2
  75. package/dist/utils/mcp.mjs +0 -1
  76. package/dist/utils/types.d.mts +0 -3
  77. package/dist/utils/types.d.ts +0 -3
  78. package/dist/utils/types.js +0 -2
  79. package/dist/utils/types.mjs +0 -1
@@ -0,0 +1,970 @@
1
+ import * as _sferadev_openapi_utils_effect from '@sferadev/openapi-utils/effect';
2
+ export { ApiConfig, ApiError, EffectApi, NetworkError, ValidationError, makeApiLayer } from '@sferadev/openapi-utils/effect';
3
+
4
+ type RequestInit = {
5
+ body?: string | FormData | undefined;
6
+ headers?: Record<string, string> | undefined;
7
+ method?: string | undefined;
8
+ signal?: any | undefined;
9
+ };
10
+ type Response = {
11
+ ok: boolean;
12
+ status: number;
13
+ url: string;
14
+ json(): Promise<any>;
15
+ text(): Promise<string>;
16
+ headers?: {
17
+ get(name: string): string | null;
18
+ } | undefined;
19
+ };
20
+ type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
21
+
22
+ type FetcherConfig = {
23
+ baseUrl?: string;
24
+ token?: string | null;
25
+ fetchImpl?: FetchImpl;
26
+ headers?: Record<string, any>;
27
+ };
28
+ type FetcherOptions<TBody, THeaders, TQueryParams, TPathParams> = {
29
+ url: string;
30
+ method: string;
31
+ body?: TBody | undefined;
32
+ headers?: THeaders | undefined;
33
+ queryParams?: TQueryParams | undefined;
34
+ pathParams?: TPathParams | undefined;
35
+ signal?: AbortSignal | undefined;
36
+ } & FetcherConfig;
37
+ declare function client<TData, TError, TBody, THeaders, TQueryParams, TPathParams>({ url, method, body, headers, queryParams, signal, token, baseUrl, fetchImpl, }: FetcherOptions<TBody, THeaders, TQueryParams, TPathParams>): Promise<TData>;
38
+
39
+ /**
40
+ * Generated by Kubb (https://kubb.dev/).
41
+ * Do not edit manually.
42
+ */
43
+
44
+ /**
45
+ * @summary Create Chat
46
+ * @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.
47
+ * @link /chats
48
+ */
49
+ declare function chatsCreate({ config }?: {
50
+ config?: Partial<FetcherConfig> & {
51
+ client?: typeof client;
52
+ };
53
+ }): Promise<unknown>;
54
+ /**
55
+ * @summary Find Chats
56
+ * @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.
57
+ * @link /chats
58
+ */
59
+ declare function chatsFind({ queryParams, config }?: {
60
+ queryParams?: {
61
+ "limit"?: number;
62
+ "offset"?: number;
63
+ "isFavorite"?: "true" | "false";
64
+ "vercelProjectId"?: string;
65
+ "branch"?: string;
66
+ };
67
+ config?: Partial<FetcherConfig> & {
68
+ client?: typeof client;
69
+ };
70
+ }): Promise<unknown>;
71
+ /**
72
+ * @summary Initialize Chat
73
+ * @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.
74
+ * @link /chats/init
75
+ */
76
+ declare function chatsInit({ config }?: {
77
+ config?: Partial<FetcherConfig> & {
78
+ client?: typeof client;
79
+ };
80
+ }): Promise<unknown>;
81
+ /**
82
+ * @summary Delete Chat
83
+ * @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.
84
+ * @link /chats/{chatId}
85
+ */
86
+ declare function chatsDelete({ pathParams, config }?: {
87
+ pathParams: {
88
+ "chatId": string;
89
+ };
90
+ config?: Partial<FetcherConfig> & {
91
+ client?: typeof client;
92
+ };
93
+ }): Promise<unknown>;
94
+ /**
95
+ * @summary Get Chat
96
+ * @description Retrieves the full details of a specific chat using its `chatId`. Includes messages, metadata, and associated configuration.
97
+ * @link /chats/{chatId}
98
+ */
99
+ declare function chatsGetById({ pathParams, config }?: {
100
+ pathParams: {
101
+ "chatId": string;
102
+ };
103
+ config?: Partial<FetcherConfig> & {
104
+ client?: typeof client;
105
+ };
106
+ }): Promise<unknown>;
107
+ /**
108
+ * @summary Update Chat
109
+ * @description Updates the metadata of an existing chat using its `chatId`. Supports changes to the chat name and privacy setting.
110
+ * @link /chats/{chatId}
111
+ */
112
+ declare function chatsUpdate({ pathParams, config }?: {
113
+ pathParams: {
114
+ "chatId": string;
115
+ };
116
+ config?: Partial<FetcherConfig> & {
117
+ client?: typeof client;
118
+ };
119
+ }): Promise<unknown>;
120
+ /**
121
+ * @summary Favorite Chat
122
+ * @description Marks or unmarks a chat as a favorite using its `chatId`. This helps with organizing and quickly accessing important chats.
123
+ * @link /chats/{chatId}/favorite
124
+ */
125
+ declare function chatsFavorite({ pathParams, config }?: {
126
+ pathParams: {
127
+ "chatId": string;
128
+ };
129
+ config?: Partial<FetcherConfig> & {
130
+ client?: typeof client;
131
+ };
132
+ }): Promise<unknown>;
133
+ /**
134
+ * @summary Fork Chat
135
+ * @description Creates a new chat fork (duplicate) from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.
136
+ * @link /chats/{chatId}/fork
137
+ */
138
+ declare function chatsFork({ pathParams, config }?: {
139
+ pathParams: {
140
+ "chatId": string;
141
+ };
142
+ config?: Partial<FetcherConfig> & {
143
+ client?: typeof client;
144
+ };
145
+ }): Promise<unknown>;
146
+ /**
147
+ * @summary Get Project by Chat ID
148
+ * @description Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.
149
+ * @link /chats/{chatId}/project
150
+ */
151
+ declare function projectsGetByChatId({ pathParams, config }?: {
152
+ pathParams: {
153
+ "chatId": string;
154
+ };
155
+ config?: Partial<FetcherConfig> & {
156
+ client?: typeof client;
157
+ };
158
+ }): Promise<unknown>;
159
+ /**
160
+ * @summary Find Chat Messages
161
+ * @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.
162
+ * @link /chats/{chatId}/messages
163
+ */
164
+ declare function chatsFindMessages({ pathParams, queryParams, config }?: {
165
+ pathParams: {
166
+ "chatId": string;
167
+ };
168
+ queryParams?: {
169
+ "limit"?: number;
170
+ "cursor"?: string;
171
+ };
172
+ config?: Partial<FetcherConfig> & {
173
+ client?: typeof client;
174
+ };
175
+ }): Promise<unknown>;
176
+ /**
177
+ * @summary Send Message
178
+ * @description Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.
179
+ * @link /chats/{chatId}/messages
180
+ */
181
+ declare function chatsSendMessage({ pathParams, config }?: {
182
+ pathParams: {
183
+ "chatId": string;
184
+ };
185
+ config?: Partial<FetcherConfig> & {
186
+ client?: typeof client;
187
+ };
188
+ }): Promise<unknown>;
189
+ /**
190
+ * @summary Get Chat Message
191
+ * @description Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.
192
+ * @link /chats/{chatId}/messages/{messageId}
193
+ */
194
+ declare function chatsGetMessage({ pathParams, config }?: {
195
+ pathParams: {
196
+ "chatId": string;
197
+ "messageId": string;
198
+ };
199
+ config?: Partial<FetcherConfig> & {
200
+ client?: typeof client;
201
+ };
202
+ }): Promise<unknown>;
203
+ /**
204
+ * @summary Find Chat Versions
205
+ * @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.
206
+ * @link /chats/{chatId}/versions
207
+ */
208
+ declare function chatsFindVersions({ pathParams, queryParams, config }?: {
209
+ pathParams: {
210
+ "chatId": string;
211
+ };
212
+ queryParams?: {
213
+ "limit"?: number;
214
+ "cursor"?: string;
215
+ };
216
+ config?: Partial<FetcherConfig> & {
217
+ client?: typeof client;
218
+ };
219
+ }): Promise<unknown>;
220
+ /**
221
+ * @summary Get Chat Version
222
+ * @description Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.
223
+ * @link /chats/{chatId}/versions/{versionId}
224
+ */
225
+ declare function chatsGetVersion({ pathParams, queryParams, config }?: {
226
+ pathParams: {
227
+ "chatId": string;
228
+ "versionId": string;
229
+ };
230
+ queryParams?: {
231
+ "includeDefaultFiles"?: "true" | "false";
232
+ };
233
+ config?: Partial<FetcherConfig> & {
234
+ client?: typeof client;
235
+ };
236
+ }): Promise<unknown>;
237
+ /**
238
+ * @summary Update Chat Version Files
239
+ * @description Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.
240
+ * @link /chats/{chatId}/versions/{versionId}
241
+ */
242
+ declare function chatsUpdateVersion({ pathParams, config }?: {
243
+ pathParams: {
244
+ "chatId": string;
245
+ "versionId": string;
246
+ };
247
+ config?: Partial<FetcherConfig> & {
248
+ client?: typeof client;
249
+ };
250
+ }): Promise<unknown>;
251
+ /**
252
+ * @summary Download version files
253
+ * @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.
254
+ * @link /chats/{chatId}/versions/{versionId}/download
255
+ */
256
+ declare function chatsDownloadVersion({ pathParams, queryParams, config }?: {
257
+ pathParams: {
258
+ "chatId": string;
259
+ "versionId": string;
260
+ };
261
+ queryParams?: {
262
+ "format"?: "zip" | "tarball";
263
+ "includeDefaultFiles"?: "true" | "false";
264
+ };
265
+ config?: Partial<FetcherConfig> & {
266
+ client?: typeof client;
267
+ };
268
+ }): Promise<unknown>;
269
+ /**
270
+ * @summary Delete Chat Version Files
271
+ * @description Deletes source files from a specific chat version (block). Files are removed from the version and a new source version is created.
272
+ * @link /chats/{chatId}/versions/{versionId}/files/delete
273
+ */
274
+ declare function chatsDeleteVersionFiles({ pathParams, config }?: {
275
+ pathParams: {
276
+ "chatId": string;
277
+ "versionId": string;
278
+ };
279
+ config?: Partial<FetcherConfig> & {
280
+ client?: typeof client;
281
+ };
282
+ }): Promise<unknown>;
283
+ /**
284
+ * @summary Resume Message
285
+ * @description Reconnects to an active assistant message stream and returns it as Server-Sent Events. This does not restart or continue a stopped generation.
286
+ * @link /chats/{chatId}/messages/{messageId}/resume
287
+ */
288
+ declare function chatsResume({ pathParams, config }?: {
289
+ pathParams: {
290
+ "chatId": string;
291
+ "messageId": string;
292
+ };
293
+ config?: Partial<FetcherConfig> & {
294
+ client?: typeof client;
295
+ };
296
+ }): Promise<unknown>;
297
+ /**
298
+ * @summary Stop Message
299
+ * @description Stops an in-flight message generation in a chat. Useful for cancelling a streaming response that is still being generated.
300
+ * @link /chats/{chatId}/messages/{messageId}/stop
301
+ */
302
+ declare function chatsStop({ pathParams, config }?: {
303
+ pathParams: {
304
+ "chatId": string;
305
+ "messageId": string;
306
+ };
307
+ config?: Partial<FetcherConfig> & {
308
+ client?: typeof client;
309
+ };
310
+ }): Promise<unknown>;
311
+ /**
312
+ * @summary Resolve Task
313
+ * @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).
314
+ * @link /chats/{chatId}/tasks/resolve
315
+ */
316
+ declare function chatsResolveTask({ pathParams, config }?: {
317
+ pathParams: {
318
+ "chatId": string;
319
+ };
320
+ config?: Partial<FetcherConfig> & {
321
+ client?: typeof client;
322
+ };
323
+ }): Promise<unknown>;
324
+ /**
325
+ * @summary Find Deployments
326
+ * @description Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.
327
+ * @link /deployments
328
+ */
329
+ declare function deploymentsFind({ queryParams, config }?: {
330
+ queryParams?: {
331
+ "projectId"?: string;
332
+ "chatId"?: string;
333
+ "versionId"?: string;
334
+ };
335
+ config?: Partial<FetcherConfig> & {
336
+ client?: typeof client;
337
+ };
338
+ }): Promise<unknown>;
339
+ /**
340
+ * @summary Create Deployment
341
+ * @description Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.
342
+ * @link /deployments
343
+ */
344
+ declare function deploymentsCreate({ config }?: {
345
+ config?: Partial<FetcherConfig> & {
346
+ client?: typeof client;
347
+ };
348
+ }): Promise<unknown>;
349
+ /**
350
+ * @summary Get Deployment
351
+ * @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.
352
+ * @link /deployments/{deploymentId}
353
+ */
354
+ declare function deploymentsGetById({ pathParams, config }?: {
355
+ pathParams: {
356
+ "deploymentId": string;
357
+ };
358
+ config?: Partial<FetcherConfig> & {
359
+ client?: typeof client;
360
+ };
361
+ }): Promise<unknown>;
362
+ /**
363
+ * @summary Delete Deployment
364
+ * @description Delete a deployment by ID. This will delete the deployment from Vercel.
365
+ * @link /deployments/{deploymentId}
366
+ */
367
+ declare function deploymentsDelete({ pathParams, config }?: {
368
+ pathParams: {
369
+ "deploymentId": string;
370
+ };
371
+ config?: Partial<FetcherConfig> & {
372
+ client?: typeof client;
373
+ };
374
+ }): Promise<unknown>;
375
+ /**
376
+ * @summary Find Deployment Logs
377
+ * @description Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.
378
+ * @link /deployments/{deploymentId}/logs
379
+ */
380
+ declare function deploymentsFindLogs({ pathParams, queryParams, config }?: {
381
+ pathParams: {
382
+ "deploymentId": string;
383
+ };
384
+ queryParams?: {
385
+ "since"?: number;
386
+ };
387
+ config?: Partial<FetcherConfig> & {
388
+ client?: typeof client;
389
+ };
390
+ }): Promise<unknown>;
391
+ /**
392
+ * @summary Find Deployment Errors
393
+ * @description Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.
394
+ * @link /deployments/{deploymentId}/errors
395
+ */
396
+ declare function deploymentsFindErrors({ pathParams, config }?: {
397
+ pathParams: {
398
+ "deploymentId": string;
399
+ };
400
+ config?: Partial<FetcherConfig> & {
401
+ client?: typeof client;
402
+ };
403
+ }): Promise<unknown>;
404
+ /**
405
+ * @summary Find Hooks
406
+ * @description Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.
407
+ * @link /hooks
408
+ */
409
+ declare function hooksFind({ config }?: {
410
+ config?: Partial<FetcherConfig> & {
411
+ client?: typeof client;
412
+ };
413
+ }): Promise<unknown>;
414
+ /**
415
+ * @summary Create Hook
416
+ * @description Creates a new webhook that listens for specific events. Supports optional association with a chat.
417
+ * @link /hooks
418
+ */
419
+ declare function hooksCreate({ config }?: {
420
+ config?: Partial<FetcherConfig> & {
421
+ client?: typeof client;
422
+ };
423
+ }): Promise<unknown>;
424
+ /**
425
+ * @summary Get Hook
426
+ * @description Retrieves the details of a specific webhook using its ID.
427
+ * @link /hooks/{hookId}
428
+ */
429
+ declare function hooksGetById({ pathParams, config }?: {
430
+ pathParams: {
431
+ "hookId": string;
432
+ };
433
+ config?: Partial<FetcherConfig> & {
434
+ client?: typeof client;
435
+ };
436
+ }): Promise<unknown>;
437
+ /**
438
+ * @summary Update Hook
439
+ * @description Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.
440
+ * @link /hooks/{hookId}
441
+ */
442
+ declare function hooksUpdate({ pathParams, config }?: {
443
+ pathParams: {
444
+ "hookId": string;
445
+ };
446
+ config?: Partial<FetcherConfig> & {
447
+ client?: typeof client;
448
+ };
449
+ }): Promise<unknown>;
450
+ /**
451
+ * @summary Delete Hook
452
+ * @description Deletes a webhook based on its ID. This action is irreversible.
453
+ * @link /hooks/{hookId}
454
+ */
455
+ declare function hooksDelete({ pathParams, config }?: {
456
+ pathParams: {
457
+ "hookId": string;
458
+ };
459
+ config?: Partial<FetcherConfig> & {
460
+ client?: typeof client;
461
+ };
462
+ }): Promise<unknown>;
463
+ /**
464
+ * @summary Find Vercel Projects
465
+ * @description Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.
466
+ * @link /integrations/vercel/projects
467
+ */
468
+ declare function integrationsVercelProjectsFind({ config }?: {
469
+ config?: Partial<FetcherConfig> & {
470
+ client?: typeof client;
471
+ };
472
+ }): Promise<unknown>;
473
+ /**
474
+ * @summary Create Vercel Project
475
+ * @description Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.
476
+ * @link /integrations/vercel/projects
477
+ */
478
+ declare function integrationsVercelProjectsCreate({ config }?: {
479
+ config?: Partial<FetcherConfig> & {
480
+ client?: typeof client;
481
+ };
482
+ }): Promise<unknown>;
483
+ /**
484
+ * @summary Find Projects
485
+ * @description Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.
486
+ * @link /projects
487
+ */
488
+ declare function projectsFind({ config }?: {
489
+ config?: Partial<FetcherConfig> & {
490
+ client?: typeof client;
491
+ };
492
+ }): Promise<unknown>;
493
+ /**
494
+ * @summary Create Project
495
+ * @description Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.
496
+ * @link /projects
497
+ */
498
+ declare function projectsCreate({ config }?: {
499
+ config?: Partial<FetcherConfig> & {
500
+ client?: typeof client;
501
+ };
502
+ }): Promise<unknown>;
503
+ /**
504
+ * @summary Get Project by ID
505
+ * @description Retrieves the details of a specific v0 project by its ID.
506
+ * @link /projects/{projectId}
507
+ */
508
+ declare function projectsGetById({ pathParams, config }?: {
509
+ pathParams: {
510
+ "projectId": string;
511
+ };
512
+ config?: Partial<FetcherConfig> & {
513
+ client?: typeof client;
514
+ };
515
+ }): Promise<unknown>;
516
+ /**
517
+ * @summary Update Project
518
+ * @description Updates the metadata of an existing project using its `projectId`. Supports changes to the project name and privacy setting.
519
+ * @link /projects/{projectId}
520
+ */
521
+ declare function projectsUpdate({ pathParams, config }?: {
522
+ pathParams: {
523
+ "projectId": string;
524
+ };
525
+ config?: Partial<FetcherConfig> & {
526
+ client?: typeof client;
527
+ };
528
+ }): Promise<unknown>;
529
+ /**
530
+ * @summary Delete Project
531
+ * @description Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.
532
+ * @link /projects/{projectId}
533
+ */
534
+ declare function projectsDelete({ pathParams, queryParams, config }?: {
535
+ pathParams: {
536
+ "projectId": string;
537
+ };
538
+ queryParams?: {
539
+ "deleteAllChats"?: "true" | "false";
540
+ };
541
+ config?: Partial<FetcherConfig> & {
542
+ client?: typeof client;
543
+ };
544
+ }): Promise<unknown>;
545
+ /**
546
+ * @summary Assign Project to Chat
547
+ * @description Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.
548
+ * @link /projects/{projectId}/assign
549
+ */
550
+ declare function projectsAssign({ pathParams, config }?: {
551
+ pathParams: {
552
+ "projectId": string;
553
+ };
554
+ config?: Partial<FetcherConfig> & {
555
+ client?: typeof client;
556
+ };
557
+ }): Promise<unknown>;
558
+ /**
559
+ * @summary Find Environment Variables
560
+ * @description Retrieves all environment variables for a given project.
561
+ * @link /projects/{projectId}/env-vars
562
+ */
563
+ declare function projectsFindEnvVars({ pathParams, queryParams, config }?: {
564
+ pathParams: {
565
+ "projectId": string;
566
+ };
567
+ queryParams?: {
568
+ "decrypted"?: "true" | "false";
569
+ };
570
+ config?: Partial<FetcherConfig> & {
571
+ client?: typeof client;
572
+ };
573
+ }): Promise<unknown>;
574
+ /**
575
+ * @summary Create Environment Variables
576
+ * @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.
577
+ * @link /projects/{projectId}/env-vars
578
+ */
579
+ declare function projectsCreateEnvVars({ pathParams, queryParams, config }?: {
580
+ pathParams: {
581
+ "projectId": string;
582
+ };
583
+ queryParams?: {
584
+ "decrypted"?: "true" | "false";
585
+ };
586
+ config?: Partial<FetcherConfig> & {
587
+ client?: typeof client;
588
+ };
589
+ }): Promise<unknown>;
590
+ /**
591
+ * @summary Update Environment Variables
592
+ * @description Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.
593
+ * @link /projects/{projectId}/env-vars
594
+ */
595
+ declare function projectsUpdateEnvVars({ pathParams, queryParams, config }?: {
596
+ pathParams: {
597
+ "projectId": string;
598
+ };
599
+ queryParams?: {
600
+ "decrypted"?: "true" | "false";
601
+ };
602
+ config?: Partial<FetcherConfig> & {
603
+ client?: typeof client;
604
+ };
605
+ }): Promise<unknown>;
606
+ /**
607
+ * @summary Delete Environment Variables
608
+ * @description Deletes multiple environment variables for a given project by their IDs.
609
+ * @link /projects/{projectId}/env-vars/delete
610
+ */
611
+ declare function projectsDeleteEnvVars({ pathParams, config }?: {
612
+ pathParams: {
613
+ "projectId": string;
614
+ };
615
+ config?: Partial<FetcherConfig> & {
616
+ client?: typeof client;
617
+ };
618
+ }): Promise<unknown>;
619
+ /**
620
+ * @summary Get Environment Variable
621
+ * @description Retrieves a specific environment variable for a given project by its ID, including its value.
622
+ * @link /projects/{projectId}/env-vars/{environmentVariableId}
623
+ */
624
+ declare function projectsGetEnvVar({ pathParams, queryParams, config }?: {
625
+ pathParams: {
626
+ "projectId": string;
627
+ "environmentVariableId": string;
628
+ };
629
+ queryParams?: {
630
+ "decrypted"?: "true" | "false";
631
+ };
632
+ config?: Partial<FetcherConfig> & {
633
+ client?: typeof client;
634
+ };
635
+ }): Promise<unknown>;
636
+ /**
637
+ * @summary Find Rate Limit
638
+ * @description Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.
639
+ * @link /rate-limits
640
+ */
641
+ declare function rateLimitsFind({ queryParams, config }?: {
642
+ queryParams?: {
643
+ "scope"?: string;
644
+ };
645
+ config?: Partial<FetcherConfig> & {
646
+ client?: typeof client;
647
+ };
648
+ }): Promise<unknown>;
649
+ /**
650
+ * @summary Get User
651
+ * @description Retrieves information about the authenticated user, including their ID, name, email, and account metadata.
652
+ * @link /user
653
+ */
654
+ declare function userGet({ config }?: {
655
+ config?: Partial<FetcherConfig> & {
656
+ client?: typeof client;
657
+ };
658
+ }): Promise<unknown>;
659
+ /**
660
+ * @summary Get Billing
661
+ * @description Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).
662
+ * @link /user/billing
663
+ */
664
+ declare function userGetBilling({ queryParams, config }?: {
665
+ queryParams?: {
666
+ "scope"?: string;
667
+ };
668
+ config?: Partial<FetcherConfig> & {
669
+ client?: typeof client;
670
+ };
671
+ }): Promise<unknown>;
672
+ /**
673
+ * @summary Get Plan
674
+ * @description Returns the current subscription plan for the authenticated user, including tier details and feature limits.
675
+ * @link /user/plan
676
+ */
677
+ declare function userGetPlan({ config }?: {
678
+ config?: Partial<FetcherConfig> & {
679
+ client?: typeof client;
680
+ };
681
+ }): Promise<unknown>;
682
+ /**
683
+ * @summary Get User Scopes
684
+ * @description Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.
685
+ * @link /user/scopes
686
+ */
687
+ declare function userGetScopes({ config }?: {
688
+ config?: Partial<FetcherConfig> & {
689
+ client?: typeof client;
690
+ };
691
+ }): Promise<unknown>;
692
+ /**
693
+ * @summary Restore Block
694
+ * @description Restores a block to a specific version.
695
+ * @link /chats/{chatId}/versions/{versionId}/restore
696
+ */
697
+ declare function chatsRestore({ pathParams, config }?: {
698
+ pathParams: {
699
+ "chatId": string;
700
+ "versionId": string;
701
+ };
702
+ config?: Partial<FetcherConfig> & {
703
+ client?: typeof client;
704
+ };
705
+ }): Promise<unknown>;
706
+ /**
707
+ * @summary Get Usage Report
708
+ * @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.
709
+ * @link /reports/usage
710
+ */
711
+ declare function reportsGetUsage({ queryParams, config }?: {
712
+ queryParams?: {
713
+ "startDate"?: string;
714
+ "endDate"?: string;
715
+ "chatId"?: string;
716
+ "messageId"?: string;
717
+ "userId"?: string;
718
+ "limit"?: number;
719
+ "cursor"?: string;
720
+ };
721
+ config?: Partial<FetcherConfig> & {
722
+ client?: typeof client;
723
+ };
724
+ }): Promise<unknown>;
725
+ /**
726
+ * @summary Get AI Usage Report
727
+ * @description Retrieves v0 AI usage events for the authenticated user or active team scope.
728
+ * @link /reports/usage/ai
729
+ */
730
+ declare function reportsGetAIUsage({ queryParams, config }?: {
731
+ queryParams?: {
732
+ "start"?: string;
733
+ "end"?: string;
734
+ "cursor"?: string;
735
+ "limit"?: number;
736
+ };
737
+ config?: Partial<FetcherConfig> & {
738
+ client?: typeof client;
739
+ };
740
+ }): Promise<unknown>;
741
+ /**
742
+ * @summary Get User Activity Report
743
+ * @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.
744
+ * @link /reports/user-activity
745
+ */
746
+ declare function reportsGetUserActivity({ queryParams, config }?: {
747
+ queryParams?: {
748
+ "startDate"?: string;
749
+ "endDate"?: string;
750
+ };
751
+ config?: Partial<FetcherConfig> & {
752
+ client?: typeof client;
753
+ };
754
+ }): Promise<unknown>;
755
+ /**
756
+ * @summary List MCP Servers
757
+ * @description Retrieves all MCP servers configured for the authenticated user.
758
+ * @link /mcp-servers
759
+ */
760
+ declare function mcpServersFind({ config }?: {
761
+ config?: Partial<FetcherConfig> & {
762
+ client?: typeof client;
763
+ };
764
+ }): Promise<unknown>;
765
+ /**
766
+ * @summary Create MCP Server
767
+ * @description Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers.
768
+ * @link /mcp-servers
769
+ */
770
+ declare function mcpServersCreate({ config }?: {
771
+ config?: Partial<FetcherConfig> & {
772
+ client?: typeof client;
773
+ };
774
+ }): Promise<unknown>;
775
+ /**
776
+ * @summary Get MCP Server
777
+ * @description Retrieves the details of a specific MCP server by its ID.
778
+ * @link /mcp-servers/{mcpServerId}
779
+ */
780
+ declare function mcpServersGetById({ pathParams, config }?: {
781
+ pathParams: {
782
+ "mcpServerId": string;
783
+ };
784
+ config?: Partial<FetcherConfig> & {
785
+ client?: typeof client;
786
+ };
787
+ }): Promise<unknown>;
788
+ /**
789
+ * @summary Update MCP Server
790
+ * @description Updates the configuration of an existing MCP server, including its name, URL, description, enabled status, and authentication settings.
791
+ * @link /mcp-servers/{mcpServerId}
792
+ */
793
+ declare function mcpServersUpdate({ pathParams, config }?: {
794
+ pathParams: {
795
+ "mcpServerId": string;
796
+ };
797
+ config?: Partial<FetcherConfig> & {
798
+ client?: typeof client;
799
+ };
800
+ }): Promise<unknown>;
801
+ /**
802
+ * @summary Delete MCP Server
803
+ * @description Deletes an MCP server based on its ID. This action is irreversible and will also remove any associated OAuth tokens.
804
+ * @link /mcp-servers/{mcpServerId}
805
+ */
806
+ declare function mcpServersDelete({ pathParams, config }?: {
807
+ pathParams: {
808
+ "mcpServerId": string;
809
+ };
810
+ config?: Partial<FetcherConfig> & {
811
+ client?: typeof client;
812
+ };
813
+ }): Promise<unknown>;
814
+ /**
815
+ * @summary Create MCP Server OAuth Authorization URL
816
+ * @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.
817
+ * @link /mcp-servers/{mcpServerId}/oauth/authorize
818
+ */
819
+ declare function mcpServersCreateOAuthAuthorizationUrl({ pathParams, config }?: {
820
+ pathParams: {
821
+ "mcpServerId": string;
822
+ };
823
+ config?: Partial<FetcherConfig> & {
824
+ client?: typeof client;
825
+ };
826
+ }): Promise<unknown>;
827
+
828
+ declare const ApiService: _sferadev_openapi_utils_effect.EffectApi<{
829
+ chats: {
830
+ chatsCreate: typeof chatsCreate;
831
+ chatsFind: typeof chatsFind;
832
+ chatsInit: typeof chatsInit;
833
+ chatsDelete: typeof chatsDelete;
834
+ chatsGetById: typeof chatsGetById;
835
+ chatsUpdate: typeof chatsUpdate;
836
+ chatsFavorite: typeof chatsFavorite;
837
+ chatsFork: typeof chatsFork;
838
+ chatsFindMessages: typeof chatsFindMessages;
839
+ chatsSendMessage: typeof chatsSendMessage;
840
+ chatsGetMessage: typeof chatsGetMessage;
841
+ chatsFindVersions: typeof chatsFindVersions;
842
+ chatsGetVersion: typeof chatsGetVersion;
843
+ chatsUpdateVersion: typeof chatsUpdateVersion;
844
+ chatsDownloadVersion: typeof chatsDownloadVersion;
845
+ chatsDeleteVersionFiles: typeof chatsDeleteVersionFiles;
846
+ chatsResume: typeof chatsResume;
847
+ chatsStop: typeof chatsStop;
848
+ chatsResolveTask: typeof chatsResolveTask;
849
+ chatsRestore: typeof chatsRestore;
850
+ };
851
+ projects: {
852
+ projectsGetByChatId: typeof projectsGetByChatId;
853
+ projectsFind: typeof projectsFind;
854
+ projectsCreate: typeof projectsCreate;
855
+ projectsGetById: typeof projectsGetById;
856
+ projectsUpdate: typeof projectsUpdate;
857
+ projectsDelete: typeof projectsDelete;
858
+ projectsAssign: typeof projectsAssign;
859
+ projectsFindEnvVars: typeof projectsFindEnvVars;
860
+ projectsCreateEnvVars: typeof projectsCreateEnvVars;
861
+ projectsUpdateEnvVars: typeof projectsUpdateEnvVars;
862
+ projectsDeleteEnvVars: typeof projectsDeleteEnvVars;
863
+ projectsGetEnvVar: typeof projectsGetEnvVar;
864
+ };
865
+ deployments: {
866
+ deploymentsFind: typeof deploymentsFind;
867
+ deploymentsCreate: typeof deploymentsCreate;
868
+ deploymentsGetById: typeof deploymentsGetById;
869
+ deploymentsDelete: typeof deploymentsDelete;
870
+ deploymentsFindLogs: typeof deploymentsFindLogs;
871
+ deploymentsFindErrors: typeof deploymentsFindErrors;
872
+ };
873
+ hooks: {
874
+ hooksFind: typeof hooksFind;
875
+ hooksCreate: typeof hooksCreate;
876
+ hooksGetById: typeof hooksGetById;
877
+ hooksUpdate: typeof hooksUpdate;
878
+ hooksDelete: typeof hooksDelete;
879
+ };
880
+ integrations: {
881
+ integrationsVercelProjectsFind: typeof integrationsVercelProjectsFind;
882
+ integrationsVercelProjectsCreate: typeof integrationsVercelProjectsCreate;
883
+ };
884
+ ratelimits: {
885
+ rateLimitsFind: typeof rateLimitsFind;
886
+ };
887
+ user: {
888
+ userGet: typeof userGet;
889
+ userGetBilling: typeof userGetBilling;
890
+ userGetPlan: typeof userGetPlan;
891
+ userGetScopes: typeof userGetScopes;
892
+ };
893
+ reports: {
894
+ reportsGetUsage: typeof reportsGetUsage;
895
+ reportsGetAIUsage: typeof reportsGetAIUsage;
896
+ reportsGetUserActivity: typeof reportsGetUserActivity;
897
+ };
898
+ mcpservers: {
899
+ mcpServersFind: typeof mcpServersFind;
900
+ mcpServersCreate: typeof mcpServersCreate;
901
+ mcpServersGetById: typeof mcpServersGetById;
902
+ mcpServersUpdate: typeof mcpServersUpdate;
903
+ mcpServersDelete: typeof mcpServersDelete;
904
+ mcpServersCreateOAuthAuthorizationUrl: typeof mcpServersCreateOAuthAuthorizationUrl;
905
+ };
906
+ }>;
907
+ declare const effectByPath: _sferadev_openapi_utils_effect.EffectByPath<{
908
+ "POST /chats": typeof chatsCreate;
909
+ "GET /chats": typeof chatsFind;
910
+ "POST /chats/init": typeof chatsInit;
911
+ "DELETE /chats/{chatId}": typeof chatsDelete;
912
+ "GET /chats/{chatId}": typeof chatsGetById;
913
+ "PATCH /chats/{chatId}": typeof chatsUpdate;
914
+ "PUT /chats/{chatId}/favorite": typeof chatsFavorite;
915
+ "POST /chats/{chatId}/fork": typeof chatsFork;
916
+ "GET /chats/{chatId}/project": typeof projectsGetByChatId;
917
+ "GET /chats/{chatId}/messages": typeof chatsFindMessages;
918
+ "POST /chats/{chatId}/messages": typeof chatsSendMessage;
919
+ "GET /chats/{chatId}/messages/{messageId}": typeof chatsGetMessage;
920
+ "GET /chats/{chatId}/versions": typeof chatsFindVersions;
921
+ "GET /chats/{chatId}/versions/{versionId}": typeof chatsGetVersion;
922
+ "PATCH /chats/{chatId}/versions/{versionId}": typeof chatsUpdateVersion;
923
+ "GET /chats/{chatId}/versions/{versionId}/download": typeof chatsDownloadVersion;
924
+ "POST /chats/{chatId}/versions/{versionId}/files/delete": typeof chatsDeleteVersionFiles;
925
+ "POST /chats/{chatId}/messages/{messageId}/resume": typeof chatsResume;
926
+ "POST /chats/{chatId}/messages/{messageId}/stop": typeof chatsStop;
927
+ "POST /chats/{chatId}/tasks/resolve": typeof chatsResolveTask;
928
+ "GET /deployments": typeof deploymentsFind;
929
+ "POST /deployments": typeof deploymentsCreate;
930
+ "GET /deployments/{deploymentId}": typeof deploymentsGetById;
931
+ "DELETE /deployments/{deploymentId}": typeof deploymentsDelete;
932
+ "GET /deployments/{deploymentId}/logs": typeof deploymentsFindLogs;
933
+ "GET /deployments/{deploymentId}/errors": typeof deploymentsFindErrors;
934
+ "GET /hooks": typeof hooksFind;
935
+ "POST /hooks": typeof hooksCreate;
936
+ "GET /hooks/{hookId}": typeof hooksGetById;
937
+ "PATCH /hooks/{hookId}": typeof hooksUpdate;
938
+ "DELETE /hooks/{hookId}": typeof hooksDelete;
939
+ "GET /integrations/vercel/projects": typeof integrationsVercelProjectsFind;
940
+ "POST /integrations/vercel/projects": typeof integrationsVercelProjectsCreate;
941
+ "GET /projects": typeof projectsFind;
942
+ "POST /projects": typeof projectsCreate;
943
+ "GET /projects/{projectId}": typeof projectsGetById;
944
+ "PATCH /projects/{projectId}": typeof projectsUpdate;
945
+ "DELETE /projects/{projectId}": typeof projectsDelete;
946
+ "POST /projects/{projectId}/assign": typeof projectsAssign;
947
+ "GET /projects/{projectId}/env-vars": typeof projectsFindEnvVars;
948
+ "POST /projects/{projectId}/env-vars": typeof projectsCreateEnvVars;
949
+ "PATCH /projects/{projectId}/env-vars": typeof projectsUpdateEnvVars;
950
+ "POST /projects/{projectId}/env-vars/delete": typeof projectsDeleteEnvVars;
951
+ "GET /projects/{projectId}/env-vars/{environmentVariableId}": typeof projectsGetEnvVar;
952
+ "GET /rate-limits": typeof rateLimitsFind;
953
+ "GET /user": typeof userGet;
954
+ "GET /user/billing": typeof userGetBilling;
955
+ "GET /user/plan": typeof userGetPlan;
956
+ "GET /user/scopes": typeof userGetScopes;
957
+ "POST /chats/{chatId}/versions/{versionId}/restore": typeof chatsRestore;
958
+ "GET /reports/usage": typeof reportsGetUsage;
959
+ "GET /reports/usage/ai": typeof reportsGetAIUsage;
960
+ "GET /reports/user-activity": typeof reportsGetUserActivity;
961
+ "GET /mcp-servers": typeof mcpServersFind;
962
+ "POST /mcp-servers": typeof mcpServersCreate;
963
+ "GET /mcp-servers/{mcpServerId}": typeof mcpServersGetById;
964
+ "PATCH /mcp-servers/{mcpServerId}": typeof mcpServersUpdate;
965
+ "DELETE /mcp-servers/{mcpServerId}": typeof mcpServersDelete;
966
+ "POST /mcp-servers/{mcpServerId}/oauth/authorize": typeof mcpServersCreateOAuthAuthorizationUrl;
967
+ }>;
968
+
969
+ export { ApiService, effectByPath };
970
+ //# sourceMappingURL=effect.d.mts.map