create-zhx-monorepo 0.1.7 → 0.1.9

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