@amaster.ai/dsh-storage 0.1.0

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 (97) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -0
  3. package/cordis.patch.yml +3 -0
  4. package/lib/backends/database.js +198 -0
  5. package/lib/generated/mysql/browser.js +17 -0
  6. package/lib/generated/mysql/client.js +34 -0
  7. package/lib/generated/mysql/commonInputTypes.js +10 -0
  8. package/lib/generated/mysql/enums.js +10 -0
  9. package/lib/generated/mysql/internal/class.js +49 -0
  10. package/lib/generated/mysql/internal/prismaNamespace.js +146 -0
  11. package/lib/generated/mysql/internal/prismaNamespaceBrowser.js +117 -0
  12. package/lib/generated/mysql/models/AiChatHistory.js +1 -0
  13. package/lib/generated/mysql/models/AiMessage.js +1 -0
  14. package/lib/generated/mysql/models.js +1 -0
  15. package/lib/generated/postgresql/browser.js +17 -0
  16. package/lib/generated/postgresql/client.js +34 -0
  17. package/lib/generated/postgresql/commonInputTypes.js +10 -0
  18. package/lib/generated/postgresql/enums.js +10 -0
  19. package/lib/generated/postgresql/internal/class.js +49 -0
  20. package/lib/generated/postgresql/internal/prismaNamespace.js +131 -0
  21. package/lib/generated/postgresql/internal/prismaNamespaceBrowser.js +102 -0
  22. package/lib/generated/postgresql/models/AiChatHistory.js +1 -0
  23. package/lib/generated/postgresql/models/AiMessage.js +1 -0
  24. package/lib/generated/postgresql/models.js +1 -0
  25. package/lib/generated/sqlite/browser.js +17 -0
  26. package/lib/generated/sqlite/client.js +34 -0
  27. package/lib/generated/sqlite/commonInputTypes.js +10 -0
  28. package/lib/generated/sqlite/enums.js +10 -0
  29. package/lib/generated/sqlite/internal/class.js +49 -0
  30. package/lib/generated/sqlite/internal/prismaNamespace.js +128 -0
  31. package/lib/generated/sqlite/internal/prismaNamespaceBrowser.js +99 -0
  32. package/lib/generated/sqlite/models/AiChatHistory.js +1 -0
  33. package/lib/generated/sqlite/models/AiMessage.js +1 -0
  34. package/lib/generated/sqlite/models.js +1 -0
  35. package/lib/generated/sqlserver/browser.js +17 -0
  36. package/lib/generated/sqlserver/client.js +34 -0
  37. package/lib/generated/sqlserver/commonInputTypes.js +10 -0
  38. package/lib/generated/sqlserver/enums.js +10 -0
  39. package/lib/generated/sqlserver/internal/class.js +49 -0
  40. package/lib/generated/sqlserver/internal/prismaNamespace.js +119 -0
  41. package/lib/generated/sqlserver/internal/prismaNamespaceBrowser.js +90 -0
  42. package/lib/generated/sqlserver/models/AiChatHistory.js +1 -0
  43. package/lib/generated/sqlserver/models/AiMessage.js +1 -0
  44. package/lib/generated/sqlserver/models.js +1 -0
  45. package/lib/index.js +224 -0
  46. package/lib/projector.js +153 -0
  47. package/lib/types/backends/database.d.ts +37 -0
  48. package/lib/types/generated/mysql/browser.d.ts +15 -0
  49. package/lib/types/generated/mysql/client.d.ts +34 -0
  50. package/lib/types/generated/mysql/commonInputTypes.d.ts +396 -0
  51. package/lib/types/generated/mysql/enums.d.ts +1 -0
  52. package/lib/types/generated/mysql/internal/class.d.ts +143 -0
  53. package/lib/types/generated/mysql/internal/prismaNamespace.d.ts +709 -0
  54. package/lib/types/generated/mysql/internal/prismaNamespaceBrowser.d.ts +112 -0
  55. package/lib/types/generated/mysql/models/AiChatHistory.d.ts +1258 -0
  56. package/lib/types/generated/mysql/models/AiMessage.d.ts +1360 -0
  57. package/lib/types/generated/mysql/models.d.ts +3 -0
  58. package/lib/types/generated/postgresql/browser.d.ts +15 -0
  59. package/lib/types/generated/postgresql/client.d.ts +34 -0
  60. package/lib/types/generated/postgresql/commonInputTypes.d.ts +392 -0
  61. package/lib/types/generated/postgresql/enums.d.ts +1 -0
  62. package/lib/types/generated/postgresql/internal/class.d.ts +143 -0
  63. package/lib/types/generated/postgresql/internal/prismaNamespace.d.ts +728 -0
  64. package/lib/types/generated/postgresql/internal/prismaNamespaceBrowser.d.ts +95 -0
  65. package/lib/types/generated/postgresql/models/AiChatHistory.d.ts +1373 -0
  66. package/lib/types/generated/postgresql/models/AiMessage.d.ts +1497 -0
  67. package/lib/types/generated/postgresql/models.d.ts +3 -0
  68. package/lib/types/generated/sqlite/browser.d.ts +15 -0
  69. package/lib/types/generated/sqlite/client.d.ts +34 -0
  70. package/lib/types/generated/sqlite/commonInputTypes.d.ts +373 -0
  71. package/lib/types/generated/sqlite/enums.d.ts +1 -0
  72. package/lib/types/generated/sqlite/internal/class.d.ts +143 -0
  73. package/lib/types/generated/sqlite/internal/prismaNamespace.d.ts +705 -0
  74. package/lib/types/generated/sqlite/internal/prismaNamespaceBrowser.d.ts +92 -0
  75. package/lib/types/generated/sqlite/models/AiChatHistory.d.ts +1371 -0
  76. package/lib/types/generated/sqlite/models/AiMessage.d.ts +1494 -0
  77. package/lib/types/generated/sqlite/models.d.ts +3 -0
  78. package/lib/types/generated/sqlserver/browser.d.ts +15 -0
  79. package/lib/types/generated/sqlserver/client.d.ts +34 -0
  80. package/lib/types/generated/sqlserver/commonInputTypes.d.ts +333 -0
  81. package/lib/types/generated/sqlserver/enums.d.ts +1 -0
  82. package/lib/types/generated/sqlserver/internal/class.d.ts +143 -0
  83. package/lib/types/generated/sqlserver/internal/prismaNamespace.d.ts +669 -0
  84. package/lib/types/generated/sqlserver/internal/prismaNamespaceBrowser.d.ts +80 -0
  85. package/lib/types/generated/sqlserver/models/AiChatHistory.d.ts +1257 -0
  86. package/lib/types/generated/sqlserver/models/AiMessage.d.ts +1376 -0
  87. package/lib/types/generated/sqlserver/models.d.ts +3 -0
  88. package/lib/types/index.d.ts +56 -0
  89. package/lib/types/projector.d.ts +48 -0
  90. package/lib/types/types.d.ts +49 -0
  91. package/lib/types.js +8 -0
  92. package/package.json +85 -0
  93. package/preview.png +0 -0
  94. package/prisma/schema.mysql.prisma +75 -0
  95. package/prisma/schema.postgresql.prisma +67 -0
  96. package/prisma/schema.sqlite.prisma +67 -0
  97. package/prisma/schema.sqlserver.prisma +73 -0
@@ -0,0 +1,1360 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace.js";
3
+ /**
4
+ * Model AiMessage
5
+ * One row per projected session event (user message, assistant message,
6
+ * tool call/result, compression snapshot, ...).
7
+ */
8
+ export type AiMessageModel = runtime.Types.Result.DefaultSelection<Prisma.$AiMessagePayload>;
9
+ export type AggregateAiMessage = {
10
+ _count: AiMessageCountAggregateOutputType | null;
11
+ _min: AiMessageMinAggregateOutputType | null;
12
+ _max: AiMessageMaxAggregateOutputType | null;
13
+ };
14
+ export type AiMessageMinAggregateOutputType = {
15
+ id: string | null;
16
+ sessionId: string | null;
17
+ historyId: string | null;
18
+ type: string | null;
19
+ content: string | null;
20
+ model: string | null;
21
+ agentId: string | null;
22
+ createdAt: Date | null;
23
+ updatedAt: Date | null;
24
+ deletedAt: Date | null;
25
+ };
26
+ export type AiMessageMaxAggregateOutputType = {
27
+ id: string | null;
28
+ sessionId: string | null;
29
+ historyId: string | null;
30
+ type: string | null;
31
+ content: string | null;
32
+ model: string | null;
33
+ agentId: string | null;
34
+ createdAt: Date | null;
35
+ updatedAt: Date | null;
36
+ deletedAt: Date | null;
37
+ };
38
+ export type AiMessageCountAggregateOutputType = {
39
+ id: number;
40
+ sessionId: number;
41
+ historyId: number;
42
+ type: number;
43
+ content: number;
44
+ thoughts: number;
45
+ model: number;
46
+ tokens: number;
47
+ toolCalls: number;
48
+ agentId: number;
49
+ metadata: number;
50
+ createdAt: number;
51
+ updatedAt: number;
52
+ deletedAt: number;
53
+ _all: number;
54
+ };
55
+ export type AiMessageMinAggregateInputType = {
56
+ id?: true;
57
+ sessionId?: true;
58
+ historyId?: true;
59
+ type?: true;
60
+ content?: true;
61
+ model?: true;
62
+ agentId?: true;
63
+ createdAt?: true;
64
+ updatedAt?: true;
65
+ deletedAt?: true;
66
+ };
67
+ export type AiMessageMaxAggregateInputType = {
68
+ id?: true;
69
+ sessionId?: true;
70
+ historyId?: true;
71
+ type?: true;
72
+ content?: true;
73
+ model?: true;
74
+ agentId?: true;
75
+ createdAt?: true;
76
+ updatedAt?: true;
77
+ deletedAt?: true;
78
+ };
79
+ export type AiMessageCountAggregateInputType = {
80
+ id?: true;
81
+ sessionId?: true;
82
+ historyId?: true;
83
+ type?: true;
84
+ content?: true;
85
+ thoughts?: true;
86
+ model?: true;
87
+ tokens?: true;
88
+ toolCalls?: true;
89
+ agentId?: true;
90
+ metadata?: true;
91
+ createdAt?: true;
92
+ updatedAt?: true;
93
+ deletedAt?: true;
94
+ _all?: true;
95
+ };
96
+ export type AiMessageAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
97
+ /**
98
+ * Filter which AiMessage to aggregate.
99
+ */
100
+ where?: Prisma.AiMessageWhereInput;
101
+ /**
102
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
103
+ *
104
+ * Determine the order of AiMessages to fetch.
105
+ */
106
+ orderBy?: Prisma.AiMessageOrderByWithRelationInput | Prisma.AiMessageOrderByWithRelationInput[];
107
+ /**
108
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
109
+ *
110
+ * Sets the start position
111
+ */
112
+ cursor?: Prisma.AiMessageWhereUniqueInput;
113
+ /**
114
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
115
+ *
116
+ * Take `±n` AiMessages from the position of the cursor.
117
+ */
118
+ take?: number;
119
+ /**
120
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
121
+ *
122
+ * Skip the first `n` AiMessages.
123
+ */
124
+ skip?: number;
125
+ /**
126
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
127
+ *
128
+ * Count returned AiMessages
129
+ **/
130
+ _count?: true | AiMessageCountAggregateInputType;
131
+ /**
132
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
133
+ *
134
+ * Select which fields to find the minimum value
135
+ **/
136
+ _min?: AiMessageMinAggregateInputType;
137
+ /**
138
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
139
+ *
140
+ * Select which fields to find the maximum value
141
+ **/
142
+ _max?: AiMessageMaxAggregateInputType;
143
+ };
144
+ export type GetAiMessageAggregateType<T extends AiMessageAggregateArgs> = {
145
+ [P in keyof T & keyof AggregateAiMessage]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateAiMessage[P]> : Prisma.GetScalarType<T[P], AggregateAiMessage[P]>;
146
+ };
147
+ export type AiMessageGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
148
+ where?: Prisma.AiMessageWhereInput;
149
+ orderBy?: Prisma.AiMessageOrderByWithAggregationInput | Prisma.AiMessageOrderByWithAggregationInput[];
150
+ by: Prisma.AiMessageScalarFieldEnum[] | Prisma.AiMessageScalarFieldEnum;
151
+ having?: Prisma.AiMessageScalarWhereWithAggregatesInput;
152
+ take?: number;
153
+ skip?: number;
154
+ _count?: AiMessageCountAggregateInputType | true;
155
+ _min?: AiMessageMinAggregateInputType;
156
+ _max?: AiMessageMaxAggregateInputType;
157
+ };
158
+ export type AiMessageGroupByOutputType = {
159
+ id: string;
160
+ sessionId: string;
161
+ historyId: string | null;
162
+ type: string;
163
+ content: string;
164
+ thoughts: runtime.JsonValue | null;
165
+ model: string | null;
166
+ tokens: runtime.JsonValue | null;
167
+ toolCalls: runtime.JsonValue | null;
168
+ agentId: string | null;
169
+ metadata: runtime.JsonValue | null;
170
+ createdAt: Date;
171
+ updatedAt: Date;
172
+ deletedAt: Date | null;
173
+ _count: AiMessageCountAggregateOutputType | null;
174
+ _min: AiMessageMinAggregateOutputType | null;
175
+ _max: AiMessageMaxAggregateOutputType | null;
176
+ };
177
+ export type GetAiMessageGroupByPayload<T extends AiMessageGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<AiMessageGroupByOutputType, T['by']> & {
178
+ [P in ((keyof T) & (keyof AiMessageGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], AiMessageGroupByOutputType[P]> : Prisma.GetScalarType<T[P], AiMessageGroupByOutputType[P]>;
179
+ }>>;
180
+ export type AiMessageWhereInput = {
181
+ AND?: Prisma.AiMessageWhereInput | Prisma.AiMessageWhereInput[];
182
+ OR?: Prisma.AiMessageWhereInput[];
183
+ NOT?: Prisma.AiMessageWhereInput | Prisma.AiMessageWhereInput[];
184
+ id?: Prisma.StringFilter<"AiMessage"> | string;
185
+ sessionId?: Prisma.StringFilter<"AiMessage"> | string;
186
+ historyId?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
187
+ type?: Prisma.StringFilter<"AiMessage"> | string;
188
+ content?: Prisma.StringFilter<"AiMessage"> | string;
189
+ thoughts?: Prisma.JsonNullableFilter<"AiMessage">;
190
+ model?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
191
+ tokens?: Prisma.JsonNullableFilter<"AiMessage">;
192
+ toolCalls?: Prisma.JsonNullableFilter<"AiMessage">;
193
+ agentId?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
194
+ metadata?: Prisma.JsonNullableFilter<"AiMessage">;
195
+ createdAt?: Prisma.DateTimeFilter<"AiMessage"> | Date | string;
196
+ updatedAt?: Prisma.DateTimeFilter<"AiMessage"> | Date | string;
197
+ deletedAt?: Prisma.DateTimeNullableFilter<"AiMessage"> | Date | string | null;
198
+ history?: Prisma.XOR<Prisma.AiChatHistoryNullableScalarRelationFilter, Prisma.AiChatHistoryWhereInput> | null;
199
+ };
200
+ export type AiMessageOrderByWithRelationInput = {
201
+ id?: Prisma.SortOrder;
202
+ sessionId?: Prisma.SortOrder;
203
+ historyId?: Prisma.SortOrderInput | Prisma.SortOrder;
204
+ type?: Prisma.SortOrder;
205
+ content?: Prisma.SortOrder;
206
+ thoughts?: Prisma.SortOrderInput | Prisma.SortOrder;
207
+ model?: Prisma.SortOrderInput | Prisma.SortOrder;
208
+ tokens?: Prisma.SortOrderInput | Prisma.SortOrder;
209
+ toolCalls?: Prisma.SortOrderInput | Prisma.SortOrder;
210
+ agentId?: Prisma.SortOrderInput | Prisma.SortOrder;
211
+ metadata?: Prisma.SortOrderInput | Prisma.SortOrder;
212
+ createdAt?: Prisma.SortOrder;
213
+ updatedAt?: Prisma.SortOrder;
214
+ deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
215
+ history?: Prisma.AiChatHistoryOrderByWithRelationInput;
216
+ _relevance?: Prisma.AiMessageOrderByRelevanceInput;
217
+ };
218
+ export type AiMessageWhereUniqueInput = Prisma.AtLeast<{
219
+ id?: string;
220
+ AND?: Prisma.AiMessageWhereInput | Prisma.AiMessageWhereInput[];
221
+ OR?: Prisma.AiMessageWhereInput[];
222
+ NOT?: Prisma.AiMessageWhereInput | Prisma.AiMessageWhereInput[];
223
+ sessionId?: Prisma.StringFilter<"AiMessage"> | string;
224
+ historyId?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
225
+ type?: Prisma.StringFilter<"AiMessage"> | string;
226
+ content?: Prisma.StringFilter<"AiMessage"> | string;
227
+ thoughts?: Prisma.JsonNullableFilter<"AiMessage">;
228
+ model?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
229
+ tokens?: Prisma.JsonNullableFilter<"AiMessage">;
230
+ toolCalls?: Prisma.JsonNullableFilter<"AiMessage">;
231
+ agentId?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
232
+ metadata?: Prisma.JsonNullableFilter<"AiMessage">;
233
+ createdAt?: Prisma.DateTimeFilter<"AiMessage"> | Date | string;
234
+ updatedAt?: Prisma.DateTimeFilter<"AiMessage"> | Date | string;
235
+ deletedAt?: Prisma.DateTimeNullableFilter<"AiMessage"> | Date | string | null;
236
+ history?: Prisma.XOR<Prisma.AiChatHistoryNullableScalarRelationFilter, Prisma.AiChatHistoryWhereInput> | null;
237
+ }, "id">;
238
+ export type AiMessageOrderByWithAggregationInput = {
239
+ id?: Prisma.SortOrder;
240
+ sessionId?: Prisma.SortOrder;
241
+ historyId?: Prisma.SortOrderInput | Prisma.SortOrder;
242
+ type?: Prisma.SortOrder;
243
+ content?: Prisma.SortOrder;
244
+ thoughts?: Prisma.SortOrderInput | Prisma.SortOrder;
245
+ model?: Prisma.SortOrderInput | Prisma.SortOrder;
246
+ tokens?: Prisma.SortOrderInput | Prisma.SortOrder;
247
+ toolCalls?: Prisma.SortOrderInput | Prisma.SortOrder;
248
+ agentId?: Prisma.SortOrderInput | Prisma.SortOrder;
249
+ metadata?: Prisma.SortOrderInput | Prisma.SortOrder;
250
+ createdAt?: Prisma.SortOrder;
251
+ updatedAt?: Prisma.SortOrder;
252
+ deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder;
253
+ _count?: Prisma.AiMessageCountOrderByAggregateInput;
254
+ _max?: Prisma.AiMessageMaxOrderByAggregateInput;
255
+ _min?: Prisma.AiMessageMinOrderByAggregateInput;
256
+ };
257
+ export type AiMessageScalarWhereWithAggregatesInput = {
258
+ AND?: Prisma.AiMessageScalarWhereWithAggregatesInput | Prisma.AiMessageScalarWhereWithAggregatesInput[];
259
+ OR?: Prisma.AiMessageScalarWhereWithAggregatesInput[];
260
+ NOT?: Prisma.AiMessageScalarWhereWithAggregatesInput | Prisma.AiMessageScalarWhereWithAggregatesInput[];
261
+ id?: Prisma.StringWithAggregatesFilter<"AiMessage"> | string;
262
+ sessionId?: Prisma.StringWithAggregatesFilter<"AiMessage"> | string;
263
+ historyId?: Prisma.StringNullableWithAggregatesFilter<"AiMessage"> | string | null;
264
+ type?: Prisma.StringWithAggregatesFilter<"AiMessage"> | string;
265
+ content?: Prisma.StringWithAggregatesFilter<"AiMessage"> | string;
266
+ thoughts?: Prisma.JsonNullableWithAggregatesFilter<"AiMessage">;
267
+ model?: Prisma.StringNullableWithAggregatesFilter<"AiMessage"> | string | null;
268
+ tokens?: Prisma.JsonNullableWithAggregatesFilter<"AiMessage">;
269
+ toolCalls?: Prisma.JsonNullableWithAggregatesFilter<"AiMessage">;
270
+ agentId?: Prisma.StringNullableWithAggregatesFilter<"AiMessage"> | string | null;
271
+ metadata?: Prisma.JsonNullableWithAggregatesFilter<"AiMessage">;
272
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"AiMessage"> | Date | string;
273
+ updatedAt?: Prisma.DateTimeWithAggregatesFilter<"AiMessage"> | Date | string;
274
+ deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"AiMessage"> | Date | string | null;
275
+ };
276
+ export type AiMessageCreateInput = {
277
+ id?: string;
278
+ sessionId: string;
279
+ type: string;
280
+ content: string;
281
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
282
+ model?: string | null;
283
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
284
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
285
+ agentId?: string | null;
286
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
287
+ createdAt?: Date | string;
288
+ updatedAt?: Date | string;
289
+ deletedAt?: Date | string | null;
290
+ history?: Prisma.AiChatHistoryCreateNestedOneWithoutMessagesInput;
291
+ };
292
+ export type AiMessageUncheckedCreateInput = {
293
+ id?: string;
294
+ sessionId: string;
295
+ historyId?: string | null;
296
+ type: string;
297
+ content: string;
298
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
299
+ model?: string | null;
300
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
301
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
302
+ agentId?: string | null;
303
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
304
+ createdAt?: Date | string;
305
+ updatedAt?: Date | string;
306
+ deletedAt?: Date | string | null;
307
+ };
308
+ export type AiMessageUpdateInput = {
309
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
310
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
311
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
312
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
313
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
314
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
315
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
316
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
317
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
318
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
319
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
320
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
321
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
322
+ history?: Prisma.AiChatHistoryUpdateOneWithoutMessagesNestedInput;
323
+ };
324
+ export type AiMessageUncheckedUpdateInput = {
325
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
326
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
327
+ historyId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
328
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
329
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
330
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
331
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
332
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
333
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
334
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
335
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
336
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
337
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
338
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
339
+ };
340
+ export type AiMessageCreateManyInput = {
341
+ id?: string;
342
+ sessionId: string;
343
+ historyId?: string | null;
344
+ type: string;
345
+ content: string;
346
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
347
+ model?: string | null;
348
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
349
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
350
+ agentId?: string | null;
351
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
352
+ createdAt?: Date | string;
353
+ updatedAt?: Date | string;
354
+ deletedAt?: Date | string | null;
355
+ };
356
+ export type AiMessageUpdateManyMutationInput = {
357
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
358
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
359
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
360
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
361
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
362
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
363
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
364
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
365
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
366
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
367
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
368
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
369
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
370
+ };
371
+ export type AiMessageUncheckedUpdateManyInput = {
372
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
373
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
374
+ historyId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
375
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
376
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
377
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
378
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
379
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
380
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
381
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
382
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
383
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
384
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
385
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
386
+ };
387
+ export type AiMessageOrderByRelevanceInput = {
388
+ fields: Prisma.AiMessageOrderByRelevanceFieldEnum | Prisma.AiMessageOrderByRelevanceFieldEnum[];
389
+ sort: Prisma.SortOrder;
390
+ search: string;
391
+ };
392
+ export type AiMessageCountOrderByAggregateInput = {
393
+ id?: Prisma.SortOrder;
394
+ sessionId?: Prisma.SortOrder;
395
+ historyId?: Prisma.SortOrder;
396
+ type?: Prisma.SortOrder;
397
+ content?: Prisma.SortOrder;
398
+ thoughts?: Prisma.SortOrder;
399
+ model?: Prisma.SortOrder;
400
+ tokens?: Prisma.SortOrder;
401
+ toolCalls?: Prisma.SortOrder;
402
+ agentId?: Prisma.SortOrder;
403
+ metadata?: Prisma.SortOrder;
404
+ createdAt?: Prisma.SortOrder;
405
+ updatedAt?: Prisma.SortOrder;
406
+ deletedAt?: Prisma.SortOrder;
407
+ };
408
+ export type AiMessageMaxOrderByAggregateInput = {
409
+ id?: Prisma.SortOrder;
410
+ sessionId?: Prisma.SortOrder;
411
+ historyId?: Prisma.SortOrder;
412
+ type?: Prisma.SortOrder;
413
+ content?: Prisma.SortOrder;
414
+ model?: Prisma.SortOrder;
415
+ agentId?: Prisma.SortOrder;
416
+ createdAt?: Prisma.SortOrder;
417
+ updatedAt?: Prisma.SortOrder;
418
+ deletedAt?: Prisma.SortOrder;
419
+ };
420
+ export type AiMessageMinOrderByAggregateInput = {
421
+ id?: Prisma.SortOrder;
422
+ sessionId?: Prisma.SortOrder;
423
+ historyId?: Prisma.SortOrder;
424
+ type?: Prisma.SortOrder;
425
+ content?: Prisma.SortOrder;
426
+ model?: Prisma.SortOrder;
427
+ agentId?: Prisma.SortOrder;
428
+ createdAt?: Prisma.SortOrder;
429
+ updatedAt?: Prisma.SortOrder;
430
+ deletedAt?: Prisma.SortOrder;
431
+ };
432
+ export type AiMessageListRelationFilter = {
433
+ every?: Prisma.AiMessageWhereInput;
434
+ some?: Prisma.AiMessageWhereInput;
435
+ none?: Prisma.AiMessageWhereInput;
436
+ };
437
+ export type AiMessageOrderByRelationAggregateInput = {
438
+ _count?: Prisma.SortOrder;
439
+ };
440
+ export type StringFieldUpdateOperationsInput = {
441
+ set?: string;
442
+ };
443
+ export type NullableStringFieldUpdateOperationsInput = {
444
+ set?: string | null;
445
+ };
446
+ export type DateTimeFieldUpdateOperationsInput = {
447
+ set?: Date | string;
448
+ };
449
+ export type NullableDateTimeFieldUpdateOperationsInput = {
450
+ set?: Date | string | null;
451
+ };
452
+ export type AiMessageCreateNestedManyWithoutHistoryInput = {
453
+ create?: Prisma.XOR<Prisma.AiMessageCreateWithoutHistoryInput, Prisma.AiMessageUncheckedCreateWithoutHistoryInput> | Prisma.AiMessageCreateWithoutHistoryInput[] | Prisma.AiMessageUncheckedCreateWithoutHistoryInput[];
454
+ connectOrCreate?: Prisma.AiMessageCreateOrConnectWithoutHistoryInput | Prisma.AiMessageCreateOrConnectWithoutHistoryInput[];
455
+ createMany?: Prisma.AiMessageCreateManyHistoryInputEnvelope;
456
+ connect?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
457
+ };
458
+ export type AiMessageUncheckedCreateNestedManyWithoutHistoryInput = {
459
+ create?: Prisma.XOR<Prisma.AiMessageCreateWithoutHistoryInput, Prisma.AiMessageUncheckedCreateWithoutHistoryInput> | Prisma.AiMessageCreateWithoutHistoryInput[] | Prisma.AiMessageUncheckedCreateWithoutHistoryInput[];
460
+ connectOrCreate?: Prisma.AiMessageCreateOrConnectWithoutHistoryInput | Prisma.AiMessageCreateOrConnectWithoutHistoryInput[];
461
+ createMany?: Prisma.AiMessageCreateManyHistoryInputEnvelope;
462
+ connect?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
463
+ };
464
+ export type AiMessageUpdateManyWithoutHistoryNestedInput = {
465
+ create?: Prisma.XOR<Prisma.AiMessageCreateWithoutHistoryInput, Prisma.AiMessageUncheckedCreateWithoutHistoryInput> | Prisma.AiMessageCreateWithoutHistoryInput[] | Prisma.AiMessageUncheckedCreateWithoutHistoryInput[];
466
+ connectOrCreate?: Prisma.AiMessageCreateOrConnectWithoutHistoryInput | Prisma.AiMessageCreateOrConnectWithoutHistoryInput[];
467
+ upsert?: Prisma.AiMessageUpsertWithWhereUniqueWithoutHistoryInput | Prisma.AiMessageUpsertWithWhereUniqueWithoutHistoryInput[];
468
+ createMany?: Prisma.AiMessageCreateManyHistoryInputEnvelope;
469
+ set?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
470
+ disconnect?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
471
+ delete?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
472
+ connect?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
473
+ update?: Prisma.AiMessageUpdateWithWhereUniqueWithoutHistoryInput | Prisma.AiMessageUpdateWithWhereUniqueWithoutHistoryInput[];
474
+ updateMany?: Prisma.AiMessageUpdateManyWithWhereWithoutHistoryInput | Prisma.AiMessageUpdateManyWithWhereWithoutHistoryInput[];
475
+ deleteMany?: Prisma.AiMessageScalarWhereInput | Prisma.AiMessageScalarWhereInput[];
476
+ };
477
+ export type AiMessageUncheckedUpdateManyWithoutHistoryNestedInput = {
478
+ create?: Prisma.XOR<Prisma.AiMessageCreateWithoutHistoryInput, Prisma.AiMessageUncheckedCreateWithoutHistoryInput> | Prisma.AiMessageCreateWithoutHistoryInput[] | Prisma.AiMessageUncheckedCreateWithoutHistoryInput[];
479
+ connectOrCreate?: Prisma.AiMessageCreateOrConnectWithoutHistoryInput | Prisma.AiMessageCreateOrConnectWithoutHistoryInput[];
480
+ upsert?: Prisma.AiMessageUpsertWithWhereUniqueWithoutHistoryInput | Prisma.AiMessageUpsertWithWhereUniqueWithoutHistoryInput[];
481
+ createMany?: Prisma.AiMessageCreateManyHistoryInputEnvelope;
482
+ set?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
483
+ disconnect?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
484
+ delete?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
485
+ connect?: Prisma.AiMessageWhereUniqueInput | Prisma.AiMessageWhereUniqueInput[];
486
+ update?: Prisma.AiMessageUpdateWithWhereUniqueWithoutHistoryInput | Prisma.AiMessageUpdateWithWhereUniqueWithoutHistoryInput[];
487
+ updateMany?: Prisma.AiMessageUpdateManyWithWhereWithoutHistoryInput | Prisma.AiMessageUpdateManyWithWhereWithoutHistoryInput[];
488
+ deleteMany?: Prisma.AiMessageScalarWhereInput | Prisma.AiMessageScalarWhereInput[];
489
+ };
490
+ export type AiMessageCreateWithoutHistoryInput = {
491
+ id?: string;
492
+ sessionId: string;
493
+ type: string;
494
+ content: string;
495
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
496
+ model?: string | null;
497
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
498
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
499
+ agentId?: string | null;
500
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
501
+ createdAt?: Date | string;
502
+ updatedAt?: Date | string;
503
+ deletedAt?: Date | string | null;
504
+ };
505
+ export type AiMessageUncheckedCreateWithoutHistoryInput = {
506
+ id?: string;
507
+ sessionId: string;
508
+ type: string;
509
+ content: string;
510
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
511
+ model?: string | null;
512
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
513
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
514
+ agentId?: string | null;
515
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
516
+ createdAt?: Date | string;
517
+ updatedAt?: Date | string;
518
+ deletedAt?: Date | string | null;
519
+ };
520
+ export type AiMessageCreateOrConnectWithoutHistoryInput = {
521
+ where: Prisma.AiMessageWhereUniqueInput;
522
+ create: Prisma.XOR<Prisma.AiMessageCreateWithoutHistoryInput, Prisma.AiMessageUncheckedCreateWithoutHistoryInput>;
523
+ };
524
+ export type AiMessageCreateManyHistoryInputEnvelope = {
525
+ data: Prisma.AiMessageCreateManyHistoryInput | Prisma.AiMessageCreateManyHistoryInput[];
526
+ skipDuplicates?: boolean;
527
+ };
528
+ export type AiMessageUpsertWithWhereUniqueWithoutHistoryInput = {
529
+ where: Prisma.AiMessageWhereUniqueInput;
530
+ update: Prisma.XOR<Prisma.AiMessageUpdateWithoutHistoryInput, Prisma.AiMessageUncheckedUpdateWithoutHistoryInput>;
531
+ create: Prisma.XOR<Prisma.AiMessageCreateWithoutHistoryInput, Prisma.AiMessageUncheckedCreateWithoutHistoryInput>;
532
+ };
533
+ export type AiMessageUpdateWithWhereUniqueWithoutHistoryInput = {
534
+ where: Prisma.AiMessageWhereUniqueInput;
535
+ data: Prisma.XOR<Prisma.AiMessageUpdateWithoutHistoryInput, Prisma.AiMessageUncheckedUpdateWithoutHistoryInput>;
536
+ };
537
+ export type AiMessageUpdateManyWithWhereWithoutHistoryInput = {
538
+ where: Prisma.AiMessageScalarWhereInput;
539
+ data: Prisma.XOR<Prisma.AiMessageUpdateManyMutationInput, Prisma.AiMessageUncheckedUpdateManyWithoutHistoryInput>;
540
+ };
541
+ export type AiMessageScalarWhereInput = {
542
+ AND?: Prisma.AiMessageScalarWhereInput | Prisma.AiMessageScalarWhereInput[];
543
+ OR?: Prisma.AiMessageScalarWhereInput[];
544
+ NOT?: Prisma.AiMessageScalarWhereInput | Prisma.AiMessageScalarWhereInput[];
545
+ id?: Prisma.StringFilter<"AiMessage"> | string;
546
+ sessionId?: Prisma.StringFilter<"AiMessage"> | string;
547
+ historyId?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
548
+ type?: Prisma.StringFilter<"AiMessage"> | string;
549
+ content?: Prisma.StringFilter<"AiMessage"> | string;
550
+ thoughts?: Prisma.JsonNullableFilter<"AiMessage">;
551
+ model?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
552
+ tokens?: Prisma.JsonNullableFilter<"AiMessage">;
553
+ toolCalls?: Prisma.JsonNullableFilter<"AiMessage">;
554
+ agentId?: Prisma.StringNullableFilter<"AiMessage"> | string | null;
555
+ metadata?: Prisma.JsonNullableFilter<"AiMessage">;
556
+ createdAt?: Prisma.DateTimeFilter<"AiMessage"> | Date | string;
557
+ updatedAt?: Prisma.DateTimeFilter<"AiMessage"> | Date | string;
558
+ deletedAt?: Prisma.DateTimeNullableFilter<"AiMessage"> | Date | string | null;
559
+ };
560
+ export type AiMessageCreateManyHistoryInput = {
561
+ id?: string;
562
+ sessionId: string;
563
+ type: string;
564
+ content: string;
565
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
566
+ model?: string | null;
567
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
568
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
569
+ agentId?: string | null;
570
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
571
+ createdAt?: Date | string;
572
+ updatedAt?: Date | string;
573
+ deletedAt?: Date | string | null;
574
+ };
575
+ export type AiMessageUpdateWithoutHistoryInput = {
576
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
577
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
578
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
579
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
580
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
581
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
582
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
583
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
584
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
585
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
586
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
587
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
588
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
589
+ };
590
+ export type AiMessageUncheckedUpdateWithoutHistoryInput = {
591
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
592
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
593
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
594
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
595
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
596
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
597
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
598
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
599
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
600
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
601
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
602
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
603
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
604
+ };
605
+ export type AiMessageUncheckedUpdateManyWithoutHistoryInput = {
606
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
607
+ sessionId?: Prisma.StringFieldUpdateOperationsInput | string;
608
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
609
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
610
+ thoughts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
611
+ model?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
612
+ tokens?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
613
+ toolCalls?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
614
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
615
+ metadata?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
616
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
617
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
618
+ deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
619
+ };
620
+ export type AiMessageSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
621
+ id?: boolean;
622
+ sessionId?: boolean;
623
+ historyId?: boolean;
624
+ type?: boolean;
625
+ content?: boolean;
626
+ thoughts?: boolean;
627
+ model?: boolean;
628
+ tokens?: boolean;
629
+ toolCalls?: boolean;
630
+ agentId?: boolean;
631
+ metadata?: boolean;
632
+ createdAt?: boolean;
633
+ updatedAt?: boolean;
634
+ deletedAt?: boolean;
635
+ history?: boolean | Prisma.AiMessage$historyArgs<ExtArgs>;
636
+ }, ExtArgs["result"]["aiMessage"]>;
637
+ export type AiMessageSelectScalar = {
638
+ id?: boolean;
639
+ sessionId?: boolean;
640
+ historyId?: boolean;
641
+ type?: boolean;
642
+ content?: boolean;
643
+ thoughts?: boolean;
644
+ model?: boolean;
645
+ tokens?: boolean;
646
+ toolCalls?: boolean;
647
+ agentId?: boolean;
648
+ metadata?: boolean;
649
+ createdAt?: boolean;
650
+ updatedAt?: boolean;
651
+ deletedAt?: boolean;
652
+ };
653
+ export type AiMessageOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "sessionId" | "historyId" | "type" | "content" | "thoughts" | "model" | "tokens" | "toolCalls" | "agentId" | "metadata" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["aiMessage"]>;
654
+ export type AiMessageInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
655
+ history?: boolean | Prisma.AiMessage$historyArgs<ExtArgs>;
656
+ };
657
+ export type $AiMessagePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
658
+ name: "AiMessage";
659
+ objects: {
660
+ history: Prisma.$AiChatHistoryPayload<ExtArgs> | null;
661
+ };
662
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
663
+ id: string;
664
+ sessionId: string;
665
+ historyId: string | null;
666
+ type: string;
667
+ content: string;
668
+ thoughts: runtime.JsonValue | null;
669
+ model: string | null;
670
+ tokens: runtime.JsonValue | null;
671
+ toolCalls: runtime.JsonValue | null;
672
+ agentId: string | null;
673
+ metadata: runtime.JsonValue | null;
674
+ createdAt: Date;
675
+ updatedAt: Date;
676
+ deletedAt: Date | null;
677
+ }, ExtArgs["result"]["aiMessage"]>;
678
+ composites: {};
679
+ };
680
+ export type AiMessageGetPayload<S extends boolean | null | undefined | AiMessageDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AiMessagePayload, S>;
681
+ export type AiMessageCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<AiMessageFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
682
+ select?: AiMessageCountAggregateInputType | true;
683
+ };
684
+ export interface AiMessageDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
685
+ [K: symbol]: {
686
+ types: Prisma.TypeMap<ExtArgs>['model']['AiMessage'];
687
+ meta: {
688
+ name: 'AiMessage';
689
+ };
690
+ };
691
+ /**
692
+ * Find zero or one AiMessage that matches the filter.
693
+ * @param {AiMessageFindUniqueArgs} args - Arguments to find a AiMessage
694
+ * @example
695
+ * // Get one AiMessage
696
+ * const aiMessage = await prisma.aiMessage.findUnique({
697
+ * where: {
698
+ * // ... provide filter here
699
+ * }
700
+ * })
701
+ */
702
+ findUnique<T extends AiMessageFindUniqueArgs>(args: Prisma.SelectSubset<T, AiMessageFindUniqueArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
703
+ /**
704
+ * Find one AiMessage that matches the filter or throw an error with `error.code='P2025'`
705
+ * if no matches were found.
706
+ * @param {AiMessageFindUniqueOrThrowArgs} args - Arguments to find a AiMessage
707
+ * @example
708
+ * // Get one AiMessage
709
+ * const aiMessage = await prisma.aiMessage.findUniqueOrThrow({
710
+ * where: {
711
+ * // ... provide filter here
712
+ * }
713
+ * })
714
+ */
715
+ findUniqueOrThrow<T extends AiMessageFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, AiMessageFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
716
+ /**
717
+ * Find the first AiMessage that matches the filter.
718
+ * Note, that providing `undefined` is treated as the value not being there.
719
+ * Read more here: https://pris.ly/d/null-undefined
720
+ * @param {AiMessageFindFirstArgs} args - Arguments to find a AiMessage
721
+ * @example
722
+ * // Get one AiMessage
723
+ * const aiMessage = await prisma.aiMessage.findFirst({
724
+ * where: {
725
+ * // ... provide filter here
726
+ * }
727
+ * })
728
+ */
729
+ findFirst<T extends AiMessageFindFirstArgs>(args?: Prisma.SelectSubset<T, AiMessageFindFirstArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
730
+ /**
731
+ * Find the first AiMessage that matches the filter or
732
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
733
+ * Note, that providing `undefined` is treated as the value not being there.
734
+ * Read more here: https://pris.ly/d/null-undefined
735
+ * @param {AiMessageFindFirstOrThrowArgs} args - Arguments to find a AiMessage
736
+ * @example
737
+ * // Get one AiMessage
738
+ * const aiMessage = await prisma.aiMessage.findFirstOrThrow({
739
+ * where: {
740
+ * // ... provide filter here
741
+ * }
742
+ * })
743
+ */
744
+ findFirstOrThrow<T extends AiMessageFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, AiMessageFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
745
+ /**
746
+ * Find zero or more AiMessages that matches the filter.
747
+ * Note, that providing `undefined` is treated as the value not being there.
748
+ * Read more here: https://pris.ly/d/null-undefined
749
+ * @param {AiMessageFindManyArgs} args - Arguments to filter and select certain fields only.
750
+ * @example
751
+ * // Get all AiMessages
752
+ * const aiMessages = await prisma.aiMessage.findMany()
753
+ *
754
+ * // Get first 10 AiMessages
755
+ * const aiMessages = await prisma.aiMessage.findMany({ take: 10 })
756
+ *
757
+ * // Only select the `id`
758
+ * const aiMessageWithIdOnly = await prisma.aiMessage.findMany({ select: { id: true } })
759
+ *
760
+ */
761
+ findMany<T extends AiMessageFindManyArgs>(args?: Prisma.SelectSubset<T, AiMessageFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
762
+ /**
763
+ * Create a AiMessage.
764
+ * @param {AiMessageCreateArgs} args - Arguments to create a AiMessage.
765
+ * @example
766
+ * // Create one AiMessage
767
+ * const AiMessage = await prisma.aiMessage.create({
768
+ * data: {
769
+ * // ... data to create a AiMessage
770
+ * }
771
+ * })
772
+ *
773
+ */
774
+ create<T extends AiMessageCreateArgs>(args: Prisma.SelectSubset<T, AiMessageCreateArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
775
+ /**
776
+ * Create many AiMessages.
777
+ * @param {AiMessageCreateManyArgs} args - Arguments to create many AiMessages.
778
+ * @example
779
+ * // Create many AiMessages
780
+ * const aiMessage = await prisma.aiMessage.createMany({
781
+ * data: [
782
+ * // ... provide data here
783
+ * ]
784
+ * })
785
+ *
786
+ */
787
+ createMany<T extends AiMessageCreateManyArgs>(args?: Prisma.SelectSubset<T, AiMessageCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
788
+ /**
789
+ * Delete a AiMessage.
790
+ * @param {AiMessageDeleteArgs} args - Arguments to delete one AiMessage.
791
+ * @example
792
+ * // Delete one AiMessage
793
+ * const AiMessage = await prisma.aiMessage.delete({
794
+ * where: {
795
+ * // ... filter to delete one AiMessage
796
+ * }
797
+ * })
798
+ *
799
+ */
800
+ delete<T extends AiMessageDeleteArgs>(args: Prisma.SelectSubset<T, AiMessageDeleteArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
801
+ /**
802
+ * Update one AiMessage.
803
+ * @param {AiMessageUpdateArgs} args - Arguments to update one AiMessage.
804
+ * @example
805
+ * // Update one AiMessage
806
+ * const aiMessage = await prisma.aiMessage.update({
807
+ * where: {
808
+ * // ... provide filter here
809
+ * },
810
+ * data: {
811
+ * // ... provide data here
812
+ * }
813
+ * })
814
+ *
815
+ */
816
+ update<T extends AiMessageUpdateArgs>(args: Prisma.SelectSubset<T, AiMessageUpdateArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
817
+ /**
818
+ * Delete zero or more AiMessages.
819
+ * @param {AiMessageDeleteManyArgs} args - Arguments to filter AiMessages to delete.
820
+ * @example
821
+ * // Delete a few AiMessages
822
+ * const { count } = await prisma.aiMessage.deleteMany({
823
+ * where: {
824
+ * // ... provide filter here
825
+ * }
826
+ * })
827
+ *
828
+ */
829
+ deleteMany<T extends AiMessageDeleteManyArgs>(args?: Prisma.SelectSubset<T, AiMessageDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
830
+ /**
831
+ * Update zero or more AiMessages.
832
+ * Note, that providing `undefined` is treated as the value not being there.
833
+ * Read more here: https://pris.ly/d/null-undefined
834
+ * @param {AiMessageUpdateManyArgs} args - Arguments to update one or more rows.
835
+ * @example
836
+ * // Update many AiMessages
837
+ * const aiMessage = await prisma.aiMessage.updateMany({
838
+ * where: {
839
+ * // ... provide filter here
840
+ * },
841
+ * data: {
842
+ * // ... provide data here
843
+ * }
844
+ * })
845
+ *
846
+ */
847
+ updateMany<T extends AiMessageUpdateManyArgs>(args: Prisma.SelectSubset<T, AiMessageUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
848
+ /**
849
+ * Create or update one AiMessage.
850
+ * @param {AiMessageUpsertArgs} args - Arguments to update or create a AiMessage.
851
+ * @example
852
+ * // Update or create a AiMessage
853
+ * const aiMessage = await prisma.aiMessage.upsert({
854
+ * create: {
855
+ * // ... data to create a AiMessage
856
+ * },
857
+ * update: {
858
+ * // ... in case it already exists, update
859
+ * },
860
+ * where: {
861
+ * // ... the filter for the AiMessage we want to update
862
+ * }
863
+ * })
864
+ */
865
+ upsert<T extends AiMessageUpsertArgs>(args: Prisma.SelectSubset<T, AiMessageUpsertArgs<ExtArgs>>): Prisma.Prisma__AiMessageClient<runtime.Types.Result.GetResult<Prisma.$AiMessagePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
866
+ /**
867
+ * Count the number of AiMessages.
868
+ * Note, that providing `undefined` is treated as the value not being there.
869
+ * Read more here: https://pris.ly/d/null-undefined
870
+ * @param {AiMessageCountArgs} args - Arguments to filter AiMessages to count.
871
+ * @example
872
+ * // Count the number of AiMessages
873
+ * const count = await prisma.aiMessage.count({
874
+ * where: {
875
+ * // ... the filter for the AiMessages we want to count
876
+ * }
877
+ * })
878
+ **/
879
+ count<T extends AiMessageCountArgs>(args?: Prisma.Subset<T, AiMessageCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], AiMessageCountAggregateOutputType> : number>;
880
+ /**
881
+ * Allows you to perform aggregations operations on a AiMessage.
882
+ * Note, that providing `undefined` is treated as the value not being there.
883
+ * Read more here: https://pris.ly/d/null-undefined
884
+ * @param {AiMessageAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
885
+ * @example
886
+ * // Ordered by age ascending
887
+ * // Where email contains prisma.io
888
+ * // Limited to the 10 users
889
+ * const aggregations = await prisma.user.aggregate({
890
+ * _avg: {
891
+ * age: true,
892
+ * },
893
+ * where: {
894
+ * email: {
895
+ * contains: "prisma.io",
896
+ * },
897
+ * },
898
+ * orderBy: {
899
+ * age: "asc",
900
+ * },
901
+ * take: 10,
902
+ * })
903
+ **/
904
+ aggregate<T extends AiMessageAggregateArgs>(args: Prisma.Subset<T, AiMessageAggregateArgs>): Prisma.PrismaPromise<GetAiMessageAggregateType<T>>;
905
+ /**
906
+ * Group by AiMessage.
907
+ * Note, that providing `undefined` is treated as the value not being there.
908
+ * Read more here: https://pris.ly/d/null-undefined
909
+ * @param {AiMessageGroupByArgs} args - Group by arguments.
910
+ * @example
911
+ * // Group by city, order by createdAt, get count
912
+ * const result = await prisma.user.groupBy({
913
+ * by: ['city', 'createdAt'],
914
+ * orderBy: {
915
+ * createdAt: true
916
+ * },
917
+ * _count: {
918
+ * _all: true
919
+ * },
920
+ * })
921
+ *
922
+ **/
923
+ groupBy<T extends AiMessageGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
924
+ orderBy: AiMessageGroupByArgs['orderBy'];
925
+ } : {
926
+ orderBy?: AiMessageGroupByArgs['orderBy'];
927
+ }, OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>, ByFields extends Prisma.MaybeTupleToUnion<T['by']>, ByValid extends Prisma.Has<ByFields, OrderFields>, HavingFields extends Prisma.GetHavingFields<T['having']>, HavingValid extends Prisma.Has<ByFields, HavingFields>, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? {
928
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
929
+ Error,
930
+ 'Field ',
931
+ P,
932
+ ` in "having" needs to be provided in "by"`
933
+ ];
934
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
935
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
936
+ }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
937
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
938
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
939
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
940
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, AiMessageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAiMessageGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
941
+ /**
942
+ * Fields of the AiMessage model
943
+ */
944
+ readonly fields: AiMessageFieldRefs;
945
+ }
946
+ /**
947
+ * The delegate class that acts as a "Promise-like" for AiMessage.
948
+ * Why is this prefixed with `Prisma__`?
949
+ * Because we want to prevent naming conflicts as mentioned in
950
+ * https://github.com/prisma/prisma-client-js/issues/707
951
+ */
952
+ export interface Prisma__AiMessageClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
953
+ readonly [Symbol.toStringTag]: "PrismaPromise";
954
+ history<T extends Prisma.AiMessage$historyArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AiMessage$historyArgs<ExtArgs>>): Prisma.Prisma__AiChatHistoryClient<runtime.Types.Result.GetResult<Prisma.$AiChatHistoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
955
+ /**
956
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
957
+ * @param onfulfilled The callback to execute when the Promise is resolved.
958
+ * @param onrejected The callback to execute when the Promise is rejected.
959
+ * @returns A Promise for the completion of which ever callback is executed.
960
+ */
961
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>;
962
+ /**
963
+ * Attaches a callback for only the rejection of the Promise.
964
+ * @param onrejected The callback to execute when the Promise is rejected.
965
+ * @returns A Promise for the completion of the callback.
966
+ */
967
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
968
+ /**
969
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
970
+ * resolved value cannot be modified from the callback.
971
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
972
+ * @returns A Promise for the completion of the callback.
973
+ */
974
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
975
+ }
976
+ /**
977
+ * Fields of the AiMessage model
978
+ */
979
+ export interface AiMessageFieldRefs {
980
+ readonly id: Prisma.FieldRef<"AiMessage", 'String'>;
981
+ readonly sessionId: Prisma.FieldRef<"AiMessage", 'String'>;
982
+ readonly historyId: Prisma.FieldRef<"AiMessage", 'String'>;
983
+ readonly type: Prisma.FieldRef<"AiMessage", 'String'>;
984
+ readonly content: Prisma.FieldRef<"AiMessage", 'String'>;
985
+ readonly thoughts: Prisma.FieldRef<"AiMessage", 'Json'>;
986
+ readonly model: Prisma.FieldRef<"AiMessage", 'String'>;
987
+ readonly tokens: Prisma.FieldRef<"AiMessage", 'Json'>;
988
+ readonly toolCalls: Prisma.FieldRef<"AiMessage", 'Json'>;
989
+ readonly agentId: Prisma.FieldRef<"AiMessage", 'String'>;
990
+ readonly metadata: Prisma.FieldRef<"AiMessage", 'Json'>;
991
+ readonly createdAt: Prisma.FieldRef<"AiMessage", 'DateTime'>;
992
+ readonly updatedAt: Prisma.FieldRef<"AiMessage", 'DateTime'>;
993
+ readonly deletedAt: Prisma.FieldRef<"AiMessage", 'DateTime'>;
994
+ }
995
+ /**
996
+ * AiMessage findUnique
997
+ */
998
+ export type AiMessageFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
999
+ /**
1000
+ * Select specific fields to fetch from the AiMessage
1001
+ */
1002
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1003
+ /**
1004
+ * Omit specific fields from the AiMessage
1005
+ */
1006
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1007
+ /**
1008
+ * Choose, which related nodes to fetch as well
1009
+ */
1010
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1011
+ /**
1012
+ * Filter, which AiMessage to fetch.
1013
+ */
1014
+ where: Prisma.AiMessageWhereUniqueInput;
1015
+ };
1016
+ /**
1017
+ * AiMessage findUniqueOrThrow
1018
+ */
1019
+ export type AiMessageFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1020
+ /**
1021
+ * Select specific fields to fetch from the AiMessage
1022
+ */
1023
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1024
+ /**
1025
+ * Omit specific fields from the AiMessage
1026
+ */
1027
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1028
+ /**
1029
+ * Choose, which related nodes to fetch as well
1030
+ */
1031
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1032
+ /**
1033
+ * Filter, which AiMessage to fetch.
1034
+ */
1035
+ where: Prisma.AiMessageWhereUniqueInput;
1036
+ };
1037
+ /**
1038
+ * AiMessage findFirst
1039
+ */
1040
+ export type AiMessageFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1041
+ /**
1042
+ * Select specific fields to fetch from the AiMessage
1043
+ */
1044
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1045
+ /**
1046
+ * Omit specific fields from the AiMessage
1047
+ */
1048
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1049
+ /**
1050
+ * Choose, which related nodes to fetch as well
1051
+ */
1052
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1053
+ /**
1054
+ * Filter, which AiMessage to fetch.
1055
+ */
1056
+ where?: Prisma.AiMessageWhereInput;
1057
+ /**
1058
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1059
+ *
1060
+ * Determine the order of AiMessages to fetch.
1061
+ */
1062
+ orderBy?: Prisma.AiMessageOrderByWithRelationInput | Prisma.AiMessageOrderByWithRelationInput[];
1063
+ /**
1064
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1065
+ *
1066
+ * Sets the position for searching for AiMessages.
1067
+ */
1068
+ cursor?: Prisma.AiMessageWhereUniqueInput;
1069
+ /**
1070
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1071
+ *
1072
+ * Take `±n` AiMessages from the position of the cursor.
1073
+ */
1074
+ take?: number;
1075
+ /**
1076
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1077
+ *
1078
+ * Skip the first `n` AiMessages.
1079
+ */
1080
+ skip?: number;
1081
+ /**
1082
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1083
+ *
1084
+ * Filter by unique combinations of AiMessages.
1085
+ */
1086
+ distinct?: Prisma.AiMessageScalarFieldEnum | Prisma.AiMessageScalarFieldEnum[];
1087
+ };
1088
+ /**
1089
+ * AiMessage findFirstOrThrow
1090
+ */
1091
+ export type AiMessageFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1092
+ /**
1093
+ * Select specific fields to fetch from the AiMessage
1094
+ */
1095
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1096
+ /**
1097
+ * Omit specific fields from the AiMessage
1098
+ */
1099
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1100
+ /**
1101
+ * Choose, which related nodes to fetch as well
1102
+ */
1103
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1104
+ /**
1105
+ * Filter, which AiMessage to fetch.
1106
+ */
1107
+ where?: Prisma.AiMessageWhereInput;
1108
+ /**
1109
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1110
+ *
1111
+ * Determine the order of AiMessages to fetch.
1112
+ */
1113
+ orderBy?: Prisma.AiMessageOrderByWithRelationInput | Prisma.AiMessageOrderByWithRelationInput[];
1114
+ /**
1115
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1116
+ *
1117
+ * Sets the position for searching for AiMessages.
1118
+ */
1119
+ cursor?: Prisma.AiMessageWhereUniqueInput;
1120
+ /**
1121
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1122
+ *
1123
+ * Take `±n` AiMessages from the position of the cursor.
1124
+ */
1125
+ take?: number;
1126
+ /**
1127
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1128
+ *
1129
+ * Skip the first `n` AiMessages.
1130
+ */
1131
+ skip?: number;
1132
+ /**
1133
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1134
+ *
1135
+ * Filter by unique combinations of AiMessages.
1136
+ */
1137
+ distinct?: Prisma.AiMessageScalarFieldEnum | Prisma.AiMessageScalarFieldEnum[];
1138
+ };
1139
+ /**
1140
+ * AiMessage findMany
1141
+ */
1142
+ export type AiMessageFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1143
+ /**
1144
+ * Select specific fields to fetch from the AiMessage
1145
+ */
1146
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1147
+ /**
1148
+ * Omit specific fields from the AiMessage
1149
+ */
1150
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1151
+ /**
1152
+ * Choose, which related nodes to fetch as well
1153
+ */
1154
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1155
+ /**
1156
+ * Filter, which AiMessages to fetch.
1157
+ */
1158
+ where?: Prisma.AiMessageWhereInput;
1159
+ /**
1160
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1161
+ *
1162
+ * Determine the order of AiMessages to fetch.
1163
+ */
1164
+ orderBy?: Prisma.AiMessageOrderByWithRelationInput | Prisma.AiMessageOrderByWithRelationInput[];
1165
+ /**
1166
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1167
+ *
1168
+ * Sets the position for listing AiMessages.
1169
+ */
1170
+ cursor?: Prisma.AiMessageWhereUniqueInput;
1171
+ /**
1172
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1173
+ *
1174
+ * Take `±n` AiMessages from the position of the cursor.
1175
+ */
1176
+ take?: number;
1177
+ /**
1178
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1179
+ *
1180
+ * Skip the first `n` AiMessages.
1181
+ */
1182
+ skip?: number;
1183
+ /**
1184
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1185
+ *
1186
+ * Filter by unique combinations of AiMessages.
1187
+ */
1188
+ distinct?: Prisma.AiMessageScalarFieldEnum | Prisma.AiMessageScalarFieldEnum[];
1189
+ };
1190
+ /**
1191
+ * AiMessage create
1192
+ */
1193
+ export type AiMessageCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1194
+ /**
1195
+ * Select specific fields to fetch from the AiMessage
1196
+ */
1197
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1198
+ /**
1199
+ * Omit specific fields from the AiMessage
1200
+ */
1201
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1202
+ /**
1203
+ * Choose, which related nodes to fetch as well
1204
+ */
1205
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1206
+ /**
1207
+ * The data needed to create a AiMessage.
1208
+ */
1209
+ data: Prisma.XOR<Prisma.AiMessageCreateInput, Prisma.AiMessageUncheckedCreateInput>;
1210
+ };
1211
+ /**
1212
+ * AiMessage createMany
1213
+ */
1214
+ export type AiMessageCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1215
+ /**
1216
+ * The data used to create many AiMessages.
1217
+ */
1218
+ data: Prisma.AiMessageCreateManyInput | Prisma.AiMessageCreateManyInput[];
1219
+ skipDuplicates?: boolean;
1220
+ };
1221
+ /**
1222
+ * AiMessage update
1223
+ */
1224
+ export type AiMessageUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1225
+ /**
1226
+ * Select specific fields to fetch from the AiMessage
1227
+ */
1228
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1229
+ /**
1230
+ * Omit specific fields from the AiMessage
1231
+ */
1232
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1233
+ /**
1234
+ * Choose, which related nodes to fetch as well
1235
+ */
1236
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1237
+ /**
1238
+ * The data needed to update a AiMessage.
1239
+ */
1240
+ data: Prisma.XOR<Prisma.AiMessageUpdateInput, Prisma.AiMessageUncheckedUpdateInput>;
1241
+ /**
1242
+ * Choose, which AiMessage to update.
1243
+ */
1244
+ where: Prisma.AiMessageWhereUniqueInput;
1245
+ };
1246
+ /**
1247
+ * AiMessage updateMany
1248
+ */
1249
+ export type AiMessageUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1250
+ /**
1251
+ * The data used to update AiMessages.
1252
+ */
1253
+ data: Prisma.XOR<Prisma.AiMessageUpdateManyMutationInput, Prisma.AiMessageUncheckedUpdateManyInput>;
1254
+ /**
1255
+ * Filter which AiMessages to update
1256
+ */
1257
+ where?: Prisma.AiMessageWhereInput;
1258
+ /**
1259
+ * Limit how many AiMessages to update.
1260
+ */
1261
+ limit?: number;
1262
+ };
1263
+ /**
1264
+ * AiMessage upsert
1265
+ */
1266
+ export type AiMessageUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1267
+ /**
1268
+ * Select specific fields to fetch from the AiMessage
1269
+ */
1270
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1271
+ /**
1272
+ * Omit specific fields from the AiMessage
1273
+ */
1274
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1275
+ /**
1276
+ * Choose, which related nodes to fetch as well
1277
+ */
1278
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1279
+ /**
1280
+ * The filter to search for the AiMessage to update in case it exists.
1281
+ */
1282
+ where: Prisma.AiMessageWhereUniqueInput;
1283
+ /**
1284
+ * In case the AiMessage found by the `where` argument doesn't exist, create a new AiMessage with this data.
1285
+ */
1286
+ create: Prisma.XOR<Prisma.AiMessageCreateInput, Prisma.AiMessageUncheckedCreateInput>;
1287
+ /**
1288
+ * In case the AiMessage was found with the provided `where` argument, update it with this data.
1289
+ */
1290
+ update: Prisma.XOR<Prisma.AiMessageUpdateInput, Prisma.AiMessageUncheckedUpdateInput>;
1291
+ };
1292
+ /**
1293
+ * AiMessage delete
1294
+ */
1295
+ export type AiMessageDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1296
+ /**
1297
+ * Select specific fields to fetch from the AiMessage
1298
+ */
1299
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1300
+ /**
1301
+ * Omit specific fields from the AiMessage
1302
+ */
1303
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1304
+ /**
1305
+ * Choose, which related nodes to fetch as well
1306
+ */
1307
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1308
+ /**
1309
+ * Filter which AiMessage to delete.
1310
+ */
1311
+ where: Prisma.AiMessageWhereUniqueInput;
1312
+ };
1313
+ /**
1314
+ * AiMessage deleteMany
1315
+ */
1316
+ export type AiMessageDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1317
+ /**
1318
+ * Filter which AiMessages to delete
1319
+ */
1320
+ where?: Prisma.AiMessageWhereInput;
1321
+ /**
1322
+ * Limit how many AiMessages to delete.
1323
+ */
1324
+ limit?: number;
1325
+ };
1326
+ /**
1327
+ * AiMessage.history
1328
+ */
1329
+ export type AiMessage$historyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1330
+ /**
1331
+ * Select specific fields to fetch from the AiChatHistory
1332
+ */
1333
+ select?: Prisma.AiChatHistorySelect<ExtArgs> | null;
1334
+ /**
1335
+ * Omit specific fields from the AiChatHistory
1336
+ */
1337
+ omit?: Prisma.AiChatHistoryOmit<ExtArgs> | null;
1338
+ /**
1339
+ * Choose, which related nodes to fetch as well
1340
+ */
1341
+ include?: Prisma.AiChatHistoryInclude<ExtArgs> | null;
1342
+ where?: Prisma.AiChatHistoryWhereInput;
1343
+ };
1344
+ /**
1345
+ * AiMessage without action
1346
+ */
1347
+ export type AiMessageDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1348
+ /**
1349
+ * Select specific fields to fetch from the AiMessage
1350
+ */
1351
+ select?: Prisma.AiMessageSelect<ExtArgs> | null;
1352
+ /**
1353
+ * Omit specific fields from the AiMessage
1354
+ */
1355
+ omit?: Prisma.AiMessageOmit<ExtArgs> | null;
1356
+ /**
1357
+ * Choose, which related nodes to fetch as well
1358
+ */
1359
+ include?: Prisma.AiMessageInclude<ExtArgs> | null;
1360
+ };