@convex-dev/agent 0.5.0-alpha.1 → 0.6.0-alpha.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.
Files changed (235) hide show
  1. package/MIGRATION.md +153 -0
  2. package/README.md +32 -27
  3. package/dist/UIMessages.d.ts +46 -0
  4. package/dist/UIMessages.d.ts.map +1 -0
  5. package/dist/UIMessages.js +546 -0
  6. package/dist/UIMessages.js.map +1 -0
  7. package/dist/client/createTool.d.ts +126 -27
  8. package/dist/client/createTool.d.ts.map +1 -1
  9. package/dist/client/createTool.js +67 -12
  10. package/dist/client/createTool.js.map +1 -1
  11. package/dist/client/defaultComponent.d.ts +11 -0
  12. package/dist/client/defaultComponent.d.ts.map +1 -0
  13. package/dist/client/defaultComponent.js +7 -0
  14. package/dist/client/defaultComponent.js.map +1 -0
  15. package/dist/client/definePlaygroundAPI.d.ts +1335 -204
  16. package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
  17. package/dist/client/definePlaygroundAPI.js +52 -28
  18. package/dist/client/definePlaygroundAPI.js.map +1 -1
  19. package/dist/client/files.d.ts +20 -7
  20. package/dist/client/files.d.ts.map +1 -1
  21. package/dist/client/files.js +68 -11
  22. package/dist/client/files.js.map +1 -1
  23. package/dist/client/index.d.ts +1116 -978
  24. package/dist/client/index.d.ts.map +1 -1
  25. package/dist/client/index.js +332 -747
  26. package/dist/client/index.js.map +1 -1
  27. package/dist/client/messages.d.ts +461 -0
  28. package/dist/client/messages.d.ts.map +1 -0
  29. package/dist/client/messages.js +106 -0
  30. package/dist/client/messages.js.map +1 -0
  31. package/dist/client/mockModel.d.ts +42 -0
  32. package/dist/client/mockModel.d.ts.map +1 -0
  33. package/dist/client/mockModel.js +182 -0
  34. package/dist/client/mockModel.js.map +1 -0
  35. package/dist/client/saveInputMessages.d.ts +20 -0
  36. package/dist/client/saveInputMessages.d.ts.map +1 -0
  37. package/dist/client/saveInputMessages.js +58 -0
  38. package/dist/client/saveInputMessages.js.map +1 -0
  39. package/dist/client/search.d.ts +350 -39
  40. package/dist/client/search.d.ts.map +1 -1
  41. package/dist/client/search.js +350 -39
  42. package/dist/client/search.js.map +1 -1
  43. package/dist/client/start.d.ts +84 -0
  44. package/dist/client/start.d.ts.map +1 -0
  45. package/dist/client/start.js +185 -0
  46. package/dist/client/start.js.map +1 -0
  47. package/dist/client/streamText.d.ts +46 -0
  48. package/dist/client/streamText.d.ts.map +1 -0
  49. package/dist/client/streamText.js +117 -0
  50. package/dist/client/streamText.js.map +1 -0
  51. package/dist/client/streaming.d.ts +3716 -32
  52. package/dist/client/streaming.d.ts.map +1 -1
  53. package/dist/client/streaming.js +161 -59
  54. package/dist/client/streaming.js.map +1 -1
  55. package/dist/client/threads.d.ts +46 -0
  56. package/dist/client/threads.d.ts.map +1 -0
  57. package/dist/client/threads.js +49 -0
  58. package/dist/client/threads.js.map +1 -0
  59. package/dist/client/types.d.ts +266 -128
  60. package/dist/client/types.d.ts.map +1 -1
  61. package/dist/client/utils.d.ts +4 -0
  62. package/dist/client/utils.d.ts.map +1 -0
  63. package/dist/client/utils.js +21 -0
  64. package/dist/client/utils.js.map +1 -0
  65. package/dist/component/_generated/api.d.ts +24 -2178
  66. package/dist/component/_generated/api.d.ts.map +1 -1
  67. package/dist/component/_generated/api.js +10 -1
  68. package/dist/component/_generated/api.js.map +1 -1
  69. package/dist/component/_generated/component.d.ts +3120 -0
  70. package/dist/component/_generated/component.d.ts.map +1 -0
  71. package/dist/component/_generated/component.js +11 -0
  72. package/dist/component/_generated/component.js.map +1 -0
  73. package/dist/component/_generated/dataModel.d.ts +4 -18
  74. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  75. package/dist/component/_generated/dataModel.js +11 -0
  76. package/dist/component/_generated/dataModel.js.map +1 -0
  77. package/dist/component/_generated/server.d.ts +10 -38
  78. package/dist/component/_generated/server.d.ts.map +1 -1
  79. package/dist/component/_generated/server.js +9 -5
  80. package/dist/component/_generated/server.js.map +1 -1
  81. package/dist/component/files.d.ts +16 -10
  82. package/dist/component/files.d.ts.map +1 -1
  83. package/dist/component/files.js +10 -2
  84. package/dist/component/files.js.map +1 -1
  85. package/dist/component/messages.d.ts +2578 -366
  86. package/dist/component/messages.d.ts.map +1 -1
  87. package/dist/component/messages.js +397 -154
  88. package/dist/component/messages.js.map +1 -1
  89. package/dist/component/schema.d.ts +5697 -3584
  90. package/dist/component/schema.d.ts.map +1 -1
  91. package/dist/component/schema.js +18 -41
  92. package/dist/component/schema.js.map +1 -1
  93. package/dist/component/streams.d.ts +39 -339
  94. package/dist/component/streams.d.ts.map +1 -1
  95. package/dist/component/streams.js +114 -73
  96. package/dist/component/streams.js.map +1 -1
  97. package/dist/component/threads.d.ts +13 -13
  98. package/dist/component/users.d.ts +7 -7
  99. package/dist/component/vector/index.d.ts +1 -1
  100. package/dist/component/vector/index.d.ts.map +1 -1
  101. package/dist/component/vector/index.js +1 -3
  102. package/dist/component/vector/index.js.map +1 -1
  103. package/dist/deltas.d.ts +43 -0
  104. package/dist/deltas.d.ts.map +1 -0
  105. package/dist/deltas.js +446 -0
  106. package/dist/deltas.js.map +1 -0
  107. package/dist/mapping.d.ts +38 -20
  108. package/dist/mapping.d.ts.map +1 -1
  109. package/dist/mapping.js +365 -97
  110. package/dist/mapping.js.map +1 -1
  111. package/dist/react/SmoothText.d.ts +5 -0
  112. package/dist/react/SmoothText.d.ts.map +1 -0
  113. package/dist/react/SmoothText.js +6 -0
  114. package/dist/react/SmoothText.js.map +1 -0
  115. package/dist/react/index.d.ts +5 -77
  116. package/dist/react/index.d.ts.map +1 -1
  117. package/dist/react/index.js +6 -160
  118. package/dist/react/index.js.map +1 -1
  119. package/dist/react/optimisticallySendMessage.d.ts +36 -3
  120. package/dist/react/optimisticallySendMessage.d.ts.map +1 -1
  121. package/dist/react/optimisticallySendMessage.js +35 -9
  122. package/dist/react/optimisticallySendMessage.js.map +1 -1
  123. package/dist/react/types.d.ts +4 -18
  124. package/dist/react/types.d.ts.map +1 -1
  125. package/dist/react/useDeltaStreams.d.ts +10 -0
  126. package/dist/react/useDeltaStreams.d.ts.map +1 -0
  127. package/dist/react/useDeltaStreams.js +106 -0
  128. package/dist/react/useDeltaStreams.js.map +1 -0
  129. package/dist/react/useSmoothText.d.ts +13 -12
  130. package/dist/react/useSmoothText.d.ts.map +1 -1
  131. package/dist/react/useSmoothText.js +32 -15
  132. package/dist/react/useSmoothText.js.map +1 -1
  133. package/dist/react/useStreamingUIMessages.d.ts +22 -0
  134. package/dist/react/useStreamingUIMessages.d.ts.map +1 -0
  135. package/dist/react/useStreamingUIMessages.js +92 -0
  136. package/dist/react/useStreamingUIMessages.js.map +1 -0
  137. package/dist/react/useThreadMessages.d.ts +104 -0
  138. package/dist/react/useThreadMessages.d.ts.map +1 -0
  139. package/dist/react/useThreadMessages.js +148 -0
  140. package/dist/react/useThreadMessages.js.map +1 -0
  141. package/dist/react/useUIMessages.d.ts +96 -0
  142. package/dist/react/useUIMessages.d.ts.map +1 -0
  143. package/dist/react/useUIMessages.js +108 -0
  144. package/dist/react/useUIMessages.js.map +1 -0
  145. package/dist/shared.d.ts +20 -4
  146. package/dist/shared.d.ts.map +1 -1
  147. package/dist/shared.js +45 -8
  148. package/dist/shared.js.map +1 -1
  149. package/dist/validators.d.ts +22981 -5666
  150. package/dist/validators.d.ts.map +1 -1
  151. package/dist/validators.js +245 -137
  152. package/dist/validators.js.map +1 -1
  153. package/package.json +101 -51
  154. package/src/UIMessages.combineUIMessages.test.ts +239 -0
  155. package/src/UIMessages.test.ts +273 -0
  156. package/src/UIMessages.ts +739 -0
  157. package/src/client/approval.test.ts +350 -0
  158. package/src/client/createTool.ts +291 -76
  159. package/src/client/defaultComponent.ts +17 -0
  160. package/src/client/definePlaygroundAPI.ts +67 -31
  161. package/src/client/files.ts +100 -20
  162. package/src/client/index.test.ts +40 -85
  163. package/src/client/index.ts +638 -1289
  164. package/src/client/messages.ts +237 -0
  165. package/src/client/mockModel.ts +252 -0
  166. package/src/client/saveInputMessages.test.ts +583 -0
  167. package/src/client/saveInputMessages.ts +101 -0
  168. package/src/client/search.test.ts +1207 -0
  169. package/src/client/search.ts +581 -70
  170. package/src/client/start.ts +327 -0
  171. package/src/client/streamText.ts +187 -0
  172. package/src/client/streaming.test.ts +186 -0
  173. package/src/client/streaming.ts +241 -97
  174. package/src/client/threads.ts +83 -0
  175. package/src/client/types.ts +370 -219
  176. package/src/client/utils.ts +27 -0
  177. package/src/component/_generated/api.ts +64 -0
  178. package/src/component/_generated/component.ts +4902 -0
  179. package/src/component/_generated/{server.d.ts → server.ts} +33 -21
  180. package/src/component/files.ts +11 -2
  181. package/src/component/messages.test.ts +195 -51
  182. package/src/component/messages.ts +500 -201
  183. package/src/component/schema.ts +20 -46
  184. package/src/component/setup.test.ts +7 -0
  185. package/src/component/streams.ts +184 -83
  186. package/src/component/users.test.ts +0 -1
  187. package/src/component/vector/index.ts +1 -3
  188. package/src/deltas.test.ts +626 -0
  189. package/src/deltas.ts +569 -0
  190. package/src/fromUIMessages.test.ts +497 -0
  191. package/src/mapping.test.ts +180 -6
  192. package/src/mapping.ts +479 -162
  193. package/src/react/SmoothText.tsx +9 -0
  194. package/src/react/index.ts +10 -230
  195. package/src/react/optimisticallySendMessage.ts +55 -12
  196. package/src/react/types.ts +6 -39
  197. package/src/react/useDeltaStreams.ts +160 -0
  198. package/src/react/useSmoothText.ts +56 -36
  199. package/src/react/useStreamingUIMessages.ts +143 -0
  200. package/src/react/useThreadMessages.ts +262 -0
  201. package/src/react/useUIMessages.test.ts +255 -0
  202. package/src/react/useUIMessages.ts +195 -0
  203. package/src/shared.ts +88 -12
  204. package/src/test.ts +18 -0
  205. package/src/toUIMessages.test.ts +1269 -0
  206. package/src/validators.test.ts +18 -19
  207. package/src/validators.ts +325 -185
  208. package/dist/client/_generated/_ignore.d.ts +0 -1
  209. package/dist/client/_generated/_ignore.d.ts.map +0 -1
  210. package/dist/client/_generated/_ignore.js +0 -3
  211. package/dist/client/_generated/_ignore.js.map +0 -1
  212. package/dist/client/listMessages.d.ts +0 -22
  213. package/dist/client/listMessages.d.ts.map +0 -1
  214. package/dist/client/listMessages.js +0 -25
  215. package/dist/client/listMessages.js.map +0 -1
  216. package/dist/package.json +0 -3
  217. package/dist/react/deltas.d.ts +0 -26
  218. package/dist/react/deltas.d.ts.map +0 -1
  219. package/dist/react/deltas.js +0 -384
  220. package/dist/react/deltas.js.map +0 -1
  221. package/dist/react/toUIMessages.d.ts +0 -15
  222. package/dist/react/toUIMessages.d.ts.map +0 -1
  223. package/dist/react/toUIMessages.js +0 -211
  224. package/dist/react/toUIMessages.js.map +0 -1
  225. package/src/client/listMessages.ts +0 -38
  226. package/src/component/_generated/api.d.ts +0 -2202
  227. package/src/component/_generated/api.js +0 -23
  228. package/src/component/_generated/server.js +0 -90
  229. package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  230. package/src/react/deltas.test.ts +0 -315
  231. package/src/react/deltas.ts +0 -478
  232. package/src/react/toUIMessages.test.ts +0 -420
  233. package/src/react/toUIMessages.ts +0 -253
  234. package/src/vitest.config.ts +0 -7
  235. /package/src/component/_generated/{dataModel.d.ts → dataModel.ts} +0 -0
@@ -1,4 +1,3 @@
1
- /* eslint-disable */
2
1
  /**
3
2
  * Generated `api` utility.
4
3
  *
@@ -7,7 +6,6 @@
7
6
  * To regenerate, run `npx convex dev`.
8
7
  * @module
9
8
  */
10
-
11
9
  import type * as apiKeys from "../apiKeys.js";
12
10
  import type * as files from "../files.js";
13
11
  import type * as messages from "../messages.js";
@@ -16,2187 +14,35 @@ import type * as threads from "../threads.js";
16
14
  import type * as users from "../users.js";
17
15
  import type * as vector_index from "../vector/index.js";
18
16
  import type * as vector_tables from "../vector/tables.js";
19
-
20
- import type {
21
- ApiFromModules,
22
- FilterApi,
23
- FunctionReference,
24
- } from "convex/server";
25
-
17
+ import type { ApiFromModules, FilterApi, FunctionReference } from "convex/server";
18
+ declare const fullApi: ApiFromModules<{
19
+ apiKeys: typeof apiKeys;
20
+ files: typeof files;
21
+ messages: typeof messages;
22
+ streams: typeof streams;
23
+ threads: typeof threads;
24
+ users: typeof users;
25
+ "vector/index": typeof vector_index;
26
+ "vector/tables": typeof vector_tables;
27
+ }>;
26
28
  /**
27
- * A utility for referencing Convex functions in your app's API.
29
+ * A utility for referencing Convex functions in your app's public API.
28
30
  *
29
31
  * Usage:
30
32
  * ```js
31
33
  * const myFunctionReference = api.myModule.myFunction;
32
34
  * ```
33
35
  */
34
- declare const fullApi: ApiFromModules<{
35
- apiKeys: typeof apiKeys;
36
- files: typeof files;
37
- messages: typeof messages;
38
- streams: typeof streams;
39
- threads: typeof threads;
40
- users: typeof users;
41
- "vector/index": typeof vector_index;
42
- "vector/tables": typeof vector_tables;
43
- }>;
44
- export type Mounts = {
45
- apiKeys: {
46
- destroy: FunctionReference<
47
- "mutation",
48
- "public",
49
- { apiKey?: string; name?: string },
50
- | "missing"
51
- | "deleted"
52
- | "name mismatch"
53
- | "must provide either apiKey or name"
54
- >;
55
- issue: FunctionReference<"mutation", "public", { name?: string }, string>;
56
- validate: FunctionReference<"query", "public", { apiKey: string }, boolean>;
57
- };
58
- files: {
59
- addFile: FunctionReference<
60
- "mutation",
61
- "public",
62
- { filename?: string; hash: string; mimeType: string; storageId: string },
63
- { fileId: string; storageId: string }
64
- >;
65
- copyFile: FunctionReference<"mutation", "public", { fileId: string }, null>;
66
- deleteFiles: FunctionReference<
67
- "mutation",
68
- "public",
69
- { fileIds: Array<string>; force?: boolean },
70
- Array<string>
71
- >;
72
- get: FunctionReference<
73
- "query",
74
- "public",
75
- { fileId: string },
76
- null | {
77
- _creationTime: number;
78
- _id: string;
79
- filename?: string;
80
- hash: string;
81
- lastTouchedAt: number;
82
- mimeType: string;
83
- refcount: number;
84
- storageId: string;
85
- }
86
- >;
87
- getFilesToDelete: FunctionReference<
88
- "query",
89
- "public",
90
- {
91
- paginationOpts: {
92
- cursor: string | null;
93
- endCursor?: string | null;
94
- id?: number;
95
- maximumBytesRead?: number;
96
- maximumRowsRead?: number;
97
- numItems: number;
98
- };
99
- },
100
- {
101
- continueCursor: string;
102
- isDone: boolean;
103
- page: Array<{
104
- _creationTime: number;
105
- _id: string;
106
- filename?: string;
107
- hash: string;
108
- lastTouchedAt: number;
109
- mimeType: string;
110
- refcount: number;
111
- storageId: string;
112
- }>;
113
- }
114
- >;
115
- useExistingFile: FunctionReference<
116
- "mutation",
117
- "public",
118
- { filename?: string; hash: string },
119
- null | { fileId: string; storageId: string }
120
- >;
121
- };
122
- messages: {
123
- addMessages: FunctionReference<
124
- "mutation",
125
- "public",
126
- {
127
- agentName?: string;
128
- embeddings?: {
129
- dimension:
130
- | 128
131
- | 256
132
- | 512
133
- | 768
134
- | 1024
135
- | 1408
136
- | 1536
137
- | 2048
138
- | 3072
139
- | 4096;
140
- model: string;
141
- vectors: Array<Array<number> | null>;
142
- };
143
- failPendingSteps?: boolean;
144
- messages: Array<{
145
- error?: string;
146
- fileIds?: Array<string>;
147
- finishReason?:
148
- | "stop"
149
- | "length"
150
- | "content-filter"
151
- | "tool-calls"
152
- | "error"
153
- | "other"
154
- | "unknown";
155
- id?: string;
156
- message:
157
- | {
158
- content:
159
- | string
160
- | Array<
161
- | {
162
- providerOptions?: Record<string, Record<string, any>>;
163
- text: string;
164
- type: "text";
165
- }
166
- | {
167
- image: string | ArrayBuffer;
168
- mimeType?: string;
169
- providerOptions?: Record<string, Record<string, any>>;
170
- type: "image";
171
- }
172
- | {
173
- data: string | ArrayBuffer;
174
- filename?: string;
175
- mimeType: string;
176
- providerOptions?: Record<string, Record<string, any>>;
177
- type: "file";
178
- }
179
- >;
180
- providerOptions?: Record<string, Record<string, any>>;
181
- role: "user";
182
- }
183
- | {
184
- content:
185
- | string
186
- | Array<
187
- | {
188
- providerOptions?: Record<string, Record<string, any>>;
189
- text: string;
190
- type: "text";
191
- }
192
- | {
193
- data: string | ArrayBuffer;
194
- filename?: string;
195
- mimeType: string;
196
- providerOptions?: Record<string, Record<string, any>>;
197
- type: "file";
198
- }
199
- | {
200
- providerOptions?: Record<string, Record<string, any>>;
201
- signature?: string;
202
- state?: "streaming" | "done";
203
- text: string;
204
- type: "reasoning";
205
- }
206
- | {
207
- data: string;
208
- providerOptions?: Record<string, Record<string, any>>;
209
- type: "redacted-reasoning";
210
- }
211
- | {
212
- args: any;
213
- providerExecuted?: boolean;
214
- providerOptions?: Record<string, Record<string, any>>;
215
- toolCallId: string;
216
- toolName: string;
217
- type: "tool-call";
218
- }
219
- >;
220
- providerOptions?: Record<string, Record<string, any>>;
221
- role: "assistant";
222
- }
223
- | {
224
- content: Array<{
225
- args?: any;
226
- experimental_content?: Array<
227
- | { text: string; type: "text" }
228
- | { data: string; mimeType?: string; type: "image" }
229
- >;
230
- isError?: boolean;
231
- providerExecuted?: boolean;
232
- providerOptions?: Record<string, Record<string, any>>;
233
- result: any;
234
- toolCallId: string;
235
- toolName: string;
236
- type: "tool-result";
237
- }>;
238
- providerOptions?: Record<string, Record<string, any>>;
239
- role: "tool";
240
- }
241
- | {
242
- content: string;
243
- providerOptions?: Record<string, Record<string, any>>;
244
- role: "system";
245
- };
246
- model?: string;
247
- provider?: string;
248
- providerMetadata?: Record<string, Record<string, any>>;
249
- reasoning?: string;
250
- reasoningDetails?: Array<
251
- | {
252
- providerOptions?: Record<string, Record<string, any>>;
253
- signature?: string;
254
- state?: "streaming" | "done";
255
- text: string;
256
- type: "reasoning";
257
- }
258
- | { signature?: string; text: string; type: "text" }
259
- | { data: string; type: "redacted" }
260
- >;
261
- sources?: Array<
262
- | {
263
- id: string;
264
- providerOptions?: Record<string, Record<string, any>>;
265
- sourceType: "url";
266
- title?: string;
267
- type?: "source";
268
- url?: string;
269
- }
270
- | {
271
- filename?: string;
272
- id: string;
273
- mediaType: string;
274
- providerMetadata?: Record<string, Record<string, any>>;
275
- sourceType: "document";
276
- title: string;
277
- type: "source";
278
- }
279
- >;
280
- text?: string;
281
- usage?: {
282
- cachedInputTokens?: number;
283
- completionTokens: number;
284
- promptTokens: number;
285
- reasoningTokens?: number;
286
- totalTokens: number;
287
- };
288
- warnings?: Array<
289
- | { details?: string; setting: string; type: "unsupported-setting" }
290
- | { details?: string; tool: any; type: "unsupported-tool" }
291
- | { message: string; type: "other" }
292
- >;
293
- }>;
294
- pending?: boolean;
295
- promptMessageId?: string;
296
- threadId: string;
297
- userId?: string;
298
- },
299
- {
300
- messages: Array<{
301
- _creationTime: number;
302
- _id: string;
303
- agentName?: string;
304
- embeddingId?: string;
305
- error?: string;
306
- fileIds?: Array<string>;
307
- finishReason?:
308
- | "stop"
309
- | "length"
310
- | "content-filter"
311
- | "tool-calls"
312
- | "error"
313
- | "other"
314
- | "unknown";
315
- id?: string;
316
- message?:
317
- | {
318
- content:
319
- | string
320
- | Array<
321
- | {
322
- providerOptions?: Record<string, Record<string, any>>;
323
- text: string;
324
- type: "text";
325
- }
326
- | {
327
- image: string | ArrayBuffer;
328
- mimeType?: string;
329
- providerOptions?: Record<string, Record<string, any>>;
330
- type: "image";
331
- }
332
- | {
333
- data: string | ArrayBuffer;
334
- filename?: string;
335
- mimeType: string;
336
- providerOptions?: Record<string, Record<string, any>>;
337
- type: "file";
338
- }
339
- >;
340
- providerOptions?: Record<string, Record<string, any>>;
341
- role: "user";
342
- }
343
- | {
344
- content:
345
- | string
346
- | Array<
347
- | {
348
- providerOptions?: Record<string, Record<string, any>>;
349
- text: string;
350
- type: "text";
351
- }
352
- | {
353
- data: string | ArrayBuffer;
354
- filename?: string;
355
- mimeType: string;
356
- providerOptions?: Record<string, Record<string, any>>;
357
- type: "file";
358
- }
359
- | {
360
- providerOptions?: Record<string, Record<string, any>>;
361
- signature?: string;
362
- state?: "streaming" | "done";
363
- text: string;
364
- type: "reasoning";
365
- }
366
- | {
367
- data: string;
368
- providerOptions?: Record<string, Record<string, any>>;
369
- type: "redacted-reasoning";
370
- }
371
- | {
372
- args: any;
373
- providerExecuted?: boolean;
374
- providerOptions?: Record<string, Record<string, any>>;
375
- toolCallId: string;
376
- toolName: string;
377
- type: "tool-call";
378
- }
379
- >;
380
- providerOptions?: Record<string, Record<string, any>>;
381
- role: "assistant";
382
- }
383
- | {
384
- content: Array<{
385
- args?: any;
386
- experimental_content?: Array<
387
- | { text: string; type: "text" }
388
- | { data: string; mimeType?: string; type: "image" }
389
- >;
390
- isError?: boolean;
391
- providerExecuted?: boolean;
392
- providerOptions?: Record<string, Record<string, any>>;
393
- result: any;
394
- toolCallId: string;
395
- toolName: string;
396
- type: "tool-result";
397
- }>;
398
- providerOptions?: Record<string, Record<string, any>>;
399
- role: "tool";
400
- }
401
- | {
402
- content: string;
403
- providerOptions?: Record<string, Record<string, any>>;
404
- role: "system";
405
- };
406
- model?: string;
407
- order: number;
408
- provider?: string;
409
- providerMetadata?: Record<string, Record<string, any>>;
410
- providerOptions?: Record<string, Record<string, any>>;
411
- reasoning?: string;
412
- reasoningDetails?: Array<
413
- | {
414
- providerOptions?: Record<string, Record<string, any>>;
415
- signature?: string;
416
- state?: "streaming" | "done";
417
- text: string;
418
- type: "reasoning";
419
- }
420
- | { signature?: string; text: string; type: "text" }
421
- | { data: string; type: "redacted" }
422
- >;
423
- sources?: Array<
424
- | {
425
- id: string;
426
- providerOptions?: Record<string, Record<string, any>>;
427
- sourceType: "url";
428
- title?: string;
429
- type?: "source";
430
- url?: string;
431
- }
432
- | {
433
- filename?: string;
434
- id: string;
435
- mediaType: string;
436
- providerMetadata?: Record<string, Record<string, any>>;
437
- sourceType: "document";
438
- title: string;
439
- type: "source";
440
- }
441
- >;
442
- status: "pending" | "success" | "failed";
443
- stepOrder: number;
444
- text?: string;
445
- threadId: string;
446
- tool: boolean;
447
- usage?: {
448
- cachedInputTokens?: number;
449
- completionTokens: number;
450
- promptTokens: number;
451
- reasoningTokens?: number;
452
- totalTokens: number;
453
- };
454
- userId?: string;
455
- warnings?: Array<
456
- | { details?: string; setting: string; type: "unsupported-setting" }
457
- | { details?: string; tool: any; type: "unsupported-tool" }
458
- | { message: string; type: "other" }
459
- >;
460
- }>;
461
- }
462
- >;
463
- commitMessage: FunctionReference<
464
- "mutation",
465
- "public",
466
- { messageId: string },
467
- null
468
- >;
469
- deleteByIds: FunctionReference<
470
- "mutation",
471
- "public",
472
- { messageIds: Array<string> },
473
- Array<string>
474
- >;
475
- deleteByOrder: FunctionReference<
476
- "mutation",
477
- "public",
478
- {
479
- endOrder: number;
480
- endStepOrder?: number;
481
- startOrder: number;
482
- startStepOrder?: number;
483
- threadId: string;
484
- },
485
- { isDone: boolean; lastOrder?: number; lastStepOrder?: number }
486
- >;
487
- getMessagesByIds: FunctionReference<
488
- "query",
489
- "public",
490
- { messageIds: Array<string> },
491
- Array<null | {
492
- _creationTime: number;
493
- _id: string;
494
- agentName?: string;
495
- embeddingId?: string;
496
- error?: string;
497
- fileIds?: Array<string>;
498
- finishReason?:
499
- | "stop"
500
- | "length"
501
- | "content-filter"
502
- | "tool-calls"
503
- | "error"
504
- | "other"
505
- | "unknown";
506
- id?: string;
507
- message?:
508
- | {
509
- content:
510
- | string
511
- | Array<
512
- | {
513
- providerOptions?: Record<string, Record<string, any>>;
514
- text: string;
515
- type: "text";
516
- }
517
- | {
518
- image: string | ArrayBuffer;
519
- mimeType?: string;
520
- providerOptions?: Record<string, Record<string, any>>;
521
- type: "image";
522
- }
523
- | {
524
- data: string | ArrayBuffer;
525
- filename?: string;
526
- mimeType: string;
527
- providerOptions?: Record<string, Record<string, any>>;
528
- type: "file";
529
- }
530
- >;
531
- providerOptions?: Record<string, Record<string, any>>;
532
- role: "user";
533
- }
534
- | {
535
- content:
536
- | string
537
- | Array<
538
- | {
539
- providerOptions?: Record<string, Record<string, any>>;
540
- text: string;
541
- type: "text";
542
- }
543
- | {
544
- data: string | ArrayBuffer;
545
- filename?: string;
546
- mimeType: string;
547
- providerOptions?: Record<string, Record<string, any>>;
548
- type: "file";
549
- }
550
- | {
551
- providerOptions?: Record<string, Record<string, any>>;
552
- signature?: string;
553
- state?: "streaming" | "done";
554
- text: string;
555
- type: "reasoning";
556
- }
557
- | {
558
- data: string;
559
- providerOptions?: Record<string, Record<string, any>>;
560
- type: "redacted-reasoning";
561
- }
562
- | {
563
- args: any;
564
- providerExecuted?: boolean;
565
- providerOptions?: Record<string, Record<string, any>>;
566
- toolCallId: string;
567
- toolName: string;
568
- type: "tool-call";
569
- }
570
- >;
571
- providerOptions?: Record<string, Record<string, any>>;
572
- role: "assistant";
573
- }
574
- | {
575
- content: Array<{
576
- args?: any;
577
- experimental_content?: Array<
578
- | { text: string; type: "text" }
579
- | { data: string; mimeType?: string; type: "image" }
580
- >;
581
- isError?: boolean;
582
- providerExecuted?: boolean;
583
- providerOptions?: Record<string, Record<string, any>>;
584
- result: any;
585
- toolCallId: string;
586
- toolName: string;
587
- type: "tool-result";
588
- }>;
589
- providerOptions?: Record<string, Record<string, any>>;
590
- role: "tool";
591
- }
592
- | {
593
- content: string;
594
- providerOptions?: Record<string, Record<string, any>>;
595
- role: "system";
596
- };
597
- model?: string;
598
- order: number;
599
- provider?: string;
600
- providerMetadata?: Record<string, Record<string, any>>;
601
- providerOptions?: Record<string, Record<string, any>>;
602
- reasoning?: string;
603
- reasoningDetails?: Array<
604
- | {
605
- providerOptions?: Record<string, Record<string, any>>;
606
- signature?: string;
607
- state?: "streaming" | "done";
608
- text: string;
609
- type: "reasoning";
610
- }
611
- | { signature?: string; text: string; type: "text" }
612
- | { data: string; type: "redacted" }
613
- >;
614
- sources?: Array<
615
- | {
616
- id: string;
617
- providerOptions?: Record<string, Record<string, any>>;
618
- sourceType: "url";
619
- title?: string;
620
- type?: "source";
621
- url?: string;
622
- }
623
- | {
624
- filename?: string;
625
- id: string;
626
- mediaType: string;
627
- providerMetadata?: Record<string, Record<string, any>>;
628
- sourceType: "document";
629
- title: string;
630
- type: "source";
631
- }
632
- >;
633
- status: "pending" | "success" | "failed";
634
- stepOrder: number;
635
- text?: string;
636
- threadId: string;
637
- tool: boolean;
638
- usage?: {
639
- cachedInputTokens?: number;
640
- completionTokens: number;
641
- promptTokens: number;
642
- reasoningTokens?: number;
643
- totalTokens: number;
644
- };
645
- userId?: string;
646
- warnings?: Array<
647
- | { details?: string; setting: string; type: "unsupported-setting" }
648
- | { details?: string; tool: any; type: "unsupported-tool" }
649
- | { message: string; type: "other" }
650
- >;
651
- }>
652
- >;
653
- listMessagesByThreadId: FunctionReference<
654
- "query",
655
- "public",
656
- {
657
- excludeToolMessages?: boolean;
658
- order: "asc" | "desc";
659
- paginationOpts?: {
660
- cursor: string | null;
661
- endCursor?: string | null;
662
- id?: number;
663
- maximumBytesRead?: number;
664
- maximumRowsRead?: number;
665
- numItems: number;
666
- };
667
- statuses?: Array<"pending" | "success" | "failed">;
668
- threadId: string;
669
- upToAndIncludingMessageId?: string;
670
- },
671
- {
672
- continueCursor: string;
673
- isDone: boolean;
674
- page: Array<{
675
- _creationTime: number;
676
- _id: string;
677
- agentName?: string;
678
- embeddingId?: string;
679
- error?: string;
680
- fileIds?: Array<string>;
681
- finishReason?:
682
- | "stop"
683
- | "length"
684
- | "content-filter"
685
- | "tool-calls"
686
- | "error"
687
- | "other"
688
- | "unknown";
689
- id?: string;
690
- message?:
691
- | {
692
- content:
693
- | string
694
- | Array<
695
- | {
696
- providerOptions?: Record<string, Record<string, any>>;
697
- text: string;
698
- type: "text";
699
- }
700
- | {
701
- image: string | ArrayBuffer;
702
- mimeType?: string;
703
- providerOptions?: Record<string, Record<string, any>>;
704
- type: "image";
705
- }
706
- | {
707
- data: string | ArrayBuffer;
708
- filename?: string;
709
- mimeType: string;
710
- providerOptions?: Record<string, Record<string, any>>;
711
- type: "file";
712
- }
713
- >;
714
- providerOptions?: Record<string, Record<string, any>>;
715
- role: "user";
716
- }
717
- | {
718
- content:
719
- | string
720
- | Array<
721
- | {
722
- providerOptions?: Record<string, Record<string, any>>;
723
- text: string;
724
- type: "text";
725
- }
726
- | {
727
- data: string | ArrayBuffer;
728
- filename?: string;
729
- mimeType: string;
730
- providerOptions?: Record<string, Record<string, any>>;
731
- type: "file";
732
- }
733
- | {
734
- providerOptions?: Record<string, Record<string, any>>;
735
- signature?: string;
736
- state?: "streaming" | "done";
737
- text: string;
738
- type: "reasoning";
739
- }
740
- | {
741
- data: string;
742
- providerOptions?: Record<string, Record<string, any>>;
743
- type: "redacted-reasoning";
744
- }
745
- | {
746
- args: any;
747
- providerExecuted?: boolean;
748
- providerOptions?: Record<string, Record<string, any>>;
749
- toolCallId: string;
750
- toolName: string;
751
- type: "tool-call";
752
- }
753
- >;
754
- providerOptions?: Record<string, Record<string, any>>;
755
- role: "assistant";
756
- }
757
- | {
758
- content: Array<{
759
- args?: any;
760
- experimental_content?: Array<
761
- | { text: string; type: "text" }
762
- | { data: string; mimeType?: string; type: "image" }
763
- >;
764
- isError?: boolean;
765
- providerExecuted?: boolean;
766
- providerOptions?: Record<string, Record<string, any>>;
767
- result: any;
768
- toolCallId: string;
769
- toolName: string;
770
- type: "tool-result";
771
- }>;
772
- providerOptions?: Record<string, Record<string, any>>;
773
- role: "tool";
774
- }
775
- | {
776
- content: string;
777
- providerOptions?: Record<string, Record<string, any>>;
778
- role: "system";
779
- };
780
- model?: string;
781
- order: number;
782
- provider?: string;
783
- providerMetadata?: Record<string, Record<string, any>>;
784
- providerOptions?: Record<string, Record<string, any>>;
785
- reasoning?: string;
786
- reasoningDetails?: Array<
787
- | {
788
- providerOptions?: Record<string, Record<string, any>>;
789
- signature?: string;
790
- state?: "streaming" | "done";
791
- text: string;
792
- type: "reasoning";
793
- }
794
- | { signature?: string; text: string; type: "text" }
795
- | { data: string; type: "redacted" }
796
- >;
797
- sources?: Array<
798
- | {
799
- id: string;
800
- providerOptions?: Record<string, Record<string, any>>;
801
- sourceType: "url";
802
- title?: string;
803
- type?: "source";
804
- url?: string;
805
- }
806
- | {
807
- filename?: string;
808
- id: string;
809
- mediaType: string;
810
- providerMetadata?: Record<string, Record<string, any>>;
811
- sourceType: "document";
812
- title: string;
813
- type: "source";
814
- }
815
- >;
816
- status: "pending" | "success" | "failed";
817
- stepOrder: number;
818
- text?: string;
819
- threadId: string;
820
- tool: boolean;
821
- usage?: {
822
- cachedInputTokens?: number;
823
- completionTokens: number;
824
- promptTokens: number;
825
- reasoningTokens?: number;
826
- totalTokens: number;
827
- };
828
- userId?: string;
829
- warnings?: Array<
830
- | { details?: string; setting: string; type: "unsupported-setting" }
831
- | { details?: string; tool: any; type: "unsupported-tool" }
832
- | { message: string; type: "other" }
833
- >;
834
- }>;
835
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
836
- splitCursor?: string | null;
837
- }
838
- >;
839
- rollbackMessage: FunctionReference<
840
- "mutation",
841
- "public",
842
- { error?: string; messageId: string },
843
- null
844
- >;
845
- searchMessages: FunctionReference<
846
- "action",
847
- "public",
848
- {
849
- beforeMessageId?: string;
850
- embedding?: Array<number>;
851
- embeddingModel?: string;
852
- limit: number;
853
- messageRange?: { after: number; before: number };
854
- searchAllMessagesForUserId?: string;
855
- text?: string;
856
- threadId?: string;
857
- vectorScoreThreshold?: number;
858
- },
859
- Array<{
860
- _creationTime: number;
861
- _id: string;
862
- agentName?: string;
863
- embeddingId?: string;
864
- error?: string;
865
- fileIds?: Array<string>;
866
- finishReason?:
867
- | "stop"
868
- | "length"
869
- | "content-filter"
870
- | "tool-calls"
871
- | "error"
872
- | "other"
873
- | "unknown";
874
- id?: string;
875
- message?:
876
- | {
877
- content:
878
- | string
879
- | Array<
880
- | {
881
- providerOptions?: Record<string, Record<string, any>>;
882
- text: string;
883
- type: "text";
884
- }
885
- | {
886
- image: string | ArrayBuffer;
887
- mimeType?: string;
888
- providerOptions?: Record<string, Record<string, any>>;
889
- type: "image";
890
- }
891
- | {
892
- data: string | ArrayBuffer;
893
- filename?: string;
894
- mimeType: string;
895
- providerOptions?: Record<string, Record<string, any>>;
896
- type: "file";
897
- }
898
- >;
899
- providerOptions?: Record<string, Record<string, any>>;
900
- role: "user";
901
- }
902
- | {
903
- content:
904
- | string
905
- | Array<
906
- | {
907
- providerOptions?: Record<string, Record<string, any>>;
908
- text: string;
909
- type: "text";
910
- }
911
- | {
912
- data: string | ArrayBuffer;
913
- filename?: string;
914
- mimeType: string;
915
- providerOptions?: Record<string, Record<string, any>>;
916
- type: "file";
917
- }
918
- | {
919
- providerOptions?: Record<string, Record<string, any>>;
920
- signature?: string;
921
- state?: "streaming" | "done";
922
- text: string;
923
- type: "reasoning";
924
- }
925
- | {
926
- data: string;
927
- providerOptions?: Record<string, Record<string, any>>;
928
- type: "redacted-reasoning";
929
- }
930
- | {
931
- args: any;
932
- providerExecuted?: boolean;
933
- providerOptions?: Record<string, Record<string, any>>;
934
- toolCallId: string;
935
- toolName: string;
936
- type: "tool-call";
937
- }
938
- >;
939
- providerOptions?: Record<string, Record<string, any>>;
940
- role: "assistant";
941
- }
942
- | {
943
- content: Array<{
944
- args?: any;
945
- experimental_content?: Array<
946
- | { text: string; type: "text" }
947
- | { data: string; mimeType?: string; type: "image" }
948
- >;
949
- isError?: boolean;
950
- providerExecuted?: boolean;
951
- providerOptions?: Record<string, Record<string, any>>;
952
- result: any;
953
- toolCallId: string;
954
- toolName: string;
955
- type: "tool-result";
956
- }>;
957
- providerOptions?: Record<string, Record<string, any>>;
958
- role: "tool";
959
- }
960
- | {
961
- content: string;
962
- providerOptions?: Record<string, Record<string, any>>;
963
- role: "system";
964
- };
965
- model?: string;
966
- order: number;
967
- provider?: string;
968
- providerMetadata?: Record<string, Record<string, any>>;
969
- providerOptions?: Record<string, Record<string, any>>;
970
- reasoning?: string;
971
- reasoningDetails?: Array<
972
- | {
973
- providerOptions?: Record<string, Record<string, any>>;
974
- signature?: string;
975
- state?: "streaming" | "done";
976
- text: string;
977
- type: "reasoning";
978
- }
979
- | { signature?: string; text: string; type: "text" }
980
- | { data: string; type: "redacted" }
981
- >;
982
- sources?: Array<
983
- | {
984
- id: string;
985
- providerOptions?: Record<string, Record<string, any>>;
986
- sourceType: "url";
987
- title?: string;
988
- type?: "source";
989
- url?: string;
990
- }
991
- | {
992
- filename?: string;
993
- id: string;
994
- mediaType: string;
995
- providerMetadata?: Record<string, Record<string, any>>;
996
- sourceType: "document";
997
- title: string;
998
- type: "source";
999
- }
1000
- >;
1001
- status: "pending" | "success" | "failed";
1002
- stepOrder: number;
1003
- text?: string;
1004
- threadId: string;
1005
- tool: boolean;
1006
- usage?: {
1007
- cachedInputTokens?: number;
1008
- completionTokens: number;
1009
- promptTokens: number;
1010
- reasoningTokens?: number;
1011
- totalTokens: number;
1012
- };
1013
- userId?: string;
1014
- warnings?: Array<
1015
- | { details?: string; setting: string; type: "unsupported-setting" }
1016
- | { details?: string; tool: any; type: "unsupported-tool" }
1017
- | { message: string; type: "other" }
1018
- >;
1019
- }>
1020
- >;
1021
- textSearch: FunctionReference<
1022
- "query",
1023
- "public",
1024
- {
1025
- beforeMessageId?: string;
1026
- limit: number;
1027
- searchAllMessagesForUserId?: string;
1028
- text: string;
1029
- threadId?: string;
1030
- },
1031
- Array<{
1032
- _creationTime: number;
1033
- _id: string;
1034
- agentName?: string;
1035
- embeddingId?: string;
1036
- error?: string;
1037
- fileIds?: Array<string>;
1038
- finishReason?:
1039
- | "stop"
1040
- | "length"
1041
- | "content-filter"
1042
- | "tool-calls"
1043
- | "error"
1044
- | "other"
1045
- | "unknown";
1046
- id?: string;
1047
- message?:
1048
- | {
1049
- content:
1050
- | string
1051
- | Array<
1052
- | {
1053
- providerOptions?: Record<string, Record<string, any>>;
1054
- text: string;
1055
- type: "text";
1056
- }
1057
- | {
1058
- image: string | ArrayBuffer;
1059
- mimeType?: string;
1060
- providerOptions?: Record<string, Record<string, any>>;
1061
- type: "image";
1062
- }
1063
- | {
1064
- data: string | ArrayBuffer;
1065
- filename?: string;
1066
- mimeType: string;
1067
- providerOptions?: Record<string, Record<string, any>>;
1068
- type: "file";
1069
- }
1070
- >;
1071
- providerOptions?: Record<string, Record<string, any>>;
1072
- role: "user";
1073
- }
1074
- | {
1075
- content:
1076
- | string
1077
- | Array<
1078
- | {
1079
- providerOptions?: Record<string, Record<string, any>>;
1080
- text: string;
1081
- type: "text";
1082
- }
1083
- | {
1084
- data: string | ArrayBuffer;
1085
- filename?: string;
1086
- mimeType: string;
1087
- providerOptions?: Record<string, Record<string, any>>;
1088
- type: "file";
1089
- }
1090
- | {
1091
- providerOptions?: Record<string, Record<string, any>>;
1092
- signature?: string;
1093
- state?: "streaming" | "done";
1094
- text: string;
1095
- type: "reasoning";
1096
- }
1097
- | {
1098
- data: string;
1099
- providerOptions?: Record<string, Record<string, any>>;
1100
- type: "redacted-reasoning";
1101
- }
1102
- | {
1103
- args: any;
1104
- providerExecuted?: boolean;
1105
- providerOptions?: Record<string, Record<string, any>>;
1106
- toolCallId: string;
1107
- toolName: string;
1108
- type: "tool-call";
1109
- }
1110
- >;
1111
- providerOptions?: Record<string, Record<string, any>>;
1112
- role: "assistant";
1113
- }
1114
- | {
1115
- content: Array<{
1116
- args?: any;
1117
- experimental_content?: Array<
1118
- | { text: string; type: "text" }
1119
- | { data: string; mimeType?: string; type: "image" }
1120
- >;
1121
- isError?: boolean;
1122
- providerExecuted?: boolean;
1123
- providerOptions?: Record<string, Record<string, any>>;
1124
- result: any;
1125
- toolCallId: string;
1126
- toolName: string;
1127
- type: "tool-result";
1128
- }>;
1129
- providerOptions?: Record<string, Record<string, any>>;
1130
- role: "tool";
1131
- }
1132
- | {
1133
- content: string;
1134
- providerOptions?: Record<string, Record<string, any>>;
1135
- role: "system";
1136
- };
1137
- model?: string;
1138
- order: number;
1139
- provider?: string;
1140
- providerMetadata?: Record<string, Record<string, any>>;
1141
- providerOptions?: Record<string, Record<string, any>>;
1142
- reasoning?: string;
1143
- reasoningDetails?: Array<
1144
- | {
1145
- providerOptions?: Record<string, Record<string, any>>;
1146
- signature?: string;
1147
- state?: "streaming" | "done";
1148
- text: string;
1149
- type: "reasoning";
1150
- }
1151
- | { signature?: string; text: string; type: "text" }
1152
- | { data: string; type: "redacted" }
1153
- >;
1154
- sources?: Array<
1155
- | {
1156
- id: string;
1157
- providerOptions?: Record<string, Record<string, any>>;
1158
- sourceType: "url";
1159
- title?: string;
1160
- type?: "source";
1161
- url?: string;
1162
- }
1163
- | {
1164
- filename?: string;
1165
- id: string;
1166
- mediaType: string;
1167
- providerMetadata?: Record<string, Record<string, any>>;
1168
- sourceType: "document";
1169
- title: string;
1170
- type: "source";
1171
- }
1172
- >;
1173
- status: "pending" | "success" | "failed";
1174
- stepOrder: number;
1175
- text?: string;
1176
- threadId: string;
1177
- tool: boolean;
1178
- usage?: {
1179
- cachedInputTokens?: number;
1180
- completionTokens: number;
1181
- promptTokens: number;
1182
- reasoningTokens?: number;
1183
- totalTokens: number;
1184
- };
1185
- userId?: string;
1186
- warnings?: Array<
1187
- | { details?: string; setting: string; type: "unsupported-setting" }
1188
- | { details?: string; tool: any; type: "unsupported-tool" }
1189
- | { message: string; type: "other" }
1190
- >;
1191
- }>
1192
- >;
1193
- updateMessage: FunctionReference<
1194
- "mutation",
1195
- "public",
1196
- {
1197
- messageId: string;
1198
- patch: {
1199
- error?: string;
1200
- fileIds?: Array<string>;
1201
- message?:
1202
- | {
1203
- content:
1204
- | string
1205
- | Array<
1206
- | {
1207
- providerOptions?: Record<string, Record<string, any>>;
1208
- text: string;
1209
- type: "text";
1210
- }
1211
- | {
1212
- image: string | ArrayBuffer;
1213
- mimeType?: string;
1214
- providerOptions?: Record<string, Record<string, any>>;
1215
- type: "image";
1216
- }
1217
- | {
1218
- data: string | ArrayBuffer;
1219
- filename?: string;
1220
- mimeType: string;
1221
- providerOptions?: Record<string, Record<string, any>>;
1222
- type: "file";
1223
- }
1224
- >;
1225
- providerOptions?: Record<string, Record<string, any>>;
1226
- role: "user";
1227
- }
1228
- | {
1229
- content:
1230
- | string
1231
- | Array<
1232
- | {
1233
- providerOptions?: Record<string, Record<string, any>>;
1234
- text: string;
1235
- type: "text";
1236
- }
1237
- | {
1238
- data: string | ArrayBuffer;
1239
- filename?: string;
1240
- mimeType: string;
1241
- providerOptions?: Record<string, Record<string, any>>;
1242
- type: "file";
1243
- }
1244
- | {
1245
- providerOptions?: Record<string, Record<string, any>>;
1246
- signature?: string;
1247
- state?: "streaming" | "done";
1248
- text: string;
1249
- type: "reasoning";
1250
- }
1251
- | {
1252
- data: string;
1253
- providerOptions?: Record<string, Record<string, any>>;
1254
- type: "redacted-reasoning";
1255
- }
1256
- | {
1257
- args: any;
1258
- providerExecuted?: boolean;
1259
- providerOptions?: Record<string, Record<string, any>>;
1260
- toolCallId: string;
1261
- toolName: string;
1262
- type: "tool-call";
1263
- }
1264
- >;
1265
- providerOptions?: Record<string, Record<string, any>>;
1266
- role: "assistant";
1267
- }
1268
- | {
1269
- content: Array<{
1270
- args?: any;
1271
- experimental_content?: Array<
1272
- | { text: string; type: "text" }
1273
- | { data: string; mimeType?: string; type: "image" }
1274
- >;
1275
- isError?: boolean;
1276
- providerExecuted?: boolean;
1277
- providerOptions?: Record<string, Record<string, any>>;
1278
- result: any;
1279
- toolCallId: string;
1280
- toolName: string;
1281
- type: "tool-result";
1282
- }>;
1283
- providerOptions?: Record<string, Record<string, any>>;
1284
- role: "tool";
1285
- }
1286
- | {
1287
- content: string;
1288
- providerOptions?: Record<string, Record<string, any>>;
1289
- role: "system";
1290
- };
1291
- status?: "pending" | "success" | "failed";
1292
- };
1293
- },
1294
- {
1295
- _creationTime: number;
1296
- _id: string;
1297
- agentName?: string;
1298
- embeddingId?: string;
1299
- error?: string;
1300
- fileIds?: Array<string>;
1301
- finishReason?:
1302
- | "stop"
1303
- | "length"
1304
- | "content-filter"
1305
- | "tool-calls"
1306
- | "error"
1307
- | "other"
1308
- | "unknown";
1309
- id?: string;
1310
- message?:
1311
- | {
1312
- content:
1313
- | string
1314
- | Array<
1315
- | {
1316
- providerOptions?: Record<string, Record<string, any>>;
1317
- text: string;
1318
- type: "text";
1319
- }
1320
- | {
1321
- image: string | ArrayBuffer;
1322
- mimeType?: string;
1323
- providerOptions?: Record<string, Record<string, any>>;
1324
- type: "image";
1325
- }
1326
- | {
1327
- data: string | ArrayBuffer;
1328
- filename?: string;
1329
- mimeType: string;
1330
- providerOptions?: Record<string, Record<string, any>>;
1331
- type: "file";
1332
- }
1333
- >;
1334
- providerOptions?: Record<string, Record<string, any>>;
1335
- role: "user";
1336
- }
1337
- | {
1338
- content:
1339
- | string
1340
- | Array<
1341
- | {
1342
- providerOptions?: Record<string, Record<string, any>>;
1343
- text: string;
1344
- type: "text";
1345
- }
1346
- | {
1347
- data: string | ArrayBuffer;
1348
- filename?: string;
1349
- mimeType: string;
1350
- providerOptions?: Record<string, Record<string, any>>;
1351
- type: "file";
1352
- }
1353
- | {
1354
- providerOptions?: Record<string, Record<string, any>>;
1355
- signature?: string;
1356
- state?: "streaming" | "done";
1357
- text: string;
1358
- type: "reasoning";
1359
- }
1360
- | {
1361
- data: string;
1362
- providerOptions?: Record<string, Record<string, any>>;
1363
- type: "redacted-reasoning";
1364
- }
1365
- | {
1366
- args: any;
1367
- providerExecuted?: boolean;
1368
- providerOptions?: Record<string, Record<string, any>>;
1369
- toolCallId: string;
1370
- toolName: string;
1371
- type: "tool-call";
1372
- }
1373
- >;
1374
- providerOptions?: Record<string, Record<string, any>>;
1375
- role: "assistant";
1376
- }
1377
- | {
1378
- content: Array<{
1379
- args?: any;
1380
- experimental_content?: Array<
1381
- | { text: string; type: "text" }
1382
- | { data: string; mimeType?: string; type: "image" }
1383
- >;
1384
- isError?: boolean;
1385
- providerExecuted?: boolean;
1386
- providerOptions?: Record<string, Record<string, any>>;
1387
- result: any;
1388
- toolCallId: string;
1389
- toolName: string;
1390
- type: "tool-result";
1391
- }>;
1392
- providerOptions?: Record<string, Record<string, any>>;
1393
- role: "tool";
1394
- }
1395
- | {
1396
- content: string;
1397
- providerOptions?: Record<string, Record<string, any>>;
1398
- role: "system";
1399
- };
1400
- model?: string;
1401
- order: number;
1402
- provider?: string;
1403
- providerMetadata?: Record<string, Record<string, any>>;
1404
- providerOptions?: Record<string, Record<string, any>>;
1405
- reasoning?: string;
1406
- reasoningDetails?: Array<
1407
- | {
1408
- providerOptions?: Record<string, Record<string, any>>;
1409
- signature?: string;
1410
- state?: "streaming" | "done";
1411
- text: string;
1412
- type: "reasoning";
1413
- }
1414
- | { signature?: string; text: string; type: "text" }
1415
- | { data: string; type: "redacted" }
1416
- >;
1417
- sources?: Array<
1418
- | {
1419
- id: string;
1420
- providerOptions?: Record<string, Record<string, any>>;
1421
- sourceType: "url";
1422
- title?: string;
1423
- type?: "source";
1424
- url?: string;
1425
- }
1426
- | {
1427
- filename?: string;
1428
- id: string;
1429
- mediaType: string;
1430
- providerMetadata?: Record<string, Record<string, any>>;
1431
- sourceType: "document";
1432
- title: string;
1433
- type: "source";
1434
- }
1435
- >;
1436
- status: "pending" | "success" | "failed";
1437
- stepOrder: number;
1438
- text?: string;
1439
- threadId: string;
1440
- tool: boolean;
1441
- usage?: {
1442
- cachedInputTokens?: number;
1443
- completionTokens: number;
1444
- promptTokens: number;
1445
- reasoningTokens?: number;
1446
- totalTokens: number;
1447
- };
1448
- userId?: string;
1449
- warnings?: Array<
1450
- | { details?: string; setting: string; type: "unsupported-setting" }
1451
- | { details?: string; tool: any; type: "unsupported-tool" }
1452
- | { message: string; type: "other" }
1453
- >;
1454
- }
1455
- >;
1456
- };
1457
- streams: {
1458
- abort: FunctionReference<
1459
- "mutation",
1460
- "public",
1461
- { reason: string; streamId: string },
1462
- boolean
1463
- >;
1464
- abortByOrder: FunctionReference<
1465
- "mutation",
1466
- "public",
1467
- { order: number; reason: string; threadId: string },
1468
- boolean
1469
- >;
1470
- addDelta: FunctionReference<
1471
- "mutation",
1472
- "public",
1473
- {
1474
- end: number;
1475
- parts: Array<
1476
- | { textDelta: string; type: "text-delta" }
1477
- | { textDelta: string; type: "reasoning" }
1478
- | {
1479
- source: {
1480
- id: string;
1481
- providerOptions?: Record<string, Record<string, any>>;
1482
- sourceType: "url";
1483
- title?: string;
1484
- url?: string;
1485
- };
1486
- type: "source";
1487
- }
1488
- | {
1489
- args: any;
1490
- providerExecuted?: boolean;
1491
- providerOptions?: Record<string, Record<string, any>>;
1492
- toolCallId: string;
1493
- toolName: string;
1494
- type: "tool-call";
1495
- }
1496
- | {
1497
- args?: any;
1498
- experimental_content?: Array<
1499
- | { text: string; type: "text" }
1500
- | { data: string; mimeType?: string; type: "image" }
1501
- >;
1502
- isError?: boolean;
1503
- providerExecuted?: boolean;
1504
- providerOptions?: Record<string, Record<string, any>>;
1505
- result: any;
1506
- toolCallId: string;
1507
- toolName: string;
1508
- type: "tool-result";
1509
- }
1510
- | {
1511
- toolCallId: string;
1512
- toolName: string;
1513
- type: "tool-call-streaming-start";
1514
- }
1515
- | {
1516
- argsTextDelta: string;
1517
- toolCallId: string;
1518
- toolName: string;
1519
- type: "tool-call-delta";
1520
- }
1521
- | {
1522
- id: string;
1523
- providerMetadata?: Record<string, Record<string, any>>;
1524
- text: string;
1525
- type: "text-delta";
1526
- }
1527
- | {
1528
- id: string;
1529
- providerMetadata?: Record<string, Record<string, any>>;
1530
- text: string;
1531
- type: "reasoning-delta";
1532
- }
1533
- | {
1534
- id: string;
1535
- providerOptions?: Record<string, Record<string, any>>;
1536
- sourceType: "url";
1537
- title?: string;
1538
- type?: "source";
1539
- url?: string;
1540
- }
1541
- | {
1542
- filename?: string;
1543
- id: string;
1544
- mediaType: string;
1545
- providerMetadata?: Record<string, Record<string, any>>;
1546
- sourceType: "document";
1547
- title: string;
1548
- type: "source";
1549
- }
1550
- | {
1551
- dynamic?: boolean;
1552
- input: any;
1553
- providerExecuted?: boolean;
1554
- providerMetadata?: Record<string, Record<string, any>>;
1555
- toolCallId: string;
1556
- toolName: string;
1557
- type: "tool-call";
1558
- }
1559
- | {
1560
- dynamic?: boolean;
1561
- id: string;
1562
- providerExecuted?: boolean;
1563
- providerMetadata?: Record<string, Record<string, any>>;
1564
- toolName: string;
1565
- type: "tool-input-start";
1566
- }
1567
- | {
1568
- delta: string;
1569
- id: string;
1570
- providerMetadata?: Record<string, Record<string, any>>;
1571
- type: "tool-input-delta";
1572
- }
1573
- | {
1574
- dynamic?: boolean;
1575
- input?: any;
1576
- output?: any;
1577
- providerExecuted?: boolean;
1578
- toolCallId: string;
1579
- toolName: string;
1580
- type: "tool-result";
1581
- }
1582
- | { rawValue: any; type: "raw" }
1583
- >;
1584
- start: number;
1585
- streamId: string;
1586
- },
1587
- boolean
1588
- >;
1589
- create: FunctionReference<
1590
- "mutation",
1591
- "public",
1592
- {
1593
- agentName?: string;
1594
- model?: string;
1595
- order: number;
1596
- provider?: string;
1597
- providerOptions?: Record<string, Record<string, any>>;
1598
- stepOrder: number;
1599
- threadId: string;
1600
- userId?: string;
1601
- },
1602
- string
1603
- >;
1604
- deleteAllStreamsForThreadIdAsync: FunctionReference<
1605
- "mutation",
1606
- "public",
1607
- { deltaCursor?: string; streamOrder?: number; threadId: string },
1608
- { deltaCursor?: string; isDone: boolean; streamOrder?: number }
1609
- >;
1610
- deleteAllStreamsForThreadIdSync: FunctionReference<
1611
- "action",
1612
- "public",
1613
- { threadId: string },
1614
- null
1615
- >;
1616
- deleteStreamAsync: FunctionReference<
1617
- "mutation",
1618
- "public",
1619
- { cursor?: string; streamId: string },
1620
- null
1621
- >;
1622
- deleteStreamSync: FunctionReference<
1623
- "mutation",
1624
- "public",
1625
- { streamId: string },
1626
- null
1627
- >;
1628
- finish: FunctionReference<
1629
- "mutation",
1630
- "public",
1631
- {
1632
- finalDelta?: {
1633
- end: number;
1634
- parts: Array<
1635
- | { textDelta: string; type: "text-delta" }
1636
- | { textDelta: string; type: "reasoning" }
1637
- | {
1638
- source: {
1639
- id: string;
1640
- providerOptions?: Record<string, Record<string, any>>;
1641
- sourceType: "url";
1642
- title?: string;
1643
- url?: string;
1644
- };
1645
- type: "source";
1646
- }
1647
- | {
1648
- args: any;
1649
- providerExecuted?: boolean;
1650
- providerOptions?: Record<string, Record<string, any>>;
1651
- toolCallId: string;
1652
- toolName: string;
1653
- type: "tool-call";
1654
- }
1655
- | {
1656
- args?: any;
1657
- experimental_content?: Array<
1658
- | { text: string; type: "text" }
1659
- | { data: string; mimeType?: string; type: "image" }
1660
- >;
1661
- isError?: boolean;
1662
- providerExecuted?: boolean;
1663
- providerOptions?: Record<string, Record<string, any>>;
1664
- result: any;
1665
- toolCallId: string;
1666
- toolName: string;
1667
- type: "tool-result";
1668
- }
1669
- | {
1670
- toolCallId: string;
1671
- toolName: string;
1672
- type: "tool-call-streaming-start";
1673
- }
1674
- | {
1675
- argsTextDelta: string;
1676
- toolCallId: string;
1677
- toolName: string;
1678
- type: "tool-call-delta";
1679
- }
1680
- | {
1681
- id: string;
1682
- providerMetadata?: Record<string, Record<string, any>>;
1683
- text: string;
1684
- type: "text-delta";
1685
- }
1686
- | {
1687
- id: string;
1688
- providerMetadata?: Record<string, Record<string, any>>;
1689
- text: string;
1690
- type: "reasoning-delta";
1691
- }
1692
- | {
1693
- id: string;
1694
- providerOptions?: Record<string, Record<string, any>>;
1695
- sourceType: "url";
1696
- title?: string;
1697
- type?: "source";
1698
- url?: string;
1699
- }
1700
- | {
1701
- filename?: string;
1702
- id: string;
1703
- mediaType: string;
1704
- providerMetadata?: Record<string, Record<string, any>>;
1705
- sourceType: "document";
1706
- title: string;
1707
- type: "source";
1708
- }
1709
- | {
1710
- dynamic?: boolean;
1711
- input: any;
1712
- providerExecuted?: boolean;
1713
- providerMetadata?: Record<string, Record<string, any>>;
1714
- toolCallId: string;
1715
- toolName: string;
1716
- type: "tool-call";
1717
- }
1718
- | {
1719
- dynamic?: boolean;
1720
- id: string;
1721
- providerExecuted?: boolean;
1722
- providerMetadata?: Record<string, Record<string, any>>;
1723
- toolName: string;
1724
- type: "tool-input-start";
1725
- }
1726
- | {
1727
- delta: string;
1728
- id: string;
1729
- providerMetadata?: Record<string, Record<string, any>>;
1730
- type: "tool-input-delta";
1731
- }
1732
- | {
1733
- dynamic?: boolean;
1734
- input?: any;
1735
- output?: any;
1736
- providerExecuted?: boolean;
1737
- toolCallId: string;
1738
- toolName: string;
1739
- type: "tool-result";
1740
- }
1741
- | { rawValue: any; type: "raw" }
1742
- >;
1743
- start: number;
1744
- streamId: string;
1745
- };
1746
- streamId: string;
1747
- },
1748
- null
1749
- >;
1750
- list: FunctionReference<
1751
- "query",
1752
- "public",
1753
- {
1754
- startOrder?: number;
1755
- statuses?: Array<"streaming" | "finished" | "aborted">;
1756
- threadId: string;
1757
- },
1758
- Array<{
1759
- agentName?: string;
1760
- model?: string;
1761
- order: number;
1762
- provider?: string;
1763
- providerOptions?: Record<string, Record<string, any>>;
1764
- status: "streaming" | "finished" | "aborted";
1765
- stepOrder: number;
1766
- streamId: string;
1767
- userId?: string;
1768
- }>
1769
- >;
1770
- listDeltas: FunctionReference<
1771
- "query",
1772
- "public",
1773
- {
1774
- cursors: Array<{ cursor: number; streamId: string }>;
1775
- threadId: string;
1776
- },
1777
- Array<{
1778
- end: number;
1779
- parts: Array<
1780
- | { textDelta: string; type: "text-delta" }
1781
- | { textDelta: string; type: "reasoning" }
1782
- | {
1783
- source: {
1784
- id: string;
1785
- providerOptions?: Record<string, Record<string, any>>;
1786
- sourceType: "url";
1787
- title?: string;
1788
- url?: string;
1789
- };
1790
- type: "source";
1791
- }
1792
- | {
1793
- args: any;
1794
- providerExecuted?: boolean;
1795
- providerOptions?: Record<string, Record<string, any>>;
1796
- toolCallId: string;
1797
- toolName: string;
1798
- type: "tool-call";
1799
- }
1800
- | {
1801
- args?: any;
1802
- experimental_content?: Array<
1803
- | { text: string; type: "text" }
1804
- | { data: string; mimeType?: string; type: "image" }
1805
- >;
1806
- isError?: boolean;
1807
- providerExecuted?: boolean;
1808
- providerOptions?: Record<string, Record<string, any>>;
1809
- result: any;
1810
- toolCallId: string;
1811
- toolName: string;
1812
- type: "tool-result";
1813
- }
1814
- | {
1815
- toolCallId: string;
1816
- toolName: string;
1817
- type: "tool-call-streaming-start";
1818
- }
1819
- | {
1820
- argsTextDelta: string;
1821
- toolCallId: string;
1822
- toolName: string;
1823
- type: "tool-call-delta";
1824
- }
1825
- | {
1826
- id: string;
1827
- providerMetadata?: Record<string, Record<string, any>>;
1828
- text: string;
1829
- type: "text-delta";
1830
- }
1831
- | {
1832
- id: string;
1833
- providerMetadata?: Record<string, Record<string, any>>;
1834
- text: string;
1835
- type: "reasoning-delta";
1836
- }
1837
- | {
1838
- id: string;
1839
- providerOptions?: Record<string, Record<string, any>>;
1840
- sourceType: "url";
1841
- title?: string;
1842
- type?: "source";
1843
- url?: string;
1844
- }
1845
- | {
1846
- filename?: string;
1847
- id: string;
1848
- mediaType: string;
1849
- providerMetadata?: Record<string, Record<string, any>>;
1850
- sourceType: "document";
1851
- title: string;
1852
- type: "source";
1853
- }
1854
- | {
1855
- dynamic?: boolean;
1856
- input: any;
1857
- providerExecuted?: boolean;
1858
- providerMetadata?: Record<string, Record<string, any>>;
1859
- toolCallId: string;
1860
- toolName: string;
1861
- type: "tool-call";
1862
- }
1863
- | {
1864
- dynamic?: boolean;
1865
- id: string;
1866
- providerExecuted?: boolean;
1867
- providerMetadata?: Record<string, Record<string, any>>;
1868
- toolName: string;
1869
- type: "tool-input-start";
1870
- }
1871
- | {
1872
- delta: string;
1873
- id: string;
1874
- providerMetadata?: Record<string, Record<string, any>>;
1875
- type: "tool-input-delta";
1876
- }
1877
- | {
1878
- dynamic?: boolean;
1879
- input?: any;
1880
- output?: any;
1881
- providerExecuted?: boolean;
1882
- toolCallId: string;
1883
- toolName: string;
1884
- type: "tool-result";
1885
- }
1886
- | { rawValue: any; type: "raw" }
1887
- >;
1888
- start: number;
1889
- streamId: string;
1890
- }>
1891
- >;
1892
- };
1893
- threads: {
1894
- createThread: FunctionReference<
1895
- "mutation",
1896
- "public",
1897
- {
1898
- defaultSystemPrompt?: string;
1899
- parentThreadIds?: Array<string>;
1900
- summary?: string;
1901
- title?: string;
1902
- userId?: string;
1903
- },
1904
- {
1905
- _creationTime: number;
1906
- _id: string;
1907
- status: "active" | "archived";
1908
- summary?: string;
1909
- title?: string;
1910
- userId?: string;
1911
- }
1912
- >;
1913
- deleteAllForThreadIdAsync: FunctionReference<
1914
- "mutation",
1915
- "public",
1916
- {
1917
- cursor?: string;
1918
- deltaCursor?: string;
1919
- limit?: number;
1920
- messagesDone?: boolean;
1921
- streamOrder?: number;
1922
- streamsDone?: boolean;
1923
- threadId: string;
1924
- },
1925
- { isDone: boolean }
1926
- >;
1927
- deleteAllForThreadIdSync: FunctionReference<
1928
- "action",
1929
- "public",
1930
- { limit?: number; threadId: string },
1931
- null
1932
- >;
1933
- getThread: FunctionReference<
1934
- "query",
1935
- "public",
1936
- { threadId: string },
1937
- {
1938
- _creationTime: number;
1939
- _id: string;
1940
- status: "active" | "archived";
1941
- summary?: string;
1942
- title?: string;
1943
- userId?: string;
1944
- } | null
1945
- >;
1946
- listThreadsByUserId: FunctionReference<
1947
- "query",
1948
- "public",
1949
- {
1950
- order?: "asc" | "desc";
1951
- paginationOpts?: {
1952
- cursor: string | null;
1953
- endCursor?: string | null;
1954
- id?: number;
1955
- maximumBytesRead?: number;
1956
- maximumRowsRead?: number;
1957
- numItems: number;
1958
- };
1959
- userId?: string;
1960
- },
1961
- {
1962
- continueCursor: string;
1963
- isDone: boolean;
1964
- page: Array<{
1965
- _creationTime: number;
1966
- _id: string;
1967
- status: "active" | "archived";
1968
- summary?: string;
1969
- title?: string;
1970
- userId?: string;
1971
- }>;
1972
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
1973
- splitCursor?: string | null;
1974
- }
1975
- >;
1976
- searchThreadTitles: FunctionReference<
1977
- "query",
1978
- "public",
1979
- { limit: number; query: string; userId?: string | null },
1980
- Array<{
1981
- _creationTime: number;
1982
- _id: string;
1983
- status: "active" | "archived";
1984
- summary?: string;
1985
- title?: string;
1986
- userId?: string;
1987
- }>
1988
- >;
1989
- updateThread: FunctionReference<
1990
- "mutation",
1991
- "public",
1992
- {
1993
- patch: {
1994
- status?: "active" | "archived";
1995
- summary?: string;
1996
- title?: string;
1997
- userId?: string;
1998
- };
1999
- threadId: string;
2000
- },
2001
- {
2002
- _creationTime: number;
2003
- _id: string;
2004
- status: "active" | "archived";
2005
- summary?: string;
2006
- title?: string;
2007
- userId?: string;
2008
- }
2009
- >;
2010
- };
2011
- users: {
2012
- deleteAllForUserId: FunctionReference<
2013
- "action",
2014
- "public",
2015
- { userId: string },
2016
- null
2017
- >;
2018
- deleteAllForUserIdAsync: FunctionReference<
2019
- "mutation",
2020
- "public",
2021
- { userId: string },
2022
- boolean
2023
- >;
2024
- listUsersWithThreads: FunctionReference<
2025
- "query",
2026
- "public",
2027
- {
2028
- paginationOpts: {
2029
- cursor: string | null;
2030
- endCursor?: string | null;
2031
- id?: number;
2032
- maximumBytesRead?: number;
2033
- maximumRowsRead?: number;
2034
- numItems: number;
2035
- };
2036
- },
2037
- {
2038
- continueCursor: string;
2039
- isDone: boolean;
2040
- page: Array<string>;
2041
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
2042
- splitCursor?: string | null;
2043
- }
2044
- >;
2045
- };
2046
- vector: {
2047
- index: {
2048
- deleteBatch: FunctionReference<
2049
- "mutation",
2050
- "public",
2051
- {
2052
- ids: Array<
2053
- | string
2054
- | string
2055
- | string
2056
- | string
2057
- | string
2058
- | string
2059
- | string
2060
- | string
2061
- | string
2062
- | string
2063
- >;
2064
- },
2065
- null
2066
- >;
2067
- deleteBatchForThread: FunctionReference<
2068
- "mutation",
2069
- "public",
2070
- {
2071
- cursor?: string;
2072
- limit: number;
2073
- model: string;
2074
- threadId: string;
2075
- vectorDimension:
2076
- | 128
2077
- | 256
2078
- | 512
2079
- | 768
2080
- | 1024
2081
- | 1408
2082
- | 1536
2083
- | 2048
2084
- | 3072
2085
- | 4096;
2086
- },
2087
- { continueCursor: string; isDone: boolean }
2088
- >;
2089
- insertBatch: FunctionReference<
2090
- "mutation",
2091
- "public",
2092
- {
2093
- vectorDimension:
2094
- | 128
2095
- | 256
2096
- | 512
2097
- | 768
2098
- | 1024
2099
- | 1408
2100
- | 1536
2101
- | 2048
2102
- | 3072
2103
- | 4096;
2104
- vectors: Array<{
2105
- messageId?: string;
2106
- model: string;
2107
- table: string;
2108
- threadId?: string;
2109
- userId?: string;
2110
- vector: Array<number>;
2111
- }>;
2112
- },
2113
- Array<
2114
- | string
2115
- | string
2116
- | string
2117
- | string
2118
- | string
2119
- | string
2120
- | string
2121
- | string
2122
- | string
2123
- | string
2124
- >
2125
- >;
2126
- paginate: FunctionReference<
2127
- "query",
2128
- "public",
2129
- {
2130
- cursor?: string;
2131
- limit: number;
2132
- table?: string;
2133
- targetModel: string;
2134
- vectorDimension:
2135
- | 128
2136
- | 256
2137
- | 512
2138
- | 768
2139
- | 1024
2140
- | 1408
2141
- | 1536
2142
- | 2048
2143
- | 3072
2144
- | 4096;
2145
- },
2146
- {
2147
- continueCursor: string;
2148
- ids: Array<
2149
- | string
2150
- | string
2151
- | string
2152
- | string
2153
- | string
2154
- | string
2155
- | string
2156
- | string
2157
- | string
2158
- | string
2159
- >;
2160
- isDone: boolean;
2161
- }
2162
- >;
2163
- updateBatch: FunctionReference<
2164
- "mutation",
2165
- "public",
2166
- {
2167
- vectors: Array<{
2168
- id:
2169
- | string
2170
- | string
2171
- | string
2172
- | string
2173
- | string
2174
- | string
2175
- | string
2176
- | string
2177
- | string
2178
- | string;
2179
- model: string;
2180
- vector: Array<number>;
2181
- }>;
2182
- },
2183
- null
2184
- >;
2185
- };
2186
- };
2187
- };
2188
- // For now fullApiWithMounts is only fullApi which provides
2189
- // jump-to-definition in component client code.
2190
- // Use Mounts for the same type without the inference.
2191
- declare const fullApiWithMounts: typeof fullApi;
2192
-
2193
- export declare const api: FilterApi<
2194
- typeof fullApiWithMounts,
2195
- FunctionReference<any, "public">
2196
- >;
2197
- export declare const internal: FilterApi<
2198
- typeof fullApiWithMounts,
2199
- FunctionReference<any, "internal">
2200
- >;
2201
-
36
+ export declare const api: FilterApi<typeof fullApi, FunctionReference<any, "public">>;
37
+ /**
38
+ * A utility for referencing Convex functions in your app's internal API.
39
+ *
40
+ * Usage:
41
+ * ```js
42
+ * const myFunctionReference = internal.myModule.myFunction;
43
+ * ```
44
+ */
45
+ export declare const internal: FilterApi<typeof fullApi, FunctionReference<any, "internal">>;
2202
46
  export declare const components: {};
47
+ export {};
48
+ //# sourceMappingURL=api.d.ts.map