@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,1333 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace";
3
+ /**
4
+ * Model KnowledgeBaseChunk
5
+ * A single text chunk inside a document. The `embedding` column is a
6
+ * pgvector value; Prisma cannot generate types for it, so similarity
7
+ * search must be performed via raw SQL (`$queryRaw`). The dimension is
8
+ * fixed at 1536 to match `text-embedding-3-small`.
9
+ */
10
+ export type KnowledgeBaseChunkModel = runtime.Types.Result.DefaultSelection<Prisma.$KnowledgeBaseChunkPayload>;
11
+ export type AggregateKnowledgeBaseChunk = {
12
+ _count: KnowledgeBaseChunkCountAggregateOutputType | null;
13
+ _avg: KnowledgeBaseChunkAvgAggregateOutputType | null;
14
+ _sum: KnowledgeBaseChunkSumAggregateOutputType | null;
15
+ _min: KnowledgeBaseChunkMinAggregateOutputType | null;
16
+ _max: KnowledgeBaseChunkMaxAggregateOutputType | null;
17
+ };
18
+ export type KnowledgeBaseChunkAvgAggregateOutputType = {
19
+ chunkIndex: number | null;
20
+ pageNumber: number | null;
21
+ tokenCount: number | null;
22
+ };
23
+ export type KnowledgeBaseChunkSumAggregateOutputType = {
24
+ chunkIndex: number | null;
25
+ pageNumber: number | null;
26
+ tokenCount: number | null;
27
+ };
28
+ export type KnowledgeBaseChunkMinAggregateOutputType = {
29
+ id: string | null;
30
+ documentId: string | null;
31
+ knowledgeBaseId: string | null;
32
+ chunkIndex: number | null;
33
+ pageNumber: number | null;
34
+ content: string | null;
35
+ tokenCount: number | null;
36
+ createdAt: Date | null;
37
+ };
38
+ export type KnowledgeBaseChunkMaxAggregateOutputType = {
39
+ id: string | null;
40
+ documentId: string | null;
41
+ knowledgeBaseId: string | null;
42
+ chunkIndex: number | null;
43
+ pageNumber: number | null;
44
+ content: string | null;
45
+ tokenCount: number | null;
46
+ createdAt: Date | null;
47
+ };
48
+ export type KnowledgeBaseChunkCountAggregateOutputType = {
49
+ id: number;
50
+ documentId: number;
51
+ knowledgeBaseId: number;
52
+ chunkIndex: number;
53
+ pageNumber: number;
54
+ content: number;
55
+ tokenCount: number;
56
+ createdAt: number;
57
+ _all: number;
58
+ };
59
+ export type KnowledgeBaseChunkAvgAggregateInputType = {
60
+ chunkIndex?: true;
61
+ pageNumber?: true;
62
+ tokenCount?: true;
63
+ };
64
+ export type KnowledgeBaseChunkSumAggregateInputType = {
65
+ chunkIndex?: true;
66
+ pageNumber?: true;
67
+ tokenCount?: true;
68
+ };
69
+ export type KnowledgeBaseChunkMinAggregateInputType = {
70
+ id?: true;
71
+ documentId?: true;
72
+ knowledgeBaseId?: true;
73
+ chunkIndex?: true;
74
+ pageNumber?: true;
75
+ content?: true;
76
+ tokenCount?: true;
77
+ createdAt?: true;
78
+ };
79
+ export type KnowledgeBaseChunkMaxAggregateInputType = {
80
+ id?: true;
81
+ documentId?: true;
82
+ knowledgeBaseId?: true;
83
+ chunkIndex?: true;
84
+ pageNumber?: true;
85
+ content?: true;
86
+ tokenCount?: true;
87
+ createdAt?: true;
88
+ };
89
+ export type KnowledgeBaseChunkCountAggregateInputType = {
90
+ id?: true;
91
+ documentId?: true;
92
+ knowledgeBaseId?: true;
93
+ chunkIndex?: true;
94
+ pageNumber?: true;
95
+ content?: true;
96
+ tokenCount?: true;
97
+ createdAt?: true;
98
+ _all?: true;
99
+ };
100
+ export type KnowledgeBaseChunkAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
101
+ /**
102
+ * Filter which KnowledgeBaseChunk to aggregate.
103
+ */
104
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
105
+ /**
106
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
107
+ *
108
+ * Determine the order of KnowledgeBaseChunks to fetch.
109
+ */
110
+ orderBy?: Prisma.KnowledgeBaseChunkOrderByWithRelationInput | Prisma.KnowledgeBaseChunkOrderByWithRelationInput[];
111
+ /**
112
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
113
+ *
114
+ * Sets the start position
115
+ */
116
+ cursor?: Prisma.KnowledgeBaseChunkWhereUniqueInput;
117
+ /**
118
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
119
+ *
120
+ * Take `±n` KnowledgeBaseChunks from the position of the cursor.
121
+ */
122
+ take?: number;
123
+ /**
124
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
125
+ *
126
+ * Skip the first `n` KnowledgeBaseChunks.
127
+ */
128
+ skip?: number;
129
+ /**
130
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
131
+ *
132
+ * Count returned KnowledgeBaseChunks
133
+ **/
134
+ _count?: true | KnowledgeBaseChunkCountAggregateInputType;
135
+ /**
136
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
137
+ *
138
+ * Select which fields to average
139
+ **/
140
+ _avg?: KnowledgeBaseChunkAvgAggregateInputType;
141
+ /**
142
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
143
+ *
144
+ * Select which fields to sum
145
+ **/
146
+ _sum?: KnowledgeBaseChunkSumAggregateInputType;
147
+ /**
148
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
149
+ *
150
+ * Select which fields to find the minimum value
151
+ **/
152
+ _min?: KnowledgeBaseChunkMinAggregateInputType;
153
+ /**
154
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
155
+ *
156
+ * Select which fields to find the maximum value
157
+ **/
158
+ _max?: KnowledgeBaseChunkMaxAggregateInputType;
159
+ };
160
+ export type GetKnowledgeBaseChunkAggregateType<T extends KnowledgeBaseChunkAggregateArgs> = {
161
+ [P in keyof T & keyof AggregateKnowledgeBaseChunk]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateKnowledgeBaseChunk[P]> : Prisma.GetScalarType<T[P], AggregateKnowledgeBaseChunk[P]>;
162
+ };
163
+ export type KnowledgeBaseChunkGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
164
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
165
+ orderBy?: Prisma.KnowledgeBaseChunkOrderByWithAggregationInput | Prisma.KnowledgeBaseChunkOrderByWithAggregationInput[];
166
+ by: Prisma.KnowledgeBaseChunkScalarFieldEnum[] | Prisma.KnowledgeBaseChunkScalarFieldEnum;
167
+ having?: Prisma.KnowledgeBaseChunkScalarWhereWithAggregatesInput;
168
+ take?: number;
169
+ skip?: number;
170
+ _count?: KnowledgeBaseChunkCountAggregateInputType | true;
171
+ _avg?: KnowledgeBaseChunkAvgAggregateInputType;
172
+ _sum?: KnowledgeBaseChunkSumAggregateInputType;
173
+ _min?: KnowledgeBaseChunkMinAggregateInputType;
174
+ _max?: KnowledgeBaseChunkMaxAggregateInputType;
175
+ };
176
+ export type KnowledgeBaseChunkGroupByOutputType = {
177
+ id: string;
178
+ documentId: string;
179
+ knowledgeBaseId: string;
180
+ chunkIndex: number;
181
+ pageNumber: number | null;
182
+ content: string;
183
+ tokenCount: number | null;
184
+ createdAt: Date;
185
+ _count: KnowledgeBaseChunkCountAggregateOutputType | null;
186
+ _avg: KnowledgeBaseChunkAvgAggregateOutputType | null;
187
+ _sum: KnowledgeBaseChunkSumAggregateOutputType | null;
188
+ _min: KnowledgeBaseChunkMinAggregateOutputType | null;
189
+ _max: KnowledgeBaseChunkMaxAggregateOutputType | null;
190
+ };
191
+ export type GetKnowledgeBaseChunkGroupByPayload<T extends KnowledgeBaseChunkGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<KnowledgeBaseChunkGroupByOutputType, T['by']> & {
192
+ [P in ((keyof T) & (keyof KnowledgeBaseChunkGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], KnowledgeBaseChunkGroupByOutputType[P]> : Prisma.GetScalarType<T[P], KnowledgeBaseChunkGroupByOutputType[P]>;
193
+ }>>;
194
+ export type KnowledgeBaseChunkWhereInput = {
195
+ AND?: Prisma.KnowledgeBaseChunkWhereInput | Prisma.KnowledgeBaseChunkWhereInput[];
196
+ OR?: Prisma.KnowledgeBaseChunkWhereInput[];
197
+ NOT?: Prisma.KnowledgeBaseChunkWhereInput | Prisma.KnowledgeBaseChunkWhereInput[];
198
+ id?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
199
+ documentId?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
200
+ knowledgeBaseId?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
201
+ chunkIndex?: Prisma.IntFilter<"KnowledgeBaseChunk"> | number;
202
+ pageNumber?: Prisma.IntNullableFilter<"KnowledgeBaseChunk"> | number | null;
203
+ content?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
204
+ tokenCount?: Prisma.IntNullableFilter<"KnowledgeBaseChunk"> | number | null;
205
+ createdAt?: Prisma.DateTimeFilter<"KnowledgeBaseChunk"> | Date | string;
206
+ document?: Prisma.XOR<Prisma.KnowledgeBaseDocumentScalarRelationFilter, Prisma.KnowledgeBaseDocumentWhereInput>;
207
+ };
208
+ export type KnowledgeBaseChunkOrderByWithRelationInput = {
209
+ id?: Prisma.SortOrder;
210
+ documentId?: Prisma.SortOrder;
211
+ knowledgeBaseId?: Prisma.SortOrder;
212
+ chunkIndex?: Prisma.SortOrder;
213
+ pageNumber?: Prisma.SortOrderInput | Prisma.SortOrder;
214
+ content?: Prisma.SortOrder;
215
+ tokenCount?: Prisma.SortOrderInput | Prisma.SortOrder;
216
+ createdAt?: Prisma.SortOrder;
217
+ document?: Prisma.KnowledgeBaseDocumentOrderByWithRelationInput;
218
+ };
219
+ export type KnowledgeBaseChunkWhereUniqueInput = Prisma.AtLeast<{
220
+ id?: string;
221
+ AND?: Prisma.KnowledgeBaseChunkWhereInput | Prisma.KnowledgeBaseChunkWhereInput[];
222
+ OR?: Prisma.KnowledgeBaseChunkWhereInput[];
223
+ NOT?: Prisma.KnowledgeBaseChunkWhereInput | Prisma.KnowledgeBaseChunkWhereInput[];
224
+ documentId?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
225
+ knowledgeBaseId?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
226
+ chunkIndex?: Prisma.IntFilter<"KnowledgeBaseChunk"> | number;
227
+ pageNumber?: Prisma.IntNullableFilter<"KnowledgeBaseChunk"> | number | null;
228
+ content?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
229
+ tokenCount?: Prisma.IntNullableFilter<"KnowledgeBaseChunk"> | number | null;
230
+ createdAt?: Prisma.DateTimeFilter<"KnowledgeBaseChunk"> | Date | string;
231
+ document?: Prisma.XOR<Prisma.KnowledgeBaseDocumentScalarRelationFilter, Prisma.KnowledgeBaseDocumentWhereInput>;
232
+ }, "id">;
233
+ export type KnowledgeBaseChunkOrderByWithAggregationInput = {
234
+ id?: Prisma.SortOrder;
235
+ documentId?: Prisma.SortOrder;
236
+ knowledgeBaseId?: Prisma.SortOrder;
237
+ chunkIndex?: Prisma.SortOrder;
238
+ pageNumber?: Prisma.SortOrderInput | Prisma.SortOrder;
239
+ content?: Prisma.SortOrder;
240
+ tokenCount?: Prisma.SortOrderInput | Prisma.SortOrder;
241
+ createdAt?: Prisma.SortOrder;
242
+ _count?: Prisma.KnowledgeBaseChunkCountOrderByAggregateInput;
243
+ _avg?: Prisma.KnowledgeBaseChunkAvgOrderByAggregateInput;
244
+ _max?: Prisma.KnowledgeBaseChunkMaxOrderByAggregateInput;
245
+ _min?: Prisma.KnowledgeBaseChunkMinOrderByAggregateInput;
246
+ _sum?: Prisma.KnowledgeBaseChunkSumOrderByAggregateInput;
247
+ };
248
+ export type KnowledgeBaseChunkScalarWhereWithAggregatesInput = {
249
+ AND?: Prisma.KnowledgeBaseChunkScalarWhereWithAggregatesInput | Prisma.KnowledgeBaseChunkScalarWhereWithAggregatesInput[];
250
+ OR?: Prisma.KnowledgeBaseChunkScalarWhereWithAggregatesInput[];
251
+ NOT?: Prisma.KnowledgeBaseChunkScalarWhereWithAggregatesInput | Prisma.KnowledgeBaseChunkScalarWhereWithAggregatesInput[];
252
+ id?: Prisma.StringWithAggregatesFilter<"KnowledgeBaseChunk"> | string;
253
+ documentId?: Prisma.StringWithAggregatesFilter<"KnowledgeBaseChunk"> | string;
254
+ knowledgeBaseId?: Prisma.StringWithAggregatesFilter<"KnowledgeBaseChunk"> | string;
255
+ chunkIndex?: Prisma.IntWithAggregatesFilter<"KnowledgeBaseChunk"> | number;
256
+ pageNumber?: Prisma.IntNullableWithAggregatesFilter<"KnowledgeBaseChunk"> | number | null;
257
+ content?: Prisma.StringWithAggregatesFilter<"KnowledgeBaseChunk"> | string;
258
+ tokenCount?: Prisma.IntNullableWithAggregatesFilter<"KnowledgeBaseChunk"> | number | null;
259
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"KnowledgeBaseChunk"> | Date | string;
260
+ };
261
+ export type KnowledgeBaseChunkCreateInput = {
262
+ id?: string;
263
+ knowledgeBaseId: string;
264
+ chunkIndex: number;
265
+ pageNumber?: number | null;
266
+ content: string;
267
+ tokenCount?: number | null;
268
+ createdAt?: Date | string;
269
+ document: Prisma.KnowledgeBaseDocumentCreateNestedOneWithoutChunksInput;
270
+ };
271
+ export type KnowledgeBaseChunkUncheckedCreateInput = {
272
+ id?: string;
273
+ documentId: string;
274
+ knowledgeBaseId: string;
275
+ chunkIndex: number;
276
+ pageNumber?: number | null;
277
+ content: string;
278
+ tokenCount?: number | null;
279
+ createdAt?: Date | string;
280
+ };
281
+ export type KnowledgeBaseChunkUpdateInput = {
282
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
283
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
284
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
285
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
286
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
287
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
288
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
289
+ document?: Prisma.KnowledgeBaseDocumentUpdateOneRequiredWithoutChunksNestedInput;
290
+ };
291
+ export type KnowledgeBaseChunkUncheckedUpdateInput = {
292
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
293
+ documentId?: Prisma.StringFieldUpdateOperationsInput | string;
294
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
295
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
296
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
297
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
298
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
299
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
300
+ };
301
+ export type KnowledgeBaseChunkCreateManyInput = {
302
+ id?: string;
303
+ documentId: string;
304
+ knowledgeBaseId: string;
305
+ chunkIndex: number;
306
+ pageNumber?: number | null;
307
+ content: string;
308
+ tokenCount?: number | null;
309
+ createdAt?: Date | string;
310
+ };
311
+ export type KnowledgeBaseChunkUpdateManyMutationInput = {
312
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
313
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
314
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
315
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
316
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
317
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
318
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
319
+ };
320
+ export type KnowledgeBaseChunkUncheckedUpdateManyInput = {
321
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
322
+ documentId?: Prisma.StringFieldUpdateOperationsInput | string;
323
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
324
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
325
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
326
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
327
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
328
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
329
+ };
330
+ export type KnowledgeBaseChunkListRelationFilter = {
331
+ every?: Prisma.KnowledgeBaseChunkWhereInput;
332
+ some?: Prisma.KnowledgeBaseChunkWhereInput;
333
+ none?: Prisma.KnowledgeBaseChunkWhereInput;
334
+ };
335
+ export type KnowledgeBaseChunkOrderByRelationAggregateInput = {
336
+ _count?: Prisma.SortOrder;
337
+ };
338
+ export type KnowledgeBaseChunkCountOrderByAggregateInput = {
339
+ id?: Prisma.SortOrder;
340
+ documentId?: Prisma.SortOrder;
341
+ knowledgeBaseId?: Prisma.SortOrder;
342
+ chunkIndex?: Prisma.SortOrder;
343
+ pageNumber?: Prisma.SortOrder;
344
+ content?: Prisma.SortOrder;
345
+ tokenCount?: Prisma.SortOrder;
346
+ createdAt?: Prisma.SortOrder;
347
+ };
348
+ export type KnowledgeBaseChunkAvgOrderByAggregateInput = {
349
+ chunkIndex?: Prisma.SortOrder;
350
+ pageNumber?: Prisma.SortOrder;
351
+ tokenCount?: Prisma.SortOrder;
352
+ };
353
+ export type KnowledgeBaseChunkMaxOrderByAggregateInput = {
354
+ id?: Prisma.SortOrder;
355
+ documentId?: Prisma.SortOrder;
356
+ knowledgeBaseId?: Prisma.SortOrder;
357
+ chunkIndex?: Prisma.SortOrder;
358
+ pageNumber?: Prisma.SortOrder;
359
+ content?: Prisma.SortOrder;
360
+ tokenCount?: Prisma.SortOrder;
361
+ createdAt?: Prisma.SortOrder;
362
+ };
363
+ export type KnowledgeBaseChunkMinOrderByAggregateInput = {
364
+ id?: Prisma.SortOrder;
365
+ documentId?: Prisma.SortOrder;
366
+ knowledgeBaseId?: Prisma.SortOrder;
367
+ chunkIndex?: Prisma.SortOrder;
368
+ pageNumber?: Prisma.SortOrder;
369
+ content?: Prisma.SortOrder;
370
+ tokenCount?: Prisma.SortOrder;
371
+ createdAt?: Prisma.SortOrder;
372
+ };
373
+ export type KnowledgeBaseChunkSumOrderByAggregateInput = {
374
+ chunkIndex?: Prisma.SortOrder;
375
+ pageNumber?: Prisma.SortOrder;
376
+ tokenCount?: Prisma.SortOrder;
377
+ };
378
+ export type KnowledgeBaseChunkCreateNestedManyWithoutDocumentInput = {
379
+ create?: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput> | Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput[] | Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput[];
380
+ connectOrCreate?: Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput | Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput[];
381
+ createMany?: Prisma.KnowledgeBaseChunkCreateManyDocumentInputEnvelope;
382
+ connect?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
383
+ };
384
+ export type KnowledgeBaseChunkUncheckedCreateNestedManyWithoutDocumentInput = {
385
+ create?: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput> | Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput[] | Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput[];
386
+ connectOrCreate?: Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput | Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput[];
387
+ createMany?: Prisma.KnowledgeBaseChunkCreateManyDocumentInputEnvelope;
388
+ connect?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
389
+ };
390
+ export type KnowledgeBaseChunkUpdateManyWithoutDocumentNestedInput = {
391
+ create?: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput> | Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput[] | Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput[];
392
+ connectOrCreate?: Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput | Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput[];
393
+ upsert?: Prisma.KnowledgeBaseChunkUpsertWithWhereUniqueWithoutDocumentInput | Prisma.KnowledgeBaseChunkUpsertWithWhereUniqueWithoutDocumentInput[];
394
+ createMany?: Prisma.KnowledgeBaseChunkCreateManyDocumentInputEnvelope;
395
+ set?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
396
+ disconnect?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
397
+ delete?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
398
+ connect?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
399
+ update?: Prisma.KnowledgeBaseChunkUpdateWithWhereUniqueWithoutDocumentInput | Prisma.KnowledgeBaseChunkUpdateWithWhereUniqueWithoutDocumentInput[];
400
+ updateMany?: Prisma.KnowledgeBaseChunkUpdateManyWithWhereWithoutDocumentInput | Prisma.KnowledgeBaseChunkUpdateManyWithWhereWithoutDocumentInput[];
401
+ deleteMany?: Prisma.KnowledgeBaseChunkScalarWhereInput | Prisma.KnowledgeBaseChunkScalarWhereInput[];
402
+ };
403
+ export type KnowledgeBaseChunkUncheckedUpdateManyWithoutDocumentNestedInput = {
404
+ create?: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput> | Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput[] | Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput[];
405
+ connectOrCreate?: Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput | Prisma.KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput[];
406
+ upsert?: Prisma.KnowledgeBaseChunkUpsertWithWhereUniqueWithoutDocumentInput | Prisma.KnowledgeBaseChunkUpsertWithWhereUniqueWithoutDocumentInput[];
407
+ createMany?: Prisma.KnowledgeBaseChunkCreateManyDocumentInputEnvelope;
408
+ set?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
409
+ disconnect?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
410
+ delete?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
411
+ connect?: Prisma.KnowledgeBaseChunkWhereUniqueInput | Prisma.KnowledgeBaseChunkWhereUniqueInput[];
412
+ update?: Prisma.KnowledgeBaseChunkUpdateWithWhereUniqueWithoutDocumentInput | Prisma.KnowledgeBaseChunkUpdateWithWhereUniqueWithoutDocumentInput[];
413
+ updateMany?: Prisma.KnowledgeBaseChunkUpdateManyWithWhereWithoutDocumentInput | Prisma.KnowledgeBaseChunkUpdateManyWithWhereWithoutDocumentInput[];
414
+ deleteMany?: Prisma.KnowledgeBaseChunkScalarWhereInput | Prisma.KnowledgeBaseChunkScalarWhereInput[];
415
+ };
416
+ export type KnowledgeBaseChunkCreateWithoutDocumentInput = {
417
+ id?: string;
418
+ knowledgeBaseId: string;
419
+ chunkIndex: number;
420
+ pageNumber?: number | null;
421
+ content: string;
422
+ tokenCount?: number | null;
423
+ createdAt?: Date | string;
424
+ };
425
+ export type KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput = {
426
+ id?: string;
427
+ knowledgeBaseId: string;
428
+ chunkIndex: number;
429
+ pageNumber?: number | null;
430
+ content: string;
431
+ tokenCount?: number | null;
432
+ createdAt?: Date | string;
433
+ };
434
+ export type KnowledgeBaseChunkCreateOrConnectWithoutDocumentInput = {
435
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
436
+ create: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput>;
437
+ };
438
+ export type KnowledgeBaseChunkCreateManyDocumentInputEnvelope = {
439
+ data: Prisma.KnowledgeBaseChunkCreateManyDocumentInput | Prisma.KnowledgeBaseChunkCreateManyDocumentInput[];
440
+ skipDuplicates?: boolean;
441
+ };
442
+ export type KnowledgeBaseChunkUpsertWithWhereUniqueWithoutDocumentInput = {
443
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
444
+ update: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedUpdateWithoutDocumentInput>;
445
+ create: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedCreateWithoutDocumentInput>;
446
+ };
447
+ export type KnowledgeBaseChunkUpdateWithWhereUniqueWithoutDocumentInput = {
448
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
449
+ data: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateWithoutDocumentInput, Prisma.KnowledgeBaseChunkUncheckedUpdateWithoutDocumentInput>;
450
+ };
451
+ export type KnowledgeBaseChunkUpdateManyWithWhereWithoutDocumentInput = {
452
+ where: Prisma.KnowledgeBaseChunkScalarWhereInput;
453
+ data: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateManyMutationInput, Prisma.KnowledgeBaseChunkUncheckedUpdateManyWithoutDocumentInput>;
454
+ };
455
+ export type KnowledgeBaseChunkScalarWhereInput = {
456
+ AND?: Prisma.KnowledgeBaseChunkScalarWhereInput | Prisma.KnowledgeBaseChunkScalarWhereInput[];
457
+ OR?: Prisma.KnowledgeBaseChunkScalarWhereInput[];
458
+ NOT?: Prisma.KnowledgeBaseChunkScalarWhereInput | Prisma.KnowledgeBaseChunkScalarWhereInput[];
459
+ id?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
460
+ documentId?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
461
+ knowledgeBaseId?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
462
+ chunkIndex?: Prisma.IntFilter<"KnowledgeBaseChunk"> | number;
463
+ pageNumber?: Prisma.IntNullableFilter<"KnowledgeBaseChunk"> | number | null;
464
+ content?: Prisma.StringFilter<"KnowledgeBaseChunk"> | string;
465
+ tokenCount?: Prisma.IntNullableFilter<"KnowledgeBaseChunk"> | number | null;
466
+ createdAt?: Prisma.DateTimeFilter<"KnowledgeBaseChunk"> | Date | string;
467
+ };
468
+ export type KnowledgeBaseChunkCreateManyDocumentInput = {
469
+ id?: string;
470
+ knowledgeBaseId: string;
471
+ chunkIndex: number;
472
+ pageNumber?: number | null;
473
+ content: string;
474
+ tokenCount?: number | null;
475
+ createdAt?: Date | string;
476
+ };
477
+ export type KnowledgeBaseChunkUpdateWithoutDocumentInput = {
478
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
479
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
480
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
481
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
482
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
483
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
484
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
485
+ };
486
+ export type KnowledgeBaseChunkUncheckedUpdateWithoutDocumentInput = {
487
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
488
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
489
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
490
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
491
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
492
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
493
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
494
+ };
495
+ export type KnowledgeBaseChunkUncheckedUpdateManyWithoutDocumentInput = {
496
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
497
+ knowledgeBaseId?: Prisma.StringFieldUpdateOperationsInput | string;
498
+ chunkIndex?: Prisma.IntFieldUpdateOperationsInput | number;
499
+ pageNumber?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
500
+ content?: Prisma.StringFieldUpdateOperationsInput | string;
501
+ tokenCount?: Prisma.NullableIntFieldUpdateOperationsInput | number | null;
502
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
503
+ };
504
+ export type KnowledgeBaseChunkSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
505
+ id?: boolean;
506
+ documentId?: boolean;
507
+ knowledgeBaseId?: boolean;
508
+ chunkIndex?: boolean;
509
+ pageNumber?: boolean;
510
+ content?: boolean;
511
+ tokenCount?: boolean;
512
+ createdAt?: boolean;
513
+ document?: boolean | Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>;
514
+ }, ExtArgs["result"]["knowledgeBaseChunk"]>;
515
+ export type KnowledgeBaseChunkSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
516
+ id?: boolean;
517
+ documentId?: boolean;
518
+ knowledgeBaseId?: boolean;
519
+ chunkIndex?: boolean;
520
+ pageNumber?: boolean;
521
+ content?: boolean;
522
+ tokenCount?: boolean;
523
+ createdAt?: boolean;
524
+ document?: boolean | Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>;
525
+ }, ExtArgs["result"]["knowledgeBaseChunk"]>;
526
+ export type KnowledgeBaseChunkSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
527
+ id?: boolean;
528
+ documentId?: boolean;
529
+ knowledgeBaseId?: boolean;
530
+ chunkIndex?: boolean;
531
+ pageNumber?: boolean;
532
+ content?: boolean;
533
+ tokenCount?: boolean;
534
+ createdAt?: boolean;
535
+ document?: boolean | Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>;
536
+ }, ExtArgs["result"]["knowledgeBaseChunk"]>;
537
+ export type KnowledgeBaseChunkSelectScalar = {
538
+ id?: boolean;
539
+ documentId?: boolean;
540
+ knowledgeBaseId?: boolean;
541
+ chunkIndex?: boolean;
542
+ pageNumber?: boolean;
543
+ content?: boolean;
544
+ tokenCount?: boolean;
545
+ createdAt?: boolean;
546
+ };
547
+ export type KnowledgeBaseChunkOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "documentId" | "knowledgeBaseId" | "chunkIndex" | "pageNumber" | "content" | "tokenCount" | "createdAt", ExtArgs["result"]["knowledgeBaseChunk"]>;
548
+ export type KnowledgeBaseChunkInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
549
+ document?: boolean | Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>;
550
+ };
551
+ export type KnowledgeBaseChunkIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
552
+ document?: boolean | Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>;
553
+ };
554
+ export type KnowledgeBaseChunkIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
555
+ document?: boolean | Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>;
556
+ };
557
+ export type $KnowledgeBaseChunkPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
558
+ name: "KnowledgeBaseChunk";
559
+ objects: {
560
+ document: Prisma.$KnowledgeBaseDocumentPayload<ExtArgs>;
561
+ };
562
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
563
+ id: string;
564
+ documentId: string;
565
+ knowledgeBaseId: string;
566
+ chunkIndex: number;
567
+ pageNumber: number | null;
568
+ content: string;
569
+ tokenCount: number | null;
570
+ createdAt: Date;
571
+ }, ExtArgs["result"]["knowledgeBaseChunk"]>;
572
+ composites: {};
573
+ };
574
+ export type KnowledgeBaseChunkGetPayload<S extends boolean | null | undefined | KnowledgeBaseChunkDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload, S>;
575
+ export type KnowledgeBaseChunkCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<KnowledgeBaseChunkFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
576
+ select?: KnowledgeBaseChunkCountAggregateInputType | true;
577
+ };
578
+ export interface KnowledgeBaseChunkDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
579
+ [K: symbol]: {
580
+ types: Prisma.TypeMap<ExtArgs>['model']['KnowledgeBaseChunk'];
581
+ meta: {
582
+ name: 'KnowledgeBaseChunk';
583
+ };
584
+ };
585
+ /**
586
+ * Find zero or one KnowledgeBaseChunk that matches the filter.
587
+ * @param {KnowledgeBaseChunkFindUniqueArgs} args - Arguments to find a KnowledgeBaseChunk
588
+ * @example
589
+ * // Get one KnowledgeBaseChunk
590
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.findUnique({
591
+ * where: {
592
+ * // ... provide filter here
593
+ * }
594
+ * })
595
+ */
596
+ findUnique<T extends KnowledgeBaseChunkFindUniqueArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkFindUniqueArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
597
+ /**
598
+ * Find one KnowledgeBaseChunk that matches the filter or throw an error with `error.code='P2025'`
599
+ * if no matches were found.
600
+ * @param {KnowledgeBaseChunkFindUniqueOrThrowArgs} args - Arguments to find a KnowledgeBaseChunk
601
+ * @example
602
+ * // Get one KnowledgeBaseChunk
603
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.findUniqueOrThrow({
604
+ * where: {
605
+ * // ... provide filter here
606
+ * }
607
+ * })
608
+ */
609
+ findUniqueOrThrow<T extends KnowledgeBaseChunkFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
610
+ /**
611
+ * Find the first KnowledgeBaseChunk that matches the filter.
612
+ * Note, that providing `undefined` is treated as the value not being there.
613
+ * Read more here: https://pris.ly/d/null-undefined
614
+ * @param {KnowledgeBaseChunkFindFirstArgs} args - Arguments to find a KnowledgeBaseChunk
615
+ * @example
616
+ * // Get one KnowledgeBaseChunk
617
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.findFirst({
618
+ * where: {
619
+ * // ... provide filter here
620
+ * }
621
+ * })
622
+ */
623
+ findFirst<T extends KnowledgeBaseChunkFindFirstArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseChunkFindFirstArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
624
+ /**
625
+ * Find the first KnowledgeBaseChunk that matches the filter or
626
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
627
+ * Note, that providing `undefined` is treated as the value not being there.
628
+ * Read more here: https://pris.ly/d/null-undefined
629
+ * @param {KnowledgeBaseChunkFindFirstOrThrowArgs} args - Arguments to find a KnowledgeBaseChunk
630
+ * @example
631
+ * // Get one KnowledgeBaseChunk
632
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.findFirstOrThrow({
633
+ * where: {
634
+ * // ... provide filter here
635
+ * }
636
+ * })
637
+ */
638
+ findFirstOrThrow<T extends KnowledgeBaseChunkFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseChunkFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
639
+ /**
640
+ * Find zero or more KnowledgeBaseChunks that matches the filter.
641
+ * Note, that providing `undefined` is treated as the value not being there.
642
+ * Read more here: https://pris.ly/d/null-undefined
643
+ * @param {KnowledgeBaseChunkFindManyArgs} args - Arguments to filter and select certain fields only.
644
+ * @example
645
+ * // Get all KnowledgeBaseChunks
646
+ * const knowledgeBaseChunks = await prisma.knowledgeBaseChunk.findMany()
647
+ *
648
+ * // Get first 10 KnowledgeBaseChunks
649
+ * const knowledgeBaseChunks = await prisma.knowledgeBaseChunk.findMany({ take: 10 })
650
+ *
651
+ * // Only select the `id`
652
+ * const knowledgeBaseChunkWithIdOnly = await prisma.knowledgeBaseChunk.findMany({ select: { id: true } })
653
+ *
654
+ */
655
+ findMany<T extends KnowledgeBaseChunkFindManyArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseChunkFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
656
+ /**
657
+ * Create a KnowledgeBaseChunk.
658
+ * @param {KnowledgeBaseChunkCreateArgs} args - Arguments to create a KnowledgeBaseChunk.
659
+ * @example
660
+ * // Create one KnowledgeBaseChunk
661
+ * const KnowledgeBaseChunk = await prisma.knowledgeBaseChunk.create({
662
+ * data: {
663
+ * // ... data to create a KnowledgeBaseChunk
664
+ * }
665
+ * })
666
+ *
667
+ */
668
+ create<T extends KnowledgeBaseChunkCreateArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkCreateArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
669
+ /**
670
+ * Create many KnowledgeBaseChunks.
671
+ * @param {KnowledgeBaseChunkCreateManyArgs} args - Arguments to create many KnowledgeBaseChunks.
672
+ * @example
673
+ * // Create many KnowledgeBaseChunks
674
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.createMany({
675
+ * data: [
676
+ * // ... provide data here
677
+ * ]
678
+ * })
679
+ *
680
+ */
681
+ createMany<T extends KnowledgeBaseChunkCreateManyArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseChunkCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
682
+ /**
683
+ * Create many KnowledgeBaseChunks and returns the data saved in the database.
684
+ * @param {KnowledgeBaseChunkCreateManyAndReturnArgs} args - Arguments to create many KnowledgeBaseChunks.
685
+ * @example
686
+ * // Create many KnowledgeBaseChunks
687
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.createManyAndReturn({
688
+ * data: [
689
+ * // ... provide data here
690
+ * ]
691
+ * })
692
+ *
693
+ * // Create many KnowledgeBaseChunks and only return the `id`
694
+ * const knowledgeBaseChunkWithIdOnly = await prisma.knowledgeBaseChunk.createManyAndReturn({
695
+ * select: { id: true },
696
+ * data: [
697
+ * // ... provide data here
698
+ * ]
699
+ * })
700
+ * Note, that providing `undefined` is treated as the value not being there.
701
+ * Read more here: https://pris.ly/d/null-undefined
702
+ *
703
+ */
704
+ createManyAndReturn<T extends KnowledgeBaseChunkCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseChunkCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
705
+ /**
706
+ * Delete a KnowledgeBaseChunk.
707
+ * @param {KnowledgeBaseChunkDeleteArgs} args - Arguments to delete one KnowledgeBaseChunk.
708
+ * @example
709
+ * // Delete one KnowledgeBaseChunk
710
+ * const KnowledgeBaseChunk = await prisma.knowledgeBaseChunk.delete({
711
+ * where: {
712
+ * // ... filter to delete one KnowledgeBaseChunk
713
+ * }
714
+ * })
715
+ *
716
+ */
717
+ delete<T extends KnowledgeBaseChunkDeleteArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkDeleteArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
718
+ /**
719
+ * Update one KnowledgeBaseChunk.
720
+ * @param {KnowledgeBaseChunkUpdateArgs} args - Arguments to update one KnowledgeBaseChunk.
721
+ * @example
722
+ * // Update one KnowledgeBaseChunk
723
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.update({
724
+ * where: {
725
+ * // ... provide filter here
726
+ * },
727
+ * data: {
728
+ * // ... provide data here
729
+ * }
730
+ * })
731
+ *
732
+ */
733
+ update<T extends KnowledgeBaseChunkUpdateArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkUpdateArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
734
+ /**
735
+ * Delete zero or more KnowledgeBaseChunks.
736
+ * @param {KnowledgeBaseChunkDeleteManyArgs} args - Arguments to filter KnowledgeBaseChunks to delete.
737
+ * @example
738
+ * // Delete a few KnowledgeBaseChunks
739
+ * const { count } = await prisma.knowledgeBaseChunk.deleteMany({
740
+ * where: {
741
+ * // ... provide filter here
742
+ * }
743
+ * })
744
+ *
745
+ */
746
+ deleteMany<T extends KnowledgeBaseChunkDeleteManyArgs>(args?: Prisma.SelectSubset<T, KnowledgeBaseChunkDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
747
+ /**
748
+ * Update zero or more KnowledgeBaseChunks.
749
+ * Note, that providing `undefined` is treated as the value not being there.
750
+ * Read more here: https://pris.ly/d/null-undefined
751
+ * @param {KnowledgeBaseChunkUpdateManyArgs} args - Arguments to update one or more rows.
752
+ * @example
753
+ * // Update many KnowledgeBaseChunks
754
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.updateMany({
755
+ * where: {
756
+ * // ... provide filter here
757
+ * },
758
+ * data: {
759
+ * // ... provide data here
760
+ * }
761
+ * })
762
+ *
763
+ */
764
+ updateMany<T extends KnowledgeBaseChunkUpdateManyArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
765
+ /**
766
+ * Update zero or more KnowledgeBaseChunks and returns the data updated in the database.
767
+ * @param {KnowledgeBaseChunkUpdateManyAndReturnArgs} args - Arguments to update many KnowledgeBaseChunks.
768
+ * @example
769
+ * // Update many KnowledgeBaseChunks
770
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.updateManyAndReturn({
771
+ * where: {
772
+ * // ... provide filter here
773
+ * },
774
+ * data: [
775
+ * // ... provide data here
776
+ * ]
777
+ * })
778
+ *
779
+ * // Update zero or more KnowledgeBaseChunks and only return the `id`
780
+ * const knowledgeBaseChunkWithIdOnly = await prisma.knowledgeBaseChunk.updateManyAndReturn({
781
+ * select: { id: true },
782
+ * where: {
783
+ * // ... provide filter here
784
+ * },
785
+ * data: [
786
+ * // ... provide data here
787
+ * ]
788
+ * })
789
+ * Note, that providing `undefined` is treated as the value not being there.
790
+ * Read more here: https://pris.ly/d/null-undefined
791
+ *
792
+ */
793
+ updateManyAndReturn<T extends KnowledgeBaseChunkUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
794
+ /**
795
+ * Create or update one KnowledgeBaseChunk.
796
+ * @param {KnowledgeBaseChunkUpsertArgs} args - Arguments to update or create a KnowledgeBaseChunk.
797
+ * @example
798
+ * // Update or create a KnowledgeBaseChunk
799
+ * const knowledgeBaseChunk = await prisma.knowledgeBaseChunk.upsert({
800
+ * create: {
801
+ * // ... data to create a KnowledgeBaseChunk
802
+ * },
803
+ * update: {
804
+ * // ... in case it already exists, update
805
+ * },
806
+ * where: {
807
+ * // ... the filter for the KnowledgeBaseChunk we want to update
808
+ * }
809
+ * })
810
+ */
811
+ upsert<T extends KnowledgeBaseChunkUpsertArgs>(args: Prisma.SelectSubset<T, KnowledgeBaseChunkUpsertArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseChunkClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseChunkPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
812
+ /**
813
+ * Count the number of KnowledgeBaseChunks.
814
+ * Note, that providing `undefined` is treated as the value not being there.
815
+ * Read more here: https://pris.ly/d/null-undefined
816
+ * @param {KnowledgeBaseChunkCountArgs} args - Arguments to filter KnowledgeBaseChunks to count.
817
+ * @example
818
+ * // Count the number of KnowledgeBaseChunks
819
+ * const count = await prisma.knowledgeBaseChunk.count({
820
+ * where: {
821
+ * // ... the filter for the KnowledgeBaseChunks we want to count
822
+ * }
823
+ * })
824
+ **/
825
+ count<T extends KnowledgeBaseChunkCountArgs>(args?: Prisma.Subset<T, KnowledgeBaseChunkCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], KnowledgeBaseChunkCountAggregateOutputType> : number>;
826
+ /**
827
+ * Allows you to perform aggregations operations on a KnowledgeBaseChunk.
828
+ * Note, that providing `undefined` is treated as the value not being there.
829
+ * Read more here: https://pris.ly/d/null-undefined
830
+ * @param {KnowledgeBaseChunkAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
831
+ * @example
832
+ * // Ordered by age ascending
833
+ * // Where email contains prisma.io
834
+ * // Limited to the 10 users
835
+ * const aggregations = await prisma.user.aggregate({
836
+ * _avg: {
837
+ * age: true,
838
+ * },
839
+ * where: {
840
+ * email: {
841
+ * contains: "prisma.io",
842
+ * },
843
+ * },
844
+ * orderBy: {
845
+ * age: "asc",
846
+ * },
847
+ * take: 10,
848
+ * })
849
+ **/
850
+ aggregate<T extends KnowledgeBaseChunkAggregateArgs>(args: Prisma.Subset<T, KnowledgeBaseChunkAggregateArgs>): Prisma.PrismaPromise<GetKnowledgeBaseChunkAggregateType<T>>;
851
+ /**
852
+ * Group by KnowledgeBaseChunk.
853
+ * Note, that providing `undefined` is treated as the value not being there.
854
+ * Read more here: https://pris.ly/d/null-undefined
855
+ * @param {KnowledgeBaseChunkGroupByArgs} args - Group by arguments.
856
+ * @example
857
+ * // Group by city, order by createdAt, get count
858
+ * const result = await prisma.user.groupBy({
859
+ * by: ['city', 'createdAt'],
860
+ * orderBy: {
861
+ * createdAt: true
862
+ * },
863
+ * _count: {
864
+ * _all: true
865
+ * },
866
+ * })
867
+ *
868
+ **/
869
+ groupBy<T extends KnowledgeBaseChunkGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
870
+ orderBy: KnowledgeBaseChunkGroupByArgs['orderBy'];
871
+ } : {
872
+ orderBy?: KnowledgeBaseChunkGroupByArgs['orderBy'];
873
+ }, 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 ? {
874
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
875
+ Error,
876
+ 'Field ',
877
+ P,
878
+ ` in "having" needs to be provided in "by"`
879
+ ];
880
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
881
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
882
+ }[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 ? {} : {
883
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
884
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
885
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
886
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, KnowledgeBaseChunkGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetKnowledgeBaseChunkGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
887
+ /**
888
+ * Fields of the KnowledgeBaseChunk model
889
+ */
890
+ readonly fields: KnowledgeBaseChunkFieldRefs;
891
+ }
892
+ /**
893
+ * The delegate class that acts as a "Promise-like" for KnowledgeBaseChunk.
894
+ * Why is this prefixed with `Prisma__`?
895
+ * Because we want to prevent naming conflicts as mentioned in
896
+ * https://github.com/prisma/prisma-client-js/issues/707
897
+ */
898
+ export interface Prisma__KnowledgeBaseChunkClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
899
+ readonly [Symbol.toStringTag]: "PrismaPromise";
900
+ document<T extends Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.KnowledgeBaseDocumentDefaultArgs<ExtArgs>>): Prisma.Prisma__KnowledgeBaseDocumentClient<runtime.Types.Result.GetResult<Prisma.$KnowledgeBaseDocumentPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
901
+ /**
902
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
903
+ * @param onfulfilled The callback to execute when the Promise is resolved.
904
+ * @param onrejected The callback to execute when the Promise is rejected.
905
+ * @returns A Promise for the completion of which ever callback is executed.
906
+ */
907
+ 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>;
908
+ /**
909
+ * Attaches a callback for only the rejection of the Promise.
910
+ * @param onrejected The callback to execute when the Promise is rejected.
911
+ * @returns A Promise for the completion of the callback.
912
+ */
913
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
914
+ /**
915
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
916
+ * resolved value cannot be modified from the callback.
917
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
918
+ * @returns A Promise for the completion of the callback.
919
+ */
920
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
921
+ }
922
+ /**
923
+ * Fields of the KnowledgeBaseChunk model
924
+ */
925
+ export interface KnowledgeBaseChunkFieldRefs {
926
+ readonly id: Prisma.FieldRef<"KnowledgeBaseChunk", 'String'>;
927
+ readonly documentId: Prisma.FieldRef<"KnowledgeBaseChunk", 'String'>;
928
+ readonly knowledgeBaseId: Prisma.FieldRef<"KnowledgeBaseChunk", 'String'>;
929
+ readonly chunkIndex: Prisma.FieldRef<"KnowledgeBaseChunk", 'Int'>;
930
+ readonly pageNumber: Prisma.FieldRef<"KnowledgeBaseChunk", 'Int'>;
931
+ readonly content: Prisma.FieldRef<"KnowledgeBaseChunk", 'String'>;
932
+ readonly tokenCount: Prisma.FieldRef<"KnowledgeBaseChunk", 'Int'>;
933
+ readonly createdAt: Prisma.FieldRef<"KnowledgeBaseChunk", 'DateTime'>;
934
+ }
935
+ /**
936
+ * KnowledgeBaseChunk findUnique
937
+ */
938
+ export type KnowledgeBaseChunkFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
939
+ /**
940
+ * Select specific fields to fetch from the KnowledgeBaseChunk
941
+ */
942
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
943
+ /**
944
+ * Omit specific fields from the KnowledgeBaseChunk
945
+ */
946
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
947
+ /**
948
+ * Choose, which related nodes to fetch as well
949
+ */
950
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
951
+ /**
952
+ * Filter, which KnowledgeBaseChunk to fetch.
953
+ */
954
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
955
+ };
956
+ /**
957
+ * KnowledgeBaseChunk findUniqueOrThrow
958
+ */
959
+ export type KnowledgeBaseChunkFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
960
+ /**
961
+ * Select specific fields to fetch from the KnowledgeBaseChunk
962
+ */
963
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
964
+ /**
965
+ * Omit specific fields from the KnowledgeBaseChunk
966
+ */
967
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
968
+ /**
969
+ * Choose, which related nodes to fetch as well
970
+ */
971
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
972
+ /**
973
+ * Filter, which KnowledgeBaseChunk to fetch.
974
+ */
975
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
976
+ };
977
+ /**
978
+ * KnowledgeBaseChunk findFirst
979
+ */
980
+ export type KnowledgeBaseChunkFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
981
+ /**
982
+ * Select specific fields to fetch from the KnowledgeBaseChunk
983
+ */
984
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
985
+ /**
986
+ * Omit specific fields from the KnowledgeBaseChunk
987
+ */
988
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
989
+ /**
990
+ * Choose, which related nodes to fetch as well
991
+ */
992
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
993
+ /**
994
+ * Filter, which KnowledgeBaseChunk to fetch.
995
+ */
996
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
997
+ /**
998
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
999
+ *
1000
+ * Determine the order of KnowledgeBaseChunks to fetch.
1001
+ */
1002
+ orderBy?: Prisma.KnowledgeBaseChunkOrderByWithRelationInput | Prisma.KnowledgeBaseChunkOrderByWithRelationInput[];
1003
+ /**
1004
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1005
+ *
1006
+ * Sets the position for searching for KnowledgeBaseChunks.
1007
+ */
1008
+ cursor?: Prisma.KnowledgeBaseChunkWhereUniqueInput;
1009
+ /**
1010
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1011
+ *
1012
+ * Take `±n` KnowledgeBaseChunks from the position of the cursor.
1013
+ */
1014
+ take?: number;
1015
+ /**
1016
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1017
+ *
1018
+ * Skip the first `n` KnowledgeBaseChunks.
1019
+ */
1020
+ skip?: number;
1021
+ /**
1022
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1023
+ *
1024
+ * Filter by unique combinations of KnowledgeBaseChunks.
1025
+ */
1026
+ distinct?: Prisma.KnowledgeBaseChunkScalarFieldEnum | Prisma.KnowledgeBaseChunkScalarFieldEnum[];
1027
+ };
1028
+ /**
1029
+ * KnowledgeBaseChunk findFirstOrThrow
1030
+ */
1031
+ export type KnowledgeBaseChunkFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1032
+ /**
1033
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1034
+ */
1035
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1036
+ /**
1037
+ * Omit specific fields from the KnowledgeBaseChunk
1038
+ */
1039
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1040
+ /**
1041
+ * Choose, which related nodes to fetch as well
1042
+ */
1043
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1044
+ /**
1045
+ * Filter, which KnowledgeBaseChunk to fetch.
1046
+ */
1047
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
1048
+ /**
1049
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1050
+ *
1051
+ * Determine the order of KnowledgeBaseChunks to fetch.
1052
+ */
1053
+ orderBy?: Prisma.KnowledgeBaseChunkOrderByWithRelationInput | Prisma.KnowledgeBaseChunkOrderByWithRelationInput[];
1054
+ /**
1055
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1056
+ *
1057
+ * Sets the position for searching for KnowledgeBaseChunks.
1058
+ */
1059
+ cursor?: Prisma.KnowledgeBaseChunkWhereUniqueInput;
1060
+ /**
1061
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1062
+ *
1063
+ * Take `±n` KnowledgeBaseChunks from the position of the cursor.
1064
+ */
1065
+ take?: number;
1066
+ /**
1067
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1068
+ *
1069
+ * Skip the first `n` KnowledgeBaseChunks.
1070
+ */
1071
+ skip?: number;
1072
+ /**
1073
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1074
+ *
1075
+ * Filter by unique combinations of KnowledgeBaseChunks.
1076
+ */
1077
+ distinct?: Prisma.KnowledgeBaseChunkScalarFieldEnum | Prisma.KnowledgeBaseChunkScalarFieldEnum[];
1078
+ };
1079
+ /**
1080
+ * KnowledgeBaseChunk findMany
1081
+ */
1082
+ export type KnowledgeBaseChunkFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1083
+ /**
1084
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1085
+ */
1086
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1087
+ /**
1088
+ * Omit specific fields from the KnowledgeBaseChunk
1089
+ */
1090
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1091
+ /**
1092
+ * Choose, which related nodes to fetch as well
1093
+ */
1094
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1095
+ /**
1096
+ * Filter, which KnowledgeBaseChunks to fetch.
1097
+ */
1098
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
1099
+ /**
1100
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1101
+ *
1102
+ * Determine the order of KnowledgeBaseChunks to fetch.
1103
+ */
1104
+ orderBy?: Prisma.KnowledgeBaseChunkOrderByWithRelationInput | Prisma.KnowledgeBaseChunkOrderByWithRelationInput[];
1105
+ /**
1106
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1107
+ *
1108
+ * Sets the position for listing KnowledgeBaseChunks.
1109
+ */
1110
+ cursor?: Prisma.KnowledgeBaseChunkWhereUniqueInput;
1111
+ /**
1112
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1113
+ *
1114
+ * Take `±n` KnowledgeBaseChunks from the position of the cursor.
1115
+ */
1116
+ take?: number;
1117
+ /**
1118
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1119
+ *
1120
+ * Skip the first `n` KnowledgeBaseChunks.
1121
+ */
1122
+ skip?: number;
1123
+ /**
1124
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1125
+ *
1126
+ * Filter by unique combinations of KnowledgeBaseChunks.
1127
+ */
1128
+ distinct?: Prisma.KnowledgeBaseChunkScalarFieldEnum | Prisma.KnowledgeBaseChunkScalarFieldEnum[];
1129
+ };
1130
+ /**
1131
+ * KnowledgeBaseChunk create
1132
+ */
1133
+ export type KnowledgeBaseChunkCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1134
+ /**
1135
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1136
+ */
1137
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1138
+ /**
1139
+ * Omit specific fields from the KnowledgeBaseChunk
1140
+ */
1141
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1142
+ /**
1143
+ * Choose, which related nodes to fetch as well
1144
+ */
1145
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1146
+ /**
1147
+ * The data needed to create a KnowledgeBaseChunk.
1148
+ */
1149
+ data: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateInput, Prisma.KnowledgeBaseChunkUncheckedCreateInput>;
1150
+ };
1151
+ /**
1152
+ * KnowledgeBaseChunk createMany
1153
+ */
1154
+ export type KnowledgeBaseChunkCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1155
+ /**
1156
+ * The data used to create many KnowledgeBaseChunks.
1157
+ */
1158
+ data: Prisma.KnowledgeBaseChunkCreateManyInput | Prisma.KnowledgeBaseChunkCreateManyInput[];
1159
+ skipDuplicates?: boolean;
1160
+ };
1161
+ /**
1162
+ * KnowledgeBaseChunk createManyAndReturn
1163
+ */
1164
+ export type KnowledgeBaseChunkCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1165
+ /**
1166
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1167
+ */
1168
+ select?: Prisma.KnowledgeBaseChunkSelectCreateManyAndReturn<ExtArgs> | null;
1169
+ /**
1170
+ * Omit specific fields from the KnowledgeBaseChunk
1171
+ */
1172
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1173
+ /**
1174
+ * The data used to create many KnowledgeBaseChunks.
1175
+ */
1176
+ data: Prisma.KnowledgeBaseChunkCreateManyInput | Prisma.KnowledgeBaseChunkCreateManyInput[];
1177
+ skipDuplicates?: boolean;
1178
+ /**
1179
+ * Choose, which related nodes to fetch as well
1180
+ */
1181
+ include?: Prisma.KnowledgeBaseChunkIncludeCreateManyAndReturn<ExtArgs> | null;
1182
+ };
1183
+ /**
1184
+ * KnowledgeBaseChunk update
1185
+ */
1186
+ export type KnowledgeBaseChunkUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1187
+ /**
1188
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1189
+ */
1190
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1191
+ /**
1192
+ * Omit specific fields from the KnowledgeBaseChunk
1193
+ */
1194
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1195
+ /**
1196
+ * Choose, which related nodes to fetch as well
1197
+ */
1198
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1199
+ /**
1200
+ * The data needed to update a KnowledgeBaseChunk.
1201
+ */
1202
+ data: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateInput, Prisma.KnowledgeBaseChunkUncheckedUpdateInput>;
1203
+ /**
1204
+ * Choose, which KnowledgeBaseChunk to update.
1205
+ */
1206
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
1207
+ };
1208
+ /**
1209
+ * KnowledgeBaseChunk updateMany
1210
+ */
1211
+ export type KnowledgeBaseChunkUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1212
+ /**
1213
+ * The data used to update KnowledgeBaseChunks.
1214
+ */
1215
+ data: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateManyMutationInput, Prisma.KnowledgeBaseChunkUncheckedUpdateManyInput>;
1216
+ /**
1217
+ * Filter which KnowledgeBaseChunks to update
1218
+ */
1219
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
1220
+ /**
1221
+ * Limit how many KnowledgeBaseChunks to update.
1222
+ */
1223
+ limit?: number;
1224
+ };
1225
+ /**
1226
+ * KnowledgeBaseChunk updateManyAndReturn
1227
+ */
1228
+ export type KnowledgeBaseChunkUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1229
+ /**
1230
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1231
+ */
1232
+ select?: Prisma.KnowledgeBaseChunkSelectUpdateManyAndReturn<ExtArgs> | null;
1233
+ /**
1234
+ * Omit specific fields from the KnowledgeBaseChunk
1235
+ */
1236
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1237
+ /**
1238
+ * The data used to update KnowledgeBaseChunks.
1239
+ */
1240
+ data: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateManyMutationInput, Prisma.KnowledgeBaseChunkUncheckedUpdateManyInput>;
1241
+ /**
1242
+ * Filter which KnowledgeBaseChunks to update
1243
+ */
1244
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
1245
+ /**
1246
+ * Limit how many KnowledgeBaseChunks to update.
1247
+ */
1248
+ limit?: number;
1249
+ /**
1250
+ * Choose, which related nodes to fetch as well
1251
+ */
1252
+ include?: Prisma.KnowledgeBaseChunkIncludeUpdateManyAndReturn<ExtArgs> | null;
1253
+ };
1254
+ /**
1255
+ * KnowledgeBaseChunk upsert
1256
+ */
1257
+ export type KnowledgeBaseChunkUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1258
+ /**
1259
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1260
+ */
1261
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1262
+ /**
1263
+ * Omit specific fields from the KnowledgeBaseChunk
1264
+ */
1265
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1266
+ /**
1267
+ * Choose, which related nodes to fetch as well
1268
+ */
1269
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1270
+ /**
1271
+ * The filter to search for the KnowledgeBaseChunk to update in case it exists.
1272
+ */
1273
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
1274
+ /**
1275
+ * In case the KnowledgeBaseChunk found by the `where` argument doesn't exist, create a new KnowledgeBaseChunk with this data.
1276
+ */
1277
+ create: Prisma.XOR<Prisma.KnowledgeBaseChunkCreateInput, Prisma.KnowledgeBaseChunkUncheckedCreateInput>;
1278
+ /**
1279
+ * In case the KnowledgeBaseChunk was found with the provided `where` argument, update it with this data.
1280
+ */
1281
+ update: Prisma.XOR<Prisma.KnowledgeBaseChunkUpdateInput, Prisma.KnowledgeBaseChunkUncheckedUpdateInput>;
1282
+ };
1283
+ /**
1284
+ * KnowledgeBaseChunk delete
1285
+ */
1286
+ export type KnowledgeBaseChunkDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1287
+ /**
1288
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1289
+ */
1290
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1291
+ /**
1292
+ * Omit specific fields from the KnowledgeBaseChunk
1293
+ */
1294
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1295
+ /**
1296
+ * Choose, which related nodes to fetch as well
1297
+ */
1298
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1299
+ /**
1300
+ * Filter which KnowledgeBaseChunk to delete.
1301
+ */
1302
+ where: Prisma.KnowledgeBaseChunkWhereUniqueInput;
1303
+ };
1304
+ /**
1305
+ * KnowledgeBaseChunk deleteMany
1306
+ */
1307
+ export type KnowledgeBaseChunkDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1308
+ /**
1309
+ * Filter which KnowledgeBaseChunks to delete
1310
+ */
1311
+ where?: Prisma.KnowledgeBaseChunkWhereInput;
1312
+ /**
1313
+ * Limit how many KnowledgeBaseChunks to delete.
1314
+ */
1315
+ limit?: number;
1316
+ };
1317
+ /**
1318
+ * KnowledgeBaseChunk without action
1319
+ */
1320
+ export type KnowledgeBaseChunkDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1321
+ /**
1322
+ * Select specific fields to fetch from the KnowledgeBaseChunk
1323
+ */
1324
+ select?: Prisma.KnowledgeBaseChunkSelect<ExtArgs> | null;
1325
+ /**
1326
+ * Omit specific fields from the KnowledgeBaseChunk
1327
+ */
1328
+ omit?: Prisma.KnowledgeBaseChunkOmit<ExtArgs> | null;
1329
+ /**
1330
+ * Choose, which related nodes to fetch as well
1331
+ */
1332
+ include?: Prisma.KnowledgeBaseChunkInclude<ExtArgs> | null;
1333
+ };