v0-api 0.2.0 → 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.
package/dist/effect.d.cts CHANGED
@@ -1,830 +1,6 @@
1
1
  import * as _sferadev_openapi_utils_effect from '@sferadev/openapi-utils/effect';
2
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
- metadata?: unknown;
67
- };
68
- config?: Partial<FetcherConfig> & {
69
- client?: typeof client;
70
- };
71
- }): Promise<unknown>;
72
- /**
73
- * @summary Initialize Chat
74
- * @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.
75
- * @link /chats/init
76
- */
77
- declare function chatsInit({ config }?: {
78
- config?: Partial<FetcherConfig> & {
79
- client?: typeof client;
80
- };
81
- }): Promise<unknown>;
82
- /**
83
- * @summary Delete Chat
84
- * @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.
85
- * @link /chats/{chatId}
86
- */
87
- declare function chatsDelete({ pathParams, config, }?: {
88
- pathParams: {
89
- chatId: string;
90
- };
91
- config?: Partial<FetcherConfig> & {
92
- client?: typeof client;
93
- };
94
- }): Promise<unknown>;
95
- /**
96
- * @summary Get Chat
97
- * @description Retrieves the full details of a specific chat using its `chatId`. Includes messages, metadata, and associated configuration.
98
- * @link /chats/{chatId}
99
- */
100
- declare function chatsGetById({ pathParams, config, }?: {
101
- pathParams: {
102
- chatId: string;
103
- };
104
- config?: Partial<FetcherConfig> & {
105
- client?: typeof client;
106
- };
107
- }): Promise<unknown>;
108
- /**
109
- * @summary Update Chat
110
- * @description Updates the metadata of an existing chat using its `chatId`. Supports changes to the chat name and privacy setting.
111
- * @link /chats/{chatId}
112
- */
113
- declare function chatsUpdate({ pathParams, config, }?: {
114
- pathParams: {
115
- chatId: string;
116
- };
117
- config?: Partial<FetcherConfig> & {
118
- client?: typeof client;
119
- };
120
- }): Promise<unknown>;
121
- /**
122
- * @summary Favorite Chat
123
- * @description Marks or unmarks a chat as a favorite using its `chatId`. This helps with organizing and quickly accessing important chats.
124
- * @link /chats/{chatId}/favorite
125
- */
126
- declare function chatsFavorite({ pathParams, config, }?: {
127
- pathParams: {
128
- chatId: string;
129
- };
130
- config?: Partial<FetcherConfig> & {
131
- client?: typeof client;
132
- };
133
- }): Promise<unknown>;
134
- /**
135
- * @summary Fork Chat
136
- * @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.
137
- * @link /chats/{chatId}/fork
138
- */
139
- declare function chatsFork({ pathParams, config, }?: {
140
- pathParams: {
141
- chatId: string;
142
- };
143
- config?: Partial<FetcherConfig> & {
144
- client?: typeof client;
145
- };
146
- }): Promise<unknown>;
147
- /**
148
- * @summary Get Project by Chat ID
149
- * @description Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.
150
- * @link /chats/{chatId}/project
151
- */
152
- declare function projectsGetByChatId({ pathParams, config, }?: {
153
- pathParams: {
154
- chatId: string;
155
- };
156
- config?: Partial<FetcherConfig> & {
157
- client?: typeof client;
158
- };
159
- }): Promise<unknown>;
160
- /**
161
- * @summary Find Chat Messages
162
- * @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.
163
- * @link /chats/{chatId}/messages
164
- */
165
- declare function chatsFindMessages({ pathParams, queryParams, config, }?: {
166
- pathParams: {
167
- chatId: string;
168
- };
169
- queryParams?: {
170
- limit?: number;
171
- cursor?: string;
172
- };
173
- config?: Partial<FetcherConfig> & {
174
- client?: typeof client;
175
- };
176
- }): Promise<unknown>;
177
- /**
178
- * @summary Send Message
179
- * @description Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.
180
- * @link /chats/{chatId}/messages
181
- */
182
- declare function chatsSendMessage({ pathParams, config, }?: {
183
- pathParams: {
184
- chatId: string;
185
- };
186
- config?: Partial<FetcherConfig> & {
187
- client?: typeof client;
188
- };
189
- }): Promise<unknown>;
190
- /**
191
- * @summary Get Chat Message
192
- * @description Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.
193
- * @link /chats/{chatId}/messages/{messageId}
194
- */
195
- declare function chatsGetMessage({ pathParams, config, }?: {
196
- pathParams: {
197
- chatId: string;
198
- messageId: string;
199
- };
200
- config?: Partial<FetcherConfig> & {
201
- client?: typeof client;
202
- };
203
- }): Promise<unknown>;
204
- /**
205
- * @summary Find Chat Versions
206
- * @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.
207
- * @link /chats/{chatId}/versions
208
- */
209
- declare function chatsFindVersions({ pathParams, queryParams, config, }?: {
210
- pathParams: {
211
- chatId: string;
212
- };
213
- queryParams?: {
214
- limit?: number;
215
- cursor?: string;
216
- };
217
- config?: Partial<FetcherConfig> & {
218
- client?: typeof client;
219
- };
220
- }): Promise<unknown>;
221
- /**
222
- * @summary Get Chat Version
223
- * @description Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.
224
- * @link /chats/{chatId}/versions/{versionId}
225
- */
226
- declare function chatsGetVersion({ pathParams, queryParams, config, }?: {
227
- pathParams: {
228
- chatId: string;
229
- versionId: string;
230
- };
231
- queryParams?: {
232
- includeDefaultFiles?: "true" | "false";
233
- };
234
- config?: Partial<FetcherConfig> & {
235
- client?: typeof client;
236
- };
237
- }): Promise<unknown>;
238
- /**
239
- * @summary Update Chat Version Files
240
- * @description Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.
241
- * @link /chats/{chatId}/versions/{versionId}
242
- */
243
- declare function chatsUpdateVersion({ pathParams, config, }?: {
244
- pathParams: {
245
- chatId: string;
246
- versionId: string;
247
- };
248
- config?: Partial<FetcherConfig> & {
249
- client?: typeof client;
250
- };
251
- }): Promise<unknown>;
252
- /**
253
- * @summary Download version files
254
- * @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.
255
- * @link /chats/{chatId}/versions/{versionId}/download
256
- */
257
- declare function chatsDownloadVersion({ pathParams, queryParams, config, }?: {
258
- pathParams: {
259
- chatId: string;
260
- versionId: string;
261
- };
262
- queryParams?: {
263
- format?: "zip" | "tarball";
264
- includeDefaultFiles?: "true" | "false";
265
- };
266
- config?: Partial<FetcherConfig> & {
267
- client?: typeof client;
268
- };
269
- }): Promise<unknown>;
270
- /**
271
- * @summary Delete Chat Version Files
272
- * @description Deletes source files from a specific chat version (block). Files are removed from the version and a new source version is created.
273
- * @link /chats/{chatId}/versions/{versionId}/files/delete
274
- */
275
- declare function chatsDeleteVersionFiles({ pathParams, config, }?: {
276
- pathParams: {
277
- chatId: string;
278
- versionId: string;
279
- };
280
- config?: Partial<FetcherConfig> & {
281
- client?: typeof client;
282
- };
283
- }): Promise<unknown>;
284
- /**
285
- * @summary Resume Message
286
- * @description Reconnects to an active assistant message stream and returns it as Server-Sent Events. This does not restart or continue a stopped generation.
287
- * @link /chats/{chatId}/messages/{messageId}/resume
288
- */
289
- declare function chatsResume({ pathParams, config, }?: {
290
- pathParams: {
291
- chatId: string;
292
- messageId: string;
293
- };
294
- config?: Partial<FetcherConfig> & {
295
- client?: typeof client;
296
- };
297
- }): Promise<unknown>;
298
- /**
299
- * @summary Stop Message
300
- * @description Stops an in-flight message generation in a chat. Useful for cancelling a streaming response that is still being generated.
301
- * @link /chats/{chatId}/messages/{messageId}/stop
302
- */
303
- declare function chatsStop({ pathParams, config, }?: {
304
- pathParams: {
305
- chatId: string;
306
- messageId: string;
307
- };
308
- config?: Partial<FetcherConfig> & {
309
- client?: typeof client;
310
- };
311
- }): Promise<unknown>;
312
- /**
313
- * @summary Resolve Task
314
- * @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).
315
- * @link /chats/{chatId}/tasks/resolve
316
- */
317
- declare function chatsResolveTask({ pathParams, config, }?: {
318
- pathParams: {
319
- chatId: string;
320
- };
321
- config?: Partial<FetcherConfig> & {
322
- client?: typeof client;
323
- };
324
- }): Promise<unknown>;
325
- /**
326
- * @summary Find Deployments
327
- * @description Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.
328
- * @link /deployments
329
- */
330
- declare function deploymentsFind({ queryParams, config, }?: {
331
- queryParams?: {
332
- projectId?: string;
333
- chatId?: string;
334
- versionId?: string;
335
- };
336
- config?: Partial<FetcherConfig> & {
337
- client?: typeof client;
338
- };
339
- }): Promise<unknown>;
340
- /**
341
- * @summary Create Deployment
342
- * @description Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.
343
- * @link /deployments
344
- */
345
- declare function deploymentsCreate({ config }?: {
346
- config?: Partial<FetcherConfig> & {
347
- client?: typeof client;
348
- };
349
- }): Promise<unknown>;
350
- /**
351
- * @summary Get Deployment
352
- * @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.
353
- * @link /deployments/{deploymentId}
354
- */
355
- declare function deploymentsGetById({ pathParams, config, }?: {
356
- pathParams: {
357
- deploymentId: string;
358
- };
359
- config?: Partial<FetcherConfig> & {
360
- client?: typeof client;
361
- };
362
- }): Promise<unknown>;
363
- /**
364
- * @summary Delete Deployment
365
- * @description Delete a deployment by ID. This will delete the deployment from Vercel.
366
- * @link /deployments/{deploymentId}
367
- */
368
- declare function deploymentsDelete({ pathParams, config, }?: {
369
- pathParams: {
370
- deploymentId: string;
371
- };
372
- config?: Partial<FetcherConfig> & {
373
- client?: typeof client;
374
- };
375
- }): Promise<unknown>;
376
- /**
377
- * @summary Find Deployment Logs
378
- * @description Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.
379
- * @link /deployments/{deploymentId}/logs
380
- */
381
- declare function deploymentsFindLogs({ pathParams, queryParams, config, }?: {
382
- pathParams: {
383
- deploymentId: string;
384
- };
385
- queryParams?: {
386
- since?: number;
387
- };
388
- config?: Partial<FetcherConfig> & {
389
- client?: typeof client;
390
- };
391
- }): Promise<unknown>;
392
- /**
393
- * @summary Find Deployment Errors
394
- * @description Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.
395
- * @link /deployments/{deploymentId}/errors
396
- */
397
- declare function deploymentsFindErrors({ pathParams, config, }?: {
398
- pathParams: {
399
- deploymentId: string;
400
- };
401
- config?: Partial<FetcherConfig> & {
402
- client?: typeof client;
403
- };
404
- }): Promise<unknown>;
405
- /**
406
- * @summary Find Hooks
407
- * @description Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.
408
- * @link /hooks
409
- */
410
- declare function hooksFind({ config }?: {
411
- config?: Partial<FetcherConfig> & {
412
- client?: typeof client;
413
- };
414
- }): Promise<unknown>;
415
- /**
416
- * @summary Create Hook
417
- * @description Creates a new webhook that listens for specific events. Supports optional association with a chat.
418
- * @link /hooks
419
- */
420
- declare function hooksCreate({ config }?: {
421
- config?: Partial<FetcherConfig> & {
422
- client?: typeof client;
423
- };
424
- }): Promise<unknown>;
425
- /**
426
- * @summary Get Hook
427
- * @description Retrieves the details of a specific webhook using its ID.
428
- * @link /hooks/{hookId}
429
- */
430
- declare function hooksGetById({ pathParams, config, }?: {
431
- pathParams: {
432
- hookId: string;
433
- };
434
- config?: Partial<FetcherConfig> & {
435
- client?: typeof client;
436
- };
437
- }): Promise<unknown>;
438
- /**
439
- * @summary Update Hook
440
- * @description Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.
441
- * @link /hooks/{hookId}
442
- */
443
- declare function hooksUpdate({ pathParams, config, }?: {
444
- pathParams: {
445
- hookId: string;
446
- };
447
- config?: Partial<FetcherConfig> & {
448
- client?: typeof client;
449
- };
450
- }): Promise<unknown>;
451
- /**
452
- * @summary Delete Hook
453
- * @description Deletes a webhook based on its ID. This action is irreversible.
454
- * @link /hooks/{hookId}
455
- */
456
- declare function hooksDelete({ pathParams, config, }?: {
457
- pathParams: {
458
- hookId: string;
459
- };
460
- config?: Partial<FetcherConfig> & {
461
- client?: typeof client;
462
- };
463
- }): Promise<unknown>;
464
- /**
465
- * @summary Find Vercel Projects
466
- * @description Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.
467
- * @link /integrations/vercel/projects
468
- */
469
- declare function integrationsVercelProjectsFind({ config }?: {
470
- config?: Partial<FetcherConfig> & {
471
- client?: typeof client;
472
- };
473
- }): Promise<unknown>;
474
- /**
475
- * @summary Create Vercel Project
476
- * @description Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.
477
- * @link /integrations/vercel/projects
478
- */
479
- declare function integrationsVercelProjectsCreate({ config }?: {
480
- config?: Partial<FetcherConfig> & {
481
- client?: typeof client;
482
- };
483
- }): Promise<unknown>;
484
- /**
485
- * @summary Find Projects
486
- * @description Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.
487
- * @link /projects
488
- */
489
- declare function projectsFind({ config }?: {
490
- config?: Partial<FetcherConfig> & {
491
- client?: typeof client;
492
- };
493
- }): Promise<unknown>;
494
- /**
495
- * @summary Create Project
496
- * @description Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.
497
- * @link /projects
498
- */
499
- declare function projectsCreate({ config }?: {
500
- config?: Partial<FetcherConfig> & {
501
- client?: typeof client;
502
- };
503
- }): Promise<unknown>;
504
- /**
505
- * @summary Get Project by ID
506
- * @description Retrieves the details of a specific v0 project by its ID.
507
- * @link /projects/{projectId}
508
- */
509
- declare function projectsGetById({ pathParams, config, }?: {
510
- pathParams: {
511
- projectId: string;
512
- };
513
- config?: Partial<FetcherConfig> & {
514
- client?: typeof client;
515
- };
516
- }): Promise<unknown>;
517
- /**
518
- * @summary Update Project
519
- * @description Updates the metadata of an existing project using its `projectId`. Supports changes to the project name and privacy setting.
520
- * @link /projects/{projectId}
521
- */
522
- declare function projectsUpdate({ pathParams, config, }?: {
523
- pathParams: {
524
- projectId: string;
525
- };
526
- config?: Partial<FetcherConfig> & {
527
- client?: typeof client;
528
- };
529
- }): Promise<unknown>;
530
- /**
531
- * @summary Delete Project
532
- * @description Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.
533
- * @link /projects/{projectId}
534
- */
535
- declare function projectsDelete({ pathParams, queryParams, config, }?: {
536
- pathParams: {
537
- projectId: string;
538
- };
539
- queryParams?: {
540
- deleteAllChats?: "true" | "false";
541
- };
542
- config?: Partial<FetcherConfig> & {
543
- client?: typeof client;
544
- };
545
- }): Promise<unknown>;
546
- /**
547
- * @summary Assign Project to Chat
548
- * @description Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.
549
- * @link /projects/{projectId}/assign
550
- */
551
- declare function projectsAssign({ pathParams, config, }?: {
552
- pathParams: {
553
- projectId: string;
554
- };
555
- config?: Partial<FetcherConfig> & {
556
- client?: typeof client;
557
- };
558
- }): Promise<unknown>;
559
- /**
560
- * @summary Find Environment Variables
561
- * @description Retrieves all environment variables for a given project.
562
- * @link /projects/{projectId}/env-vars
563
- */
564
- declare function projectsFindEnvVars({ pathParams, queryParams, config, }?: {
565
- pathParams: {
566
- projectId: string;
567
- };
568
- queryParams?: {
569
- decrypted?: "true" | "false";
570
- };
571
- config?: Partial<FetcherConfig> & {
572
- client?: typeof client;
573
- };
574
- }): Promise<unknown>;
575
- /**
576
- * @summary Create Environment Variables
577
- * @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.
578
- * @link /projects/{projectId}/env-vars
579
- */
580
- declare function projectsCreateEnvVars({ pathParams, queryParams, config, }?: {
581
- pathParams: {
582
- projectId: string;
583
- };
584
- queryParams?: {
585
- decrypted?: "true" | "false";
586
- };
587
- config?: Partial<FetcherConfig> & {
588
- client?: typeof client;
589
- };
590
- }): Promise<unknown>;
591
- /**
592
- * @summary Update Environment Variables
593
- * @description Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.
594
- * @link /projects/{projectId}/env-vars
595
- */
596
- declare function projectsUpdateEnvVars({ pathParams, queryParams, config, }?: {
597
- pathParams: {
598
- projectId: string;
599
- };
600
- queryParams?: {
601
- decrypted?: "true" | "false";
602
- };
603
- config?: Partial<FetcherConfig> & {
604
- client?: typeof client;
605
- };
606
- }): Promise<unknown>;
607
- /**
608
- * @summary Delete Environment Variables
609
- * @description Deletes multiple environment variables for a given project by their IDs.
610
- * @link /projects/{projectId}/env-vars/delete
611
- */
612
- declare function projectsDeleteEnvVars({ pathParams, config, }?: {
613
- pathParams: {
614
- projectId: string;
615
- };
616
- config?: Partial<FetcherConfig> & {
617
- client?: typeof client;
618
- };
619
- }): Promise<unknown>;
620
- /**
621
- * @summary Get Environment Variable
622
- * @description Retrieves a specific environment variable for a given project by its ID, including its value.
623
- * @link /projects/{projectId}/env-vars/{environmentVariableId}
624
- */
625
- declare function projectsGetEnvVar({ pathParams, queryParams, config, }?: {
626
- pathParams: {
627
- projectId: string;
628
- environmentVariableId: string;
629
- };
630
- queryParams?: {
631
- decrypted?: "true" | "false";
632
- };
633
- config?: Partial<FetcherConfig> & {
634
- client?: typeof client;
635
- };
636
- }): Promise<unknown>;
637
- /**
638
- * @summary Find Rate Limit
639
- * @description Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.
640
- * @link /rate-limits
641
- */
642
- declare function rateLimitsFind({ queryParams, config, }?: {
643
- queryParams?: {
644
- scope?: string;
645
- };
646
- config?: Partial<FetcherConfig> & {
647
- client?: typeof client;
648
- };
649
- }): Promise<unknown>;
650
- /**
651
- * @summary Get User
652
- * @description Retrieves information about the authenticated user, including their ID, name, email, and account metadata.
653
- * @link /user
654
- */
655
- declare function userGet({ config }?: {
656
- config?: Partial<FetcherConfig> & {
657
- client?: typeof client;
658
- };
659
- }): Promise<unknown>;
660
- /**
661
- * @summary Get Billing
662
- * @description Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).
663
- * @link /user/billing
664
- */
665
- declare function userGetBilling({ queryParams, config, }?: {
666
- queryParams?: {
667
- scope?: string;
668
- };
669
- config?: Partial<FetcherConfig> & {
670
- client?: typeof client;
671
- };
672
- }): Promise<unknown>;
673
- /**
674
- * @summary Get Plan
675
- * @description Returns the current subscription plan for the authenticated user, including tier details and feature limits.
676
- * @link /user/plan
677
- */
678
- declare function userGetPlan({ config }?: {
679
- config?: Partial<FetcherConfig> & {
680
- client?: typeof client;
681
- };
682
- }): Promise<unknown>;
683
- /**
684
- * @summary Get User Scopes
685
- * @description Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.
686
- * @link /user/scopes
687
- */
688
- declare function userGetScopes({ config }?: {
689
- config?: Partial<FetcherConfig> & {
690
- client?: typeof client;
691
- };
692
- }): Promise<unknown>;
693
- /**
694
- * @summary Restore Block
695
- * @description Restores a block to a specific version.
696
- * @link /chats/{chatId}/versions/{versionId}/restore
697
- */
698
- declare function chatsRestore({ pathParams, config, }?: {
699
- pathParams: {
700
- chatId: string;
701
- versionId: string;
702
- };
703
- config?: Partial<FetcherConfig> & {
704
- client?: typeof client;
705
- };
706
- }): Promise<unknown>;
707
- /**
708
- * @summary Get Usage Report
709
- * @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.
710
- * @link /reports/usage
711
- */
712
- declare function reportsGetUsage({ queryParams, config, }?: {
713
- queryParams?: {
714
- startDate?: string;
715
- endDate?: string;
716
- chatId?: string;
717
- messageId?: string;
718
- userId?: string;
719
- limit?: number;
720
- cursor?: string;
721
- };
722
- config?: Partial<FetcherConfig> & {
723
- client?: typeof client;
724
- };
725
- }): Promise<unknown>;
726
- /**
727
- * @summary Get AI Usage Report
728
- * @description Retrieves v0 AI usage events for the authenticated user or active team scope.
729
- * @link /reports/usage/ai
730
- */
731
- declare function reportsGetAIUsage({ queryParams, config, }?: {
732
- queryParams?: {
733
- start?: string;
734
- end?: string;
735
- cursor?: string;
736
- limit?: number;
737
- };
738
- config?: Partial<FetcherConfig> & {
739
- client?: typeof client;
740
- };
741
- }): Promise<unknown>;
742
- /**
743
- * @summary Get User Activity Report
744
- * @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.
745
- * @link /reports/user-activity
746
- */
747
- declare function reportsGetUserActivity({ queryParams, config, }?: {
748
- queryParams?: {
749
- startDate?: string;
750
- endDate?: string;
751
- };
752
- config?: Partial<FetcherConfig> & {
753
- client?: typeof client;
754
- };
755
- }): Promise<unknown>;
756
- /**
757
- * @summary List MCP Servers
758
- * @description Retrieves all MCP servers configured for the authenticated user.
759
- * @link /mcp-servers
760
- */
761
- declare function mcpServersFind({ config }?: {
762
- config?: Partial<FetcherConfig> & {
763
- client?: typeof client;
764
- };
765
- }): Promise<unknown>;
766
- /**
767
- * @summary Create MCP Server
768
- * @description Creates a new MCP server configuration for the authenticated user. Supports OAuth, bearer token, custom headers, and unauthenticated servers.
769
- * @link /mcp-servers
770
- */
771
- declare function mcpServersCreate({ config }?: {
772
- config?: Partial<FetcherConfig> & {
773
- client?: typeof client;
774
- };
775
- }): Promise<unknown>;
776
- /**
777
- * @summary Get MCP Server
778
- * @description Retrieves the details of a specific MCP server by its ID.
779
- * @link /mcp-servers/{mcpServerId}
780
- */
781
- declare function mcpServersGetById({ pathParams, config, }?: {
782
- pathParams: {
783
- mcpServerId: string;
784
- };
785
- config?: Partial<FetcherConfig> & {
786
- client?: typeof client;
787
- };
788
- }): Promise<unknown>;
789
- /**
790
- * @summary Update MCP Server
791
- * @description Updates the configuration of an existing MCP server, including its name, URL, description, enabled status, and authentication settings.
792
- * @link /mcp-servers/{mcpServerId}
793
- */
794
- declare function mcpServersUpdate({ pathParams, config, }?: {
795
- pathParams: {
796
- mcpServerId: string;
797
- };
798
- config?: Partial<FetcherConfig> & {
799
- client?: typeof client;
800
- };
801
- }): Promise<unknown>;
802
- /**
803
- * @summary Delete MCP Server
804
- * @description Deletes an MCP server based on its ID. This action is irreversible and will also remove any associated OAuth tokens.
805
- * @link /mcp-servers/{mcpServerId}
806
- */
807
- declare function mcpServersDelete({ pathParams, config, }?: {
808
- pathParams: {
809
- mcpServerId: string;
810
- };
811
- config?: Partial<FetcherConfig> & {
812
- client?: typeof client;
813
- };
814
- }): Promise<unknown>;
815
- /**
816
- * @summary Create MCP Server OAuth Authorization URL
817
- * @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.
818
- * @link /mcp-servers/{mcpServerId}/oauth/authorize
819
- */
820
- declare function mcpServersCreateOAuthAuthorizationUrl({ pathParams, config, }?: {
821
- pathParams: {
822
- mcpServerId: string;
823
- };
824
- config?: Partial<FetcherConfig> & {
825
- client?: typeof client;
826
- };
827
- }): Promise<unknown>;
3
+ import { chatsCreate, chatsFind, chatsInit, chatsDelete, chatsGetById, chatsUpdate, chatsFavorite, chatsFork, chatsFindMessages, chatsSendMessage, chatsGetMessage, chatsFindVersions, chatsGetVersion, chatsUpdateVersion, chatsDownloadVersion, chatsDeleteVersionFiles, chatsResume, chatsStop, chatsResolveTask, chatsRestore, projectsGetByChatId, projectsFind, projectsCreate, projectsGetById, projectsUpdate, projectsDelete, projectsAssign, projectsFindEnvVars, projectsCreateEnvVars, projectsUpdateEnvVars, projectsDeleteEnvVars, projectsGetEnvVar, deploymentsFind, deploymentsCreate, deploymentsGetById, deploymentsDelete, deploymentsFindLogs, deploymentsFindErrors, hooksFind, hooksCreate, hooksGetById, hooksUpdate, hooksDelete, integrationsVercelProjectsFind, integrationsVercelProjectsCreate, rateLimitsFind, userGet, userGetBilling, userGetPlan, userGetScopes, reportsGetUsage, reportsGetAIUsage, reportsGetUserActivity, mcpServersFind, mcpServersCreate, mcpServersGetById, mcpServersUpdate, mcpServersDelete, mcpServersCreateOAuthAuthorizationUrl } from './components.cjs';
828
4
 
829
5
  declare const ApiService: _sferadev_openapi_utils_effect.EffectApi<{
830
6
  chats: {