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