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