@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,1677 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace";
3
+ /**
4
+ * Model Subscription
5
+ *
6
+ */
7
+ export type SubscriptionModel = runtime.Types.Result.DefaultSelection<Prisma.$SubscriptionPayload>;
8
+ export type AggregateSubscription = {
9
+ _count: SubscriptionCountAggregateOutputType | null;
10
+ _min: SubscriptionMinAggregateOutputType | null;
11
+ _max: SubscriptionMaxAggregateOutputType | null;
12
+ };
13
+ export type SubscriptionMinAggregateOutputType = {
14
+ id: string | null;
15
+ userId: string | null;
16
+ planId: string | null;
17
+ stripeSubscriptionId: string | null;
18
+ stripeCustomerId: string | null;
19
+ status: string | null;
20
+ currentPeriodStart: Date | null;
21
+ currentPeriodEnd: Date | null;
22
+ cancelAt: Date | null;
23
+ canceledAt: Date | null;
24
+ createdAt: Date | null;
25
+ };
26
+ export type SubscriptionMaxAggregateOutputType = {
27
+ id: string | null;
28
+ userId: string | null;
29
+ planId: string | null;
30
+ stripeSubscriptionId: string | null;
31
+ stripeCustomerId: string | null;
32
+ status: string | null;
33
+ currentPeriodStart: Date | null;
34
+ currentPeriodEnd: Date | null;
35
+ cancelAt: Date | null;
36
+ canceledAt: Date | null;
37
+ createdAt: Date | null;
38
+ };
39
+ export type SubscriptionCountAggregateOutputType = {
40
+ id: number;
41
+ userId: number;
42
+ planId: number;
43
+ stripeSubscriptionId: number;
44
+ stripeCustomerId: number;
45
+ status: number;
46
+ currentPeriodStart: number;
47
+ currentPeriodEnd: number;
48
+ cancelAt: number;
49
+ canceledAt: number;
50
+ createdAt: number;
51
+ _all: number;
52
+ };
53
+ export type SubscriptionMinAggregateInputType = {
54
+ id?: true;
55
+ userId?: true;
56
+ planId?: true;
57
+ stripeSubscriptionId?: true;
58
+ stripeCustomerId?: true;
59
+ status?: true;
60
+ currentPeriodStart?: true;
61
+ currentPeriodEnd?: true;
62
+ cancelAt?: true;
63
+ canceledAt?: true;
64
+ createdAt?: true;
65
+ };
66
+ export type SubscriptionMaxAggregateInputType = {
67
+ id?: true;
68
+ userId?: true;
69
+ planId?: true;
70
+ stripeSubscriptionId?: true;
71
+ stripeCustomerId?: true;
72
+ status?: true;
73
+ currentPeriodStart?: true;
74
+ currentPeriodEnd?: true;
75
+ cancelAt?: true;
76
+ canceledAt?: true;
77
+ createdAt?: true;
78
+ };
79
+ export type SubscriptionCountAggregateInputType = {
80
+ id?: true;
81
+ userId?: true;
82
+ planId?: true;
83
+ stripeSubscriptionId?: true;
84
+ stripeCustomerId?: true;
85
+ status?: true;
86
+ currentPeriodStart?: true;
87
+ currentPeriodEnd?: true;
88
+ cancelAt?: true;
89
+ canceledAt?: true;
90
+ createdAt?: true;
91
+ _all?: true;
92
+ };
93
+ export type SubscriptionAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
94
+ /**
95
+ * Filter which Subscription to aggregate.
96
+ */
97
+ where?: Prisma.SubscriptionWhereInput;
98
+ /**
99
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
100
+ *
101
+ * Determine the order of Subscriptions to fetch.
102
+ */
103
+ orderBy?: Prisma.SubscriptionOrderByWithRelationInput | Prisma.SubscriptionOrderByWithRelationInput[];
104
+ /**
105
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
106
+ *
107
+ * Sets the start position
108
+ */
109
+ cursor?: Prisma.SubscriptionWhereUniqueInput;
110
+ /**
111
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
112
+ *
113
+ * Take `±n` Subscriptions from the position of the cursor.
114
+ */
115
+ take?: number;
116
+ /**
117
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
118
+ *
119
+ * Skip the first `n` Subscriptions.
120
+ */
121
+ skip?: number;
122
+ /**
123
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
124
+ *
125
+ * Count returned Subscriptions
126
+ **/
127
+ _count?: true | SubscriptionCountAggregateInputType;
128
+ /**
129
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
130
+ *
131
+ * Select which fields to find the minimum value
132
+ **/
133
+ _min?: SubscriptionMinAggregateInputType;
134
+ /**
135
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
136
+ *
137
+ * Select which fields to find the maximum value
138
+ **/
139
+ _max?: SubscriptionMaxAggregateInputType;
140
+ };
141
+ export type GetSubscriptionAggregateType<T extends SubscriptionAggregateArgs> = {
142
+ [P in keyof T & keyof AggregateSubscription]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateSubscription[P]> : Prisma.GetScalarType<T[P], AggregateSubscription[P]>;
143
+ };
144
+ export type SubscriptionGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
145
+ where?: Prisma.SubscriptionWhereInput;
146
+ orderBy?: Prisma.SubscriptionOrderByWithAggregationInput | Prisma.SubscriptionOrderByWithAggregationInput[];
147
+ by: Prisma.SubscriptionScalarFieldEnum[] | Prisma.SubscriptionScalarFieldEnum;
148
+ having?: Prisma.SubscriptionScalarWhereWithAggregatesInput;
149
+ take?: number;
150
+ skip?: number;
151
+ _count?: SubscriptionCountAggregateInputType | true;
152
+ _min?: SubscriptionMinAggregateInputType;
153
+ _max?: SubscriptionMaxAggregateInputType;
154
+ };
155
+ export type SubscriptionGroupByOutputType = {
156
+ id: string;
157
+ userId: string;
158
+ planId: string;
159
+ stripeSubscriptionId: string;
160
+ stripeCustomerId: string | null;
161
+ status: string;
162
+ currentPeriodStart: Date;
163
+ currentPeriodEnd: Date;
164
+ cancelAt: Date | null;
165
+ canceledAt: Date | null;
166
+ createdAt: Date;
167
+ _count: SubscriptionCountAggregateOutputType | null;
168
+ _min: SubscriptionMinAggregateOutputType | null;
169
+ _max: SubscriptionMaxAggregateOutputType | null;
170
+ };
171
+ export type GetSubscriptionGroupByPayload<T extends SubscriptionGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<SubscriptionGroupByOutputType, T['by']> & {
172
+ [P in ((keyof T) & (keyof SubscriptionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], SubscriptionGroupByOutputType[P]> : Prisma.GetScalarType<T[P], SubscriptionGroupByOutputType[P]>;
173
+ }>>;
174
+ export type SubscriptionWhereInput = {
175
+ AND?: Prisma.SubscriptionWhereInput | Prisma.SubscriptionWhereInput[];
176
+ OR?: Prisma.SubscriptionWhereInput[];
177
+ NOT?: Prisma.SubscriptionWhereInput | Prisma.SubscriptionWhereInput[];
178
+ id?: Prisma.StringFilter<"Subscription"> | string;
179
+ userId?: Prisma.StringFilter<"Subscription"> | string;
180
+ planId?: Prisma.StringFilter<"Subscription"> | string;
181
+ stripeSubscriptionId?: Prisma.StringFilter<"Subscription"> | string;
182
+ stripeCustomerId?: Prisma.StringNullableFilter<"Subscription"> | string | null;
183
+ status?: Prisma.StringFilter<"Subscription"> | string;
184
+ currentPeriodStart?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
185
+ currentPeriodEnd?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
186
+ cancelAt?: Prisma.DateTimeNullableFilter<"Subscription"> | Date | string | null;
187
+ canceledAt?: Prisma.DateTimeNullableFilter<"Subscription"> | Date | string | null;
188
+ createdAt?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
189
+ user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>;
190
+ plan?: Prisma.XOR<Prisma.PlanScalarRelationFilter, Prisma.PlanWhereInput>;
191
+ invoices?: Prisma.InvoiceListRelationFilter;
192
+ };
193
+ export type SubscriptionOrderByWithRelationInput = {
194
+ id?: Prisma.SortOrder;
195
+ userId?: Prisma.SortOrder;
196
+ planId?: Prisma.SortOrder;
197
+ stripeSubscriptionId?: Prisma.SortOrder;
198
+ stripeCustomerId?: Prisma.SortOrderInput | Prisma.SortOrder;
199
+ status?: Prisma.SortOrder;
200
+ currentPeriodStart?: Prisma.SortOrder;
201
+ currentPeriodEnd?: Prisma.SortOrder;
202
+ cancelAt?: Prisma.SortOrderInput | Prisma.SortOrder;
203
+ canceledAt?: Prisma.SortOrderInput | Prisma.SortOrder;
204
+ createdAt?: Prisma.SortOrder;
205
+ user?: Prisma.UserOrderByWithRelationInput;
206
+ plan?: Prisma.PlanOrderByWithRelationInput;
207
+ invoices?: Prisma.InvoiceOrderByRelationAggregateInput;
208
+ };
209
+ export type SubscriptionWhereUniqueInput = Prisma.AtLeast<{
210
+ id?: string;
211
+ stripeSubscriptionId?: string;
212
+ AND?: Prisma.SubscriptionWhereInput | Prisma.SubscriptionWhereInput[];
213
+ OR?: Prisma.SubscriptionWhereInput[];
214
+ NOT?: Prisma.SubscriptionWhereInput | Prisma.SubscriptionWhereInput[];
215
+ userId?: Prisma.StringFilter<"Subscription"> | string;
216
+ planId?: Prisma.StringFilter<"Subscription"> | string;
217
+ stripeCustomerId?: Prisma.StringNullableFilter<"Subscription"> | string | null;
218
+ status?: Prisma.StringFilter<"Subscription"> | string;
219
+ currentPeriodStart?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
220
+ currentPeriodEnd?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
221
+ cancelAt?: Prisma.DateTimeNullableFilter<"Subscription"> | Date | string | null;
222
+ canceledAt?: Prisma.DateTimeNullableFilter<"Subscription"> | Date | string | null;
223
+ createdAt?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
224
+ user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>;
225
+ plan?: Prisma.XOR<Prisma.PlanScalarRelationFilter, Prisma.PlanWhereInput>;
226
+ invoices?: Prisma.InvoiceListRelationFilter;
227
+ }, "id" | "stripeSubscriptionId">;
228
+ export type SubscriptionOrderByWithAggregationInput = {
229
+ id?: Prisma.SortOrder;
230
+ userId?: Prisma.SortOrder;
231
+ planId?: Prisma.SortOrder;
232
+ stripeSubscriptionId?: Prisma.SortOrder;
233
+ stripeCustomerId?: Prisma.SortOrderInput | Prisma.SortOrder;
234
+ status?: Prisma.SortOrder;
235
+ currentPeriodStart?: Prisma.SortOrder;
236
+ currentPeriodEnd?: Prisma.SortOrder;
237
+ cancelAt?: Prisma.SortOrderInput | Prisma.SortOrder;
238
+ canceledAt?: Prisma.SortOrderInput | Prisma.SortOrder;
239
+ createdAt?: Prisma.SortOrder;
240
+ _count?: Prisma.SubscriptionCountOrderByAggregateInput;
241
+ _max?: Prisma.SubscriptionMaxOrderByAggregateInput;
242
+ _min?: Prisma.SubscriptionMinOrderByAggregateInput;
243
+ };
244
+ export type SubscriptionScalarWhereWithAggregatesInput = {
245
+ AND?: Prisma.SubscriptionScalarWhereWithAggregatesInput | Prisma.SubscriptionScalarWhereWithAggregatesInput[];
246
+ OR?: Prisma.SubscriptionScalarWhereWithAggregatesInput[];
247
+ NOT?: Prisma.SubscriptionScalarWhereWithAggregatesInput | Prisma.SubscriptionScalarWhereWithAggregatesInput[];
248
+ id?: Prisma.StringWithAggregatesFilter<"Subscription"> | string;
249
+ userId?: Prisma.StringWithAggregatesFilter<"Subscription"> | string;
250
+ planId?: Prisma.StringWithAggregatesFilter<"Subscription"> | string;
251
+ stripeSubscriptionId?: Prisma.StringWithAggregatesFilter<"Subscription"> | string;
252
+ stripeCustomerId?: Prisma.StringNullableWithAggregatesFilter<"Subscription"> | string | null;
253
+ status?: Prisma.StringWithAggregatesFilter<"Subscription"> | string;
254
+ currentPeriodStart?: Prisma.DateTimeWithAggregatesFilter<"Subscription"> | Date | string;
255
+ currentPeriodEnd?: Prisma.DateTimeWithAggregatesFilter<"Subscription"> | Date | string;
256
+ cancelAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Subscription"> | Date | string | null;
257
+ canceledAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Subscription"> | Date | string | null;
258
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"Subscription"> | Date | string;
259
+ };
260
+ export type SubscriptionCreateInput = {
261
+ id?: string;
262
+ stripeSubscriptionId: string;
263
+ stripeCustomerId?: string | null;
264
+ status: string;
265
+ currentPeriodStart: Date | string;
266
+ currentPeriodEnd: Date | string;
267
+ cancelAt?: Date | string | null;
268
+ canceledAt?: Date | string | null;
269
+ createdAt?: Date | string;
270
+ user: Prisma.UserCreateNestedOneWithoutSubscriptionsInput;
271
+ plan: Prisma.PlanCreateNestedOneWithoutSubscriptionsInput;
272
+ invoices?: Prisma.InvoiceCreateNestedManyWithoutSubscriptionInput;
273
+ };
274
+ export type SubscriptionUncheckedCreateInput = {
275
+ id?: string;
276
+ userId: string;
277
+ planId: string;
278
+ stripeSubscriptionId: string;
279
+ stripeCustomerId?: string | null;
280
+ status: string;
281
+ currentPeriodStart: Date | string;
282
+ currentPeriodEnd: Date | string;
283
+ cancelAt?: Date | string | null;
284
+ canceledAt?: Date | string | null;
285
+ createdAt?: Date | string;
286
+ invoices?: Prisma.InvoiceUncheckedCreateNestedManyWithoutSubscriptionInput;
287
+ };
288
+ export type SubscriptionUpdateInput = {
289
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
290
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
291
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
292
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
293
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
294
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
295
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
296
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
297
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
298
+ user?: Prisma.UserUpdateOneRequiredWithoutSubscriptionsNestedInput;
299
+ plan?: Prisma.PlanUpdateOneRequiredWithoutSubscriptionsNestedInput;
300
+ invoices?: Prisma.InvoiceUpdateManyWithoutSubscriptionNestedInput;
301
+ };
302
+ export type SubscriptionUncheckedUpdateInput = {
303
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
304
+ userId?: Prisma.StringFieldUpdateOperationsInput | string;
305
+ planId?: Prisma.StringFieldUpdateOperationsInput | string;
306
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
307
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
308
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
309
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
310
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
311
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
312
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
313
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
314
+ invoices?: Prisma.InvoiceUncheckedUpdateManyWithoutSubscriptionNestedInput;
315
+ };
316
+ export type SubscriptionCreateManyInput = {
317
+ id?: string;
318
+ userId: string;
319
+ planId: string;
320
+ stripeSubscriptionId: string;
321
+ stripeCustomerId?: string | null;
322
+ status: string;
323
+ currentPeriodStart: Date | string;
324
+ currentPeriodEnd: Date | string;
325
+ cancelAt?: Date | string | null;
326
+ canceledAt?: Date | string | null;
327
+ createdAt?: Date | string;
328
+ };
329
+ export type SubscriptionUpdateManyMutationInput = {
330
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
331
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
332
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
333
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
334
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
335
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
336
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
337
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
338
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
339
+ };
340
+ export type SubscriptionUncheckedUpdateManyInput = {
341
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
342
+ userId?: Prisma.StringFieldUpdateOperationsInput | string;
343
+ planId?: Prisma.StringFieldUpdateOperationsInput | string;
344
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
345
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
346
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
347
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
348
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
349
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
350
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
351
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
352
+ };
353
+ export type SubscriptionListRelationFilter = {
354
+ every?: Prisma.SubscriptionWhereInput;
355
+ some?: Prisma.SubscriptionWhereInput;
356
+ none?: Prisma.SubscriptionWhereInput;
357
+ };
358
+ export type SubscriptionOrderByRelationAggregateInput = {
359
+ _count?: Prisma.SortOrder;
360
+ };
361
+ export type SubscriptionNullableScalarRelationFilter = {
362
+ is?: Prisma.SubscriptionWhereInput | null;
363
+ isNot?: Prisma.SubscriptionWhereInput | null;
364
+ };
365
+ export type SubscriptionCountOrderByAggregateInput = {
366
+ id?: Prisma.SortOrder;
367
+ userId?: Prisma.SortOrder;
368
+ planId?: Prisma.SortOrder;
369
+ stripeSubscriptionId?: Prisma.SortOrder;
370
+ stripeCustomerId?: Prisma.SortOrder;
371
+ status?: Prisma.SortOrder;
372
+ currentPeriodStart?: Prisma.SortOrder;
373
+ currentPeriodEnd?: Prisma.SortOrder;
374
+ cancelAt?: Prisma.SortOrder;
375
+ canceledAt?: Prisma.SortOrder;
376
+ createdAt?: Prisma.SortOrder;
377
+ };
378
+ export type SubscriptionMaxOrderByAggregateInput = {
379
+ id?: Prisma.SortOrder;
380
+ userId?: Prisma.SortOrder;
381
+ planId?: Prisma.SortOrder;
382
+ stripeSubscriptionId?: Prisma.SortOrder;
383
+ stripeCustomerId?: Prisma.SortOrder;
384
+ status?: Prisma.SortOrder;
385
+ currentPeriodStart?: Prisma.SortOrder;
386
+ currentPeriodEnd?: Prisma.SortOrder;
387
+ cancelAt?: Prisma.SortOrder;
388
+ canceledAt?: Prisma.SortOrder;
389
+ createdAt?: Prisma.SortOrder;
390
+ };
391
+ export type SubscriptionMinOrderByAggregateInput = {
392
+ id?: Prisma.SortOrder;
393
+ userId?: Prisma.SortOrder;
394
+ planId?: Prisma.SortOrder;
395
+ stripeSubscriptionId?: Prisma.SortOrder;
396
+ stripeCustomerId?: Prisma.SortOrder;
397
+ status?: Prisma.SortOrder;
398
+ currentPeriodStart?: Prisma.SortOrder;
399
+ currentPeriodEnd?: Prisma.SortOrder;
400
+ cancelAt?: Prisma.SortOrder;
401
+ canceledAt?: Prisma.SortOrder;
402
+ createdAt?: Prisma.SortOrder;
403
+ };
404
+ export type SubscriptionCreateNestedManyWithoutUserInput = {
405
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutUserInput, Prisma.SubscriptionUncheckedCreateWithoutUserInput> | Prisma.SubscriptionCreateWithoutUserInput[] | Prisma.SubscriptionUncheckedCreateWithoutUserInput[];
406
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutUserInput | Prisma.SubscriptionCreateOrConnectWithoutUserInput[];
407
+ createMany?: Prisma.SubscriptionCreateManyUserInputEnvelope;
408
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
409
+ };
410
+ export type SubscriptionUncheckedCreateNestedManyWithoutUserInput = {
411
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutUserInput, Prisma.SubscriptionUncheckedCreateWithoutUserInput> | Prisma.SubscriptionCreateWithoutUserInput[] | Prisma.SubscriptionUncheckedCreateWithoutUserInput[];
412
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutUserInput | Prisma.SubscriptionCreateOrConnectWithoutUserInput[];
413
+ createMany?: Prisma.SubscriptionCreateManyUserInputEnvelope;
414
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
415
+ };
416
+ export type SubscriptionUpdateManyWithoutUserNestedInput = {
417
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutUserInput, Prisma.SubscriptionUncheckedCreateWithoutUserInput> | Prisma.SubscriptionCreateWithoutUserInput[] | Prisma.SubscriptionUncheckedCreateWithoutUserInput[];
418
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutUserInput | Prisma.SubscriptionCreateOrConnectWithoutUserInput[];
419
+ upsert?: Prisma.SubscriptionUpsertWithWhereUniqueWithoutUserInput | Prisma.SubscriptionUpsertWithWhereUniqueWithoutUserInput[];
420
+ createMany?: Prisma.SubscriptionCreateManyUserInputEnvelope;
421
+ set?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
422
+ disconnect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
423
+ delete?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
424
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
425
+ update?: Prisma.SubscriptionUpdateWithWhereUniqueWithoutUserInput | Prisma.SubscriptionUpdateWithWhereUniqueWithoutUserInput[];
426
+ updateMany?: Prisma.SubscriptionUpdateManyWithWhereWithoutUserInput | Prisma.SubscriptionUpdateManyWithWhereWithoutUserInput[];
427
+ deleteMany?: Prisma.SubscriptionScalarWhereInput | Prisma.SubscriptionScalarWhereInput[];
428
+ };
429
+ export type SubscriptionUncheckedUpdateManyWithoutUserNestedInput = {
430
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutUserInput, Prisma.SubscriptionUncheckedCreateWithoutUserInput> | Prisma.SubscriptionCreateWithoutUserInput[] | Prisma.SubscriptionUncheckedCreateWithoutUserInput[];
431
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutUserInput | Prisma.SubscriptionCreateOrConnectWithoutUserInput[];
432
+ upsert?: Prisma.SubscriptionUpsertWithWhereUniqueWithoutUserInput | Prisma.SubscriptionUpsertWithWhereUniqueWithoutUserInput[];
433
+ createMany?: Prisma.SubscriptionCreateManyUserInputEnvelope;
434
+ set?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
435
+ disconnect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
436
+ delete?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
437
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
438
+ update?: Prisma.SubscriptionUpdateWithWhereUniqueWithoutUserInput | Prisma.SubscriptionUpdateWithWhereUniqueWithoutUserInput[];
439
+ updateMany?: Prisma.SubscriptionUpdateManyWithWhereWithoutUserInput | Prisma.SubscriptionUpdateManyWithWhereWithoutUserInput[];
440
+ deleteMany?: Prisma.SubscriptionScalarWhereInput | Prisma.SubscriptionScalarWhereInput[];
441
+ };
442
+ export type SubscriptionCreateNestedOneWithoutInvoicesInput = {
443
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutInvoicesInput, Prisma.SubscriptionUncheckedCreateWithoutInvoicesInput>;
444
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutInvoicesInput;
445
+ connect?: Prisma.SubscriptionWhereUniqueInput;
446
+ };
447
+ export type SubscriptionUpdateOneWithoutInvoicesNestedInput = {
448
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutInvoicesInput, Prisma.SubscriptionUncheckedCreateWithoutInvoicesInput>;
449
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutInvoicesInput;
450
+ upsert?: Prisma.SubscriptionUpsertWithoutInvoicesInput;
451
+ disconnect?: Prisma.SubscriptionWhereInput | boolean;
452
+ delete?: Prisma.SubscriptionWhereInput | boolean;
453
+ connect?: Prisma.SubscriptionWhereUniqueInput;
454
+ update?: Prisma.XOR<Prisma.XOR<Prisma.SubscriptionUpdateToOneWithWhereWithoutInvoicesInput, Prisma.SubscriptionUpdateWithoutInvoicesInput>, Prisma.SubscriptionUncheckedUpdateWithoutInvoicesInput>;
455
+ };
456
+ export type SubscriptionCreateNestedManyWithoutPlanInput = {
457
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutPlanInput, Prisma.SubscriptionUncheckedCreateWithoutPlanInput> | Prisma.SubscriptionCreateWithoutPlanInput[] | Prisma.SubscriptionUncheckedCreateWithoutPlanInput[];
458
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutPlanInput | Prisma.SubscriptionCreateOrConnectWithoutPlanInput[];
459
+ createMany?: Prisma.SubscriptionCreateManyPlanInputEnvelope;
460
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
461
+ };
462
+ export type SubscriptionUncheckedCreateNestedManyWithoutPlanInput = {
463
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutPlanInput, Prisma.SubscriptionUncheckedCreateWithoutPlanInput> | Prisma.SubscriptionCreateWithoutPlanInput[] | Prisma.SubscriptionUncheckedCreateWithoutPlanInput[];
464
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutPlanInput | Prisma.SubscriptionCreateOrConnectWithoutPlanInput[];
465
+ createMany?: Prisma.SubscriptionCreateManyPlanInputEnvelope;
466
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
467
+ };
468
+ export type SubscriptionUpdateManyWithoutPlanNestedInput = {
469
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutPlanInput, Prisma.SubscriptionUncheckedCreateWithoutPlanInput> | Prisma.SubscriptionCreateWithoutPlanInput[] | Prisma.SubscriptionUncheckedCreateWithoutPlanInput[];
470
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutPlanInput | Prisma.SubscriptionCreateOrConnectWithoutPlanInput[];
471
+ upsert?: Prisma.SubscriptionUpsertWithWhereUniqueWithoutPlanInput | Prisma.SubscriptionUpsertWithWhereUniqueWithoutPlanInput[];
472
+ createMany?: Prisma.SubscriptionCreateManyPlanInputEnvelope;
473
+ set?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
474
+ disconnect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
475
+ delete?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
476
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
477
+ update?: Prisma.SubscriptionUpdateWithWhereUniqueWithoutPlanInput | Prisma.SubscriptionUpdateWithWhereUniqueWithoutPlanInput[];
478
+ updateMany?: Prisma.SubscriptionUpdateManyWithWhereWithoutPlanInput | Prisma.SubscriptionUpdateManyWithWhereWithoutPlanInput[];
479
+ deleteMany?: Prisma.SubscriptionScalarWhereInput | Prisma.SubscriptionScalarWhereInput[];
480
+ };
481
+ export type SubscriptionUncheckedUpdateManyWithoutPlanNestedInput = {
482
+ create?: Prisma.XOR<Prisma.SubscriptionCreateWithoutPlanInput, Prisma.SubscriptionUncheckedCreateWithoutPlanInput> | Prisma.SubscriptionCreateWithoutPlanInput[] | Prisma.SubscriptionUncheckedCreateWithoutPlanInput[];
483
+ connectOrCreate?: Prisma.SubscriptionCreateOrConnectWithoutPlanInput | Prisma.SubscriptionCreateOrConnectWithoutPlanInput[];
484
+ upsert?: Prisma.SubscriptionUpsertWithWhereUniqueWithoutPlanInput | Prisma.SubscriptionUpsertWithWhereUniqueWithoutPlanInput[];
485
+ createMany?: Prisma.SubscriptionCreateManyPlanInputEnvelope;
486
+ set?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
487
+ disconnect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
488
+ delete?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
489
+ connect?: Prisma.SubscriptionWhereUniqueInput | Prisma.SubscriptionWhereUniqueInput[];
490
+ update?: Prisma.SubscriptionUpdateWithWhereUniqueWithoutPlanInput | Prisma.SubscriptionUpdateWithWhereUniqueWithoutPlanInput[];
491
+ updateMany?: Prisma.SubscriptionUpdateManyWithWhereWithoutPlanInput | Prisma.SubscriptionUpdateManyWithWhereWithoutPlanInput[];
492
+ deleteMany?: Prisma.SubscriptionScalarWhereInput | Prisma.SubscriptionScalarWhereInput[];
493
+ };
494
+ export type SubscriptionCreateWithoutUserInput = {
495
+ id?: string;
496
+ stripeSubscriptionId: string;
497
+ stripeCustomerId?: string | null;
498
+ status: string;
499
+ currentPeriodStart: Date | string;
500
+ currentPeriodEnd: Date | string;
501
+ cancelAt?: Date | string | null;
502
+ canceledAt?: Date | string | null;
503
+ createdAt?: Date | string;
504
+ plan: Prisma.PlanCreateNestedOneWithoutSubscriptionsInput;
505
+ invoices?: Prisma.InvoiceCreateNestedManyWithoutSubscriptionInput;
506
+ };
507
+ export type SubscriptionUncheckedCreateWithoutUserInput = {
508
+ id?: string;
509
+ planId: string;
510
+ stripeSubscriptionId: string;
511
+ stripeCustomerId?: string | null;
512
+ status: string;
513
+ currentPeriodStart: Date | string;
514
+ currentPeriodEnd: Date | string;
515
+ cancelAt?: Date | string | null;
516
+ canceledAt?: Date | string | null;
517
+ createdAt?: Date | string;
518
+ invoices?: Prisma.InvoiceUncheckedCreateNestedManyWithoutSubscriptionInput;
519
+ };
520
+ export type SubscriptionCreateOrConnectWithoutUserInput = {
521
+ where: Prisma.SubscriptionWhereUniqueInput;
522
+ create: Prisma.XOR<Prisma.SubscriptionCreateWithoutUserInput, Prisma.SubscriptionUncheckedCreateWithoutUserInput>;
523
+ };
524
+ export type SubscriptionCreateManyUserInputEnvelope = {
525
+ data: Prisma.SubscriptionCreateManyUserInput | Prisma.SubscriptionCreateManyUserInput[];
526
+ skipDuplicates?: boolean;
527
+ };
528
+ export type SubscriptionUpsertWithWhereUniqueWithoutUserInput = {
529
+ where: Prisma.SubscriptionWhereUniqueInput;
530
+ update: Prisma.XOR<Prisma.SubscriptionUpdateWithoutUserInput, Prisma.SubscriptionUncheckedUpdateWithoutUserInput>;
531
+ create: Prisma.XOR<Prisma.SubscriptionCreateWithoutUserInput, Prisma.SubscriptionUncheckedCreateWithoutUserInput>;
532
+ };
533
+ export type SubscriptionUpdateWithWhereUniqueWithoutUserInput = {
534
+ where: Prisma.SubscriptionWhereUniqueInput;
535
+ data: Prisma.XOR<Prisma.SubscriptionUpdateWithoutUserInput, Prisma.SubscriptionUncheckedUpdateWithoutUserInput>;
536
+ };
537
+ export type SubscriptionUpdateManyWithWhereWithoutUserInput = {
538
+ where: Prisma.SubscriptionScalarWhereInput;
539
+ data: Prisma.XOR<Prisma.SubscriptionUpdateManyMutationInput, Prisma.SubscriptionUncheckedUpdateManyWithoutUserInput>;
540
+ };
541
+ export type SubscriptionScalarWhereInput = {
542
+ AND?: Prisma.SubscriptionScalarWhereInput | Prisma.SubscriptionScalarWhereInput[];
543
+ OR?: Prisma.SubscriptionScalarWhereInput[];
544
+ NOT?: Prisma.SubscriptionScalarWhereInput | Prisma.SubscriptionScalarWhereInput[];
545
+ id?: Prisma.StringFilter<"Subscription"> | string;
546
+ userId?: Prisma.StringFilter<"Subscription"> | string;
547
+ planId?: Prisma.StringFilter<"Subscription"> | string;
548
+ stripeSubscriptionId?: Prisma.StringFilter<"Subscription"> | string;
549
+ stripeCustomerId?: Prisma.StringNullableFilter<"Subscription"> | string | null;
550
+ status?: Prisma.StringFilter<"Subscription"> | string;
551
+ currentPeriodStart?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
552
+ currentPeriodEnd?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
553
+ cancelAt?: Prisma.DateTimeNullableFilter<"Subscription"> | Date | string | null;
554
+ canceledAt?: Prisma.DateTimeNullableFilter<"Subscription"> | Date | string | null;
555
+ createdAt?: Prisma.DateTimeFilter<"Subscription"> | Date | string;
556
+ };
557
+ export type SubscriptionCreateWithoutInvoicesInput = {
558
+ id?: string;
559
+ stripeSubscriptionId: string;
560
+ stripeCustomerId?: string | null;
561
+ status: string;
562
+ currentPeriodStart: Date | string;
563
+ currentPeriodEnd: Date | string;
564
+ cancelAt?: Date | string | null;
565
+ canceledAt?: Date | string | null;
566
+ createdAt?: Date | string;
567
+ user: Prisma.UserCreateNestedOneWithoutSubscriptionsInput;
568
+ plan: Prisma.PlanCreateNestedOneWithoutSubscriptionsInput;
569
+ };
570
+ export type SubscriptionUncheckedCreateWithoutInvoicesInput = {
571
+ id?: string;
572
+ userId: string;
573
+ planId: string;
574
+ stripeSubscriptionId: string;
575
+ stripeCustomerId?: string | null;
576
+ status: string;
577
+ currentPeriodStart: Date | string;
578
+ currentPeriodEnd: Date | string;
579
+ cancelAt?: Date | string | null;
580
+ canceledAt?: Date | string | null;
581
+ createdAt?: Date | string;
582
+ };
583
+ export type SubscriptionCreateOrConnectWithoutInvoicesInput = {
584
+ where: Prisma.SubscriptionWhereUniqueInput;
585
+ create: Prisma.XOR<Prisma.SubscriptionCreateWithoutInvoicesInput, Prisma.SubscriptionUncheckedCreateWithoutInvoicesInput>;
586
+ };
587
+ export type SubscriptionUpsertWithoutInvoicesInput = {
588
+ update: Prisma.XOR<Prisma.SubscriptionUpdateWithoutInvoicesInput, Prisma.SubscriptionUncheckedUpdateWithoutInvoicesInput>;
589
+ create: Prisma.XOR<Prisma.SubscriptionCreateWithoutInvoicesInput, Prisma.SubscriptionUncheckedCreateWithoutInvoicesInput>;
590
+ where?: Prisma.SubscriptionWhereInput;
591
+ };
592
+ export type SubscriptionUpdateToOneWithWhereWithoutInvoicesInput = {
593
+ where?: Prisma.SubscriptionWhereInput;
594
+ data: Prisma.XOR<Prisma.SubscriptionUpdateWithoutInvoicesInput, Prisma.SubscriptionUncheckedUpdateWithoutInvoicesInput>;
595
+ };
596
+ export type SubscriptionUpdateWithoutInvoicesInput = {
597
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
598
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
599
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
600
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
601
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
602
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
603
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
604
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
605
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
606
+ user?: Prisma.UserUpdateOneRequiredWithoutSubscriptionsNestedInput;
607
+ plan?: Prisma.PlanUpdateOneRequiredWithoutSubscriptionsNestedInput;
608
+ };
609
+ export type SubscriptionUncheckedUpdateWithoutInvoicesInput = {
610
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
611
+ userId?: Prisma.StringFieldUpdateOperationsInput | string;
612
+ planId?: Prisma.StringFieldUpdateOperationsInput | string;
613
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
614
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
615
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
616
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
617
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
618
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
619
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
620
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
621
+ };
622
+ export type SubscriptionCreateWithoutPlanInput = {
623
+ id?: string;
624
+ stripeSubscriptionId: string;
625
+ stripeCustomerId?: string | null;
626
+ status: string;
627
+ currentPeriodStart: Date | string;
628
+ currentPeriodEnd: Date | string;
629
+ cancelAt?: Date | string | null;
630
+ canceledAt?: Date | string | null;
631
+ createdAt?: Date | string;
632
+ user: Prisma.UserCreateNestedOneWithoutSubscriptionsInput;
633
+ invoices?: Prisma.InvoiceCreateNestedManyWithoutSubscriptionInput;
634
+ };
635
+ export type SubscriptionUncheckedCreateWithoutPlanInput = {
636
+ id?: string;
637
+ userId: string;
638
+ stripeSubscriptionId: string;
639
+ stripeCustomerId?: string | null;
640
+ status: string;
641
+ currentPeriodStart: Date | string;
642
+ currentPeriodEnd: Date | string;
643
+ cancelAt?: Date | string | null;
644
+ canceledAt?: Date | string | null;
645
+ createdAt?: Date | string;
646
+ invoices?: Prisma.InvoiceUncheckedCreateNestedManyWithoutSubscriptionInput;
647
+ };
648
+ export type SubscriptionCreateOrConnectWithoutPlanInput = {
649
+ where: Prisma.SubscriptionWhereUniqueInput;
650
+ create: Prisma.XOR<Prisma.SubscriptionCreateWithoutPlanInput, Prisma.SubscriptionUncheckedCreateWithoutPlanInput>;
651
+ };
652
+ export type SubscriptionCreateManyPlanInputEnvelope = {
653
+ data: Prisma.SubscriptionCreateManyPlanInput | Prisma.SubscriptionCreateManyPlanInput[];
654
+ skipDuplicates?: boolean;
655
+ };
656
+ export type SubscriptionUpsertWithWhereUniqueWithoutPlanInput = {
657
+ where: Prisma.SubscriptionWhereUniqueInput;
658
+ update: Prisma.XOR<Prisma.SubscriptionUpdateWithoutPlanInput, Prisma.SubscriptionUncheckedUpdateWithoutPlanInput>;
659
+ create: Prisma.XOR<Prisma.SubscriptionCreateWithoutPlanInput, Prisma.SubscriptionUncheckedCreateWithoutPlanInput>;
660
+ };
661
+ export type SubscriptionUpdateWithWhereUniqueWithoutPlanInput = {
662
+ where: Prisma.SubscriptionWhereUniqueInput;
663
+ data: Prisma.XOR<Prisma.SubscriptionUpdateWithoutPlanInput, Prisma.SubscriptionUncheckedUpdateWithoutPlanInput>;
664
+ };
665
+ export type SubscriptionUpdateManyWithWhereWithoutPlanInput = {
666
+ where: Prisma.SubscriptionScalarWhereInput;
667
+ data: Prisma.XOR<Prisma.SubscriptionUpdateManyMutationInput, Prisma.SubscriptionUncheckedUpdateManyWithoutPlanInput>;
668
+ };
669
+ export type SubscriptionCreateManyUserInput = {
670
+ id?: string;
671
+ planId: string;
672
+ stripeSubscriptionId: string;
673
+ stripeCustomerId?: string | null;
674
+ status: string;
675
+ currentPeriodStart: Date | string;
676
+ currentPeriodEnd: Date | string;
677
+ cancelAt?: Date | string | null;
678
+ canceledAt?: Date | string | null;
679
+ createdAt?: Date | string;
680
+ };
681
+ export type SubscriptionUpdateWithoutUserInput = {
682
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
683
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
684
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
685
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
686
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
687
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
688
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
689
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
690
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
691
+ plan?: Prisma.PlanUpdateOneRequiredWithoutSubscriptionsNestedInput;
692
+ invoices?: Prisma.InvoiceUpdateManyWithoutSubscriptionNestedInput;
693
+ };
694
+ export type SubscriptionUncheckedUpdateWithoutUserInput = {
695
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
696
+ planId?: Prisma.StringFieldUpdateOperationsInput | string;
697
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
698
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
699
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
700
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
701
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
702
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
703
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
704
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
705
+ invoices?: Prisma.InvoiceUncheckedUpdateManyWithoutSubscriptionNestedInput;
706
+ };
707
+ export type SubscriptionUncheckedUpdateManyWithoutUserInput = {
708
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
709
+ planId?: Prisma.StringFieldUpdateOperationsInput | string;
710
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
711
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
712
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
713
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
714
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
715
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
716
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
717
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
718
+ };
719
+ export type SubscriptionCreateManyPlanInput = {
720
+ id?: string;
721
+ userId: string;
722
+ stripeSubscriptionId: string;
723
+ stripeCustomerId?: string | null;
724
+ status: string;
725
+ currentPeriodStart: Date | string;
726
+ currentPeriodEnd: Date | string;
727
+ cancelAt?: Date | string | null;
728
+ canceledAt?: Date | string | null;
729
+ createdAt?: Date | string;
730
+ };
731
+ export type SubscriptionUpdateWithoutPlanInput = {
732
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
733
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
734
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
735
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
736
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
737
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
738
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
739
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
740
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
741
+ user?: Prisma.UserUpdateOneRequiredWithoutSubscriptionsNestedInput;
742
+ invoices?: Prisma.InvoiceUpdateManyWithoutSubscriptionNestedInput;
743
+ };
744
+ export type SubscriptionUncheckedUpdateWithoutPlanInput = {
745
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
746
+ userId?: Prisma.StringFieldUpdateOperationsInput | string;
747
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
748
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
749
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
750
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
751
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
752
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
753
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
754
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
755
+ invoices?: Prisma.InvoiceUncheckedUpdateManyWithoutSubscriptionNestedInput;
756
+ };
757
+ export type SubscriptionUncheckedUpdateManyWithoutPlanInput = {
758
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
759
+ userId?: Prisma.StringFieldUpdateOperationsInput | string;
760
+ stripeSubscriptionId?: Prisma.StringFieldUpdateOperationsInput | string;
761
+ stripeCustomerId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null;
762
+ status?: Prisma.StringFieldUpdateOperationsInput | string;
763
+ currentPeriodStart?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
764
+ currentPeriodEnd?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
765
+ cancelAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
766
+ canceledAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null;
767
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
768
+ };
769
+ /**
770
+ * Count Type SubscriptionCountOutputType
771
+ */
772
+ export type SubscriptionCountOutputType = {
773
+ invoices: number;
774
+ };
775
+ export type SubscriptionCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
776
+ invoices?: boolean | SubscriptionCountOutputTypeCountInvoicesArgs;
777
+ };
778
+ /**
779
+ * SubscriptionCountOutputType without action
780
+ */
781
+ export type SubscriptionCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
782
+ /**
783
+ * Select specific fields to fetch from the SubscriptionCountOutputType
784
+ */
785
+ select?: Prisma.SubscriptionCountOutputTypeSelect<ExtArgs> | null;
786
+ };
787
+ /**
788
+ * SubscriptionCountOutputType without action
789
+ */
790
+ export type SubscriptionCountOutputTypeCountInvoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
791
+ where?: Prisma.InvoiceWhereInput;
792
+ };
793
+ export type SubscriptionSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
794
+ id?: boolean;
795
+ userId?: boolean;
796
+ planId?: boolean;
797
+ stripeSubscriptionId?: boolean;
798
+ stripeCustomerId?: boolean;
799
+ status?: boolean;
800
+ currentPeriodStart?: boolean;
801
+ currentPeriodEnd?: boolean;
802
+ cancelAt?: boolean;
803
+ canceledAt?: boolean;
804
+ createdAt?: boolean;
805
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
806
+ plan?: boolean | Prisma.PlanDefaultArgs<ExtArgs>;
807
+ invoices?: boolean | Prisma.Subscription$invoicesArgs<ExtArgs>;
808
+ _count?: boolean | Prisma.SubscriptionCountOutputTypeDefaultArgs<ExtArgs>;
809
+ }, ExtArgs["result"]["subscription"]>;
810
+ export type SubscriptionSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
811
+ id?: boolean;
812
+ userId?: boolean;
813
+ planId?: boolean;
814
+ stripeSubscriptionId?: boolean;
815
+ stripeCustomerId?: boolean;
816
+ status?: boolean;
817
+ currentPeriodStart?: boolean;
818
+ currentPeriodEnd?: boolean;
819
+ cancelAt?: boolean;
820
+ canceledAt?: boolean;
821
+ createdAt?: boolean;
822
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
823
+ plan?: boolean | Prisma.PlanDefaultArgs<ExtArgs>;
824
+ }, ExtArgs["result"]["subscription"]>;
825
+ export type SubscriptionSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
826
+ id?: boolean;
827
+ userId?: boolean;
828
+ planId?: boolean;
829
+ stripeSubscriptionId?: boolean;
830
+ stripeCustomerId?: boolean;
831
+ status?: boolean;
832
+ currentPeriodStart?: boolean;
833
+ currentPeriodEnd?: boolean;
834
+ cancelAt?: boolean;
835
+ canceledAt?: boolean;
836
+ createdAt?: boolean;
837
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
838
+ plan?: boolean | Prisma.PlanDefaultArgs<ExtArgs>;
839
+ }, ExtArgs["result"]["subscription"]>;
840
+ export type SubscriptionSelectScalar = {
841
+ id?: boolean;
842
+ userId?: boolean;
843
+ planId?: boolean;
844
+ stripeSubscriptionId?: boolean;
845
+ stripeCustomerId?: boolean;
846
+ status?: boolean;
847
+ currentPeriodStart?: boolean;
848
+ currentPeriodEnd?: boolean;
849
+ cancelAt?: boolean;
850
+ canceledAt?: boolean;
851
+ createdAt?: boolean;
852
+ };
853
+ export type SubscriptionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "planId" | "stripeSubscriptionId" | "stripeCustomerId" | "status" | "currentPeriodStart" | "currentPeriodEnd" | "cancelAt" | "canceledAt" | "createdAt", ExtArgs["result"]["subscription"]>;
854
+ export type SubscriptionInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
855
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
856
+ plan?: boolean | Prisma.PlanDefaultArgs<ExtArgs>;
857
+ invoices?: boolean | Prisma.Subscription$invoicesArgs<ExtArgs>;
858
+ _count?: boolean | Prisma.SubscriptionCountOutputTypeDefaultArgs<ExtArgs>;
859
+ };
860
+ export type SubscriptionIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
861
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
862
+ plan?: boolean | Prisma.PlanDefaultArgs<ExtArgs>;
863
+ };
864
+ export type SubscriptionIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
865
+ user?: boolean | Prisma.UserDefaultArgs<ExtArgs>;
866
+ plan?: boolean | Prisma.PlanDefaultArgs<ExtArgs>;
867
+ };
868
+ export type $SubscriptionPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
869
+ name: "Subscription";
870
+ objects: {
871
+ user: Prisma.$UserPayload<ExtArgs>;
872
+ plan: Prisma.$PlanPayload<ExtArgs>;
873
+ invoices: Prisma.$InvoicePayload<ExtArgs>[];
874
+ };
875
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
876
+ id: string;
877
+ userId: string;
878
+ planId: string;
879
+ stripeSubscriptionId: string;
880
+ stripeCustomerId: string | null;
881
+ status: string;
882
+ currentPeriodStart: Date;
883
+ currentPeriodEnd: Date;
884
+ cancelAt: Date | null;
885
+ canceledAt: Date | null;
886
+ createdAt: Date;
887
+ }, ExtArgs["result"]["subscription"]>;
888
+ composites: {};
889
+ };
890
+ export type SubscriptionGetPayload<S extends boolean | null | undefined | SubscriptionDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload, S>;
891
+ export type SubscriptionCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<SubscriptionFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
892
+ select?: SubscriptionCountAggregateInputType | true;
893
+ };
894
+ export interface SubscriptionDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
895
+ [K: symbol]: {
896
+ types: Prisma.TypeMap<ExtArgs>['model']['Subscription'];
897
+ meta: {
898
+ name: 'Subscription';
899
+ };
900
+ };
901
+ /**
902
+ * Find zero or one Subscription that matches the filter.
903
+ * @param {SubscriptionFindUniqueArgs} args - Arguments to find a Subscription
904
+ * @example
905
+ * // Get one Subscription
906
+ * const subscription = await prisma.subscription.findUnique({
907
+ * where: {
908
+ * // ... provide filter here
909
+ * }
910
+ * })
911
+ */
912
+ findUnique<T extends SubscriptionFindUniqueArgs>(args: Prisma.SelectSubset<T, SubscriptionFindUniqueArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
913
+ /**
914
+ * Find one Subscription that matches the filter or throw an error with `error.code='P2025'`
915
+ * if no matches were found.
916
+ * @param {SubscriptionFindUniqueOrThrowArgs} args - Arguments to find a Subscription
917
+ * @example
918
+ * // Get one Subscription
919
+ * const subscription = await prisma.subscription.findUniqueOrThrow({
920
+ * where: {
921
+ * // ... provide filter here
922
+ * }
923
+ * })
924
+ */
925
+ findUniqueOrThrow<T extends SubscriptionFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, SubscriptionFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
926
+ /**
927
+ * Find the first Subscription that matches the filter.
928
+ * Note, that providing `undefined` is treated as the value not being there.
929
+ * Read more here: https://pris.ly/d/null-undefined
930
+ * @param {SubscriptionFindFirstArgs} args - Arguments to find a Subscription
931
+ * @example
932
+ * // Get one Subscription
933
+ * const subscription = await prisma.subscription.findFirst({
934
+ * where: {
935
+ * // ... provide filter here
936
+ * }
937
+ * })
938
+ */
939
+ findFirst<T extends SubscriptionFindFirstArgs>(args?: Prisma.SelectSubset<T, SubscriptionFindFirstArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
940
+ /**
941
+ * Find the first Subscription that matches the filter or
942
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
943
+ * Note, that providing `undefined` is treated as the value not being there.
944
+ * Read more here: https://pris.ly/d/null-undefined
945
+ * @param {SubscriptionFindFirstOrThrowArgs} args - Arguments to find a Subscription
946
+ * @example
947
+ * // Get one Subscription
948
+ * const subscription = await prisma.subscription.findFirstOrThrow({
949
+ * where: {
950
+ * // ... provide filter here
951
+ * }
952
+ * })
953
+ */
954
+ findFirstOrThrow<T extends SubscriptionFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, SubscriptionFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
955
+ /**
956
+ * Find zero or more Subscriptions that matches the filter.
957
+ * Note, that providing `undefined` is treated as the value not being there.
958
+ * Read more here: https://pris.ly/d/null-undefined
959
+ * @param {SubscriptionFindManyArgs} args - Arguments to filter and select certain fields only.
960
+ * @example
961
+ * // Get all Subscriptions
962
+ * const subscriptions = await prisma.subscription.findMany()
963
+ *
964
+ * // Get first 10 Subscriptions
965
+ * const subscriptions = await prisma.subscription.findMany({ take: 10 })
966
+ *
967
+ * // Only select the `id`
968
+ * const subscriptionWithIdOnly = await prisma.subscription.findMany({ select: { id: true } })
969
+ *
970
+ */
971
+ findMany<T extends SubscriptionFindManyArgs>(args?: Prisma.SelectSubset<T, SubscriptionFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
972
+ /**
973
+ * Create a Subscription.
974
+ * @param {SubscriptionCreateArgs} args - Arguments to create a Subscription.
975
+ * @example
976
+ * // Create one Subscription
977
+ * const Subscription = await prisma.subscription.create({
978
+ * data: {
979
+ * // ... data to create a Subscription
980
+ * }
981
+ * })
982
+ *
983
+ */
984
+ create<T extends SubscriptionCreateArgs>(args: Prisma.SelectSubset<T, SubscriptionCreateArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
985
+ /**
986
+ * Create many Subscriptions.
987
+ * @param {SubscriptionCreateManyArgs} args - Arguments to create many Subscriptions.
988
+ * @example
989
+ * // Create many Subscriptions
990
+ * const subscription = await prisma.subscription.createMany({
991
+ * data: [
992
+ * // ... provide data here
993
+ * ]
994
+ * })
995
+ *
996
+ */
997
+ createMany<T extends SubscriptionCreateManyArgs>(args?: Prisma.SelectSubset<T, SubscriptionCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
998
+ /**
999
+ * Create many Subscriptions and returns the data saved in the database.
1000
+ * @param {SubscriptionCreateManyAndReturnArgs} args - Arguments to create many Subscriptions.
1001
+ * @example
1002
+ * // Create many Subscriptions
1003
+ * const subscription = await prisma.subscription.createManyAndReturn({
1004
+ * data: [
1005
+ * // ... provide data here
1006
+ * ]
1007
+ * })
1008
+ *
1009
+ * // Create many Subscriptions and only return the `id`
1010
+ * const subscriptionWithIdOnly = await prisma.subscription.createManyAndReturn({
1011
+ * select: { id: true },
1012
+ * data: [
1013
+ * // ... provide data here
1014
+ * ]
1015
+ * })
1016
+ * Note, that providing `undefined` is treated as the value not being there.
1017
+ * Read more here: https://pris.ly/d/null-undefined
1018
+ *
1019
+ */
1020
+ createManyAndReturn<T extends SubscriptionCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, SubscriptionCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
1021
+ /**
1022
+ * Delete a Subscription.
1023
+ * @param {SubscriptionDeleteArgs} args - Arguments to delete one Subscription.
1024
+ * @example
1025
+ * // Delete one Subscription
1026
+ * const Subscription = await prisma.subscription.delete({
1027
+ * where: {
1028
+ * // ... filter to delete one Subscription
1029
+ * }
1030
+ * })
1031
+ *
1032
+ */
1033
+ delete<T extends SubscriptionDeleteArgs>(args: Prisma.SelectSubset<T, SubscriptionDeleteArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1034
+ /**
1035
+ * Update one Subscription.
1036
+ * @param {SubscriptionUpdateArgs} args - Arguments to update one Subscription.
1037
+ * @example
1038
+ * // Update one Subscription
1039
+ * const subscription = await prisma.subscription.update({
1040
+ * where: {
1041
+ * // ... provide filter here
1042
+ * },
1043
+ * data: {
1044
+ * // ... provide data here
1045
+ * }
1046
+ * })
1047
+ *
1048
+ */
1049
+ update<T extends SubscriptionUpdateArgs>(args: Prisma.SelectSubset<T, SubscriptionUpdateArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1050
+ /**
1051
+ * Delete zero or more Subscriptions.
1052
+ * @param {SubscriptionDeleteManyArgs} args - Arguments to filter Subscriptions to delete.
1053
+ * @example
1054
+ * // Delete a few Subscriptions
1055
+ * const { count } = await prisma.subscription.deleteMany({
1056
+ * where: {
1057
+ * // ... provide filter here
1058
+ * }
1059
+ * })
1060
+ *
1061
+ */
1062
+ deleteMany<T extends SubscriptionDeleteManyArgs>(args?: Prisma.SelectSubset<T, SubscriptionDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1063
+ /**
1064
+ * Update zero or more Subscriptions.
1065
+ * Note, that providing `undefined` is treated as the value not being there.
1066
+ * Read more here: https://pris.ly/d/null-undefined
1067
+ * @param {SubscriptionUpdateManyArgs} args - Arguments to update one or more rows.
1068
+ * @example
1069
+ * // Update many Subscriptions
1070
+ * const subscription = await prisma.subscription.updateMany({
1071
+ * where: {
1072
+ * // ... provide filter here
1073
+ * },
1074
+ * data: {
1075
+ * // ... provide data here
1076
+ * }
1077
+ * })
1078
+ *
1079
+ */
1080
+ updateMany<T extends SubscriptionUpdateManyArgs>(args: Prisma.SelectSubset<T, SubscriptionUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
1081
+ /**
1082
+ * Update zero or more Subscriptions and returns the data updated in the database.
1083
+ * @param {SubscriptionUpdateManyAndReturnArgs} args - Arguments to update many Subscriptions.
1084
+ * @example
1085
+ * // Update many Subscriptions
1086
+ * const subscription = await prisma.subscription.updateManyAndReturn({
1087
+ * where: {
1088
+ * // ... provide filter here
1089
+ * },
1090
+ * data: [
1091
+ * // ... provide data here
1092
+ * ]
1093
+ * })
1094
+ *
1095
+ * // Update zero or more Subscriptions and only return the `id`
1096
+ * const subscriptionWithIdOnly = await prisma.subscription.updateManyAndReturn({
1097
+ * select: { id: true },
1098
+ * where: {
1099
+ * // ... provide filter here
1100
+ * },
1101
+ * data: [
1102
+ * // ... provide data here
1103
+ * ]
1104
+ * })
1105
+ * Note, that providing `undefined` is treated as the value not being there.
1106
+ * Read more here: https://pris.ly/d/null-undefined
1107
+ *
1108
+ */
1109
+ updateManyAndReturn<T extends SubscriptionUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, SubscriptionUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
1110
+ /**
1111
+ * Create or update one Subscription.
1112
+ * @param {SubscriptionUpsertArgs} args - Arguments to update or create a Subscription.
1113
+ * @example
1114
+ * // Update or create a Subscription
1115
+ * const subscription = await prisma.subscription.upsert({
1116
+ * create: {
1117
+ * // ... data to create a Subscription
1118
+ * },
1119
+ * update: {
1120
+ * // ... in case it already exists, update
1121
+ * },
1122
+ * where: {
1123
+ * // ... the filter for the Subscription we want to update
1124
+ * }
1125
+ * })
1126
+ */
1127
+ upsert<T extends SubscriptionUpsertArgs>(args: Prisma.SelectSubset<T, SubscriptionUpsertArgs<ExtArgs>>): Prisma.Prisma__SubscriptionClient<runtime.Types.Result.GetResult<Prisma.$SubscriptionPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
1128
+ /**
1129
+ * Count the number of Subscriptions.
1130
+ * Note, that providing `undefined` is treated as the value not being there.
1131
+ * Read more here: https://pris.ly/d/null-undefined
1132
+ * @param {SubscriptionCountArgs} args - Arguments to filter Subscriptions to count.
1133
+ * @example
1134
+ * // Count the number of Subscriptions
1135
+ * const count = await prisma.subscription.count({
1136
+ * where: {
1137
+ * // ... the filter for the Subscriptions we want to count
1138
+ * }
1139
+ * })
1140
+ **/
1141
+ count<T extends SubscriptionCountArgs>(args?: Prisma.Subset<T, SubscriptionCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], SubscriptionCountAggregateOutputType> : number>;
1142
+ /**
1143
+ * Allows you to perform aggregations operations on a Subscription.
1144
+ * Note, that providing `undefined` is treated as the value not being there.
1145
+ * Read more here: https://pris.ly/d/null-undefined
1146
+ * @param {SubscriptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
1147
+ * @example
1148
+ * // Ordered by age ascending
1149
+ * // Where email contains prisma.io
1150
+ * // Limited to the 10 users
1151
+ * const aggregations = await prisma.user.aggregate({
1152
+ * _avg: {
1153
+ * age: true,
1154
+ * },
1155
+ * where: {
1156
+ * email: {
1157
+ * contains: "prisma.io",
1158
+ * },
1159
+ * },
1160
+ * orderBy: {
1161
+ * age: "asc",
1162
+ * },
1163
+ * take: 10,
1164
+ * })
1165
+ **/
1166
+ aggregate<T extends SubscriptionAggregateArgs>(args: Prisma.Subset<T, SubscriptionAggregateArgs>): Prisma.PrismaPromise<GetSubscriptionAggregateType<T>>;
1167
+ /**
1168
+ * Group by Subscription.
1169
+ * Note, that providing `undefined` is treated as the value not being there.
1170
+ * Read more here: https://pris.ly/d/null-undefined
1171
+ * @param {SubscriptionGroupByArgs} args - Group by arguments.
1172
+ * @example
1173
+ * // Group by city, order by createdAt, get count
1174
+ * const result = await prisma.user.groupBy({
1175
+ * by: ['city', 'createdAt'],
1176
+ * orderBy: {
1177
+ * createdAt: true
1178
+ * },
1179
+ * _count: {
1180
+ * _all: true
1181
+ * },
1182
+ * })
1183
+ *
1184
+ **/
1185
+ groupBy<T extends SubscriptionGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
1186
+ orderBy: SubscriptionGroupByArgs['orderBy'];
1187
+ } : {
1188
+ orderBy?: SubscriptionGroupByArgs['orderBy'];
1189
+ }, 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 ? {
1190
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
1191
+ Error,
1192
+ 'Field ',
1193
+ P,
1194
+ ` in "having" needs to be provided in "by"`
1195
+ ];
1196
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
1197
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1198
+ }[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 ? {} : {
1199
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1200
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
1201
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
1202
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, SubscriptionGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetSubscriptionGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
1203
+ /**
1204
+ * Fields of the Subscription model
1205
+ */
1206
+ readonly fields: SubscriptionFieldRefs;
1207
+ }
1208
+ /**
1209
+ * The delegate class that acts as a "Promise-like" for Subscription.
1210
+ * Why is this prefixed with `Prisma__`?
1211
+ * Because we want to prevent naming conflicts as mentioned in
1212
+ * https://github.com/prisma/prisma-client-js/issues/707
1213
+ */
1214
+ export interface Prisma__SubscriptionClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
1215
+ readonly [Symbol.toStringTag]: "PrismaPromise";
1216
+ user<T extends Prisma.UserDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.UserDefaultArgs<ExtArgs>>): Prisma.Prisma__UserClient<runtime.Types.Result.GetResult<Prisma.$UserPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
1217
+ plan<T extends Prisma.PlanDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PlanDefaultArgs<ExtArgs>>): Prisma.Prisma__PlanClient<runtime.Types.Result.GetResult<Prisma.$PlanPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
1218
+ invoices<T extends Prisma.Subscription$invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Subscription$invoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>;
1219
+ /**
1220
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1221
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1222
+ * @param onrejected The callback to execute when the Promise is rejected.
1223
+ * @returns A Promise for the completion of which ever callback is executed.
1224
+ */
1225
+ 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>;
1226
+ /**
1227
+ * Attaches a callback for only the rejection of the Promise.
1228
+ * @param onrejected The callback to execute when the Promise is rejected.
1229
+ * @returns A Promise for the completion of the callback.
1230
+ */
1231
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
1232
+ /**
1233
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
1234
+ * resolved value cannot be modified from the callback.
1235
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
1236
+ * @returns A Promise for the completion of the callback.
1237
+ */
1238
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
1239
+ }
1240
+ /**
1241
+ * Fields of the Subscription model
1242
+ */
1243
+ export interface SubscriptionFieldRefs {
1244
+ readonly id: Prisma.FieldRef<"Subscription", 'String'>;
1245
+ readonly userId: Prisma.FieldRef<"Subscription", 'String'>;
1246
+ readonly planId: Prisma.FieldRef<"Subscription", 'String'>;
1247
+ readonly stripeSubscriptionId: Prisma.FieldRef<"Subscription", 'String'>;
1248
+ readonly stripeCustomerId: Prisma.FieldRef<"Subscription", 'String'>;
1249
+ readonly status: Prisma.FieldRef<"Subscription", 'String'>;
1250
+ readonly currentPeriodStart: Prisma.FieldRef<"Subscription", 'DateTime'>;
1251
+ readonly currentPeriodEnd: Prisma.FieldRef<"Subscription", 'DateTime'>;
1252
+ readonly cancelAt: Prisma.FieldRef<"Subscription", 'DateTime'>;
1253
+ readonly canceledAt: Prisma.FieldRef<"Subscription", 'DateTime'>;
1254
+ readonly createdAt: Prisma.FieldRef<"Subscription", 'DateTime'>;
1255
+ }
1256
+ /**
1257
+ * Subscription findUnique
1258
+ */
1259
+ export type SubscriptionFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1260
+ /**
1261
+ * Select specific fields to fetch from the Subscription
1262
+ */
1263
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1264
+ /**
1265
+ * Omit specific fields from the Subscription
1266
+ */
1267
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1268
+ /**
1269
+ * Choose, which related nodes to fetch as well
1270
+ */
1271
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1272
+ /**
1273
+ * Filter, which Subscription to fetch.
1274
+ */
1275
+ where: Prisma.SubscriptionWhereUniqueInput;
1276
+ };
1277
+ /**
1278
+ * Subscription findUniqueOrThrow
1279
+ */
1280
+ export type SubscriptionFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1281
+ /**
1282
+ * Select specific fields to fetch from the Subscription
1283
+ */
1284
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1285
+ /**
1286
+ * Omit specific fields from the Subscription
1287
+ */
1288
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1289
+ /**
1290
+ * Choose, which related nodes to fetch as well
1291
+ */
1292
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1293
+ /**
1294
+ * Filter, which Subscription to fetch.
1295
+ */
1296
+ where: Prisma.SubscriptionWhereUniqueInput;
1297
+ };
1298
+ /**
1299
+ * Subscription findFirst
1300
+ */
1301
+ export type SubscriptionFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1302
+ /**
1303
+ * Select specific fields to fetch from the Subscription
1304
+ */
1305
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1306
+ /**
1307
+ * Omit specific fields from the Subscription
1308
+ */
1309
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1310
+ /**
1311
+ * Choose, which related nodes to fetch as well
1312
+ */
1313
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1314
+ /**
1315
+ * Filter, which Subscription to fetch.
1316
+ */
1317
+ where?: Prisma.SubscriptionWhereInput;
1318
+ /**
1319
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1320
+ *
1321
+ * Determine the order of Subscriptions to fetch.
1322
+ */
1323
+ orderBy?: Prisma.SubscriptionOrderByWithRelationInput | Prisma.SubscriptionOrderByWithRelationInput[];
1324
+ /**
1325
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1326
+ *
1327
+ * Sets the position for searching for Subscriptions.
1328
+ */
1329
+ cursor?: Prisma.SubscriptionWhereUniqueInput;
1330
+ /**
1331
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1332
+ *
1333
+ * Take `±n` Subscriptions from the position of the cursor.
1334
+ */
1335
+ take?: number;
1336
+ /**
1337
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1338
+ *
1339
+ * Skip the first `n` Subscriptions.
1340
+ */
1341
+ skip?: number;
1342
+ /**
1343
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1344
+ *
1345
+ * Filter by unique combinations of Subscriptions.
1346
+ */
1347
+ distinct?: Prisma.SubscriptionScalarFieldEnum | Prisma.SubscriptionScalarFieldEnum[];
1348
+ };
1349
+ /**
1350
+ * Subscription findFirstOrThrow
1351
+ */
1352
+ export type SubscriptionFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1353
+ /**
1354
+ * Select specific fields to fetch from the Subscription
1355
+ */
1356
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1357
+ /**
1358
+ * Omit specific fields from the Subscription
1359
+ */
1360
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1361
+ /**
1362
+ * Choose, which related nodes to fetch as well
1363
+ */
1364
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1365
+ /**
1366
+ * Filter, which Subscription to fetch.
1367
+ */
1368
+ where?: Prisma.SubscriptionWhereInput;
1369
+ /**
1370
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1371
+ *
1372
+ * Determine the order of Subscriptions to fetch.
1373
+ */
1374
+ orderBy?: Prisma.SubscriptionOrderByWithRelationInput | Prisma.SubscriptionOrderByWithRelationInput[];
1375
+ /**
1376
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1377
+ *
1378
+ * Sets the position for searching for Subscriptions.
1379
+ */
1380
+ cursor?: Prisma.SubscriptionWhereUniqueInput;
1381
+ /**
1382
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1383
+ *
1384
+ * Take `±n` Subscriptions from the position of the cursor.
1385
+ */
1386
+ take?: number;
1387
+ /**
1388
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1389
+ *
1390
+ * Skip the first `n` Subscriptions.
1391
+ */
1392
+ skip?: number;
1393
+ /**
1394
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1395
+ *
1396
+ * Filter by unique combinations of Subscriptions.
1397
+ */
1398
+ distinct?: Prisma.SubscriptionScalarFieldEnum | Prisma.SubscriptionScalarFieldEnum[];
1399
+ };
1400
+ /**
1401
+ * Subscription findMany
1402
+ */
1403
+ export type SubscriptionFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1404
+ /**
1405
+ * Select specific fields to fetch from the Subscription
1406
+ */
1407
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1408
+ /**
1409
+ * Omit specific fields from the Subscription
1410
+ */
1411
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1412
+ /**
1413
+ * Choose, which related nodes to fetch as well
1414
+ */
1415
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1416
+ /**
1417
+ * Filter, which Subscriptions to fetch.
1418
+ */
1419
+ where?: Prisma.SubscriptionWhereInput;
1420
+ /**
1421
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1422
+ *
1423
+ * Determine the order of Subscriptions to fetch.
1424
+ */
1425
+ orderBy?: Prisma.SubscriptionOrderByWithRelationInput | Prisma.SubscriptionOrderByWithRelationInput[];
1426
+ /**
1427
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1428
+ *
1429
+ * Sets the position for listing Subscriptions.
1430
+ */
1431
+ cursor?: Prisma.SubscriptionWhereUniqueInput;
1432
+ /**
1433
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1434
+ *
1435
+ * Take `±n` Subscriptions from the position of the cursor.
1436
+ */
1437
+ take?: number;
1438
+ /**
1439
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1440
+ *
1441
+ * Skip the first `n` Subscriptions.
1442
+ */
1443
+ skip?: number;
1444
+ /**
1445
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1446
+ *
1447
+ * Filter by unique combinations of Subscriptions.
1448
+ */
1449
+ distinct?: Prisma.SubscriptionScalarFieldEnum | Prisma.SubscriptionScalarFieldEnum[];
1450
+ };
1451
+ /**
1452
+ * Subscription create
1453
+ */
1454
+ export type SubscriptionCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1455
+ /**
1456
+ * Select specific fields to fetch from the Subscription
1457
+ */
1458
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1459
+ /**
1460
+ * Omit specific fields from the Subscription
1461
+ */
1462
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1463
+ /**
1464
+ * Choose, which related nodes to fetch as well
1465
+ */
1466
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1467
+ /**
1468
+ * The data needed to create a Subscription.
1469
+ */
1470
+ data: Prisma.XOR<Prisma.SubscriptionCreateInput, Prisma.SubscriptionUncheckedCreateInput>;
1471
+ };
1472
+ /**
1473
+ * Subscription createMany
1474
+ */
1475
+ export type SubscriptionCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1476
+ /**
1477
+ * The data used to create many Subscriptions.
1478
+ */
1479
+ data: Prisma.SubscriptionCreateManyInput | Prisma.SubscriptionCreateManyInput[];
1480
+ skipDuplicates?: boolean;
1481
+ };
1482
+ /**
1483
+ * Subscription createManyAndReturn
1484
+ */
1485
+ export type SubscriptionCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1486
+ /**
1487
+ * Select specific fields to fetch from the Subscription
1488
+ */
1489
+ select?: Prisma.SubscriptionSelectCreateManyAndReturn<ExtArgs> | null;
1490
+ /**
1491
+ * Omit specific fields from the Subscription
1492
+ */
1493
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1494
+ /**
1495
+ * The data used to create many Subscriptions.
1496
+ */
1497
+ data: Prisma.SubscriptionCreateManyInput | Prisma.SubscriptionCreateManyInput[];
1498
+ skipDuplicates?: boolean;
1499
+ /**
1500
+ * Choose, which related nodes to fetch as well
1501
+ */
1502
+ include?: Prisma.SubscriptionIncludeCreateManyAndReturn<ExtArgs> | null;
1503
+ };
1504
+ /**
1505
+ * Subscription update
1506
+ */
1507
+ export type SubscriptionUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1508
+ /**
1509
+ * Select specific fields to fetch from the Subscription
1510
+ */
1511
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1512
+ /**
1513
+ * Omit specific fields from the Subscription
1514
+ */
1515
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1516
+ /**
1517
+ * Choose, which related nodes to fetch as well
1518
+ */
1519
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1520
+ /**
1521
+ * The data needed to update a Subscription.
1522
+ */
1523
+ data: Prisma.XOR<Prisma.SubscriptionUpdateInput, Prisma.SubscriptionUncheckedUpdateInput>;
1524
+ /**
1525
+ * Choose, which Subscription to update.
1526
+ */
1527
+ where: Prisma.SubscriptionWhereUniqueInput;
1528
+ };
1529
+ /**
1530
+ * Subscription updateMany
1531
+ */
1532
+ export type SubscriptionUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1533
+ /**
1534
+ * The data used to update Subscriptions.
1535
+ */
1536
+ data: Prisma.XOR<Prisma.SubscriptionUpdateManyMutationInput, Prisma.SubscriptionUncheckedUpdateManyInput>;
1537
+ /**
1538
+ * Filter which Subscriptions to update
1539
+ */
1540
+ where?: Prisma.SubscriptionWhereInput;
1541
+ /**
1542
+ * Limit how many Subscriptions to update.
1543
+ */
1544
+ limit?: number;
1545
+ };
1546
+ /**
1547
+ * Subscription updateManyAndReturn
1548
+ */
1549
+ export type SubscriptionUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1550
+ /**
1551
+ * Select specific fields to fetch from the Subscription
1552
+ */
1553
+ select?: Prisma.SubscriptionSelectUpdateManyAndReturn<ExtArgs> | null;
1554
+ /**
1555
+ * Omit specific fields from the Subscription
1556
+ */
1557
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1558
+ /**
1559
+ * The data used to update Subscriptions.
1560
+ */
1561
+ data: Prisma.XOR<Prisma.SubscriptionUpdateManyMutationInput, Prisma.SubscriptionUncheckedUpdateManyInput>;
1562
+ /**
1563
+ * Filter which Subscriptions to update
1564
+ */
1565
+ where?: Prisma.SubscriptionWhereInput;
1566
+ /**
1567
+ * Limit how many Subscriptions to update.
1568
+ */
1569
+ limit?: number;
1570
+ /**
1571
+ * Choose, which related nodes to fetch as well
1572
+ */
1573
+ include?: Prisma.SubscriptionIncludeUpdateManyAndReturn<ExtArgs> | null;
1574
+ };
1575
+ /**
1576
+ * Subscription upsert
1577
+ */
1578
+ export type SubscriptionUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1579
+ /**
1580
+ * Select specific fields to fetch from the Subscription
1581
+ */
1582
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1583
+ /**
1584
+ * Omit specific fields from the Subscription
1585
+ */
1586
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1587
+ /**
1588
+ * Choose, which related nodes to fetch as well
1589
+ */
1590
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1591
+ /**
1592
+ * The filter to search for the Subscription to update in case it exists.
1593
+ */
1594
+ where: Prisma.SubscriptionWhereUniqueInput;
1595
+ /**
1596
+ * In case the Subscription found by the `where` argument doesn't exist, create a new Subscription with this data.
1597
+ */
1598
+ create: Prisma.XOR<Prisma.SubscriptionCreateInput, Prisma.SubscriptionUncheckedCreateInput>;
1599
+ /**
1600
+ * In case the Subscription was found with the provided `where` argument, update it with this data.
1601
+ */
1602
+ update: Prisma.XOR<Prisma.SubscriptionUpdateInput, Prisma.SubscriptionUncheckedUpdateInput>;
1603
+ };
1604
+ /**
1605
+ * Subscription delete
1606
+ */
1607
+ export type SubscriptionDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1608
+ /**
1609
+ * Select specific fields to fetch from the Subscription
1610
+ */
1611
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1612
+ /**
1613
+ * Omit specific fields from the Subscription
1614
+ */
1615
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1616
+ /**
1617
+ * Choose, which related nodes to fetch as well
1618
+ */
1619
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1620
+ /**
1621
+ * Filter which Subscription to delete.
1622
+ */
1623
+ where: Prisma.SubscriptionWhereUniqueInput;
1624
+ };
1625
+ /**
1626
+ * Subscription deleteMany
1627
+ */
1628
+ export type SubscriptionDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1629
+ /**
1630
+ * Filter which Subscriptions to delete
1631
+ */
1632
+ where?: Prisma.SubscriptionWhereInput;
1633
+ /**
1634
+ * Limit how many Subscriptions to delete.
1635
+ */
1636
+ limit?: number;
1637
+ };
1638
+ /**
1639
+ * Subscription.invoices
1640
+ */
1641
+ export type Subscription$invoicesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1642
+ /**
1643
+ * Select specific fields to fetch from the Invoice
1644
+ */
1645
+ select?: Prisma.InvoiceSelect<ExtArgs> | null;
1646
+ /**
1647
+ * Omit specific fields from the Invoice
1648
+ */
1649
+ omit?: Prisma.InvoiceOmit<ExtArgs> | null;
1650
+ /**
1651
+ * Choose, which related nodes to fetch as well
1652
+ */
1653
+ include?: Prisma.InvoiceInclude<ExtArgs> | null;
1654
+ where?: Prisma.InvoiceWhereInput;
1655
+ orderBy?: Prisma.InvoiceOrderByWithRelationInput | Prisma.InvoiceOrderByWithRelationInput[];
1656
+ cursor?: Prisma.InvoiceWhereUniqueInput;
1657
+ take?: number;
1658
+ skip?: number;
1659
+ distinct?: Prisma.InvoiceScalarFieldEnum | Prisma.InvoiceScalarFieldEnum[];
1660
+ };
1661
+ /**
1662
+ * Subscription without action
1663
+ */
1664
+ export type SubscriptionDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1665
+ /**
1666
+ * Select specific fields to fetch from the Subscription
1667
+ */
1668
+ select?: Prisma.SubscriptionSelect<ExtArgs> | null;
1669
+ /**
1670
+ * Omit specific fields from the Subscription
1671
+ */
1672
+ omit?: Prisma.SubscriptionOmit<ExtArgs> | null;
1673
+ /**
1674
+ * Choose, which related nodes to fetch as well
1675
+ */
1676
+ include?: Prisma.SubscriptionInclude<ExtArgs> | null;
1677
+ };