v0-api 0.1.4 → 0.2.1

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