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