agentfit 0.1.2 → 0.1.5

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