@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.
- package/generated/browser.ts +35 -0
- package/generated/client.ts +35 -0
- package/generated/internal/class.ts +74 -4
- package/generated/internal/prismaNamespace.ts +634 -2
- package/generated/internal/prismaNamespaceBrowser.ts +108 -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/KnowledgeBase.ts +158 -0
- package/generated/models/KnowledgeDocument.ts +176 -0
- package/generated/models/NotificationPreference.ts +27 -1
- package/generated/models/OAuthProviderConfig.ts +1227 -0
- package/generated/models/User.ts +2405 -493
- package/generated/models/Workspace.ts +380 -0
- package/generated/models/WorkspaceKnowledgeBase.ts +1430 -0
- package/generated/models/WorkspaceQuickDoc.ts +2030 -0
- package/generated/models.ts +7 -0
- package/generated-sqlite/browser.ts +40 -0
- package/generated-sqlite/client.ts +40 -0
- package/generated-sqlite/internal/class.ts +84 -4
- package/generated-sqlite/internal/prismaNamespace.ts +722 -3
- package/generated-sqlite/internal/prismaNamespaceBrowser.ts +121 -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/KnowledgeBase.ts +150 -0
- package/generated-sqlite/models/KnowledgeDocument.ts +168 -0
- package/generated-sqlite/models/NotificationPreference.ts +1313 -0
- package/generated-sqlite/models/OAuthProviderConfig.ts +1225 -0
- package/generated-sqlite/models/User.ts +2252 -160
- package/generated-sqlite/models/Workspace.ts +300 -0
- package/generated-sqlite/models/WorkspaceKnowledgeBase.ts +1426 -0
- package/generated-sqlite/models/WorkspaceQuickDoc.ts +2025 -0
- package/generated-sqlite/models.ts +8 -0
- package/migrations/20260909070745_workspace_kb_card/migration.sql +55 -0
- package/migrations/20260909123637_workspace_quick_doc_column_index/migration.sql +2 -0
- package/migrations/20260909123656_workspace_quick_doc_column_backfill/migration.sql +4 -0
- package/migrations/20260909144328_workspace_quick_doc_label/migration.sql +2 -0
- package/migrations/20260909154315_workspace_quick_doc_icon/migration.sql +2 -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 +141 -14
- package/schema.sqlite.prisma +141 -6
|
@@ -69,8 +69,15 @@ export const ModelName = {
|
|
|
69
69
|
InvitationCode: 'InvitationCode',
|
|
70
70
|
InvitationUse: 'InvitationUse',
|
|
71
71
|
PasswordResetToken: 'PasswordResetToken',
|
|
72
|
+
EmailVerificationToken: 'EmailVerificationToken',
|
|
73
|
+
EmailLog: 'EmailLog',
|
|
74
|
+
EmailPreference: 'EmailPreference',
|
|
75
|
+
OAuthProviderConfig: 'OAuthProviderConfig',
|
|
76
|
+
EmailSubscriber: 'EmailSubscriber',
|
|
72
77
|
KnowledgeBase: 'KnowledgeBase',
|
|
73
78
|
ProjectKnowledgeBase: 'ProjectKnowledgeBase',
|
|
79
|
+
WorkspaceKnowledgeBase: 'WorkspaceKnowledgeBase',
|
|
80
|
+
WorkspaceQuickDoc: 'WorkspaceQuickDoc',
|
|
74
81
|
KnowledgeDocument: 'KnowledgeDocument',
|
|
75
82
|
PRD: 'PRD',
|
|
76
83
|
AgentConversation: 'AgentConversation',
|
|
@@ -132,7 +139,8 @@ export const ModelName = {
|
|
|
132
139
|
DeveloperLog: 'DeveloperLog',
|
|
133
140
|
Story: 'Story',
|
|
134
141
|
Iteration: 'Iteration',
|
|
135
|
-
IterationAutoSchedule: 'IterationAutoSchedule'
|
|
142
|
+
IterationAutoSchedule: 'IterationAutoSchedule',
|
|
143
|
+
NotificationPreference: 'NotificationPreference'
|
|
136
144
|
} as const
|
|
137
145
|
|
|
138
146
|
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
|
@@ -383,7 +391,9 @@ export const InvitationCodeScalarFieldEnum = {
|
|
|
383
391
|
maxUses: 'maxUses',
|
|
384
392
|
usedCount: 'usedCount',
|
|
385
393
|
expiresAt: 'expiresAt',
|
|
386
|
-
createdAt: 'createdAt'
|
|
394
|
+
createdAt: 'createdAt',
|
|
395
|
+
createdById: 'createdById',
|
|
396
|
+
disabledAt: 'disabledAt'
|
|
387
397
|
} as const
|
|
388
398
|
|
|
389
399
|
export type InvitationCodeScalarFieldEnum = (typeof InvitationCodeScalarFieldEnum)[keyof typeof InvitationCodeScalarFieldEnum]
|
|
@@ -411,6 +421,74 @@ export const PasswordResetTokenScalarFieldEnum = {
|
|
|
411
421
|
export type PasswordResetTokenScalarFieldEnum = (typeof PasswordResetTokenScalarFieldEnum)[keyof typeof PasswordResetTokenScalarFieldEnum]
|
|
412
422
|
|
|
413
423
|
|
|
424
|
+
export const EmailVerificationTokenScalarFieldEnum = {
|
|
425
|
+
id: 'id',
|
|
426
|
+
token: 'token',
|
|
427
|
+
userId: 'userId',
|
|
428
|
+
expiresAt: 'expiresAt',
|
|
429
|
+
usedAt: 'usedAt',
|
|
430
|
+
createdAt: 'createdAt'
|
|
431
|
+
} as const
|
|
432
|
+
|
|
433
|
+
export type EmailVerificationTokenScalarFieldEnum = (typeof EmailVerificationTokenScalarFieldEnum)[keyof typeof EmailVerificationTokenScalarFieldEnum]
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
export const EmailLogScalarFieldEnum = {
|
|
437
|
+
id: 'id',
|
|
438
|
+
to: 'to',
|
|
439
|
+
templateKey: 'templateKey',
|
|
440
|
+
category: 'category',
|
|
441
|
+
status: 'status',
|
|
442
|
+
provider: 'provider',
|
|
443
|
+
messageId: 'messageId',
|
|
444
|
+
dedupeKey: 'dedupeKey',
|
|
445
|
+
error: 'error',
|
|
446
|
+
userId: 'userId',
|
|
447
|
+
createdAt: 'createdAt',
|
|
448
|
+
sentAt: 'sentAt'
|
|
449
|
+
} as const
|
|
450
|
+
|
|
451
|
+
export type EmailLogScalarFieldEnum = (typeof EmailLogScalarFieldEnum)[keyof typeof EmailLogScalarFieldEnum]
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
export const EmailPreferenceScalarFieldEnum = {
|
|
455
|
+
userId: 'userId',
|
|
456
|
+
unsubscribedAll: 'unsubscribedAll',
|
|
457
|
+
unsubscribedCategories: 'unsubscribedCategories',
|
|
458
|
+
suppressed: 'suppressed'
|
|
459
|
+
} as const
|
|
460
|
+
|
|
461
|
+
export type EmailPreferenceScalarFieldEnum = (typeof EmailPreferenceScalarFieldEnum)[keyof typeof EmailPreferenceScalarFieldEnum]
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
export const OAuthProviderConfigScalarFieldEnum = {
|
|
465
|
+
id: 'id',
|
|
466
|
+
provider: 'provider',
|
|
467
|
+
clientId: 'clientId',
|
|
468
|
+
clientSecret: 'clientSecret',
|
|
469
|
+
enabled: 'enabled',
|
|
470
|
+
extra: 'extra',
|
|
471
|
+
createdAt: 'createdAt',
|
|
472
|
+
updatedAt: 'updatedAt'
|
|
473
|
+
} as const
|
|
474
|
+
|
|
475
|
+
export type OAuthProviderConfigScalarFieldEnum = (typeof OAuthProviderConfigScalarFieldEnum)[keyof typeof OAuthProviderConfigScalarFieldEnum]
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
export const EmailSubscriberScalarFieldEnum = {
|
|
479
|
+
id: 'id',
|
|
480
|
+
email: 'email',
|
|
481
|
+
locale: 'locale',
|
|
482
|
+
confirmToken: 'confirmToken',
|
|
483
|
+
confirmedAt: 'confirmedAt',
|
|
484
|
+
unsubscribedAt: 'unsubscribedAt',
|
|
485
|
+
source: 'source',
|
|
486
|
+
createdAt: 'createdAt'
|
|
487
|
+
} as const
|
|
488
|
+
|
|
489
|
+
export type EmailSubscriberScalarFieldEnum = (typeof EmailSubscriberScalarFieldEnum)[keyof typeof EmailSubscriberScalarFieldEnum]
|
|
490
|
+
|
|
491
|
+
|
|
414
492
|
export const KnowledgeBaseScalarFieldEnum = {
|
|
415
493
|
id: 'id',
|
|
416
494
|
name: 'name',
|
|
@@ -438,6 +516,35 @@ export const ProjectKnowledgeBaseScalarFieldEnum = {
|
|
|
438
516
|
export type ProjectKnowledgeBaseScalarFieldEnum = (typeof ProjectKnowledgeBaseScalarFieldEnum)[keyof typeof ProjectKnowledgeBaseScalarFieldEnum]
|
|
439
517
|
|
|
440
518
|
|
|
519
|
+
export const WorkspaceKnowledgeBaseScalarFieldEnum = {
|
|
520
|
+
id: 'id',
|
|
521
|
+
workspaceId: 'workspaceId',
|
|
522
|
+
kbId: 'kbId',
|
|
523
|
+
createdAt: 'createdAt'
|
|
524
|
+
} as const
|
|
525
|
+
|
|
526
|
+
export type WorkspaceKnowledgeBaseScalarFieldEnum = (typeof WorkspaceKnowledgeBaseScalarFieldEnum)[keyof typeof WorkspaceKnowledgeBaseScalarFieldEnum]
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
export const WorkspaceQuickDocScalarFieldEnum = {
|
|
530
|
+
id: 'id',
|
|
531
|
+
workspaceId: 'workspaceId',
|
|
532
|
+
docId: 'docId',
|
|
533
|
+
externalGroup: 'externalGroup',
|
|
534
|
+
externalId: 'externalId',
|
|
535
|
+
displayTitle: 'displayTitle',
|
|
536
|
+
columnIndex: 'columnIndex',
|
|
537
|
+
sortOrder: 'sortOrder',
|
|
538
|
+
label: 'label',
|
|
539
|
+
icon: 'icon',
|
|
540
|
+
createdBy: 'createdBy',
|
|
541
|
+
createdAt: 'createdAt',
|
|
542
|
+
updatedAt: 'updatedAt'
|
|
543
|
+
} as const
|
|
544
|
+
|
|
545
|
+
export type WorkspaceQuickDocScalarFieldEnum = (typeof WorkspaceQuickDocScalarFieldEnum)[keyof typeof WorkspaceQuickDocScalarFieldEnum]
|
|
546
|
+
|
|
547
|
+
|
|
441
548
|
export const KnowledgeDocumentScalarFieldEnum = {
|
|
442
549
|
id: 'id',
|
|
443
550
|
kbId: 'kbId',
|
|
@@ -1475,6 +1582,18 @@ export const IterationAutoScheduleScalarFieldEnum = {
|
|
|
1475
1582
|
export type IterationAutoScheduleScalarFieldEnum = (typeof IterationAutoScheduleScalarFieldEnum)[keyof typeof IterationAutoScheduleScalarFieldEnum]
|
|
1476
1583
|
|
|
1477
1584
|
|
|
1585
|
+
export const NotificationPreferenceScalarFieldEnum = {
|
|
1586
|
+
userId: 'userId',
|
|
1587
|
+
categories: 'categories',
|
|
1588
|
+
emailCategories: 'emailCategories',
|
|
1589
|
+
dndEnabled: 'dndEnabled',
|
|
1590
|
+
dndStart: 'dndStart',
|
|
1591
|
+
dndEnd: 'dndEnd'
|
|
1592
|
+
} as const
|
|
1593
|
+
|
|
1594
|
+
export type NotificationPreferenceScalarFieldEnum = (typeof NotificationPreferenceScalarFieldEnum)[keyof typeof NotificationPreferenceScalarFieldEnum]
|
|
1595
|
+
|
|
1596
|
+
|
|
1478
1597
|
export const SortOrder = {
|
|
1479
1598
|
asc: 'asc',
|
|
1480
1599
|
desc: 'desc'
|