@allbluecn/database 0.11.0 → 0.12.0

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