@goscribe/server 1.6.0 → 1.7.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 (281) hide show
  1. package/dist/generated/prisma/client.d.ts +224 -0
  2. package/dist/generated/prisma/client.js +34 -0
  3. package/dist/generated/prisma/commonInputTypes.d.ts +941 -0
  4. package/dist/generated/prisma/commonInputTypes.js +10 -0
  5. package/dist/generated/prisma/enums.d.ts +67 -0
  6. package/dist/generated/prisma/enums.js +66 -0
  7. package/dist/generated/prisma/internal/class.d.ts +539 -0
  8. package/dist/generated/prisma/internal/class.js +49 -0
  9. package/dist/generated/prisma/internal/prismaNamespace.d.ts +3924 -0
  10. package/dist/generated/prisma/internal/prismaNamespace.js +557 -0
  11. package/dist/generated/prisma/models/ActivityLog.d.ts +1847 -0
  12. package/dist/generated/prisma/models/ActivityLog.js +1 -0
  13. package/dist/generated/prisma/models/Artifact.d.ts +2345 -0
  14. package/dist/generated/prisma/models/Artifact.js +1 -0
  15. package/dist/generated/prisma/models/ArtifactVersion.d.ts +1550 -0
  16. package/dist/generated/prisma/models/ArtifactVersion.js +1 -0
  17. package/dist/generated/prisma/models/Channel.d.ts +1257 -0
  18. package/dist/generated/prisma/models/Channel.js +1 -0
  19. package/dist/generated/prisma/models/Chat.d.ts +1339 -0
  20. package/dist/generated/prisma/models/Chat.js +1 -0
  21. package/dist/generated/prisma/models/CopilotConversation.d.ts +1450 -0
  22. package/dist/generated/prisma/models/CopilotConversation.js +1 -0
  23. package/dist/generated/prisma/models/CopilotMessage.d.ts +1179 -0
  24. package/dist/generated/prisma/models/CopilotMessage.js +1 -0
  25. package/dist/generated/prisma/models/FileAsset.d.ts +1832 -0
  26. package/dist/generated/prisma/models/FileAsset.js +1 -0
  27. package/dist/generated/prisma/models/Flashcard.d.ts +1460 -0
  28. package/dist/generated/prisma/models/Flashcard.js +1 -0
  29. package/dist/generated/prisma/models/FlashcardProgress.d.ts +1782 -0
  30. package/dist/generated/prisma/models/FlashcardProgress.js +1 -0
  31. package/dist/generated/prisma/models/Folder.d.ts +1685 -0
  32. package/dist/generated/prisma/models/Folder.js +1 -0
  33. package/dist/generated/prisma/models/IdempotencyRecord.d.ts +1319 -0
  34. package/dist/generated/prisma/models/IdempotencyRecord.js +1 -0
  35. package/dist/generated/prisma/models/Invoice.d.ts +1586 -0
  36. package/dist/generated/prisma/models/Invoice.js +1 -0
  37. package/dist/generated/prisma/models/KnowledgeBase.d.ts +1721 -0
  38. package/dist/generated/prisma/models/KnowledgeBase.js +1 -0
  39. package/dist/generated/prisma/models/KnowledgeBaseChunk.d.ts +1333 -0
  40. package/dist/generated/prisma/models/KnowledgeBaseChunk.js +1 -0
  41. package/dist/generated/prisma/models/KnowledgeBaseDocument.d.ts +1695 -0
  42. package/dist/generated/prisma/models/KnowledgeBaseDocument.js +1 -0
  43. package/dist/generated/prisma/models/Notification.d.ts +1992 -0
  44. package/dist/generated/prisma/models/Notification.js +1 -0
  45. package/dist/generated/prisma/models/PasswordResetToken.d.ts +1210 -0
  46. package/dist/generated/prisma/models/PasswordResetToken.js +1 -0
  47. package/dist/generated/prisma/models/Plan.d.ts +1431 -0
  48. package/dist/generated/prisma/models/Plan.js +1 -0
  49. package/dist/generated/prisma/models/PlanLimit.d.ts +1328 -0
  50. package/dist/generated/prisma/models/PlanLimit.js +1 -0
  51. package/dist/generated/prisma/models/PodcastSegment.d.ts +1564 -0
  52. package/dist/generated/prisma/models/PodcastSegment.js +1 -0
  53. package/dist/generated/prisma/models/ResourcePrice.d.ts +1008 -0
  54. package/dist/generated/prisma/models/ResourcePrice.js +1 -0
  55. package/dist/generated/prisma/models/Role.d.ts +1065 -0
  56. package/dist/generated/prisma/models/Role.js +1 -0
  57. package/dist/generated/prisma/models/Session.d.ts +1105 -0
  58. package/dist/generated/prisma/models/Session.js +1 -0
  59. package/dist/generated/prisma/models/StripeEvent.d.ts +1081 -0
  60. package/dist/generated/prisma/models/StripeEvent.js +1 -0
  61. package/dist/generated/prisma/models/StudyGuideComment.d.ts +1321 -0
  62. package/dist/generated/prisma/models/StudyGuideComment.js +1 -0
  63. package/dist/generated/prisma/models/StudyGuideHighlight.d.ts +1629 -0
  64. package/dist/generated/prisma/models/StudyGuideHighlight.js +1 -0
  65. package/dist/generated/prisma/models/Subscription.d.ts +1677 -0
  66. package/dist/generated/prisma/models/Subscription.js +1 -0
  67. package/dist/generated/prisma/models/User.d.ts +7559 -0
  68. package/dist/generated/prisma/models/User.js +1 -0
  69. package/dist/generated/prisma/models/UserCredit.d.ts +1249 -0
  70. package/dist/generated/prisma/models/UserCredit.js +1 -0
  71. package/dist/generated/prisma/models/VerificationToken.d.ts +946 -0
  72. package/dist/generated/prisma/models/VerificationToken.js +1 -0
  73. package/dist/generated/prisma/models/WorksheetPreset.d.ts +1433 -0
  74. package/dist/generated/prisma/models/WorksheetPreset.js +1 -0
  75. package/dist/generated/prisma/models/WorksheetQuestion.d.ts +1491 -0
  76. package/dist/generated/prisma/models/WorksheetQuestion.js +1 -0
  77. package/dist/generated/prisma/models/WorksheetQuestionProgress.d.ts +1620 -0
  78. package/dist/generated/prisma/models/WorksheetQuestionProgress.js +1 -0
  79. package/dist/generated/prisma/models/Workspace.d.ts +3620 -0
  80. package/dist/generated/prisma/models/Workspace.js +1 -0
  81. package/dist/generated/prisma/models/WorkspaceInvitation.d.ts +1490 -0
  82. package/dist/generated/prisma/models/WorkspaceInvitation.js +1 -0
  83. package/dist/generated/prisma/models/WorkspaceKnowledgeBase.d.ts +1410 -0
  84. package/dist/generated/prisma/models/WorkspaceKnowledgeBase.js +1 -0
  85. package/dist/generated/prisma/models/WorkspaceMember.d.ts +1326 -0
  86. package/dist/generated/prisma/models/WorkspaceMember.js +1 -0
  87. package/dist/generated/prisma/models.d.ts +39 -0
  88. package/dist/generated/prisma/models.js +1 -0
  89. package/dist/src/context.d.ts +27 -0
  90. package/dist/src/context.js +33 -0
  91. package/dist/src/index.d.ts +3 -0
  92. package/dist/src/index.js +1 -0
  93. package/dist/src/lib/ai/config.d.ts +20 -0
  94. package/dist/src/lib/ai/config.js +31 -0
  95. package/dist/src/lib/ai/embedding-client.d.ts +8 -0
  96. package/dist/src/lib/ai/embedding-client.js +30 -0
  97. package/dist/src/lib/ai/index.d.ts +48 -0
  98. package/dist/src/lib/ai/index.js +29 -0
  99. package/dist/src/lib/ai/inference-backend/client.d.ts +28 -0
  100. package/dist/src/lib/ai/inference-backend/client.js +301 -0
  101. package/dist/src/lib/ai/inference-backend/mocks.d.ts +12 -0
  102. package/dist/src/lib/ai/inference-backend/mocks.js +133 -0
  103. package/dist/src/lib/ai/inference-backend/types.d.ts +44 -0
  104. package/dist/src/lib/ai/inference-backend/types.js +1 -0
  105. package/dist/src/lib/ai/json-parse.d.ts +2 -0
  106. package/dist/src/lib/ai/json-parse.js +34 -0
  107. package/dist/src/lib/ai/llm-client.d.ts +7 -0
  108. package/dist/src/lib/ai/llm-client.js +36 -0
  109. package/dist/src/lib/ai/mock.d.ts +2 -0
  110. package/dist/src/lib/ai/mock.js +10 -0
  111. package/dist/src/lib/ai/types.d.ts +9 -0
  112. package/dist/src/lib/ai/types.js +1 -0
  113. package/dist/src/lib/auth.d.ts +36 -0
  114. package/dist/src/lib/auth.js +117 -0
  115. package/dist/src/lib/chunking.d.ts +19 -0
  116. package/dist/src/lib/chunking.js +47 -0
  117. package/dist/src/lib/constants.d.ts +13 -0
  118. package/dist/src/lib/constants.js +12 -0
  119. package/dist/src/lib/curated-kb-seed.d.ts +12 -0
  120. package/dist/src/lib/curated-kb-seed.js +155 -0
  121. package/dist/src/lib/email.d.ts +11 -0
  122. package/dist/src/lib/email.js +152 -0
  123. package/dist/src/lib/embeddings.d.ts +2 -0
  124. package/dist/src/lib/embeddings.js +1 -0
  125. package/dist/src/lib/ensure-curated-kb-catalog.d.ts +6 -0
  126. package/dist/src/lib/ensure-curated-kb-catalog.js +53 -0
  127. package/dist/src/lib/env.d.ts +41 -0
  128. package/dist/src/lib/env.js +57 -0
  129. package/dist/src/lib/errors.d.ts +33 -0
  130. package/dist/src/lib/errors.js +78 -0
  131. package/dist/src/lib/file.d.ts +0 -0
  132. package/dist/src/lib/file.js +1 -0
  133. package/dist/src/lib/inference.d.ts +1 -0
  134. package/dist/src/lib/inference.js +1 -0
  135. package/dist/src/lib/kb-meta.d.ts +8 -0
  136. package/dist/src/lib/kb-meta.js +77 -0
  137. package/dist/src/lib/logger.d.ts +62 -0
  138. package/dist/src/lib/logger.js +364 -0
  139. package/dist/src/lib/pdf.d.ts +11 -0
  140. package/dist/src/lib/pdf.js +11 -0
  141. package/dist/src/lib/prisma.d.ts +3 -0
  142. package/dist/src/lib/prisma.js +15 -0
  143. package/dist/src/lib/pusher.d.ts +38 -0
  144. package/dist/src/lib/pusher.js +170 -0
  145. package/dist/src/lib/retry.d.ts +15 -0
  146. package/dist/src/lib/retry.js +37 -0
  147. package/dist/src/lib/storage.d.ts +11 -0
  148. package/dist/src/lib/storage.js +71 -0
  149. package/dist/src/lib/stripe.d.ts +10 -0
  150. package/dist/src/lib/stripe.js +36 -0
  151. package/dist/src/lib/validation.d.ts +51 -0
  152. package/dist/src/lib/validation.js +64 -0
  153. package/dist/src/lib/workspace-kb.d.ts +5 -0
  154. package/dist/src/lib/workspace-kb.js +7 -0
  155. package/dist/src/repositories/artifact.repository.d.ts +64 -0
  156. package/dist/src/repositories/artifact.repository.js +40 -0
  157. package/dist/src/repositories/base.repository.d.ts +14 -0
  158. package/dist/src/repositories/base.repository.js +14 -0
  159. package/dist/src/repositories/invitation.repository.d.ts +104 -0
  160. package/dist/src/repositories/invitation.repository.js +44 -0
  161. package/dist/src/repositories/notification.repository.d.ts +76 -0
  162. package/dist/src/repositories/notification.repository.js +44 -0
  163. package/dist/src/repositories/user.repository.d.ts +84 -0
  164. package/dist/src/repositories/user.repository.js +37 -0
  165. package/dist/src/repositories/workspace-member.repository.d.ts +35 -0
  166. package/dist/src/repositories/workspace-member.repository.js +31 -0
  167. package/dist/src/repositories/workspace.repository.d.ts +101 -0
  168. package/dist/src/repositories/workspace.repository.js +79 -0
  169. package/dist/src/routers/_app.d.ts +3464 -0
  170. package/dist/src/routers/_app.js +36 -0
  171. package/dist/src/routers/admin.d.ts +358 -0
  172. package/dist/src/routers/admin.js +105 -0
  173. package/dist/src/routers/annotations.d.ts +219 -0
  174. package/dist/src/routers/annotations.js +29 -0
  175. package/dist/src/routers/artifactVersions.d.ts +65 -0
  176. package/dist/src/routers/artifactVersions.js +14 -0
  177. package/dist/src/routers/auth.d.ts +161 -0
  178. package/dist/src/routers/auth.js +97 -0
  179. package/dist/src/routers/chat.d.ts +170 -0
  180. package/dist/src/routers/chat.js +32 -0
  181. package/dist/src/routers/copilot.d.ts +200 -0
  182. package/dist/src/routers/copilot.js +52 -0
  183. package/dist/src/routers/flashcards.d.ts +336 -0
  184. package/dist/src/routers/flashcards.js +93 -0
  185. package/dist/src/routers/knowledgeBase.d.ts +421 -0
  186. package/dist/src/routers/knowledgeBase.js +118 -0
  187. package/dist/src/routers/members.d.ts +169 -0
  188. package/dist/src/routers/members.js +47 -0
  189. package/dist/src/routers/notifications.d.ts +99 -0
  190. package/dist/src/routers/notifications.js +25 -0
  191. package/dist/src/routers/payment.d.ts +80 -0
  192. package/dist/src/routers/payment.js +21 -0
  193. package/dist/src/routers/podcast.d.ts +287 -0
  194. package/dist/src/routers/podcast.js +34 -0
  195. package/dist/src/routers/studyguide.d.ts +36 -0
  196. package/dist/src/routers/studyguide.js +8 -0
  197. package/dist/src/routers/worksheets.d.ts +429 -0
  198. package/dist/src/routers/worksheets.js +139 -0
  199. package/dist/src/routers/workspace.d.ts +563 -0
  200. package/dist/src/routers/workspace.js +104 -0
  201. package/dist/src/scripts/purge-deleted-users.d.ts +1 -0
  202. package/dist/src/scripts/purge-deleted-users.js +148 -0
  203. package/dist/src/server.d.ts +1 -0
  204. package/dist/src/server.js +190 -0
  205. package/dist/src/services/activity/activity-human-description.service.d.ts +13 -0
  206. package/dist/src/services/activity/activity-human-description.service.js +221 -0
  207. package/dist/src/services/activity/activity-human-description.service.test.d.ts +1 -0
  208. package/dist/src/services/activity/activity-human-description.service.test.js +16 -0
  209. package/dist/src/services/activity/activity-log.service.d.ts +87 -0
  210. package/dist/src/services/activity/activity-log.service.js +276 -0
  211. package/dist/src/services/activity/activity-log.service.test.d.ts +1 -0
  212. package/dist/src/services/activity/activity-log.service.test.js +27 -0
  213. package/dist/src/services/admin/admin.service.d.ts +270 -0
  214. package/dist/src/services/admin/admin.service.js +476 -0
  215. package/dist/src/services/ai/ai-session.service.d.ts +5 -0
  216. package/dist/src/services/ai/ai-session.service.js +4 -0
  217. package/dist/src/services/artifacts/annotation.service.d.ts +177 -0
  218. package/dist/src/services/artifacts/annotation.service.js +154 -0
  219. package/dist/src/services/artifacts/artifact-version.service.d.ts +38 -0
  220. package/dist/src/services/artifacts/artifact-version.service.js +129 -0
  221. package/dist/src/services/artifacts/chat.service.d.ts +127 -0
  222. package/dist/src/services/artifacts/chat.service.js +182 -0
  223. package/dist/src/services/artifacts/study-guide.service.d.ts +18 -0
  224. package/dist/src/services/artifacts/study-guide.service.js +65 -0
  225. package/dist/src/services/auth/auth.service.d.ts +94 -0
  226. package/dist/src/services/auth/auth.service.js +368 -0
  227. package/dist/src/services/base.service.d.ts +14 -0
  228. package/dist/src/services/base.service.js +14 -0
  229. package/dist/src/services/billing/payment.service.d.ts +44 -0
  230. package/dist/src/services/billing/payment.service.js +365 -0
  231. package/dist/src/services/billing/subscription.service.d.ts +37 -0
  232. package/dist/src/services/billing/subscription.service.js +654 -0
  233. package/dist/src/services/billing/usage.service.d.ts +47 -0
  234. package/dist/src/services/billing/usage.service.js +149 -0
  235. package/dist/src/services/content/copilot.service.d.ts +113 -0
  236. package/dist/src/services/content/copilot.service.js +439 -0
  237. package/dist/src/services/content/flashcard-progress.service.d.ts +159 -0
  238. package/dist/src/services/content/flashcard-progress.service.js +432 -0
  239. package/dist/src/services/content/flashcard.service.d.ts +184 -0
  240. package/dist/src/services/content/flashcard.service.js +339 -0
  241. package/dist/src/services/content/media-analysis.service.d.ts +23 -0
  242. package/dist/src/services/content/media-analysis.service.js +404 -0
  243. package/dist/src/services/content/podcast.service.d.ts +267 -0
  244. package/dist/src/services/content/podcast.service.js +653 -0
  245. package/dist/src/services/content/worksheet-content.service.d.ts +37 -0
  246. package/dist/src/services/content/worksheet-content.service.js +84 -0
  247. package/dist/src/services/content/worksheet-content.service.test.d.ts +1 -0
  248. package/dist/src/services/content/worksheet-content.service.test.js +69 -0
  249. package/dist/src/services/content/worksheet-generation.service.d.ts +91 -0
  250. package/dist/src/services/content/worksheet-generation.service.js +95 -0
  251. package/dist/src/services/content/worksheet-generation.service.test.d.ts +1 -0
  252. package/dist/src/services/content/worksheet-generation.service.test.js +20 -0
  253. package/dist/src/services/content/worksheet.service.d.ts +347 -0
  254. package/dist/src/services/content/worksheet.service.js +599 -0
  255. package/dist/src/services/knowledge/knowledge-base.service.d.ts +316 -0
  256. package/dist/src/services/knowledge/knowledge-base.service.js +544 -0
  257. package/dist/src/services/members/invitation.service.d.ts +66 -0
  258. package/dist/src/services/members/invitation.service.js +348 -0
  259. package/dist/src/services/members/member.service.d.ts +36 -0
  260. package/dist/src/services/members/member.service.js +193 -0
  261. package/dist/src/services/notifications/notification.service.d.ts +214 -0
  262. package/dist/src/services/notifications/notification.service.js +550 -0
  263. package/dist/src/services/notifications/notification.service.test.d.ts +1 -0
  264. package/dist/src/services/notifications/notification.service.test.js +87 -0
  265. package/dist/src/services/workspace/workspace-analytics.service.d.ts +24 -0
  266. package/dist/src/services/workspace/workspace-analytics.service.js +95 -0
  267. package/dist/src/services/workspace/workspace-kb.service.d.ts +40 -0
  268. package/dist/src/services/workspace/workspace-kb.service.js +184 -0
  269. package/dist/src/services/workspace/workspace.service.d.ts +263 -0
  270. package/dist/src/services/workspace/workspace.service.js +401 -0
  271. package/dist/src/trpc.d.ts +60 -0
  272. package/dist/src/trpc.js +217 -0
  273. package/dist/src/types/index.d.ts +126 -0
  274. package/dist/src/types/index.js +1 -0
  275. package/package.json +8 -9
  276. package/prisma/schema.prisma +3 -4
  277. package/prisma/seed.mjs +5 -2
  278. package/prisma.config.ts +16 -0
  279. package/src/lib/prisma.ts +18 -9
  280. package/src/scripts/purge-deleted-users.ts +1 -3
  281. package/tsconfig.json +3 -0
@@ -0,0 +1,1721 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as $Enums from "../enums";
3
+ import type * as Prisma from "../internal/prismaNamespace";
4
+ /**
5
+ * Model KnowledgeBase
6
+ * A retrieval-augmented knowledge base. Knowledge bases live in a global
7
+ * catalog managed by System Admins; workspaces opt-in by attaching one
8
+ * (see `WorkspaceKnowledgeBase`). When `isCurated = true` the KB shows up
9
+ * in the user-facing catalog search so any workspace can add it.
10
+ *
11
+ * Each knowledge base owns uploaded documents (PDFs, etc.) which are split
12
+ * into chunks with pgvector embeddings for semantic search.
13
+ */
14
+ export type KnowledgeBaseModel = runtime.Types.Result.DefaultSelection<Prisma.$KnowledgeBasePayload>;
15
+ export type AggregateKnowledgeBase = {
16
+ _count: KnowledgeBaseCountAggregateOutputType | null;
17
+ _avg: KnowledgeBaseAvgAggregateOutputType | null;
18
+ _sum: KnowledgeBaseSumAggregateOutputType | null;
19
+ _min: KnowledgeBaseMinAggregateOutputType | null;
20
+ _max: KnowledgeBaseMaxAggregateOutputType | null;
21
+ };
22
+ export type KnowledgeBaseAvgAggregateOutputType = {
23
+ embeddingDim: number | null;
24
+ };
25
+ export type KnowledgeBaseSumAggregateOutputType = {
26
+ embeddingDim: number | null;
27
+ };
28
+ export type KnowledgeBaseMinAggregateOutputType = {
29
+ id: string | null;
30
+ createdById: string | null;
31
+ name: string | null;
32
+ description: string | null;
33
+ isCurated: boolean | null;
34
+ status: $Enums.KnowledgeBaseStatus | null;
35
+ embeddingModel: string | null;
36
+ embeddingDim: number | null;
37
+ createdAt: Date | null;
38
+ updatedAt: Date | null;
39
+ };
40
+ export type KnowledgeBaseMaxAggregateOutputType = {
41
+ id: string | null;
42
+ createdById: string | null;
43
+ name: string | null;
44
+ description: string | null;
45
+ isCurated: boolean | null;
46
+ status: $Enums.KnowledgeBaseStatus | null;
47
+ embeddingModel: string | null;
48
+ embeddingDim: number | null;
49
+ createdAt: Date | null;
50
+ updatedAt: Date | null;
51
+ };
52
+ export type KnowledgeBaseCountAggregateOutputType = {
53
+ id: number;
54
+ createdById: number;
55
+ name: number;
56
+ description: number;
57
+ isCurated: number;
58
+ status: number;
59
+ embeddingModel: number;
60
+ embeddingDim: number;
61
+ meta: number;
62
+ createdAt: number;
63
+ updatedAt: number;
64
+ _all: number;
65
+ };
66
+ export type KnowledgeBaseAvgAggregateInputType = {
67
+ embeddingDim?: true;
68
+ };
69
+ export type KnowledgeBaseSumAggregateInputType = {
70
+ embeddingDim?: true;
71
+ };
72
+ export type KnowledgeBaseMinAggregateInputType = {
73
+ id?: true;
74
+ createdById?: true;
75
+ name?: true;
76
+ description?: true;
77
+ isCurated?: true;
78
+ status?: true;
79
+ embeddingModel?: true;
80
+ embeddingDim?: true;
81
+ createdAt?: true;
82
+ updatedAt?: true;
83
+ };
84
+ export type KnowledgeBaseMaxAggregateInputType = {
85
+ id?: true;
86
+ createdById?: true;
87
+ name?: true;
88
+ description?: true;
89
+ isCurated?: true;
90
+ status?: true;
91
+ embeddingModel?: true;
92
+ embeddingDim?: true;
93
+ createdAt?: true;
94
+ updatedAt?: true;
95
+ };
96
+ export type KnowledgeBaseCountAggregateInputType = {
97
+ id?: true;
98
+ createdById?: true;
99
+ name?: true;
100
+ description?: true;
101
+ isCurated?: true;
102
+ status?: true;
103
+ embeddingModel?: true;
104
+ embeddingDim?: true;
105
+ meta?: true;
106
+ createdAt?: true;
107
+ updatedAt?: true;
108
+ _all?: true;
109
+ };
110
+ export type KnowledgeBaseAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
111
+ /**
112
+ * Filter which KnowledgeBase to aggregate.
113
+ */
114
+ where?: Prisma.KnowledgeBaseWhereInput;
115
+ /**
116
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
117
+ *
118
+ * Determine the order of KnowledgeBases to fetch.
119
+ */
120
+ orderBy?: Prisma.KnowledgeBaseOrderByWithRelationInput | Prisma.KnowledgeBaseOrderByWithRelationInput[];
121
+ /**
122
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
123
+ *
124
+ * Sets the start position
125
+ */
126
+ cursor?: Prisma.KnowledgeBaseWhereUniqueInput;
127
+ /**
128
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
129
+ *
130
+ * Take `±n` KnowledgeBases from the position of the cursor.
131
+ */
132
+ take?: number;
133
+ /**
134
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
135
+ *
136
+ * Skip the first `n` KnowledgeBases.
137
+ */
138
+ skip?: number;
139
+ /**
140
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
141
+ *
142
+ * Count returned KnowledgeBases
143
+ **/
144
+ _count?: true | KnowledgeBaseCountAggregateInputType;
145
+ /**
146
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
147
+ *
148
+ * Select which fields to average
149
+ **/
150
+ _avg?: KnowledgeBaseAvgAggregateInputType;
151
+ /**
152
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
153
+ *
154
+ * Select which fields to sum
155
+ **/
156
+ _sum?: KnowledgeBaseSumAggregateInputType;
157
+ /**
158
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
159
+ *
160
+ * Select which fields to find the minimum value
161
+ **/
162
+ _min?: KnowledgeBaseMinAggregateInputType;
163
+ /**
164
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
165
+ *
166
+ * Select which fields to find the maximum value
167
+ **/
168
+ _max?: KnowledgeBaseMaxAggregateInputType;
169
+ };
170
+ export type GetKnowledgeBaseAggregateType<T extends KnowledgeBaseAggregateArgs> = {
171
+ [P in keyof T & keyof AggregateKnowledgeBase]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateKnowledgeBase[P]> : Prisma.GetScalarType<T[P], AggregateKnowledgeBase[P]>;
172
+ };
173
+ export type KnowledgeBaseGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
174
+ where?: Prisma.KnowledgeBaseWhereInput;
175
+ orderBy?: Prisma.KnowledgeBaseOrderByWithAggregationInput | Prisma.KnowledgeBaseOrderByWithAggregationInput[];
176
+ by: Prisma.KnowledgeBaseScalarFieldEnum[] | Prisma.KnowledgeBaseScalarFieldEnum;
177
+ having?: Prisma.KnowledgeBaseScalarWhereWithAggregatesInput;
178
+ take?: number;
179
+ skip?: number;
180
+ _count?: KnowledgeBaseCountAggregateInputType | true;
181
+ _avg?: KnowledgeBaseAvgAggregateInputType;
182
+ _sum?: KnowledgeBaseSumAggregateInputType;
183
+ _min?: KnowledgeBaseMinAggregateInputType;
184
+ _max?: KnowledgeBaseMaxAggregateInputType;
185
+ };
186
+ export type KnowledgeBaseGroupByOutputType = {
187
+ id: string;
188
+ createdById: string | null;
189
+ name: string;
190
+ description: string | null;
191
+ isCurated: boolean;
192
+ status: $Enums.KnowledgeBaseStatus;
193
+ embeddingModel: string;
194
+ embeddingDim: number;
195
+ meta: runtime.JsonValue | null;
196
+ createdAt: Date;
197
+ updatedAt: Date;
198
+ _count: KnowledgeBaseCountAggregateOutputType | null;
199
+ _avg: KnowledgeBaseAvgAggregateOutputType | null;
200
+ _sum: KnowledgeBaseSumAggregateOutputType | null;
201
+ _min: KnowledgeBaseMinAggregateOutputType | null;
202
+ _max: KnowledgeBaseMaxAggregateOutputType | null;
203
+ };
204
+ export type GetKnowledgeBaseGroupByPayload<T extends KnowledgeBaseGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<KnowledgeBaseGroupByOutputType, T['by']> & {
205
+ [P in ((keyof T) & (keyof KnowledgeBaseGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], KnowledgeBaseGroupByOutputType[P]> : Prisma.GetScalarType<T[P], KnowledgeBaseGroupByOutputType[P]>;
206
+ }>>;
207
+ export type KnowledgeBaseWhereInput = {
208
+ AND?: Prisma.KnowledgeBaseWhereInput | Prisma.KnowledgeBaseWhereInput[];
209
+ OR?: Prisma.KnowledgeBaseWhereInput[];
210
+ NOT?: Prisma.KnowledgeBaseWhereInput | Prisma.KnowledgeBaseWhereInput[];
211
+ id?: Prisma.StringFilter<"KnowledgeBase"> | string;
212
+ createdById?: Prisma.StringNullableFilter<"KnowledgeBase"> | string | null;
213
+ name?: Prisma.StringFilter<"KnowledgeBase"> | string;
214
+ description?: Prisma.StringNullableFilter<"KnowledgeBase"> | string | null;
215
+ isCurated?: Prisma.BoolFilter<"KnowledgeBase"> | boolean;
216
+ status?: Prisma.EnumKnowledgeBaseStatusFilter<"KnowledgeBase"> | $Enums.KnowledgeBaseStatus;
217
+ embeddingModel?: Prisma.StringFilter<"KnowledgeBase"> | string;
218
+ embeddingDim?: Prisma.IntFilter<"KnowledgeBase"> | number;
219
+ meta?: Prisma.JsonNullableFilter<"KnowledgeBase">;
220
+ createdAt?: Prisma.DateTimeFilter<"KnowledgeBase"> | Date | string;
221
+ updatedAt?: Prisma.DateTimeFilter<"KnowledgeBase"> | Date | string;
222
+ createdBy?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
223
+ documents?: Prisma.KnowledgeBaseDocumentListRelationFilter;
224
+ workspaces?: Prisma.WorkspaceKnowledgeBaseListRelationFilter;
225
+ };
226
+ export type KnowledgeBaseOrderByWithRelationInput = {
227
+ id?: Prisma.SortOrder;
228
+ createdById?: Prisma.SortOrderInput | Prisma.SortOrder;
229
+ name?: Prisma.SortOrder;
230
+ description?: Prisma.SortOrderInput | Prisma.SortOrder;
231
+ isCurated?: Prisma.SortOrder;
232
+ status?: Prisma.SortOrder;
233
+ embeddingModel?: Prisma.SortOrder;
234
+ embeddingDim?: Prisma.SortOrder;
235
+ meta?: Prisma.SortOrderInput | Prisma.SortOrder;
236
+ createdAt?: Prisma.SortOrder;
237
+ updatedAt?: Prisma.SortOrder;
238
+ createdBy?: Prisma.UserOrderByWithRelationInput;
239
+ documents?: Prisma.KnowledgeBaseDocumentOrderByRelationAggregateInput;
240
+ workspaces?: Prisma.WorkspaceKnowledgeBaseOrderByRelationAggregateInput;
241
+ };
242
+ export type KnowledgeBaseWhereUniqueInput = Prisma.AtLeast<{
243
+ id?: string;
244
+ AND?: Prisma.KnowledgeBaseWhereInput | Prisma.KnowledgeBaseWhereInput[];
245
+ OR?: Prisma.KnowledgeBaseWhereInput[];
246
+ NOT?: Prisma.KnowledgeBaseWhereInput | Prisma.KnowledgeBaseWhereInput[];
247
+ createdById?: Prisma.StringNullableFilter<"KnowledgeBase"> | string | null;
248
+ name?: Prisma.StringFilter<"KnowledgeBase"> | string;
249
+ description?: Prisma.StringNullableFilter<"KnowledgeBase"> | string | null;
250
+ isCurated?: Prisma.BoolFilter<"KnowledgeBase"> | boolean;
251
+ status?: Prisma.EnumKnowledgeBaseStatusFilter<"KnowledgeBase"> | $Enums.KnowledgeBaseStatus;
252
+ embeddingModel?: Prisma.StringFilter<"KnowledgeBase"> | string;
253
+ embeddingDim?: Prisma.IntFilter<"KnowledgeBase"> | number;
254
+ meta?: Prisma.JsonNullableFilter<"KnowledgeBase">;
255
+ createdAt?: Prisma.DateTimeFilter<"KnowledgeBase"> | Date | string;
256
+ updatedAt?: Prisma.DateTimeFilter<"KnowledgeBase"> | Date | string;
257
+ createdBy?: Prisma.XOR<Prisma.UserNullableScalarRelationFilter, Prisma.UserWhereInput> | null;
258
+ documents?: Prisma.KnowledgeBaseDocumentListRelationFilter;
259
+ workspaces?: Prisma.WorkspaceKnowledgeBaseListRelationFilter;
260
+ }, "id">;
261
+ export type KnowledgeBaseOrderByWithAggregationInput = {
262
+ id?: Prisma.SortOrder;
263
+ createdById?: Prisma.SortOrderInput | Prisma.SortOrder;
264
+ name?: Prisma.SortOrder;
265
+ description?: Prisma.SortOrderInput | Prisma.SortOrder;
266
+ isCurated?: Prisma.SortOrder;
267
+ status?: Prisma.SortOrder;
268
+ embeddingModel?: Prisma.SortOrder;
269
+ embeddingDim?: Prisma.SortOrder;
270
+ meta?: Prisma.SortOrderInput | Prisma.SortOrder;
271
+ createdAt?: Prisma.SortOrder;
272
+ updatedAt?: Prisma.SortOrder;
273
+ _count?: Prisma.KnowledgeBaseCountOrderByAggregateInput;
274
+ _avg?: Prisma.KnowledgeBaseAvgOrderByAggregateInput;
275
+ _max?: Prisma.KnowledgeBaseMaxOrderByAggregateInput;
276
+ _min?: Prisma.KnowledgeBaseMinOrderByAggregateInput;
277
+ _sum?: Prisma.KnowledgeBaseSumOrderByAggregateInput;
278
+ };
279
+ export type KnowledgeBaseScalarWhereWithAggregatesInput = {
280
+ AND?: Prisma.KnowledgeBaseScalarWhereWithAggregatesInput | Prisma.KnowledgeBaseScalarWhereWithAggregatesInput[];
281
+ OR?: Prisma.KnowledgeBaseScalarWhereWithAggregatesInput[];
282
+ NOT?: Prisma.KnowledgeBaseScalarWhereWithAggregatesInput | Prisma.KnowledgeBaseScalarWhereWithAggregatesInput[];
283
+ id?: Prisma.StringWithAggregatesFilter<"KnowledgeBase"> | string;
284
+ createdById?: Prisma.StringNullableWithAggregatesFilter<"KnowledgeBase"> | string | null;
285
+ name?: Prisma.StringWithAggregatesFilter<"KnowledgeBase"> | string;
286
+ description?: Prisma.StringNullableWithAggregatesFilter<"KnowledgeBase"> | string | null;
287
+ isCurated?: Prisma.BoolWithAggregatesFilter<"KnowledgeBase"> | boolean;
288
+ status?: Prisma.EnumKnowledgeBaseStatusWithAggregatesFilter<"KnowledgeBase"> | $Enums.KnowledgeBaseStatus;
289
+ embeddingModel?: Prisma.StringWithAggregatesFilter<"KnowledgeBase"> | string;
290
+ embeddingDim?: Prisma.IntWithAggregatesFilter<"KnowledgeBase"> | number;
291
+ meta?: Prisma.JsonNullableWithAggregatesFilter<"KnowledgeBase">;
292
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"KnowledgeBase"> | Date | string;
293
+ updatedAt?: Prisma.DateTimeWithAggregatesFilter<"KnowledgeBase"> | Date | string;
294
+ };
295
+ export type KnowledgeBaseCreateInput = {
296
+ id?: string;
297
+ name: string;
298
+ description?: string | null;
299
+ isCurated?: boolean;
300
+ status?: $Enums.KnowledgeBaseStatus;
301
+ embeddingModel?: string;
302
+ embeddingDim?: number;
303
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
304
+ createdAt?: Date | string;
305
+ updatedAt?: Date | string;
306
+ createdBy?: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput;
307
+ documents?: Prisma.KnowledgeBaseDocumentCreateNestedManyWithoutKnowledgeBaseInput;
308
+ workspaces?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKnowledgeBaseInput;
309
+ };
310
+ export type KnowledgeBaseUncheckedCreateInput = {
311
+ id?: string;
312
+ createdById?: string | null;
313
+ name: string;
314
+ description?: string | null;
315
+ isCurated?: boolean;
316
+ status?: $Enums.KnowledgeBaseStatus;
317
+ embeddingModel?: string;
318
+ embeddingDim?: number;
319
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
320
+ createdAt?: Date | string;
321
+ updatedAt?: Date | string;
322
+ documents?: Prisma.KnowledgeBaseDocumentUncheckedCreateNestedManyWithoutKnowledgeBaseInput;
323
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKnowledgeBaseInput;
324
+ };
325
+ export type KnowledgeBaseUpdateInput = {
326
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
327
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
328
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
329
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
330
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
331
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
332
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
333
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
334
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
335
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
336
+ createdBy?: Prisma.UserUpdateOneWithoutKnowledgeBasesNestedInput;
337
+ documents?: Prisma.KnowledgeBaseDocumentUpdateManyWithoutKnowledgeBaseNestedInput;
338
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKnowledgeBaseNestedInput;
339
+ };
340
+ export type KnowledgeBaseUncheckedUpdateInput = {
341
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
342
+ createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
343
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
344
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
345
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
346
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
347
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
348
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
349
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
350
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
351
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
352
+ documents?: Prisma.KnowledgeBaseDocumentUncheckedUpdateManyWithoutKnowledgeBaseNestedInput;
353
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKnowledgeBaseNestedInput;
354
+ };
355
+ export type KnowledgeBaseCreateManyInput = {
356
+ id?: string;
357
+ createdById?: string | null;
358
+ name: string;
359
+ description?: string | null;
360
+ isCurated?: boolean;
361
+ status?: $Enums.KnowledgeBaseStatus;
362
+ embeddingModel?: string;
363
+ embeddingDim?: number;
364
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
365
+ createdAt?: Date | string;
366
+ updatedAt?: Date | string;
367
+ };
368
+ export type KnowledgeBaseUpdateManyMutationInput = {
369
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
370
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
371
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
372
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
373
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
374
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
375
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
376
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
377
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
378
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
379
+ };
380
+ export type KnowledgeBaseUncheckedUpdateManyInput = {
381
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
382
+ createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
383
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
384
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
385
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
386
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
387
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
388
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
389
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
390
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
391
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
392
+ };
393
+ export type KnowledgeBaseListRelationFilter = {
394
+ every?: Prisma.KnowledgeBaseWhereInput;
395
+ some?: Prisma.KnowledgeBaseWhereInput;
396
+ none?: Prisma.KnowledgeBaseWhereInput;
397
+ };
398
+ export type KnowledgeBaseOrderByRelationAggregateInput = {
399
+ _count?: Prisma.SortOrder;
400
+ };
401
+ export type KnowledgeBaseCountOrderByAggregateInput = {
402
+ id?: Prisma.SortOrder;
403
+ createdById?: Prisma.SortOrder;
404
+ name?: Prisma.SortOrder;
405
+ description?: Prisma.SortOrder;
406
+ isCurated?: Prisma.SortOrder;
407
+ status?: Prisma.SortOrder;
408
+ embeddingModel?: Prisma.SortOrder;
409
+ embeddingDim?: Prisma.SortOrder;
410
+ meta?: Prisma.SortOrder;
411
+ createdAt?: Prisma.SortOrder;
412
+ updatedAt?: Prisma.SortOrder;
413
+ };
414
+ export type KnowledgeBaseAvgOrderByAggregateInput = {
415
+ embeddingDim?: Prisma.SortOrder;
416
+ };
417
+ export type KnowledgeBaseMaxOrderByAggregateInput = {
418
+ id?: Prisma.SortOrder;
419
+ createdById?: Prisma.SortOrder;
420
+ name?: Prisma.SortOrder;
421
+ description?: Prisma.SortOrder;
422
+ isCurated?: Prisma.SortOrder;
423
+ status?: Prisma.SortOrder;
424
+ embeddingModel?: Prisma.SortOrder;
425
+ embeddingDim?: Prisma.SortOrder;
426
+ createdAt?: Prisma.SortOrder;
427
+ updatedAt?: Prisma.SortOrder;
428
+ };
429
+ export type KnowledgeBaseMinOrderByAggregateInput = {
430
+ id?: Prisma.SortOrder;
431
+ createdById?: Prisma.SortOrder;
432
+ name?: Prisma.SortOrder;
433
+ description?: Prisma.SortOrder;
434
+ isCurated?: Prisma.SortOrder;
435
+ status?: Prisma.SortOrder;
436
+ embeddingModel?: Prisma.SortOrder;
437
+ embeddingDim?: Prisma.SortOrder;
438
+ createdAt?: Prisma.SortOrder;
439
+ updatedAt?: Prisma.SortOrder;
440
+ };
441
+ export type KnowledgeBaseSumOrderByAggregateInput = {
442
+ embeddingDim?: Prisma.SortOrder;
443
+ };
444
+ export type KnowledgeBaseScalarRelationFilter = {
445
+ is?: Prisma.KnowledgeBaseWhereInput;
446
+ isNot?: Prisma.KnowledgeBaseWhereInput;
447
+ };
448
+ export type KnowledgeBaseCreateNestedManyWithoutCreatedByInput = {
449
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput> | Prisma.KnowledgeBaseCreateWithoutCreatedByInput[] | Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput[];
450
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput | Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput[];
451
+ createMany?: Prisma.KnowledgeBaseCreateManyCreatedByInputEnvelope;
452
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
453
+ };
454
+ export type KnowledgeBaseUncheckedCreateNestedManyWithoutCreatedByInput = {
455
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput> | Prisma.KnowledgeBaseCreateWithoutCreatedByInput[] | Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput[];
456
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput | Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput[];
457
+ createMany?: Prisma.KnowledgeBaseCreateManyCreatedByInputEnvelope;
458
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
459
+ };
460
+ export type KnowledgeBaseUpdateManyWithoutCreatedByNestedInput = {
461
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput> | Prisma.KnowledgeBaseCreateWithoutCreatedByInput[] | Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput[];
462
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput | Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput[];
463
+ upsert?: Prisma.KnowledgeBaseUpsertWithWhereUniqueWithoutCreatedByInput | Prisma.KnowledgeBaseUpsertWithWhereUniqueWithoutCreatedByInput[];
464
+ createMany?: Prisma.KnowledgeBaseCreateManyCreatedByInputEnvelope;
465
+ set?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
466
+ disconnect?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
467
+ delete?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
468
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
469
+ update?: Prisma.KnowledgeBaseUpdateWithWhereUniqueWithoutCreatedByInput | Prisma.KnowledgeBaseUpdateWithWhereUniqueWithoutCreatedByInput[];
470
+ updateMany?: Prisma.KnowledgeBaseUpdateManyWithWhereWithoutCreatedByInput | Prisma.KnowledgeBaseUpdateManyWithWhereWithoutCreatedByInput[];
471
+ deleteMany?: Prisma.KnowledgeBaseScalarWhereInput | Prisma.KnowledgeBaseScalarWhereInput[];
472
+ };
473
+ export type KnowledgeBaseUncheckedUpdateManyWithoutCreatedByNestedInput = {
474
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput> | Prisma.KnowledgeBaseCreateWithoutCreatedByInput[] | Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput[];
475
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput | Prisma.KnowledgeBaseCreateOrConnectWithoutCreatedByInput[];
476
+ upsert?: Prisma.KnowledgeBaseUpsertWithWhereUniqueWithoutCreatedByInput | Prisma.KnowledgeBaseUpsertWithWhereUniqueWithoutCreatedByInput[];
477
+ createMany?: Prisma.KnowledgeBaseCreateManyCreatedByInputEnvelope;
478
+ set?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
479
+ disconnect?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
480
+ delete?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
481
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput | Prisma.KnowledgeBaseWhereUniqueInput[];
482
+ update?: Prisma.KnowledgeBaseUpdateWithWhereUniqueWithoutCreatedByInput | Prisma.KnowledgeBaseUpdateWithWhereUniqueWithoutCreatedByInput[];
483
+ updateMany?: Prisma.KnowledgeBaseUpdateManyWithWhereWithoutCreatedByInput | Prisma.KnowledgeBaseUpdateManyWithWhereWithoutCreatedByInput[];
484
+ deleteMany?: Prisma.KnowledgeBaseScalarWhereInput | Prisma.KnowledgeBaseScalarWhereInput[];
485
+ };
486
+ export type EnumKnowledgeBaseStatusFieldUpdateOperationsInput = {
487
+ set?: $Enums.KnowledgeBaseStatus;
488
+ };
489
+ export type KnowledgeBaseCreateNestedOneWithoutWorkspacesInput = {
490
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspacesInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspacesInput>;
491
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutWorkspacesInput;
492
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput;
493
+ };
494
+ export type KnowledgeBaseUpdateOneRequiredWithoutWorkspacesNestedInput = {
495
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspacesInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspacesInput>;
496
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutWorkspacesInput;
497
+ upsert?: Prisma.KnowledgeBaseUpsertWithoutWorkspacesInput;
498
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput;
499
+ update?: Prisma.XOR<Prisma.XOR<Prisma.KnowledgeBaseUpdateToOneWithWhereWithoutWorkspacesInput, Prisma.KnowledgeBaseUpdateWithoutWorkspacesInput>, Prisma.KnowledgeBaseUncheckedUpdateWithoutWorkspacesInput>;
500
+ };
501
+ export type KnowledgeBaseCreateNestedOneWithoutDocumentsInput = {
502
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedCreateWithoutDocumentsInput>;
503
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutDocumentsInput;
504
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput;
505
+ };
506
+ export type KnowledgeBaseUpdateOneRequiredWithoutDocumentsNestedInput = {
507
+ create?: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedCreateWithoutDocumentsInput>;
508
+ connectOrCreate?: Prisma.KnowledgeBaseCreateOrConnectWithoutDocumentsInput;
509
+ upsert?: Prisma.KnowledgeBaseUpsertWithoutDocumentsInput;
510
+ connect?: Prisma.KnowledgeBaseWhereUniqueInput;
511
+ update?: Prisma.XOR<Prisma.XOR<Prisma.KnowledgeBaseUpdateToOneWithWhereWithoutDocumentsInput, Prisma.KnowledgeBaseUpdateWithoutDocumentsInput>, Prisma.KnowledgeBaseUncheckedUpdateWithoutDocumentsInput>;
512
+ };
513
+ export type KnowledgeBaseCreateWithoutCreatedByInput = {
514
+ id?: string;
515
+ name: string;
516
+ description?: string | null;
517
+ isCurated?: boolean;
518
+ status?: $Enums.KnowledgeBaseStatus;
519
+ embeddingModel?: string;
520
+ embeddingDim?: number;
521
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
522
+ createdAt?: Date | string;
523
+ updatedAt?: Date | string;
524
+ documents?: Prisma.KnowledgeBaseDocumentCreateNestedManyWithoutKnowledgeBaseInput;
525
+ workspaces?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKnowledgeBaseInput;
526
+ };
527
+ export type KnowledgeBaseUncheckedCreateWithoutCreatedByInput = {
528
+ id?: string;
529
+ name: string;
530
+ description?: string | null;
531
+ isCurated?: boolean;
532
+ status?: $Enums.KnowledgeBaseStatus;
533
+ embeddingModel?: string;
534
+ embeddingDim?: number;
535
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
536
+ createdAt?: Date | string;
537
+ updatedAt?: Date | string;
538
+ documents?: Prisma.KnowledgeBaseDocumentUncheckedCreateNestedManyWithoutKnowledgeBaseInput;
539
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKnowledgeBaseInput;
540
+ };
541
+ export type KnowledgeBaseCreateOrConnectWithoutCreatedByInput = {
542
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
543
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput>;
544
+ };
545
+ export type KnowledgeBaseCreateManyCreatedByInputEnvelope = {
546
+ data: Prisma.KnowledgeBaseCreateManyCreatedByInput | Prisma.KnowledgeBaseCreateManyCreatedByInput[];
547
+ skipDuplicates?: boolean;
548
+ };
549
+ export type KnowledgeBaseUpsertWithWhereUniqueWithoutCreatedByInput = {
550
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
551
+ update: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutCreatedByInput>;
552
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedCreateWithoutCreatedByInput>;
553
+ };
554
+ export type KnowledgeBaseUpdateWithWhereUniqueWithoutCreatedByInput = {
555
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
556
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutCreatedByInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutCreatedByInput>;
557
+ };
558
+ export type KnowledgeBaseUpdateManyWithWhereWithoutCreatedByInput = {
559
+ where: Prisma.KnowledgeBaseScalarWhereInput;
560
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateManyMutationInput, Prisma.KnowledgeBaseUncheckedUpdateManyWithoutCreatedByInput>;
561
+ };
562
+ export type KnowledgeBaseScalarWhereInput = {
563
+ AND?: Prisma.KnowledgeBaseScalarWhereInput | Prisma.KnowledgeBaseScalarWhereInput[];
564
+ OR?: Prisma.KnowledgeBaseScalarWhereInput[];
565
+ NOT?: Prisma.KnowledgeBaseScalarWhereInput | Prisma.KnowledgeBaseScalarWhereInput[];
566
+ id?: Prisma.StringFilter<"KnowledgeBase"> | string;
567
+ createdById?: Prisma.StringNullableFilter<"KnowledgeBase"> | string | null;
568
+ name?: Prisma.StringFilter<"KnowledgeBase"> | string;
569
+ description?: Prisma.StringNullableFilter<"KnowledgeBase"> | string | null;
570
+ isCurated?: Prisma.BoolFilter<"KnowledgeBase"> | boolean;
571
+ status?: Prisma.EnumKnowledgeBaseStatusFilter<"KnowledgeBase"> | $Enums.KnowledgeBaseStatus;
572
+ embeddingModel?: Prisma.StringFilter<"KnowledgeBase"> | string;
573
+ embeddingDim?: Prisma.IntFilter<"KnowledgeBase"> | number;
574
+ meta?: Prisma.JsonNullableFilter<"KnowledgeBase">;
575
+ createdAt?: Prisma.DateTimeFilter<"KnowledgeBase"> | Date | string;
576
+ updatedAt?: Prisma.DateTimeFilter<"KnowledgeBase"> | Date | string;
577
+ };
578
+ export type KnowledgeBaseCreateWithoutWorkspacesInput = {
579
+ id?: string;
580
+ name: string;
581
+ description?: string | null;
582
+ isCurated?: boolean;
583
+ status?: $Enums.KnowledgeBaseStatus;
584
+ embeddingModel?: string;
585
+ embeddingDim?: number;
586
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
587
+ createdAt?: Date | string;
588
+ updatedAt?: Date | string;
589
+ createdBy?: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput;
590
+ documents?: Prisma.KnowledgeBaseDocumentCreateNestedManyWithoutKnowledgeBaseInput;
591
+ };
592
+ export type KnowledgeBaseUncheckedCreateWithoutWorkspacesInput = {
593
+ id?: string;
594
+ createdById?: string | null;
595
+ name: string;
596
+ description?: string | null;
597
+ isCurated?: boolean;
598
+ status?: $Enums.KnowledgeBaseStatus;
599
+ embeddingModel?: string;
600
+ embeddingDim?: number;
601
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
602
+ createdAt?: Date | string;
603
+ updatedAt?: Date | string;
604
+ documents?: Prisma.KnowledgeBaseDocumentUncheckedCreateNestedManyWithoutKnowledgeBaseInput;
605
+ };
606
+ export type KnowledgeBaseCreateOrConnectWithoutWorkspacesInput = {
607
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
608
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspacesInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspacesInput>;
609
+ };
610
+ export type KnowledgeBaseUpsertWithoutWorkspacesInput = {
611
+ update: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutWorkspacesInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutWorkspacesInput>;
612
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutWorkspacesInput, Prisma.KnowledgeBaseUncheckedCreateWithoutWorkspacesInput>;
613
+ where?: Prisma.KnowledgeBaseWhereInput;
614
+ };
615
+ export type KnowledgeBaseUpdateToOneWithWhereWithoutWorkspacesInput = {
616
+ where?: Prisma.KnowledgeBaseWhereInput;
617
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutWorkspacesInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutWorkspacesInput>;
618
+ };
619
+ export type KnowledgeBaseUpdateWithoutWorkspacesInput = {
620
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
621
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
622
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
623
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
624
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
625
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
626
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
627
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
628
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
629
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
630
+ createdBy?: Prisma.UserUpdateOneWithoutKnowledgeBasesNestedInput;
631
+ documents?: Prisma.KnowledgeBaseDocumentUpdateManyWithoutKnowledgeBaseNestedInput;
632
+ };
633
+ export type KnowledgeBaseUncheckedUpdateWithoutWorkspacesInput = {
634
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
635
+ createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
636
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
637
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
638
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
639
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
640
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
641
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
642
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
643
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
644
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
645
+ documents?: Prisma.KnowledgeBaseDocumentUncheckedUpdateManyWithoutKnowledgeBaseNestedInput;
646
+ };
647
+ export type KnowledgeBaseCreateWithoutDocumentsInput = {
648
+ id?: string;
649
+ name: string;
650
+ description?: string | null;
651
+ isCurated?: boolean;
652
+ status?: $Enums.KnowledgeBaseStatus;
653
+ embeddingModel?: string;
654
+ embeddingDim?: number;
655
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
656
+ createdAt?: Date | string;
657
+ updatedAt?: Date | string;
658
+ createdBy?: Prisma.UserCreateNestedOneWithoutKnowledgeBasesInput;
659
+ workspaces?: Prisma.WorkspaceKnowledgeBaseCreateNestedManyWithoutKnowledgeBaseInput;
660
+ };
661
+ export type KnowledgeBaseUncheckedCreateWithoutDocumentsInput = {
662
+ id?: string;
663
+ createdById?: string | null;
664
+ name: string;
665
+ description?: string | null;
666
+ isCurated?: boolean;
667
+ status?: $Enums.KnowledgeBaseStatus;
668
+ embeddingModel?: string;
669
+ embeddingDim?: number;
670
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
671
+ createdAt?: Date | string;
672
+ updatedAt?: Date | string;
673
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUncheckedCreateNestedManyWithoutKnowledgeBaseInput;
674
+ };
675
+ export type KnowledgeBaseCreateOrConnectWithoutDocumentsInput = {
676
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
677
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedCreateWithoutDocumentsInput>;
678
+ };
679
+ export type KnowledgeBaseUpsertWithoutDocumentsInput = {
680
+ update: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutDocumentsInput>;
681
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedCreateWithoutDocumentsInput>;
682
+ where?: Prisma.KnowledgeBaseWhereInput;
683
+ };
684
+ export type KnowledgeBaseUpdateToOneWithWhereWithoutDocumentsInput = {
685
+ where?: Prisma.KnowledgeBaseWhereInput;
686
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateWithoutDocumentsInput, Prisma.KnowledgeBaseUncheckedUpdateWithoutDocumentsInput>;
687
+ };
688
+ export type KnowledgeBaseUpdateWithoutDocumentsInput = {
689
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
690
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
691
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
692
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
693
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
694
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
695
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
696
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
697
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
698
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
699
+ createdBy?: Prisma.UserUpdateOneWithoutKnowledgeBasesNestedInput;
700
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKnowledgeBaseNestedInput;
701
+ };
702
+ export type KnowledgeBaseUncheckedUpdateWithoutDocumentsInput = {
703
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
704
+ createdById?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
705
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
706
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
707
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
708
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
709
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
710
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
711
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
712
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
713
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
714
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKnowledgeBaseNestedInput;
715
+ };
716
+ export type KnowledgeBaseCreateManyCreatedByInput = {
717
+ id?: string;
718
+ name: string;
719
+ description?: string | null;
720
+ isCurated?: boolean;
721
+ status?: $Enums.KnowledgeBaseStatus;
722
+ embeddingModel?: string;
723
+ embeddingDim?: number;
724
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
725
+ createdAt?: Date | string;
726
+ updatedAt?: Date | string;
727
+ };
728
+ export type KnowledgeBaseUpdateWithoutCreatedByInput = {
729
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
730
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
731
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
732
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
733
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
734
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
735
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
736
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
737
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
738
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
739
+ documents?: Prisma.KnowledgeBaseDocumentUpdateManyWithoutKnowledgeBaseNestedInput;
740
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUpdateManyWithoutKnowledgeBaseNestedInput;
741
+ };
742
+ export type KnowledgeBaseUncheckedUpdateWithoutCreatedByInput = {
743
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
744
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
745
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
746
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
747
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
748
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
749
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
750
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
751
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
752
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
753
+ documents?: Prisma.KnowledgeBaseDocumentUncheckedUpdateManyWithoutKnowledgeBaseNestedInput;
754
+ workspaces?: Prisma.WorkspaceKnowledgeBaseUncheckedUpdateManyWithoutKnowledgeBaseNestedInput;
755
+ };
756
+ export type KnowledgeBaseUncheckedUpdateManyWithoutCreatedByInput = {
757
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
758
+ name?: Prisma.StringFieldUpdateOperationsInput | string;
759
+ description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
760
+ isCurated?: Prisma.BoolFieldUpdateOperationsInput | boolean;
761
+ status?: Prisma.EnumKnowledgeBaseStatusFieldUpdateOperationsInput | $Enums.KnowledgeBaseStatus;
762
+ embeddingModel?: Prisma.StringFieldUpdateOperationsInput | string;
763
+ embeddingDim?: Prisma.IntFieldUpdateOperationsInput | number;
764
+ meta?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue;
765
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
766
+ updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
767
+ };
768
+ /**
769
+ * Count Type KnowledgeBaseCountOutputType
770
+ */
771
+ export type KnowledgeBaseCountOutputType = {
772
+ documents: number;
773
+ workspaces: number;
774
+ };
775
+ export type KnowledgeBaseCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
776
+ documents?: boolean | KnowledgeBaseCountOutputTypeCountDocumentsArgs;
777
+ workspaces?: boolean | KnowledgeBaseCountOutputTypeCountWorkspacesArgs;
778
+ };
779
+ /**
780
+ * KnowledgeBaseCountOutputType without action
781
+ */
782
+ export type KnowledgeBaseCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
783
+ /**
784
+ * Select specific fields to fetch from the KnowledgeBaseCountOutputType
785
+ */
786
+ select?: Prisma.KnowledgeBaseCountOutputTypeSelect<ExtArgs> | null;
787
+ };
788
+ /**
789
+ * KnowledgeBaseCountOutputType without action
790
+ */
791
+ export type KnowledgeBaseCountOutputTypeCountDocumentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
792
+ where?: Prisma.KnowledgeBaseDocumentWhereInput;
793
+ };
794
+ /**
795
+ * KnowledgeBaseCountOutputType without action
796
+ */
797
+ export type KnowledgeBaseCountOutputTypeCountWorkspacesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
798
+ where?: Prisma.WorkspaceKnowledgeBaseWhereInput;
799
+ };
800
+ export type KnowledgeBaseSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
801
+ id?: boolean;
802
+ createdById?: boolean;
803
+ name?: boolean;
804
+ description?: boolean;
805
+ isCurated?: boolean;
806
+ status?: boolean;
807
+ embeddingModel?: boolean;
808
+ embeddingDim?: boolean;
809
+ meta?: boolean;
810
+ createdAt?: boolean;
811
+ updatedAt?: boolean;
812
+ createdBy?: boolean | Prisma.KnowledgeBase$createdByArgs<ExtArgs>;
813
+ documents?: boolean | Prisma.KnowledgeBase$documentsArgs<ExtArgs>;
814
+ workspaces?: boolean | Prisma.KnowledgeBase$workspacesArgs<ExtArgs>;
815
+ _count?: boolean | Prisma.KnowledgeBaseCountOutputTypeDefaultArgs<ExtArgs>;
816
+ }, ExtArgs["result"]["knowledgeBase"]>;
817
+ export type KnowledgeBaseSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
818
+ id?: boolean;
819
+ createdById?: boolean;
820
+ name?: boolean;
821
+ description?: boolean;
822
+ isCurated?: boolean;
823
+ status?: boolean;
824
+ embeddingModel?: boolean;
825
+ embeddingDim?: boolean;
826
+ meta?: boolean;
827
+ createdAt?: boolean;
828
+ updatedAt?: boolean;
829
+ createdBy?: boolean | Prisma.KnowledgeBase$createdByArgs<ExtArgs>;
830
+ }, ExtArgs["result"]["knowledgeBase"]>;
831
+ export type KnowledgeBaseSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
832
+ id?: boolean;
833
+ createdById?: boolean;
834
+ name?: boolean;
835
+ description?: boolean;
836
+ isCurated?: boolean;
837
+ status?: boolean;
838
+ embeddingModel?: boolean;
839
+ embeddingDim?: boolean;
840
+ meta?: boolean;
841
+ createdAt?: boolean;
842
+ updatedAt?: boolean;
843
+ createdBy?: boolean | Prisma.KnowledgeBase$createdByArgs<ExtArgs>;
844
+ }, ExtArgs["result"]["knowledgeBase"]>;
845
+ export type KnowledgeBaseSelectScalar = {
846
+ id?: boolean;
847
+ createdById?: boolean;
848
+ name?: boolean;
849
+ description?: boolean;
850
+ isCurated?: boolean;
851
+ status?: boolean;
852
+ embeddingModel?: boolean;
853
+ embeddingDim?: boolean;
854
+ meta?: boolean;
855
+ createdAt?: boolean;
856
+ updatedAt?: boolean;
857
+ };
858
+ export type KnowledgeBaseOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "createdById" | "name" | "description" | "isCurated" | "status" | "embeddingModel" | "embeddingDim" | "meta" | "createdAt" | "updatedAt", ExtArgs["result"]["knowledgeBase"]>;
859
+ export type KnowledgeBaseInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
860
+ createdBy?: boolean | Prisma.KnowledgeBase$createdByArgs<ExtArgs>;
861
+ documents?: boolean | Prisma.KnowledgeBase$documentsArgs<ExtArgs>;
862
+ workspaces?: boolean | Prisma.KnowledgeBase$workspacesArgs<ExtArgs>;
863
+ _count?: boolean | Prisma.KnowledgeBaseCountOutputTypeDefaultArgs<ExtArgs>;
864
+ };
865
+ export type KnowledgeBaseIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
866
+ createdBy?: boolean | Prisma.KnowledgeBase$createdByArgs<ExtArgs>;
867
+ };
868
+ export type KnowledgeBaseIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
869
+ createdBy?: boolean | Prisma.KnowledgeBase$createdByArgs<ExtArgs>;
870
+ };
871
+ export type $KnowledgeBasePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
872
+ name: "KnowledgeBase";
873
+ objects: {
874
+ createdBy: Prisma.$UserPayload<ExtArgs> | null;
875
+ documents: Prisma.$KnowledgeBaseDocumentPayload<ExtArgs>[];
876
+ workspaces: Prisma.$WorkspaceKnowledgeBasePayload<ExtArgs>[];
877
+ };
878
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
879
+ id: string;
880
+ createdById: string | null;
881
+ name: string;
882
+ description: string | null;
883
+ isCurated: boolean;
884
+ status: $Enums.KnowledgeBaseStatus;
885
+ embeddingModel: string;
886
+ embeddingDim: number;
887
+ meta: runtime.JsonValue | null;
888
+ createdAt: Date;
889
+ updatedAt: Date;
890
+ }, ExtArgs["result"]["knowledgeBase"]>;
891
+ composites: {};
892
+ };
893
+ export type KnowledgeBaseGetPayload<S extends boolean | null | undefined | KnowledgeBaseDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload, S>;
894
+ export type KnowledgeBaseCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<KnowledgeBaseFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
895
+ select?: KnowledgeBaseCountAggregateInputType | true;
896
+ };
897
+ export interface KnowledgeBaseDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
898
+ [K: symbol]: {
899
+ types: Prisma.TypeMap<ExtArgs>['model']['KnowledgeBase'];
900
+ meta: {
901
+ name: 'KnowledgeBase';
902
+ };
903
+ };
904
+ /**
905
+ * Find zero or one KnowledgeBase that matches the filter.
906
+ * @param {KnowledgeBaseFindUniqueArgs} args - Arguments to find a KnowledgeBase
907
+ * @example
908
+ * // Get one KnowledgeBase
909
+ * const knowledgeBase = await prisma.knowledgeBase.findUnique({
910
+ * where: {
911
+ * // ... provide filter here
912
+ * }
913
+ * })
914
+ */
915
+ findUnique<T extends KnowledgeBaseFindUniqueArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseFindUniqueArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
916
+ /**
917
+ * Find one KnowledgeBase that matches the filter or throw an error with `error.code='P2025'`
918
+ * if no matches were found.
919
+ * @param {KnowledgeBaseFindUniqueOrThrowArgs} args - Arguments to find a KnowledgeBase
920
+ * @example
921
+ * // Get one KnowledgeBase
922
+ * const knowledgeBase = await prisma.knowledgeBase.findUniqueOrThrow({
923
+ * where: {
924
+ * // ... provide filter here
925
+ * }
926
+ * })
927
+ */
928
+ findUniqueOrThrow<T extends KnowledgeBaseFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
929
+ /**
930
+ * Find the first KnowledgeBase that matches the filter.
931
+ * Note, that providing `undefined` is treated as the value not being there.
932
+ * Read more here: https://pris.ly/d/null-undefined
933
+ * @param {KnowledgeBaseFindFirstArgs} args - Arguments to find a KnowledgeBase
934
+ * @example
935
+ * // Get one KnowledgeBase
936
+ * const knowledgeBase = await prisma.knowledgeBase.findFirst({
937
+ * where: {
938
+ * // ... provide filter here
939
+ * }
940
+ * })
941
+ */
942
+ findFirst<T extends KnowledgeBaseFindFirstArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseFindFirstArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
943
+ /**
944
+ * Find the first KnowledgeBase that matches the filter or
945
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
946
+ * Note, that providing `undefined` is treated as the value not being there.
947
+ * Read more here: https://pris.ly/d/null-undefined
948
+ * @param {KnowledgeBaseFindFirstOrThrowArgs} args - Arguments to find a KnowledgeBase
949
+ * @example
950
+ * // Get one KnowledgeBase
951
+ * const knowledgeBase = await prisma.knowledgeBase.findFirstOrThrow({
952
+ * where: {
953
+ * // ... provide filter here
954
+ * }
955
+ * })
956
+ */
957
+ findFirstOrThrow<T extends KnowledgeBaseFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
958
+ /**
959
+ * Find zero or more KnowledgeBases that matches the filter.
960
+ * Note, that providing `undefined` is treated as the value not being there.
961
+ * Read more here: https://pris.ly/d/null-undefined
962
+ * @param {KnowledgeBaseFindManyArgs} args - Arguments to filter and select certain fields only.
963
+ * @example
964
+ * // Get all KnowledgeBases
965
+ * const knowledgeBases = await prisma.knowledgeBase.findMany()
966
+ *
967
+ * // Get first 10 KnowledgeBases
968
+ * const knowledgeBases = await prisma.knowledgeBase.findMany({ take: 10 })
969
+ *
970
+ * // Only select the `id`
971
+ * const knowledgeBaseWithIdOnly = await prisma.knowledgeBase.findMany({ select: { id: true } })
972
+ *
973
+ */
974
+ findMany<T extends KnowledgeBaseFindManyArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
975
+ /**
976
+ * Create a KnowledgeBase.
977
+ * @param {KnowledgeBaseCreateArgs} args - Arguments to create a KnowledgeBase.
978
+ * @example
979
+ * // Create one KnowledgeBase
980
+ * const KnowledgeBase = await prisma.knowledgeBase.create({
981
+ * data: {
982
+ * // ... data to create a KnowledgeBase
983
+ * }
984
+ * })
985
+ *
986
+ */
987
+ create<T extends KnowledgeBaseCreateArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseCreateArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
988
+ /**
989
+ * Create many KnowledgeBases.
990
+ * @param {KnowledgeBaseCreateManyArgs} args - Arguments to create many KnowledgeBases.
991
+ * @example
992
+ * // Create many KnowledgeBases
993
+ * const knowledgeBase = await prisma.knowledgeBase.createMany({
994
+ * data: [
995
+ * // ... provide data here
996
+ * ]
997
+ * })
998
+ *
999
+ */
1000
+ createMany<T extends KnowledgeBaseCreateManyArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1001
+ /**
1002
+ * Create many KnowledgeBases and returns the data saved in the database.
1003
+ * @param {KnowledgeBaseCreateManyAndReturnArgs} args - Arguments to create many KnowledgeBases.
1004
+ * @example
1005
+ * // Create many KnowledgeBases
1006
+ * const knowledgeBase = await prisma.knowledgeBase.createManyAndReturn({
1007
+ * data: [
1008
+ * // ... provide data here
1009
+ * ]
1010
+ * })
1011
+ *
1012
+ * // Create many KnowledgeBases and only return the `id`
1013
+ * const knowledgeBaseWithIdOnly = await prisma.knowledgeBase.createManyAndReturn({
1014
+ * select: { id: true },
1015
+ * data: [
1016
+ * // ... provide data here
1017
+ * ]
1018
+ * })
1019
+ * Note, that providing `undefined` is treated as the value not being there.
1020
+ * Read more here: https://pris.ly/d/null-undefined
1021
+ *
1022
+ */
1023
+ createManyAndReturn<T extends KnowledgeBaseCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
1024
+ /**
1025
+ * Delete a KnowledgeBase.
1026
+ * @param {KnowledgeBaseDeleteArgs} args - Arguments to delete one KnowledgeBase.
1027
+ * @example
1028
+ * // Delete one KnowledgeBase
1029
+ * const KnowledgeBase = await prisma.knowledgeBase.delete({
1030
+ * where: {
1031
+ * // ... filter to delete one KnowledgeBase
1032
+ * }
1033
+ * })
1034
+ *
1035
+ */
1036
+ delete<T extends KnowledgeBaseDeleteArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseDeleteArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1037
+ /**
1038
+ * Update one KnowledgeBase.
1039
+ * @param {KnowledgeBaseUpdateArgs} args - Arguments to update one KnowledgeBase.
1040
+ * @example
1041
+ * // Update one KnowledgeBase
1042
+ * const knowledgeBase = await prisma.knowledgeBase.update({
1043
+ * where: {
1044
+ * // ... provide filter here
1045
+ * },
1046
+ * data: {
1047
+ * // ... provide data here
1048
+ * }
1049
+ * })
1050
+ *
1051
+ */
1052
+ update<T extends KnowledgeBaseUpdateArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseUpdateArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1053
+ /**
1054
+ * Delete zero or more KnowledgeBases.
1055
+ * @param {KnowledgeBaseDeleteManyArgs} args - Arguments to filter KnowledgeBases to delete.
1056
+ * @example
1057
+ * // Delete a few KnowledgeBases
1058
+ * const { count } = await prisma.knowledgeBase.deleteMany({
1059
+ * where: {
1060
+ * // ... provide filter here
1061
+ * }
1062
+ * })
1063
+ *
1064
+ */
1065
+ deleteMany<T extends KnowledgeBaseDeleteManyArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1066
+ /**
1067
+ * Update zero or more KnowledgeBases.
1068
+ * Note, that providing `undefined` is treated as the value not being there.
1069
+ * Read more here: https://pris.ly/d/null-undefined
1070
+ * @param {KnowledgeBaseUpdateManyArgs} args - Arguments to update one or more rows.
1071
+ * @example
1072
+ * // Update many KnowledgeBases
1073
+ * const knowledgeBase = await prisma.knowledgeBase.updateMany({
1074
+ * where: {
1075
+ * // ... provide filter here
1076
+ * },
1077
+ * data: {
1078
+ * // ... provide data here
1079
+ * }
1080
+ * })
1081
+ *
1082
+ */
1083
+ updateMany<T extends KnowledgeBaseUpdateManyArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1084
+ /**
1085
+ * Update zero or more KnowledgeBases and returns the data updated in the database.
1086
+ * @param {KnowledgeBaseUpdateManyAndReturnArgs} args - Arguments to update many KnowledgeBases.
1087
+ * @example
1088
+ * // Update many KnowledgeBases
1089
+ * const knowledgeBase = await prisma.knowledgeBase.updateManyAndReturn({
1090
+ * where: {
1091
+ * // ... provide filter here
1092
+ * },
1093
+ * data: [
1094
+ * // ... provide data here
1095
+ * ]
1096
+ * })
1097
+ *
1098
+ * // Update zero or more KnowledgeBases and only return the `id`
1099
+ * const knowledgeBaseWithIdOnly = await prisma.knowledgeBase.updateManyAndReturn({
1100
+ * select: { id: true },
1101
+ * where: {
1102
+ * // ... provide filter here
1103
+ * },
1104
+ * data: [
1105
+ * // ... provide data here
1106
+ * ]
1107
+ * })
1108
+ * Note, that providing `undefined` is treated as the value not being there.
1109
+ * Read more here: https://pris.ly/d/null-undefined
1110
+ *
1111
+ */
1112
+ updateManyAndReturn<T extends KnowledgeBaseUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
1113
+ /**
1114
+ * Create or update one KnowledgeBase.
1115
+ * @param {KnowledgeBaseUpsertArgs} args - Arguments to update or create a KnowledgeBase.
1116
+ * @example
1117
+ * // Update or create a KnowledgeBase
1118
+ * const knowledgeBase = await prisma.knowledgeBase.upsert({
1119
+ * create: {
1120
+ * // ... data to create a KnowledgeBase
1121
+ * },
1122
+ * update: {
1123
+ * // ... in case it already exists, update
1124
+ * },
1125
+ * where: {
1126
+ * // ... the filter for the KnowledgeBase we want to update
1127
+ * }
1128
+ * })
1129
+ */
1130
+ upsert<T extends KnowledgeBaseUpsertArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseUpsertArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBasePayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1131
+ /**
1132
+ * Count the number of KnowledgeBases.
1133
+ * Note, that providing `undefined` is treated as the value not being there.
1134
+ * Read more here: https://pris.ly/d/null-undefined
1135
+ * @param {KnowledgeBaseCountArgs} args - Arguments to filter KnowledgeBases to count.
1136
+ * @example
1137
+ * // Count the number of KnowledgeBases
1138
+ * const count = await prisma.knowledgeBase.count({
1139
+ * where: {
1140
+ * // ... the filter for the KnowledgeBases we want to count
1141
+ * }
1142
+ * })
1143
+ **/
1144
+ count<T extends KnowledgeBaseCountArgs>(args?: Prisma.Subset<T, KnowledgeBaseCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], KnowledgeBaseCountAggregateOutputType> : number>;
1145
+ /**
1146
+ * Allows you to perform aggregations operations on a KnowledgeBase.
1147
+ * Note, that providing `undefined` is treated as the value not being there.
1148
+ * Read more here: https://pris.ly/d/null-undefined
1149
+ * @param {KnowledgeBaseAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
1150
+ * @example
1151
+ * // Ordered by age ascending
1152
+ * // Where email contains prisma.io
1153
+ * // Limited to the 10 users
1154
+ * const aggregations = await prisma.user.aggregate({
1155
+ * _avg: {
1156
+ * age: true,
1157
+ * },
1158
+ * where: {
1159
+ * email: {
1160
+ * contains: "prisma.io",
1161
+ * },
1162
+ * },
1163
+ * orderBy: {
1164
+ * age: "asc",
1165
+ * },
1166
+ * take: 10,
1167
+ * })
1168
+ **/
1169
+ aggregate<T extends KnowledgeBaseAggregateArgs>(args: Prisma.Subset<T, KnowledgeBaseAggregateArgs>): Prisma.PrismaPromise<GetKnowledgeBaseAggregateType<T>>;
1170
+ /**
1171
+ * Group by KnowledgeBase.
1172
+ * Note, that providing `undefined` is treated as the value not being there.
1173
+ * Read more here: https://pris.ly/d/null-undefined
1174
+ * @param {KnowledgeBaseGroupByArgs} args - Group by arguments.
1175
+ * @example
1176
+ * // Group by city, order by createdAt, get count
1177
+ * const result = await prisma.user.groupBy({
1178
+ * by: ['city', 'createdAt'],
1179
+ * orderBy: {
1180
+ * createdAt: true
1181
+ * },
1182
+ * _count: {
1183
+ * _all: true
1184
+ * },
1185
+ * })
1186
+ *
1187
+ **/
1188
+ groupBy<T extends KnowledgeBaseGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
1189
+ orderBy: KnowledgeBaseGroupByArgs['orderBy'];
1190
+ } : {
1191
+ orderBy?: KnowledgeBaseGroupByArgs['orderBy'];
1192
+ }, OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>, ByFields extends Prisma.MaybeTupleToUnion<T['by']>, ByValid extends Prisma.Has<ByFields, OrderFields>, HavingFields extends Prisma.GetHavingFields<T['having']>, HavingValid extends Prisma.Has<ByFields, HavingFields>, ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, InputErrors extends ByEmpty extends Prisma.True ? `Error: "by" must not be empty.` : HavingValid extends Prisma.False ? {
1193
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
1194
+ Error,
1195
+ 'Field ',
1196
+ P,
1197
+ ` in "having" needs to be provided in "by"`
1198
+ ];
1199
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
1200
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1201
+ }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
1202
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1203
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
1204
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1205
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, KnowledgeBaseGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetKnowledgeBaseGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
1206
+ /**
1207
+ * Fields of the KnowledgeBase model
1208
+ */
1209
+ readonly fields: KnowledgeBaseFieldRefs;
1210
+ }
1211
+ /**
1212
+ * The delegate class that acts as a "Promise-like" for KnowledgeBase.
1213
+ * Why is this prefixed with `Prisma__`?
1214
+ * Because we want to prevent naming conflicts as mentioned in
1215
+ * https://github.com/prisma/prisma-client-js/issues/707
1216
+ */
1217
+ export interface Prisma__KnowledgeBaseClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1218
+ readonly [Symbol.toStringTag]: "PrismaPromise";
1219
+ createdBy<T extends Prisma.KnowledgeBase$createdByArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBase$createdByArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
1220
+ documents<T extends Prisma.KnowledgeBase$documentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBase$documentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseDocumentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1221
+ workspaces<T extends Prisma.KnowledgeBase$workspacesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBase$workspacesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$WorkspaceKnowledgeBasePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1222
+ /**
1223
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1224
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1225
+ * @param onrejected The callback to execute when the Promise is rejected.
1226
+ * @returns A Promise for the completion of which ever callback is executed.
1227
+ */
1228
+ 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>;
1229
+ /**
1230
+ * Attaches a callback for only the rejection of the Promise.
1231
+ * @param onrejected The callback to execute when the Promise is rejected.
1232
+ * @returns A Promise for the completion of the callback.
1233
+ */
1234
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
1235
+ /**
1236
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
1237
+ * resolved value cannot be modified from the callback.
1238
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
1239
+ * @returns A Promise for the completion of the callback.
1240
+ */
1241
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
1242
+ }
1243
+ /**
1244
+ * Fields of the KnowledgeBase model
1245
+ */
1246
+ export interface KnowledgeBaseFieldRefs {
1247
+ readonly id: Prisma.FieldRef<"KnowledgeBase", 'String'>;
1248
+ readonly createdById: Prisma.FieldRef<"KnowledgeBase", 'String'>;
1249
+ readonly name: Prisma.FieldRef<"KnowledgeBase", 'String'>;
1250
+ readonly description: Prisma.FieldRef<"KnowledgeBase", 'String'>;
1251
+ readonly isCurated: Prisma.FieldRef<"KnowledgeBase", 'Boolean'>;
1252
+ readonly status: Prisma.FieldRef<"KnowledgeBase", 'KnowledgeBaseStatus'>;
1253
+ readonly embeddingModel: Prisma.FieldRef<"KnowledgeBase", 'String'>;
1254
+ readonly embeddingDim: Prisma.FieldRef<"KnowledgeBase", 'Int'>;
1255
+ readonly meta: Prisma.FieldRef<"KnowledgeBase", 'Json'>;
1256
+ readonly createdAt: Prisma.FieldRef<"KnowledgeBase", 'DateTime'>;
1257
+ readonly updatedAt: Prisma.FieldRef<"KnowledgeBase", 'DateTime'>;
1258
+ }
1259
+ /**
1260
+ * KnowledgeBase findUnique
1261
+ */
1262
+ export type KnowledgeBaseFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1263
+ /**
1264
+ * Select specific fields to fetch from the KnowledgeBase
1265
+ */
1266
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1267
+ /**
1268
+ * Omit specific fields from the KnowledgeBase
1269
+ */
1270
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1271
+ /**
1272
+ * Choose, which related nodes to fetch as well
1273
+ */
1274
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1275
+ /**
1276
+ * Filter, which KnowledgeBase to fetch.
1277
+ */
1278
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
1279
+ };
1280
+ /**
1281
+ * KnowledgeBase findUniqueOrThrow
1282
+ */
1283
+ export type KnowledgeBaseFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1284
+ /**
1285
+ * Select specific fields to fetch from the KnowledgeBase
1286
+ */
1287
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1288
+ /**
1289
+ * Omit specific fields from the KnowledgeBase
1290
+ */
1291
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1292
+ /**
1293
+ * Choose, which related nodes to fetch as well
1294
+ */
1295
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1296
+ /**
1297
+ * Filter, which KnowledgeBase to fetch.
1298
+ */
1299
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
1300
+ };
1301
+ /**
1302
+ * KnowledgeBase findFirst
1303
+ */
1304
+ export type KnowledgeBaseFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1305
+ /**
1306
+ * Select specific fields to fetch from the KnowledgeBase
1307
+ */
1308
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1309
+ /**
1310
+ * Omit specific fields from the KnowledgeBase
1311
+ */
1312
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1313
+ /**
1314
+ * Choose, which related nodes to fetch as well
1315
+ */
1316
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1317
+ /**
1318
+ * Filter, which KnowledgeBase to fetch.
1319
+ */
1320
+ where?: Prisma.KnowledgeBaseWhereInput;
1321
+ /**
1322
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1323
+ *
1324
+ * Determine the order of KnowledgeBases to fetch.
1325
+ */
1326
+ orderBy?: Prisma.KnowledgeBaseOrderByWithRelationInput | Prisma.KnowledgeBaseOrderByWithRelationInput[];
1327
+ /**
1328
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1329
+ *
1330
+ * Sets the position for searching for KnowledgeBases.
1331
+ */
1332
+ cursor?: Prisma.KnowledgeBaseWhereUniqueInput;
1333
+ /**
1334
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1335
+ *
1336
+ * Take `±n` KnowledgeBases from the position of the cursor.
1337
+ */
1338
+ take?: number;
1339
+ /**
1340
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1341
+ *
1342
+ * Skip the first `n` KnowledgeBases.
1343
+ */
1344
+ skip?: number;
1345
+ /**
1346
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1347
+ *
1348
+ * Filter by unique combinations of KnowledgeBases.
1349
+ */
1350
+ distinct?: Prisma.KnowledgeBaseScalarFieldEnum | Prisma.KnowledgeBaseScalarFieldEnum[];
1351
+ };
1352
+ /**
1353
+ * KnowledgeBase findFirstOrThrow
1354
+ */
1355
+ export type KnowledgeBaseFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1356
+ /**
1357
+ * Select specific fields to fetch from the KnowledgeBase
1358
+ */
1359
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1360
+ /**
1361
+ * Omit specific fields from the KnowledgeBase
1362
+ */
1363
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1364
+ /**
1365
+ * Choose, which related nodes to fetch as well
1366
+ */
1367
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1368
+ /**
1369
+ * Filter, which KnowledgeBase to fetch.
1370
+ */
1371
+ where?: Prisma.KnowledgeBaseWhereInput;
1372
+ /**
1373
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1374
+ *
1375
+ * Determine the order of KnowledgeBases to fetch.
1376
+ */
1377
+ orderBy?: Prisma.KnowledgeBaseOrderByWithRelationInput | Prisma.KnowledgeBaseOrderByWithRelationInput[];
1378
+ /**
1379
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1380
+ *
1381
+ * Sets the position for searching for KnowledgeBases.
1382
+ */
1383
+ cursor?: Prisma.KnowledgeBaseWhereUniqueInput;
1384
+ /**
1385
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1386
+ *
1387
+ * Take `±n` KnowledgeBases from the position of the cursor.
1388
+ */
1389
+ take?: number;
1390
+ /**
1391
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1392
+ *
1393
+ * Skip the first `n` KnowledgeBases.
1394
+ */
1395
+ skip?: number;
1396
+ /**
1397
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1398
+ *
1399
+ * Filter by unique combinations of KnowledgeBases.
1400
+ */
1401
+ distinct?: Prisma.KnowledgeBaseScalarFieldEnum | Prisma.KnowledgeBaseScalarFieldEnum[];
1402
+ };
1403
+ /**
1404
+ * KnowledgeBase findMany
1405
+ */
1406
+ export type KnowledgeBaseFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1407
+ /**
1408
+ * Select specific fields to fetch from the KnowledgeBase
1409
+ */
1410
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1411
+ /**
1412
+ * Omit specific fields from the KnowledgeBase
1413
+ */
1414
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1415
+ /**
1416
+ * Choose, which related nodes to fetch as well
1417
+ */
1418
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1419
+ /**
1420
+ * Filter, which KnowledgeBases to fetch.
1421
+ */
1422
+ where?: Prisma.KnowledgeBaseWhereInput;
1423
+ /**
1424
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1425
+ *
1426
+ * Determine the order of KnowledgeBases to fetch.
1427
+ */
1428
+ orderBy?: Prisma.KnowledgeBaseOrderByWithRelationInput | Prisma.KnowledgeBaseOrderByWithRelationInput[];
1429
+ /**
1430
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1431
+ *
1432
+ * Sets the position for listing KnowledgeBases.
1433
+ */
1434
+ cursor?: Prisma.KnowledgeBaseWhereUniqueInput;
1435
+ /**
1436
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1437
+ *
1438
+ * Take `±n` KnowledgeBases from the position of the cursor.
1439
+ */
1440
+ take?: number;
1441
+ /**
1442
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1443
+ *
1444
+ * Skip the first `n` KnowledgeBases.
1445
+ */
1446
+ skip?: number;
1447
+ /**
1448
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1449
+ *
1450
+ * Filter by unique combinations of KnowledgeBases.
1451
+ */
1452
+ distinct?: Prisma.KnowledgeBaseScalarFieldEnum | Prisma.KnowledgeBaseScalarFieldEnum[];
1453
+ };
1454
+ /**
1455
+ * KnowledgeBase create
1456
+ */
1457
+ export type KnowledgeBaseCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1458
+ /**
1459
+ * Select specific fields to fetch from the KnowledgeBase
1460
+ */
1461
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1462
+ /**
1463
+ * Omit specific fields from the KnowledgeBase
1464
+ */
1465
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1466
+ /**
1467
+ * Choose, which related nodes to fetch as well
1468
+ */
1469
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1470
+ /**
1471
+ * The data needed to create a KnowledgeBase.
1472
+ */
1473
+ data: Prisma.XOR<Prisma.KnowledgeBaseCreateInput, Prisma.KnowledgeBaseUncheckedCreateInput>;
1474
+ };
1475
+ /**
1476
+ * KnowledgeBase createMany
1477
+ */
1478
+ export type KnowledgeBaseCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1479
+ /**
1480
+ * The data used to create many KnowledgeBases.
1481
+ */
1482
+ data: Prisma.KnowledgeBaseCreateManyInput | Prisma.KnowledgeBaseCreateManyInput[];
1483
+ skipDuplicates?: boolean;
1484
+ };
1485
+ /**
1486
+ * KnowledgeBase createManyAndReturn
1487
+ */
1488
+ export type KnowledgeBaseCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1489
+ /**
1490
+ * Select specific fields to fetch from the KnowledgeBase
1491
+ */
1492
+ select?: Prisma.KnowledgeBaseSelectCreateManyAndReturn<ExtArgs> | null;
1493
+ /**
1494
+ * Omit specific fields from the KnowledgeBase
1495
+ */
1496
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1497
+ /**
1498
+ * The data used to create many KnowledgeBases.
1499
+ */
1500
+ data: Prisma.KnowledgeBaseCreateManyInput | Prisma.KnowledgeBaseCreateManyInput[];
1501
+ skipDuplicates?: boolean;
1502
+ /**
1503
+ * Choose, which related nodes to fetch as well
1504
+ */
1505
+ include?: Prisma.KnowledgeBaseIncludeCreateManyAndReturn<ExtArgs> | null;
1506
+ };
1507
+ /**
1508
+ * KnowledgeBase update
1509
+ */
1510
+ export type KnowledgeBaseUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1511
+ /**
1512
+ * Select specific fields to fetch from the KnowledgeBase
1513
+ */
1514
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1515
+ /**
1516
+ * Omit specific fields from the KnowledgeBase
1517
+ */
1518
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1519
+ /**
1520
+ * Choose, which related nodes to fetch as well
1521
+ */
1522
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1523
+ /**
1524
+ * The data needed to update a KnowledgeBase.
1525
+ */
1526
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateInput, Prisma.KnowledgeBaseUncheckedUpdateInput>;
1527
+ /**
1528
+ * Choose, which KnowledgeBase to update.
1529
+ */
1530
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
1531
+ };
1532
+ /**
1533
+ * KnowledgeBase updateMany
1534
+ */
1535
+ export type KnowledgeBaseUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1536
+ /**
1537
+ * The data used to update KnowledgeBases.
1538
+ */
1539
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateManyMutationInput, Prisma.KnowledgeBaseUncheckedUpdateManyInput>;
1540
+ /**
1541
+ * Filter which KnowledgeBases to update
1542
+ */
1543
+ where?: Prisma.KnowledgeBaseWhereInput;
1544
+ /**
1545
+ * Limit how many KnowledgeBases to update.
1546
+ */
1547
+ limit?: number;
1548
+ };
1549
+ /**
1550
+ * KnowledgeBase updateManyAndReturn
1551
+ */
1552
+ export type KnowledgeBaseUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1553
+ /**
1554
+ * Select specific fields to fetch from the KnowledgeBase
1555
+ */
1556
+ select?: Prisma.KnowledgeBaseSelectUpdateManyAndReturn<ExtArgs> | null;
1557
+ /**
1558
+ * Omit specific fields from the KnowledgeBase
1559
+ */
1560
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1561
+ /**
1562
+ * The data used to update KnowledgeBases.
1563
+ */
1564
+ data: Prisma.XOR<Prisma.KnowledgeBaseUpdateManyMutationInput, Prisma.KnowledgeBaseUncheckedUpdateManyInput>;
1565
+ /**
1566
+ * Filter which KnowledgeBases to update
1567
+ */
1568
+ where?: Prisma.KnowledgeBaseWhereInput;
1569
+ /**
1570
+ * Limit how many KnowledgeBases to update.
1571
+ */
1572
+ limit?: number;
1573
+ /**
1574
+ * Choose, which related nodes to fetch as well
1575
+ */
1576
+ include?: Prisma.KnowledgeBaseIncludeUpdateManyAndReturn<ExtArgs> | null;
1577
+ };
1578
+ /**
1579
+ * KnowledgeBase upsert
1580
+ */
1581
+ export type KnowledgeBaseUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1582
+ /**
1583
+ * Select specific fields to fetch from the KnowledgeBase
1584
+ */
1585
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1586
+ /**
1587
+ * Omit specific fields from the KnowledgeBase
1588
+ */
1589
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1590
+ /**
1591
+ * Choose, which related nodes to fetch as well
1592
+ */
1593
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1594
+ /**
1595
+ * The filter to search for the KnowledgeBase to update in case it exists.
1596
+ */
1597
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
1598
+ /**
1599
+ * In case the KnowledgeBase found by the `where` argument doesn't exist, create a new KnowledgeBase with this data.
1600
+ */
1601
+ create: Prisma.XOR<Prisma.KnowledgeBaseCreateInput, Prisma.KnowledgeBaseUncheckedCreateInput>;
1602
+ /**
1603
+ * In case the KnowledgeBase was found with the provided `where` argument, update it with this data.
1604
+ */
1605
+ update: Prisma.XOR<Prisma.KnowledgeBaseUpdateInput, Prisma.KnowledgeBaseUncheckedUpdateInput>;
1606
+ };
1607
+ /**
1608
+ * KnowledgeBase delete
1609
+ */
1610
+ export type KnowledgeBaseDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1611
+ /**
1612
+ * Select specific fields to fetch from the KnowledgeBase
1613
+ */
1614
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1615
+ /**
1616
+ * Omit specific fields from the KnowledgeBase
1617
+ */
1618
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1619
+ /**
1620
+ * Choose, which related nodes to fetch as well
1621
+ */
1622
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1623
+ /**
1624
+ * Filter which KnowledgeBase to delete.
1625
+ */
1626
+ where: Prisma.KnowledgeBaseWhereUniqueInput;
1627
+ };
1628
+ /**
1629
+ * KnowledgeBase deleteMany
1630
+ */
1631
+ export type KnowledgeBaseDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1632
+ /**
1633
+ * Filter which KnowledgeBases to delete
1634
+ */
1635
+ where?: Prisma.KnowledgeBaseWhereInput;
1636
+ /**
1637
+ * Limit how many KnowledgeBases to delete.
1638
+ */
1639
+ limit?: number;
1640
+ };
1641
+ /**
1642
+ * KnowledgeBase.createdBy
1643
+ */
1644
+ export type KnowledgeBase$createdByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1645
+ /**
1646
+ * Select specific fields to fetch from the User
1647
+ */
1648
+ select?: Prisma.UserSelect<ExtArgs> | null;
1649
+ /**
1650
+ * Omit specific fields from the User
1651
+ */
1652
+ omit?: Prisma.UserOmit<ExtArgs> | null;
1653
+ /**
1654
+ * Choose, which related nodes to fetch as well
1655
+ */
1656
+ include?: Prisma.UserInclude<ExtArgs> | null;
1657
+ where?: Prisma.UserWhereInput;
1658
+ };
1659
+ /**
1660
+ * KnowledgeBase.documents
1661
+ */
1662
+ export type KnowledgeBase$documentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1663
+ /**
1664
+ * Select specific fields to fetch from the KnowledgeBaseDocument
1665
+ */
1666
+ select?: Prisma.KnowledgeBaseDocumentSelect<ExtArgs> | null;
1667
+ /**
1668
+ * Omit specific fields from the KnowledgeBaseDocument
1669
+ */
1670
+ omit?: Prisma.KnowledgeBaseDocumentOmit<ExtArgs> | null;
1671
+ /**
1672
+ * Choose, which related nodes to fetch as well
1673
+ */
1674
+ include?: Prisma.KnowledgeBaseDocumentInclude<ExtArgs> | null;
1675
+ where?: Prisma.KnowledgeBaseDocumentWhereInput;
1676
+ orderBy?: Prisma.KnowledgeBaseDocumentOrderByWithRelationInput | Prisma.KnowledgeBaseDocumentOrderByWithRelationInput[];
1677
+ cursor?: Prisma.KnowledgeBaseDocumentWhereUniqueInput;
1678
+ take?: number;
1679
+ skip?: number;
1680
+ distinct?: Prisma.KnowledgeBaseDocumentScalarFieldEnum | Prisma.KnowledgeBaseDocumentScalarFieldEnum[];
1681
+ };
1682
+ /**
1683
+ * KnowledgeBase.workspaces
1684
+ */
1685
+ export type KnowledgeBase$workspacesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1686
+ /**
1687
+ * Select specific fields to fetch from the WorkspaceKnowledgeBase
1688
+ */
1689
+ select?: Prisma.WorkspaceKnowledgeBaseSelect<ExtArgs> | null;
1690
+ /**
1691
+ * Omit specific fields from the WorkspaceKnowledgeBase
1692
+ */
1693
+ omit?: Prisma.WorkspaceKnowledgeBaseOmit<ExtArgs> | null;
1694
+ /**
1695
+ * Choose, which related nodes to fetch as well
1696
+ */
1697
+ include?: Prisma.WorkspaceKnowledgeBaseInclude<ExtArgs> | null;
1698
+ where?: Prisma.WorkspaceKnowledgeBaseWhereInput;
1699
+ orderBy?: Prisma.WorkspaceKnowledgeBaseOrderByWithRelationInput | Prisma.WorkspaceKnowledgeBaseOrderByWithRelationInput[];
1700
+ cursor?: Prisma.WorkspaceKnowledgeBaseWhereUniqueInput;
1701
+ take?: number;
1702
+ skip?: number;
1703
+ distinct?: Prisma.WorkspaceKnowledgeBaseScalarFieldEnum | Prisma.WorkspaceKnowledgeBaseScalarFieldEnum[];
1704
+ };
1705
+ /**
1706
+ * KnowledgeBase without action
1707
+ */
1708
+ export type KnowledgeBaseDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1709
+ /**
1710
+ * Select specific fields to fetch from the KnowledgeBase
1711
+ */
1712
+ select?: Prisma.KnowledgeBaseSelect<ExtArgs> | null;
1713
+ /**
1714
+ * Omit specific fields from the KnowledgeBase
1715
+ */
1716
+ omit?: Prisma.KnowledgeBaseOmit<ExtArgs> | null;
1717
+ /**
1718
+ * Choose, which related nodes to fetch as well
1719
+ */
1720
+ include?: Prisma.KnowledgeBaseInclude<ExtArgs> | null;
1721
+ };