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