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