@allbluecn/database 0.4.0 → 0.4.2

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 (190) hide show
  1. package/desktop-init.ts +128 -0
  2. package/generated/browser.ts +494 -0
  3. package/generated/client.ts +518 -0
  4. package/generated/commonInputTypes.ts +1056 -0
  5. package/generated/enums.ts +93 -0
  6. package/generated/internal/class.ts +1144 -0
  7. package/generated/internal/prismaNamespace.ts +9603 -0
  8. package/generated/internal/prismaNamespaceBrowser.ts +1695 -0
  9. package/generated/models/Account.ts +1648 -0
  10. package/generated/models/AgentConversation.ts +1651 -0
  11. package/generated/models/AgentMessage.ts +1409 -0
  12. package/generated/models/AiProvider.ts +1607 -0
  13. package/generated/models/AiProviderConfig.ts +1514 -0
  14. package/generated/models/AiUsageLog.ts +1863 -0
  15. package/generated/models/AnyHubApp.ts +1911 -0
  16. package/generated/models/AnyHubMarketApp.ts +2008 -0
  17. package/generated/models/AnyHubPermission.ts +1422 -0
  18. package/generated/models/AnyHubRecommendation.ts +1870 -0
  19. package/generated/models/AnyHubRecommender.ts +1471 -0
  20. package/generated/models/Artboard.ts +1811 -0
  21. package/generated/models/ArtboardExport.ts +1548 -0
  22. package/generated/models/ArticleFavorite.ts +1352 -0
  23. package/generated/models/AuditLog.ts +1533 -0
  24. package/generated/models/Block.ts +1650 -0
  25. package/generated/models/BlockComponent.ts +1734 -0
  26. package/generated/models/BlockInstance.ts +2043 -0
  27. package/generated/models/BookmarkCategory.ts +1670 -0
  28. package/generated/models/ChatInterrupt.ts +1699 -0
  29. package/generated/models/ChatMessage.ts +1438 -0
  30. package/generated/models/ChatRun.ts +1632 -0
  31. package/generated/models/ChatThread.ts +2133 -0
  32. package/generated/models/Comment.ts +2206 -0
  33. package/generated/models/CommentIgnore.ts +1430 -0
  34. package/generated/models/CommentReaction.ts +1472 -0
  35. package/generated/models/ComplianceExport.ts +1345 -0
  36. package/generated/models/Component.ts +2345 -0
  37. package/generated/models/ComponentInstance.ts +2102 -0
  38. package/generated/models/ComponentTag.ts +1281 -0
  39. package/generated/models/CustomRole.ts +1560 -0
  40. package/generated/models/DesignProject.ts +1643 -0
  41. package/generated/models/DictionaryTerm.ts +1642 -0
  42. package/generated/models/GenerationRun.ts +1543 -0
  43. package/generated/models/IndustryCompliance.ts +1797 -0
  44. package/generated/models/InvitationCode.ts +1417 -0
  45. package/generated/models/InvitationUse.ts +1424 -0
  46. package/generated/models/Invoice.ts +1710 -0
  47. package/generated/models/KnowledgeBase.ts +1671 -0
  48. package/generated/models/KnowledgeDocument.ts +2458 -0
  49. package/generated/models/KnowledgeShareRecord.ts +1352 -0
  50. package/generated/models/Label.ts +1482 -0
  51. package/generated/models/LegalRegulation.ts +1873 -0
  52. package/generated/models/LicenseActivation.ts +1415 -0
  53. package/generated/models/LicenseKey.ts +1884 -0
  54. package/generated/models/LoginLog.ts +1450 -0
  55. package/generated/models/MonitoringErrorReport.ts +1299 -0
  56. package/generated/models/MonitoringHealthSnapshot.ts +1249 -0
  57. package/generated/models/MonitoringMetricsSnapshot.ts +1369 -0
  58. package/generated/models/MonitoringRequestLog.ts +1283 -0
  59. package/generated/models/PRD.ts +2805 -0
  60. package/generated/models/PRDPage.ts +2402 -0
  61. package/generated/models/PRDTag.ts +1430 -0
  62. package/generated/models/PRDVersion.ts +2121 -0
  63. package/generated/models/PageVersion.ts +1523 -0
  64. package/generated/models/PasswordResetToken.ts +1380 -0
  65. package/generated/models/Plan.ts +2069 -0
  66. package/generated/models/Project.ts +2148 -0
  67. package/generated/models/ProjectActivity.ts +1582 -0
  68. package/generated/models/ProjectMember.ts +1512 -0
  69. package/generated/models/ProviderEvent.ts +1227 -0
  70. package/generated/models/Reference.ts +1177 -0
  71. package/generated/models/Review.ts +1912 -0
  72. package/generated/models/ReviewComment.ts +1904 -0
  73. package/generated/models/RoleAssignment.ts +1430 -0
  74. package/generated/models/SequenceCounter.ts +1137 -0
  75. package/generated/models/Share.ts +1681 -0
  76. package/generated/models/ShareVersion.ts +1389 -0
  77. package/generated/models/SsoMapping.ts +1512 -0
  78. package/generated/models/SsoProvider.ts +1639 -0
  79. package/generated/models/Story.ts +5234 -0
  80. package/generated/models/StoryActivity.ts +1664 -0
  81. package/generated/models/StoryAttachment.ts +1467 -0
  82. package/generated/models/StoryComment.ts +1992 -0
  83. package/generated/models/StoryDependency.ts +1517 -0
  84. package/generated/models/StoryDocLink.ts +1430 -0
  85. package/generated/models/StoryFilterView.ts +1587 -0
  86. package/generated/models/StoryLabel.ts +1349 -0
  87. package/generated/models/StoryLink.ts +1415 -0
  88. package/generated/models/StoryPrdLink.ts +1430 -0
  89. package/generated/models/StoryReaction.ts +1472 -0
  90. package/generated/models/Subscription.ts +2147 -0
  91. package/generated/models/SystemSetting.ts +1217 -0
  92. package/generated/models/Tag.ts +1655 -0
  93. package/generated/models/TeamInvitation.ts +1526 -0
  94. package/generated/models/TeamMembership.ts +1436 -0
  95. package/generated/models/Template.ts +1391 -0
  96. package/generated/models/TemplateBlock.ts +1664 -0
  97. package/generated/models/ThirdPartyDependency.ts +1473 -0
  98. package/generated/models/UsageRecord.ts +1505 -0
  99. package/generated/models/User.ts +20998 -0
  100. package/generated/models/UserAgent.ts +1900 -0
  101. package/generated/models/UserSkill.ts +1456 -0
  102. package/generated/models/WebsiteBookmark.ts +2219 -0
  103. package/generated/models/Workspace.ts +2279 -0
  104. package/generated/models.ts +106 -0
  105. package/generated-sqlite/browser.ts +399 -0
  106. package/generated-sqlite/client.ts +423 -0
  107. package/generated-sqlite/commonInputTypes.ts +608 -0
  108. package/generated-sqlite/enums.ts +15 -0
  109. package/generated-sqlite/internal/class.ts +954 -0
  110. package/generated-sqlite/internal/prismaNamespace.ts +7716 -0
  111. package/generated-sqlite/internal/prismaNamespaceBrowser.ts +1415 -0
  112. package/generated-sqlite/models/AgentConversation.ts +1647 -0
  113. package/generated-sqlite/models/AgentMessage.ts +1406 -0
  114. package/generated-sqlite/models/AiProvider.ts +1605 -0
  115. package/generated-sqlite/models/AiProviderConfig.ts +1511 -0
  116. package/generated-sqlite/models/AiUsageLog.ts +1845 -0
  117. package/generated-sqlite/models/AnyHubApp.ts +1908 -0
  118. package/generated-sqlite/models/AnyHubMarketApp.ts +1997 -0
  119. package/generated-sqlite/models/AnyHubPermission.ts +1419 -0
  120. package/generated-sqlite/models/AnyHubRecommendation.ts +1867 -0
  121. package/generated-sqlite/models/AnyHubRecommender.ts +1467 -0
  122. package/generated-sqlite/models/Artboard.ts +1808 -0
  123. package/generated-sqlite/models/ArtboardExport.ts +1545 -0
  124. package/generated-sqlite/models/ArticleFavorite.ts +1349 -0
  125. package/generated-sqlite/models/AuditLog.ts +1287 -0
  126. package/generated-sqlite/models/Block.ts +1648 -0
  127. package/generated-sqlite/models/BlockComponent.ts +1730 -0
  128. package/generated-sqlite/models/BlockInstance.ts +2039 -0
  129. package/generated-sqlite/models/BookmarkCategory.ts +1667 -0
  130. package/generated-sqlite/models/ChatInterrupt.ts +1695 -0
  131. package/generated-sqlite/models/ChatMessage.ts +1435 -0
  132. package/generated-sqlite/models/ChatRun.ts +1629 -0
  133. package/generated-sqlite/models/ChatThread.ts +2129 -0
  134. package/generated-sqlite/models/Comment.ts +2201 -0
  135. package/generated-sqlite/models/CommentIgnore.ts +1426 -0
  136. package/generated-sqlite/models/ComplianceExport.ts +1343 -0
  137. package/generated-sqlite/models/Component.ts +2326 -0
  138. package/generated-sqlite/models/ComponentInstance.ts +2097 -0
  139. package/generated-sqlite/models/ComponentTag.ts +1278 -0
  140. package/generated-sqlite/models/CustomRole.ts +1209 -0
  141. package/generated-sqlite/models/DesignProject.ts +1640 -0
  142. package/generated-sqlite/models/DictionaryTerm.ts +1639 -0
  143. package/generated-sqlite/models/GenerationRun.ts +1540 -0
  144. package/generated-sqlite/models/IndustryCompliance.ts +1794 -0
  145. package/generated-sqlite/models/InvitationCode.ts +1415 -0
  146. package/generated-sqlite/models/InvitationUse.ts +1420 -0
  147. package/generated-sqlite/models/Invoice.ts +1707 -0
  148. package/generated-sqlite/models/KnowledgeBase.ts +1668 -0
  149. package/generated-sqlite/models/KnowledgeDocument.ts +2282 -0
  150. package/generated-sqlite/models/KnowledgeShareRecord.ts +1349 -0
  151. package/generated-sqlite/models/LegalRegulation.ts +1870 -0
  152. package/generated-sqlite/models/LicenseActivation.ts +1203 -0
  153. package/generated-sqlite/models/LicenseKey.ts +1443 -0
  154. package/generated-sqlite/models/LoginLog.ts +1447 -0
  155. package/generated-sqlite/models/PRD.ts +2616 -0
  156. package/generated-sqlite/models/PRDPage.ts +2398 -0
  157. package/generated-sqlite/models/PRDTag.ts +1426 -0
  158. package/generated-sqlite/models/PRDVersion.ts +2117 -0
  159. package/generated-sqlite/models/PageVersion.ts +1528 -0
  160. package/generated-sqlite/models/PasswordResetToken.ts +1377 -0
  161. package/generated-sqlite/models/Plan.ts +2060 -0
  162. package/generated-sqlite/models/Project.ts +1994 -0
  163. package/generated-sqlite/models/ProjectActivity.ts +1578 -0
  164. package/generated-sqlite/models/ProjectMember.ts +1508 -0
  165. package/generated-sqlite/models/ProviderEvent.ts +1225 -0
  166. package/generated-sqlite/models/Reference.ts +1175 -0
  167. package/generated-sqlite/models/Review.ts +1903 -0
  168. package/generated-sqlite/models/ReviewComment.ts +1899 -0
  169. package/generated-sqlite/models/RoleAssignment.ts +1125 -0
  170. package/generated-sqlite/models/Share.ts +1674 -0
  171. package/generated-sqlite/models/ShareVersion.ts +1385 -0
  172. package/generated-sqlite/models/SsoMapping.ts +1181 -0
  173. package/generated-sqlite/models/SsoProvider.ts +1266 -0
  174. package/generated-sqlite/models/Subscription.ts +2137 -0
  175. package/generated-sqlite/models/SystemSetting.ts +1215 -0
  176. package/generated-sqlite/models/Tag.ts +1652 -0
  177. package/generated-sqlite/models/TeamInvitation.ts +1523 -0
  178. package/generated-sqlite/models/TeamMembership.ts +1433 -0
  179. package/generated-sqlite/models/Template.ts +1389 -0
  180. package/generated-sqlite/models/TemplateBlock.ts +1660 -0
  181. package/generated-sqlite/models/ThirdPartyDependency.ts +1471 -0
  182. package/generated-sqlite/models/UsageRecord.ts +1498 -0
  183. package/generated-sqlite/models/User.ts +13558 -0
  184. package/generated-sqlite/models/UserAgent.ts +1897 -0
  185. package/generated-sqlite/models/UserSkill.ts +1453 -0
  186. package/generated-sqlite/models/WebsiteBookmark.ts +2215 -0
  187. package/generated-sqlite/models/Workspace.ts +1824 -0
  188. package/generated-sqlite/models.ts +87 -0
  189. package/package.json +7 -3
  190. package/LICENSE +0 -661
@@ -0,0 +1,1435 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file exports the `ChatMessage` model and its related types.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+ import type * as runtime from "@prisma/client/runtime/client"
12
+ import type * as $Enums from "../enums"
13
+ import type * as Prisma from "../internal/prismaNamespace"
14
+
15
+ /**
16
+ * Model ChatMessage
17
+ *
18
+ */
19
+ export type ChatMessageModel = runtime.Types.Result.DefaultSelection<Prisma.$ChatMessagePayload>
20
+
21
+ export type AggregateChatMessage = {
22
+ _count: ChatMessageCountAggregateOutputType | null
23
+ _min: ChatMessageMinAggregateOutputType | null
24
+ _max: ChatMessageMaxAggregateOutputType | null
25
+ }
26
+
27
+ export type ChatMessageMinAggregateOutputType = {
28
+ id: string | null
29
+ threadId: string | null
30
+ role: string | null
31
+ content: string | null
32
+ thinking: string | null
33
+ createdAt: Date | null
34
+ }
35
+
36
+ export type ChatMessageMaxAggregateOutputType = {
37
+ id: string | null
38
+ threadId: string | null
39
+ role: string | null
40
+ content: string | null
41
+ thinking: string | null
42
+ createdAt: Date | null
43
+ }
44
+
45
+ export type ChatMessageCountAggregateOutputType = {
46
+ id: number
47
+ threadId: number
48
+ role: number
49
+ content: number
50
+ parts: number
51
+ thinking: number
52
+ citations: number
53
+ createdAt: number
54
+ _all: number
55
+ }
56
+
57
+
58
+ export type ChatMessageMinAggregateInputType = {
59
+ id?: true
60
+ threadId?: true
61
+ role?: true
62
+ content?: true
63
+ thinking?: true
64
+ createdAt?: true
65
+ }
66
+
67
+ export type ChatMessageMaxAggregateInputType = {
68
+ id?: true
69
+ threadId?: true
70
+ role?: true
71
+ content?: true
72
+ thinking?: true
73
+ createdAt?: true
74
+ }
75
+
76
+ export type ChatMessageCountAggregateInputType = {
77
+ id?: true
78
+ threadId?: true
79
+ role?: true
80
+ content?: true
81
+ parts?: true
82
+ thinking?: true
83
+ citations?: true
84
+ createdAt?: true
85
+ _all?: true
86
+ }
87
+
88
+ export type ChatMessageAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
89
+ /**
90
+ * Filter which ChatMessage to aggregate.
91
+ */
92
+ where?: Prisma.ChatMessageWhereInput
93
+ /**
94
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
95
+ *
96
+ * Determine the order of ChatMessages to fetch.
97
+ */
98
+ orderBy?: Prisma.ChatMessageOrderByWithRelationInput | Prisma.ChatMessageOrderByWithRelationInput[]
99
+ /**
100
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
101
+ *
102
+ * Sets the start position
103
+ */
104
+ cursor?: Prisma.ChatMessageWhereUniqueInput
105
+ /**
106
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
107
+ *
108
+ * Take `±n` ChatMessages from the position of the cursor.
109
+ */
110
+ take?: number
111
+ /**
112
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
113
+ *
114
+ * Skip the first `n` ChatMessages.
115
+ */
116
+ skip?: number
117
+ /**
118
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
119
+ *
120
+ * Count returned ChatMessages
121
+ **/
122
+ _count?: true | ChatMessageCountAggregateInputType
123
+ /**
124
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
125
+ *
126
+ * Select which fields to find the minimum value
127
+ **/
128
+ _min?: ChatMessageMinAggregateInputType
129
+ /**
130
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
131
+ *
132
+ * Select which fields to find the maximum value
133
+ **/
134
+ _max?: ChatMessageMaxAggregateInputType
135
+ }
136
+
137
+ export type GetChatMessageAggregateType<T extends ChatMessageAggregateArgs> = {
138
+ [P in keyof T & keyof AggregateChatMessage]: P extends '_count' | 'count'
139
+ ? T[P] extends true
140
+ ? number
141
+ : Prisma.GetScalarType<T[P], AggregateChatMessage[P]>
142
+ : Prisma.GetScalarType<T[P], AggregateChatMessage[P]>
143
+ }
144
+
145
+
146
+
147
+
148
+ export type ChatMessageGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
149
+ where?: Prisma.ChatMessageWhereInput
150
+ orderBy?: Prisma.ChatMessageOrderByWithAggregationInput | Prisma.ChatMessageOrderByWithAggregationInput[]
151
+ by: Prisma.ChatMessageScalarFieldEnum[] | Prisma.ChatMessageScalarFieldEnum
152
+ having?: Prisma.ChatMessageScalarWhereWithAggregatesInput
153
+ take?: number
154
+ skip?: number
155
+ _count?: ChatMessageCountAggregateInputType | true
156
+ _min?: ChatMessageMinAggregateInputType
157
+ _max?: ChatMessageMaxAggregateInputType
158
+ }
159
+
160
+ export type ChatMessageGroupByOutputType = {
161
+ id: string
162
+ threadId: string
163
+ role: string
164
+ content: string
165
+ parts: runtime.JsonValue | null
166
+ thinking: string | null
167
+ citations: runtime.JsonValue | null
168
+ createdAt: Date
169
+ _count: ChatMessageCountAggregateOutputType | null
170
+ _min: ChatMessageMinAggregateOutputType | null
171
+ _max: ChatMessageMaxAggregateOutputType | null
172
+ }
173
+
174
+ export type GetChatMessageGroupByPayload<T extends ChatMessageGroupByArgs> = Prisma.PrismaPromise<
175
+ Array<
176
+ Prisma.PickEnumerable<ChatMessageGroupByOutputType, T['by']> &
177
+ {
178
+ [P in ((keyof T) & (keyof ChatMessageGroupByOutputType))]: P extends '_count'
179
+ ? T[P] extends boolean
180
+ ? number
181
+ : Prisma.GetScalarType<T[P], ChatMessageGroupByOutputType[P]>
182
+ : Prisma.GetScalarType<T[P], ChatMessageGroupByOutputType[P]>
183
+ }
184
+ >
185
+ >
186
+
187
+
188
+
189
+ export type ChatMessageWhereInput = {
190
+ AND?: Prisma.ChatMessageWhereInput | Prisma.ChatMessageWhereInput[]
191
+ OR?: Prisma.ChatMessageWhereInput[]
192
+ NOT?: Prisma.ChatMessageWhereInput | Prisma.ChatMessageWhereInput[]
193
+ id?: Prisma.StringFilter<"ChatMessage"> | string
194
+ threadId?: Prisma.StringFilter<"ChatMessage"> | string
195
+ role?: Prisma.StringFilter<"ChatMessage"> | string
196
+ content?: Prisma.StringFilter<"ChatMessage"> | string
197
+ parts?: Prisma.JsonNullableFilter<"ChatMessage">
198
+ thinking?: Prisma.StringNullableFilter<"ChatMessage"> | string | null
199
+ citations?: Prisma.JsonNullableFilter<"ChatMessage">
200
+ createdAt?: Prisma.DateTimeFilter<"ChatMessage"> | Date | string
201
+ thread?: Prisma.XOR<Prisma.ChatThreadScalarRelationFilter, Prisma.ChatThreadWhereInput>
202
+ }
203
+
204
+ export type ChatMessageOrderByWithRelationInput = {
205
+ id?: Prisma.SortOrder
206
+ threadId?: Prisma.SortOrder
207
+ role?: Prisma.SortOrder
208
+ content?: Prisma.SortOrder
209
+ parts?: Prisma.SortOrderInput | Prisma.SortOrder
210
+ thinking?: Prisma.SortOrderInput | Prisma.SortOrder
211
+ citations?: Prisma.SortOrderInput | Prisma.SortOrder
212
+ createdAt?: Prisma.SortOrder
213
+ thread?: Prisma.ChatThreadOrderByWithRelationInput
214
+ }
215
+
216
+ export type ChatMessageWhereUniqueInput = Prisma.AtLeast<{
217
+ id?: string
218
+ AND?: Prisma.ChatMessageWhereInput | Prisma.ChatMessageWhereInput[]
219
+ OR?: Prisma.ChatMessageWhereInput[]
220
+ NOT?: Prisma.ChatMessageWhereInput | Prisma.ChatMessageWhereInput[]
221
+ threadId?: Prisma.StringFilter<"ChatMessage"> | string
222
+ role?: Prisma.StringFilter<"ChatMessage"> | string
223
+ content?: Prisma.StringFilter<"ChatMessage"> | string
224
+ parts?: Prisma.JsonNullableFilter<"ChatMessage">
225
+ thinking?: Prisma.StringNullableFilter<"ChatMessage"> | string | null
226
+ citations?: Prisma.JsonNullableFilter<"ChatMessage">
227
+ createdAt?: Prisma.DateTimeFilter<"ChatMessage"> | Date | string
228
+ thread?: Prisma.XOR<Prisma.ChatThreadScalarRelationFilter, Prisma.ChatThreadWhereInput>
229
+ }, "id">
230
+
231
+ export type ChatMessageOrderByWithAggregationInput = {
232
+ id?: Prisma.SortOrder
233
+ threadId?: Prisma.SortOrder
234
+ role?: Prisma.SortOrder
235
+ content?: Prisma.SortOrder
236
+ parts?: Prisma.SortOrderInput | Prisma.SortOrder
237
+ thinking?: Prisma.SortOrderInput | Prisma.SortOrder
238
+ citations?: Prisma.SortOrderInput | Prisma.SortOrder
239
+ createdAt?: Prisma.SortOrder
240
+ _count?: Prisma.ChatMessageCountOrderByAggregateInput
241
+ _max?: Prisma.ChatMessageMaxOrderByAggregateInput
242
+ _min?: Prisma.ChatMessageMinOrderByAggregateInput
243
+ }
244
+
245
+ export type ChatMessageScalarWhereWithAggregatesInput = {
246
+ AND?: Prisma.ChatMessageScalarWhereWithAggregatesInput | Prisma.ChatMessageScalarWhereWithAggregatesInput[]
247
+ OR?: Prisma.ChatMessageScalarWhereWithAggregatesInput[]
248
+ NOT?: Prisma.ChatMessageScalarWhereWithAggregatesInput | Prisma.ChatMessageScalarWhereWithAggregatesInput[]
249
+ id?: Prisma.StringWithAggregatesFilter<"ChatMessage"> | string
250
+ threadId?: Prisma.StringWithAggregatesFilter<"ChatMessage"> | string
251
+ role?: Prisma.StringWithAggregatesFilter<"ChatMessage"> | string
252
+ content?: Prisma.StringWithAggregatesFilter<"ChatMessage"> | string
253
+ parts?: Prisma.JsonNullableWithAggregatesFilter<"ChatMessage">
254
+ thinking?: Prisma.StringNullableWithAggregatesFilter<"ChatMessage"> | string | null
255
+ citations?: Prisma.JsonNullableWithAggregatesFilter<"ChatMessage">
256
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"ChatMessage"> | Date | string
257
+ }
258
+
259
+ export type ChatMessageCreateInput = {
260
+ id?: string
261
+ role: string
262
+ content: string
263
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
264
+ thinking?: string | null
265
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
266
+ createdAt?: Date | string
267
+ thread: Prisma.ChatThreadCreateNestedOneWithoutMessagesInput
268
+ }
269
+
270
+ export type ChatMessageUncheckedCreateInput = {
271
+ id?: string
272
+ threadId: string
273
+ role: string
274
+ content: string
275
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
276
+ thinking?: string | null
277
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
278
+ createdAt?: Date | string
279
+ }
280
+
281
+ export type ChatMessageUpdateInput = {
282
+ id?: Prisma.StringFieldUpdateOperationsInput | string
283
+ role?: Prisma.StringFieldUpdateOperationsInput | string
284
+ content?: Prisma.StringFieldUpdateOperationsInput | string
285
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
286
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
287
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
288
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
289
+ thread?: Prisma.ChatThreadUpdateOneRequiredWithoutMessagesNestedInput
290
+ }
291
+
292
+ export type ChatMessageUncheckedUpdateInput = {
293
+ id?: Prisma.StringFieldUpdateOperationsInput | string
294
+ threadId?: Prisma.StringFieldUpdateOperationsInput | string
295
+ role?: Prisma.StringFieldUpdateOperationsInput | string
296
+ content?: Prisma.StringFieldUpdateOperationsInput | string
297
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
298
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
299
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
300
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
301
+ }
302
+
303
+ export type ChatMessageCreateManyInput = {
304
+ id?: string
305
+ threadId: string
306
+ role: string
307
+ content: string
308
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
309
+ thinking?: string | null
310
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
311
+ createdAt?: Date | string
312
+ }
313
+
314
+ export type ChatMessageUpdateManyMutationInput = {
315
+ id?: Prisma.StringFieldUpdateOperationsInput | string
316
+ role?: Prisma.StringFieldUpdateOperationsInput | string
317
+ content?: Prisma.StringFieldUpdateOperationsInput | string
318
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
319
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
320
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
321
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
322
+ }
323
+
324
+ export type ChatMessageUncheckedUpdateManyInput = {
325
+ id?: Prisma.StringFieldUpdateOperationsInput | string
326
+ threadId?: Prisma.StringFieldUpdateOperationsInput | string
327
+ role?: Prisma.StringFieldUpdateOperationsInput | string
328
+ content?: Prisma.StringFieldUpdateOperationsInput | string
329
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
330
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
331
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
332
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
333
+ }
334
+
335
+ export type ChatMessageListRelationFilter = {
336
+ every?: Prisma.ChatMessageWhereInput
337
+ some?: Prisma.ChatMessageWhereInput
338
+ none?: Prisma.ChatMessageWhereInput
339
+ }
340
+
341
+ export type ChatMessageOrderByRelationAggregateInput = {
342
+ _count?: Prisma.SortOrder
343
+ }
344
+
345
+ export type ChatMessageCountOrderByAggregateInput = {
346
+ id?: Prisma.SortOrder
347
+ threadId?: Prisma.SortOrder
348
+ role?: Prisma.SortOrder
349
+ content?: Prisma.SortOrder
350
+ parts?: Prisma.SortOrder
351
+ thinking?: Prisma.SortOrder
352
+ citations?: Prisma.SortOrder
353
+ createdAt?: Prisma.SortOrder
354
+ }
355
+
356
+ export type ChatMessageMaxOrderByAggregateInput = {
357
+ id?: Prisma.SortOrder
358
+ threadId?: Prisma.SortOrder
359
+ role?: Prisma.SortOrder
360
+ content?: Prisma.SortOrder
361
+ thinking?: Prisma.SortOrder
362
+ createdAt?: Prisma.SortOrder
363
+ }
364
+
365
+ export type ChatMessageMinOrderByAggregateInput = {
366
+ id?: Prisma.SortOrder
367
+ threadId?: Prisma.SortOrder
368
+ role?: Prisma.SortOrder
369
+ content?: Prisma.SortOrder
370
+ thinking?: Prisma.SortOrder
371
+ createdAt?: Prisma.SortOrder
372
+ }
373
+
374
+ export type ChatMessageCreateNestedManyWithoutThreadInput = {
375
+ create?: Prisma.XOR<Prisma.ChatMessageCreateWithoutThreadInput, Prisma.ChatMessageUncheckedCreateWithoutThreadInput> | Prisma.ChatMessageCreateWithoutThreadInput[] | Prisma.ChatMessageUncheckedCreateWithoutThreadInput[]
376
+ connectOrCreate?: Prisma.ChatMessageCreateOrConnectWithoutThreadInput | Prisma.ChatMessageCreateOrConnectWithoutThreadInput[]
377
+ createMany?: Prisma.ChatMessageCreateManyThreadInputEnvelope
378
+ connect?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
379
+ }
380
+
381
+ export type ChatMessageUncheckedCreateNestedManyWithoutThreadInput = {
382
+ create?: Prisma.XOR<Prisma.ChatMessageCreateWithoutThreadInput, Prisma.ChatMessageUncheckedCreateWithoutThreadInput> | Prisma.ChatMessageCreateWithoutThreadInput[] | Prisma.ChatMessageUncheckedCreateWithoutThreadInput[]
383
+ connectOrCreate?: Prisma.ChatMessageCreateOrConnectWithoutThreadInput | Prisma.ChatMessageCreateOrConnectWithoutThreadInput[]
384
+ createMany?: Prisma.ChatMessageCreateManyThreadInputEnvelope
385
+ connect?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
386
+ }
387
+
388
+ export type ChatMessageUpdateManyWithoutThreadNestedInput = {
389
+ create?: Prisma.XOR<Prisma.ChatMessageCreateWithoutThreadInput, Prisma.ChatMessageUncheckedCreateWithoutThreadInput> | Prisma.ChatMessageCreateWithoutThreadInput[] | Prisma.ChatMessageUncheckedCreateWithoutThreadInput[]
390
+ connectOrCreate?: Prisma.ChatMessageCreateOrConnectWithoutThreadInput | Prisma.ChatMessageCreateOrConnectWithoutThreadInput[]
391
+ upsert?: Prisma.ChatMessageUpsertWithWhereUniqueWithoutThreadInput | Prisma.ChatMessageUpsertWithWhereUniqueWithoutThreadInput[]
392
+ createMany?: Prisma.ChatMessageCreateManyThreadInputEnvelope
393
+ set?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
394
+ disconnect?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
395
+ delete?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
396
+ connect?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
397
+ update?: Prisma.ChatMessageUpdateWithWhereUniqueWithoutThreadInput | Prisma.ChatMessageUpdateWithWhereUniqueWithoutThreadInput[]
398
+ updateMany?: Prisma.ChatMessageUpdateManyWithWhereWithoutThreadInput | Prisma.ChatMessageUpdateManyWithWhereWithoutThreadInput[]
399
+ deleteMany?: Prisma.ChatMessageScalarWhereInput | Prisma.ChatMessageScalarWhereInput[]
400
+ }
401
+
402
+ export type ChatMessageUncheckedUpdateManyWithoutThreadNestedInput = {
403
+ create?: Prisma.XOR<Prisma.ChatMessageCreateWithoutThreadInput, Prisma.ChatMessageUncheckedCreateWithoutThreadInput> | Prisma.ChatMessageCreateWithoutThreadInput[] | Prisma.ChatMessageUncheckedCreateWithoutThreadInput[]
404
+ connectOrCreate?: Prisma.ChatMessageCreateOrConnectWithoutThreadInput | Prisma.ChatMessageCreateOrConnectWithoutThreadInput[]
405
+ upsert?: Prisma.ChatMessageUpsertWithWhereUniqueWithoutThreadInput | Prisma.ChatMessageUpsertWithWhereUniqueWithoutThreadInput[]
406
+ createMany?: Prisma.ChatMessageCreateManyThreadInputEnvelope
407
+ set?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
408
+ disconnect?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
409
+ delete?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
410
+ connect?: Prisma.ChatMessageWhereUniqueInput | Prisma.ChatMessageWhereUniqueInput[]
411
+ update?: Prisma.ChatMessageUpdateWithWhereUniqueWithoutThreadInput | Prisma.ChatMessageUpdateWithWhereUniqueWithoutThreadInput[]
412
+ updateMany?: Prisma.ChatMessageUpdateManyWithWhereWithoutThreadInput | Prisma.ChatMessageUpdateManyWithWhereWithoutThreadInput[]
413
+ deleteMany?: Prisma.ChatMessageScalarWhereInput | Prisma.ChatMessageScalarWhereInput[]
414
+ }
415
+
416
+ export type ChatMessageCreateWithoutThreadInput = {
417
+ id?: string
418
+ role: string
419
+ content: string
420
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
421
+ thinking?: string | null
422
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
423
+ createdAt?: Date | string
424
+ }
425
+
426
+ export type ChatMessageUncheckedCreateWithoutThreadInput = {
427
+ id?: string
428
+ role: string
429
+ content: string
430
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
431
+ thinking?: string | null
432
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
433
+ createdAt?: Date | string
434
+ }
435
+
436
+ export type ChatMessageCreateOrConnectWithoutThreadInput = {
437
+ where: Prisma.ChatMessageWhereUniqueInput
438
+ create: Prisma.XOR<Prisma.ChatMessageCreateWithoutThreadInput, Prisma.ChatMessageUncheckedCreateWithoutThreadInput>
439
+ }
440
+
441
+ export type ChatMessageCreateManyThreadInputEnvelope = {
442
+ data: Prisma.ChatMessageCreateManyThreadInput | Prisma.ChatMessageCreateManyThreadInput[]
443
+ }
444
+
445
+ export type ChatMessageUpsertWithWhereUniqueWithoutThreadInput = {
446
+ where: Prisma.ChatMessageWhereUniqueInput
447
+ update: Prisma.XOR<Prisma.ChatMessageUpdateWithoutThreadInput, Prisma.ChatMessageUncheckedUpdateWithoutThreadInput>
448
+ create: Prisma.XOR<Prisma.ChatMessageCreateWithoutThreadInput, Prisma.ChatMessageUncheckedCreateWithoutThreadInput>
449
+ }
450
+
451
+ export type ChatMessageUpdateWithWhereUniqueWithoutThreadInput = {
452
+ where: Prisma.ChatMessageWhereUniqueInput
453
+ data: Prisma.XOR<Prisma.ChatMessageUpdateWithoutThreadInput, Prisma.ChatMessageUncheckedUpdateWithoutThreadInput>
454
+ }
455
+
456
+ export type ChatMessageUpdateManyWithWhereWithoutThreadInput = {
457
+ where: Prisma.ChatMessageScalarWhereInput
458
+ data: Prisma.XOR<Prisma.ChatMessageUpdateManyMutationInput, Prisma.ChatMessageUncheckedUpdateManyWithoutThreadInput>
459
+ }
460
+
461
+ export type ChatMessageScalarWhereInput = {
462
+ AND?: Prisma.ChatMessageScalarWhereInput | Prisma.ChatMessageScalarWhereInput[]
463
+ OR?: Prisma.ChatMessageScalarWhereInput[]
464
+ NOT?: Prisma.ChatMessageScalarWhereInput | Prisma.ChatMessageScalarWhereInput[]
465
+ id?: Prisma.StringFilter<"ChatMessage"> | string
466
+ threadId?: Prisma.StringFilter<"ChatMessage"> | string
467
+ role?: Prisma.StringFilter<"ChatMessage"> | string
468
+ content?: Prisma.StringFilter<"ChatMessage"> | string
469
+ parts?: Prisma.JsonNullableFilter<"ChatMessage">
470
+ thinking?: Prisma.StringNullableFilter<"ChatMessage"> | string | null
471
+ citations?: Prisma.JsonNullableFilter<"ChatMessage">
472
+ createdAt?: Prisma.DateTimeFilter<"ChatMessage"> | Date | string
473
+ }
474
+
475
+ export type ChatMessageCreateManyThreadInput = {
476
+ id?: string
477
+ role: string
478
+ content: string
479
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
480
+ thinking?: string | null
481
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
482
+ createdAt?: Date | string
483
+ }
484
+
485
+ export type ChatMessageUpdateWithoutThreadInput = {
486
+ id?: Prisma.StringFieldUpdateOperationsInput | string
487
+ role?: Prisma.StringFieldUpdateOperationsInput | string
488
+ content?: Prisma.StringFieldUpdateOperationsInput | string
489
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
490
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
491
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
492
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
493
+ }
494
+
495
+ export type ChatMessageUncheckedUpdateWithoutThreadInput = {
496
+ id?: Prisma.StringFieldUpdateOperationsInput | string
497
+ role?: Prisma.StringFieldUpdateOperationsInput | string
498
+ content?: Prisma.StringFieldUpdateOperationsInput | string
499
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
500
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
501
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
502
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
503
+ }
504
+
505
+ export type ChatMessageUncheckedUpdateManyWithoutThreadInput = {
506
+ id?: Prisma.StringFieldUpdateOperationsInput | string
507
+ role?: Prisma.StringFieldUpdateOperationsInput | string
508
+ content?: Prisma.StringFieldUpdateOperationsInput | string
509
+ parts?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
510
+ thinking?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
511
+ citations?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
512
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
513
+ }
514
+
515
+
516
+
517
+ export type ChatMessageSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
518
+ id?: boolean
519
+ threadId?: boolean
520
+ role?: boolean
521
+ content?: boolean
522
+ parts?: boolean
523
+ thinking?: boolean
524
+ citations?: boolean
525
+ createdAt?: boolean
526
+ thread?: boolean | Prisma.ChatThreadDefaultArgs<ExtArgs>
527
+ }, ExtArgs["result"]["chatMessage"]>
528
+
529
+ export type ChatMessageSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
530
+ id?: boolean
531
+ threadId?: boolean
532
+ role?: boolean
533
+ content?: boolean
534
+ parts?: boolean
535
+ thinking?: boolean
536
+ citations?: boolean
537
+ createdAt?: boolean
538
+ thread?: boolean | Prisma.ChatThreadDefaultArgs<ExtArgs>
539
+ }, ExtArgs["result"]["chatMessage"]>
540
+
541
+ export type ChatMessageSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
542
+ id?: boolean
543
+ threadId?: boolean
544
+ role?: boolean
545
+ content?: boolean
546
+ parts?: boolean
547
+ thinking?: boolean
548
+ citations?: boolean
549
+ createdAt?: boolean
550
+ thread?: boolean | Prisma.ChatThreadDefaultArgs<ExtArgs>
551
+ }, ExtArgs["result"]["chatMessage"]>
552
+
553
+ export type ChatMessageSelectScalar = {
554
+ id?: boolean
555
+ threadId?: boolean
556
+ role?: boolean
557
+ content?: boolean
558
+ parts?: boolean
559
+ thinking?: boolean
560
+ citations?: boolean
561
+ createdAt?: boolean
562
+ }
563
+
564
+ export type ChatMessageOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "threadId" | "role" | "content" | "parts" | "thinking" | "citations" | "createdAt", ExtArgs["result"]["chatMessage"]>
565
+ export type ChatMessageInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
566
+ thread?: boolean | Prisma.ChatThreadDefaultArgs<ExtArgs>
567
+ }
568
+ export type ChatMessageIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
569
+ thread?: boolean | Prisma.ChatThreadDefaultArgs<ExtArgs>
570
+ }
571
+ export type ChatMessageIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
572
+ thread?: boolean | Prisma.ChatThreadDefaultArgs<ExtArgs>
573
+ }
574
+
575
+ export type $ChatMessagePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
576
+ name: "ChatMessage"
577
+ objects: {
578
+ thread: Prisma.$ChatThreadPayload<ExtArgs>
579
+ }
580
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
581
+ id: string
582
+ threadId: string
583
+ role: string
584
+ content: string
585
+ parts: runtime.JsonValue | null
586
+ thinking: string | null
587
+ citations: runtime.JsonValue | null
588
+ createdAt: Date
589
+ }, ExtArgs["result"]["chatMessage"]>
590
+ composites: {}
591
+ }
592
+
593
+ export type ChatMessageGetPayload<S extends boolean | null | undefined | ChatMessageDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload, S>
594
+
595
+ export type ChatMessageCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
596
+ Omit<ChatMessageFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
597
+ select?: ChatMessageCountAggregateInputType | true
598
+ }
599
+
600
+ export interface ChatMessageDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
601
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ChatMessage'], meta: { name: 'ChatMessage' } }
602
+ /**
603
+ * Find zero or one ChatMessage that matches the filter.
604
+ * @param {ChatMessageFindUniqueArgs} args - Arguments to find a ChatMessage
605
+ * @example
606
+ * // Get one ChatMessage
607
+ * const chatMessage = await prisma.chatMessage.findUnique({
608
+ * where: {
609
+ * // ... provide filter here
610
+ * }
611
+ * })
612
+ */
613
+ findUnique<T extends ChatMessageFindUniqueArgs>(args: Prisma.SelectSubset<T, ChatMessageFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
614
+
615
+ /**
616
+ * Find one ChatMessage that matches the filter or throw an error with `error.code='P2025'`
617
+ * if no matches were found.
618
+ * @param {ChatMessageFindUniqueOrThrowArgs} args - Arguments to find a ChatMessage
619
+ * @example
620
+ * // Get one ChatMessage
621
+ * const chatMessage = await prisma.chatMessage.findUniqueOrThrow({
622
+ * where: {
623
+ * // ... provide filter here
624
+ * }
625
+ * })
626
+ */
627
+ findUniqueOrThrow<T extends ChatMessageFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ChatMessageFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
628
+
629
+ /**
630
+ * Find the first ChatMessage that matches the filter.
631
+ * Note, that providing `undefined` is treated as the value not being there.
632
+ * Read more here: https://pris.ly/d/null-undefined
633
+ * @param {ChatMessageFindFirstArgs} args - Arguments to find a ChatMessage
634
+ * @example
635
+ * // Get one ChatMessage
636
+ * const chatMessage = await prisma.chatMessage.findFirst({
637
+ * where: {
638
+ * // ... provide filter here
639
+ * }
640
+ * })
641
+ */
642
+ findFirst<T extends ChatMessageFindFirstArgs>(args?: Prisma.SelectSubset<T, ChatMessageFindFirstArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
643
+
644
+ /**
645
+ * Find the first ChatMessage that matches the filter or
646
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
647
+ * Note, that providing `undefined` is treated as the value not being there.
648
+ * Read more here: https://pris.ly/d/null-undefined
649
+ * @param {ChatMessageFindFirstOrThrowArgs} args - Arguments to find a ChatMessage
650
+ * @example
651
+ * // Get one ChatMessage
652
+ * const chatMessage = await prisma.chatMessage.findFirstOrThrow({
653
+ * where: {
654
+ * // ... provide filter here
655
+ * }
656
+ * })
657
+ */
658
+ findFirstOrThrow<T extends ChatMessageFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ChatMessageFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
659
+
660
+ /**
661
+ * Find zero or more ChatMessages that matches the filter.
662
+ * Note, that providing `undefined` is treated as the value not being there.
663
+ * Read more here: https://pris.ly/d/null-undefined
664
+ * @param {ChatMessageFindManyArgs} args - Arguments to filter and select certain fields only.
665
+ * @example
666
+ * // Get all ChatMessages
667
+ * const chatMessages = await prisma.chatMessage.findMany()
668
+ *
669
+ * // Get first 10 ChatMessages
670
+ * const chatMessages = await prisma.chatMessage.findMany({ take: 10 })
671
+ *
672
+ * // Only select the `id`
673
+ * const chatMessageWithIdOnly = await prisma.chatMessage.findMany({ select: { id: true } })
674
+ *
675
+ */
676
+ findMany<T extends ChatMessageFindManyArgs>(args?: Prisma.SelectSubset<T, ChatMessageFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
677
+
678
+ /**
679
+ * Create a ChatMessage.
680
+ * @param {ChatMessageCreateArgs} args - Arguments to create a ChatMessage.
681
+ * @example
682
+ * // Create one ChatMessage
683
+ * const ChatMessage = await prisma.chatMessage.create({
684
+ * data: {
685
+ * // ... data to create a ChatMessage
686
+ * }
687
+ * })
688
+ *
689
+ */
690
+ create<T extends ChatMessageCreateArgs>(args: Prisma.SelectSubset<T, ChatMessageCreateArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
691
+
692
+ /**
693
+ * Create many ChatMessages.
694
+ * @param {ChatMessageCreateManyArgs} args - Arguments to create many ChatMessages.
695
+ * @example
696
+ * // Create many ChatMessages
697
+ * const chatMessage = await prisma.chatMessage.createMany({
698
+ * data: [
699
+ * // ... provide data here
700
+ * ]
701
+ * })
702
+ *
703
+ */
704
+ createMany<T extends ChatMessageCreateManyArgs>(args?: Prisma.SelectSubset<T, ChatMessageCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
705
+
706
+ /**
707
+ * Create many ChatMessages and returns the data saved in the database.
708
+ * @param {ChatMessageCreateManyAndReturnArgs} args - Arguments to create many ChatMessages.
709
+ * @example
710
+ * // Create many ChatMessages
711
+ * const chatMessage = await prisma.chatMessage.createManyAndReturn({
712
+ * data: [
713
+ * // ... provide data here
714
+ * ]
715
+ * })
716
+ *
717
+ * // Create many ChatMessages and only return the `id`
718
+ * const chatMessageWithIdOnly = await prisma.chatMessage.createManyAndReturn({
719
+ * select: { id: true },
720
+ * data: [
721
+ * // ... provide data here
722
+ * ]
723
+ * })
724
+ * Note, that providing `undefined` is treated as the value not being there.
725
+ * Read more here: https://pris.ly/d/null-undefined
726
+ *
727
+ */
728
+ createManyAndReturn<T extends ChatMessageCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ChatMessageCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
729
+
730
+ /**
731
+ * Delete a ChatMessage.
732
+ * @param {ChatMessageDeleteArgs} args - Arguments to delete one ChatMessage.
733
+ * @example
734
+ * // Delete one ChatMessage
735
+ * const ChatMessage = await prisma.chatMessage.delete({
736
+ * where: {
737
+ * // ... filter to delete one ChatMessage
738
+ * }
739
+ * })
740
+ *
741
+ */
742
+ delete<T extends ChatMessageDeleteArgs>(args: Prisma.SelectSubset<T, ChatMessageDeleteArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
743
+
744
+ /**
745
+ * Update one ChatMessage.
746
+ * @param {ChatMessageUpdateArgs} args - Arguments to update one ChatMessage.
747
+ * @example
748
+ * // Update one ChatMessage
749
+ * const chatMessage = await prisma.chatMessage.update({
750
+ * where: {
751
+ * // ... provide filter here
752
+ * },
753
+ * data: {
754
+ * // ... provide data here
755
+ * }
756
+ * })
757
+ *
758
+ */
759
+ update<T extends ChatMessageUpdateArgs>(args: Prisma.SelectSubset<T, ChatMessageUpdateArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
760
+
761
+ /**
762
+ * Delete zero or more ChatMessages.
763
+ * @param {ChatMessageDeleteManyArgs} args - Arguments to filter ChatMessages to delete.
764
+ * @example
765
+ * // Delete a few ChatMessages
766
+ * const { count } = await prisma.chatMessage.deleteMany({
767
+ * where: {
768
+ * // ... provide filter here
769
+ * }
770
+ * })
771
+ *
772
+ */
773
+ deleteMany<T extends ChatMessageDeleteManyArgs>(args?: Prisma.SelectSubset<T, ChatMessageDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
774
+
775
+ /**
776
+ * Update zero or more ChatMessages.
777
+ * Note, that providing `undefined` is treated as the value not being there.
778
+ * Read more here: https://pris.ly/d/null-undefined
779
+ * @param {ChatMessageUpdateManyArgs} args - Arguments to update one or more rows.
780
+ * @example
781
+ * // Update many ChatMessages
782
+ * const chatMessage = await prisma.chatMessage.updateMany({
783
+ * where: {
784
+ * // ... provide filter here
785
+ * },
786
+ * data: {
787
+ * // ... provide data here
788
+ * }
789
+ * })
790
+ *
791
+ */
792
+ updateMany<T extends ChatMessageUpdateManyArgs>(args: Prisma.SelectSubset<T, ChatMessageUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
793
+
794
+ /**
795
+ * Update zero or more ChatMessages and returns the data updated in the database.
796
+ * @param {ChatMessageUpdateManyAndReturnArgs} args - Arguments to update many ChatMessages.
797
+ * @example
798
+ * // Update many ChatMessages
799
+ * const chatMessage = await prisma.chatMessage.updateManyAndReturn({
800
+ * where: {
801
+ * // ... provide filter here
802
+ * },
803
+ * data: [
804
+ * // ... provide data here
805
+ * ]
806
+ * })
807
+ *
808
+ * // Update zero or more ChatMessages and only return the `id`
809
+ * const chatMessageWithIdOnly = await prisma.chatMessage.updateManyAndReturn({
810
+ * select: { id: true },
811
+ * where: {
812
+ * // ... provide filter here
813
+ * },
814
+ * data: [
815
+ * // ... provide data here
816
+ * ]
817
+ * })
818
+ * Note, that providing `undefined` is treated as the value not being there.
819
+ * Read more here: https://pris.ly/d/null-undefined
820
+ *
821
+ */
822
+ updateManyAndReturn<T extends ChatMessageUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ChatMessageUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
823
+
824
+ /**
825
+ * Create or update one ChatMessage.
826
+ * @param {ChatMessageUpsertArgs} args - Arguments to update or create a ChatMessage.
827
+ * @example
828
+ * // Update or create a ChatMessage
829
+ * const chatMessage = await prisma.chatMessage.upsert({
830
+ * create: {
831
+ * // ... data to create a ChatMessage
832
+ * },
833
+ * update: {
834
+ * // ... in case it already exists, update
835
+ * },
836
+ * where: {
837
+ * // ... the filter for the ChatMessage we want to update
838
+ * }
839
+ * })
840
+ */
841
+ upsert<T extends ChatMessageUpsertArgs>(args: Prisma.SelectSubset<T, ChatMessageUpsertArgs<ExtArgs>>): Prisma.Prisma__ChatMessageClient<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
842
+
843
+
844
+ /**
845
+ * Count the number of ChatMessages.
846
+ * Note, that providing `undefined` is treated as the value not being there.
847
+ * Read more here: https://pris.ly/d/null-undefined
848
+ * @param {ChatMessageCountArgs} args - Arguments to filter ChatMessages to count.
849
+ * @example
850
+ * // Count the number of ChatMessages
851
+ * const count = await prisma.chatMessage.count({
852
+ * where: {
853
+ * // ... the filter for the ChatMessages we want to count
854
+ * }
855
+ * })
856
+ **/
857
+ count<T extends ChatMessageCountArgs>(
858
+ args?: Prisma.Subset<T, ChatMessageCountArgs>,
859
+ ): Prisma.PrismaPromise<
860
+ T extends runtime.Types.Utils.Record<'select', any>
861
+ ? T['select'] extends true
862
+ ? number
863
+ : Prisma.GetScalarType<T['select'], ChatMessageCountAggregateOutputType>
864
+ : number
865
+ >
866
+
867
+ /**
868
+ * Allows you to perform aggregations operations on a ChatMessage.
869
+ * Note, that providing `undefined` is treated as the value not being there.
870
+ * Read more here: https://pris.ly/d/null-undefined
871
+ * @param {ChatMessageAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
872
+ * @example
873
+ * // Ordered by age ascending
874
+ * // Where email contains prisma.io
875
+ * // Limited to the 10 users
876
+ * const aggregations = await prisma.user.aggregate({
877
+ * _avg: {
878
+ * age: true,
879
+ * },
880
+ * where: {
881
+ * email: {
882
+ * contains: "prisma.io",
883
+ * },
884
+ * },
885
+ * orderBy: {
886
+ * age: "asc",
887
+ * },
888
+ * take: 10,
889
+ * })
890
+ **/
891
+ aggregate<T extends ChatMessageAggregateArgs>(args: Prisma.Subset<T, ChatMessageAggregateArgs>): Prisma.PrismaPromise<GetChatMessageAggregateType<T>>
892
+
893
+ /**
894
+ * Group by ChatMessage.
895
+ * Note, that providing `undefined` is treated as the value not being there.
896
+ * Read more here: https://pris.ly/d/null-undefined
897
+ * @param {ChatMessageGroupByArgs} args - Group by arguments.
898
+ * @example
899
+ * // Group by city, order by createdAt, get count
900
+ * const result = await prisma.user.groupBy({
901
+ * by: ['city', 'createdAt'],
902
+ * orderBy: {
903
+ * createdAt: true
904
+ * },
905
+ * _count: {
906
+ * _all: true
907
+ * },
908
+ * })
909
+ *
910
+ **/
911
+ groupBy<
912
+ T extends ChatMessageGroupByArgs,
913
+ HasSelectOrTake extends Prisma.Or<
914
+ Prisma.Extends<'skip', Prisma.Keys<T>>,
915
+ Prisma.Extends<'take', Prisma.Keys<T>>
916
+ >,
917
+ OrderByArg extends Prisma.True extends HasSelectOrTake
918
+ ? { orderBy: ChatMessageGroupByArgs['orderBy'] }
919
+ : { orderBy?: ChatMessageGroupByArgs['orderBy'] },
920
+ OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
921
+ ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
922
+ ByValid extends Prisma.Has<ByFields, OrderFields>,
923
+ HavingFields extends Prisma.GetHavingFields<T['having']>,
924
+ HavingValid extends Prisma.Has<ByFields, HavingFields>,
925
+ ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
926
+ InputErrors extends ByEmpty extends Prisma.True
927
+ ? `Error: "by" must not be empty.`
928
+ : HavingValid extends Prisma.False
929
+ ? {
930
+ [P in HavingFields]: P extends ByFields
931
+ ? never
932
+ : P extends string
933
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
934
+ : [
935
+ Error,
936
+ 'Field ',
937
+ P,
938
+ ` in "having" needs to be provided in "by"`,
939
+ ]
940
+ }[HavingFields]
941
+ : 'take' extends Prisma.Keys<T>
942
+ ? 'orderBy' extends Prisma.Keys<T>
943
+ ? ByValid extends Prisma.True
944
+ ? {}
945
+ : {
946
+ [P in OrderFields]: P extends ByFields
947
+ ? never
948
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
949
+ }[OrderFields]
950
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
951
+ : 'skip' extends Prisma.Keys<T>
952
+ ? 'orderBy' extends Prisma.Keys<T>
953
+ ? ByValid extends Prisma.True
954
+ ? {}
955
+ : {
956
+ [P in OrderFields]: P extends ByFields
957
+ ? never
958
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
959
+ }[OrderFields]
960
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
961
+ : ByValid extends Prisma.True
962
+ ? {}
963
+ : {
964
+ [P in OrderFields]: P extends ByFields
965
+ ? never
966
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
967
+ }[OrderFields]
968
+ >(args: Prisma.SubsetIntersection<T, ChatMessageGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetChatMessageGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
969
+ /**
970
+ * Fields of the ChatMessage model
971
+ */
972
+ readonly fields: ChatMessageFieldRefs;
973
+ }
974
+
975
+ /**
976
+ * The delegate class that acts as a "Promise-like" for ChatMessage.
977
+ * Why is this prefixed with `Prisma__`?
978
+ * Because we want to prevent naming conflicts as mentioned in
979
+ * https://github.com/prisma/prisma-client-js/issues/707
980
+ */
981
+ export interface Prisma__ChatMessageClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
982
+ readonly [Symbol.toStringTag]: "PrismaPromise"
983
+ thread<T extends Prisma.ChatThreadDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ChatThreadDefaultArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
984
+ /**
985
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
986
+ * @param onfulfilled The callback to execute when the Promise is resolved.
987
+ * @param onrejected The callback to execute when the Promise is rejected.
988
+ * @returns A Promise for the completion of which ever callback is executed.
989
+ */
990
+ 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>
991
+ /**
992
+ * Attaches a callback for only the rejection of the Promise.
993
+ * @param onrejected The callback to execute when the Promise is rejected.
994
+ * @returns A Promise for the completion of the callback.
995
+ */
996
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
997
+ /**
998
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
999
+ * resolved value cannot be modified from the callback.
1000
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
1001
+ * @returns A Promise for the completion of the callback.
1002
+ */
1003
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
1004
+ }
1005
+
1006
+
1007
+
1008
+
1009
+ /**
1010
+ * Fields of the ChatMessage model
1011
+ */
1012
+ export interface ChatMessageFieldRefs {
1013
+ readonly id: Prisma.FieldRef<"ChatMessage", 'String'>
1014
+ readonly threadId: Prisma.FieldRef<"ChatMessage", 'String'>
1015
+ readonly role: Prisma.FieldRef<"ChatMessage", 'String'>
1016
+ readonly content: Prisma.FieldRef<"ChatMessage", 'String'>
1017
+ readonly parts: Prisma.FieldRef<"ChatMessage", 'Json'>
1018
+ readonly thinking: Prisma.FieldRef<"ChatMessage", 'String'>
1019
+ readonly citations: Prisma.FieldRef<"ChatMessage", 'Json'>
1020
+ readonly createdAt: Prisma.FieldRef<"ChatMessage", 'DateTime'>
1021
+ }
1022
+
1023
+
1024
+ // Custom InputTypes
1025
+ /**
1026
+ * ChatMessage findUnique
1027
+ */
1028
+ export type ChatMessageFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1029
+ /**
1030
+ * Select specific fields to fetch from the ChatMessage
1031
+ */
1032
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1033
+ /**
1034
+ * Omit specific fields from the ChatMessage
1035
+ */
1036
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1037
+ /**
1038
+ * Choose, which related nodes to fetch as well
1039
+ */
1040
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1041
+ /**
1042
+ * Filter, which ChatMessage to fetch.
1043
+ */
1044
+ where: Prisma.ChatMessageWhereUniqueInput
1045
+ }
1046
+
1047
+ /**
1048
+ * ChatMessage findUniqueOrThrow
1049
+ */
1050
+ export type ChatMessageFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1051
+ /**
1052
+ * Select specific fields to fetch from the ChatMessage
1053
+ */
1054
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1055
+ /**
1056
+ * Omit specific fields from the ChatMessage
1057
+ */
1058
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1059
+ /**
1060
+ * Choose, which related nodes to fetch as well
1061
+ */
1062
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1063
+ /**
1064
+ * Filter, which ChatMessage to fetch.
1065
+ */
1066
+ where: Prisma.ChatMessageWhereUniqueInput
1067
+ }
1068
+
1069
+ /**
1070
+ * ChatMessage findFirst
1071
+ */
1072
+ export type ChatMessageFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1073
+ /**
1074
+ * Select specific fields to fetch from the ChatMessage
1075
+ */
1076
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1077
+ /**
1078
+ * Omit specific fields from the ChatMessage
1079
+ */
1080
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1081
+ /**
1082
+ * Choose, which related nodes to fetch as well
1083
+ */
1084
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1085
+ /**
1086
+ * Filter, which ChatMessage to fetch.
1087
+ */
1088
+ where?: Prisma.ChatMessageWhereInput
1089
+ /**
1090
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1091
+ *
1092
+ * Determine the order of ChatMessages to fetch.
1093
+ */
1094
+ orderBy?: Prisma.ChatMessageOrderByWithRelationInput | Prisma.ChatMessageOrderByWithRelationInput[]
1095
+ /**
1096
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1097
+ *
1098
+ * Sets the position for searching for ChatMessages.
1099
+ */
1100
+ cursor?: Prisma.ChatMessageWhereUniqueInput
1101
+ /**
1102
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1103
+ *
1104
+ * Take `±n` ChatMessages from the position of the cursor.
1105
+ */
1106
+ take?: number
1107
+ /**
1108
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1109
+ *
1110
+ * Skip the first `n` ChatMessages.
1111
+ */
1112
+ skip?: number
1113
+ /**
1114
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1115
+ *
1116
+ * Filter by unique combinations of ChatMessages.
1117
+ */
1118
+ distinct?: Prisma.ChatMessageScalarFieldEnum | Prisma.ChatMessageScalarFieldEnum[]
1119
+ }
1120
+
1121
+ /**
1122
+ * ChatMessage findFirstOrThrow
1123
+ */
1124
+ export type ChatMessageFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1125
+ /**
1126
+ * Select specific fields to fetch from the ChatMessage
1127
+ */
1128
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1129
+ /**
1130
+ * Omit specific fields from the ChatMessage
1131
+ */
1132
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1133
+ /**
1134
+ * Choose, which related nodes to fetch as well
1135
+ */
1136
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1137
+ /**
1138
+ * Filter, which ChatMessage to fetch.
1139
+ */
1140
+ where?: Prisma.ChatMessageWhereInput
1141
+ /**
1142
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1143
+ *
1144
+ * Determine the order of ChatMessages to fetch.
1145
+ */
1146
+ orderBy?: Prisma.ChatMessageOrderByWithRelationInput | Prisma.ChatMessageOrderByWithRelationInput[]
1147
+ /**
1148
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1149
+ *
1150
+ * Sets the position for searching for ChatMessages.
1151
+ */
1152
+ cursor?: Prisma.ChatMessageWhereUniqueInput
1153
+ /**
1154
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1155
+ *
1156
+ * Take `±n` ChatMessages from the position of the cursor.
1157
+ */
1158
+ take?: number
1159
+ /**
1160
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1161
+ *
1162
+ * Skip the first `n` ChatMessages.
1163
+ */
1164
+ skip?: number
1165
+ /**
1166
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1167
+ *
1168
+ * Filter by unique combinations of ChatMessages.
1169
+ */
1170
+ distinct?: Prisma.ChatMessageScalarFieldEnum | Prisma.ChatMessageScalarFieldEnum[]
1171
+ }
1172
+
1173
+ /**
1174
+ * ChatMessage findMany
1175
+ */
1176
+ export type ChatMessageFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1177
+ /**
1178
+ * Select specific fields to fetch from the ChatMessage
1179
+ */
1180
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1181
+ /**
1182
+ * Omit specific fields from the ChatMessage
1183
+ */
1184
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1185
+ /**
1186
+ * Choose, which related nodes to fetch as well
1187
+ */
1188
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1189
+ /**
1190
+ * Filter, which ChatMessages to fetch.
1191
+ */
1192
+ where?: Prisma.ChatMessageWhereInput
1193
+ /**
1194
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1195
+ *
1196
+ * Determine the order of ChatMessages to fetch.
1197
+ */
1198
+ orderBy?: Prisma.ChatMessageOrderByWithRelationInput | Prisma.ChatMessageOrderByWithRelationInput[]
1199
+ /**
1200
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1201
+ *
1202
+ * Sets the position for listing ChatMessages.
1203
+ */
1204
+ cursor?: Prisma.ChatMessageWhereUniqueInput
1205
+ /**
1206
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1207
+ *
1208
+ * Take `±n` ChatMessages from the position of the cursor.
1209
+ */
1210
+ take?: number
1211
+ /**
1212
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1213
+ *
1214
+ * Skip the first `n` ChatMessages.
1215
+ */
1216
+ skip?: number
1217
+ /**
1218
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1219
+ *
1220
+ * Filter by unique combinations of ChatMessages.
1221
+ */
1222
+ distinct?: Prisma.ChatMessageScalarFieldEnum | Prisma.ChatMessageScalarFieldEnum[]
1223
+ }
1224
+
1225
+ /**
1226
+ * ChatMessage create
1227
+ */
1228
+ export type ChatMessageCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1229
+ /**
1230
+ * Select specific fields to fetch from the ChatMessage
1231
+ */
1232
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1233
+ /**
1234
+ * Omit specific fields from the ChatMessage
1235
+ */
1236
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1237
+ /**
1238
+ * Choose, which related nodes to fetch as well
1239
+ */
1240
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1241
+ /**
1242
+ * The data needed to create a ChatMessage.
1243
+ */
1244
+ data: Prisma.XOR<Prisma.ChatMessageCreateInput, Prisma.ChatMessageUncheckedCreateInput>
1245
+ }
1246
+
1247
+ /**
1248
+ * ChatMessage createMany
1249
+ */
1250
+ export type ChatMessageCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1251
+ /**
1252
+ * The data used to create many ChatMessages.
1253
+ */
1254
+ data: Prisma.ChatMessageCreateManyInput | Prisma.ChatMessageCreateManyInput[]
1255
+ }
1256
+
1257
+ /**
1258
+ * ChatMessage createManyAndReturn
1259
+ */
1260
+ export type ChatMessageCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1261
+ /**
1262
+ * Select specific fields to fetch from the ChatMessage
1263
+ */
1264
+ select?: Prisma.ChatMessageSelectCreateManyAndReturn<ExtArgs> | null
1265
+ /**
1266
+ * Omit specific fields from the ChatMessage
1267
+ */
1268
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1269
+ /**
1270
+ * The data used to create many ChatMessages.
1271
+ */
1272
+ data: Prisma.ChatMessageCreateManyInput | Prisma.ChatMessageCreateManyInput[]
1273
+ /**
1274
+ * Choose, which related nodes to fetch as well
1275
+ */
1276
+ include?: Prisma.ChatMessageIncludeCreateManyAndReturn<ExtArgs> | null
1277
+ }
1278
+
1279
+ /**
1280
+ * ChatMessage update
1281
+ */
1282
+ export type ChatMessageUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1283
+ /**
1284
+ * Select specific fields to fetch from the ChatMessage
1285
+ */
1286
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1287
+ /**
1288
+ * Omit specific fields from the ChatMessage
1289
+ */
1290
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1291
+ /**
1292
+ * Choose, which related nodes to fetch as well
1293
+ */
1294
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1295
+ /**
1296
+ * The data needed to update a ChatMessage.
1297
+ */
1298
+ data: Prisma.XOR<Prisma.ChatMessageUpdateInput, Prisma.ChatMessageUncheckedUpdateInput>
1299
+ /**
1300
+ * Choose, which ChatMessage to update.
1301
+ */
1302
+ where: Prisma.ChatMessageWhereUniqueInput
1303
+ }
1304
+
1305
+ /**
1306
+ * ChatMessage updateMany
1307
+ */
1308
+ export type ChatMessageUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1309
+ /**
1310
+ * The data used to update ChatMessages.
1311
+ */
1312
+ data: Prisma.XOR<Prisma.ChatMessageUpdateManyMutationInput, Prisma.ChatMessageUncheckedUpdateManyInput>
1313
+ /**
1314
+ * Filter which ChatMessages to update
1315
+ */
1316
+ where?: Prisma.ChatMessageWhereInput
1317
+ /**
1318
+ * Limit how many ChatMessages to update.
1319
+ */
1320
+ limit?: number
1321
+ }
1322
+
1323
+ /**
1324
+ * ChatMessage updateManyAndReturn
1325
+ */
1326
+ export type ChatMessageUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1327
+ /**
1328
+ * Select specific fields to fetch from the ChatMessage
1329
+ */
1330
+ select?: Prisma.ChatMessageSelectUpdateManyAndReturn<ExtArgs> | null
1331
+ /**
1332
+ * Omit specific fields from the ChatMessage
1333
+ */
1334
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1335
+ /**
1336
+ * The data used to update ChatMessages.
1337
+ */
1338
+ data: Prisma.XOR<Prisma.ChatMessageUpdateManyMutationInput, Prisma.ChatMessageUncheckedUpdateManyInput>
1339
+ /**
1340
+ * Filter which ChatMessages to update
1341
+ */
1342
+ where?: Prisma.ChatMessageWhereInput
1343
+ /**
1344
+ * Limit how many ChatMessages to update.
1345
+ */
1346
+ limit?: number
1347
+ /**
1348
+ * Choose, which related nodes to fetch as well
1349
+ */
1350
+ include?: Prisma.ChatMessageIncludeUpdateManyAndReturn<ExtArgs> | null
1351
+ }
1352
+
1353
+ /**
1354
+ * ChatMessage upsert
1355
+ */
1356
+ export type ChatMessageUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1357
+ /**
1358
+ * Select specific fields to fetch from the ChatMessage
1359
+ */
1360
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1361
+ /**
1362
+ * Omit specific fields from the ChatMessage
1363
+ */
1364
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1365
+ /**
1366
+ * Choose, which related nodes to fetch as well
1367
+ */
1368
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1369
+ /**
1370
+ * The filter to search for the ChatMessage to update in case it exists.
1371
+ */
1372
+ where: Prisma.ChatMessageWhereUniqueInput
1373
+ /**
1374
+ * In case the ChatMessage found by the `where` argument doesn't exist, create a new ChatMessage with this data.
1375
+ */
1376
+ create: Prisma.XOR<Prisma.ChatMessageCreateInput, Prisma.ChatMessageUncheckedCreateInput>
1377
+ /**
1378
+ * In case the ChatMessage was found with the provided `where` argument, update it with this data.
1379
+ */
1380
+ update: Prisma.XOR<Prisma.ChatMessageUpdateInput, Prisma.ChatMessageUncheckedUpdateInput>
1381
+ }
1382
+
1383
+ /**
1384
+ * ChatMessage delete
1385
+ */
1386
+ export type ChatMessageDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1387
+ /**
1388
+ * Select specific fields to fetch from the ChatMessage
1389
+ */
1390
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1391
+ /**
1392
+ * Omit specific fields from the ChatMessage
1393
+ */
1394
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1395
+ /**
1396
+ * Choose, which related nodes to fetch as well
1397
+ */
1398
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1399
+ /**
1400
+ * Filter which ChatMessage to delete.
1401
+ */
1402
+ where: Prisma.ChatMessageWhereUniqueInput
1403
+ }
1404
+
1405
+ /**
1406
+ * ChatMessage deleteMany
1407
+ */
1408
+ export type ChatMessageDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1409
+ /**
1410
+ * Filter which ChatMessages to delete
1411
+ */
1412
+ where?: Prisma.ChatMessageWhereInput
1413
+ /**
1414
+ * Limit how many ChatMessages to delete.
1415
+ */
1416
+ limit?: number
1417
+ }
1418
+
1419
+ /**
1420
+ * ChatMessage without action
1421
+ */
1422
+ export type ChatMessageDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1423
+ /**
1424
+ * Select specific fields to fetch from the ChatMessage
1425
+ */
1426
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
1427
+ /**
1428
+ * Omit specific fields from the ChatMessage
1429
+ */
1430
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
1431
+ /**
1432
+ * Choose, which related nodes to fetch as well
1433
+ */
1434
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
1435
+ }