@allbluecn/database 0.5.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.
Files changed (49) hide show
  1. package/generated/browser.ts +35 -0
  2. package/generated/client.ts +35 -0
  3. package/generated/internal/class.ts +74 -4
  4. package/generated/internal/prismaNamespace.ts +634 -2
  5. package/generated/internal/prismaNamespaceBrowser.ts +108 -1
  6. package/generated/models/EmailLog.ts +1345 -0
  7. package/generated/models/EmailPreference.ts +1257 -0
  8. package/generated/models/EmailSubscriber.ts +1233 -0
  9. package/generated/models/EmailVerificationToken.ts +1380 -0
  10. package/generated/models/InvitationCode.ts +65 -1
  11. package/generated/models/KnowledgeBase.ts +158 -0
  12. package/generated/models/KnowledgeDocument.ts +176 -0
  13. package/generated/models/NotificationPreference.ts +27 -1
  14. package/generated/models/OAuthProviderConfig.ts +1227 -0
  15. package/generated/models/User.ts +2405 -493
  16. package/generated/models/Workspace.ts +380 -0
  17. package/generated/models/WorkspaceKnowledgeBase.ts +1430 -0
  18. package/generated/models/WorkspaceQuickDoc.ts +2030 -0
  19. package/generated/models.ts +7 -0
  20. package/generated-sqlite/browser.ts +40 -0
  21. package/generated-sqlite/client.ts +40 -0
  22. package/generated-sqlite/internal/class.ts +84 -4
  23. package/generated-sqlite/internal/prismaNamespace.ts +722 -3
  24. package/generated-sqlite/internal/prismaNamespaceBrowser.ts +121 -2
  25. package/generated-sqlite/models/EmailLog.ts +1343 -0
  26. package/generated-sqlite/models/EmailPreference.ts +1255 -0
  27. package/generated-sqlite/models/EmailSubscriber.ts +1231 -0
  28. package/generated-sqlite/models/EmailVerificationToken.ts +1377 -0
  29. package/generated-sqlite/models/InvitationCode.ts +65 -1
  30. package/generated-sqlite/models/KnowledgeBase.ts +150 -0
  31. package/generated-sqlite/models/KnowledgeDocument.ts +168 -0
  32. package/generated-sqlite/models/NotificationPreference.ts +1313 -0
  33. package/generated-sqlite/models/OAuthProviderConfig.ts +1225 -0
  34. package/generated-sqlite/models/User.ts +2252 -160
  35. package/generated-sqlite/models/Workspace.ts +300 -0
  36. package/generated-sqlite/models/WorkspaceKnowledgeBase.ts +1426 -0
  37. package/generated-sqlite/models/WorkspaceQuickDoc.ts +2025 -0
  38. package/generated-sqlite/models.ts +8 -0
  39. package/migrations/20260909070745_workspace_kb_card/migration.sql +55 -0
  40. package/migrations/20260909123637_workspace_quick_doc_column_index/migration.sql +2 -0
  41. package/migrations/20260909123656_workspace_quick_doc_column_backfill/migration.sql +4 -0
  42. package/migrations/20260909144328_workspace_quick_doc_label/migration.sql +2 -0
  43. package/migrations/20260909154315_workspace_quick_doc_icon/migration.sql +2 -0
  44. package/migrations/20260911120000_add_pgvector_tables/migration.sql +28 -0
  45. package/migrations/20260911171433_email_auth_invitation/migration.sql +80 -0
  46. package/migrations/20260912032616_email_p4_p8/migration.sql +42 -0
  47. package/package.json +2 -2
  48. package/schema.prisma +141 -14
  49. package/schema.sqlite.prisma +141 -6
@@ -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
 
@@ -229,6 +229,7 @@ export type KnowledgeBaseWhereInput = {
229
229
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
230
230
  documents?: Prisma.KnowledgeDocumentListRelationFilter
231
231
  projectLinks?: Prisma.ProjectKnowledgeBaseListRelationFilter
232
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseListRelationFilter
232
233
  }
233
234
 
234
235
  export type KnowledgeBaseOrderByWithRelationInput = {
@@ -246,6 +247,7 @@ export type KnowledgeBaseOrderByWithRelationInput = {
246
247
  user?: Prisma.UserOrderByWithRelationInput
247
248
  documents?: Prisma.KnowledgeDocumentOrderByRelationAggregateInput
248
249
  projectLinks?: Prisma.ProjectKnowledgeBaseOrderByRelationAggregateInput
250
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseOrderByRelationAggregateInput
249
251
  }
250
252
 
251
253
  export type KnowledgeBaseWhereUniqueInput = Prisma.AtLeast<{
@@ -266,6 +268,7 @@ export type KnowledgeBaseWhereUniqueInput = Prisma.AtLeast<{
266
268
  user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
267
269
  documents?: Prisma.KnowledgeDocumentListRelationFilter
268
270
  projectLinks?: Prisma.ProjectKnowledgeBaseListRelationFilter
271
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseListRelationFilter
269
272
  }, "id">
270
273
 
271
274
  export type KnowledgeBaseOrderByWithAggregationInput = {
@@ -316,6 +319,7 @@ export type KnowledgeBaseCreateInput = {
316
319
  user: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput
317
320
  documents?: Prisma.KnowledgeDocumentCreateNestedManyWithoutKbInput
318
321
  projectLinks?: Prisma.ProjectKnowledgeBaseCreateNestedManyWithoutKbInput
322
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKbInput
319
323
  }
320
324
 
321
325
  export type KnowledgeBaseUncheckedCreateInput = {
@@ -332,6 +336,7 @@ export type KnowledgeBaseUncheckedCreateInput = {
332
336
  updatedAt?: Date | string
333
337
  documents?: Prisma.KnowledgeDocumentUncheckedCreateNestedManyWithoutKbInput
334
338
  projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
339
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
335
340
  }
336
341
 
337
342
  export type KnowledgeBaseUpdateInput = {
@@ -348,6 +353,7 @@ export type KnowledgeBaseUpdateInput = {
348
353
  user?: Prisma.UserUpdateOneRequiredWithoutKnowledgeBasesNestedInput
349
354
  documents?: Prisma.KnowledgeDocumentUpdateManyWithoutKbNestedInput
350
355
  projectLinks?: Prisma.ProjectKnowledgeBaseUpdateManyWithoutKbNestedInput
356
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKbNestedInput
351
357
  }
352
358
 
353
359
  export type KnowledgeBaseUncheckedUpdateInput = {
@@ -364,6 +370,7 @@ export type KnowledgeBaseUncheckedUpdateInput = {
364
370
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
365
371
  documents?: Prisma.KnowledgeDocumentUncheckedUpdateManyWithoutKbNestedInput
366
372
  projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
373
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
367
374
  }
368
375
 
369
376
  export type KnowledgeBaseCreateManyInput = {
@@ -518,6 +525,20 @@ export type KnowledgeBaseUpdateOneRequiredWithoutProjectLinksNestedInput = {
518
525
  update?: Prisma.XOR<Prisma.XOR<Prisma.KnowledgeBaseUpdateToOneWithWhereWithoutProjectLinksInput, Prisma.KnowledgeBaseUpdateWithoutProjectLinksInput>, Prisma.KnowledgeBaseUncheckedUpdateWithoutProjectLinksInput>
519
526
  }
520
527
 
528
+ export type KnowledgeBaseCreateNestedOneWithoutWorkspaceLinksInput = {
529
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspaceLinksInput>
530
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutWorkspaceLinksInput
531
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput
532
+ }
533
+
534
+ export type KnowledgeBaseUpdateOneRequiredWithoutWorkspaceLinksNestedInput = {
535
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspaceLinksInput>
536
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutWorkspaceLinksInput
537
+ upsert?: Prisma.KnowledgeBaseUpsertWithoutWorkspaceLinksInput
538
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput
539
+ update?: Prisma.XOR<Prisma.XOR<Prisma.KnowledgeBaseUpdateToOneWithWhereWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUpdateWithoutWorkspaceLinksInput>, Prisma.KnowledgeBaseUncheckedUpdateWithoutWorkspaceLinksInput>
540
+ }
541
+
521
542
  export type KnowledgeBaseCreateNestedOneWithoutDocumentsInput = {
522
543
  create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedCreateWithoutDocumentsInput>
523
544
  connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutDocumentsInput
@@ -545,6 +566,7 @@ export type KnowledgeBaseCreateWithoutUserInput = {
545
566
  updatedAt?: Date | string
546
567
  documents?: Prisma.KnowledgeDocumentCreateNestedManyWithoutKbInput
547
568
  projectLinks?: Prisma.ProjectKnowledgeBaseCreateNestedManyWithoutKbInput
569
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKbInput
548
570
  }
549
571
 
550
572
  export type KnowledgeBaseUncheckedCreateWithoutUserInput = {
@@ -560,6 +582,7 @@ export type KnowledgeBaseUncheckedCreateWithoutUserInput = {
560
582
  updatedAt?: Date | string
561
583
  documents?: Prisma.KnowledgeDocumentUncheckedCreateNestedManyWithoutKbInput
562
584
  projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
585
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
563
586
  }
564
587
 
565
588
  export type KnowledgeBaseCreateOrConnectWithoutUserInput = {
@@ -617,6 +640,7 @@ export type KnowledgeBaseCreateWithoutProjectLinksInput = {
617
640
  updatedAt?: Date | string
618
641
  user: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput
619
642
  documents?: Prisma.KnowledgeDocumentCreateNestedManyWithoutKbInput
643
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKbInput
620
644
  }
621
645
 
622
646
  export type KnowledgeBaseUncheckedCreateWithoutProjectLinksInput = {
@@ -632,6 +656,7 @@ export type KnowledgeBaseUncheckedCreateWithoutProjectLinksInput = {
632
656
  createdAt?: Date | string
633
657
  updatedAt?: Date | string
634
658
  documents?: Prisma.KnowledgeDocumentUncheckedCreateNestedManyWithoutKbInput
659
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
635
660
  }
636
661
 
637
662
  export type KnowledgeBaseCreateOrConnectWithoutProjectLinksInput = {
@@ -663,6 +688,7 @@ export type KnowledgeBaseUpdateWithoutProjectLinksInput = {
663
688
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
664
689
  user?: Prisma.UserUpdateOneRequiredWithoutKnowledgeBasesNestedInput
665
690
  documents?: Prisma.KnowledgeDocumentUpdateManyWithoutKbNestedInput
691
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKbNestedInput
666
692
  }
667
693
 
668
694
  export type KnowledgeBaseUncheckedUpdateWithoutProjectLinksInput = {
@@ -678,6 +704,87 @@ export type KnowledgeBaseUncheckedUpdateWithoutProjectLinksInput = {
678
704
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
679
705
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
680
706
  documents?: Prisma.KnowledgeDocumentUncheckedUpdateManyWithoutKbNestedInput
707
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
708
+ }
709
+
710
+ export type KnowledgeBaseCreateWithoutWorkspaceLinksInput = {
711
+ id?: string
712
+ name: string
713
+ description?: string | null
714
+ icon?: string
715
+ tags?: Prisma.JsonNullValueInput | runtime.InputJsonValue
716
+ visibility?: string
717
+ pinnedToSidebar?: boolean
718
+ isDeleted?: boolean
719
+ createdAt?: Date | string
720
+ updatedAt?: Date | string
721
+ user: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput
722
+ documents?: Prisma.KnowledgeDocumentCreateNestedManyWithoutKbInput
723
+ projectLinks?: Prisma.ProjectKnowledgeBaseCreateNestedManyWithoutKbInput
724
+ }
725
+
726
+ export type KnowledgeBaseUncheckedCreateWithoutWorkspaceLinksInput = {
727
+ id?: string
728
+ name: string
729
+ description?: string | null
730
+ icon?: string
731
+ tags?: Prisma.JsonNullValueInput | runtime.InputJsonValue
732
+ visibility?: string
733
+ userId: string
734
+ pinnedToSidebar?: boolean
735
+ isDeleted?: boolean
736
+ createdAt?: Date | string
737
+ updatedAt?: Date | string
738
+ documents?: Prisma.KnowledgeDocumentUncheckedCreateNestedManyWithoutKbInput
739
+ projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
740
+ }
741
+
742
+ export type KnowledgeBaseCreateOrConnectWithoutWorkspaceLinksInput = {
743
+ where: Prisma.KnowledgeBaseWhereUniqueInput
744
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspaceLinksInput>
745
+ }
746
+
747
+ export type KnowledgeBaseUpsertWithoutWorkspaceLinksInput = {
748
+ update: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutWorkspaceLinksInput>
749
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspaceLinksInput>
750
+ where?: Prisma.KnowledgeBaseWhereInput
751
+ }
752
+
753
+ export type KnowledgeBaseUpdateToOneWithWhereWithoutWorkspaceLinksInput = {
754
+ where?: Prisma.KnowledgeBaseWhereInput
755
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutWorkspaceLinksInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutWorkspaceLinksInput>
756
+ }
757
+
758
+ export type KnowledgeBaseUpdateWithoutWorkspaceLinksInput = {
759
+ id?: Prisma.StringFieldUpdateOperationsInput | string
760
+ name?: Prisma.StringFieldUpdateOperationsInput | string
761
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
762
+ icon?: Prisma.StringFieldUpdateOperationsInput | string
763
+ tags?: Prisma.JsonNullValueInput | runtime.InputJsonValue
764
+ visibility?: Prisma.StringFieldUpdateOperationsInput | string
765
+ pinnedToSidebar?: Prisma.BoolFieldUpdateOperationsInput | boolean
766
+ isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
767
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
768
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
769
+ user?: Prisma.UserUpdateOneRequiredWithoutKnowledgeBasesNestedInput
770
+ documents?: Prisma.KnowledgeDocumentUpdateManyWithoutKbNestedInput
771
+ projectLinks?: Prisma.ProjectKnowledgeBaseUpdateManyWithoutKbNestedInput
772
+ }
773
+
774
+ export type KnowledgeBaseUncheckedUpdateWithoutWorkspaceLinksInput = {
775
+ id?: Prisma.StringFieldUpdateOperationsInput | string
776
+ name?: Prisma.StringFieldUpdateOperationsInput | string
777
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
778
+ icon?: Prisma.StringFieldUpdateOperationsInput | string
779
+ tags?: Prisma.JsonNullValueInput | runtime.InputJsonValue
780
+ visibility?: Prisma.StringFieldUpdateOperationsInput | string
781
+ userId?: Prisma.StringFieldUpdateOperationsInput | string
782
+ pinnedToSidebar?: Prisma.BoolFieldUpdateOperationsInput | boolean
783
+ isDeleted?: Prisma.BoolFieldUpdateOperationsInput | boolean
784
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
785
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
786
+ documents?: Prisma.KnowledgeDocumentUncheckedUpdateManyWithoutKbNestedInput
787
+ projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
681
788
  }
682
789
 
683
790
  export type KnowledgeBaseCreateWithoutDocumentsInput = {
@@ -693,6 +800,7 @@ export type KnowledgeBaseCreateWithoutDocumentsInput = {
693
800
  updatedAt?: Date | string
694
801
  user: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput
695
802
  projectLinks?: Prisma.ProjectKnowledgeBaseCreateNestedManyWithoutKbInput
803
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKbInput
696
804
  }
697
805
 
698
806
  export type KnowledgeBaseUncheckedCreateWithoutDocumentsInput = {
@@ -708,6 +816,7 @@ export type KnowledgeBaseUncheckedCreateWithoutDocumentsInput = {
708
816
  createdAt?: Date | string
709
817
  updatedAt?: Date | string
710
818
  projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
819
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKbInput
711
820
  }
712
821
 
713
822
  export type KnowledgeBaseCreateOrConnectWithoutDocumentsInput = {
@@ -739,6 +848,7 @@ export type KnowledgeBaseUpdateWithoutDocumentsInput = {
739
848
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
740
849
  user?: Prisma.UserUpdateOneRequiredWithoutKnowledgeBasesNestedInput
741
850
  projectLinks?: Prisma.ProjectKnowledgeBaseUpdateManyWithoutKbNestedInput
851
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKbNestedInput
742
852
  }
743
853
 
744
854
  export type KnowledgeBaseUncheckedUpdateWithoutDocumentsInput = {
@@ -754,6 +864,7 @@ export type KnowledgeBaseUncheckedUpdateWithoutDocumentsInput = {
754
864
  createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
755
865
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
756
866
  projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
867
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
757
868
  }
758
869
 
759
870
  export type KnowledgeBaseCreateManyUserInput = {
@@ -782,6 +893,7 @@ export type KnowledgeBaseUpdateWithoutUserInput = {
782
893
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
783
894
  documents?: Prisma.KnowledgeDocumentUpdateManyWithoutKbNestedInput
784
895
  projectLinks?: Prisma.ProjectKnowledgeBaseUpdateManyWithoutKbNestedInput
896
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKbNestedInput
785
897
  }
786
898
 
787
899
  export type KnowledgeBaseUncheckedUpdateWithoutUserInput = {
@@ -797,6 +909,7 @@ export type KnowledgeBaseUncheckedUpdateWithoutUserInput = {
797
909
  updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
798
910
  documents?: Prisma.KnowledgeDocumentUncheckedUpdateManyWithoutKbNestedInput
799
911
  projectLinks?: Prisma.ProjectKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
912
+ workspaceLinks?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKbNestedInput
800
913
  }
801
914
 
802
915
  export type KnowledgeBaseUncheckedUpdateManyWithoutUserInput = {
@@ -820,11 +933,13 @@ export type KnowledgeBaseUncheckedUpdateManyWithoutUserInput = {
820
933
  export type KnowledgeBaseCountOutputType = {
821
934
  documents: number
822
935
  projectLinks: number
936
+ workspaceLinks: number
823
937
  }
824
938
 
825
939
  export type KnowledgeBaseCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
826
940
  documents?: boolean | KnowledgeBaseCountOutputTypeCountDocumentsArgs
827
941
  projectLinks?: boolean | KnowledgeBaseCountOutputTypeCountProjectLinksArgs
942
+ workspaceLinks?: boolean | KnowledgeBaseCountOutputTypeCountWorkspaceLinksArgs
828
943
  }
829
944
 
830
945
  /**
@@ -851,6 +966,13 @@ export type KnowledgeBaseCountOutputTypeCountProjectLinksArgs<ExtArgs extends ru
851
966
  where?: Prisma.ProjectKnowledgeBaseWhereInput
852
967
  }
853
968
 
969
+ /**
970
+ * KnowledgeBaseCountOutputType without action
971
+ */
972
+ export type KnowledgeBaseCountOutputTypeCountWorkspaceLinksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
973
+ where?: Prisma.WorkspaceKnowledgeBaseWhereInput
974
+ }
975
+
854
976
 
855
977
  export type KnowledgeBaseSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
856
978
  id?: boolean
@@ -867,6 +989,7 @@ export type KnowledgeBaseSelect<ExtArgs extends runtime.Types.Extensions.Interna
867
989
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
868
990
  documents?: boolean | Prisma.KnowledgeBase$documentsArgs<ExtArgs>
869
991
  projectLinks?: boolean | Prisma.KnowledgeBase$projectLinksArgs<ExtArgs>
992
+ workspaceLinks?: boolean | Prisma.KnowledgeBase$workspaceLinksArgs<ExtArgs>
870
993
  _count?: boolean | Prisma.KnowledgeBaseCountOutputTypeDefaultArgs<ExtArgs>
871
994
  }, ExtArgs["result"]["knowledgeBase"]>
872
995
 
@@ -919,6 +1042,7 @@ export type KnowledgeBaseInclude<ExtArgs extends runtime.Types.Extensions.Intern
919
1042
  user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
920
1043
  documents?: boolean | Prisma.KnowledgeBase$documentsArgs<ExtArgs>
921
1044
  projectLinks?: boolean | Prisma.KnowledgeBase$projectLinksArgs<ExtArgs>
1045
+ workspaceLinks?: boolean | Prisma.KnowledgeBase$workspaceLinksArgs<ExtArgs>
922
1046
  _count?: boolean | Prisma.KnowledgeBaseCountOutputTypeDefaultArgs<ExtArgs>
923
1047
  }
924
1048
  export type KnowledgeBaseIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
@@ -934,6 +1058,7 @@ export type $KnowledgeBasePayload<ExtArgs extends runtime.Types.Extensions.Inter
934
1058
  user: Prisma.$UserPayload<ExtArgs>
935
1059
  documents: Prisma.$KnowledgeDocumentPayload<ExtArgs>[]
936
1060
  projectLinks: Prisma.$ProjectKnowledgeBasePayload<ExtArgs>[]
1061
+ workspaceLinks: Prisma.$WorkspaceKnowledgeBasePayload<ExtArgs>[]
937
1062
  }
938
1063
  scalars: runtime.Types.Extensions.GetPayloadResult<{
939
1064
  id: string
@@ -1344,6 +1469,7 @@ export interface Prisma__KnowledgeBaseClient<T, Null = never, ExtArgs extends ru
1344
1469
  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>
1345
1470
  documents<T extends Prisma.KnowledgeBase$documentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBase$documentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeDocumentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1346
1471
  projectLinks<T extends Prisma.KnowledgeBase$projectLinksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBase$projectLinksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProjectKnowledgeBasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1472
+ workspaceLinks<T extends Prisma.KnowledgeBase$workspaceLinksArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBase$workspaceLinksArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$WorkspaceKnowledgeBasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
1347
1473
  /**
1348
1474
  * Attaches callbacks for the resolution and/or rejection of the Promise.
1349
1475
  * @param onfulfilled The callback to execute when the Promise is resolved.
@@ -1830,6 +1956,30 @@ export type KnowledgeBase$projectLinksArgs<ExtArgs extends runtime.Types.Extensi
1830
1956
  distinct?: Prisma.ProjectKnowledgeBaseScalarFieldEnum | Prisma.ProjectKnowledgeBaseScalarFieldEnum[]
1831
1957
  }
1832
1958
 
1959
+ /**
1960
+ * KnowledgeBase.workspaceLinks
1961
+ */
1962
+ export type KnowledgeBase$workspaceLinksArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1963
+ /**
1964
+ * Select specific fields to fetch from the WorkspaceKnowledgeBase
1965
+ */
1966
+ select?: Prisma.WorkspaceKnowledgeBaseSelect<ExtArgs> | null
1967
+ /**
1968
+ * Omit specific fields from the WorkspaceKnowledgeBase
1969
+ */
1970
+ omit?: Prisma.WorkspaceKnowledgeBaseOmit<ExtArgs> | null
1971
+ /**
1972
+ * Choose, which related nodes to fetch as well
1973
+ */
1974
+ include?: Prisma.WorkspaceKnowledgeBaseInclude<ExtArgs> | null
1975
+ where?: Prisma.WorkspaceKnowledgeBaseWhereInput
1976
+ orderBy?: Prisma.WorkspaceKnowledgeBaseOrderByWithRelationInput | Prisma.WorkspaceKnowledgeBaseOrderByWithRelationInput[]
1977
+ cursor?: Prisma.WorkspaceKnowledgeBaseWhereUniqueInput
1978
+ take?: number
1979
+ skip?: number
1980
+ distinct?: Prisma.WorkspaceKnowledgeBaseScalarFieldEnum | Prisma.WorkspaceKnowledgeBaseScalarFieldEnum[]
1981
+ }
1982
+
1833
1983
  /**
1834
1984
  * KnowledgeBase without action
1835
1985
  */