@allbluecn/database 0.4.12 → 0.4.13

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