v0-api 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/components.cjs +44 -44
- package/dist/components.d.cts +132 -132
- package/dist/components.d.mts +132 -132
- package/dist/components.mjs +44 -44
- package/dist/effect.cjs +10 -10
- package/dist/effect.d.cts +132 -132
- package/dist/effect.d.mts +132 -132
- package/dist/effect.mjs +10 -10
- package/dist/index.cjs +699 -699
- package/dist/index.d.cts +1797 -1813
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1797 -1813
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +1797 -1813
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +699 -699
- package/dist/schemas.cjs +667 -667
- package/dist/schemas.mjs +652 -652
- package/dist/types.cjs +3 -3
- package/dist/types.d.cts +1665 -1681
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +1665 -1681
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +3 -3
- package/package.json +4 -4
package/dist/schemas.mjs
CHANGED
|
@@ -2,59 +2,59 @@ import * as z from 'zod';
|
|
|
2
2
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
const chatDetailSchema = z.object({
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
id: z.string().describe("A unique identifier for the chat."),
|
|
6
|
+
object: z.enum([
|
|
7
7
|
"chat"
|
|
8
8
|
]).describe("Fixed value identifying this object as a chat."),
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
shareable: z.boolean().describe("Indicates whether the chat can be shared via public link."),
|
|
10
|
+
privacy: z.enum([
|
|
11
11
|
"private",
|
|
12
12
|
"public",
|
|
13
13
|
"team",
|
|
14
14
|
"team-edit",
|
|
15
15
|
"unlisted"
|
|
16
16
|
]).describe("Defines the visibility of the chat—private, team-only, or public."),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
name: z.string().optional().describe("An optional name assigned to the chat by the user."),
|
|
18
|
+
title: z.string().optional().describe("Deprecated title field preserved for backward compatibility."),
|
|
19
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the chat was created."),
|
|
20
|
+
updatedAt: z.string().optional().describe("The ISO timestamp of the last update to the chat."),
|
|
21
|
+
favorite: z.boolean().describe("Indicates whether the chat is marked as a favorite."),
|
|
22
|
+
authorId: z.string().describe("The ID of the user who created the chat."),
|
|
23
|
+
projectId: z.string().optional().describe("Optional ID of the v0 project associated with this chat."),
|
|
24
|
+
vercelProjectId: z.string().optional().describe("Optional ID of the linked Vercel project, if connected."),
|
|
25
|
+
webUrl: z.string().describe("Web URL to view this chat in the browser."),
|
|
26
|
+
apiUrl: z.string().describe("API URL to access this chat via the API."),
|
|
27
|
+
latestVersion: z.object({
|
|
28
|
+
id: z.string().describe("A unique identifier for the version."),
|
|
29
|
+
object: z.enum([
|
|
30
30
|
"version"
|
|
31
31
|
]).describe("Fixed value identifying this object as a version."),
|
|
32
|
-
|
|
32
|
+
status: z.enum([
|
|
33
33
|
"completed",
|
|
34
34
|
"failed",
|
|
35
35
|
"pending"
|
|
36
36
|
]).describe("The current status of the version generation process."),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
demoUrl: z.string().optional().describe("Optional URL for previewing the generated output."),
|
|
38
|
+
screenshotUrl: z.string().optional().describe("URL to retrieve a screenshot of this version."),
|
|
39
|
+
createdAt: z.iso.datetime().describe("The date and time when the version was created, in ISO 8601 format."),
|
|
40
|
+
updatedAt: z.iso.datetime().optional().describe("The date and time when the version was last updated, in ISO 8601 format."),
|
|
41
|
+
files: z.array(z.object({
|
|
42
|
+
object: z.enum([
|
|
43
43
|
"file"
|
|
44
44
|
]).describe("Fixed value identifying this object as a file."),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
name: z.string().describe("The name of the file, including its extension."),
|
|
46
|
+
content: z.string().describe("The full contents of the file as a raw string."),
|
|
47
|
+
locked: z.boolean().describe("Whether the file is locked to prevent AI from overwriting it during new version generation.")
|
|
48
48
|
}).strict()).describe("A list of files that were generated or included in this version.")
|
|
49
49
|
}).strict().optional().describe("Full details of the most recent generated version, if available."),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
url: z.string().describe("The canonical URL to access this chat."),
|
|
51
|
+
messages: z.array(z.object({
|
|
52
|
+
id: z.string().describe("A unique identifier for the message."),
|
|
53
|
+
object: z.enum([
|
|
54
54
|
"message"
|
|
55
55
|
]).describe("Fixed value identifying this object as a message."),
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
content: z.string().describe("The main text content of the message."),
|
|
57
|
+
experimentalContent: z.array(z.union([
|
|
58
58
|
z.tuple([
|
|
59
59
|
z.enum([
|
|
60
60
|
0
|
|
@@ -66,68 +66,68 @@ const chatDetailSchema = z.object({
|
|
|
66
66
|
1
|
|
67
67
|
]),
|
|
68
68
|
z.object({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
69
|
+
toJSONSchema: z.string(),
|
|
70
|
+
def: z.string(),
|
|
71
|
+
type: z.string(),
|
|
72
|
+
check: z.string(),
|
|
73
|
+
with: z.string(),
|
|
74
|
+
clone: z.string(),
|
|
75
|
+
brand: z.string(),
|
|
76
|
+
register: z.string(),
|
|
77
|
+
parse: z.string(),
|
|
78
|
+
safeParse: z.string(),
|
|
79
|
+
parseAsync: z.string(),
|
|
80
|
+
safeParseAsync: z.string(),
|
|
81
|
+
spa: z.string(),
|
|
82
|
+
encode: z.string(),
|
|
83
|
+
decode: z.string(),
|
|
84
|
+
encodeAsync: z.string(),
|
|
85
|
+
decodeAsync: z.string(),
|
|
86
|
+
safeEncode: z.string(),
|
|
87
|
+
safeDecode: z.string(),
|
|
88
|
+
safeEncodeAsync: z.string(),
|
|
89
|
+
safeDecodeAsync: z.string(),
|
|
90
|
+
refine: z.string(),
|
|
91
|
+
superRefine: z.string(),
|
|
92
|
+
overwrite: z.string(),
|
|
93
|
+
optional: z.string(),
|
|
94
|
+
exactOptional: z.string(),
|
|
95
|
+
nullable: z.string(),
|
|
96
|
+
nullish: z.string(),
|
|
97
|
+
nonoptional: z.string(),
|
|
98
|
+
array: z.string(),
|
|
99
|
+
or: z.string(),
|
|
100
|
+
and: z.string(),
|
|
101
|
+
transform: z.string(),
|
|
102
|
+
default: z.string(),
|
|
103
|
+
prefault: z.string(),
|
|
104
|
+
catch: z.string(),
|
|
105
|
+
pipe: z.string(),
|
|
106
|
+
readonly: z.string(),
|
|
107
|
+
describe: z.string(),
|
|
108
|
+
meta: z.string(),
|
|
109
|
+
isOptional: z.string(),
|
|
110
|
+
isNullable: z.string(),
|
|
111
|
+
apply: z.string(),
|
|
112
|
+
keyof: z.string(),
|
|
113
|
+
catchall: z.string(),
|
|
114
|
+
passthrough: z.string(),
|
|
115
|
+
loose: z.string(),
|
|
116
|
+
strict: z.string(),
|
|
117
|
+
strip: z.string(),
|
|
118
|
+
extend: z.string(),
|
|
119
|
+
safeExtend: z.string(),
|
|
120
|
+
merge: z.string(),
|
|
121
|
+
pick: z.string(),
|
|
122
|
+
omit: z.string(),
|
|
123
|
+
partial: z.string(),
|
|
124
|
+
required: z.string()
|
|
125
125
|
}).strict()
|
|
126
126
|
])
|
|
127
127
|
])).optional().describe("The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change."),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
createdAt: z.string().describe("The ISO timestamp representing when the message was created."),
|
|
129
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp representing when the message was last updated."),
|
|
130
|
+
type: z.enum([
|
|
131
131
|
"added-environment-variables",
|
|
132
132
|
"added-integration",
|
|
133
133
|
"answered-questions",
|
|
@@ -151,11 +151,11 @@ const chatDetailSchema = z.object({
|
|
|
151
151
|
"reverted-block",
|
|
152
152
|
"sync-git"
|
|
153
153
|
]).describe("Indicates the format or category of the message, such as plain text or code."),
|
|
154
|
-
|
|
154
|
+
role: z.enum([
|
|
155
155
|
"assistant",
|
|
156
156
|
"user"
|
|
157
157
|
]).describe("Specifies whether the message was sent by the user or the assistant."),
|
|
158
|
-
|
|
158
|
+
finishReason: z.enum([
|
|
159
159
|
"content-filter",
|
|
160
160
|
"error",
|
|
161
161
|
"length",
|
|
@@ -163,31 +163,31 @@ const chatDetailSchema = z.object({
|
|
|
163
163
|
"stop",
|
|
164
164
|
"tool-calls"
|
|
165
165
|
]).optional().describe("The reason why the message generation finished."),
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
apiUrl: z.string().describe("API URL to access this message via the API."),
|
|
167
|
+
authorId: z.null().describe("The ID of the user who sent the message."),
|
|
168
|
+
parentId: z.null().optional().describe("The ID of the parent message."),
|
|
169
|
+
attachments: z.array(z.object({
|
|
170
|
+
url: z.string().describe("The URL where the attachment file can be accessed."),
|
|
171
|
+
name: z.string().optional().describe("The original filename of the attachment."),
|
|
172
|
+
contentType: z.string().optional().describe("The MIME type of the attachment file (e.g., image/png, application/pdf)."),
|
|
173
|
+
size: z.number().describe("The size of the attachment file in bytes."),
|
|
174
|
+
content: z.string().optional().describe("The base64-encoded content of the attachment file, if available."),
|
|
175
|
+
type: z.enum([
|
|
176
176
|
"figma",
|
|
177
177
|
"screenshot",
|
|
178
178
|
"zip"
|
|
179
179
|
]).optional().describe("Optional v0-specific attachment type for enhanced processing.")
|
|
180
180
|
}).strict()).optional()
|
|
181
181
|
}).strict()).describe("All messages exchanged in the chat, including user and assistant entries."),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
files: z.array(z.object({
|
|
183
|
+
lang: z.string().describe("Programming language used in the file (e.g., JavaScript, Python)."),
|
|
184
|
+
meta: z.object({}).catchall(z.string()).describe("A key-value map of metadata associated with the file (e.g., path, type)."),
|
|
185
|
+
source: z.string().describe("The origin or identifier of the file source (e.g., path or upload label).")
|
|
186
186
|
}).strict()).optional().describe("Optional array of files associated with the chat context."),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
demo: z.string().optional().describe("Deprecated demo URL used for previewing the chat result."),
|
|
188
|
+
text: z.string().describe("The main user prompt or instruction that started the chat."),
|
|
189
|
+
modelConfiguration: z.object({
|
|
190
|
+
modelId: z.enum([
|
|
191
191
|
"v0-auto",
|
|
192
192
|
"v0-max",
|
|
193
193
|
"v0-max-fast",
|
|
@@ -196,136 +196,136 @@ const chatDetailSchema = z.object({
|
|
|
196
196
|
"v0-opus-4.7-fast",
|
|
197
197
|
"v0-pro"
|
|
198
198
|
]).optional().default("v0-pro").describe("Model to use for the generation. `v0-auto` is deprecated and falls back to `v0-pro`."),
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
imageGenerations: z.boolean().optional().default(false).describe("Enables image generations to generate up to 5 images per version."),
|
|
200
|
+
thinking: z.boolean().optional().default(false).describe("Enables thinking to generate a response in multiple steps.")
|
|
201
201
|
}).strict().optional().describe("The configuration used to generate responses in this chat."),
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
permissions: z.object({
|
|
203
|
+
write: z.boolean().describe("If true, the user has write access to the chat.")
|
|
204
204
|
}).strict(),
|
|
205
|
-
|
|
205
|
+
metadata: z.object({}).catchall(z.string()).describe("Arbitrary key-value data associated with this chat.")
|
|
206
206
|
}).strict().describe("Detailed representation of a chat, including its messages, files, versions, and model configuration.");
|
|
207
207
|
const chatSummarySchema = z.object({
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
id: z.string().describe("A unique identifier for the chat."),
|
|
209
|
+
object: z.enum([
|
|
210
210
|
"chat"
|
|
211
211
|
]).describe("Fixed value identifying this object as a chat."),
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
shareable: z.boolean().describe("Indicates whether the chat can be shared via public link."),
|
|
213
|
+
privacy: z.enum([
|
|
214
214
|
"private",
|
|
215
215
|
"public",
|
|
216
216
|
"team",
|
|
217
217
|
"team-edit",
|
|
218
218
|
"unlisted"
|
|
219
219
|
]).describe("Defines the visibility of the chat—private, team-only, or public."),
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
220
|
+
name: z.string().optional().describe("An optional name assigned to the chat by the user."),
|
|
221
|
+
title: z.string().optional().describe("Deprecated title field preserved for backward compatibility."),
|
|
222
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the chat was created."),
|
|
223
|
+
updatedAt: z.string().optional().describe("The ISO timestamp of the last update to the chat."),
|
|
224
|
+
favorite: z.boolean().describe("Indicates whether the chat is marked as a favorite."),
|
|
225
|
+
authorId: z.string().describe("The ID of the user who created the chat."),
|
|
226
|
+
projectId: z.string().optional().describe("Optional ID of the v0 project associated with this chat."),
|
|
227
|
+
vercelProjectId: z.string().optional().describe("Optional ID of the linked Vercel project, if connected."),
|
|
228
|
+
webUrl: z.string().describe("Web URL to view this chat in the browser."),
|
|
229
|
+
apiUrl: z.string().describe("API URL to access this chat via the API."),
|
|
230
|
+
latestVersion: z.object({
|
|
231
|
+
id: z.string().describe("A unique identifier for the version."),
|
|
232
|
+
object: z.enum([
|
|
233
233
|
"version"
|
|
234
234
|
]).describe("Fixed value identifying this object as a version."),
|
|
235
|
-
|
|
235
|
+
status: z.enum([
|
|
236
236
|
"completed",
|
|
237
237
|
"failed",
|
|
238
238
|
"pending"
|
|
239
239
|
]).describe("The current status of the version generation process."),
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
demoUrl: z.string().optional().describe("Optional URL for previewing the generated output."),
|
|
241
|
+
screenshotUrl: z.string().optional().describe("URL to retrieve a screenshot of this version."),
|
|
242
|
+
createdAt: z.iso.datetime().describe("The date and time when the version was created, in ISO 8601 format."),
|
|
243
|
+
updatedAt: z.iso.datetime().optional().describe("The date and time when the version was last updated, in ISO 8601 format.")
|
|
244
244
|
}).strict().optional().describe("The most recent generated version of the chat, if available.")
|
|
245
245
|
}).strict().describe("Summary of a chat, including metadata like privacy, author, latest version, and URLs.");
|
|
246
246
|
const deploymentDetailSchema = z.object({
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
id: z.string().describe("A unique identifier for the deployment."),
|
|
248
|
+
object: z.enum([
|
|
249
249
|
"deployment"
|
|
250
250
|
]).describe("Fixed value identifying this object as a deployment."),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
251
|
+
inspectorUrl: z.string().describe("URL to the deployment inspector."),
|
|
252
|
+
chatId: z.string().describe("The ID of the chat that this deployment is scoped to."),
|
|
253
|
+
projectId: z.string().optional().describe("The ID of the project that this deployment is scoped to."),
|
|
254
|
+
versionId: z.string().describe("The ID of the version that this deployment is scoped to."),
|
|
255
|
+
apiUrl: z.url().describe("The API endpoint URL for accessing this deployment programmatically."),
|
|
256
|
+
webUrl: z.url().describe("The web URL where the deployment can be viewed or managed.")
|
|
257
257
|
}).strict();
|
|
258
258
|
const deploymentSummarySchema = z.object({
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
id: z.string().describe("A unique identifier for the deployment."),
|
|
260
|
+
object: z.enum([
|
|
261
261
|
"deployment"
|
|
262
262
|
]).describe("Fixed value identifying this object as a deployment."),
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
263
|
+
inspectorUrl: z.string().describe("URL to the deployment inspector."),
|
|
264
|
+
chatId: z.string().describe("The ID of the chat that this deployment is scoped to."),
|
|
265
|
+
projectId: z.string().optional().describe("The ID of the project that this deployment is scoped to."),
|
|
266
|
+
versionId: z.string().describe("The ID of the version that this deployment is scoped to."),
|
|
267
|
+
apiUrl: z.url().describe("The API endpoint URL for accessing this deployment programmatically."),
|
|
268
|
+
webUrl: z.url().describe("The web URL where the deployment can be viewed or managed.")
|
|
269
269
|
}).strict();
|
|
270
270
|
const environmentVariableDetailSchemaSchema = z.object({
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
id: z.string().describe("A unique identifier for the environment variable."),
|
|
272
|
+
object: z.enum([
|
|
273
273
|
"environment_variable"
|
|
274
274
|
]).describe("The object type."),
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
275
|
+
key: z.string().describe("The name of the environment variable."),
|
|
276
|
+
value: z.string().describe("The value of the environment variable."),
|
|
277
|
+
decrypted: z.boolean().describe("Whether the value is decrypted or encrypted."),
|
|
278
|
+
createdAt: z.number().describe("The timestamp when the environment variable was created."),
|
|
279
|
+
updatedAt: z.number().optional().describe("The timestamp when the environment variable was last updated.")
|
|
280
280
|
}).strict().describe("Detailed information for an environment variable including its value.");
|
|
281
281
|
const environmentVariableSummarySchemaSchema = z.object({
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
id: z.string().describe("A unique identifier for the environment variable."),
|
|
283
|
+
object: z.enum([
|
|
284
284
|
"environment_variable"
|
|
285
285
|
]).describe("The object type."),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
key: z.string().describe("The name of the environment variable."),
|
|
287
|
+
value: z.string().describe("The value of the environment variable."),
|
|
288
|
+
decrypted: z.boolean().describe("Whether the value is decrypted or encrypted."),
|
|
289
|
+
createdAt: z.number().describe("The timestamp when the environment variable was created."),
|
|
290
|
+
updatedAt: z.number().optional().describe("The timestamp when the environment variable was last updated.")
|
|
291
291
|
}).strict().describe("Summary information for an environment variable.");
|
|
292
292
|
const environmentVariablesListSchemaSchema = z.object({
|
|
293
|
-
|
|
293
|
+
object: z.enum([
|
|
294
294
|
"list"
|
|
295
295
|
]).describe("Fixed value identifying this as a list response."),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
data: z.array(z.object({
|
|
297
|
+
id: z.string().describe("A unique identifier for the environment variable."),
|
|
298
|
+
object: z.enum([
|
|
299
299
|
"environment_variable"
|
|
300
300
|
]).describe("The object type."),
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
301
|
+
key: z.string().describe("The name of the environment variable."),
|
|
302
|
+
value: z.string().describe("The value of the environment variable."),
|
|
303
|
+
decrypted: z.boolean().describe("Whether the value is decrypted or encrypted."),
|
|
304
|
+
createdAt: z.number().describe("The timestamp when the environment variable was created."),
|
|
305
|
+
updatedAt: z.number().optional().describe("The timestamp when the environment variable was last updated.")
|
|
306
306
|
}).strict()).describe("Array of environment variable details.")
|
|
307
307
|
}).strict().describe("List response containing environment variables.");
|
|
308
308
|
const fileDetailSchema = z.object({
|
|
309
|
-
|
|
309
|
+
object: z.enum([
|
|
310
310
|
"file"
|
|
311
311
|
]).describe("Fixed value identifying this object as a file."),
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
name: z.string().describe("The name of the file, including its extension."),
|
|
313
|
+
content: z.string().describe("The full contents of the file as a raw string."),
|
|
314
|
+
locked: z.boolean().describe("Whether the file is locked to prevent AI from overwriting it during new version generation.")
|
|
315
315
|
}).strict().describe("Detailed representation of a file, including its content and lock status.");
|
|
316
316
|
const fileSummarySchema = z.object({
|
|
317
|
-
|
|
317
|
+
object: z.enum([
|
|
318
318
|
"file"
|
|
319
319
|
]).describe("Fixed value identifying this object as a file."),
|
|
320
|
-
|
|
320
|
+
name: z.string().describe("The name of the file, including its extension.")
|
|
321
321
|
}).strict().describe("Basic metadata about a file, such as its type and name.");
|
|
322
322
|
const hookDetailSchema = z.object({
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
id: z.string().describe("A unique identifier for the webhook."),
|
|
324
|
+
object: z.enum([
|
|
325
325
|
"hook"
|
|
326
326
|
]).describe("Fixed value identifying this object as a webhook."),
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
name: z.string().describe("A user-defined name to label the webhook."),
|
|
328
|
+
events: z.array(z.enum([
|
|
329
329
|
"chat.created",
|
|
330
330
|
"chat.deleted",
|
|
331
331
|
"chat.updated",
|
|
@@ -334,15 +334,15 @@ const hookDetailSchema = z.object({
|
|
|
334
334
|
"message.finished",
|
|
335
335
|
"message.updated"
|
|
336
336
|
])).describe("List of event types this webhook is subscribed to."),
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
chatId: z.string().optional().describe("Optional ID of the chat that this webhook is scoped to."),
|
|
338
|
+
url: z.string().describe("Target URL that receives event payloads for this webhook.")
|
|
339
339
|
}).strict().describe("Full configuration details for a webhook, including its scope and subscription.");
|
|
340
340
|
const hookEventDetailSchema = z.object({
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
id: z.string().describe("A unique identifier for the webhook event log entry."),
|
|
342
|
+
object: z.enum([
|
|
343
343
|
"hook_event"
|
|
344
344
|
]).describe("Fixed value identifying this object as a webhook event."),
|
|
345
|
-
|
|
345
|
+
event: z.enum([
|
|
346
346
|
"chat.created",
|
|
347
347
|
"chat.deleted",
|
|
348
348
|
"chat.updated",
|
|
@@ -351,111 +351,111 @@ const hookEventDetailSchema = z.object({
|
|
|
351
351
|
"message.finished",
|
|
352
352
|
"message.updated"
|
|
353
353
|
]).describe("The type of event that triggered the webhook."),
|
|
354
|
-
|
|
354
|
+
status: z.enum([
|
|
355
355
|
"error",
|
|
356
356
|
"pending",
|
|
357
357
|
"success"
|
|
358
358
|
]).optional().default("pending").describe("The delivery status of the webhook (e.g., delivered, failed)."),
|
|
359
|
-
|
|
359
|
+
createdAt: z.iso.datetime().describe("Timestamp of when the webhook event was triggered.")
|
|
360
360
|
}).strict().describe("Detailed record of a webhook event, including its type, status, and timestamp.");
|
|
361
361
|
const hookSummarySchema = z.object({
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
id: z.string().describe("A unique identifier for the webhook."),
|
|
363
|
+
object: z.enum([
|
|
364
364
|
"hook"
|
|
365
365
|
]).describe("Fixed value identifying this object as a webhook."),
|
|
366
|
-
|
|
366
|
+
name: z.string().describe("A user-defined name to label the webhook.")
|
|
367
367
|
}).strict().describe("Summary of a webhook, including its ID and display name.");
|
|
368
368
|
const integrationConnectionDetailSchemaSchema = z.object({
|
|
369
|
-
|
|
369
|
+
object: z.enum([
|
|
370
370
|
"integration_connection"
|
|
371
371
|
]).describe("The object type."),
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
372
|
+
id: z.string().describe("The unique ID of the integration connection (format: {projectId}_{integrationId})."),
|
|
373
|
+
connected: z.boolean().describe("Whether the integration is connected to the project."),
|
|
374
|
+
integration: z.object({
|
|
375
|
+
id: z.string().describe("The ID of the integration."),
|
|
376
|
+
object: z.enum([
|
|
377
377
|
"integration"
|
|
378
378
|
]).describe("The object type."),
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
slug: z.string().describe("The slug of the integration."),
|
|
380
|
+
name: z.string().describe("The name of the integration.")
|
|
381
381
|
}).strict().describe("Information about the connected integration."),
|
|
382
|
-
|
|
382
|
+
metadata: z.object({}).catchall(z.unknown()).optional().describe("Additional metadata about the integration connection.")
|
|
383
383
|
}).strict().describe("Detailed information about an integration connection to a project.");
|
|
384
384
|
const integrationConnectionListSchemaSchema = z.object({
|
|
385
|
-
|
|
385
|
+
object: z.enum([
|
|
386
386
|
"list"
|
|
387
387
|
]).describe("Fixed value identifying this as a list response."),
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
data: z.array(z.object({
|
|
389
|
+
object: z.enum([
|
|
390
390
|
"integration_connection"
|
|
391
391
|
]).describe("The object type."),
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
392
|
+
id: z.string().describe("The unique ID of the integration connection (format: {projectId}_{integrationId})."),
|
|
393
|
+
connected: z.boolean().describe("Whether the integration is connected to the project."),
|
|
394
|
+
integration: z.object({
|
|
395
|
+
id: z.string().describe("The ID of the integration."),
|
|
396
|
+
object: z.enum([
|
|
397
397
|
"integration"
|
|
398
398
|
]).describe("The object type."),
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
slug: z.string().describe("The slug of the integration."),
|
|
400
|
+
name: z.string().describe("The name of the integration.")
|
|
401
401
|
}).strict().describe("Information about the connected integration.")
|
|
402
402
|
}).strict()).describe("Array of integration connection summaries.")
|
|
403
403
|
}).strict().describe("List response containing integration connections.");
|
|
404
404
|
const integrationConnectionSummarySchemaSchema = z.object({
|
|
405
|
-
|
|
405
|
+
object: z.enum([
|
|
406
406
|
"integration_connection"
|
|
407
407
|
]).describe("The object type."),
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
408
|
+
id: z.string().describe("The unique ID of the integration connection (format: {projectId}_{integrationId})."),
|
|
409
|
+
connected: z.boolean().describe("Whether the integration is connected to the project."),
|
|
410
|
+
integration: z.object({
|
|
411
|
+
id: z.string().describe("The ID of the integration."),
|
|
412
|
+
object: z.enum([
|
|
413
413
|
"integration"
|
|
414
414
|
]).describe("The object type."),
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
slug: z.string().describe("The slug of the integration."),
|
|
416
|
+
name: z.string().describe("The name of the integration.")
|
|
417
417
|
}).strict().describe("Information about the connected integration.")
|
|
418
418
|
}).strict().describe("Summary information about an integration connection to a project.");
|
|
419
419
|
const integrationDetailSchemaSchema = z.object({
|
|
420
|
-
|
|
421
|
-
|
|
420
|
+
id: z.string().describe("The ID of the integration."),
|
|
421
|
+
object: z.enum([
|
|
422
422
|
"integration"
|
|
423
423
|
]).describe("The object type."),
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
424
|
+
slug: z.string().describe("The slug of the integration."),
|
|
425
|
+
name: z.string().describe("The name of the integration."),
|
|
426
|
+
description: z.string().describe("A short description of the integration."),
|
|
427
|
+
iconUrl: z.string().describe("URL to the integration icon.")
|
|
428
428
|
}).strict().describe("Detailed information about an integration.");
|
|
429
429
|
const integrationListSchemaSchema = z.object({
|
|
430
|
-
|
|
430
|
+
object: z.enum([
|
|
431
431
|
"list"
|
|
432
432
|
]).describe("Fixed value identifying this as a list response."),
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
433
|
+
data: z.array(z.object({
|
|
434
|
+
id: z.string().describe("The ID of the integration."),
|
|
435
|
+
object: z.enum([
|
|
436
436
|
"integration"
|
|
437
437
|
]).describe("The object type."),
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
438
|
+
slug: z.string().describe("The slug of the integration."),
|
|
439
|
+
name: z.string().describe("The name of the integration."),
|
|
440
|
+
description: z.string().describe("A short description of the integration."),
|
|
441
|
+
iconUrl: z.string().describe("URL to the integration icon.")
|
|
442
442
|
}).strict()).describe("Array of integration details.")
|
|
443
443
|
}).strict().describe("List of available integrations.");
|
|
444
444
|
const integrationSummarySchemaSchema = z.object({
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
id: z.string().describe("The ID of the integration."),
|
|
446
|
+
object: z.enum([
|
|
447
447
|
"integration"
|
|
448
448
|
]).describe("The object type."),
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
slug: z.string().describe("The slug of the integration."),
|
|
450
|
+
name: z.string().describe("The name of the integration.")
|
|
451
451
|
}).strict().describe("Basic information about an integration.");
|
|
452
452
|
const messageDetailSchema = z.object({
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
id: z.string().describe("A unique identifier for the message."),
|
|
454
|
+
object: z.enum([
|
|
455
455
|
"message"
|
|
456
456
|
]).describe("Fixed value identifying this object as a message."),
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
content: z.string().describe("The main text content of the message."),
|
|
458
|
+
experimentalContent: z.array(z.union([
|
|
459
459
|
z.tuple([
|
|
460
460
|
z.enum([
|
|
461
461
|
0
|
|
@@ -467,68 +467,68 @@ const messageDetailSchema = z.object({
|
|
|
467
467
|
1
|
|
468
468
|
]),
|
|
469
469
|
z.object({
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
470
|
+
toJSONSchema: z.string(),
|
|
471
|
+
def: z.string(),
|
|
472
|
+
type: z.string(),
|
|
473
|
+
check: z.string(),
|
|
474
|
+
with: z.string(),
|
|
475
|
+
clone: z.string(),
|
|
476
|
+
brand: z.string(),
|
|
477
|
+
register: z.string(),
|
|
478
|
+
parse: z.string(),
|
|
479
|
+
safeParse: z.string(),
|
|
480
|
+
parseAsync: z.string(),
|
|
481
|
+
safeParseAsync: z.string(),
|
|
482
|
+
spa: z.string(),
|
|
483
|
+
encode: z.string(),
|
|
484
|
+
decode: z.string(),
|
|
485
|
+
encodeAsync: z.string(),
|
|
486
|
+
decodeAsync: z.string(),
|
|
487
|
+
safeEncode: z.string(),
|
|
488
|
+
safeDecode: z.string(),
|
|
489
|
+
safeEncodeAsync: z.string(),
|
|
490
|
+
safeDecodeAsync: z.string(),
|
|
491
|
+
refine: z.string(),
|
|
492
|
+
superRefine: z.string(),
|
|
493
|
+
overwrite: z.string(),
|
|
494
|
+
optional: z.string(),
|
|
495
|
+
exactOptional: z.string(),
|
|
496
|
+
nullable: z.string(),
|
|
497
|
+
nullish: z.string(),
|
|
498
|
+
nonoptional: z.string(),
|
|
499
|
+
array: z.string(),
|
|
500
|
+
or: z.string(),
|
|
501
|
+
and: z.string(),
|
|
502
|
+
transform: z.string(),
|
|
503
|
+
default: z.string(),
|
|
504
|
+
prefault: z.string(),
|
|
505
|
+
catch: z.string(),
|
|
506
|
+
pipe: z.string(),
|
|
507
|
+
readonly: z.string(),
|
|
508
|
+
describe: z.string(),
|
|
509
|
+
meta: z.string(),
|
|
510
|
+
isOptional: z.string(),
|
|
511
|
+
isNullable: z.string(),
|
|
512
|
+
apply: z.string(),
|
|
513
|
+
keyof: z.string(),
|
|
514
|
+
catchall: z.string(),
|
|
515
|
+
passthrough: z.string(),
|
|
516
|
+
loose: z.string(),
|
|
517
|
+
strict: z.string(),
|
|
518
|
+
strip: z.string(),
|
|
519
|
+
extend: z.string(),
|
|
520
|
+
safeExtend: z.string(),
|
|
521
|
+
merge: z.string(),
|
|
522
|
+
pick: z.string(),
|
|
523
|
+
omit: z.string(),
|
|
524
|
+
partial: z.string(),
|
|
525
|
+
required: z.string()
|
|
526
526
|
}).strict()
|
|
527
527
|
])
|
|
528
528
|
])).optional().describe("The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change."),
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
529
|
+
createdAt: z.string().describe("The ISO timestamp representing when the message was created."),
|
|
530
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp representing when the message was last updated."),
|
|
531
|
+
type: z.enum([
|
|
532
532
|
"added-environment-variables",
|
|
533
533
|
"added-integration",
|
|
534
534
|
"answered-questions",
|
|
@@ -552,11 +552,11 @@ const messageDetailSchema = z.object({
|
|
|
552
552
|
"reverted-block",
|
|
553
553
|
"sync-git"
|
|
554
554
|
]).describe("Indicates the format or category of the message, such as plain text or code."),
|
|
555
|
-
|
|
555
|
+
role: z.enum([
|
|
556
556
|
"assistant",
|
|
557
557
|
"user"
|
|
558
558
|
]).describe("Specifies whether the message was sent by the user or the assistant."),
|
|
559
|
-
|
|
559
|
+
finishReason: z.enum([
|
|
560
560
|
"content-filter",
|
|
561
561
|
"error",
|
|
562
562
|
"length",
|
|
@@ -564,30 +564,30 @@ const messageDetailSchema = z.object({
|
|
|
564
564
|
"stop",
|
|
565
565
|
"tool-calls"
|
|
566
566
|
]).optional().describe("The reason why the message generation finished."),
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
567
|
+
apiUrl: z.string().describe("API URL to access this message via the API."),
|
|
568
|
+
authorId: z.null().describe("The ID of the user who sent the message."),
|
|
569
|
+
parentId: z.null().optional().describe("The ID of the parent message."),
|
|
570
|
+
attachments: z.array(z.object({
|
|
571
|
+
url: z.string().describe("The URL where the attachment file can be accessed."),
|
|
572
|
+
name: z.string().optional().describe("The original filename of the attachment."),
|
|
573
|
+
contentType: z.string().optional().describe("The MIME type of the attachment file (e.g., image/png, application/pdf)."),
|
|
574
|
+
size: z.number().describe("The size of the attachment file in bytes."),
|
|
575
|
+
content: z.string().optional().describe("The base64-encoded content of the attachment file, if available."),
|
|
576
|
+
type: z.enum([
|
|
577
577
|
"figma",
|
|
578
578
|
"screenshot",
|
|
579
579
|
"zip"
|
|
580
580
|
]).optional().describe("Optional v0-specific attachment type for enhanced processing.")
|
|
581
581
|
}).strict()).optional(),
|
|
582
|
-
|
|
582
|
+
chatId: z.string().describe("The ID of the chat to which this message belongs.")
|
|
583
583
|
}).strict().describe("Detailed message object extending MessageSummary with chat metadata.");
|
|
584
584
|
const messageSummarySchema = z.object({
|
|
585
|
-
|
|
586
|
-
|
|
585
|
+
id: z.string().describe("A unique identifier for the message."),
|
|
586
|
+
object: z.enum([
|
|
587
587
|
"message"
|
|
588
588
|
]).describe("Fixed value identifying this object as a message."),
|
|
589
|
-
|
|
590
|
-
|
|
589
|
+
content: z.string().describe("The main text content of the message."),
|
|
590
|
+
experimentalContent: z.array(z.union([
|
|
591
591
|
z.tuple([
|
|
592
592
|
z.enum([
|
|
593
593
|
0
|
|
@@ -599,68 +599,68 @@ const messageSummarySchema = z.object({
|
|
|
599
599
|
1
|
|
600
600
|
]),
|
|
601
601
|
z.object({
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
602
|
+
toJSONSchema: z.string(),
|
|
603
|
+
def: z.string(),
|
|
604
|
+
type: z.string(),
|
|
605
|
+
check: z.string(),
|
|
606
|
+
with: z.string(),
|
|
607
|
+
clone: z.string(),
|
|
608
|
+
brand: z.string(),
|
|
609
|
+
register: z.string(),
|
|
610
|
+
parse: z.string(),
|
|
611
|
+
safeParse: z.string(),
|
|
612
|
+
parseAsync: z.string(),
|
|
613
|
+
safeParseAsync: z.string(),
|
|
614
|
+
spa: z.string(),
|
|
615
|
+
encode: z.string(),
|
|
616
|
+
decode: z.string(),
|
|
617
|
+
encodeAsync: z.string(),
|
|
618
|
+
decodeAsync: z.string(),
|
|
619
|
+
safeEncode: z.string(),
|
|
620
|
+
safeDecode: z.string(),
|
|
621
|
+
safeEncodeAsync: z.string(),
|
|
622
|
+
safeDecodeAsync: z.string(),
|
|
623
|
+
refine: z.string(),
|
|
624
|
+
superRefine: z.string(),
|
|
625
|
+
overwrite: z.string(),
|
|
626
|
+
optional: z.string(),
|
|
627
|
+
exactOptional: z.string(),
|
|
628
|
+
nullable: z.string(),
|
|
629
|
+
nullish: z.string(),
|
|
630
|
+
nonoptional: z.string(),
|
|
631
|
+
array: z.string(),
|
|
632
|
+
or: z.string(),
|
|
633
|
+
and: z.string(),
|
|
634
|
+
transform: z.string(),
|
|
635
|
+
default: z.string(),
|
|
636
|
+
prefault: z.string(),
|
|
637
|
+
catch: z.string(),
|
|
638
|
+
pipe: z.string(),
|
|
639
|
+
readonly: z.string(),
|
|
640
|
+
describe: z.string(),
|
|
641
|
+
meta: z.string(),
|
|
642
|
+
isOptional: z.string(),
|
|
643
|
+
isNullable: z.string(),
|
|
644
|
+
apply: z.string(),
|
|
645
|
+
keyof: z.string(),
|
|
646
|
+
catchall: z.string(),
|
|
647
|
+
passthrough: z.string(),
|
|
648
|
+
loose: z.string(),
|
|
649
|
+
strict: z.string(),
|
|
650
|
+
strip: z.string(),
|
|
651
|
+
extend: z.string(),
|
|
652
|
+
safeExtend: z.string(),
|
|
653
|
+
merge: z.string(),
|
|
654
|
+
pick: z.string(),
|
|
655
|
+
omit: z.string(),
|
|
656
|
+
partial: z.string(),
|
|
657
|
+
required: z.string()
|
|
658
658
|
}).strict()
|
|
659
659
|
])
|
|
660
660
|
])).optional().describe("The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change."),
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
661
|
+
createdAt: z.string().describe("The ISO timestamp representing when the message was created."),
|
|
662
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp representing when the message was last updated."),
|
|
663
|
+
type: z.enum([
|
|
664
664
|
"added-environment-variables",
|
|
665
665
|
"added-integration",
|
|
666
666
|
"answered-questions",
|
|
@@ -684,11 +684,11 @@ const messageSummarySchema = z.object({
|
|
|
684
684
|
"reverted-block",
|
|
685
685
|
"sync-git"
|
|
686
686
|
]).describe("Indicates the format or category of the message, such as plain text or code."),
|
|
687
|
-
|
|
687
|
+
role: z.enum([
|
|
688
688
|
"assistant",
|
|
689
689
|
"user"
|
|
690
690
|
]).describe("Specifies whether the message was sent by the user or the assistant."),
|
|
691
|
-
|
|
691
|
+
finishReason: z.enum([
|
|
692
692
|
"content-filter",
|
|
693
693
|
"error",
|
|
694
694
|
"length",
|
|
@@ -696,16 +696,16 @@ const messageSummarySchema = z.object({
|
|
|
696
696
|
"stop",
|
|
697
697
|
"tool-calls"
|
|
698
698
|
]).optional().describe("The reason why the message generation finished."),
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
699
|
+
apiUrl: z.string().describe("API URL to access this message via the API."),
|
|
700
|
+
authorId: z.null().describe("The ID of the user who sent the message."),
|
|
701
|
+
parentId: z.null().optional().describe("The ID of the parent message."),
|
|
702
|
+
attachments: z.array(z.object({
|
|
703
|
+
url: z.string().describe("The URL where the attachment file can be accessed."),
|
|
704
|
+
name: z.string().optional().describe("The original filename of the attachment."),
|
|
705
|
+
contentType: z.string().optional().describe("The MIME type of the attachment file (e.g., image/png, application/pdf)."),
|
|
706
|
+
size: z.number().describe("The size of the attachment file in bytes."),
|
|
707
|
+
content: z.string().optional().describe("The base64-encoded content of the attachment file, if available."),
|
|
708
|
+
type: z.enum([
|
|
709
709
|
"figma",
|
|
710
710
|
"screenshot",
|
|
711
711
|
"zip"
|
|
@@ -713,16 +713,16 @@ const messageSummarySchema = z.object({
|
|
|
713
713
|
}).strict()).optional()
|
|
714
714
|
}).strict().describe("Summary of a single message within a chat, including role, content, type, timestamp, and API URL.");
|
|
715
715
|
const messageSummaryListSchema = z.object({
|
|
716
|
-
|
|
716
|
+
object: z.enum([
|
|
717
717
|
"list"
|
|
718
718
|
]).describe("Fixed value identifying this as a list response."),
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
719
|
+
data: z.array(z.object({
|
|
720
|
+
id: z.string().describe("A unique identifier for the message."),
|
|
721
|
+
object: z.enum([
|
|
722
722
|
"message"
|
|
723
723
|
]).describe("Fixed value identifying this object as a message."),
|
|
724
|
-
|
|
725
|
-
|
|
724
|
+
content: z.string().describe("The main text content of the message."),
|
|
725
|
+
experimentalContent: z.array(z.union([
|
|
726
726
|
z.tuple([
|
|
727
727
|
z.enum([
|
|
728
728
|
0
|
|
@@ -734,68 +734,68 @@ const messageSummaryListSchema = z.object({
|
|
|
734
734
|
1
|
|
735
735
|
]),
|
|
736
736
|
z.object({
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
737
|
+
toJSONSchema: z.string(),
|
|
738
|
+
def: z.string(),
|
|
739
|
+
type: z.string(),
|
|
740
|
+
check: z.string(),
|
|
741
|
+
with: z.string(),
|
|
742
|
+
clone: z.string(),
|
|
743
|
+
brand: z.string(),
|
|
744
|
+
register: z.string(),
|
|
745
|
+
parse: z.string(),
|
|
746
|
+
safeParse: z.string(),
|
|
747
|
+
parseAsync: z.string(),
|
|
748
|
+
safeParseAsync: z.string(),
|
|
749
|
+
spa: z.string(),
|
|
750
|
+
encode: z.string(),
|
|
751
|
+
decode: z.string(),
|
|
752
|
+
encodeAsync: z.string(),
|
|
753
|
+
decodeAsync: z.string(),
|
|
754
|
+
safeEncode: z.string(),
|
|
755
|
+
safeDecode: z.string(),
|
|
756
|
+
safeEncodeAsync: z.string(),
|
|
757
|
+
safeDecodeAsync: z.string(),
|
|
758
|
+
refine: z.string(),
|
|
759
|
+
superRefine: z.string(),
|
|
760
|
+
overwrite: z.string(),
|
|
761
|
+
optional: z.string(),
|
|
762
|
+
exactOptional: z.string(),
|
|
763
|
+
nullable: z.string(),
|
|
764
|
+
nullish: z.string(),
|
|
765
|
+
nonoptional: z.string(),
|
|
766
|
+
array: z.string(),
|
|
767
|
+
or: z.string(),
|
|
768
|
+
and: z.string(),
|
|
769
|
+
transform: z.string(),
|
|
770
|
+
default: z.string(),
|
|
771
|
+
prefault: z.string(),
|
|
772
|
+
catch: z.string(),
|
|
773
|
+
pipe: z.string(),
|
|
774
|
+
readonly: z.string(),
|
|
775
|
+
describe: z.string(),
|
|
776
|
+
meta: z.string(),
|
|
777
|
+
isOptional: z.string(),
|
|
778
|
+
isNullable: z.string(),
|
|
779
|
+
apply: z.string(),
|
|
780
|
+
keyof: z.string(),
|
|
781
|
+
catchall: z.string(),
|
|
782
|
+
passthrough: z.string(),
|
|
783
|
+
loose: z.string(),
|
|
784
|
+
strict: z.string(),
|
|
785
|
+
strip: z.string(),
|
|
786
|
+
extend: z.string(),
|
|
787
|
+
safeExtend: z.string(),
|
|
788
|
+
merge: z.string(),
|
|
789
|
+
pick: z.string(),
|
|
790
|
+
omit: z.string(),
|
|
791
|
+
partial: z.string(),
|
|
792
|
+
required: z.string()
|
|
793
793
|
}).strict()
|
|
794
794
|
])
|
|
795
795
|
])).optional().describe("The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change."),
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
796
|
+
createdAt: z.string().describe("The ISO timestamp representing when the message was created."),
|
|
797
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp representing when the message was last updated."),
|
|
798
|
+
type: z.enum([
|
|
799
799
|
"added-environment-variables",
|
|
800
800
|
"added-integration",
|
|
801
801
|
"answered-questions",
|
|
@@ -819,11 +819,11 @@ const messageSummaryListSchema = z.object({
|
|
|
819
819
|
"reverted-block",
|
|
820
820
|
"sync-git"
|
|
821
821
|
]).describe("Indicates the format or category of the message, such as plain text or code."),
|
|
822
|
-
|
|
822
|
+
role: z.enum([
|
|
823
823
|
"assistant",
|
|
824
824
|
"user"
|
|
825
825
|
]).describe("Specifies whether the message was sent by the user or the assistant."),
|
|
826
|
-
|
|
826
|
+
finishReason: z.enum([
|
|
827
827
|
"content-filter",
|
|
828
828
|
"error",
|
|
829
829
|
"length",
|
|
@@ -831,365 +831,365 @@ const messageSummaryListSchema = z.object({
|
|
|
831
831
|
"stop",
|
|
832
832
|
"tool-calls"
|
|
833
833
|
]).optional().describe("The reason why the message generation finished."),
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
834
|
+
apiUrl: z.string().describe("API URL to access this message via the API."),
|
|
835
|
+
authorId: z.null().describe("The ID of the user who sent the message."),
|
|
836
|
+
parentId: z.null().optional().describe("The ID of the parent message."),
|
|
837
|
+
attachments: z.array(z.object({
|
|
838
|
+
url: z.string().describe("The URL where the attachment file can be accessed."),
|
|
839
|
+
name: z.string().optional().describe("The original filename of the attachment."),
|
|
840
|
+
contentType: z.string().optional().describe("The MIME type of the attachment file (e.g., image/png, application/pdf)."),
|
|
841
|
+
size: z.number().describe("The size of the attachment file in bytes."),
|
|
842
|
+
content: z.string().optional().describe("The base64-encoded content of the attachment file, if available."),
|
|
843
|
+
type: z.enum([
|
|
844
844
|
"figma",
|
|
845
845
|
"screenshot",
|
|
846
846
|
"zip"
|
|
847
847
|
]).optional().describe("Optional v0-specific attachment type for enhanced processing.")
|
|
848
848
|
}).strict()).optional()
|
|
849
849
|
}).strict()).describe("Array of message summaries in this page of results."),
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
850
|
+
pagination: z.object({
|
|
851
|
+
hasMore: z.boolean().describe("Indicates if there are more results available beyond this page."),
|
|
852
|
+
nextCursor: z.string().optional().describe("Cursor for fetching the next page of results."),
|
|
853
|
+
nextUrl: z.string().optional().describe("API URL for retrieving the next page of results.")
|
|
854
854
|
}).strict().describe("Pagination metadata for navigating through multiple pages of results.")
|
|
855
855
|
}).strict().describe("List response containing multiple message summaries with cursor-based pagination.");
|
|
856
856
|
const notificationPreferenceSchemaSchema = z.object({
|
|
857
|
-
|
|
858
|
-
|
|
857
|
+
liveActivity: z.boolean().describe("Whether the user wants to receive live activities."),
|
|
858
|
+
pushNotifications: z.boolean().describe("Whether the user wants to receive push notifications.")
|
|
859
859
|
}).strict().describe("User preference for notification delivery methods.");
|
|
860
860
|
const productDetailSchemaSchema = z.object({
|
|
861
|
-
|
|
861
|
+
object: z.enum([
|
|
862
862
|
"product"
|
|
863
863
|
]).describe("The object type."),
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
864
|
+
id: z.string().describe("The unique ID of the product."),
|
|
865
|
+
slug: z.string().describe("The URL-friendly slug of the product."),
|
|
866
|
+
name: z.string().describe("The name of the product."),
|
|
867
|
+
description: z.string().describe("A short description of the product."),
|
|
868
|
+
iconUrl: z.string().describe("URL to the product icon."),
|
|
869
|
+
v0Availability: z.enum([
|
|
870
870
|
"in-review",
|
|
871
871
|
"published"
|
|
872
872
|
]).optional().describe("The product's availability in v0. 'in-review' products only appear for teams with the review view and should be rendered as such."),
|
|
873
|
-
|
|
873
|
+
iconBackgroundColor: z.string().optional().describe("Background color for the product icon.")
|
|
874
874
|
}).strict().describe("Detailed information about a marketplace or store product.");
|
|
875
875
|
const productListSchemaSchema = z.object({
|
|
876
|
-
|
|
876
|
+
object: z.enum([
|
|
877
877
|
"list"
|
|
878
878
|
]).describe("Fixed value identifying this as a list response."),
|
|
879
|
-
|
|
880
|
-
|
|
879
|
+
data: z.array(z.object({
|
|
880
|
+
object: z.enum([
|
|
881
881
|
"product"
|
|
882
882
|
]).describe("The object type."),
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
883
|
+
id: z.string().describe("The unique ID of the product."),
|
|
884
|
+
slug: z.string().describe("The URL-friendly slug of the product."),
|
|
885
|
+
name: z.string().describe("The name of the product."),
|
|
886
|
+
description: z.string().describe("A short description of the product."),
|
|
887
|
+
iconUrl: z.string().describe("URL to the product icon."),
|
|
888
|
+
v0Availability: z.enum([
|
|
889
889
|
"in-review",
|
|
890
890
|
"published"
|
|
891
891
|
]).optional().describe("The product's availability in v0. 'in-review' products only appear for teams with the review view and should be rendered as such.")
|
|
892
892
|
}).strict()).describe("Array of product summaries.")
|
|
893
893
|
}).strict().describe("List of available marketplace and store products.");
|
|
894
894
|
const productSummarySchemaSchema = z.object({
|
|
895
|
-
|
|
895
|
+
object: z.enum([
|
|
896
896
|
"product"
|
|
897
897
|
]).describe("The object type."),
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
898
|
+
id: z.string().describe("The unique ID of the product."),
|
|
899
|
+
slug: z.string().describe("The URL-friendly slug of the product."),
|
|
900
|
+
name: z.string().describe("The name of the product."),
|
|
901
|
+
description: z.string().describe("A short description of the product."),
|
|
902
|
+
iconUrl: z.string().describe("URL to the product icon."),
|
|
903
|
+
v0Availability: z.enum([
|
|
904
904
|
"in-review",
|
|
905
905
|
"published"
|
|
906
906
|
]).optional().describe("The product's availability in v0. 'in-review' products only appear for teams with the review view and should be rendered as such.")
|
|
907
907
|
}).strict().describe("Summary information about a marketplace or store product.");
|
|
908
908
|
const projectDetailSchema = z.object({
|
|
909
|
-
|
|
910
|
-
|
|
909
|
+
id: z.string().describe("A unique identifier for the project."),
|
|
910
|
+
object: z.enum([
|
|
911
911
|
"project"
|
|
912
912
|
]).describe("Fixed value identifying this object as a project."),
|
|
913
|
-
|
|
914
|
-
|
|
913
|
+
name: z.string().describe("The name of the project as defined by the user."),
|
|
914
|
+
privacy: z.enum([
|
|
915
915
|
"private",
|
|
916
916
|
"team"
|
|
917
917
|
]).describe("The privacy setting for the project - either private or team."),
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
918
|
+
vercelProjectId: z.string().optional().describe("Optional ID of the linked Vercel project, if connected."),
|
|
919
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the project was created."),
|
|
920
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp of the most recent update, if available."),
|
|
921
|
+
apiUrl: z.url().describe("The API endpoint URL for accessing this project programmatically."),
|
|
922
|
+
webUrl: z.url().describe("The web URL where the project can be viewed or managed."),
|
|
923
|
+
description: z.string().optional().describe("The description of the project."),
|
|
924
|
+
instructions: z.string().optional().describe("The instructions for the project."),
|
|
925
|
+
chats: z.array(z.object({
|
|
926
|
+
id: z.string().describe("A unique identifier for the chat."),
|
|
927
|
+
object: z.enum([
|
|
928
928
|
"chat"
|
|
929
929
|
]).describe("Fixed value identifying this object as a chat."),
|
|
930
|
-
|
|
931
|
-
|
|
930
|
+
shareable: z.boolean().describe("Indicates whether the chat can be shared via public link."),
|
|
931
|
+
privacy: z.enum([
|
|
932
932
|
"private",
|
|
933
933
|
"public",
|
|
934
934
|
"team",
|
|
935
935
|
"team-edit",
|
|
936
936
|
"unlisted"
|
|
937
937
|
]).describe("Defines the visibility of the chat—private, team-only, or public."),
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
938
|
+
name: z.string().optional().describe("An optional name assigned to the chat by the user."),
|
|
939
|
+
title: z.string().optional().describe("Deprecated title field preserved for backward compatibility."),
|
|
940
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the chat was created."),
|
|
941
|
+
updatedAt: z.string().optional().describe("The ISO timestamp of the last update to the chat."),
|
|
942
|
+
favorite: z.boolean().describe("Indicates whether the chat is marked as a favorite."),
|
|
943
|
+
authorId: z.string().describe("The ID of the user who created the chat."),
|
|
944
|
+
projectId: z.string().optional().describe("Optional ID of the v0 project associated with this chat."),
|
|
945
|
+
vercelProjectId: z.string().optional().describe("Optional ID of the linked Vercel project, if connected."),
|
|
946
|
+
webUrl: z.string().describe("Web URL to view this chat in the browser."),
|
|
947
|
+
apiUrl: z.string().describe("API URL to access this chat via the API."),
|
|
948
|
+
latestVersion: z.object({
|
|
949
|
+
id: z.string().describe("A unique identifier for the version."),
|
|
950
|
+
object: z.enum([
|
|
951
951
|
"version"
|
|
952
952
|
]).describe("Fixed value identifying this object as a version."),
|
|
953
|
-
|
|
953
|
+
status: z.enum([
|
|
954
954
|
"completed",
|
|
955
955
|
"failed",
|
|
956
956
|
"pending"
|
|
957
957
|
]).describe("The current status of the version generation process."),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
958
|
+
demoUrl: z.string().optional().describe("Optional URL for previewing the generated output."),
|
|
959
|
+
screenshotUrl: z.string().optional().describe("URL to retrieve a screenshot of this version."),
|
|
960
|
+
createdAt: z.iso.datetime().describe("The date and time when the version was created, in ISO 8601 format."),
|
|
961
|
+
updatedAt: z.iso.datetime().optional().describe("The date and time when the version was last updated, in ISO 8601 format.")
|
|
962
962
|
}).strict().optional().describe("The most recent generated version of the chat, if available.")
|
|
963
963
|
}).strict()).describe("List of all chats that are associated with this project.")
|
|
964
964
|
}).strict().describe("Full representation of a project, including its associated chats.");
|
|
965
965
|
const projectSummarySchema = z.object({
|
|
966
|
-
|
|
967
|
-
|
|
966
|
+
id: z.string().describe("A unique identifier for the project."),
|
|
967
|
+
object: z.enum([
|
|
968
968
|
"project"
|
|
969
969
|
]).describe("Fixed value identifying this object as a project."),
|
|
970
|
-
|
|
971
|
-
|
|
970
|
+
name: z.string().describe("The name of the project as defined by the user."),
|
|
971
|
+
privacy: z.enum([
|
|
972
972
|
"private",
|
|
973
973
|
"team"
|
|
974
974
|
]).describe("The privacy setting for the project - either private or team."),
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
975
|
+
vercelProjectId: z.string().optional().describe("Optional ID of the linked Vercel project, if connected."),
|
|
976
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the project was created."),
|
|
977
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp of the most recent update, if available."),
|
|
978
|
+
apiUrl: z.url().describe("The API endpoint URL for accessing this project programmatically."),
|
|
979
|
+
webUrl: z.url().describe("The web URL where the project can be viewed or managed.")
|
|
980
980
|
}).strict().describe("Summary of a project, including metadata, timestamps, and optional Vercel linkage.");
|
|
981
981
|
const scopeSummarySchema = z.object({
|
|
982
|
-
|
|
983
|
-
|
|
982
|
+
id: z.string().describe("A unique identifier for the scope (e.g., user or team workspace)."),
|
|
983
|
+
object: z.enum([
|
|
984
984
|
"scope"
|
|
985
985
|
]).describe("Fixed value identifying this object as a scope."),
|
|
986
|
-
|
|
986
|
+
name: z.string().optional().describe("An optional human-readable name for the scope.")
|
|
987
987
|
}).strict().describe("Basic information about a workspace or identity context for projects and chats.");
|
|
988
988
|
const searchResultItemSchema = z.object({
|
|
989
|
-
|
|
990
|
-
|
|
989
|
+
id: z.string().describe("The unique ID of the item returned in the search result."),
|
|
990
|
+
object: z.enum([
|
|
991
991
|
"chat",
|
|
992
992
|
"project"
|
|
993
993
|
]).describe("Type of item returned, either 'chat' or 'project'."),
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
994
|
+
name: z.string().describe("The display name of the item."),
|
|
995
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the item was created."),
|
|
996
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp of the last update to the item."),
|
|
997
|
+
apiUrl: z.string().describe("API endpoint for accessing the item programmatically."),
|
|
998
|
+
webUrl: z.string().describe("Web URL for viewing the item in the interface.")
|
|
999
999
|
}).strict().describe("Generic result returned from a search query, representing either a chat or a project.");
|
|
1000
1000
|
const userDetailSchemaSchema = z.object({
|
|
1001
|
-
|
|
1002
|
-
|
|
1001
|
+
id: z.string().describe("A unique identifier for the user."),
|
|
1002
|
+
object: z.enum([
|
|
1003
1003
|
"user"
|
|
1004
1004
|
]).describe("Fixed value identifying this object as a user."),
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1005
|
+
name: z.string().optional().describe("Optional full name of the user."),
|
|
1006
|
+
email: z.string().describe("The user's email address."),
|
|
1007
|
+
avatar: z.string().describe("URL to the user's avatar image."),
|
|
1008
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the user was created."),
|
|
1009
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp of the last update to the user.")
|
|
1010
1010
|
}).strict();
|
|
1011
1011
|
const userPreferencesPostResponseSchemaSchema = z.object({
|
|
1012
|
-
|
|
1012
|
+
object: z.enum([
|
|
1013
1013
|
"user_preferences"
|
|
1014
1014
|
]).describe("Object type identifier."),
|
|
1015
|
-
|
|
1015
|
+
preferences: z.union([
|
|
1016
1016
|
z.object({
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1017
|
+
notifications: z.object({
|
|
1018
|
+
liveActivity: z.boolean().describe("Whether the user wants to receive live activities."),
|
|
1019
|
+
pushNotifications: z.boolean().describe("Whether the user wants to receive push notifications.")
|
|
1020
1020
|
}).strict().describe("The user's preferred method for receiving notifications.")
|
|
1021
1021
|
}).strict(),
|
|
1022
1022
|
z.null()
|
|
1023
1023
|
]).describe("The updated preferences if successful, or null if failed.")
|
|
1024
1024
|
}).strict().describe("Response schema for updating user preferences.");
|
|
1025
1025
|
const userPreferencesResponseSchemaSchema = z.object({
|
|
1026
|
-
|
|
1026
|
+
object: z.enum([
|
|
1027
1027
|
"user_preferences"
|
|
1028
1028
|
]).describe("Object type identifier."),
|
|
1029
|
-
|
|
1029
|
+
preferences: z.union([
|
|
1030
1030
|
z.object({
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1031
|
+
notifications: z.object({
|
|
1032
|
+
liveActivity: z.boolean().describe("Whether the user wants to receive live activities."),
|
|
1033
|
+
pushNotifications: z.boolean().describe("Whether the user wants to receive push notifications.")
|
|
1034
1034
|
}).strict().describe("The user's preferred method for receiving notifications.")
|
|
1035
1035
|
}).strict(),
|
|
1036
1036
|
z.null()
|
|
1037
1037
|
]).describe("The user's current preferences, or null if errored.")
|
|
1038
1038
|
}).strict().describe("Response schema for retrieving user preferences.");
|
|
1039
1039
|
const userPreferencesSchemaSchema = z.object({
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1040
|
+
notifications: z.object({
|
|
1041
|
+
liveActivity: z.boolean().describe("Whether the user wants to receive live activities."),
|
|
1042
|
+
pushNotifications: z.boolean().describe("Whether the user wants to receive push notifications.")
|
|
1043
1043
|
}).strict().describe("The user's preferred method for receiving notifications.")
|
|
1044
1044
|
}).strict().describe("User preferences configuration including notification settings.");
|
|
1045
1045
|
const userSummarySchemaSchema = z.object({
|
|
1046
|
-
|
|
1047
|
-
|
|
1046
|
+
id: z.string().describe("A unique identifier for the user."),
|
|
1047
|
+
object: z.enum([
|
|
1048
1048
|
"user"
|
|
1049
1049
|
]).describe("Fixed value identifying this object as a user."),
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1050
|
+
name: z.string().optional().describe("Optional full name of the user."),
|
|
1051
|
+
email: z.string().describe("The user's email address."),
|
|
1052
|
+
avatar: z.string().describe("URL to the user's avatar image."),
|
|
1053
|
+
createdAt: z.iso.datetime().describe("The ISO timestamp representing when the user was created."),
|
|
1054
|
+
updatedAt: z.iso.datetime().optional().describe("The ISO timestamp of the last update to the user.")
|
|
1055
1055
|
}).strict().describe("Details of the authenticated user, including profile and contact information.");
|
|
1056
1056
|
const vercelProjectDetailSchema = z.object({
|
|
1057
|
-
|
|
1058
|
-
|
|
1057
|
+
id: z.string().describe("A unique identifier for the linked Vercel project."),
|
|
1058
|
+
object: z.enum([
|
|
1059
1059
|
"vercel_project"
|
|
1060
1060
|
]).describe("Fixed value identifying this object as a Vercel project."),
|
|
1061
|
-
|
|
1061
|
+
name: z.string().describe("The name of the Vercel project.")
|
|
1062
1062
|
}).strict();
|
|
1063
1063
|
const vercelProjectSummarySchema = z.object({
|
|
1064
|
-
|
|
1065
|
-
|
|
1064
|
+
id: z.string().describe("A unique identifier for the linked Vercel project."),
|
|
1065
|
+
object: z.enum([
|
|
1066
1066
|
"vercel_project"
|
|
1067
1067
|
]).describe("Fixed value identifying this object as a Vercel project."),
|
|
1068
|
-
|
|
1068
|
+
name: z.string().describe("The name of the Vercel project.")
|
|
1069
1069
|
}).strict().describe("Basic metadata about a Vercel project connected to a v0 project.");
|
|
1070
1070
|
const versionDetailSchema = z.object({
|
|
1071
|
-
|
|
1072
|
-
|
|
1071
|
+
id: z.string().describe("A unique identifier for the version."),
|
|
1072
|
+
object: z.enum([
|
|
1073
1073
|
"version"
|
|
1074
1074
|
]).describe("Fixed value identifying this object as a version."),
|
|
1075
|
-
|
|
1075
|
+
status: z.enum([
|
|
1076
1076
|
"completed",
|
|
1077
1077
|
"failed",
|
|
1078
1078
|
"pending"
|
|
1079
1079
|
]).describe("The current status of the version generation process."),
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1080
|
+
demoUrl: z.string().optional().describe("Optional URL for previewing the generated output."),
|
|
1081
|
+
screenshotUrl: z.string().optional().describe("URL to retrieve a screenshot of this version."),
|
|
1082
|
+
createdAt: z.iso.datetime().describe("The date and time when the version was created, in ISO 8601 format."),
|
|
1083
|
+
updatedAt: z.iso.datetime().optional().describe("The date and time when the version was last updated, in ISO 8601 format."),
|
|
1084
|
+
files: z.array(z.object({
|
|
1085
|
+
object: z.enum([
|
|
1086
1086
|
"file"
|
|
1087
1087
|
]).describe("Fixed value identifying this object as a file."),
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1088
|
+
name: z.string().describe("The name of the file, including its extension."),
|
|
1089
|
+
content: z.string().describe("The full contents of the file as a raw string."),
|
|
1090
|
+
locked: z.boolean().describe("Whether the file is locked to prevent AI from overwriting it during new version generation.")
|
|
1091
1091
|
}).strict()).describe("A list of files that were generated or included in this version.")
|
|
1092
1092
|
}).strict().describe("Detailed version data including file contents.");
|
|
1093
1093
|
const versionSummarySchema = z.object({
|
|
1094
|
-
|
|
1095
|
-
|
|
1094
|
+
id: z.string().describe("A unique identifier for the version."),
|
|
1095
|
+
object: z.enum([
|
|
1096
1096
|
"version"
|
|
1097
1097
|
]).describe("Fixed value identifying this object as a version."),
|
|
1098
|
-
|
|
1098
|
+
status: z.enum([
|
|
1099
1099
|
"completed",
|
|
1100
1100
|
"failed",
|
|
1101
1101
|
"pending"
|
|
1102
1102
|
]).describe("The current status of the version generation process."),
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1103
|
+
demoUrl: z.string().optional().describe("Optional URL for previewing the generated output."),
|
|
1104
|
+
screenshotUrl: z.string().optional().describe("URL to retrieve a screenshot of this version."),
|
|
1105
|
+
createdAt: z.iso.datetime().describe("The date and time when the version was created, in ISO 8601 format."),
|
|
1106
|
+
updatedAt: z.iso.datetime().optional().describe("The date and time when the version was last updated, in ISO 8601 format.")
|
|
1107
1107
|
}).strict().describe("Summary of a generated version of a chat, including its status and optional demo link.");
|
|
1108
1108
|
const versionSummaryListSchema = z.object({
|
|
1109
|
-
|
|
1109
|
+
object: z.enum([
|
|
1110
1110
|
"list"
|
|
1111
1111
|
]).describe("Fixed value identifying this as a list response."),
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1112
|
+
data: z.array(z.object({
|
|
1113
|
+
id: z.string().describe("A unique identifier for the version."),
|
|
1114
|
+
object: z.enum([
|
|
1115
1115
|
"version"
|
|
1116
1116
|
]).describe("Fixed value identifying this object as a version."),
|
|
1117
|
-
|
|
1117
|
+
status: z.enum([
|
|
1118
1118
|
"completed",
|
|
1119
1119
|
"failed",
|
|
1120
1120
|
"pending"
|
|
1121
1121
|
]).describe("The current status of the version generation process."),
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1122
|
+
demoUrl: z.string().optional().describe("Optional URL for previewing the generated output."),
|
|
1123
|
+
screenshotUrl: z.string().optional().describe("URL to retrieve a screenshot of this version."),
|
|
1124
|
+
createdAt: z.iso.datetime().describe("The date and time when the version was created, in ISO 8601 format."),
|
|
1125
|
+
updatedAt: z.iso.datetime().optional().describe("The date and time when the version was last updated, in ISO 8601 format.")
|
|
1126
1126
|
}).strict()).describe("Array of version summaries in this page of results."),
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1127
|
+
pagination: z.object({
|
|
1128
|
+
hasMore: z.boolean().describe("Indicates if there are more results available beyond this page."),
|
|
1129
|
+
nextCursor: z.string().optional().describe("Cursor for fetching the next page of results."),
|
|
1130
|
+
nextUrl: z.string().optional().describe("API URL for retrieving the next page of results.")
|
|
1131
1131
|
}).strict().describe("Pagination metadata for navigating through multiple pages of results.")
|
|
1132
1132
|
}).strict().describe("List response containing multiple version summaries with cursor-based pagination.");
|
|
1133
1133
|
const unauthorizedErrorSchema = z.object({
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1134
|
+
error: z.object({
|
|
1135
|
+
message: z.string(),
|
|
1136
|
+
type: z.enum([
|
|
1137
1137
|
"unauthorized_error"
|
|
1138
1138
|
])
|
|
1139
1139
|
}).strict()
|
|
1140
1140
|
}).strict();
|
|
1141
1141
|
const forbiddenErrorSchema = z.object({
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1142
|
+
error: z.object({
|
|
1143
|
+
message: z.string(),
|
|
1144
|
+
type: z.enum([
|
|
1145
1145
|
"forbidden_error"
|
|
1146
1146
|
])
|
|
1147
1147
|
}).strict()
|
|
1148
1148
|
}).strict();
|
|
1149
1149
|
const notFoundErrorSchema = z.object({
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1150
|
+
error: z.object({
|
|
1151
|
+
message: z.string(),
|
|
1152
|
+
type: z.enum([
|
|
1153
1153
|
"not_found_error"
|
|
1154
1154
|
])
|
|
1155
1155
|
}).strict()
|
|
1156
1156
|
}).strict();
|
|
1157
1157
|
const conflictErrorSchema = z.object({
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1158
|
+
error: z.object({
|
|
1159
|
+
message: z.string(),
|
|
1160
|
+
type: z.enum([
|
|
1161
1161
|
"conflict_error"
|
|
1162
1162
|
])
|
|
1163
1163
|
}).strict()
|
|
1164
1164
|
}).strict();
|
|
1165
1165
|
const payloadTooLargeErrorSchema = z.object({
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1166
|
+
error: z.object({
|
|
1167
|
+
message: z.string(),
|
|
1168
|
+
type: z.enum([
|
|
1169
1169
|
"payload_too_large_error"
|
|
1170
1170
|
])
|
|
1171
1171
|
}).strict()
|
|
1172
1172
|
}).strict();
|
|
1173
1173
|
const unprocessableEntityErrorSchema = z.object({
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1174
|
+
error: z.object({
|
|
1175
|
+
message: z.string(),
|
|
1176
|
+
type: z.enum([
|
|
1177
1177
|
"unprocessable_entity_error"
|
|
1178
1178
|
])
|
|
1179
1179
|
}).strict()
|
|
1180
1180
|
}).strict();
|
|
1181
1181
|
const tooManyRequestsErrorSchema = z.object({
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1182
|
+
error: z.object({
|
|
1183
|
+
message: z.string(),
|
|
1184
|
+
type: z.enum([
|
|
1185
1185
|
"too_many_requests_error"
|
|
1186
1186
|
])
|
|
1187
1187
|
}).strict()
|
|
1188
1188
|
}).strict();
|
|
1189
1189
|
const internalServerErrorSchema = z.object({
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1190
|
+
error: z.object({
|
|
1191
|
+
message: z.string(),
|
|
1192
|
+
type: z.enum([
|
|
1193
1193
|
"internal_server_error"
|
|
1194
1194
|
])
|
|
1195
1195
|
}).strict()
|
|
@@ -1219,7 +1219,7 @@ const chatsFindQueryOffsetSchema = z.number().optional().default(0).describe("De
|
|
|
1219
1219
|
const chatsFindQueryIsFavoriteSchema = z.enum([
|
|
1220
1220
|
"true",
|
|
1221
1221
|
"false"
|
|
1222
|
-
]).optional().describe(
|
|
1222
|
+
]).optional().describe('Filters chats by their "favorite" status. Accepts `"true"` or `"false"` (as strings, not booleans).\n\n- `"true"`: returns only chats marked as favorites.\n- `"false"`: returns only non-favorite chats.');
|
|
1223
1223
|
const chatsFindQueryVercelProjectIdSchema = z.string().optional().describe("Filters chats by the linked Vercel project ID. Only returns chats associated with the specified Vercel project.");
|
|
1224
1224
|
const chatsFindQueryBranchSchema = z.string().optional().describe("Filters chats by the Git branch name. Only returns chats that have an active Git connection with the specified branch as the head.");
|
|
1225
1225
|
const chatsFindStatus200Schema = z.unknown();
|
|
@@ -1530,7 +1530,7 @@ const chatsDownloadVersionPathVersionIdSchema = z.string().describe("The unique
|
|
|
1530
1530
|
const chatsDownloadVersionQueryFormatSchema = z.enum([
|
|
1531
1531
|
"zip",
|
|
1532
1532
|
"tarball"
|
|
1533
|
-
]).optional().default("zip").describe(
|
|
1533
|
+
]).optional().default("zip").describe('The archive format for the download. Choose "zip" for broad compatibility or "tarball" for Unix/Linux systems.');
|
|
1534
1534
|
const chatsDownloadVersionQueryIncludeDefaultFilesSchema = z.enum([
|
|
1535
1535
|
"true",
|
|
1536
1536
|
"false"
|
|
@@ -1685,7 +1685,7 @@ const deploymentsCreateResponseSchema = z.union([
|
|
|
1685
1685
|
deploymentsCreateStatus429Schema,
|
|
1686
1686
|
deploymentsCreateStatus500Schema
|
|
1687
1687
|
]);
|
|
1688
|
-
const deploymentsGetByIdPathDeploymentIdSchema = z.string().describe(
|
|
1688
|
+
const deploymentsGetByIdPathDeploymentIdSchema = z.string().describe('Path parameter "deploymentId"');
|
|
1689
1689
|
const deploymentsGetByIdStatus200Schema = z.unknown();
|
|
1690
1690
|
const deploymentsGetByIdStatus401Schema = z.unknown();
|
|
1691
1691
|
const deploymentsGetByIdStatus403Schema = z.unknown();
|
|
@@ -1706,7 +1706,7 @@ const deploymentsGetByIdResponseSchema = z.union([
|
|
|
1706
1706
|
deploymentsGetByIdStatus429Schema,
|
|
1707
1707
|
deploymentsGetByIdStatus500Schema
|
|
1708
1708
|
]);
|
|
1709
|
-
const deploymentsDeletePathDeploymentIdSchema = z.string().describe(
|
|
1709
|
+
const deploymentsDeletePathDeploymentIdSchema = z.string().describe('Path parameter "deploymentId"');
|
|
1710
1710
|
const deploymentsDeleteStatus200Schema = z.unknown();
|
|
1711
1711
|
const deploymentsDeleteStatus401Schema = z.unknown();
|
|
1712
1712
|
const deploymentsDeleteStatus403Schema = z.unknown();
|
|
@@ -2287,11 +2287,11 @@ const chatsRestoreResponseSchema = z.union([
|
|
|
2287
2287
|
chatsRestoreStatus429Schema,
|
|
2288
2288
|
chatsRestoreStatus500Schema
|
|
2289
2289
|
]);
|
|
2290
|
-
const reportsGetUsageQueryStartDateSchema = z.iso.datetime().optional().describe(
|
|
2291
|
-
const reportsGetUsageQueryEndDateSchema = z.iso.datetime().optional().describe(
|
|
2292
|
-
const reportsGetUsageQueryChatIdSchema = z.string().optional().describe(
|
|
2293
|
-
const reportsGetUsageQueryMessageIdSchema = z.string().optional().describe(
|
|
2294
|
-
const reportsGetUsageQueryUserIdSchema = z.string().optional().describe(
|
|
2290
|
+
const reportsGetUsageQueryStartDateSchema = z.iso.datetime().optional().describe('Query parameter "startDate"');
|
|
2291
|
+
const reportsGetUsageQueryEndDateSchema = z.iso.datetime().optional().describe('Query parameter "endDate"');
|
|
2292
|
+
const reportsGetUsageQueryChatIdSchema = z.string().optional().describe('Query parameter "chatId"');
|
|
2293
|
+
const reportsGetUsageQueryMessageIdSchema = z.string().optional().describe('Query parameter "messageId"');
|
|
2294
|
+
const reportsGetUsageQueryUserIdSchema = z.string().optional().describe('Query parameter "userId"');
|
|
2295
2295
|
const reportsGetUsageQueryLimitSchema = z.number().min(1).max(150).optional().default(20).describe("Bounds the raw billing transactions scanned per ledger group and page. A page can contain more events than this value (large teams are scanned in parallel ledger groups), and a filtered page (chatId, userId, or messageId) can contain fewer or zero events while more data remains. Events are sorted newest-first within a page but not across pages on large teams. Always paginate with `pagination.hasMore` and `pagination.nextCursor` rather than stopping on an empty page.");
|
|
2296
2296
|
const reportsGetUsageQueryCursorSchema = z.string().optional().describe("Base64 encoded cursor containing pagination data");
|
|
2297
2297
|
const reportsGetUsageStatus200Schema = z.unknown();
|