@allbluecn/database 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/browser.ts +25 -0
- package/generated/client.ts +25 -0
- package/generated/internal/class.ts +54 -4
- package/generated/internal/prismaNamespace.ts +453 -2
- package/generated/internal/prismaNamespaceBrowser.ts +77 -1
- package/generated/models/EmailLog.ts +1345 -0
- package/generated/models/EmailPreference.ts +1257 -0
- package/generated/models/EmailSubscriber.ts +1233 -0
- package/generated/models/EmailVerificationToken.ts +1380 -0
- package/generated/models/InvitationCode.ts +65 -1
- package/generated/models/NotificationPreference.ts +27 -1
- package/generated/models/OAuthProviderConfig.ts +1227 -0
- package/generated/models/User.ts +1435 -157
- package/generated/models.ts +5 -0
- package/generated-sqlite/browser.ts +30 -0
- package/generated-sqlite/client.ts +30 -0
- package/generated-sqlite/internal/class.ts +64 -4
- package/generated-sqlite/internal/prismaNamespace.ts +541 -3
- package/generated-sqlite/internal/prismaNamespaceBrowser.ts +90 -2
- package/generated-sqlite/models/EmailLog.ts +1343 -0
- package/generated-sqlite/models/EmailPreference.ts +1255 -0
- package/generated-sqlite/models/EmailSubscriber.ts +1231 -0
- package/generated-sqlite/models/EmailVerificationToken.ts +1377 -0
- package/generated-sqlite/models/InvitationCode.ts +65 -1
- package/generated-sqlite/models/NotificationPreference.ts +1313 -0
- package/generated-sqlite/models/OAuthProviderConfig.ts +1225 -0
- package/generated-sqlite/models/User.ts +1867 -293
- package/generated-sqlite/models.ts +6 -0
- package/migrations/20260911120000_add_pgvector_tables/migration.sql +28 -0
- package/migrations/20260911171433_email_auth_invitation/migration.sql +80 -0
- package/migrations/20260912032616_email_p4_p8/migration.sql +42 -0
- package/package.json +2 -2
- package/schema.prisma +93 -12
- package/schema.sqlite.prisma +93 -4
|
@@ -43,6 +43,8 @@ export type InvitationCodeMinAggregateOutputType = {
|
|
|
43
43
|
usedCount: number | null
|
|
44
44
|
expiresAt: Date | null
|
|
45
45
|
createdAt: Date | null
|
|
46
|
+
createdById: string | null
|
|
47
|
+
disabledAt: Date | null
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
export type InvitationCodeMaxAggregateOutputType = {
|
|
@@ -52,6 +54,8 @@ export type InvitationCodeMaxAggregateOutputType = {
|
|
|
52
54
|
usedCount: number | null
|
|
53
55
|
expiresAt: Date | null
|
|
54
56
|
createdAt: Date | null
|
|
57
|
+
createdById: string | null
|
|
58
|
+
disabledAt: Date | null
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
export type InvitationCodeCountAggregateOutputType = {
|
|
@@ -61,6 +65,8 @@ export type InvitationCodeCountAggregateOutputType = {
|
|
|
61
65
|
usedCount: number
|
|
62
66
|
expiresAt: number
|
|
63
67
|
createdAt: number
|
|
68
|
+
createdById: number
|
|
69
|
+
disabledAt: number
|
|
64
70
|
_all: number
|
|
65
71
|
}
|
|
66
72
|
|
|
@@ -82,6 +88,8 @@ export type InvitationCodeMinAggregateInputType = {
|
|
|
82
88
|
usedCount?: true
|
|
83
89
|
expiresAt?: true
|
|
84
90
|
createdAt?: true
|
|
91
|
+
createdById?: true
|
|
92
|
+
disabledAt?: true
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
export type InvitationCodeMaxAggregateInputType = {
|
|
@@ -91,6 +99,8 @@ export type InvitationCodeMaxAggregateInputType = {
|
|
|
91
99
|
usedCount?: true
|
|
92
100
|
expiresAt?: true
|
|
93
101
|
createdAt?: true
|
|
102
|
+
createdById?: true
|
|
103
|
+
disabledAt?: true
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
export type InvitationCodeCountAggregateInputType = {
|
|
@@ -100,6 +110,8 @@ export type InvitationCodeCountAggregateInputType = {
|
|
|
100
110
|
usedCount?: true
|
|
101
111
|
expiresAt?: true
|
|
102
112
|
createdAt?: true
|
|
113
|
+
createdById?: true
|
|
114
|
+
disabledAt?: true
|
|
103
115
|
_all?: true
|
|
104
116
|
}
|
|
105
117
|
|
|
@@ -196,6 +208,8 @@ export type InvitationCodeGroupByOutputType = {
|
|
|
196
208
|
usedCount: number
|
|
197
209
|
expiresAt: Date
|
|
198
210
|
createdAt: Date
|
|
211
|
+
createdById: string | null
|
|
212
|
+
disabledAt: Date | null
|
|
199
213
|
_count: InvitationCodeCountAggregateOutputType | null
|
|
200
214
|
_avg: InvitationCodeAvgAggregateOutputType | null
|
|
201
215
|
_sum: InvitationCodeSumAggregateOutputType | null
|
|
@@ -228,6 +242,8 @@ export type InvitationCodeWhereInput = {
|
|
|
228
242
|
usedCount?: Prisma.IntFilter<"InvitationCode"> | number
|
|
229
243
|
expiresAt?: Prisma.DateTimeFilter<"InvitationCode"> | Date | string
|
|
230
244
|
createdAt?: Prisma.DateTimeFilter<"InvitationCode"> | Date | string
|
|
245
|
+
createdById?: Prisma.StringNullableFilter<"InvitationCode"> | string | null
|
|
246
|
+
disabledAt?: Prisma.DateTimeNullableFilter<"InvitationCode"> | Date | string | null
|
|
231
247
|
uses?: Prisma.InvitationUseListRelationFilter
|
|
232
248
|
}
|
|
233
249
|
|
|
@@ -238,6 +254,8 @@ export type InvitationCodeOrderByWithRelationInput = {
|
|
|
238
254
|
usedCount?: Prisma.SortOrder
|
|
239
255
|
expiresAt?: Prisma.SortOrder
|
|
240
256
|
createdAt?: Prisma.SortOrder
|
|
257
|
+
createdById?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
258
|
+
disabledAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
241
259
|
uses?: Prisma.InvitationUseOrderByRelationAggregateInput
|
|
242
260
|
}
|
|
243
261
|
|
|
@@ -251,6 +269,8 @@ export type InvitationCodeWhereUniqueInput = Prisma.AtLeast<{
|
|
|
251
269
|
usedCount?: Prisma.IntFilter<"InvitationCode"> | number
|
|
252
270
|
expiresAt?: Prisma.DateTimeFilter<"InvitationCode"> | Date | string
|
|
253
271
|
createdAt?: Prisma.DateTimeFilter<"InvitationCode"> | Date | string
|
|
272
|
+
createdById?: Prisma.StringNullableFilter<"InvitationCode"> | string | null
|
|
273
|
+
disabledAt?: Prisma.DateTimeNullableFilter<"InvitationCode"> | Date | string | null
|
|
254
274
|
uses?: Prisma.InvitationUseListRelationFilter
|
|
255
275
|
}, "id" | "code">
|
|
256
276
|
|
|
@@ -261,6 +281,8 @@ export type InvitationCodeOrderByWithAggregationInput = {
|
|
|
261
281
|
usedCount?: Prisma.SortOrder
|
|
262
282
|
expiresAt?: Prisma.SortOrder
|
|
263
283
|
createdAt?: Prisma.SortOrder
|
|
284
|
+
createdById?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
285
|
+
disabledAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
264
286
|
_count?: Prisma.InvitationCodeCountOrderByAggregateInput
|
|
265
287
|
_avg?: Prisma.InvitationCodeAvgOrderByAggregateInput
|
|
266
288
|
_max?: Prisma.InvitationCodeMaxOrderByAggregateInput
|
|
@@ -278,6 +300,8 @@ export type InvitationCodeScalarWhereWithAggregatesInput = {
|
|
|
278
300
|
usedCount?: Prisma.IntWithAggregatesFilter<"InvitationCode"> | number
|
|
279
301
|
expiresAt?: Prisma.DateTimeWithAggregatesFilter<"InvitationCode"> | Date | string
|
|
280
302
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"InvitationCode"> | Date | string
|
|
303
|
+
createdById?: Prisma.StringNullableWithAggregatesFilter<"InvitationCode"> | string | null
|
|
304
|
+
disabledAt?: Prisma.DateTimeNullableWithAggregatesFilter<"InvitationCode"> | Date | string | null
|
|
281
305
|
}
|
|
282
306
|
|
|
283
307
|
export type InvitationCodeCreateInput = {
|
|
@@ -287,6 +311,8 @@ export type InvitationCodeCreateInput = {
|
|
|
287
311
|
usedCount?: number
|
|
288
312
|
expiresAt: Date | string
|
|
289
313
|
createdAt?: Date | string
|
|
314
|
+
createdById?: string | null
|
|
315
|
+
disabledAt?: Date | string | null
|
|
290
316
|
uses?: Prisma.InvitationUseCreateNestedManyWithoutCodeInput
|
|
291
317
|
}
|
|
292
318
|
|
|
@@ -297,6 +323,8 @@ export type InvitationCodeUncheckedCreateInput = {
|
|
|
297
323
|
usedCount?: number
|
|
298
324
|
expiresAt: Date | string
|
|
299
325
|
createdAt?: Date | string
|
|
326
|
+
createdById?: string | null
|
|
327
|
+
disabledAt?: Date | string | null
|
|
300
328
|
uses?: Prisma.InvitationUseUncheckedCreateNestedManyWithoutCodeInput
|
|
301
329
|
}
|
|
302
330
|
|
|
@@ -307,6 +335,8 @@ export type InvitationCodeUpdateInput = {
|
|
|
307
335
|
usedCount?: Prisma.IntFieldUpdateOperationsInput | number
|
|
308
336
|
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
309
337
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
338
|
+
createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
339
|
+
disabledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
310
340
|
uses?: Prisma.InvitationUseUpdateManyWithoutCodeNestedInput
|
|
311
341
|
}
|
|
312
342
|
|
|
@@ -317,6 +347,8 @@ export type InvitationCodeUncheckedUpdateInput = {
|
|
|
317
347
|
usedCount?: Prisma.IntFieldUpdateOperationsInput | number
|
|
318
348
|
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
319
349
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
350
|
+
createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
351
|
+
disabledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
320
352
|
uses?: Prisma.InvitationUseUncheckedUpdateManyWithoutCodeNestedInput
|
|
321
353
|
}
|
|
322
354
|
|
|
@@ -327,6 +359,8 @@ export type InvitationCodeCreateManyInput = {
|
|
|
327
359
|
usedCount?: number
|
|
328
360
|
expiresAt: Date | string
|
|
329
361
|
createdAt?: Date | string
|
|
362
|
+
createdById?: string | null
|
|
363
|
+
disabledAt?: Date | string | null
|
|
330
364
|
}
|
|
331
365
|
|
|
332
366
|
export type InvitationCodeUpdateManyMutationInput = {
|
|
@@ -336,6 +370,8 @@ export type InvitationCodeUpdateManyMutationInput = {
|
|
|
336
370
|
usedCount?: Prisma.IntFieldUpdateOperationsInput | number
|
|
337
371
|
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
338
372
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
373
|
+
createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
374
|
+
disabledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
339
375
|
}
|
|
340
376
|
|
|
341
377
|
export type InvitationCodeUncheckedUpdateManyInput = {
|
|
@@ -345,6 +381,8 @@ export type InvitationCodeUncheckedUpdateManyInput = {
|
|
|
345
381
|
usedCount?: Prisma.IntFieldUpdateOperationsInput | number
|
|
346
382
|
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
347
383
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
384
|
+
createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
385
|
+
disabledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
348
386
|
}
|
|
349
387
|
|
|
350
388
|
export type InvitationCodeCountOrderByAggregateInput = {
|
|
@@ -354,6 +392,8 @@ export type InvitationCodeCountOrderByAggregateInput = {
|
|
|
354
392
|
usedCount?: Prisma.SortOrder
|
|
355
393
|
expiresAt?: Prisma.SortOrder
|
|
356
394
|
createdAt?: Prisma.SortOrder
|
|
395
|
+
createdById?: Prisma.SortOrder
|
|
396
|
+
disabledAt?: Prisma.SortOrder
|
|
357
397
|
}
|
|
358
398
|
|
|
359
399
|
export type InvitationCodeAvgOrderByAggregateInput = {
|
|
@@ -368,6 +408,8 @@ export type InvitationCodeMaxOrderByAggregateInput = {
|
|
|
368
408
|
usedCount?: Prisma.SortOrder
|
|
369
409
|
expiresAt?: Prisma.SortOrder
|
|
370
410
|
createdAt?: Prisma.SortOrder
|
|
411
|
+
createdById?: Prisma.SortOrder
|
|
412
|
+
disabledAt?: Prisma.SortOrder
|
|
371
413
|
}
|
|
372
414
|
|
|
373
415
|
export type InvitationCodeMinOrderByAggregateInput = {
|
|
@@ -377,6 +419,8 @@ export type InvitationCodeMinOrderByAggregateInput = {
|
|
|
377
419
|
usedCount?: Prisma.SortOrder
|
|
378
420
|
expiresAt?: Prisma.SortOrder
|
|
379
421
|
createdAt?: Prisma.SortOrder
|
|
422
|
+
createdById?: Prisma.SortOrder
|
|
423
|
+
disabledAt?: Prisma.SortOrder
|
|
380
424
|
}
|
|
381
425
|
|
|
382
426
|
export type InvitationCodeSumOrderByAggregateInput = {
|
|
@@ -418,6 +462,8 @@ export type InvitationCodeCreateWithoutUsesInput = {
|
|
|
418
462
|
usedCount?: number
|
|
419
463
|
expiresAt: Date | string
|
|
420
464
|
createdAt?: Date | string
|
|
465
|
+
createdById?: string | null
|
|
466
|
+
disabledAt?: Date | string | null
|
|
421
467
|
}
|
|
422
468
|
|
|
423
469
|
export type InvitationCodeUncheckedCreateWithoutUsesInput = {
|
|
@@ -427,6 +473,8 @@ export type InvitationCodeUncheckedCreateWithoutUsesInput = {
|
|
|
427
473
|
usedCount?: number
|
|
428
474
|
expiresAt: Date | string
|
|
429
475
|
createdAt?: Date | string
|
|
476
|
+
createdById?: string | null
|
|
477
|
+
disabledAt?: Date | string | null
|
|
430
478
|
}
|
|
431
479
|
|
|
432
480
|
export type InvitationCodeCreateOrConnectWithoutUsesInput = {
|
|
@@ -452,6 +500,8 @@ export type InvitationCodeUpdateWithoutUsesInput = {
|
|
|
452
500
|
usedCount?: Prisma.IntFieldUpdateOperationsInput | number
|
|
453
501
|
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
454
502
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
503
|
+
createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
504
|
+
disabledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
455
505
|
}
|
|
456
506
|
|
|
457
507
|
export type InvitationCodeUncheckedUpdateWithoutUsesInput = {
|
|
@@ -461,6 +511,8 @@ export type InvitationCodeUncheckedUpdateWithoutUsesInput = {
|
|
|
461
511
|
usedCount?: Prisma.IntFieldUpdateOperationsInput | number
|
|
462
512
|
expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
463
513
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
514
|
+
createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
515
|
+
disabledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
464
516
|
}
|
|
465
517
|
|
|
466
518
|
|
|
@@ -501,6 +553,8 @@ export type InvitationCodeSelect<ExtArgs extends runtime.Types.Extensions.Intern
|
|
|
501
553
|
usedCount?: boolean
|
|
502
554
|
expiresAt?: boolean
|
|
503
555
|
createdAt?: boolean
|
|
556
|
+
createdById?: boolean
|
|
557
|
+
disabledAt?: boolean
|
|
504
558
|
uses?: boolean | Prisma.InvitationCode$usesArgs<ExtArgs>
|
|
505
559
|
_count?: boolean | Prisma.InvitationCodeCountOutputTypeDefaultArgs<ExtArgs>
|
|
506
560
|
}, ExtArgs["result"]["invitationCode"]>
|
|
@@ -512,6 +566,8 @@ export type InvitationCodeSelectCreateManyAndReturn<ExtArgs extends runtime.Type
|
|
|
512
566
|
usedCount?: boolean
|
|
513
567
|
expiresAt?: boolean
|
|
514
568
|
createdAt?: boolean
|
|
569
|
+
createdById?: boolean
|
|
570
|
+
disabledAt?: boolean
|
|
515
571
|
}, ExtArgs["result"]["invitationCode"]>
|
|
516
572
|
|
|
517
573
|
export type InvitationCodeSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
@@ -521,6 +577,8 @@ export type InvitationCodeSelectUpdateManyAndReturn<ExtArgs extends runtime.Type
|
|
|
521
577
|
usedCount?: boolean
|
|
522
578
|
expiresAt?: boolean
|
|
523
579
|
createdAt?: boolean
|
|
580
|
+
createdById?: boolean
|
|
581
|
+
disabledAt?: boolean
|
|
524
582
|
}, ExtArgs["result"]["invitationCode"]>
|
|
525
583
|
|
|
526
584
|
export type InvitationCodeSelectScalar = {
|
|
@@ -530,9 +588,11 @@ export type InvitationCodeSelectScalar = {
|
|
|
530
588
|
usedCount?: boolean
|
|
531
589
|
expiresAt?: boolean
|
|
532
590
|
createdAt?: boolean
|
|
591
|
+
createdById?: boolean
|
|
592
|
+
disabledAt?: boolean
|
|
533
593
|
}
|
|
534
594
|
|
|
535
|
-
export type InvitationCodeOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "maxUses" | "usedCount" | "expiresAt" | "createdAt", ExtArgs["result"]["invitationCode"]>
|
|
595
|
+
export type InvitationCodeOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "maxUses" | "usedCount" | "expiresAt" | "createdAt" | "createdById" | "disabledAt", ExtArgs["result"]["invitationCode"]>
|
|
536
596
|
export type InvitationCodeInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
537
597
|
uses?: boolean | Prisma.InvitationCode$usesArgs<ExtArgs>
|
|
538
598
|
_count?: boolean | Prisma.InvitationCodeCountOutputTypeDefaultArgs<ExtArgs>
|
|
@@ -552,6 +612,8 @@ export type $InvitationCodePayload<ExtArgs extends runtime.Types.Extensions.Inte
|
|
|
552
612
|
usedCount: number
|
|
553
613
|
expiresAt: Date
|
|
554
614
|
createdAt: Date
|
|
615
|
+
createdById: string | null
|
|
616
|
+
disabledAt: Date | null
|
|
555
617
|
}, ExtArgs["result"]["invitationCode"]>
|
|
556
618
|
composites: {}
|
|
557
619
|
}
|
|
@@ -982,6 +1044,8 @@ export interface InvitationCodeFieldRefs {
|
|
|
982
1044
|
readonly usedCount: Prisma.FieldRef<"InvitationCode", 'Int'>
|
|
983
1045
|
readonly expiresAt: Prisma.FieldRef<"InvitationCode", 'DateTime'>
|
|
984
1046
|
readonly createdAt: Prisma.FieldRef<"InvitationCode", 'DateTime'>
|
|
1047
|
+
readonly createdById: Prisma.FieldRef<"InvitationCode", 'String'>
|
|
1048
|
+
readonly disabledAt: Prisma.FieldRef<"InvitationCode", 'DateTime'>
|
|
985
1049
|
}
|
|
986
1050
|
|
|
987
1051
|
|