@allbluecn/database 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,1863 @@
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 `AiUsageLog` 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 AiUsageLog
17
+ * AI 用量明细(按次扣减 + 成本审计)
18
+ */
19
+ export type AiUsageLogModel = runtime.Types.Result.DefaultSelection<Prisma.$AiUsageLogPayload>
20
+
21
+ export type AggregateAiUsageLog = {
22
+ _count: AiUsageLogCountAggregateOutputType | null
23
+ _avg: AiUsageLogAvgAggregateOutputType | null
24
+ _sum: AiUsageLogSumAggregateOutputType | null
25
+ _min: AiUsageLogMinAggregateOutputType | null
26
+ _max: AiUsageLogMaxAggregateOutputType | null
27
+ }
28
+
29
+ export type AiUsageLogAvgAggregateOutputType = {
30
+ inputTokens: number | null
31
+ outputTokens: number | null
32
+ costUsd: runtime.Decimal | null
33
+ durationMs: number | null
34
+ }
35
+
36
+ export type AiUsageLogSumAggregateOutputType = {
37
+ inputTokens: number | null
38
+ outputTokens: number | null
39
+ costUsd: runtime.Decimal | null
40
+ durationMs: number | null
41
+ }
42
+
43
+ export type AiUsageLogMinAggregateOutputType = {
44
+ id: string | null
45
+ workspaceId: string | null
46
+ userId: string | null
47
+ source: string | null
48
+ provider: string | null
49
+ model: string | null
50
+ inputTokens: number | null
51
+ outputTokens: number | null
52
+ costUsd: runtime.Decimal | null
53
+ success: boolean | null
54
+ errorMessage: string | null
55
+ durationMs: number | null
56
+ createdAt: Date | null
57
+ }
58
+
59
+ export type AiUsageLogMaxAggregateOutputType = {
60
+ id: string | null
61
+ workspaceId: string | null
62
+ userId: string | null
63
+ source: string | null
64
+ provider: string | null
65
+ model: string | null
66
+ inputTokens: number | null
67
+ outputTokens: number | null
68
+ costUsd: runtime.Decimal | null
69
+ success: boolean | null
70
+ errorMessage: string | null
71
+ durationMs: number | null
72
+ createdAt: Date | null
73
+ }
74
+
75
+ export type AiUsageLogCountAggregateOutputType = {
76
+ id: number
77
+ workspaceId: number
78
+ userId: number
79
+ source: number
80
+ provider: number
81
+ model: number
82
+ inputTokens: number
83
+ outputTokens: number
84
+ costUsd: number
85
+ success: number
86
+ errorMessage: number
87
+ durationMs: number
88
+ createdAt: number
89
+ _all: number
90
+ }
91
+
92
+
93
+ export type AiUsageLogAvgAggregateInputType = {
94
+ inputTokens?: true
95
+ outputTokens?: true
96
+ costUsd?: true
97
+ durationMs?: true
98
+ }
99
+
100
+ export type AiUsageLogSumAggregateInputType = {
101
+ inputTokens?: true
102
+ outputTokens?: true
103
+ costUsd?: true
104
+ durationMs?: true
105
+ }
106
+
107
+ export type AiUsageLogMinAggregateInputType = {
108
+ id?: true
109
+ workspaceId?: true
110
+ userId?: true
111
+ source?: true
112
+ provider?: true
113
+ model?: true
114
+ inputTokens?: true
115
+ outputTokens?: true
116
+ costUsd?: true
117
+ success?: true
118
+ errorMessage?: true
119
+ durationMs?: true
120
+ createdAt?: true
121
+ }
122
+
123
+ export type AiUsageLogMaxAggregateInputType = {
124
+ id?: true
125
+ workspaceId?: true
126
+ userId?: true
127
+ source?: true
128
+ provider?: true
129
+ model?: true
130
+ inputTokens?: true
131
+ outputTokens?: true
132
+ costUsd?: true
133
+ success?: true
134
+ errorMessage?: true
135
+ durationMs?: true
136
+ createdAt?: true
137
+ }
138
+
139
+ export type AiUsageLogCountAggregateInputType = {
140
+ id?: true
141
+ workspaceId?: true
142
+ userId?: true
143
+ source?: true
144
+ provider?: true
145
+ model?: true
146
+ inputTokens?: true
147
+ outputTokens?: true
148
+ costUsd?: true
149
+ success?: true
150
+ errorMessage?: true
151
+ durationMs?: true
152
+ createdAt?: true
153
+ _all?: true
154
+ }
155
+
156
+ export type AiUsageLogAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
157
+ /**
158
+ * Filter which AiUsageLog to aggregate.
159
+ */
160
+ where?: Prisma.AiUsageLogWhereInput
161
+ /**
162
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
163
+ *
164
+ * Determine the order of AiUsageLogs to fetch.
165
+ */
166
+ orderBy?: Prisma.AiUsageLogOrderByWithRelationInput | Prisma.AiUsageLogOrderByWithRelationInput[]
167
+ /**
168
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
169
+ *
170
+ * Sets the start position
171
+ */
172
+ cursor?: Prisma.AiUsageLogWhereUniqueInput
173
+ /**
174
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
175
+ *
176
+ * Take `±n` AiUsageLogs from the position of the cursor.
177
+ */
178
+ take?: number
179
+ /**
180
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
181
+ *
182
+ * Skip the first `n` AiUsageLogs.
183
+ */
184
+ skip?: number
185
+ /**
186
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
187
+ *
188
+ * Count returned AiUsageLogs
189
+ **/
190
+ _count?: true | AiUsageLogCountAggregateInputType
191
+ /**
192
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
193
+ *
194
+ * Select which fields to average
195
+ **/
196
+ _avg?: AiUsageLogAvgAggregateInputType
197
+ /**
198
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
199
+ *
200
+ * Select which fields to sum
201
+ **/
202
+ _sum?: AiUsageLogSumAggregateInputType
203
+ /**
204
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
205
+ *
206
+ * Select which fields to find the minimum value
207
+ **/
208
+ _min?: AiUsageLogMinAggregateInputType
209
+ /**
210
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
211
+ *
212
+ * Select which fields to find the maximum value
213
+ **/
214
+ _max?: AiUsageLogMaxAggregateInputType
215
+ }
216
+
217
+ export type GetAiUsageLogAggregateType<T extends AiUsageLogAggregateArgs> = {
218
+ [P in keyof T & keyof AggregateAiUsageLog]: P extends '_count' | 'count'
219
+ ? T[P] extends true
220
+ ? number
221
+ : Prisma.GetScalarType<T[P], AggregateAiUsageLog[P]>
222
+ : Prisma.GetScalarType<T[P], AggregateAiUsageLog[P]>
223
+ }
224
+
225
+
226
+
227
+
228
+ export type AiUsageLogGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
229
+ where?: Prisma.AiUsageLogWhereInput
230
+ orderBy?: Prisma.AiUsageLogOrderByWithAggregationInput | Prisma.AiUsageLogOrderByWithAggregationInput[]
231
+ by: Prisma.AiUsageLogScalarFieldEnum[] | Prisma.AiUsageLogScalarFieldEnum
232
+ having?: Prisma.AiUsageLogScalarWhereWithAggregatesInput
233
+ take?: number
234
+ skip?: number
235
+ _count?: AiUsageLogCountAggregateInputType | true
236
+ _avg?: AiUsageLogAvgAggregateInputType
237
+ _sum?: AiUsageLogSumAggregateInputType
238
+ _min?: AiUsageLogMinAggregateInputType
239
+ _max?: AiUsageLogMaxAggregateInputType
240
+ }
241
+
242
+ export type AiUsageLogGroupByOutputType = {
243
+ id: string
244
+ workspaceId: string
245
+ userId: string
246
+ source: string
247
+ provider: string
248
+ model: string
249
+ inputTokens: number
250
+ outputTokens: number
251
+ costUsd: runtime.Decimal | null
252
+ success: boolean
253
+ errorMessage: string | null
254
+ durationMs: number | null
255
+ createdAt: Date
256
+ _count: AiUsageLogCountAggregateOutputType | null
257
+ _avg: AiUsageLogAvgAggregateOutputType | null
258
+ _sum: AiUsageLogSumAggregateOutputType | null
259
+ _min: AiUsageLogMinAggregateOutputType | null
260
+ _max: AiUsageLogMaxAggregateOutputType | null
261
+ }
262
+
263
+ export type GetAiUsageLogGroupByPayload<T extends AiUsageLogGroupByArgs> = Prisma.PrismaPromise<
264
+ Array<
265
+ Prisma.PickEnumerable<AiUsageLogGroupByOutputType, T['by']> &
266
+ {
267
+ [P in ((keyof T) & (keyof AiUsageLogGroupByOutputType))]: P extends '_count'
268
+ ? T[P] extends boolean
269
+ ? number
270
+ : Prisma.GetScalarType<T[P], AiUsageLogGroupByOutputType[P]>
271
+ : Prisma.GetScalarType<T[P], AiUsageLogGroupByOutputType[P]>
272
+ }
273
+ >
274
+ >
275
+
276
+
277
+
278
+ export type AiUsageLogWhereInput = {
279
+ AND?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
280
+ OR?: Prisma.AiUsageLogWhereInput[]
281
+ NOT?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
282
+ id?: Prisma.StringFilter<"AiUsageLog"> | string
283
+ workspaceId?: Prisma.StringFilter<"AiUsageLog"> | string
284
+ userId?: Prisma.StringFilter<"AiUsageLog"> | string
285
+ source?: Prisma.StringFilter<"AiUsageLog"> | string
286
+ provider?: Prisma.StringFilter<"AiUsageLog"> | string
287
+ model?: Prisma.StringFilter<"AiUsageLog"> | string
288
+ inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
289
+ outputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
290
+ costUsd?: Prisma.DecimalNullableFilter<"AiUsageLog"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
291
+ success?: Prisma.BoolFilter<"AiUsageLog"> | boolean
292
+ errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
293
+ durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
294
+ createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
295
+ workspace?: Prisma.XOR<Prisma.WorkspaceScalarRelationFilter, Prisma.WorkspaceWhereInput>
296
+ user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
297
+ }
298
+
299
+ export type AiUsageLogOrderByWithRelationInput = {
300
+ id?: Prisma.SortOrder
301
+ workspaceId?: Prisma.SortOrder
302
+ userId?: Prisma.SortOrder
303
+ source?: Prisma.SortOrder
304
+ provider?: Prisma.SortOrder
305
+ model?: Prisma.SortOrder
306
+ inputTokens?: Prisma.SortOrder
307
+ outputTokens?: Prisma.SortOrder
308
+ costUsd?: Prisma.SortOrderInput | Prisma.SortOrder
309
+ success?: Prisma.SortOrder
310
+ errorMessage?: Prisma.SortOrderInput | Prisma.SortOrder
311
+ durationMs?: Prisma.SortOrderInput | Prisma.SortOrder
312
+ createdAt?: Prisma.SortOrder
313
+ workspace?: Prisma.WorkspaceOrderByWithRelationInput
314
+ user?: Prisma.UserOrderByWithRelationInput
315
+ }
316
+
317
+ export type AiUsageLogWhereUniqueInput = Prisma.AtLeast<{
318
+ id?: string
319
+ AND?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
320
+ OR?: Prisma.AiUsageLogWhereInput[]
321
+ NOT?: Prisma.AiUsageLogWhereInput | Prisma.AiUsageLogWhereInput[]
322
+ workspaceId?: Prisma.StringFilter<"AiUsageLog"> | string
323
+ userId?: Prisma.StringFilter<"AiUsageLog"> | string
324
+ source?: Prisma.StringFilter<"AiUsageLog"> | string
325
+ provider?: Prisma.StringFilter<"AiUsageLog"> | string
326
+ model?: Prisma.StringFilter<"AiUsageLog"> | string
327
+ inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
328
+ outputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
329
+ costUsd?: Prisma.DecimalNullableFilter<"AiUsageLog"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
330
+ success?: Prisma.BoolFilter<"AiUsageLog"> | boolean
331
+ errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
332
+ durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
333
+ createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
334
+ workspace?: Prisma.XOR<Prisma.WorkspaceScalarRelationFilter, Prisma.WorkspaceWhereInput>
335
+ user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
336
+ }, "id">
337
+
338
+ export type AiUsageLogOrderByWithAggregationInput = {
339
+ id?: Prisma.SortOrder
340
+ workspaceId?: Prisma.SortOrder
341
+ userId?: Prisma.SortOrder
342
+ source?: Prisma.SortOrder
343
+ provider?: Prisma.SortOrder
344
+ model?: Prisma.SortOrder
345
+ inputTokens?: Prisma.SortOrder
346
+ outputTokens?: Prisma.SortOrder
347
+ costUsd?: Prisma.SortOrderInput | Prisma.SortOrder
348
+ success?: Prisma.SortOrder
349
+ errorMessage?: Prisma.SortOrderInput | Prisma.SortOrder
350
+ durationMs?: Prisma.SortOrderInput | Prisma.SortOrder
351
+ createdAt?: Prisma.SortOrder
352
+ _count?: Prisma.AiUsageLogCountOrderByAggregateInput
353
+ _avg?: Prisma.AiUsageLogAvgOrderByAggregateInput
354
+ _max?: Prisma.AiUsageLogMaxOrderByAggregateInput
355
+ _min?: Prisma.AiUsageLogMinOrderByAggregateInput
356
+ _sum?: Prisma.AiUsageLogSumOrderByAggregateInput
357
+ }
358
+
359
+ export type AiUsageLogScalarWhereWithAggregatesInput = {
360
+ AND?: Prisma.AiUsageLogScalarWhereWithAggregatesInput | Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
361
+ OR?: Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
362
+ NOT?: Prisma.AiUsageLogScalarWhereWithAggregatesInput | Prisma.AiUsageLogScalarWhereWithAggregatesInput[]
363
+ id?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
364
+ workspaceId?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
365
+ userId?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
366
+ source?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
367
+ provider?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
368
+ model?: Prisma.StringWithAggregatesFilter<"AiUsageLog"> | string
369
+ inputTokens?: Prisma.IntWithAggregatesFilter<"AiUsageLog"> | number
370
+ outputTokens?: Prisma.IntWithAggregatesFilter<"AiUsageLog"> | number
371
+ costUsd?: Prisma.DecimalNullableWithAggregatesFilter<"AiUsageLog"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
372
+ success?: Prisma.BoolWithAggregatesFilter<"AiUsageLog"> | boolean
373
+ errorMessage?: Prisma.StringNullableWithAggregatesFilter<"AiUsageLog"> | string | null
374
+ durationMs?: Prisma.IntNullableWithAggregatesFilter<"AiUsageLog"> | number | null
375
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"AiUsageLog"> | Date | string
376
+ }
377
+
378
+ export type AiUsageLogCreateInput = {
379
+ id?: string
380
+ source?: string
381
+ provider: string
382
+ model: string
383
+ inputTokens?: number
384
+ outputTokens?: number
385
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
386
+ success?: boolean
387
+ errorMessage?: string | null
388
+ durationMs?: number | null
389
+ createdAt?: Date | string
390
+ workspace: Prisma.WorkspaceCreateNestedOneWithoutAiUsageLogsInput
391
+ user: Prisma.UserCreateNestedOneWithoutAiUsageLogsInput
392
+ }
393
+
394
+ export type AiUsageLogUncheckedCreateInput = {
395
+ id?: string
396
+ workspaceId: string
397
+ userId: string
398
+ source?: string
399
+ provider: string
400
+ model: string
401
+ inputTokens?: number
402
+ outputTokens?: number
403
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
404
+ success?: boolean
405
+ errorMessage?: string | null
406
+ durationMs?: number | null
407
+ createdAt?: Date | string
408
+ }
409
+
410
+ export type AiUsageLogUpdateInput = {
411
+ id?: Prisma.StringFieldUpdateOperationsInput | string
412
+ source?: Prisma.StringFieldUpdateOperationsInput | string
413
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
414
+ model?: Prisma.StringFieldUpdateOperationsInput | string
415
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
416
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
417
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
418
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
419
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
420
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
421
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
422
+ workspace?: Prisma.WorkspaceUpdateOneRequiredWithoutAiUsageLogsNestedInput
423
+ user?: Prisma.UserUpdateOneRequiredWithoutAiUsageLogsNestedInput
424
+ }
425
+
426
+ export type AiUsageLogUncheckedUpdateInput = {
427
+ id?: Prisma.StringFieldUpdateOperationsInput | string
428
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
429
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
430
+ source?: Prisma.StringFieldUpdateOperationsInput | string
431
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
432
+ model?: Prisma.StringFieldUpdateOperationsInput | string
433
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
434
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
435
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
436
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
437
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
438
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
439
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
440
+ }
441
+
442
+ export type AiUsageLogCreateManyInput = {
443
+ id?: string
444
+ workspaceId: string
445
+ userId: string
446
+ source?: string
447
+ provider: string
448
+ model: string
449
+ inputTokens?: number
450
+ outputTokens?: number
451
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
452
+ success?: boolean
453
+ errorMessage?: string | null
454
+ durationMs?: number | null
455
+ createdAt?: Date | string
456
+ }
457
+
458
+ export type AiUsageLogUpdateManyMutationInput = {
459
+ id?: Prisma.StringFieldUpdateOperationsInput | string
460
+ source?: Prisma.StringFieldUpdateOperationsInput | string
461
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
462
+ model?: Prisma.StringFieldUpdateOperationsInput | string
463
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
464
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
465
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
466
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
467
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
468
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
469
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
470
+ }
471
+
472
+ export type AiUsageLogUncheckedUpdateManyInput = {
473
+ id?: Prisma.StringFieldUpdateOperationsInput | string
474
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
475
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
476
+ source?: Prisma.StringFieldUpdateOperationsInput | string
477
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
478
+ model?: Prisma.StringFieldUpdateOperationsInput | string
479
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
480
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
481
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
482
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
483
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
484
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
485
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
486
+ }
487
+
488
+ export type AiUsageLogListRelationFilter = {
489
+ every?: Prisma.AiUsageLogWhereInput
490
+ some?: Prisma.AiUsageLogWhereInput
491
+ none?: Prisma.AiUsageLogWhereInput
492
+ }
493
+
494
+ export type AiUsageLogOrderByRelationAggregateInput = {
495
+ _count?: Prisma.SortOrder
496
+ }
497
+
498
+ export type AiUsageLogCountOrderByAggregateInput = {
499
+ id?: Prisma.SortOrder
500
+ workspaceId?: Prisma.SortOrder
501
+ userId?: Prisma.SortOrder
502
+ source?: Prisma.SortOrder
503
+ provider?: Prisma.SortOrder
504
+ model?: Prisma.SortOrder
505
+ inputTokens?: Prisma.SortOrder
506
+ outputTokens?: Prisma.SortOrder
507
+ costUsd?: Prisma.SortOrder
508
+ success?: Prisma.SortOrder
509
+ errorMessage?: Prisma.SortOrder
510
+ durationMs?: Prisma.SortOrder
511
+ createdAt?: Prisma.SortOrder
512
+ }
513
+
514
+ export type AiUsageLogAvgOrderByAggregateInput = {
515
+ inputTokens?: Prisma.SortOrder
516
+ outputTokens?: Prisma.SortOrder
517
+ costUsd?: Prisma.SortOrder
518
+ durationMs?: Prisma.SortOrder
519
+ }
520
+
521
+ export type AiUsageLogMaxOrderByAggregateInput = {
522
+ id?: Prisma.SortOrder
523
+ workspaceId?: Prisma.SortOrder
524
+ userId?: Prisma.SortOrder
525
+ source?: Prisma.SortOrder
526
+ provider?: Prisma.SortOrder
527
+ model?: Prisma.SortOrder
528
+ inputTokens?: Prisma.SortOrder
529
+ outputTokens?: Prisma.SortOrder
530
+ costUsd?: Prisma.SortOrder
531
+ success?: Prisma.SortOrder
532
+ errorMessage?: Prisma.SortOrder
533
+ durationMs?: Prisma.SortOrder
534
+ createdAt?: Prisma.SortOrder
535
+ }
536
+
537
+ export type AiUsageLogMinOrderByAggregateInput = {
538
+ id?: Prisma.SortOrder
539
+ workspaceId?: Prisma.SortOrder
540
+ userId?: Prisma.SortOrder
541
+ source?: Prisma.SortOrder
542
+ provider?: Prisma.SortOrder
543
+ model?: Prisma.SortOrder
544
+ inputTokens?: Prisma.SortOrder
545
+ outputTokens?: Prisma.SortOrder
546
+ costUsd?: Prisma.SortOrder
547
+ success?: Prisma.SortOrder
548
+ errorMessage?: Prisma.SortOrder
549
+ durationMs?: Prisma.SortOrder
550
+ createdAt?: Prisma.SortOrder
551
+ }
552
+
553
+ export type AiUsageLogSumOrderByAggregateInput = {
554
+ inputTokens?: Prisma.SortOrder
555
+ outputTokens?: Prisma.SortOrder
556
+ costUsd?: Prisma.SortOrder
557
+ durationMs?: Prisma.SortOrder
558
+ }
559
+
560
+ export type AiUsageLogCreateNestedManyWithoutUserInput = {
561
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutUserInput, Prisma.AiUsageLogUncheckedCreateWithoutUserInput> | Prisma.AiUsageLogCreateWithoutUserInput[] | Prisma.AiUsageLogUncheckedCreateWithoutUserInput[]
562
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutUserInput | Prisma.AiUsageLogCreateOrConnectWithoutUserInput[]
563
+ createMany?: Prisma.AiUsageLogCreateManyUserInputEnvelope
564
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
565
+ }
566
+
567
+ export type AiUsageLogUncheckedCreateNestedManyWithoutUserInput = {
568
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutUserInput, Prisma.AiUsageLogUncheckedCreateWithoutUserInput> | Prisma.AiUsageLogCreateWithoutUserInput[] | Prisma.AiUsageLogUncheckedCreateWithoutUserInput[]
569
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutUserInput | Prisma.AiUsageLogCreateOrConnectWithoutUserInput[]
570
+ createMany?: Prisma.AiUsageLogCreateManyUserInputEnvelope
571
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
572
+ }
573
+
574
+ export type AiUsageLogUpdateManyWithoutUserNestedInput = {
575
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutUserInput, Prisma.AiUsageLogUncheckedCreateWithoutUserInput> | Prisma.AiUsageLogCreateWithoutUserInput[] | Prisma.AiUsageLogUncheckedCreateWithoutUserInput[]
576
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutUserInput | Prisma.AiUsageLogCreateOrConnectWithoutUserInput[]
577
+ upsert?: Prisma.AiUsageLogUpsertWithWhereUniqueWithoutUserInput | Prisma.AiUsageLogUpsertWithWhereUniqueWithoutUserInput[]
578
+ createMany?: Prisma.AiUsageLogCreateManyUserInputEnvelope
579
+ set?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
580
+ disconnect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
581
+ delete?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
582
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
583
+ update?: Prisma.AiUsageLogUpdateWithWhereUniqueWithoutUserInput | Prisma.AiUsageLogUpdateWithWhereUniqueWithoutUserInput[]
584
+ updateMany?: Prisma.AiUsageLogUpdateManyWithWhereWithoutUserInput | Prisma.AiUsageLogUpdateManyWithWhereWithoutUserInput[]
585
+ deleteMany?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
586
+ }
587
+
588
+ export type AiUsageLogUncheckedUpdateManyWithoutUserNestedInput = {
589
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutUserInput, Prisma.AiUsageLogUncheckedCreateWithoutUserInput> | Prisma.AiUsageLogCreateWithoutUserInput[] | Prisma.AiUsageLogUncheckedCreateWithoutUserInput[]
590
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutUserInput | Prisma.AiUsageLogCreateOrConnectWithoutUserInput[]
591
+ upsert?: Prisma.AiUsageLogUpsertWithWhereUniqueWithoutUserInput | Prisma.AiUsageLogUpsertWithWhereUniqueWithoutUserInput[]
592
+ createMany?: Prisma.AiUsageLogCreateManyUserInputEnvelope
593
+ set?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
594
+ disconnect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
595
+ delete?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
596
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
597
+ update?: Prisma.AiUsageLogUpdateWithWhereUniqueWithoutUserInput | Prisma.AiUsageLogUpdateWithWhereUniqueWithoutUserInput[]
598
+ updateMany?: Prisma.AiUsageLogUpdateManyWithWhereWithoutUserInput | Prisma.AiUsageLogUpdateManyWithWhereWithoutUserInput[]
599
+ deleteMany?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
600
+ }
601
+
602
+ export type AiUsageLogCreateNestedManyWithoutWorkspaceInput = {
603
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput> | Prisma.AiUsageLogCreateWithoutWorkspaceInput[] | Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput[]
604
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput | Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput[]
605
+ createMany?: Prisma.AiUsageLogCreateManyWorkspaceInputEnvelope
606
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
607
+ }
608
+
609
+ export type AiUsageLogUncheckedCreateNestedManyWithoutWorkspaceInput = {
610
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput> | Prisma.AiUsageLogCreateWithoutWorkspaceInput[] | Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput[]
611
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput | Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput[]
612
+ createMany?: Prisma.AiUsageLogCreateManyWorkspaceInputEnvelope
613
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
614
+ }
615
+
616
+ export type AiUsageLogUpdateManyWithoutWorkspaceNestedInput = {
617
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput> | Prisma.AiUsageLogCreateWithoutWorkspaceInput[] | Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput[]
618
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput | Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput[]
619
+ upsert?: Prisma.AiUsageLogUpsertWithWhereUniqueWithoutWorkspaceInput | Prisma.AiUsageLogUpsertWithWhereUniqueWithoutWorkspaceInput[]
620
+ createMany?: Prisma.AiUsageLogCreateManyWorkspaceInputEnvelope
621
+ set?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
622
+ disconnect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
623
+ delete?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
624
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
625
+ update?: Prisma.AiUsageLogUpdateWithWhereUniqueWithoutWorkspaceInput | Prisma.AiUsageLogUpdateWithWhereUniqueWithoutWorkspaceInput[]
626
+ updateMany?: Prisma.AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput | Prisma.AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput[]
627
+ deleteMany?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
628
+ }
629
+
630
+ export type AiUsageLogUncheckedUpdateManyWithoutWorkspaceNestedInput = {
631
+ create?: Prisma.XOR<Prisma.AiUsageLogCreateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput> | Prisma.AiUsageLogCreateWithoutWorkspaceInput[] | Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput[]
632
+ connectOrCreate?: Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput | Prisma.AiUsageLogCreateOrConnectWithoutWorkspaceInput[]
633
+ upsert?: Prisma.AiUsageLogUpsertWithWhereUniqueWithoutWorkspaceInput | Prisma.AiUsageLogUpsertWithWhereUniqueWithoutWorkspaceInput[]
634
+ createMany?: Prisma.AiUsageLogCreateManyWorkspaceInputEnvelope
635
+ set?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
636
+ disconnect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
637
+ delete?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
638
+ connect?: Prisma.AiUsageLogWhereUniqueInput | Prisma.AiUsageLogWhereUniqueInput[]
639
+ update?: Prisma.AiUsageLogUpdateWithWhereUniqueWithoutWorkspaceInput | Prisma.AiUsageLogUpdateWithWhereUniqueWithoutWorkspaceInput[]
640
+ updateMany?: Prisma.AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput | Prisma.AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput[]
641
+ deleteMany?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
642
+ }
643
+
644
+ export type NullableDecimalFieldUpdateOperationsInput = {
645
+ set?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
646
+ increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
647
+ decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
648
+ multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
649
+ divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
650
+ }
651
+
652
+ export type AiUsageLogCreateWithoutUserInput = {
653
+ id?: string
654
+ source?: string
655
+ provider: string
656
+ model: string
657
+ inputTokens?: number
658
+ outputTokens?: number
659
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
660
+ success?: boolean
661
+ errorMessage?: string | null
662
+ durationMs?: number | null
663
+ createdAt?: Date | string
664
+ workspace: Prisma.WorkspaceCreateNestedOneWithoutAiUsageLogsInput
665
+ }
666
+
667
+ export type AiUsageLogUncheckedCreateWithoutUserInput = {
668
+ id?: string
669
+ workspaceId: string
670
+ source?: string
671
+ provider: string
672
+ model: string
673
+ inputTokens?: number
674
+ outputTokens?: number
675
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
676
+ success?: boolean
677
+ errorMessage?: string | null
678
+ durationMs?: number | null
679
+ createdAt?: Date | string
680
+ }
681
+
682
+ export type AiUsageLogCreateOrConnectWithoutUserInput = {
683
+ where: Prisma.AiUsageLogWhereUniqueInput
684
+ create: Prisma.XOR<Prisma.AiUsageLogCreateWithoutUserInput, Prisma.AiUsageLogUncheckedCreateWithoutUserInput>
685
+ }
686
+
687
+ export type AiUsageLogCreateManyUserInputEnvelope = {
688
+ data: Prisma.AiUsageLogCreateManyUserInput | Prisma.AiUsageLogCreateManyUserInput[]
689
+ skipDuplicates?: boolean
690
+ }
691
+
692
+ export type AiUsageLogUpsertWithWhereUniqueWithoutUserInput = {
693
+ where: Prisma.AiUsageLogWhereUniqueInput
694
+ update: Prisma.XOR<Prisma.AiUsageLogUpdateWithoutUserInput, Prisma.AiUsageLogUncheckedUpdateWithoutUserInput>
695
+ create: Prisma.XOR<Prisma.AiUsageLogCreateWithoutUserInput, Prisma.AiUsageLogUncheckedCreateWithoutUserInput>
696
+ }
697
+
698
+ export type AiUsageLogUpdateWithWhereUniqueWithoutUserInput = {
699
+ where: Prisma.AiUsageLogWhereUniqueInput
700
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateWithoutUserInput, Prisma.AiUsageLogUncheckedUpdateWithoutUserInput>
701
+ }
702
+
703
+ export type AiUsageLogUpdateManyWithWhereWithoutUserInput = {
704
+ where: Prisma.AiUsageLogScalarWhereInput
705
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateManyMutationInput, Prisma.AiUsageLogUncheckedUpdateManyWithoutUserInput>
706
+ }
707
+
708
+ export type AiUsageLogScalarWhereInput = {
709
+ AND?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
710
+ OR?: Prisma.AiUsageLogScalarWhereInput[]
711
+ NOT?: Prisma.AiUsageLogScalarWhereInput | Prisma.AiUsageLogScalarWhereInput[]
712
+ id?: Prisma.StringFilter<"AiUsageLog"> | string
713
+ workspaceId?: Prisma.StringFilter<"AiUsageLog"> | string
714
+ userId?: Prisma.StringFilter<"AiUsageLog"> | string
715
+ source?: Prisma.StringFilter<"AiUsageLog"> | string
716
+ provider?: Prisma.StringFilter<"AiUsageLog"> | string
717
+ model?: Prisma.StringFilter<"AiUsageLog"> | string
718
+ inputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
719
+ outputTokens?: Prisma.IntFilter<"AiUsageLog"> | number
720
+ costUsd?: Prisma.DecimalNullableFilter<"AiUsageLog"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
721
+ success?: Prisma.BoolFilter<"AiUsageLog"> | boolean
722
+ errorMessage?: Prisma.StringNullableFilter<"AiUsageLog"> | string | null
723
+ durationMs?: Prisma.IntNullableFilter<"AiUsageLog"> | number | null
724
+ createdAt?: Prisma.DateTimeFilter<"AiUsageLog"> | Date | string
725
+ }
726
+
727
+ export type AiUsageLogCreateWithoutWorkspaceInput = {
728
+ id?: string
729
+ source?: string
730
+ provider: string
731
+ model: string
732
+ inputTokens?: number
733
+ outputTokens?: number
734
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
735
+ success?: boolean
736
+ errorMessage?: string | null
737
+ durationMs?: number | null
738
+ createdAt?: Date | string
739
+ user: Prisma.UserCreateNestedOneWithoutAiUsageLogsInput
740
+ }
741
+
742
+ export type AiUsageLogUncheckedCreateWithoutWorkspaceInput = {
743
+ id?: string
744
+ userId: string
745
+ source?: string
746
+ provider: string
747
+ model: string
748
+ inputTokens?: number
749
+ outputTokens?: number
750
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
751
+ success?: boolean
752
+ errorMessage?: string | null
753
+ durationMs?: number | null
754
+ createdAt?: Date | string
755
+ }
756
+
757
+ export type AiUsageLogCreateOrConnectWithoutWorkspaceInput = {
758
+ where: Prisma.AiUsageLogWhereUniqueInput
759
+ create: Prisma.XOR<Prisma.AiUsageLogCreateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput>
760
+ }
761
+
762
+ export type AiUsageLogCreateManyWorkspaceInputEnvelope = {
763
+ data: Prisma.AiUsageLogCreateManyWorkspaceInput | Prisma.AiUsageLogCreateManyWorkspaceInput[]
764
+ skipDuplicates?: boolean
765
+ }
766
+
767
+ export type AiUsageLogUpsertWithWhereUniqueWithoutWorkspaceInput = {
768
+ where: Prisma.AiUsageLogWhereUniqueInput
769
+ update: Prisma.XOR<Prisma.AiUsageLogUpdateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedUpdateWithoutWorkspaceInput>
770
+ create: Prisma.XOR<Prisma.AiUsageLogCreateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedCreateWithoutWorkspaceInput>
771
+ }
772
+
773
+ export type AiUsageLogUpdateWithWhereUniqueWithoutWorkspaceInput = {
774
+ where: Prisma.AiUsageLogWhereUniqueInput
775
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateWithoutWorkspaceInput, Prisma.AiUsageLogUncheckedUpdateWithoutWorkspaceInput>
776
+ }
777
+
778
+ export type AiUsageLogUpdateManyWithWhereWithoutWorkspaceInput = {
779
+ where: Prisma.AiUsageLogScalarWhereInput
780
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateManyMutationInput, Prisma.AiUsageLogUncheckedUpdateManyWithoutWorkspaceInput>
781
+ }
782
+
783
+ export type AiUsageLogCreateManyUserInput = {
784
+ id?: string
785
+ workspaceId: string
786
+ source?: string
787
+ provider: string
788
+ model: string
789
+ inputTokens?: number
790
+ outputTokens?: number
791
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
792
+ success?: boolean
793
+ errorMessage?: string | null
794
+ durationMs?: number | null
795
+ createdAt?: Date | string
796
+ }
797
+
798
+ export type AiUsageLogUpdateWithoutUserInput = {
799
+ id?: Prisma.StringFieldUpdateOperationsInput | string
800
+ source?: Prisma.StringFieldUpdateOperationsInput | string
801
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
802
+ model?: Prisma.StringFieldUpdateOperationsInput | string
803
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
804
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
805
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
806
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
807
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
808
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
809
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
810
+ workspace?: Prisma.WorkspaceUpdateOneRequiredWithoutAiUsageLogsNestedInput
811
+ }
812
+
813
+ export type AiUsageLogUncheckedUpdateWithoutUserInput = {
814
+ id?: Prisma.StringFieldUpdateOperationsInput | string
815
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
816
+ source?: Prisma.StringFieldUpdateOperationsInput | string
817
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
818
+ model?: Prisma.StringFieldUpdateOperationsInput | string
819
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
820
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
821
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
822
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
823
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
824
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
825
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
826
+ }
827
+
828
+ export type AiUsageLogUncheckedUpdateManyWithoutUserInput = {
829
+ id?: Prisma.StringFieldUpdateOperationsInput | string
830
+ workspaceId?: Prisma.StringFieldUpdateOperationsInput | string
831
+ source?: Prisma.StringFieldUpdateOperationsInput | string
832
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
833
+ model?: Prisma.StringFieldUpdateOperationsInput | string
834
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
835
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
836
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
837
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
838
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
839
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
840
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
841
+ }
842
+
843
+ export type AiUsageLogCreateManyWorkspaceInput = {
844
+ id?: string
845
+ userId: string
846
+ source?: string
847
+ provider: string
848
+ model: string
849
+ inputTokens?: number
850
+ outputTokens?: number
851
+ costUsd?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
852
+ success?: boolean
853
+ errorMessage?: string | null
854
+ durationMs?: number | null
855
+ createdAt?: Date | string
856
+ }
857
+
858
+ export type AiUsageLogUpdateWithoutWorkspaceInput = {
859
+ id?: Prisma.StringFieldUpdateOperationsInput | string
860
+ source?: Prisma.StringFieldUpdateOperationsInput | string
861
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
862
+ model?: Prisma.StringFieldUpdateOperationsInput | string
863
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
864
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
865
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
866
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
867
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
868
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
869
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
870
+ user?: Prisma.UserUpdateOneRequiredWithoutAiUsageLogsNestedInput
871
+ }
872
+
873
+ export type AiUsageLogUncheckedUpdateWithoutWorkspaceInput = {
874
+ id?: Prisma.StringFieldUpdateOperationsInput | string
875
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
876
+ source?: Prisma.StringFieldUpdateOperationsInput | string
877
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
878
+ model?: Prisma.StringFieldUpdateOperationsInput | string
879
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
880
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
881
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
882
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
883
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
884
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
885
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
886
+ }
887
+
888
+ export type AiUsageLogUncheckedUpdateManyWithoutWorkspaceInput = {
889
+ id?: Prisma.StringFieldUpdateOperationsInput | string
890
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
891
+ source?: Prisma.StringFieldUpdateOperationsInput | string
892
+ provider?: Prisma.StringFieldUpdateOperationsInput | string
893
+ model?: Prisma.StringFieldUpdateOperationsInput | string
894
+ inputTokens?: Prisma.IntFieldUpdateOperationsInput | number
895
+ outputTokens?: Prisma.IntFieldUpdateOperationsInput | number
896
+ costUsd?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
897
+ success?: Prisma.BoolFieldUpdateOperationsInput | boolean
898
+ errorMessage?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
899
+ durationMs?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
900
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
901
+ }
902
+
903
+
904
+
905
+ export type AiUsageLogSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
906
+ id?: boolean
907
+ workspaceId?: boolean
908
+ userId?: boolean
909
+ source?: boolean
910
+ provider?: boolean
911
+ model?: boolean
912
+ inputTokens?: boolean
913
+ outputTokens?: boolean
914
+ costUsd?: boolean
915
+ success?: boolean
916
+ errorMessage?: boolean
917
+ durationMs?: boolean
918
+ createdAt?: boolean
919
+ workspace?: boolean | Prisma.WorkspaceDefaultArgs<ExtArgs>
920
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
921
+ }, ExtArgs["result"]["aiUsageLog"]>
922
+
923
+ export type AiUsageLogSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
924
+ id?: boolean
925
+ workspaceId?: boolean
926
+ userId?: boolean
927
+ source?: boolean
928
+ provider?: boolean
929
+ model?: boolean
930
+ inputTokens?: boolean
931
+ outputTokens?: boolean
932
+ costUsd?: boolean
933
+ success?: boolean
934
+ errorMessage?: boolean
935
+ durationMs?: boolean
936
+ createdAt?: boolean
937
+ workspace?: boolean | Prisma.WorkspaceDefaultArgs<ExtArgs>
938
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
939
+ }, ExtArgs["result"]["aiUsageLog"]>
940
+
941
+ export type AiUsageLogSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
942
+ id?: boolean
943
+ workspaceId?: boolean
944
+ userId?: boolean
945
+ source?: boolean
946
+ provider?: boolean
947
+ model?: boolean
948
+ inputTokens?: boolean
949
+ outputTokens?: boolean
950
+ costUsd?: boolean
951
+ success?: boolean
952
+ errorMessage?: boolean
953
+ durationMs?: boolean
954
+ createdAt?: boolean
955
+ workspace?: boolean | Prisma.WorkspaceDefaultArgs<ExtArgs>
956
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
957
+ }, ExtArgs["result"]["aiUsageLog"]>
958
+
959
+ export type AiUsageLogSelectScalar = {
960
+ id?: boolean
961
+ workspaceId?: boolean
962
+ userId?: boolean
963
+ source?: boolean
964
+ provider?: boolean
965
+ model?: boolean
966
+ inputTokens?: boolean
967
+ outputTokens?: boolean
968
+ costUsd?: boolean
969
+ success?: boolean
970
+ errorMessage?: boolean
971
+ durationMs?: boolean
972
+ createdAt?: boolean
973
+ }
974
+
975
+ export type AiUsageLogOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "workspaceId" | "userId" | "source" | "provider" | "model" | "inputTokens" | "outputTokens" | "costUsd" | "success" | "errorMessage" | "durationMs" | "createdAt", ExtArgs["result"]["aiUsageLog"]>
976
+ export type AiUsageLogInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
977
+ workspace?: boolean | Prisma.WorkspaceDefaultArgs<ExtArgs>
978
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
979
+ }
980
+ export type AiUsageLogIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
981
+ workspace?: boolean | Prisma.WorkspaceDefaultArgs<ExtArgs>
982
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
983
+ }
984
+ export type AiUsageLogIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
985
+ workspace?: boolean | Prisma.WorkspaceDefaultArgs<ExtArgs>
986
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
987
+ }
988
+
989
+ export type $AiUsageLogPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
990
+ name: "AiUsageLog"
991
+ objects: {
992
+ workspace: Prisma.$WorkspacePayload<ExtArgs>
993
+ user: Prisma.$UserPayload<ExtArgs>
994
+ }
995
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
996
+ id: string
997
+ workspaceId: string
998
+ userId: string
999
+ source: string
1000
+ provider: string
1001
+ model: string
1002
+ inputTokens: number
1003
+ outputTokens: number
1004
+ costUsd: runtime.Decimal | null
1005
+ success: boolean
1006
+ errorMessage: string | null
1007
+ durationMs: number | null
1008
+ createdAt: Date
1009
+ }, ExtArgs["result"]["aiUsageLog"]>
1010
+ composites: {}
1011
+ }
1012
+
1013
+ export type AiUsageLogGetPayload<S extends boolean | null | undefined | AiUsageLogDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload, S>
1014
+
1015
+ export type AiUsageLogCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
1016
+ Omit<AiUsageLogFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
1017
+ select?: AiUsageLogCountAggregateInputType | true
1018
+ }
1019
+
1020
+ export interface AiUsageLogDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
1021
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['AiUsageLog'], meta: { name: 'AiUsageLog' } }
1022
+ /**
1023
+ * Find zero or one AiUsageLog that matches the filter.
1024
+ * @param {AiUsageLogFindUniqueArgs} args - Arguments to find a AiUsageLog
1025
+ * @example
1026
+ * // Get one AiUsageLog
1027
+ * const aiUsageLog = await prisma.aiUsageLog.findUnique({
1028
+ * where: {
1029
+ * // ... provide filter here
1030
+ * }
1031
+ * })
1032
+ */
1033
+ findUnique<T extends AiUsageLogFindUniqueArgs>(args: Prisma.SelectSubset<T, AiUsageLogFindUniqueArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
1034
+
1035
+ /**
1036
+ * Find one AiUsageLog that matches the filter or throw an error with `error.code='P2025'`
1037
+ * if no matches were found.
1038
+ * @param {AiUsageLogFindUniqueOrThrowArgs} args - Arguments to find a AiUsageLog
1039
+ * @example
1040
+ * // Get one AiUsageLog
1041
+ * const aiUsageLog = await prisma.aiUsageLog.findUniqueOrThrow({
1042
+ * where: {
1043
+ * // ... provide filter here
1044
+ * }
1045
+ * })
1046
+ */
1047
+ findUniqueOrThrow<T extends AiUsageLogFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, AiUsageLogFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1048
+
1049
+ /**
1050
+ * Find the first AiUsageLog that matches the filter.
1051
+ * Note, that providing `undefined` is treated as the value not being there.
1052
+ * Read more here: https://pris.ly/d/null-undefined
1053
+ * @param {AiUsageLogFindFirstArgs} args - Arguments to find a AiUsageLog
1054
+ * @example
1055
+ * // Get one AiUsageLog
1056
+ * const aiUsageLog = await prisma.aiUsageLog.findFirst({
1057
+ * where: {
1058
+ * // ... provide filter here
1059
+ * }
1060
+ * })
1061
+ */
1062
+ findFirst<T extends AiUsageLogFindFirstArgs>(args?: Prisma.SelectSubset<T, AiUsageLogFindFirstArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
1063
+
1064
+ /**
1065
+ * Find the first AiUsageLog that matches the filter or
1066
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
1067
+ * Note, that providing `undefined` is treated as the value not being there.
1068
+ * Read more here: https://pris.ly/d/null-undefined
1069
+ * @param {AiUsageLogFindFirstOrThrowArgs} args - Arguments to find a AiUsageLog
1070
+ * @example
1071
+ * // Get one AiUsageLog
1072
+ * const aiUsageLog = await prisma.aiUsageLog.findFirstOrThrow({
1073
+ * where: {
1074
+ * // ... provide filter here
1075
+ * }
1076
+ * })
1077
+ */
1078
+ findFirstOrThrow<T extends AiUsageLogFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, AiUsageLogFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1079
+
1080
+ /**
1081
+ * Find zero or more AiUsageLogs that matches the filter.
1082
+ * Note, that providing `undefined` is treated as the value not being there.
1083
+ * Read more here: https://pris.ly/d/null-undefined
1084
+ * @param {AiUsageLogFindManyArgs} args - Arguments to filter and select certain fields only.
1085
+ * @example
1086
+ * // Get all AiUsageLogs
1087
+ * const aiUsageLogs = await prisma.aiUsageLog.findMany()
1088
+ *
1089
+ * // Get first 10 AiUsageLogs
1090
+ * const aiUsageLogs = await prisma.aiUsageLog.findMany({ take: 10 })
1091
+ *
1092
+ * // Only select the `id`
1093
+ * const aiUsageLogWithIdOnly = await prisma.aiUsageLog.findMany({ select: { id: true } })
1094
+ *
1095
+ */
1096
+ findMany<T extends AiUsageLogFindManyArgs>(args?: Prisma.SelectSubset<T, AiUsageLogFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
1097
+
1098
+ /**
1099
+ * Create a AiUsageLog.
1100
+ * @param {AiUsageLogCreateArgs} args - Arguments to create a AiUsageLog.
1101
+ * @example
1102
+ * // Create one AiUsageLog
1103
+ * const AiUsageLog = await prisma.aiUsageLog.create({
1104
+ * data: {
1105
+ * // ... data to create a AiUsageLog
1106
+ * }
1107
+ * })
1108
+ *
1109
+ */
1110
+ create<T extends AiUsageLogCreateArgs>(args: Prisma.SelectSubset<T, AiUsageLogCreateArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1111
+
1112
+ /**
1113
+ * Create many AiUsageLogs.
1114
+ * @param {AiUsageLogCreateManyArgs} args - Arguments to create many AiUsageLogs.
1115
+ * @example
1116
+ * // Create many AiUsageLogs
1117
+ * const aiUsageLog = await prisma.aiUsageLog.createMany({
1118
+ * data: [
1119
+ * // ... provide data here
1120
+ * ]
1121
+ * })
1122
+ *
1123
+ */
1124
+ createMany<T extends AiUsageLogCreateManyArgs>(args?: Prisma.SelectSubset<T, AiUsageLogCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
1125
+
1126
+ /**
1127
+ * Create many AiUsageLogs and returns the data saved in the database.
1128
+ * @param {AiUsageLogCreateManyAndReturnArgs} args - Arguments to create many AiUsageLogs.
1129
+ * @example
1130
+ * // Create many AiUsageLogs
1131
+ * const aiUsageLog = await prisma.aiUsageLog.createManyAndReturn({
1132
+ * data: [
1133
+ * // ... provide data here
1134
+ * ]
1135
+ * })
1136
+ *
1137
+ * // Create many AiUsageLogs and only return the `id`
1138
+ * const aiUsageLogWithIdOnly = await prisma.aiUsageLog.createManyAndReturn({
1139
+ * select: { id: true },
1140
+ * data: [
1141
+ * // ... provide data here
1142
+ * ]
1143
+ * })
1144
+ * Note, that providing `undefined` is treated as the value not being there.
1145
+ * Read more here: https://pris.ly/d/null-undefined
1146
+ *
1147
+ */
1148
+ createManyAndReturn<T extends AiUsageLogCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, AiUsageLogCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
1149
+
1150
+ /**
1151
+ * Delete a AiUsageLog.
1152
+ * @param {AiUsageLogDeleteArgs} args - Arguments to delete one AiUsageLog.
1153
+ * @example
1154
+ * // Delete one AiUsageLog
1155
+ * const AiUsageLog = await prisma.aiUsageLog.delete({
1156
+ * where: {
1157
+ * // ... filter to delete one AiUsageLog
1158
+ * }
1159
+ * })
1160
+ *
1161
+ */
1162
+ delete<T extends AiUsageLogDeleteArgs>(args: Prisma.SelectSubset<T, AiUsageLogDeleteArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1163
+
1164
+ /**
1165
+ * Update one AiUsageLog.
1166
+ * @param {AiUsageLogUpdateArgs} args - Arguments to update one AiUsageLog.
1167
+ * @example
1168
+ * // Update one AiUsageLog
1169
+ * const aiUsageLog = await prisma.aiUsageLog.update({
1170
+ * where: {
1171
+ * // ... provide filter here
1172
+ * },
1173
+ * data: {
1174
+ * // ... provide data here
1175
+ * }
1176
+ * })
1177
+ *
1178
+ */
1179
+ update<T extends AiUsageLogUpdateArgs>(args: Prisma.SelectSubset<T, AiUsageLogUpdateArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1180
+
1181
+ /**
1182
+ * Delete zero or more AiUsageLogs.
1183
+ * @param {AiUsageLogDeleteManyArgs} args - Arguments to filter AiUsageLogs to delete.
1184
+ * @example
1185
+ * // Delete a few AiUsageLogs
1186
+ * const { count } = await prisma.aiUsageLog.deleteMany({
1187
+ * where: {
1188
+ * // ... provide filter here
1189
+ * }
1190
+ * })
1191
+ *
1192
+ */
1193
+ deleteMany<T extends AiUsageLogDeleteManyArgs>(args?: Prisma.SelectSubset<T, AiUsageLogDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
1194
+
1195
+ /**
1196
+ * Update zero or more AiUsageLogs.
1197
+ * Note, that providing `undefined` is treated as the value not being there.
1198
+ * Read more here: https://pris.ly/d/null-undefined
1199
+ * @param {AiUsageLogUpdateManyArgs} args - Arguments to update one or more rows.
1200
+ * @example
1201
+ * // Update many AiUsageLogs
1202
+ * const aiUsageLog = await prisma.aiUsageLog.updateMany({
1203
+ * where: {
1204
+ * // ... provide filter here
1205
+ * },
1206
+ * data: {
1207
+ * // ... provide data here
1208
+ * }
1209
+ * })
1210
+ *
1211
+ */
1212
+ updateMany<T extends AiUsageLogUpdateManyArgs>(args: Prisma.SelectSubset<T, AiUsageLogUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
1213
+
1214
+ /**
1215
+ * Update zero or more AiUsageLogs and returns the data updated in the database.
1216
+ * @param {AiUsageLogUpdateManyAndReturnArgs} args - Arguments to update many AiUsageLogs.
1217
+ * @example
1218
+ * // Update many AiUsageLogs
1219
+ * const aiUsageLog = await prisma.aiUsageLog.updateManyAndReturn({
1220
+ * where: {
1221
+ * // ... provide filter here
1222
+ * },
1223
+ * data: [
1224
+ * // ... provide data here
1225
+ * ]
1226
+ * })
1227
+ *
1228
+ * // Update zero or more AiUsageLogs and only return the `id`
1229
+ * const aiUsageLogWithIdOnly = await prisma.aiUsageLog.updateManyAndReturn({
1230
+ * select: { id: true },
1231
+ * where: {
1232
+ * // ... provide filter here
1233
+ * },
1234
+ * data: [
1235
+ * // ... provide data here
1236
+ * ]
1237
+ * })
1238
+ * Note, that providing `undefined` is treated as the value not being there.
1239
+ * Read more here: https://pris.ly/d/null-undefined
1240
+ *
1241
+ */
1242
+ updateManyAndReturn<T extends AiUsageLogUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, AiUsageLogUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
1243
+
1244
+ /**
1245
+ * Create or update one AiUsageLog.
1246
+ * @param {AiUsageLogUpsertArgs} args - Arguments to update or create a AiUsageLog.
1247
+ * @example
1248
+ * // Update or create a AiUsageLog
1249
+ * const aiUsageLog = await prisma.aiUsageLog.upsert({
1250
+ * create: {
1251
+ * // ... data to create a AiUsageLog
1252
+ * },
1253
+ * update: {
1254
+ * // ... in case it already exists, update
1255
+ * },
1256
+ * where: {
1257
+ * // ... the filter for the AiUsageLog we want to update
1258
+ * }
1259
+ * })
1260
+ */
1261
+ upsert<T extends AiUsageLogUpsertArgs>(args: Prisma.SelectSubset<T, AiUsageLogUpsertArgs<ExtArgs>>): Prisma.Prisma__AiUsageLogClient<runtime.Types.Result.GetResult<Prisma.$AiUsageLogPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
1262
+
1263
+
1264
+ /**
1265
+ * Count the number of AiUsageLogs.
1266
+ * Note, that providing `undefined` is treated as the value not being there.
1267
+ * Read more here: https://pris.ly/d/null-undefined
1268
+ * @param {AiUsageLogCountArgs} args - Arguments to filter AiUsageLogs to count.
1269
+ * @example
1270
+ * // Count the number of AiUsageLogs
1271
+ * const count = await prisma.aiUsageLog.count({
1272
+ * where: {
1273
+ * // ... the filter for the AiUsageLogs we want to count
1274
+ * }
1275
+ * })
1276
+ **/
1277
+ count<T extends AiUsageLogCountArgs>(
1278
+ args?: Prisma.Subset<T, AiUsageLogCountArgs>,
1279
+ ): Prisma.PrismaPromise<
1280
+ T extends runtime.Types.Utils.Record<'select', any>
1281
+ ? T['select'] extends true
1282
+ ? number
1283
+ : Prisma.GetScalarType<T['select'], AiUsageLogCountAggregateOutputType>
1284
+ : number
1285
+ >
1286
+
1287
+ /**
1288
+ * Allows you to perform aggregations operations on a AiUsageLog.
1289
+ * Note, that providing `undefined` is treated as the value not being there.
1290
+ * Read more here: https://pris.ly/d/null-undefined
1291
+ * @param {AiUsageLogAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
1292
+ * @example
1293
+ * // Ordered by age ascending
1294
+ * // Where email contains prisma.io
1295
+ * // Limited to the 10 users
1296
+ * const aggregations = await prisma.user.aggregate({
1297
+ * _avg: {
1298
+ * age: true,
1299
+ * },
1300
+ * where: {
1301
+ * email: {
1302
+ * contains: "prisma.io",
1303
+ * },
1304
+ * },
1305
+ * orderBy: {
1306
+ * age: "asc",
1307
+ * },
1308
+ * take: 10,
1309
+ * })
1310
+ **/
1311
+ aggregate<T extends AiUsageLogAggregateArgs>(args: Prisma.Subset<T, AiUsageLogAggregateArgs>): Prisma.PrismaPromise<GetAiUsageLogAggregateType<T>>
1312
+
1313
+ /**
1314
+ * Group by AiUsageLog.
1315
+ * Note, that providing `undefined` is treated as the value not being there.
1316
+ * Read more here: https://pris.ly/d/null-undefined
1317
+ * @param {AiUsageLogGroupByArgs} args - Group by arguments.
1318
+ * @example
1319
+ * // Group by city, order by createdAt, get count
1320
+ * const result = await prisma.user.groupBy({
1321
+ * by: ['city', 'createdAt'],
1322
+ * orderBy: {
1323
+ * createdAt: true
1324
+ * },
1325
+ * _count: {
1326
+ * _all: true
1327
+ * },
1328
+ * })
1329
+ *
1330
+ **/
1331
+ groupBy<
1332
+ T extends AiUsageLogGroupByArgs,
1333
+ HasSelectOrTake extends Prisma.Or<
1334
+ Prisma.Extends<'skip', Prisma.Keys<T>>,
1335
+ Prisma.Extends<'take', Prisma.Keys<T>>
1336
+ >,
1337
+ OrderByArg extends Prisma.True extends HasSelectOrTake
1338
+ ? { orderBy: AiUsageLogGroupByArgs['orderBy'] }
1339
+ : { orderBy?: AiUsageLogGroupByArgs['orderBy'] },
1340
+ OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
1341
+ ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
1342
+ ByValid extends Prisma.Has<ByFields, OrderFields>,
1343
+ HavingFields extends Prisma.GetHavingFields<T['having']>,
1344
+ HavingValid extends Prisma.Has<ByFields, HavingFields>,
1345
+ ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
1346
+ InputErrors extends ByEmpty extends Prisma.True
1347
+ ? `Error: "by" must not be empty.`
1348
+ : HavingValid extends Prisma.False
1349
+ ? {
1350
+ [P in HavingFields]: P extends ByFields
1351
+ ? never
1352
+ : P extends string
1353
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
1354
+ : [
1355
+ Error,
1356
+ 'Field ',
1357
+ P,
1358
+ ` in "having" needs to be provided in "by"`,
1359
+ ]
1360
+ }[HavingFields]
1361
+ : 'take' extends Prisma.Keys<T>
1362
+ ? 'orderBy' extends Prisma.Keys<T>
1363
+ ? ByValid extends Prisma.True
1364
+ ? {}
1365
+ : {
1366
+ [P in OrderFields]: P extends ByFields
1367
+ ? never
1368
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
1369
+ }[OrderFields]
1370
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
1371
+ : 'skip' extends Prisma.Keys<T>
1372
+ ? 'orderBy' extends Prisma.Keys<T>
1373
+ ? ByValid extends Prisma.True
1374
+ ? {}
1375
+ : {
1376
+ [P in OrderFields]: P extends ByFields
1377
+ ? never
1378
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
1379
+ }[OrderFields]
1380
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
1381
+ : ByValid extends Prisma.True
1382
+ ? {}
1383
+ : {
1384
+ [P in OrderFields]: P extends ByFields
1385
+ ? never
1386
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
1387
+ }[OrderFields]
1388
+ >(args: Prisma.SubsetIntersection<T, AiUsageLogGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAiUsageLogGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
1389
+ /**
1390
+ * Fields of the AiUsageLog model
1391
+ */
1392
+ readonly fields: AiUsageLogFieldRefs;
1393
+ }
1394
+
1395
+ /**
1396
+ * The delegate class that acts as a "Promise-like" for AiUsageLog.
1397
+ * Why is this prefixed with `Prisma__`?
1398
+ * Because we want to prevent naming conflicts as mentioned in
1399
+ * https://github.com/prisma/prisma-client-js/issues/707
1400
+ */
1401
+ export interface Prisma__AiUsageLogClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1402
+ readonly [Symbol.toStringTag]: "PrismaPromise"
1403
+ workspace<T extends Prisma.WorkspaceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.WorkspaceDefaultArgs<ExtArgs>>): Prisma.Prisma__WorkspaceClient<runtime.Types.Result.GetResult<Prisma.$WorkspacePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
1404
+ 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>
1405
+ /**
1406
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1407
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1408
+ * @param onrejected The callback to execute when the Promise is rejected.
1409
+ * @returns A Promise for the completion of which ever callback is executed.
1410
+ */
1411
+ 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>
1412
+ /**
1413
+ * Attaches a callback for only the rejection of the Promise.
1414
+ * @param onrejected The callback to execute when the Promise is rejected.
1415
+ * @returns A Promise for the completion of the callback.
1416
+ */
1417
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
1418
+ /**
1419
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
1420
+ * resolved value cannot be modified from the callback.
1421
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
1422
+ * @returns A Promise for the completion of the callback.
1423
+ */
1424
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
1425
+ }
1426
+
1427
+
1428
+
1429
+
1430
+ /**
1431
+ * Fields of the AiUsageLog model
1432
+ */
1433
+ export interface AiUsageLogFieldRefs {
1434
+ readonly id: Prisma.FieldRef<"AiUsageLog", 'String'>
1435
+ readonly workspaceId: Prisma.FieldRef<"AiUsageLog", 'String'>
1436
+ readonly userId: Prisma.FieldRef<"AiUsageLog", 'String'>
1437
+ readonly source: Prisma.FieldRef<"AiUsageLog", 'String'>
1438
+ readonly provider: Prisma.FieldRef<"AiUsageLog", 'String'>
1439
+ readonly model: Prisma.FieldRef<"AiUsageLog", 'String'>
1440
+ readonly inputTokens: Prisma.FieldRef<"AiUsageLog", 'Int'>
1441
+ readonly outputTokens: Prisma.FieldRef<"AiUsageLog", 'Int'>
1442
+ readonly costUsd: Prisma.FieldRef<"AiUsageLog", 'Decimal'>
1443
+ readonly success: Prisma.FieldRef<"AiUsageLog", 'Boolean'>
1444
+ readonly errorMessage: Prisma.FieldRef<"AiUsageLog", 'String'>
1445
+ readonly durationMs: Prisma.FieldRef<"AiUsageLog", 'Int'>
1446
+ readonly createdAt: Prisma.FieldRef<"AiUsageLog", 'DateTime'>
1447
+ }
1448
+
1449
+
1450
+ // Custom InputTypes
1451
+ /**
1452
+ * AiUsageLog findUnique
1453
+ */
1454
+ export type AiUsageLogFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1455
+ /**
1456
+ * Select specific fields to fetch from the AiUsageLog
1457
+ */
1458
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1459
+ /**
1460
+ * Omit specific fields from the AiUsageLog
1461
+ */
1462
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1463
+ /**
1464
+ * Choose, which related nodes to fetch as well
1465
+ */
1466
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1467
+ /**
1468
+ * Filter, which AiUsageLog to fetch.
1469
+ */
1470
+ where: Prisma.AiUsageLogWhereUniqueInput
1471
+ }
1472
+
1473
+ /**
1474
+ * AiUsageLog findUniqueOrThrow
1475
+ */
1476
+ export type AiUsageLogFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1477
+ /**
1478
+ * Select specific fields to fetch from the AiUsageLog
1479
+ */
1480
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1481
+ /**
1482
+ * Omit specific fields from the AiUsageLog
1483
+ */
1484
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1485
+ /**
1486
+ * Choose, which related nodes to fetch as well
1487
+ */
1488
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1489
+ /**
1490
+ * Filter, which AiUsageLog to fetch.
1491
+ */
1492
+ where: Prisma.AiUsageLogWhereUniqueInput
1493
+ }
1494
+
1495
+ /**
1496
+ * AiUsageLog findFirst
1497
+ */
1498
+ export type AiUsageLogFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1499
+ /**
1500
+ * Select specific fields to fetch from the AiUsageLog
1501
+ */
1502
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1503
+ /**
1504
+ * Omit specific fields from the AiUsageLog
1505
+ */
1506
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1507
+ /**
1508
+ * Choose, which related nodes to fetch as well
1509
+ */
1510
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1511
+ /**
1512
+ * Filter, which AiUsageLog to fetch.
1513
+ */
1514
+ where?: Prisma.AiUsageLogWhereInput
1515
+ /**
1516
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1517
+ *
1518
+ * Determine the order of AiUsageLogs to fetch.
1519
+ */
1520
+ orderBy?: Prisma.AiUsageLogOrderByWithRelationInput | Prisma.AiUsageLogOrderByWithRelationInput[]
1521
+ /**
1522
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1523
+ *
1524
+ * Sets the position for searching for AiUsageLogs.
1525
+ */
1526
+ cursor?: Prisma.AiUsageLogWhereUniqueInput
1527
+ /**
1528
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1529
+ *
1530
+ * Take `±n` AiUsageLogs from the position of the cursor.
1531
+ */
1532
+ take?: number
1533
+ /**
1534
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1535
+ *
1536
+ * Skip the first `n` AiUsageLogs.
1537
+ */
1538
+ skip?: number
1539
+ /**
1540
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1541
+ *
1542
+ * Filter by unique combinations of AiUsageLogs.
1543
+ */
1544
+ distinct?: Prisma.AiUsageLogScalarFieldEnum | Prisma.AiUsageLogScalarFieldEnum[]
1545
+ }
1546
+
1547
+ /**
1548
+ * AiUsageLog findFirstOrThrow
1549
+ */
1550
+ export type AiUsageLogFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1551
+ /**
1552
+ * Select specific fields to fetch from the AiUsageLog
1553
+ */
1554
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1555
+ /**
1556
+ * Omit specific fields from the AiUsageLog
1557
+ */
1558
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1559
+ /**
1560
+ * Choose, which related nodes to fetch as well
1561
+ */
1562
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1563
+ /**
1564
+ * Filter, which AiUsageLog to fetch.
1565
+ */
1566
+ where?: Prisma.AiUsageLogWhereInput
1567
+ /**
1568
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1569
+ *
1570
+ * Determine the order of AiUsageLogs to fetch.
1571
+ */
1572
+ orderBy?: Prisma.AiUsageLogOrderByWithRelationInput | Prisma.AiUsageLogOrderByWithRelationInput[]
1573
+ /**
1574
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1575
+ *
1576
+ * Sets the position for searching for AiUsageLogs.
1577
+ */
1578
+ cursor?: Prisma.AiUsageLogWhereUniqueInput
1579
+ /**
1580
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1581
+ *
1582
+ * Take `±n` AiUsageLogs from the position of the cursor.
1583
+ */
1584
+ take?: number
1585
+ /**
1586
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1587
+ *
1588
+ * Skip the first `n` AiUsageLogs.
1589
+ */
1590
+ skip?: number
1591
+ /**
1592
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1593
+ *
1594
+ * Filter by unique combinations of AiUsageLogs.
1595
+ */
1596
+ distinct?: Prisma.AiUsageLogScalarFieldEnum | Prisma.AiUsageLogScalarFieldEnum[]
1597
+ }
1598
+
1599
+ /**
1600
+ * AiUsageLog findMany
1601
+ */
1602
+ export type AiUsageLogFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1603
+ /**
1604
+ * Select specific fields to fetch from the AiUsageLog
1605
+ */
1606
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1607
+ /**
1608
+ * Omit specific fields from the AiUsageLog
1609
+ */
1610
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1611
+ /**
1612
+ * Choose, which related nodes to fetch as well
1613
+ */
1614
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1615
+ /**
1616
+ * Filter, which AiUsageLogs to fetch.
1617
+ */
1618
+ where?: Prisma.AiUsageLogWhereInput
1619
+ /**
1620
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1621
+ *
1622
+ * Determine the order of AiUsageLogs to fetch.
1623
+ */
1624
+ orderBy?: Prisma.AiUsageLogOrderByWithRelationInput | Prisma.AiUsageLogOrderByWithRelationInput[]
1625
+ /**
1626
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1627
+ *
1628
+ * Sets the position for listing AiUsageLogs.
1629
+ */
1630
+ cursor?: Prisma.AiUsageLogWhereUniqueInput
1631
+ /**
1632
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1633
+ *
1634
+ * Take `±n` AiUsageLogs from the position of the cursor.
1635
+ */
1636
+ take?: number
1637
+ /**
1638
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1639
+ *
1640
+ * Skip the first `n` AiUsageLogs.
1641
+ */
1642
+ skip?: number
1643
+ /**
1644
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1645
+ *
1646
+ * Filter by unique combinations of AiUsageLogs.
1647
+ */
1648
+ distinct?: Prisma.AiUsageLogScalarFieldEnum | Prisma.AiUsageLogScalarFieldEnum[]
1649
+ }
1650
+
1651
+ /**
1652
+ * AiUsageLog create
1653
+ */
1654
+ export type AiUsageLogCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1655
+ /**
1656
+ * Select specific fields to fetch from the AiUsageLog
1657
+ */
1658
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1659
+ /**
1660
+ * Omit specific fields from the AiUsageLog
1661
+ */
1662
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1663
+ /**
1664
+ * Choose, which related nodes to fetch as well
1665
+ */
1666
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1667
+ /**
1668
+ * The data needed to create a AiUsageLog.
1669
+ */
1670
+ data: Prisma.XOR<Prisma.AiUsageLogCreateInput, Prisma.AiUsageLogUncheckedCreateInput>
1671
+ }
1672
+
1673
+ /**
1674
+ * AiUsageLog createMany
1675
+ */
1676
+ export type AiUsageLogCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1677
+ /**
1678
+ * The data used to create many AiUsageLogs.
1679
+ */
1680
+ data: Prisma.AiUsageLogCreateManyInput | Prisma.AiUsageLogCreateManyInput[]
1681
+ skipDuplicates?: boolean
1682
+ }
1683
+
1684
+ /**
1685
+ * AiUsageLog createManyAndReturn
1686
+ */
1687
+ export type AiUsageLogCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1688
+ /**
1689
+ * Select specific fields to fetch from the AiUsageLog
1690
+ */
1691
+ select?: Prisma.AiUsageLogSelectCreateManyAndReturn<ExtArgs> | null
1692
+ /**
1693
+ * Omit specific fields from the AiUsageLog
1694
+ */
1695
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1696
+ /**
1697
+ * The data used to create many AiUsageLogs.
1698
+ */
1699
+ data: Prisma.AiUsageLogCreateManyInput | Prisma.AiUsageLogCreateManyInput[]
1700
+ skipDuplicates?: boolean
1701
+ /**
1702
+ * Choose, which related nodes to fetch as well
1703
+ */
1704
+ include?: Prisma.AiUsageLogIncludeCreateManyAndReturn<ExtArgs> | null
1705
+ }
1706
+
1707
+ /**
1708
+ * AiUsageLog update
1709
+ */
1710
+ export type AiUsageLogUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1711
+ /**
1712
+ * Select specific fields to fetch from the AiUsageLog
1713
+ */
1714
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1715
+ /**
1716
+ * Omit specific fields from the AiUsageLog
1717
+ */
1718
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1719
+ /**
1720
+ * Choose, which related nodes to fetch as well
1721
+ */
1722
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1723
+ /**
1724
+ * The data needed to update a AiUsageLog.
1725
+ */
1726
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateInput, Prisma.AiUsageLogUncheckedUpdateInput>
1727
+ /**
1728
+ * Choose, which AiUsageLog to update.
1729
+ */
1730
+ where: Prisma.AiUsageLogWhereUniqueInput
1731
+ }
1732
+
1733
+ /**
1734
+ * AiUsageLog updateMany
1735
+ */
1736
+ export type AiUsageLogUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1737
+ /**
1738
+ * The data used to update AiUsageLogs.
1739
+ */
1740
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateManyMutationInput, Prisma.AiUsageLogUncheckedUpdateManyInput>
1741
+ /**
1742
+ * Filter which AiUsageLogs to update
1743
+ */
1744
+ where?: Prisma.AiUsageLogWhereInput
1745
+ /**
1746
+ * Limit how many AiUsageLogs to update.
1747
+ */
1748
+ limit?: number
1749
+ }
1750
+
1751
+ /**
1752
+ * AiUsageLog updateManyAndReturn
1753
+ */
1754
+ export type AiUsageLogUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1755
+ /**
1756
+ * Select specific fields to fetch from the AiUsageLog
1757
+ */
1758
+ select?: Prisma.AiUsageLogSelectUpdateManyAndReturn<ExtArgs> | null
1759
+ /**
1760
+ * Omit specific fields from the AiUsageLog
1761
+ */
1762
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1763
+ /**
1764
+ * The data used to update AiUsageLogs.
1765
+ */
1766
+ data: Prisma.XOR<Prisma.AiUsageLogUpdateManyMutationInput, Prisma.AiUsageLogUncheckedUpdateManyInput>
1767
+ /**
1768
+ * Filter which AiUsageLogs to update
1769
+ */
1770
+ where?: Prisma.AiUsageLogWhereInput
1771
+ /**
1772
+ * Limit how many AiUsageLogs to update.
1773
+ */
1774
+ limit?: number
1775
+ /**
1776
+ * Choose, which related nodes to fetch as well
1777
+ */
1778
+ include?: Prisma.AiUsageLogIncludeUpdateManyAndReturn<ExtArgs> | null
1779
+ }
1780
+
1781
+ /**
1782
+ * AiUsageLog upsert
1783
+ */
1784
+ export type AiUsageLogUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1785
+ /**
1786
+ * Select specific fields to fetch from the AiUsageLog
1787
+ */
1788
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1789
+ /**
1790
+ * Omit specific fields from the AiUsageLog
1791
+ */
1792
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1793
+ /**
1794
+ * Choose, which related nodes to fetch as well
1795
+ */
1796
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1797
+ /**
1798
+ * The filter to search for the AiUsageLog to update in case it exists.
1799
+ */
1800
+ where: Prisma.AiUsageLogWhereUniqueInput
1801
+ /**
1802
+ * In case the AiUsageLog found by the `where` argument doesn't exist, create a new AiUsageLog with this data.
1803
+ */
1804
+ create: Prisma.XOR<Prisma.AiUsageLogCreateInput, Prisma.AiUsageLogUncheckedCreateInput>
1805
+ /**
1806
+ * In case the AiUsageLog was found with the provided `where` argument, update it with this data.
1807
+ */
1808
+ update: Prisma.XOR<Prisma.AiUsageLogUpdateInput, Prisma.AiUsageLogUncheckedUpdateInput>
1809
+ }
1810
+
1811
+ /**
1812
+ * AiUsageLog delete
1813
+ */
1814
+ export type AiUsageLogDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1815
+ /**
1816
+ * Select specific fields to fetch from the AiUsageLog
1817
+ */
1818
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1819
+ /**
1820
+ * Omit specific fields from the AiUsageLog
1821
+ */
1822
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1823
+ /**
1824
+ * Choose, which related nodes to fetch as well
1825
+ */
1826
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1827
+ /**
1828
+ * Filter which AiUsageLog to delete.
1829
+ */
1830
+ where: Prisma.AiUsageLogWhereUniqueInput
1831
+ }
1832
+
1833
+ /**
1834
+ * AiUsageLog deleteMany
1835
+ */
1836
+ export type AiUsageLogDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1837
+ /**
1838
+ * Filter which AiUsageLogs to delete
1839
+ */
1840
+ where?: Prisma.AiUsageLogWhereInput
1841
+ /**
1842
+ * Limit how many AiUsageLogs to delete.
1843
+ */
1844
+ limit?: number
1845
+ }
1846
+
1847
+ /**
1848
+ * AiUsageLog without action
1849
+ */
1850
+ export type AiUsageLogDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1851
+ /**
1852
+ * Select specific fields to fetch from the AiUsageLog
1853
+ */
1854
+ select?: Prisma.AiUsageLogSelect<ExtArgs> | null
1855
+ /**
1856
+ * Omit specific fields from the AiUsageLog
1857
+ */
1858
+ omit?: Prisma.AiUsageLogOmit<ExtArgs> | null
1859
+ /**
1860
+ * Choose, which related nodes to fetch as well
1861
+ */
1862
+ include?: Prisma.AiUsageLogInclude<ExtArgs> | null
1863
+ }