@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,2129 @@
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 `ChatThread` 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 ChatThread
17
+ *
18
+ */
19
+ export type ChatThreadModel = runtime.Types.Result.DefaultSelection<Prisma.$ChatThreadPayload>
20
+
21
+ export type AggregateChatThread = {
22
+ _count: ChatThreadCountAggregateOutputType | null
23
+ _min: ChatThreadMinAggregateOutputType | null
24
+ _max: ChatThreadMaxAggregateOutputType | null
25
+ }
26
+
27
+ export type ChatThreadMinAggregateOutputType = {
28
+ id: string | null
29
+ userId: string | null
30
+ title: string | null
31
+ isArchived: boolean | null
32
+ createdAt: Date | null
33
+ updatedAt: Date | null
34
+ agentId: string | null
35
+ }
36
+
37
+ export type ChatThreadMaxAggregateOutputType = {
38
+ id: string | null
39
+ userId: string | null
40
+ title: string | null
41
+ isArchived: boolean | null
42
+ createdAt: Date | null
43
+ updatedAt: Date | null
44
+ agentId: string | null
45
+ }
46
+
47
+ export type ChatThreadCountAggregateOutputType = {
48
+ id: number
49
+ userId: number
50
+ title: number
51
+ isArchived: number
52
+ createdAt: number
53
+ updatedAt: number
54
+ agentId: number
55
+ _all: number
56
+ }
57
+
58
+
59
+ export type ChatThreadMinAggregateInputType = {
60
+ id?: true
61
+ userId?: true
62
+ title?: true
63
+ isArchived?: true
64
+ createdAt?: true
65
+ updatedAt?: true
66
+ agentId?: true
67
+ }
68
+
69
+ export type ChatThreadMaxAggregateInputType = {
70
+ id?: true
71
+ userId?: true
72
+ title?: true
73
+ isArchived?: true
74
+ createdAt?: true
75
+ updatedAt?: true
76
+ agentId?: true
77
+ }
78
+
79
+ export type ChatThreadCountAggregateInputType = {
80
+ id?: true
81
+ userId?: true
82
+ title?: true
83
+ isArchived?: true
84
+ createdAt?: true
85
+ updatedAt?: true
86
+ agentId?: true
87
+ _all?: true
88
+ }
89
+
90
+ export type ChatThreadAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
91
+ /**
92
+ * Filter which ChatThread to aggregate.
93
+ */
94
+ where?: Prisma.ChatThreadWhereInput
95
+ /**
96
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
97
+ *
98
+ * Determine the order of ChatThreads to fetch.
99
+ */
100
+ orderBy?: Prisma.ChatThreadOrderByWithRelationInput | Prisma.ChatThreadOrderByWithRelationInput[]
101
+ /**
102
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
103
+ *
104
+ * Sets the start position
105
+ */
106
+ cursor?: Prisma.ChatThreadWhereUniqueInput
107
+ /**
108
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
109
+ *
110
+ * Take `±n` ChatThreads from the position of the cursor.
111
+ */
112
+ take?: number
113
+ /**
114
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
115
+ *
116
+ * Skip the first `n` ChatThreads.
117
+ */
118
+ skip?: number
119
+ /**
120
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
121
+ *
122
+ * Count returned ChatThreads
123
+ **/
124
+ _count?: true | ChatThreadCountAggregateInputType
125
+ /**
126
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
127
+ *
128
+ * Select which fields to find the minimum value
129
+ **/
130
+ _min?: ChatThreadMinAggregateInputType
131
+ /**
132
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
133
+ *
134
+ * Select which fields to find the maximum value
135
+ **/
136
+ _max?: ChatThreadMaxAggregateInputType
137
+ }
138
+
139
+ export type GetChatThreadAggregateType<T extends ChatThreadAggregateArgs> = {
140
+ [P in keyof T & keyof AggregateChatThread]: P extends '_count' | 'count'
141
+ ? T[P] extends true
142
+ ? number
143
+ : Prisma.GetScalarType<T[P], AggregateChatThread[P]>
144
+ : Prisma.GetScalarType<T[P], AggregateChatThread[P]>
145
+ }
146
+
147
+
148
+
149
+
150
+ export type ChatThreadGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
151
+ where?: Prisma.ChatThreadWhereInput
152
+ orderBy?: Prisma.ChatThreadOrderByWithAggregationInput | Prisma.ChatThreadOrderByWithAggregationInput[]
153
+ by: Prisma.ChatThreadScalarFieldEnum[] | Prisma.ChatThreadScalarFieldEnum
154
+ having?: Prisma.ChatThreadScalarWhereWithAggregatesInput
155
+ take?: number
156
+ skip?: number
157
+ _count?: ChatThreadCountAggregateInputType | true
158
+ _min?: ChatThreadMinAggregateInputType
159
+ _max?: ChatThreadMaxAggregateInputType
160
+ }
161
+
162
+ export type ChatThreadGroupByOutputType = {
163
+ id: string
164
+ userId: string
165
+ title: string | null
166
+ isArchived: boolean
167
+ createdAt: Date
168
+ updatedAt: Date
169
+ agentId: string | null
170
+ _count: ChatThreadCountAggregateOutputType | null
171
+ _min: ChatThreadMinAggregateOutputType | null
172
+ _max: ChatThreadMaxAggregateOutputType | null
173
+ }
174
+
175
+ export type GetChatThreadGroupByPayload<T extends ChatThreadGroupByArgs> = Prisma.PrismaPromise<
176
+ Array<
177
+ Prisma.PickEnumerable<ChatThreadGroupByOutputType, T['by']> &
178
+ {
179
+ [P in ((keyof T) & (keyof ChatThreadGroupByOutputType))]: P extends '_count'
180
+ ? T[P] extends boolean
181
+ ? number
182
+ : Prisma.GetScalarType<T[P], ChatThreadGroupByOutputType[P]>
183
+ : Prisma.GetScalarType<T[P], ChatThreadGroupByOutputType[P]>
184
+ }
185
+ >
186
+ >
187
+
188
+
189
+
190
+ export type ChatThreadWhereInput = {
191
+ AND?: Prisma.ChatThreadWhereInput | Prisma.ChatThreadWhereInput[]
192
+ OR?: Prisma.ChatThreadWhereInput[]
193
+ NOT?: Prisma.ChatThreadWhereInput | Prisma.ChatThreadWhereInput[]
194
+ id?: Prisma.StringFilter<"ChatThread"> | string
195
+ userId?: Prisma.StringFilter<"ChatThread"> | string
196
+ title?: Prisma.StringNullableFilter<"ChatThread"> | string | null
197
+ isArchived?: Prisma.BoolFilter<"ChatThread"> | boolean
198
+ createdAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
199
+ updatedAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
200
+ agentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
201
+ user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
202
+ messages?: Prisma.ChatMessageListRelationFilter
203
+ runs?: Prisma.ChatRunListRelationFilter
204
+ interrupts?: Prisma.ChatInterruptListRelationFilter
205
+ generations?: Prisma.GenerationRunListRelationFilter
206
+ agent?: Prisma.XOR<Prisma.UserAgentNullableScalarRelationFilter, Prisma.UserAgentWhereInput> | null
207
+ }
208
+
209
+ export type ChatThreadOrderByWithRelationInput = {
210
+ id?: Prisma.SortOrder
211
+ userId?: Prisma.SortOrder
212
+ title?: Prisma.SortOrderInput | Prisma.SortOrder
213
+ isArchived?: Prisma.SortOrder
214
+ createdAt?: Prisma.SortOrder
215
+ updatedAt?: Prisma.SortOrder
216
+ agentId?: Prisma.SortOrderInput | Prisma.SortOrder
217
+ user?: Prisma.UserOrderByWithRelationInput
218
+ messages?: Prisma.ChatMessageOrderByRelationAggregateInput
219
+ runs?: Prisma.ChatRunOrderByRelationAggregateInput
220
+ interrupts?: Prisma.ChatInterruptOrderByRelationAggregateInput
221
+ generations?: Prisma.GenerationRunOrderByRelationAggregateInput
222
+ agent?: Prisma.UserAgentOrderByWithRelationInput
223
+ }
224
+
225
+ export type ChatThreadWhereUniqueInput = Prisma.AtLeast<{
226
+ id?: string
227
+ AND?: Prisma.ChatThreadWhereInput | Prisma.ChatThreadWhereInput[]
228
+ OR?: Prisma.ChatThreadWhereInput[]
229
+ NOT?: Prisma.ChatThreadWhereInput | Prisma.ChatThreadWhereInput[]
230
+ userId?: Prisma.StringFilter<"ChatThread"> | string
231
+ title?: Prisma.StringNullableFilter<"ChatThread"> | string | null
232
+ isArchived?: Prisma.BoolFilter<"ChatThread"> | boolean
233
+ createdAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
234
+ updatedAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
235
+ agentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
236
+ user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
237
+ messages?: Prisma.ChatMessageListRelationFilter
238
+ runs?: Prisma.ChatRunListRelationFilter
239
+ interrupts?: Prisma.ChatInterruptListRelationFilter
240
+ generations?: Prisma.GenerationRunListRelationFilter
241
+ agent?: Prisma.XOR<Prisma.UserAgentNullableScalarRelationFilter, Prisma.UserAgentWhereInput> | null
242
+ }, "id">
243
+
244
+ export type ChatThreadOrderByWithAggregationInput = {
245
+ id?: Prisma.SortOrder
246
+ userId?: Prisma.SortOrder
247
+ title?: Prisma.SortOrderInput | Prisma.SortOrder
248
+ isArchived?: Prisma.SortOrder
249
+ createdAt?: Prisma.SortOrder
250
+ updatedAt?: Prisma.SortOrder
251
+ agentId?: Prisma.SortOrderInput | Prisma.SortOrder
252
+ _count?: Prisma.ChatThreadCountOrderByAggregateInput
253
+ _max?: Prisma.ChatThreadMaxOrderByAggregateInput
254
+ _min?: Prisma.ChatThreadMinOrderByAggregateInput
255
+ }
256
+
257
+ export type ChatThreadScalarWhereWithAggregatesInput = {
258
+ AND?: Prisma.ChatThreadScalarWhereWithAggregatesInput | Prisma.ChatThreadScalarWhereWithAggregatesInput[]
259
+ OR?: Prisma.ChatThreadScalarWhereWithAggregatesInput[]
260
+ NOT?: Prisma.ChatThreadScalarWhereWithAggregatesInput | Prisma.ChatThreadScalarWhereWithAggregatesInput[]
261
+ id?: Prisma.StringWithAggregatesFilter<"ChatThread"> | string
262
+ userId?: Prisma.StringWithAggregatesFilter<"ChatThread"> | string
263
+ title?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
264
+ isArchived?: Prisma.BoolWithAggregatesFilter<"ChatThread"> | boolean
265
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"ChatThread"> | Date | string
266
+ updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ChatThread"> | Date | string
267
+ agentId?: Prisma.StringNullableWithAggregatesFilter<"ChatThread"> | string | null
268
+ }
269
+
270
+ export type ChatThreadCreateInput = {
271
+ id?: string
272
+ title?: string | null
273
+ isArchived?: boolean
274
+ createdAt?: Date | string
275
+ updatedAt?: Date | string
276
+ user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
277
+ messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
278
+ runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
279
+ interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
280
+ generations?: Prisma.GenerationRunCreateNestedManyWithoutThreadInput
281
+ agent?: Prisma.UserAgentCreateNestedOneWithoutThreadsInput
282
+ }
283
+
284
+ export type ChatThreadUncheckedCreateInput = {
285
+ id?: string
286
+ userId: string
287
+ title?: string | null
288
+ isArchived?: boolean
289
+ createdAt?: Date | string
290
+ updatedAt?: Date | string
291
+ agentId?: string | null
292
+ messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
293
+ runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
294
+ interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
295
+ generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
296
+ }
297
+
298
+ export type ChatThreadUpdateInput = {
299
+ id?: Prisma.StringFieldUpdateOperationsInput | string
300
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
301
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
302
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
303
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
304
+ user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
305
+ messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
306
+ runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
307
+ interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
308
+ generations?: Prisma.GenerationRunUpdateManyWithoutThreadNestedInput
309
+ agent?: Prisma.UserAgentUpdateOneWithoutThreadsNestedInput
310
+ }
311
+
312
+ export type ChatThreadUncheckedUpdateInput = {
313
+ id?: Prisma.StringFieldUpdateOperationsInput | string
314
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
315
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
316
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
317
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
318
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
319
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
320
+ messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
321
+ runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
322
+ interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
323
+ generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
324
+ }
325
+
326
+ export type ChatThreadCreateManyInput = {
327
+ id?: string
328
+ userId: string
329
+ title?: string | null
330
+ isArchived?: boolean
331
+ createdAt?: Date | string
332
+ updatedAt?: Date | string
333
+ agentId?: string | null
334
+ }
335
+
336
+ export type ChatThreadUpdateManyMutationInput = {
337
+ id?: Prisma.StringFieldUpdateOperationsInput | string
338
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
339
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
340
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
341
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
342
+ }
343
+
344
+ export type ChatThreadUncheckedUpdateManyInput = {
345
+ id?: Prisma.StringFieldUpdateOperationsInput | string
346
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
347
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
348
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
349
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
350
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
351
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
352
+ }
353
+
354
+ export type ChatThreadListRelationFilter = {
355
+ every?: Prisma.ChatThreadWhereInput
356
+ some?: Prisma.ChatThreadWhereInput
357
+ none?: Prisma.ChatThreadWhereInput
358
+ }
359
+
360
+ export type ChatThreadOrderByRelationAggregateInput = {
361
+ _count?: Prisma.SortOrder
362
+ }
363
+
364
+ export type ChatThreadCountOrderByAggregateInput = {
365
+ id?: Prisma.SortOrder
366
+ userId?: Prisma.SortOrder
367
+ title?: Prisma.SortOrder
368
+ isArchived?: Prisma.SortOrder
369
+ createdAt?: Prisma.SortOrder
370
+ updatedAt?: Prisma.SortOrder
371
+ agentId?: Prisma.SortOrder
372
+ }
373
+
374
+ export type ChatThreadMaxOrderByAggregateInput = {
375
+ id?: Prisma.SortOrder
376
+ userId?: Prisma.SortOrder
377
+ title?: Prisma.SortOrder
378
+ isArchived?: Prisma.SortOrder
379
+ createdAt?: Prisma.SortOrder
380
+ updatedAt?: Prisma.SortOrder
381
+ agentId?: Prisma.SortOrder
382
+ }
383
+
384
+ export type ChatThreadMinOrderByAggregateInput = {
385
+ id?: Prisma.SortOrder
386
+ userId?: Prisma.SortOrder
387
+ title?: Prisma.SortOrder
388
+ isArchived?: Prisma.SortOrder
389
+ createdAt?: Prisma.SortOrder
390
+ updatedAt?: Prisma.SortOrder
391
+ agentId?: Prisma.SortOrder
392
+ }
393
+
394
+ export type ChatThreadScalarRelationFilter = {
395
+ is?: Prisma.ChatThreadWhereInput
396
+ isNot?: Prisma.ChatThreadWhereInput
397
+ }
398
+
399
+ export type ChatThreadCreateNestedManyWithoutUserInput = {
400
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutUserInput, Prisma.ChatThreadUncheckedCreateWithoutUserInput> | Prisma.ChatThreadCreateWithoutUserInput[] | Prisma.ChatThreadUncheckedCreateWithoutUserInput[]
401
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutUserInput | Prisma.ChatThreadCreateOrConnectWithoutUserInput[]
402
+ createMany?: Prisma.ChatThreadCreateManyUserInputEnvelope
403
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
404
+ }
405
+
406
+ export type ChatThreadUncheckedCreateNestedManyWithoutUserInput = {
407
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutUserInput, Prisma.ChatThreadUncheckedCreateWithoutUserInput> | Prisma.ChatThreadCreateWithoutUserInput[] | Prisma.ChatThreadUncheckedCreateWithoutUserInput[]
408
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutUserInput | Prisma.ChatThreadCreateOrConnectWithoutUserInput[]
409
+ createMany?: Prisma.ChatThreadCreateManyUserInputEnvelope
410
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
411
+ }
412
+
413
+ export type ChatThreadUpdateManyWithoutUserNestedInput = {
414
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutUserInput, Prisma.ChatThreadUncheckedCreateWithoutUserInput> | Prisma.ChatThreadCreateWithoutUserInput[] | Prisma.ChatThreadUncheckedCreateWithoutUserInput[]
415
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutUserInput | Prisma.ChatThreadCreateOrConnectWithoutUserInput[]
416
+ upsert?: Prisma.ChatThreadUpsertWithWhereUniqueWithoutUserInput | Prisma.ChatThreadUpsertWithWhereUniqueWithoutUserInput[]
417
+ createMany?: Prisma.ChatThreadCreateManyUserInputEnvelope
418
+ set?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
419
+ disconnect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
420
+ delete?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
421
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
422
+ update?: Prisma.ChatThreadUpdateWithWhereUniqueWithoutUserInput | Prisma.ChatThreadUpdateWithWhereUniqueWithoutUserInput[]
423
+ updateMany?: Prisma.ChatThreadUpdateManyWithWhereWithoutUserInput | Prisma.ChatThreadUpdateManyWithWhereWithoutUserInput[]
424
+ deleteMany?: Prisma.ChatThreadScalarWhereInput | Prisma.ChatThreadScalarWhereInput[]
425
+ }
426
+
427
+ export type ChatThreadUncheckedUpdateManyWithoutUserNestedInput = {
428
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutUserInput, Prisma.ChatThreadUncheckedCreateWithoutUserInput> | Prisma.ChatThreadCreateWithoutUserInput[] | Prisma.ChatThreadUncheckedCreateWithoutUserInput[]
429
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutUserInput | Prisma.ChatThreadCreateOrConnectWithoutUserInput[]
430
+ upsert?: Prisma.ChatThreadUpsertWithWhereUniqueWithoutUserInput | Prisma.ChatThreadUpsertWithWhereUniqueWithoutUserInput[]
431
+ createMany?: Prisma.ChatThreadCreateManyUserInputEnvelope
432
+ set?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
433
+ disconnect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
434
+ delete?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
435
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
436
+ update?: Prisma.ChatThreadUpdateWithWhereUniqueWithoutUserInput | Prisma.ChatThreadUpdateWithWhereUniqueWithoutUserInput[]
437
+ updateMany?: Prisma.ChatThreadUpdateManyWithWhereWithoutUserInput | Prisma.ChatThreadUpdateManyWithWhereWithoutUserInput[]
438
+ deleteMany?: Prisma.ChatThreadScalarWhereInput | Prisma.ChatThreadScalarWhereInput[]
439
+ }
440
+
441
+ export type BoolFieldUpdateOperationsInput = {
442
+ set?: boolean
443
+ }
444
+
445
+ export type ChatThreadCreateNestedOneWithoutMessagesInput = {
446
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutMessagesInput, Prisma.ChatThreadUncheckedCreateWithoutMessagesInput>
447
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutMessagesInput
448
+ connect?: Prisma.ChatThreadWhereUniqueInput
449
+ }
450
+
451
+ export type ChatThreadUpdateOneRequiredWithoutMessagesNestedInput = {
452
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutMessagesInput, Prisma.ChatThreadUncheckedCreateWithoutMessagesInput>
453
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutMessagesInput
454
+ upsert?: Prisma.ChatThreadUpsertWithoutMessagesInput
455
+ connect?: Prisma.ChatThreadWhereUniqueInput
456
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ChatThreadUpdateToOneWithWhereWithoutMessagesInput, Prisma.ChatThreadUpdateWithoutMessagesInput>, Prisma.ChatThreadUncheckedUpdateWithoutMessagesInput>
457
+ }
458
+
459
+ export type ChatThreadCreateNestedOneWithoutRunsInput = {
460
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutRunsInput, Prisma.ChatThreadUncheckedCreateWithoutRunsInput>
461
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutRunsInput
462
+ connect?: Prisma.ChatThreadWhereUniqueInput
463
+ }
464
+
465
+ export type ChatThreadUpdateOneRequiredWithoutRunsNestedInput = {
466
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutRunsInput, Prisma.ChatThreadUncheckedCreateWithoutRunsInput>
467
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutRunsInput
468
+ upsert?: Prisma.ChatThreadUpsertWithoutRunsInput
469
+ connect?: Prisma.ChatThreadWhereUniqueInput
470
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ChatThreadUpdateToOneWithWhereWithoutRunsInput, Prisma.ChatThreadUpdateWithoutRunsInput>, Prisma.ChatThreadUncheckedUpdateWithoutRunsInput>
471
+ }
472
+
473
+ export type ChatThreadCreateNestedOneWithoutInterruptsInput = {
474
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutInterruptsInput, Prisma.ChatThreadUncheckedCreateWithoutInterruptsInput>
475
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutInterruptsInput
476
+ connect?: Prisma.ChatThreadWhereUniqueInput
477
+ }
478
+
479
+ export type ChatThreadUpdateOneRequiredWithoutInterruptsNestedInput = {
480
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutInterruptsInput, Prisma.ChatThreadUncheckedCreateWithoutInterruptsInput>
481
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutInterruptsInput
482
+ upsert?: Prisma.ChatThreadUpsertWithoutInterruptsInput
483
+ connect?: Prisma.ChatThreadWhereUniqueInput
484
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ChatThreadUpdateToOneWithWhereWithoutInterruptsInput, Prisma.ChatThreadUpdateWithoutInterruptsInput>, Prisma.ChatThreadUncheckedUpdateWithoutInterruptsInput>
485
+ }
486
+
487
+ export type ChatThreadCreateNestedOneWithoutGenerationsInput = {
488
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutGenerationsInput, Prisma.ChatThreadUncheckedCreateWithoutGenerationsInput>
489
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutGenerationsInput
490
+ connect?: Prisma.ChatThreadWhereUniqueInput
491
+ }
492
+
493
+ export type ChatThreadUpdateOneRequiredWithoutGenerationsNestedInput = {
494
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutGenerationsInput, Prisma.ChatThreadUncheckedCreateWithoutGenerationsInput>
495
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutGenerationsInput
496
+ upsert?: Prisma.ChatThreadUpsertWithoutGenerationsInput
497
+ connect?: Prisma.ChatThreadWhereUniqueInput
498
+ update?: Prisma.XOR<Prisma.XOR<Prisma.ChatThreadUpdateToOneWithWhereWithoutGenerationsInput, Prisma.ChatThreadUpdateWithoutGenerationsInput>, Prisma.ChatThreadUncheckedUpdateWithoutGenerationsInput>
499
+ }
500
+
501
+ export type ChatThreadCreateNestedManyWithoutAgentInput = {
502
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutAgentInput, Prisma.ChatThreadUncheckedCreateWithoutAgentInput> | Prisma.ChatThreadCreateWithoutAgentInput[] | Prisma.ChatThreadUncheckedCreateWithoutAgentInput[]
503
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutAgentInput | Prisma.ChatThreadCreateOrConnectWithoutAgentInput[]
504
+ createMany?: Prisma.ChatThreadCreateManyAgentInputEnvelope
505
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
506
+ }
507
+
508
+ export type ChatThreadUncheckedCreateNestedManyWithoutAgentInput = {
509
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutAgentInput, Prisma.ChatThreadUncheckedCreateWithoutAgentInput> | Prisma.ChatThreadCreateWithoutAgentInput[] | Prisma.ChatThreadUncheckedCreateWithoutAgentInput[]
510
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutAgentInput | Prisma.ChatThreadCreateOrConnectWithoutAgentInput[]
511
+ createMany?: Prisma.ChatThreadCreateManyAgentInputEnvelope
512
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
513
+ }
514
+
515
+ export type ChatThreadUpdateManyWithoutAgentNestedInput = {
516
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutAgentInput, Prisma.ChatThreadUncheckedCreateWithoutAgentInput> | Prisma.ChatThreadCreateWithoutAgentInput[] | Prisma.ChatThreadUncheckedCreateWithoutAgentInput[]
517
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutAgentInput | Prisma.ChatThreadCreateOrConnectWithoutAgentInput[]
518
+ upsert?: Prisma.ChatThreadUpsertWithWhereUniqueWithoutAgentInput | Prisma.ChatThreadUpsertWithWhereUniqueWithoutAgentInput[]
519
+ createMany?: Prisma.ChatThreadCreateManyAgentInputEnvelope
520
+ set?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
521
+ disconnect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
522
+ delete?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
523
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
524
+ update?: Prisma.ChatThreadUpdateWithWhereUniqueWithoutAgentInput | Prisma.ChatThreadUpdateWithWhereUniqueWithoutAgentInput[]
525
+ updateMany?: Prisma.ChatThreadUpdateManyWithWhereWithoutAgentInput | Prisma.ChatThreadUpdateManyWithWhereWithoutAgentInput[]
526
+ deleteMany?: Prisma.ChatThreadScalarWhereInput | Prisma.ChatThreadScalarWhereInput[]
527
+ }
528
+
529
+ export type ChatThreadUncheckedUpdateManyWithoutAgentNestedInput = {
530
+ create?: Prisma.XOR<Prisma.ChatThreadCreateWithoutAgentInput, Prisma.ChatThreadUncheckedCreateWithoutAgentInput> | Prisma.ChatThreadCreateWithoutAgentInput[] | Prisma.ChatThreadUncheckedCreateWithoutAgentInput[]
531
+ connectOrCreate?: Prisma.ChatThreadCreateOrConnectWithoutAgentInput | Prisma.ChatThreadCreateOrConnectWithoutAgentInput[]
532
+ upsert?: Prisma.ChatThreadUpsertWithWhereUniqueWithoutAgentInput | Prisma.ChatThreadUpsertWithWhereUniqueWithoutAgentInput[]
533
+ createMany?: Prisma.ChatThreadCreateManyAgentInputEnvelope
534
+ set?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
535
+ disconnect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
536
+ delete?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
537
+ connect?: Prisma.ChatThreadWhereUniqueInput | Prisma.ChatThreadWhereUniqueInput[]
538
+ update?: Prisma.ChatThreadUpdateWithWhereUniqueWithoutAgentInput | Prisma.ChatThreadUpdateWithWhereUniqueWithoutAgentInput[]
539
+ updateMany?: Prisma.ChatThreadUpdateManyWithWhereWithoutAgentInput | Prisma.ChatThreadUpdateManyWithWhereWithoutAgentInput[]
540
+ deleteMany?: Prisma.ChatThreadScalarWhereInput | Prisma.ChatThreadScalarWhereInput[]
541
+ }
542
+
543
+ export type ChatThreadCreateWithoutUserInput = {
544
+ id?: string
545
+ title?: string | null
546
+ isArchived?: boolean
547
+ createdAt?: Date | string
548
+ updatedAt?: Date | string
549
+ messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
550
+ runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
551
+ interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
552
+ generations?: Prisma.GenerationRunCreateNestedManyWithoutThreadInput
553
+ agent?: Prisma.UserAgentCreateNestedOneWithoutThreadsInput
554
+ }
555
+
556
+ export type ChatThreadUncheckedCreateWithoutUserInput = {
557
+ id?: string
558
+ title?: string | null
559
+ isArchived?: boolean
560
+ createdAt?: Date | string
561
+ updatedAt?: Date | string
562
+ agentId?: string | null
563
+ messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
564
+ runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
565
+ interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
566
+ generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
567
+ }
568
+
569
+ export type ChatThreadCreateOrConnectWithoutUserInput = {
570
+ where: Prisma.ChatThreadWhereUniqueInput
571
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutUserInput, Prisma.ChatThreadUncheckedCreateWithoutUserInput>
572
+ }
573
+
574
+ export type ChatThreadCreateManyUserInputEnvelope = {
575
+ data: Prisma.ChatThreadCreateManyUserInput | Prisma.ChatThreadCreateManyUserInput[]
576
+ }
577
+
578
+ export type ChatThreadUpsertWithWhereUniqueWithoutUserInput = {
579
+ where: Prisma.ChatThreadWhereUniqueInput
580
+ update: Prisma.XOR<Prisma.ChatThreadUpdateWithoutUserInput, Prisma.ChatThreadUncheckedUpdateWithoutUserInput>
581
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutUserInput, Prisma.ChatThreadUncheckedCreateWithoutUserInput>
582
+ }
583
+
584
+ export type ChatThreadUpdateWithWhereUniqueWithoutUserInput = {
585
+ where: Prisma.ChatThreadWhereUniqueInput
586
+ data: Prisma.XOR<Prisma.ChatThreadUpdateWithoutUserInput, Prisma.ChatThreadUncheckedUpdateWithoutUserInput>
587
+ }
588
+
589
+ export type ChatThreadUpdateManyWithWhereWithoutUserInput = {
590
+ where: Prisma.ChatThreadScalarWhereInput
591
+ data: Prisma.XOR<Prisma.ChatThreadUpdateManyMutationInput, Prisma.ChatThreadUncheckedUpdateManyWithoutUserInput>
592
+ }
593
+
594
+ export type ChatThreadScalarWhereInput = {
595
+ AND?: Prisma.ChatThreadScalarWhereInput | Prisma.ChatThreadScalarWhereInput[]
596
+ OR?: Prisma.ChatThreadScalarWhereInput[]
597
+ NOT?: Prisma.ChatThreadScalarWhereInput | Prisma.ChatThreadScalarWhereInput[]
598
+ id?: Prisma.StringFilter<"ChatThread"> | string
599
+ userId?: Prisma.StringFilter<"ChatThread"> | string
600
+ title?: Prisma.StringNullableFilter<"ChatThread"> | string | null
601
+ isArchived?: Prisma.BoolFilter<"ChatThread"> | boolean
602
+ createdAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
603
+ updatedAt?: Prisma.DateTimeFilter<"ChatThread"> | Date | string
604
+ agentId?: Prisma.StringNullableFilter<"ChatThread"> | string | null
605
+ }
606
+
607
+ export type ChatThreadCreateWithoutMessagesInput = {
608
+ id?: string
609
+ title?: string | null
610
+ isArchived?: boolean
611
+ createdAt?: Date | string
612
+ updatedAt?: Date | string
613
+ user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
614
+ runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
615
+ interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
616
+ generations?: Prisma.GenerationRunCreateNestedManyWithoutThreadInput
617
+ agent?: Prisma.UserAgentCreateNestedOneWithoutThreadsInput
618
+ }
619
+
620
+ export type ChatThreadUncheckedCreateWithoutMessagesInput = {
621
+ id?: string
622
+ userId: string
623
+ title?: string | null
624
+ isArchived?: boolean
625
+ createdAt?: Date | string
626
+ updatedAt?: Date | string
627
+ agentId?: string | null
628
+ runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
629
+ interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
630
+ generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
631
+ }
632
+
633
+ export type ChatThreadCreateOrConnectWithoutMessagesInput = {
634
+ where: Prisma.ChatThreadWhereUniqueInput
635
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutMessagesInput, Prisma.ChatThreadUncheckedCreateWithoutMessagesInput>
636
+ }
637
+
638
+ export type ChatThreadUpsertWithoutMessagesInput = {
639
+ update: Prisma.XOR<Prisma.ChatThreadUpdateWithoutMessagesInput, Prisma.ChatThreadUncheckedUpdateWithoutMessagesInput>
640
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutMessagesInput, Prisma.ChatThreadUncheckedCreateWithoutMessagesInput>
641
+ where?: Prisma.ChatThreadWhereInput
642
+ }
643
+
644
+ export type ChatThreadUpdateToOneWithWhereWithoutMessagesInput = {
645
+ where?: Prisma.ChatThreadWhereInput
646
+ data: Prisma.XOR<Prisma.ChatThreadUpdateWithoutMessagesInput, Prisma.ChatThreadUncheckedUpdateWithoutMessagesInput>
647
+ }
648
+
649
+ export type ChatThreadUpdateWithoutMessagesInput = {
650
+ id?: Prisma.StringFieldUpdateOperationsInput | string
651
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
652
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
653
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
654
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
655
+ user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
656
+ runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
657
+ interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
658
+ generations?: Prisma.GenerationRunUpdateManyWithoutThreadNestedInput
659
+ agent?: Prisma.UserAgentUpdateOneWithoutThreadsNestedInput
660
+ }
661
+
662
+ export type ChatThreadUncheckedUpdateWithoutMessagesInput = {
663
+ id?: Prisma.StringFieldUpdateOperationsInput | string
664
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
665
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
666
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
667
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
668
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
669
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
670
+ runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
671
+ interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
672
+ generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
673
+ }
674
+
675
+ export type ChatThreadCreateWithoutRunsInput = {
676
+ id?: string
677
+ title?: string | null
678
+ isArchived?: boolean
679
+ createdAt?: Date | string
680
+ updatedAt?: Date | string
681
+ user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
682
+ messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
683
+ interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
684
+ generations?: Prisma.GenerationRunCreateNestedManyWithoutThreadInput
685
+ agent?: Prisma.UserAgentCreateNestedOneWithoutThreadsInput
686
+ }
687
+
688
+ export type ChatThreadUncheckedCreateWithoutRunsInput = {
689
+ id?: string
690
+ userId: string
691
+ title?: string | null
692
+ isArchived?: boolean
693
+ createdAt?: Date | string
694
+ updatedAt?: Date | string
695
+ agentId?: string | null
696
+ messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
697
+ interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
698
+ generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
699
+ }
700
+
701
+ export type ChatThreadCreateOrConnectWithoutRunsInput = {
702
+ where: Prisma.ChatThreadWhereUniqueInput
703
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutRunsInput, Prisma.ChatThreadUncheckedCreateWithoutRunsInput>
704
+ }
705
+
706
+ export type ChatThreadUpsertWithoutRunsInput = {
707
+ update: Prisma.XOR<Prisma.ChatThreadUpdateWithoutRunsInput, Prisma.ChatThreadUncheckedUpdateWithoutRunsInput>
708
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutRunsInput, Prisma.ChatThreadUncheckedCreateWithoutRunsInput>
709
+ where?: Prisma.ChatThreadWhereInput
710
+ }
711
+
712
+ export type ChatThreadUpdateToOneWithWhereWithoutRunsInput = {
713
+ where?: Prisma.ChatThreadWhereInput
714
+ data: Prisma.XOR<Prisma.ChatThreadUpdateWithoutRunsInput, Prisma.ChatThreadUncheckedUpdateWithoutRunsInput>
715
+ }
716
+
717
+ export type ChatThreadUpdateWithoutRunsInput = {
718
+ id?: Prisma.StringFieldUpdateOperationsInput | string
719
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
720
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
721
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
722
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
723
+ user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
724
+ messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
725
+ interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
726
+ generations?: Prisma.GenerationRunUpdateManyWithoutThreadNestedInput
727
+ agent?: Prisma.UserAgentUpdateOneWithoutThreadsNestedInput
728
+ }
729
+
730
+ export type ChatThreadUncheckedUpdateWithoutRunsInput = {
731
+ id?: Prisma.StringFieldUpdateOperationsInput | string
732
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
733
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
734
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
735
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
736
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
737
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
738
+ messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
739
+ interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
740
+ generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
741
+ }
742
+
743
+ export type ChatThreadCreateWithoutInterruptsInput = {
744
+ id?: string
745
+ title?: string | null
746
+ isArchived?: boolean
747
+ createdAt?: Date | string
748
+ updatedAt?: Date | string
749
+ user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
750
+ messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
751
+ runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
752
+ generations?: Prisma.GenerationRunCreateNestedManyWithoutThreadInput
753
+ agent?: Prisma.UserAgentCreateNestedOneWithoutThreadsInput
754
+ }
755
+
756
+ export type ChatThreadUncheckedCreateWithoutInterruptsInput = {
757
+ id?: string
758
+ userId: string
759
+ title?: string | null
760
+ isArchived?: boolean
761
+ createdAt?: Date | string
762
+ updatedAt?: Date | string
763
+ agentId?: string | null
764
+ messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
765
+ runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
766
+ generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
767
+ }
768
+
769
+ export type ChatThreadCreateOrConnectWithoutInterruptsInput = {
770
+ where: Prisma.ChatThreadWhereUniqueInput
771
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutInterruptsInput, Prisma.ChatThreadUncheckedCreateWithoutInterruptsInput>
772
+ }
773
+
774
+ export type ChatThreadUpsertWithoutInterruptsInput = {
775
+ update: Prisma.XOR<Prisma.ChatThreadUpdateWithoutInterruptsInput, Prisma.ChatThreadUncheckedUpdateWithoutInterruptsInput>
776
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutInterruptsInput, Prisma.ChatThreadUncheckedCreateWithoutInterruptsInput>
777
+ where?: Prisma.ChatThreadWhereInput
778
+ }
779
+
780
+ export type ChatThreadUpdateToOneWithWhereWithoutInterruptsInput = {
781
+ where?: Prisma.ChatThreadWhereInput
782
+ data: Prisma.XOR<Prisma.ChatThreadUpdateWithoutInterruptsInput, Prisma.ChatThreadUncheckedUpdateWithoutInterruptsInput>
783
+ }
784
+
785
+ export type ChatThreadUpdateWithoutInterruptsInput = {
786
+ id?: Prisma.StringFieldUpdateOperationsInput | string
787
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
788
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
789
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
790
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
791
+ user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
792
+ messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
793
+ runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
794
+ generations?: Prisma.GenerationRunUpdateManyWithoutThreadNestedInput
795
+ agent?: Prisma.UserAgentUpdateOneWithoutThreadsNestedInput
796
+ }
797
+
798
+ export type ChatThreadUncheckedUpdateWithoutInterruptsInput = {
799
+ id?: Prisma.StringFieldUpdateOperationsInput | string
800
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
801
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
802
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
803
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
804
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
805
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
806
+ messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
807
+ runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
808
+ generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
809
+ }
810
+
811
+ export type ChatThreadCreateWithoutGenerationsInput = {
812
+ id?: string
813
+ title?: string | null
814
+ isArchived?: boolean
815
+ createdAt?: Date | string
816
+ updatedAt?: Date | string
817
+ user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
818
+ messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
819
+ runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
820
+ interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
821
+ agent?: Prisma.UserAgentCreateNestedOneWithoutThreadsInput
822
+ }
823
+
824
+ export type ChatThreadUncheckedCreateWithoutGenerationsInput = {
825
+ id?: string
826
+ userId: string
827
+ title?: string | null
828
+ isArchived?: boolean
829
+ createdAt?: Date | string
830
+ updatedAt?: Date | string
831
+ agentId?: string | null
832
+ messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
833
+ runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
834
+ interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
835
+ }
836
+
837
+ export type ChatThreadCreateOrConnectWithoutGenerationsInput = {
838
+ where: Prisma.ChatThreadWhereUniqueInput
839
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutGenerationsInput, Prisma.ChatThreadUncheckedCreateWithoutGenerationsInput>
840
+ }
841
+
842
+ export type ChatThreadUpsertWithoutGenerationsInput = {
843
+ update: Prisma.XOR<Prisma.ChatThreadUpdateWithoutGenerationsInput, Prisma.ChatThreadUncheckedUpdateWithoutGenerationsInput>
844
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutGenerationsInput, Prisma.ChatThreadUncheckedCreateWithoutGenerationsInput>
845
+ where?: Prisma.ChatThreadWhereInput
846
+ }
847
+
848
+ export type ChatThreadUpdateToOneWithWhereWithoutGenerationsInput = {
849
+ where?: Prisma.ChatThreadWhereInput
850
+ data: Prisma.XOR<Prisma.ChatThreadUpdateWithoutGenerationsInput, Prisma.ChatThreadUncheckedUpdateWithoutGenerationsInput>
851
+ }
852
+
853
+ export type ChatThreadUpdateWithoutGenerationsInput = {
854
+ id?: Prisma.StringFieldUpdateOperationsInput | string
855
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
856
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
857
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
858
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
859
+ user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
860
+ messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
861
+ runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
862
+ interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
863
+ agent?: Prisma.UserAgentUpdateOneWithoutThreadsNestedInput
864
+ }
865
+
866
+ export type ChatThreadUncheckedUpdateWithoutGenerationsInput = {
867
+ id?: Prisma.StringFieldUpdateOperationsInput | string
868
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
869
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
870
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
871
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
872
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
873
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
874
+ messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
875
+ runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
876
+ interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
877
+ }
878
+
879
+ export type ChatThreadCreateWithoutAgentInput = {
880
+ id?: string
881
+ title?: string | null
882
+ isArchived?: boolean
883
+ createdAt?: Date | string
884
+ updatedAt?: Date | string
885
+ user: Prisma.UserCreateNestedOneWithoutChatThreadsInput
886
+ messages?: Prisma.ChatMessageCreateNestedManyWithoutThreadInput
887
+ runs?: Prisma.ChatRunCreateNestedManyWithoutThreadInput
888
+ interrupts?: Prisma.ChatInterruptCreateNestedManyWithoutThreadInput
889
+ generations?: Prisma.GenerationRunCreateNestedManyWithoutThreadInput
890
+ }
891
+
892
+ export type ChatThreadUncheckedCreateWithoutAgentInput = {
893
+ id?: string
894
+ userId: string
895
+ title?: string | null
896
+ isArchived?: boolean
897
+ createdAt?: Date | string
898
+ updatedAt?: Date | string
899
+ messages?: Prisma.ChatMessageUncheckedCreateNestedManyWithoutThreadInput
900
+ runs?: Prisma.ChatRunUncheckedCreateNestedManyWithoutThreadInput
901
+ interrupts?: Prisma.ChatInterruptUncheckedCreateNestedManyWithoutThreadInput
902
+ generations?: Prisma.GenerationRunUncheckedCreateNestedManyWithoutThreadInput
903
+ }
904
+
905
+ export type ChatThreadCreateOrConnectWithoutAgentInput = {
906
+ where: Prisma.ChatThreadWhereUniqueInput
907
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutAgentInput, Prisma.ChatThreadUncheckedCreateWithoutAgentInput>
908
+ }
909
+
910
+ export type ChatThreadCreateManyAgentInputEnvelope = {
911
+ data: Prisma.ChatThreadCreateManyAgentInput | Prisma.ChatThreadCreateManyAgentInput[]
912
+ }
913
+
914
+ export type ChatThreadUpsertWithWhereUniqueWithoutAgentInput = {
915
+ where: Prisma.ChatThreadWhereUniqueInput
916
+ update: Prisma.XOR<Prisma.ChatThreadUpdateWithoutAgentInput, Prisma.ChatThreadUncheckedUpdateWithoutAgentInput>
917
+ create: Prisma.XOR<Prisma.ChatThreadCreateWithoutAgentInput, Prisma.ChatThreadUncheckedCreateWithoutAgentInput>
918
+ }
919
+
920
+ export type ChatThreadUpdateWithWhereUniqueWithoutAgentInput = {
921
+ where: Prisma.ChatThreadWhereUniqueInput
922
+ data: Prisma.XOR<Prisma.ChatThreadUpdateWithoutAgentInput, Prisma.ChatThreadUncheckedUpdateWithoutAgentInput>
923
+ }
924
+
925
+ export type ChatThreadUpdateManyWithWhereWithoutAgentInput = {
926
+ where: Prisma.ChatThreadScalarWhereInput
927
+ data: Prisma.XOR<Prisma.ChatThreadUpdateManyMutationInput, Prisma.ChatThreadUncheckedUpdateManyWithoutAgentInput>
928
+ }
929
+
930
+ export type ChatThreadCreateManyUserInput = {
931
+ id?: string
932
+ title?: string | null
933
+ isArchived?: boolean
934
+ createdAt?: Date | string
935
+ updatedAt?: Date | string
936
+ agentId?: string | null
937
+ }
938
+
939
+ export type ChatThreadUpdateWithoutUserInput = {
940
+ id?: Prisma.StringFieldUpdateOperationsInput | string
941
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
942
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
943
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
944
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
945
+ messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
946
+ runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
947
+ interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
948
+ generations?: Prisma.GenerationRunUpdateManyWithoutThreadNestedInput
949
+ agent?: Prisma.UserAgentUpdateOneWithoutThreadsNestedInput
950
+ }
951
+
952
+ export type ChatThreadUncheckedUpdateWithoutUserInput = {
953
+ id?: Prisma.StringFieldUpdateOperationsInput | string
954
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
955
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
956
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
957
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
958
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
959
+ messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
960
+ runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
961
+ interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
962
+ generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
963
+ }
964
+
965
+ export type ChatThreadUncheckedUpdateManyWithoutUserInput = {
966
+ id?: Prisma.StringFieldUpdateOperationsInput | string
967
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
968
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
969
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
970
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
971
+ agentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
972
+ }
973
+
974
+ export type ChatThreadCreateManyAgentInput = {
975
+ id?: string
976
+ userId: string
977
+ title?: string | null
978
+ isArchived?: boolean
979
+ createdAt?: Date | string
980
+ updatedAt?: Date | string
981
+ }
982
+
983
+ export type ChatThreadUpdateWithoutAgentInput = {
984
+ id?: Prisma.StringFieldUpdateOperationsInput | string
985
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
986
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
987
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
988
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
989
+ user?: Prisma.UserUpdateOneRequiredWithoutChatThreadsNestedInput
990
+ messages?: Prisma.ChatMessageUpdateManyWithoutThreadNestedInput
991
+ runs?: Prisma.ChatRunUpdateManyWithoutThreadNestedInput
992
+ interrupts?: Prisma.ChatInterruptUpdateManyWithoutThreadNestedInput
993
+ generations?: Prisma.GenerationRunUpdateManyWithoutThreadNestedInput
994
+ }
995
+
996
+ export type ChatThreadUncheckedUpdateWithoutAgentInput = {
997
+ id?: Prisma.StringFieldUpdateOperationsInput | string
998
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
999
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1000
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
1001
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1002
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1003
+ messages?: Prisma.ChatMessageUncheckedUpdateManyWithoutThreadNestedInput
1004
+ runs?: Prisma.ChatRunUncheckedUpdateManyWithoutThreadNestedInput
1005
+ interrupts?: Prisma.ChatInterruptUncheckedUpdateManyWithoutThreadNestedInput
1006
+ generations?: Prisma.GenerationRunUncheckedUpdateManyWithoutThreadNestedInput
1007
+ }
1008
+
1009
+ export type ChatThreadUncheckedUpdateManyWithoutAgentInput = {
1010
+ id?: Prisma.StringFieldUpdateOperationsInput | string
1011
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
1012
+ title?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
1013
+ isArchived?: Prisma.BoolFieldUpdateOperationsInput | boolean
1014
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1015
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
1016
+ }
1017
+
1018
+
1019
+ /**
1020
+ * Count Type ChatThreadCountOutputType
1021
+ */
1022
+
1023
+ export type ChatThreadCountOutputType = {
1024
+ messages: number
1025
+ runs: number
1026
+ interrupts: number
1027
+ generations: number
1028
+ }
1029
+
1030
+ export type ChatThreadCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1031
+ messages?: boolean | ChatThreadCountOutputTypeCountMessagesArgs
1032
+ runs?: boolean | ChatThreadCountOutputTypeCountRunsArgs
1033
+ interrupts?: boolean | ChatThreadCountOutputTypeCountInterruptsArgs
1034
+ generations?: boolean | ChatThreadCountOutputTypeCountGenerationsArgs
1035
+ }
1036
+
1037
+ /**
1038
+ * ChatThreadCountOutputType without action
1039
+ */
1040
+ export type ChatThreadCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1041
+ /**
1042
+ * Select specific fields to fetch from the ChatThreadCountOutputType
1043
+ */
1044
+ select?: Prisma.ChatThreadCountOutputTypeSelect<ExtArgs> | null
1045
+ }
1046
+
1047
+ /**
1048
+ * ChatThreadCountOutputType without action
1049
+ */
1050
+ export type ChatThreadCountOutputTypeCountMessagesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1051
+ where?: Prisma.ChatMessageWhereInput
1052
+ }
1053
+
1054
+ /**
1055
+ * ChatThreadCountOutputType without action
1056
+ */
1057
+ export type ChatThreadCountOutputTypeCountRunsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1058
+ where?: Prisma.ChatRunWhereInput
1059
+ }
1060
+
1061
+ /**
1062
+ * ChatThreadCountOutputType without action
1063
+ */
1064
+ export type ChatThreadCountOutputTypeCountInterruptsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1065
+ where?: Prisma.ChatInterruptWhereInput
1066
+ }
1067
+
1068
+ /**
1069
+ * ChatThreadCountOutputType without action
1070
+ */
1071
+ export type ChatThreadCountOutputTypeCountGenerationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1072
+ where?: Prisma.GenerationRunWhereInput
1073
+ }
1074
+
1075
+
1076
+ export type ChatThreadSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
1077
+ id?: boolean
1078
+ userId?: boolean
1079
+ title?: boolean
1080
+ isArchived?: boolean
1081
+ createdAt?: boolean
1082
+ updatedAt?: boolean
1083
+ agentId?: boolean
1084
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1085
+ messages?: boolean | Prisma.ChatThread$messagesArgs<ExtArgs>
1086
+ runs?: boolean | Prisma.ChatThread$runsArgs<ExtArgs>
1087
+ interrupts?: boolean | Prisma.ChatThread$interruptsArgs<ExtArgs>
1088
+ generations?: boolean | Prisma.ChatThread$generationsArgs<ExtArgs>
1089
+ agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1090
+ _count?: boolean | Prisma.ChatThreadCountOutputTypeDefaultArgs<ExtArgs>
1091
+ }, ExtArgs["result"]["chatThread"]>
1092
+
1093
+ export type ChatThreadSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
1094
+ id?: boolean
1095
+ userId?: boolean
1096
+ title?: boolean
1097
+ isArchived?: boolean
1098
+ createdAt?: boolean
1099
+ updatedAt?: boolean
1100
+ agentId?: boolean
1101
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1102
+ agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1103
+ }, ExtArgs["result"]["chatThread"]>
1104
+
1105
+ export type ChatThreadSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
1106
+ id?: boolean
1107
+ userId?: boolean
1108
+ title?: boolean
1109
+ isArchived?: boolean
1110
+ createdAt?: boolean
1111
+ updatedAt?: boolean
1112
+ agentId?: boolean
1113
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1114
+ agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1115
+ }, ExtArgs["result"]["chatThread"]>
1116
+
1117
+ export type ChatThreadSelectScalar = {
1118
+ id?: boolean
1119
+ userId?: boolean
1120
+ title?: boolean
1121
+ isArchived?: boolean
1122
+ createdAt?: boolean
1123
+ updatedAt?: boolean
1124
+ agentId?: boolean
1125
+ }
1126
+
1127
+ export type ChatThreadOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "title" | "isArchived" | "createdAt" | "updatedAt" | "agentId", ExtArgs["result"]["chatThread"]>
1128
+ export type ChatThreadInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1129
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1130
+ messages?: boolean | Prisma.ChatThread$messagesArgs<ExtArgs>
1131
+ runs?: boolean | Prisma.ChatThread$runsArgs<ExtArgs>
1132
+ interrupts?: boolean | Prisma.ChatThread$interruptsArgs<ExtArgs>
1133
+ generations?: boolean | Prisma.ChatThread$generationsArgs<ExtArgs>
1134
+ agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1135
+ _count?: boolean | Prisma.ChatThreadCountOutputTypeDefaultArgs<ExtArgs>
1136
+ }
1137
+ export type ChatThreadIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1138
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1139
+ agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1140
+ }
1141
+ export type ChatThreadIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1142
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
1143
+ agent?: boolean | Prisma.ChatThread$agentArgs<ExtArgs>
1144
+ }
1145
+
1146
+ export type $ChatThreadPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1147
+ name: "ChatThread"
1148
+ objects: {
1149
+ user: Prisma.$UserPayload<ExtArgs>
1150
+ messages: Prisma.$ChatMessagePayload<ExtArgs>[]
1151
+ runs: Prisma.$ChatRunPayload<ExtArgs>[]
1152
+ interrupts: Prisma.$ChatInterruptPayload<ExtArgs>[]
1153
+ generations: Prisma.$GenerationRunPayload<ExtArgs>[]
1154
+ agent: Prisma.$UserAgentPayload<ExtArgs> | null
1155
+ }
1156
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
1157
+ id: string
1158
+ userId: string
1159
+ title: string | null
1160
+ isArchived: boolean
1161
+ createdAt: Date
1162
+ updatedAt: Date
1163
+ agentId: string | null
1164
+ }, ExtArgs["result"]["chatThread"]>
1165
+ composites: {}
1166
+ }
1167
+
1168
+ export type ChatThreadGetPayload<S extends boolean | null | undefined | ChatThreadDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload, S>
1169
+
1170
+ export type ChatThreadCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
1171
+ Omit<ChatThreadFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
1172
+ select?: ChatThreadCountAggregateInputType | true
1173
+ }
1174
+
1175
+ export interface ChatThreadDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
1176
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['ChatThread'], meta: { name: 'ChatThread' } }
1177
+ /**
1178
+ * Find zero or one ChatThread that matches the filter.
1179
+ * @param {ChatThreadFindUniqueArgs} args - Arguments to find a ChatThread
1180
+ * @example
1181
+ * // Get one ChatThread
1182
+ * const chatThread = await prisma.chatThread.findUnique({
1183
+ * where: {
1184
+ * // ... provide filter here
1185
+ * }
1186
+ * })
1187
+ */
1188
+ findUnique<T extends ChatThreadFindUniqueArgs>(args: Prisma.SelectSubset<T, ChatThreadFindUniqueArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
1189
+
1190
+ /**
1191
+ * Find one ChatThread that matches the filter or throw an error with `error.code='P2025'`
1192
+ * if no matches were found.
1193
+ * @param {ChatThreadFindUniqueOrThrowArgs} args - Arguments to find a ChatThread
1194
+ * @example
1195
+ * // Get one ChatThread
1196
+ * const chatThread = await prisma.chatThread.findUniqueOrThrow({
1197
+ * where: {
1198
+ * // ... provide filter here
1199
+ * }
1200
+ * })
1201
+ */
1202
+ findUniqueOrThrow<T extends ChatThreadFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, ChatThreadFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1203
+
1204
+ /**
1205
+ * Find the first ChatThread that matches the filter.
1206
+ * Note, that providing `undefined` is treated as the value not being there.
1207
+ * Read more here: https://pris.ly/d/null-undefined
1208
+ * @param {ChatThreadFindFirstArgs} args - Arguments to find a ChatThread
1209
+ * @example
1210
+ * // Get one ChatThread
1211
+ * const chatThread = await prisma.chatThread.findFirst({
1212
+ * where: {
1213
+ * // ... provide filter here
1214
+ * }
1215
+ * })
1216
+ */
1217
+ findFirst<T extends ChatThreadFindFirstArgs>(args?: Prisma.SelectSubset<T, ChatThreadFindFirstArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
1218
+
1219
+ /**
1220
+ * Find the first ChatThread that matches the filter or
1221
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
1222
+ * Note, that providing `undefined` is treated as the value not being there.
1223
+ * Read more here: https://pris.ly/d/null-undefined
1224
+ * @param {ChatThreadFindFirstOrThrowArgs} args - Arguments to find a ChatThread
1225
+ * @example
1226
+ * // Get one ChatThread
1227
+ * const chatThread = await prisma.chatThread.findFirstOrThrow({
1228
+ * where: {
1229
+ * // ... provide filter here
1230
+ * }
1231
+ * })
1232
+ */
1233
+ findFirstOrThrow<T extends ChatThreadFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, ChatThreadFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1234
+
1235
+ /**
1236
+ * Find zero or more ChatThreads that matches the filter.
1237
+ * Note, that providing `undefined` is treated as the value not being there.
1238
+ * Read more here: https://pris.ly/d/null-undefined
1239
+ * @param {ChatThreadFindManyArgs} args - Arguments to filter and select certain fields only.
1240
+ * @example
1241
+ * // Get all ChatThreads
1242
+ * const chatThreads = await prisma.chatThread.findMany()
1243
+ *
1244
+ * // Get first 10 ChatThreads
1245
+ * const chatThreads = await prisma.chatThread.findMany({ take: 10 })
1246
+ *
1247
+ * // Only select the `id`
1248
+ * const chatThreadWithIdOnly = await prisma.chatThread.findMany({ select: { id: true } })
1249
+ *
1250
+ */
1251
+ findMany<T extends ChatThreadFindManyArgs>(args?: Prisma.SelectSubset<T, ChatThreadFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
1252
+
1253
+ /**
1254
+ * Create a ChatThread.
1255
+ * @param {ChatThreadCreateArgs} args - Arguments to create a ChatThread.
1256
+ * @example
1257
+ * // Create one ChatThread
1258
+ * const ChatThread = await prisma.chatThread.create({
1259
+ * data: {
1260
+ * // ... data to create a ChatThread
1261
+ * }
1262
+ * })
1263
+ *
1264
+ */
1265
+ create<T extends ChatThreadCreateArgs>(args: Prisma.SelectSubset<T, ChatThreadCreateArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1266
+
1267
+ /**
1268
+ * Create many ChatThreads.
1269
+ * @param {ChatThreadCreateManyArgs} args - Arguments to create many ChatThreads.
1270
+ * @example
1271
+ * // Create many ChatThreads
1272
+ * const chatThread = await prisma.chatThread.createMany({
1273
+ * data: [
1274
+ * // ... provide data here
1275
+ * ]
1276
+ * })
1277
+ *
1278
+ */
1279
+ createMany<T extends ChatThreadCreateManyArgs>(args?: Prisma.SelectSubset<T, ChatThreadCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
1280
+
1281
+ /**
1282
+ * Create many ChatThreads and returns the data saved in the database.
1283
+ * @param {ChatThreadCreateManyAndReturnArgs} args - Arguments to create many ChatThreads.
1284
+ * @example
1285
+ * // Create many ChatThreads
1286
+ * const chatThread = await prisma.chatThread.createManyAndReturn({
1287
+ * data: [
1288
+ * // ... provide data here
1289
+ * ]
1290
+ * })
1291
+ *
1292
+ * // Create many ChatThreads and only return the `id`
1293
+ * const chatThreadWithIdOnly = await prisma.chatThread.createManyAndReturn({
1294
+ * select: { id: true },
1295
+ * data: [
1296
+ * // ... provide data here
1297
+ * ]
1298
+ * })
1299
+ * Note, that providing `undefined` is treated as the value not being there.
1300
+ * Read more here: https://pris.ly/d/null-undefined
1301
+ *
1302
+ */
1303
+ createManyAndReturn<T extends ChatThreadCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, ChatThreadCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
1304
+
1305
+ /**
1306
+ * Delete a ChatThread.
1307
+ * @param {ChatThreadDeleteArgs} args - Arguments to delete one ChatThread.
1308
+ * @example
1309
+ * // Delete one ChatThread
1310
+ * const ChatThread = await prisma.chatThread.delete({
1311
+ * where: {
1312
+ * // ... filter to delete one ChatThread
1313
+ * }
1314
+ * })
1315
+ *
1316
+ */
1317
+ delete<T extends ChatThreadDeleteArgs>(args: Prisma.SelectSubset<T, ChatThreadDeleteArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1318
+
1319
+ /**
1320
+ * Update one ChatThread.
1321
+ * @param {ChatThreadUpdateArgs} args - Arguments to update one ChatThread.
1322
+ * @example
1323
+ * // Update one ChatThread
1324
+ * const chatThread = await prisma.chatThread.update({
1325
+ * where: {
1326
+ * // ... provide filter here
1327
+ * },
1328
+ * data: {
1329
+ * // ... provide data here
1330
+ * }
1331
+ * })
1332
+ *
1333
+ */
1334
+ update<T extends ChatThreadUpdateArgs>(args: Prisma.SelectSubset<T, ChatThreadUpdateArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1335
+
1336
+ /**
1337
+ * Delete zero or more ChatThreads.
1338
+ * @param {ChatThreadDeleteManyArgs} args - Arguments to filter ChatThreads to delete.
1339
+ * @example
1340
+ * // Delete a few ChatThreads
1341
+ * const { count } = await prisma.chatThread.deleteMany({
1342
+ * where: {
1343
+ * // ... provide filter here
1344
+ * }
1345
+ * })
1346
+ *
1347
+ */
1348
+ deleteMany<T extends ChatThreadDeleteManyArgs>(args?: Prisma.SelectSubset<T, ChatThreadDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
1349
+
1350
+ /**
1351
+ * Update zero or more ChatThreads.
1352
+ * Note, that providing `undefined` is treated as the value not being there.
1353
+ * Read more here: https://pris.ly/d/null-undefined
1354
+ * @param {ChatThreadUpdateManyArgs} args - Arguments to update one or more rows.
1355
+ * @example
1356
+ * // Update many ChatThreads
1357
+ * const chatThread = await prisma.chatThread.updateMany({
1358
+ * where: {
1359
+ * // ... provide filter here
1360
+ * },
1361
+ * data: {
1362
+ * // ... provide data here
1363
+ * }
1364
+ * })
1365
+ *
1366
+ */
1367
+ updateMany<T extends ChatThreadUpdateManyArgs>(args: Prisma.SelectSubset<T, ChatThreadUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
1368
+
1369
+ /**
1370
+ * Update zero or more ChatThreads and returns the data updated in the database.
1371
+ * @param {ChatThreadUpdateManyAndReturnArgs} args - Arguments to update many ChatThreads.
1372
+ * @example
1373
+ * // Update many ChatThreads
1374
+ * const chatThread = await prisma.chatThread.updateManyAndReturn({
1375
+ * where: {
1376
+ * // ... provide filter here
1377
+ * },
1378
+ * data: [
1379
+ * // ... provide data here
1380
+ * ]
1381
+ * })
1382
+ *
1383
+ * // Update zero or more ChatThreads and only return the `id`
1384
+ * const chatThreadWithIdOnly = await prisma.chatThread.updateManyAndReturn({
1385
+ * select: { id: true },
1386
+ * where: {
1387
+ * // ... provide filter here
1388
+ * },
1389
+ * data: [
1390
+ * // ... provide data here
1391
+ * ]
1392
+ * })
1393
+ * Note, that providing `undefined` is treated as the value not being there.
1394
+ * Read more here: https://pris.ly/d/null-undefined
1395
+ *
1396
+ */
1397
+ updateManyAndReturn<T extends ChatThreadUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, ChatThreadUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
1398
+
1399
+ /**
1400
+ * Create or update one ChatThread.
1401
+ * @param {ChatThreadUpsertArgs} args - Arguments to update or create a ChatThread.
1402
+ * @example
1403
+ * // Update or create a ChatThread
1404
+ * const chatThread = await prisma.chatThread.upsert({
1405
+ * create: {
1406
+ * // ... data to create a ChatThread
1407
+ * },
1408
+ * update: {
1409
+ * // ... in case it already exists, update
1410
+ * },
1411
+ * where: {
1412
+ * // ... the filter for the ChatThread we want to update
1413
+ * }
1414
+ * })
1415
+ */
1416
+ upsert<T extends ChatThreadUpsertArgs>(args: Prisma.SelectSubset<T, ChatThreadUpsertArgs<ExtArgs>>): Prisma.Prisma__ChatThreadClient<runtime.Types.Result.GetResult<Prisma.$ChatThreadPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1417
+
1418
+
1419
+ /**
1420
+ * Count the number of ChatThreads.
1421
+ * Note, that providing `undefined` is treated as the value not being there.
1422
+ * Read more here: https://pris.ly/d/null-undefined
1423
+ * @param {ChatThreadCountArgs} args - Arguments to filter ChatThreads to count.
1424
+ * @example
1425
+ * // Count the number of ChatThreads
1426
+ * const count = await prisma.chatThread.count({
1427
+ * where: {
1428
+ * // ... the filter for the ChatThreads we want to count
1429
+ * }
1430
+ * })
1431
+ **/
1432
+ count<T extends ChatThreadCountArgs>(
1433
+ args?: Prisma.Subset<T, ChatThreadCountArgs>,
1434
+ ): Prisma.PrismaPromise<
1435
+ T extends runtime.Types.Utils.Record<'select', any>
1436
+ ? T['select'] extends true
1437
+ ? number
1438
+ : Prisma.GetScalarType<T['select'], ChatThreadCountAggregateOutputType>
1439
+ : number
1440
+ >
1441
+
1442
+ /**
1443
+ * Allows you to perform aggregations operations on a ChatThread.
1444
+ * Note, that providing `undefined` is treated as the value not being there.
1445
+ * Read more here: https://pris.ly/d/null-undefined
1446
+ * @param {ChatThreadAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
1447
+ * @example
1448
+ * // Ordered by age ascending
1449
+ * // Where email contains prisma.io
1450
+ * // Limited to the 10 users
1451
+ * const aggregations = await prisma.user.aggregate({
1452
+ * _avg: {
1453
+ * age: true,
1454
+ * },
1455
+ * where: {
1456
+ * email: {
1457
+ * contains: "prisma.io",
1458
+ * },
1459
+ * },
1460
+ * orderBy: {
1461
+ * age: "asc",
1462
+ * },
1463
+ * take: 10,
1464
+ * })
1465
+ **/
1466
+ aggregate<T extends ChatThreadAggregateArgs>(args: Prisma.Subset<T, ChatThreadAggregateArgs>): Prisma.PrismaPromise<GetChatThreadAggregateType<T>>
1467
+
1468
+ /**
1469
+ * Group by ChatThread.
1470
+ * Note, that providing `undefined` is treated as the value not being there.
1471
+ * Read more here: https://pris.ly/d/null-undefined
1472
+ * @param {ChatThreadGroupByArgs} args - Group by arguments.
1473
+ * @example
1474
+ * // Group by city, order by createdAt, get count
1475
+ * const result = await prisma.user.groupBy({
1476
+ * by: ['city', 'createdAt'],
1477
+ * orderBy: {
1478
+ * createdAt: true
1479
+ * },
1480
+ * _count: {
1481
+ * _all: true
1482
+ * },
1483
+ * })
1484
+ *
1485
+ **/
1486
+ groupBy<
1487
+ T extends ChatThreadGroupByArgs,
1488
+ HasSelectOrTake extends Prisma.Or<
1489
+ Prisma.Extends<'skip', Prisma.Keys<T>>,
1490
+ Prisma.Extends<'take', Prisma.Keys<T>>
1491
+ >,
1492
+ OrderByArg extends Prisma.True extends HasSelectOrTake
1493
+ ? { orderBy: ChatThreadGroupByArgs['orderBy'] }
1494
+ : { orderBy?: ChatThreadGroupByArgs['orderBy'] },
1495
+ OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
1496
+ ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
1497
+ ByValid extends Prisma.Has<ByFields, OrderFields>,
1498
+ HavingFields extends Prisma.GetHavingFields<T['having']>,
1499
+ HavingValid extends Prisma.Has<ByFields, HavingFields>,
1500
+ ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
1501
+ InputErrors extends ByEmpty extends Prisma.True
1502
+ ? `Error: "by" must not be empty.`
1503
+ : HavingValid extends Prisma.False
1504
+ ? {
1505
+ [P in HavingFields]: P extends ByFields
1506
+ ? never
1507
+ : P extends string
1508
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
1509
+ : [
1510
+ Error,
1511
+ 'Field ',
1512
+ P,
1513
+ ` in "having" needs to be provided in "by"`,
1514
+ ]
1515
+ }[HavingFields]
1516
+ : 'take' extends Prisma.Keys<T>
1517
+ ? 'orderBy' extends Prisma.Keys<T>
1518
+ ? ByValid extends Prisma.True
1519
+ ? {}
1520
+ : {
1521
+ [P in OrderFields]: P extends ByFields
1522
+ ? never
1523
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
1524
+ }[OrderFields]
1525
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
1526
+ : 'skip' extends Prisma.Keys<T>
1527
+ ? 'orderBy' extends Prisma.Keys<T>
1528
+ ? ByValid extends Prisma.True
1529
+ ? {}
1530
+ : {
1531
+ [P in OrderFields]: P extends ByFields
1532
+ ? never
1533
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
1534
+ }[OrderFields]
1535
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
1536
+ : ByValid extends Prisma.True
1537
+ ? {}
1538
+ : {
1539
+ [P in OrderFields]: P extends ByFields
1540
+ ? never
1541
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
1542
+ }[OrderFields]
1543
+ >(args: Prisma.SubsetIntersection<T, ChatThreadGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetChatThreadGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
1544
+ /**
1545
+ * Fields of the ChatThread model
1546
+ */
1547
+ readonly fields: ChatThreadFieldRefs;
1548
+ }
1549
+
1550
+ /**
1551
+ * The delegate class that acts as a "Promise-like" for ChatThread.
1552
+ * Why is this prefixed with `Prisma__`?
1553
+ * Because we want to prevent naming conflicts as mentioned in
1554
+ * https://github.com/prisma/prisma-client-js/issues/707
1555
+ */
1556
+ export interface Prisma__ChatThreadClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1557
+ readonly [Symbol.toStringTag]: "PrismaPromise"
1558
+ user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
1559
+ messages<T extends Prisma.ChatThread$messagesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ChatThread$messagesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatMessagePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1560
+ runs<T extends Prisma.ChatThread$runsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ChatThread$runsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatRunPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1561
+ interrupts<T extends Prisma.ChatThread$interruptsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ChatThread$interruptsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ChatInterruptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1562
+ generations<T extends Prisma.ChatThread$generationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ChatThread$generationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GenerationRunPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1563
+ agent<T extends Prisma.ChatThread$agentArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ChatThread$agentArgs<ExtArgs>>): Prisma.Prisma__UserAgentClient<runtime.Types.Result.GetResult<Prisma.$UserAgentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
1564
+ /**
1565
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1566
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1567
+ * @param onrejected The callback to execute when the Promise is rejected.
1568
+ * @returns A Promise for the completion of which ever callback is executed.
1569
+ */
1570
+ 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>
1571
+ /**
1572
+ * Attaches a callback for only the rejection of the Promise.
1573
+ * @param onrejected The callback to execute when the Promise is rejected.
1574
+ * @returns A Promise for the completion of the callback.
1575
+ */
1576
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
1577
+ /**
1578
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
1579
+ * resolved value cannot be modified from the callback.
1580
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
1581
+ * @returns A Promise for the completion of the callback.
1582
+ */
1583
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
1584
+ }
1585
+
1586
+
1587
+
1588
+
1589
+ /**
1590
+ * Fields of the ChatThread model
1591
+ */
1592
+ export interface ChatThreadFieldRefs {
1593
+ readonly id: Prisma.FieldRef<"ChatThread", 'String'>
1594
+ readonly userId: Prisma.FieldRef<"ChatThread", 'String'>
1595
+ readonly title: Prisma.FieldRef<"ChatThread", 'String'>
1596
+ readonly isArchived: Prisma.FieldRef<"ChatThread", 'Boolean'>
1597
+ readonly createdAt: Prisma.FieldRef<"ChatThread", 'DateTime'>
1598
+ readonly updatedAt: Prisma.FieldRef<"ChatThread", 'DateTime'>
1599
+ readonly agentId: Prisma.FieldRef<"ChatThread", 'String'>
1600
+ }
1601
+
1602
+
1603
+ // Custom InputTypes
1604
+ /**
1605
+ * ChatThread findUnique
1606
+ */
1607
+ export type ChatThreadFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1608
+ /**
1609
+ * Select specific fields to fetch from the ChatThread
1610
+ */
1611
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1612
+ /**
1613
+ * Omit specific fields from the ChatThread
1614
+ */
1615
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1616
+ /**
1617
+ * Choose, which related nodes to fetch as well
1618
+ */
1619
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1620
+ /**
1621
+ * Filter, which ChatThread to fetch.
1622
+ */
1623
+ where: Prisma.ChatThreadWhereUniqueInput
1624
+ }
1625
+
1626
+ /**
1627
+ * ChatThread findUniqueOrThrow
1628
+ */
1629
+ export type ChatThreadFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1630
+ /**
1631
+ * Select specific fields to fetch from the ChatThread
1632
+ */
1633
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1634
+ /**
1635
+ * Omit specific fields from the ChatThread
1636
+ */
1637
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1638
+ /**
1639
+ * Choose, which related nodes to fetch as well
1640
+ */
1641
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1642
+ /**
1643
+ * Filter, which ChatThread to fetch.
1644
+ */
1645
+ where: Prisma.ChatThreadWhereUniqueInput
1646
+ }
1647
+
1648
+ /**
1649
+ * ChatThread findFirst
1650
+ */
1651
+ export type ChatThreadFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1652
+ /**
1653
+ * Select specific fields to fetch from the ChatThread
1654
+ */
1655
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1656
+ /**
1657
+ * Omit specific fields from the ChatThread
1658
+ */
1659
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1660
+ /**
1661
+ * Choose, which related nodes to fetch as well
1662
+ */
1663
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1664
+ /**
1665
+ * Filter, which ChatThread to fetch.
1666
+ */
1667
+ where?: Prisma.ChatThreadWhereInput
1668
+ /**
1669
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1670
+ *
1671
+ * Determine the order of ChatThreads to fetch.
1672
+ */
1673
+ orderBy?: Prisma.ChatThreadOrderByWithRelationInput | Prisma.ChatThreadOrderByWithRelationInput[]
1674
+ /**
1675
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1676
+ *
1677
+ * Sets the position for searching for ChatThreads.
1678
+ */
1679
+ cursor?: Prisma.ChatThreadWhereUniqueInput
1680
+ /**
1681
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1682
+ *
1683
+ * Take `±n` ChatThreads from the position of the cursor.
1684
+ */
1685
+ take?: number
1686
+ /**
1687
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1688
+ *
1689
+ * Skip the first `n` ChatThreads.
1690
+ */
1691
+ skip?: number
1692
+ /**
1693
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1694
+ *
1695
+ * Filter by unique combinations of ChatThreads.
1696
+ */
1697
+ distinct?: Prisma.ChatThreadScalarFieldEnum | Prisma.ChatThreadScalarFieldEnum[]
1698
+ }
1699
+
1700
+ /**
1701
+ * ChatThread findFirstOrThrow
1702
+ */
1703
+ export type ChatThreadFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1704
+ /**
1705
+ * Select specific fields to fetch from the ChatThread
1706
+ */
1707
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1708
+ /**
1709
+ * Omit specific fields from the ChatThread
1710
+ */
1711
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1712
+ /**
1713
+ * Choose, which related nodes to fetch as well
1714
+ */
1715
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1716
+ /**
1717
+ * Filter, which ChatThread to fetch.
1718
+ */
1719
+ where?: Prisma.ChatThreadWhereInput
1720
+ /**
1721
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1722
+ *
1723
+ * Determine the order of ChatThreads to fetch.
1724
+ */
1725
+ orderBy?: Prisma.ChatThreadOrderByWithRelationInput | Prisma.ChatThreadOrderByWithRelationInput[]
1726
+ /**
1727
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1728
+ *
1729
+ * Sets the position for searching for ChatThreads.
1730
+ */
1731
+ cursor?: Prisma.ChatThreadWhereUniqueInput
1732
+ /**
1733
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1734
+ *
1735
+ * Take `±n` ChatThreads from the position of the cursor.
1736
+ */
1737
+ take?: number
1738
+ /**
1739
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1740
+ *
1741
+ * Skip the first `n` ChatThreads.
1742
+ */
1743
+ skip?: number
1744
+ /**
1745
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1746
+ *
1747
+ * Filter by unique combinations of ChatThreads.
1748
+ */
1749
+ distinct?: Prisma.ChatThreadScalarFieldEnum | Prisma.ChatThreadScalarFieldEnum[]
1750
+ }
1751
+
1752
+ /**
1753
+ * ChatThread findMany
1754
+ */
1755
+ export type ChatThreadFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1756
+ /**
1757
+ * Select specific fields to fetch from the ChatThread
1758
+ */
1759
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1760
+ /**
1761
+ * Omit specific fields from the ChatThread
1762
+ */
1763
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1764
+ /**
1765
+ * Choose, which related nodes to fetch as well
1766
+ */
1767
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1768
+ /**
1769
+ * Filter, which ChatThreads to fetch.
1770
+ */
1771
+ where?: Prisma.ChatThreadWhereInput
1772
+ /**
1773
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1774
+ *
1775
+ * Determine the order of ChatThreads to fetch.
1776
+ */
1777
+ orderBy?: Prisma.ChatThreadOrderByWithRelationInput | Prisma.ChatThreadOrderByWithRelationInput[]
1778
+ /**
1779
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1780
+ *
1781
+ * Sets the position for listing ChatThreads.
1782
+ */
1783
+ cursor?: Prisma.ChatThreadWhereUniqueInput
1784
+ /**
1785
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1786
+ *
1787
+ * Take `±n` ChatThreads from the position of the cursor.
1788
+ */
1789
+ take?: number
1790
+ /**
1791
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1792
+ *
1793
+ * Skip the first `n` ChatThreads.
1794
+ */
1795
+ skip?: number
1796
+ /**
1797
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1798
+ *
1799
+ * Filter by unique combinations of ChatThreads.
1800
+ */
1801
+ distinct?: Prisma.ChatThreadScalarFieldEnum | Prisma.ChatThreadScalarFieldEnum[]
1802
+ }
1803
+
1804
+ /**
1805
+ * ChatThread create
1806
+ */
1807
+ export type ChatThreadCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1808
+ /**
1809
+ * Select specific fields to fetch from the ChatThread
1810
+ */
1811
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1812
+ /**
1813
+ * Omit specific fields from the ChatThread
1814
+ */
1815
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1816
+ /**
1817
+ * Choose, which related nodes to fetch as well
1818
+ */
1819
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1820
+ /**
1821
+ * The data needed to create a ChatThread.
1822
+ */
1823
+ data: Prisma.XOR<Prisma.ChatThreadCreateInput, Prisma.ChatThreadUncheckedCreateInput>
1824
+ }
1825
+
1826
+ /**
1827
+ * ChatThread createMany
1828
+ */
1829
+ export type ChatThreadCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1830
+ /**
1831
+ * The data used to create many ChatThreads.
1832
+ */
1833
+ data: Prisma.ChatThreadCreateManyInput | Prisma.ChatThreadCreateManyInput[]
1834
+ }
1835
+
1836
+ /**
1837
+ * ChatThread createManyAndReturn
1838
+ */
1839
+ export type ChatThreadCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1840
+ /**
1841
+ * Select specific fields to fetch from the ChatThread
1842
+ */
1843
+ select?: Prisma.ChatThreadSelectCreateManyAndReturn<ExtArgs> | null
1844
+ /**
1845
+ * Omit specific fields from the ChatThread
1846
+ */
1847
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1848
+ /**
1849
+ * The data used to create many ChatThreads.
1850
+ */
1851
+ data: Prisma.ChatThreadCreateManyInput | Prisma.ChatThreadCreateManyInput[]
1852
+ /**
1853
+ * Choose, which related nodes to fetch as well
1854
+ */
1855
+ include?: Prisma.ChatThreadIncludeCreateManyAndReturn<ExtArgs> | null
1856
+ }
1857
+
1858
+ /**
1859
+ * ChatThread update
1860
+ */
1861
+ export type ChatThreadUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1862
+ /**
1863
+ * Select specific fields to fetch from the ChatThread
1864
+ */
1865
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1866
+ /**
1867
+ * Omit specific fields from the ChatThread
1868
+ */
1869
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1870
+ /**
1871
+ * Choose, which related nodes to fetch as well
1872
+ */
1873
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1874
+ /**
1875
+ * The data needed to update a ChatThread.
1876
+ */
1877
+ data: Prisma.XOR<Prisma.ChatThreadUpdateInput, Prisma.ChatThreadUncheckedUpdateInput>
1878
+ /**
1879
+ * Choose, which ChatThread to update.
1880
+ */
1881
+ where: Prisma.ChatThreadWhereUniqueInput
1882
+ }
1883
+
1884
+ /**
1885
+ * ChatThread updateMany
1886
+ */
1887
+ export type ChatThreadUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1888
+ /**
1889
+ * The data used to update ChatThreads.
1890
+ */
1891
+ data: Prisma.XOR<Prisma.ChatThreadUpdateManyMutationInput, Prisma.ChatThreadUncheckedUpdateManyInput>
1892
+ /**
1893
+ * Filter which ChatThreads to update
1894
+ */
1895
+ where?: Prisma.ChatThreadWhereInput
1896
+ /**
1897
+ * Limit how many ChatThreads to update.
1898
+ */
1899
+ limit?: number
1900
+ }
1901
+
1902
+ /**
1903
+ * ChatThread updateManyAndReturn
1904
+ */
1905
+ export type ChatThreadUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1906
+ /**
1907
+ * Select specific fields to fetch from the ChatThread
1908
+ */
1909
+ select?: Prisma.ChatThreadSelectUpdateManyAndReturn<ExtArgs> | null
1910
+ /**
1911
+ * Omit specific fields from the ChatThread
1912
+ */
1913
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1914
+ /**
1915
+ * The data used to update ChatThreads.
1916
+ */
1917
+ data: Prisma.XOR<Prisma.ChatThreadUpdateManyMutationInput, Prisma.ChatThreadUncheckedUpdateManyInput>
1918
+ /**
1919
+ * Filter which ChatThreads to update
1920
+ */
1921
+ where?: Prisma.ChatThreadWhereInput
1922
+ /**
1923
+ * Limit how many ChatThreads to update.
1924
+ */
1925
+ limit?: number
1926
+ /**
1927
+ * Choose, which related nodes to fetch as well
1928
+ */
1929
+ include?: Prisma.ChatThreadIncludeUpdateManyAndReturn<ExtArgs> | null
1930
+ }
1931
+
1932
+ /**
1933
+ * ChatThread upsert
1934
+ */
1935
+ export type ChatThreadUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1936
+ /**
1937
+ * Select specific fields to fetch from the ChatThread
1938
+ */
1939
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1940
+ /**
1941
+ * Omit specific fields from the ChatThread
1942
+ */
1943
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1944
+ /**
1945
+ * Choose, which related nodes to fetch as well
1946
+ */
1947
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1948
+ /**
1949
+ * The filter to search for the ChatThread to update in case it exists.
1950
+ */
1951
+ where: Prisma.ChatThreadWhereUniqueInput
1952
+ /**
1953
+ * In case the ChatThread found by the `where` argument doesn't exist, create a new ChatThread with this data.
1954
+ */
1955
+ create: Prisma.XOR<Prisma.ChatThreadCreateInput, Prisma.ChatThreadUncheckedCreateInput>
1956
+ /**
1957
+ * In case the ChatThread was found with the provided `where` argument, update it with this data.
1958
+ */
1959
+ update: Prisma.XOR<Prisma.ChatThreadUpdateInput, Prisma.ChatThreadUncheckedUpdateInput>
1960
+ }
1961
+
1962
+ /**
1963
+ * ChatThread delete
1964
+ */
1965
+ export type ChatThreadDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1966
+ /**
1967
+ * Select specific fields to fetch from the ChatThread
1968
+ */
1969
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
1970
+ /**
1971
+ * Omit specific fields from the ChatThread
1972
+ */
1973
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
1974
+ /**
1975
+ * Choose, which related nodes to fetch as well
1976
+ */
1977
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
1978
+ /**
1979
+ * Filter which ChatThread to delete.
1980
+ */
1981
+ where: Prisma.ChatThreadWhereUniqueInput
1982
+ }
1983
+
1984
+ /**
1985
+ * ChatThread deleteMany
1986
+ */
1987
+ export type ChatThreadDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1988
+ /**
1989
+ * Filter which ChatThreads to delete
1990
+ */
1991
+ where?: Prisma.ChatThreadWhereInput
1992
+ /**
1993
+ * Limit how many ChatThreads to delete.
1994
+ */
1995
+ limit?: number
1996
+ }
1997
+
1998
+ /**
1999
+ * ChatThread.messages
2000
+ */
2001
+ export type ChatThread$messagesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2002
+ /**
2003
+ * Select specific fields to fetch from the ChatMessage
2004
+ */
2005
+ select?: Prisma.ChatMessageSelect<ExtArgs> | null
2006
+ /**
2007
+ * Omit specific fields from the ChatMessage
2008
+ */
2009
+ omit?: Prisma.ChatMessageOmit<ExtArgs> | null
2010
+ /**
2011
+ * Choose, which related nodes to fetch as well
2012
+ */
2013
+ include?: Prisma.ChatMessageInclude<ExtArgs> | null
2014
+ where?: Prisma.ChatMessageWhereInput
2015
+ orderBy?: Prisma.ChatMessageOrderByWithRelationInput | Prisma.ChatMessageOrderByWithRelationInput[]
2016
+ cursor?: Prisma.ChatMessageWhereUniqueInput
2017
+ take?: number
2018
+ skip?: number
2019
+ distinct?: Prisma.ChatMessageScalarFieldEnum | Prisma.ChatMessageScalarFieldEnum[]
2020
+ }
2021
+
2022
+ /**
2023
+ * ChatThread.runs
2024
+ */
2025
+ export type ChatThread$runsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2026
+ /**
2027
+ * Select specific fields to fetch from the ChatRun
2028
+ */
2029
+ select?: Prisma.ChatRunSelect<ExtArgs> | null
2030
+ /**
2031
+ * Omit specific fields from the ChatRun
2032
+ */
2033
+ omit?: Prisma.ChatRunOmit<ExtArgs> | null
2034
+ /**
2035
+ * Choose, which related nodes to fetch as well
2036
+ */
2037
+ include?: Prisma.ChatRunInclude<ExtArgs> | null
2038
+ where?: Prisma.ChatRunWhereInput
2039
+ orderBy?: Prisma.ChatRunOrderByWithRelationInput | Prisma.ChatRunOrderByWithRelationInput[]
2040
+ cursor?: Prisma.ChatRunWhereUniqueInput
2041
+ take?: number
2042
+ skip?: number
2043
+ distinct?: Prisma.ChatRunScalarFieldEnum | Prisma.ChatRunScalarFieldEnum[]
2044
+ }
2045
+
2046
+ /**
2047
+ * ChatThread.interrupts
2048
+ */
2049
+ export type ChatThread$interruptsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2050
+ /**
2051
+ * Select specific fields to fetch from the ChatInterrupt
2052
+ */
2053
+ select?: Prisma.ChatInterruptSelect<ExtArgs> | null
2054
+ /**
2055
+ * Omit specific fields from the ChatInterrupt
2056
+ */
2057
+ omit?: Prisma.ChatInterruptOmit<ExtArgs> | null
2058
+ /**
2059
+ * Choose, which related nodes to fetch as well
2060
+ */
2061
+ include?: Prisma.ChatInterruptInclude<ExtArgs> | null
2062
+ where?: Prisma.ChatInterruptWhereInput
2063
+ orderBy?: Prisma.ChatInterruptOrderByWithRelationInput | Prisma.ChatInterruptOrderByWithRelationInput[]
2064
+ cursor?: Prisma.ChatInterruptWhereUniqueInput
2065
+ take?: number
2066
+ skip?: number
2067
+ distinct?: Prisma.ChatInterruptScalarFieldEnum | Prisma.ChatInterruptScalarFieldEnum[]
2068
+ }
2069
+
2070
+ /**
2071
+ * ChatThread.generations
2072
+ */
2073
+ export type ChatThread$generationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2074
+ /**
2075
+ * Select specific fields to fetch from the GenerationRun
2076
+ */
2077
+ select?: Prisma.GenerationRunSelect<ExtArgs> | null
2078
+ /**
2079
+ * Omit specific fields from the GenerationRun
2080
+ */
2081
+ omit?: Prisma.GenerationRunOmit<ExtArgs> | null
2082
+ /**
2083
+ * Choose, which related nodes to fetch as well
2084
+ */
2085
+ include?: Prisma.GenerationRunInclude<ExtArgs> | null
2086
+ where?: Prisma.GenerationRunWhereInput
2087
+ orderBy?: Prisma.GenerationRunOrderByWithRelationInput | Prisma.GenerationRunOrderByWithRelationInput[]
2088
+ cursor?: Prisma.GenerationRunWhereUniqueInput
2089
+ take?: number
2090
+ skip?: number
2091
+ distinct?: Prisma.GenerationRunScalarFieldEnum | Prisma.GenerationRunScalarFieldEnum[]
2092
+ }
2093
+
2094
+ /**
2095
+ * ChatThread.agent
2096
+ */
2097
+ export type ChatThread$agentArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2098
+ /**
2099
+ * Select specific fields to fetch from the UserAgent
2100
+ */
2101
+ select?: Prisma.UserAgentSelect<ExtArgs> | null
2102
+ /**
2103
+ * Omit specific fields from the UserAgent
2104
+ */
2105
+ omit?: Prisma.UserAgentOmit<ExtArgs> | null
2106
+ /**
2107
+ * Choose, which related nodes to fetch as well
2108
+ */
2109
+ include?: Prisma.UserAgentInclude<ExtArgs> | null
2110
+ where?: Prisma.UserAgentWhereInput
2111
+ }
2112
+
2113
+ /**
2114
+ * ChatThread without action
2115
+ */
2116
+ export type ChatThreadDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
2117
+ /**
2118
+ * Select specific fields to fetch from the ChatThread
2119
+ */
2120
+ select?: Prisma.ChatThreadSelect<ExtArgs> | null
2121
+ /**
2122
+ * Omit specific fields from the ChatThread
2123
+ */
2124
+ omit?: Prisma.ChatThreadOmit<ExtArgs> | null
2125
+ /**
2126
+ * Choose, which related nodes to fetch as well
2127
+ */
2128
+ include?: Prisma.ChatThreadInclude<ExtArgs> | null
2129
+ }