@mars-stack/cli 0.2.0 → 1.0.2

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 (175) hide show
  1. package/dist/index.js +137 -12
  2. package/dist/index.js.map +1 -1
  3. package/package.json +4 -3
  4. package/template/.cursor/rules/composition-patterns.mdc +186 -0
  5. package/template/.cursor/rules/data-access.mdc +29 -0
  6. package/template/.cursor/rules/project-structure.mdc +34 -0
  7. package/template/.cursor/rules/security.mdc +25 -0
  8. package/template/.cursor/rules/testing.mdc +24 -0
  9. package/template/.cursor/rules/ui-conventions.mdc +29 -0
  10. package/template/.cursor/skills/add-api-route/SKILL.md +122 -0
  11. package/template/.cursor/skills/add-audit-log/SKILL.md +375 -0
  12. package/template/.cursor/skills/add-blog/SKILL.md +447 -0
  13. package/template/.cursor/skills/add-command-palette/SKILL.md +438 -0
  14. package/template/.cursor/skills/add-component/SKILL.md +158 -0
  15. package/template/.cursor/skills/add-crud-routes/SKILL.md +221 -0
  16. package/template/.cursor/skills/add-e2e-test/SKILL.md +227 -0
  17. package/template/.cursor/skills/add-error-boundary/SKILL.md +472 -0
  18. package/template/.cursor/skills/add-feature/SKILL.md +174 -0
  19. package/template/.cursor/skills/add-middleware/SKILL.md +135 -0
  20. package/template/.cursor/skills/add-page/SKILL.md +151 -0
  21. package/template/.cursor/skills/add-prisma-model/SKILL.md +148 -0
  22. package/template/.cursor/skills/add-protected-resource/SKILL.md +192 -0
  23. package/template/.cursor/skills/add-role/SKILL.md +156 -0
  24. package/template/.cursor/skills/add-server-action/SKILL.md +167 -0
  25. package/template/.cursor/skills/add-webhook/SKILL.md +192 -0
  26. package/template/.cursor/skills/build-complete-feature/SKILL.md +227 -0
  27. package/template/.cursor/skills/build-dashboard/SKILL.md +211 -0
  28. package/template/.cursor/skills/build-data-table/SKILL.md +283 -0
  29. package/template/.cursor/skills/build-form/SKILL.md +231 -0
  30. package/template/.cursor/skills/build-landing-page/SKILL.md +248 -0
  31. package/template/.cursor/skills/configure-ai/SKILL.md +617 -0
  32. package/template/.cursor/skills/configure-analytics/SKILL.md +413 -0
  33. package/template/.cursor/skills/configure-dark-mode/SKILL.md +309 -0
  34. package/template/.cursor/skills/configure-email/SKILL.md +170 -0
  35. package/template/.cursor/skills/configure-email-verification/SKILL.md +333 -0
  36. package/template/.cursor/skills/configure-feature-flags/SKILL.md +361 -0
  37. package/template/.cursor/skills/configure-i18n/SKILL.md +518 -0
  38. package/template/.cursor/skills/configure-jobs/SKILL.md +500 -0
  39. package/template/.cursor/skills/configure-magic-links/SKILL.md +385 -0
  40. package/template/.cursor/skills/configure-multi-tenancy/SKILL.md +611 -0
  41. package/template/.cursor/skills/configure-notifications/SKILL.md +569 -0
  42. package/template/.cursor/skills/configure-oauth/SKILL.md +217 -0
  43. package/template/.cursor/skills/configure-onboarding/SKILL.md +483 -0
  44. package/template/.cursor/skills/configure-payments/SKILL.md +243 -0
  45. package/template/.cursor/skills/configure-realtime/SKILL.md +733 -0
  46. package/template/.cursor/skills/configure-search/SKILL.md +581 -0
  47. package/template/.cursor/skills/configure-storage/SKILL.md +273 -0
  48. package/template/.cursor/skills/configure-two-factor/SKILL.md +518 -0
  49. package/template/.cursor/skills/create-execution-plan/SKILL.md +204 -0
  50. package/template/.cursor/skills/create-seed/SKILL.md +191 -0
  51. package/template/.cursor/skills/deploy-to-vercel/SKILL.md +300 -0
  52. package/template/.cursor/skills/design-tokens/SKILL.md +138 -0
  53. package/template/.cursor/skills/mars-capture-conversation-context/SKILL.md +119 -0
  54. package/template/.cursor/skills/setup-billing/SKILL.md +322 -0
  55. package/template/.cursor/skills/setup-project/SKILL.md +104 -0
  56. package/template/.cursor/skills/setup-teams/SKILL.md +682 -0
  57. package/template/.cursor/skills/test-api-route/SKILL.md +219 -0
  58. package/template/.cursor/skills/update-architecture-docs/SKILL.md +99 -0
  59. package/template/AGENTS.md +104 -0
  60. package/template/ARCHITECTURE.md +102 -0
  61. package/template/docs/QUALITY_SCORE.md +20 -0
  62. package/template/docs/design-docs/conversation-as-system-record.md +70 -0
  63. package/template/docs/design-docs/core-beliefs.md +43 -0
  64. package/template/docs/design-docs/index.md +8 -0
  65. package/template/docs/exec-plans/active/.gitkeep +0 -0
  66. package/template/docs/exec-plans/completed/.gitkeep +0 -0
  67. package/template/docs/exec-plans/tech-debt.md +7 -0
  68. package/template/docs/generated/.gitkeep +0 -0
  69. package/template/docs/product-specs/index.md +7 -0
  70. package/template/docs/references/index.md +18 -0
  71. package/template/e2e/api.spec.ts +20 -0
  72. package/template/e2e/auth.spec.ts +24 -0
  73. package/template/e2e/public.spec.ts +25 -0
  74. package/template/eslint.config.mjs +24 -0
  75. package/template/next-env.d.ts +6 -0
  76. package/template/next.config.ts +45 -0
  77. package/template/package.json +80 -0
  78. package/template/playwright.config.ts +31 -0
  79. package/template/postcss.config.mjs +8 -0
  80. package/template/prisma/generated/prisma/browser.ts +49 -0
  81. package/template/prisma/generated/prisma/client.ts +73 -0
  82. package/template/prisma/generated/prisma/commonInputTypes.ts +406 -0
  83. package/template/prisma/generated/prisma/enums.ts +15 -0
  84. package/template/prisma/generated/prisma/internal/class.ts +254 -0
  85. package/template/prisma/generated/prisma/internal/prismaNamespace.ts +1240 -0
  86. package/template/prisma/generated/prisma/internal/prismaNamespaceBrowser.ts +190 -0
  87. package/template/prisma/generated/prisma/models/Account.ts +1543 -0
  88. package/template/prisma/generated/prisma/models/File.ts +1529 -0
  89. package/template/prisma/generated/prisma/models/Session.ts +1415 -0
  90. package/template/prisma/generated/prisma/models/Subscription.ts +1455 -0
  91. package/template/prisma/generated/prisma/models/User.ts +2235 -0
  92. package/template/prisma/generated/prisma/models/VerificationToken.ts +1099 -0
  93. package/template/prisma/generated/prisma/models.ts +17 -0
  94. package/template/prisma/schema/auth.prisma +69 -0
  95. package/template/prisma/schema/base.prisma +8 -0
  96. package/template/prisma/schema/file.prisma +15 -0
  97. package/template/prisma/schema/subscription.prisma +17 -0
  98. package/template/prisma.config.ts +13 -0
  99. package/template/scripts/check-architecture.ts +221 -0
  100. package/template/scripts/check-doc-freshness.ts +242 -0
  101. package/template/scripts/ensure-db.mjs +291 -0
  102. package/template/scripts/generate-docs.ts +143 -0
  103. package/template/scripts/generate-env-example.ts +89 -0
  104. package/template/scripts/seed.ts +56 -0
  105. package/template/scripts/update-quality-score.ts +263 -0
  106. package/template/src/__tests__/architecture.test.ts +114 -0
  107. package/template/src/app/(auth)/forgotten-password/page.tsx +92 -0
  108. package/template/src/app/(auth)/layout.tsx +11 -0
  109. package/template/src/app/(auth)/register/page.tsx +162 -0
  110. package/template/src/app/(auth)/reset-password/page.tsx +109 -0
  111. package/template/src/app/(auth)/sign-in/page.tsx +122 -0
  112. package/template/src/app/(auth)/verify/[token]/page.tsx +87 -0
  113. package/template/src/app/(auth)/verify/page.tsx +56 -0
  114. package/template/src/app/(protected)/admin/page.tsx +108 -0
  115. package/template/src/app/(protected)/dashboard/loading.tsx +20 -0
  116. package/template/src/app/(protected)/dashboard/page.tsx +22 -0
  117. package/template/src/app/(protected)/layout.tsx +262 -0
  118. package/template/src/app/(protected)/settings/page.tsx +370 -0
  119. package/template/src/app/api/auth/forgot/route.ts +63 -0
  120. package/template/src/app/api/auth/login/route.ts +121 -0
  121. package/template/src/app/api/auth/logout/route.ts +19 -0
  122. package/template/src/app/api/auth/me/route.ts +30 -0
  123. package/template/src/app/api/auth/reset/route.ts +45 -0
  124. package/template/src/app/api/auth/signup/route.ts +85 -0
  125. package/template/src/app/api/auth/verify/route.ts +46 -0
  126. package/template/src/app/api/csrf/route.ts +12 -0
  127. package/template/src/app/api/health/route.ts +10 -0
  128. package/template/src/app/api/protected/admin/users/route.ts +24 -0
  129. package/template/src/app/api/protected/billing/checkout/route.ts +83 -0
  130. package/template/src/app/api/protected/billing/portal/route.ts +39 -0
  131. package/template/src/app/api/protected/files/[fileId]/route.ts +86 -0
  132. package/template/src/app/api/protected/files/upload/route.ts +64 -0
  133. package/template/src/app/api/protected/user/password/route.ts +63 -0
  134. package/template/src/app/api/protected/user/profile/route.ts +35 -0
  135. package/template/src/app/api/protected/user/sessions/[sessionId]/route.ts +33 -0
  136. package/template/src/app/api/protected/user/sessions/route.ts +22 -0
  137. package/template/src/app/api/readiness/route.ts +15 -0
  138. package/template/src/app/api/webhooks/stripe/route.ts +166 -0
  139. package/template/src/app/error.tsx +33 -0
  140. package/template/src/app/layout.tsx +29 -0
  141. package/template/src/app/not-found.tsx +20 -0
  142. package/template/src/app/page.tsx +136 -0
  143. package/template/src/app/privacy/page.tsx +178 -0
  144. package/template/src/app/providers.tsx +8 -0
  145. package/template/src/app/terms/page.tsx +139 -0
  146. package/template/src/config/app.config.ts +70 -0
  147. package/template/src/config/routes.ts +17 -0
  148. package/template/src/features/admin/index.ts +11 -0
  149. package/template/src/features/admin/permissions.ts +64 -0
  150. package/template/src/features/auth/context/AuthContext.tsx +96 -0
  151. package/template/src/features/auth/context/index.ts +2 -0
  152. package/template/src/features/auth/index.ts +3 -0
  153. package/template/src/features/auth/server/consent.ts +66 -0
  154. package/template/src/features/auth/server/session-revocation.ts +20 -0
  155. package/template/src/features/auth/server/sessions.ts +66 -0
  156. package/template/src/features/auth/server/user.ts +166 -0
  157. package/template/src/features/auth/types.ts +19 -0
  158. package/template/src/features/auth/validators.ts +29 -0
  159. package/template/src/features/billing/server/index.ts +66 -0
  160. package/template/src/features/billing/types.ts +43 -0
  161. package/template/src/features/uploads/server/index.ts +49 -0
  162. package/template/src/features/uploads/types.ts +26 -0
  163. package/template/src/lib/core/email/templates/base-layout.ts +122 -0
  164. package/template/src/lib/core/email/templates/index.ts +4 -0
  165. package/template/src/lib/core/email/templates/password-reset-email.ts +42 -0
  166. package/template/src/lib/core/email/templates/verification-email.ts +41 -0
  167. package/template/src/lib/core/email/templates/welcome-email.ts +40 -0
  168. package/template/src/lib/mars.ts +56 -0
  169. package/template/src/lib/prisma.ts +19 -0
  170. package/template/src/proxy.ts +92 -0
  171. package/template/src/styles/brand.css +15 -0
  172. package/template/src/styles/globals.css +7 -0
  173. package/template/tsconfig.json +59 -0
  174. package/template/vitest.config.ts +41 -0
  175. package/template/vitest.setup.ts +24 -0
@@ -0,0 +1,1240 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * WARNING: This is an internal file that is subject to change!
8
+ *
9
+ * 🛑 Under no circumstances should you import this file directly! 🛑
10
+ *
11
+ * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file.
12
+ * While this enables partial backward compatibility, it is not part of the stable public API.
13
+ *
14
+ * If you are looking for your Models, Enums, and Input Types, please import them from the respective
15
+ * model files in the `model` directory!
16
+ */
17
+
18
+ import * as runtime from "@prisma/client/runtime/client"
19
+ import type * as Prisma from "../models"
20
+ import { type PrismaClient } from "./class"
21
+
22
+ export type * from '../models'
23
+
24
+ export type DMMF = typeof runtime.DMMF
25
+
26
+ export type PrismaPromise<T> = runtime.Types.Public.PrismaPromise<T>
27
+
28
+ /**
29
+ * Prisma Errors
30
+ */
31
+
32
+ export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
33
+ export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
34
+
35
+ export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
36
+ export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
37
+
38
+ export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
39
+ export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
40
+
41
+ export const PrismaClientInitializationError = runtime.PrismaClientInitializationError
42
+ export type PrismaClientInitializationError = runtime.PrismaClientInitializationError
43
+
44
+ export const PrismaClientValidationError = runtime.PrismaClientValidationError
45
+ export type PrismaClientValidationError = runtime.PrismaClientValidationError
46
+
47
+ /**
48
+ * Re-export of sql-template-tag
49
+ */
50
+ export const sql = runtime.sqltag
51
+ export const empty = runtime.empty
52
+ export const join = runtime.join
53
+ export const raw = runtime.raw
54
+ export const Sql = runtime.Sql
55
+ export type Sql = runtime.Sql
56
+
57
+
58
+
59
+ /**
60
+ * Decimal.js
61
+ */
62
+ export const Decimal = runtime.Decimal
63
+ export type Decimal = runtime.Decimal
64
+
65
+ export type DecimalJsLike = runtime.DecimalJsLike
66
+
67
+ /**
68
+ * Extensions
69
+ */
70
+ export type Extension = runtime.Types.Extensions.UserArgs
71
+ export const getExtensionContext = runtime.Extensions.getExtensionContext
72
+ export type Args<T, F extends runtime.Operation> = runtime.Types.Public.Args<T, F>
73
+ export type Payload<T, F extends runtime.Operation = never> = runtime.Types.Public.Payload<T, F>
74
+ export type Result<T, A, F extends runtime.Operation> = runtime.Types.Public.Result<T, A, F>
75
+ export type Exact<A, W> = runtime.Types.Public.Exact<A, W>
76
+
77
+ export type PrismaVersion = {
78
+ client: string
79
+ engine: string
80
+ }
81
+
82
+ /**
83
+ * Prisma Client JS version: 7.5.0
84
+ * Query Engine version: 280c870be64f457428992c43c1f6d557fab6e29e
85
+ */
86
+ export const prismaVersion: PrismaVersion = {
87
+ client: "7.5.0",
88
+ engine: "280c870be64f457428992c43c1f6d557fab6e29e"
89
+ }
90
+
91
+ /**
92
+ * Utility Types
93
+ */
94
+
95
+ export type Bytes = runtime.Bytes
96
+ export type JsonObject = runtime.JsonObject
97
+ export type JsonArray = runtime.JsonArray
98
+ export type JsonValue = runtime.JsonValue
99
+ export type InputJsonObject = runtime.InputJsonObject
100
+ export type InputJsonArray = runtime.InputJsonArray
101
+ export type InputJsonValue = runtime.InputJsonValue
102
+
103
+
104
+ export const NullTypes = {
105
+ DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
106
+ JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
107
+ AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
108
+ }
109
+ /**
110
+ * Helper for filtering JSON entries that have `null` on the database (empty on the db)
111
+ *
112
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
113
+ */
114
+ export const DbNull = runtime.DbNull
115
+
116
+ /**
117
+ * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
118
+ *
119
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
120
+ */
121
+ export const JsonNull = runtime.JsonNull
122
+
123
+ /**
124
+ * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
125
+ *
126
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
127
+ */
128
+ export const AnyNull = runtime.AnyNull
129
+
130
+
131
+ type SelectAndInclude = {
132
+ select: any
133
+ include: any
134
+ }
135
+
136
+ type SelectAndOmit = {
137
+ select: any
138
+ omit: any
139
+ }
140
+
141
+ /**
142
+ * From T, pick a set of properties whose keys are in the union K
143
+ */
144
+ type Prisma__Pick<T, K extends keyof T> = {
145
+ [P in K]: T[P];
146
+ };
147
+
148
+ export type Enumerable<T> = T | Array<T>;
149
+
150
+ /**
151
+ * Subset
152
+ * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
153
+ */
154
+ export type Subset<T, U> = {
155
+ [key in keyof T]: key extends keyof U ? T[key] : never;
156
+ };
157
+
158
+ /**
159
+ * SelectSubset
160
+ * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
161
+ * Additionally, it validates, if both select and include are present. If the case, it errors.
162
+ */
163
+ export type SelectSubset<T, U> = {
164
+ [key in keyof T]: key extends keyof U ? T[key] : never
165
+ } &
166
+ (T extends SelectAndInclude
167
+ ? 'Please either choose `select` or `include`.'
168
+ : T extends SelectAndOmit
169
+ ? 'Please either choose `select` or `omit`.'
170
+ : {})
171
+
172
+ /**
173
+ * Subset + Intersection
174
+ * @desc From `T` pick properties that exist in `U` and intersect `K`
175
+ */
176
+ export type SubsetIntersection<T, U, K> = {
177
+ [key in keyof T]: key extends keyof U ? T[key] : never
178
+ } &
179
+ K
180
+
181
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
182
+
183
+ /**
184
+ * XOR is needed to have a real mutually exclusive union type
185
+ * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
186
+ */
187
+ export type XOR<T, U> =
188
+ T extends object ?
189
+ U extends object ?
190
+ (Without<T, U> & U) | (Without<U, T> & T)
191
+ : U : T
192
+
193
+
194
+ /**
195
+ * Is T a Record?
196
+ */
197
+ type IsObject<T extends any> = T extends Array<any>
198
+ ? False
199
+ : T extends Date
200
+ ? False
201
+ : T extends Uint8Array
202
+ ? False
203
+ : T extends BigInt
204
+ ? False
205
+ : T extends object
206
+ ? True
207
+ : False
208
+
209
+
210
+ /**
211
+ * If it's T[], return T
212
+ */
213
+ export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T
214
+
215
+ /**
216
+ * From ts-toolbelt
217
+ */
218
+
219
+ type __Either<O extends object, K extends Key> = Omit<O, K> &
220
+ {
221
+ // Merge all but K
222
+ [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
223
+ }[K]
224
+
225
+ type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
226
+
227
+ type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
228
+
229
+ type _Either<
230
+ O extends object,
231
+ K extends Key,
232
+ strict extends Boolean
233
+ > = {
234
+ 1: EitherStrict<O, K>
235
+ 0: EitherLoose<O, K>
236
+ }[strict]
237
+
238
+ export type Either<
239
+ O extends object,
240
+ K extends Key,
241
+ strict extends Boolean = 1
242
+ > = O extends unknown ? _Either<O, K, strict> : never
243
+
244
+ export type Union = any
245
+
246
+ export type PatchUndefined<O extends object, O1 extends object> = {
247
+ [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
248
+ } & {}
249
+
250
+ /** Helper Types for "Merge" **/
251
+ export type IntersectOf<U extends Union> = (
252
+ U extends unknown ? (k: U) => void : never
253
+ ) extends (k: infer I) => void
254
+ ? I
255
+ : never
256
+
257
+ export type Overwrite<O extends object, O1 extends object> = {
258
+ [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
259
+ } & {};
260
+
261
+ type _Merge<U extends object> = IntersectOf<Overwrite<U, {
262
+ [K in keyof U]-?: At<U, K>;
263
+ }>>;
264
+
265
+ type Key = string | number | symbol;
266
+ type AtStrict<O extends object, K extends Key> = O[K & keyof O];
267
+ type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
268
+ export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
269
+ 1: AtStrict<O, K>;
270
+ 0: AtLoose<O, K>;
271
+ }[strict];
272
+
273
+ export type ComputeRaw<A extends any> = A extends Function ? A : {
274
+ [K in keyof A]: A[K];
275
+ } & {};
276
+
277
+ export type OptionalFlat<O> = {
278
+ [K in keyof O]?: O[K];
279
+ } & {};
280
+
281
+ type _Record<K extends keyof any, T> = {
282
+ [P in K]: T;
283
+ };
284
+
285
+ // cause typescript not to expand types and preserve names
286
+ type NoExpand<T> = T extends unknown ? T : never;
287
+
288
+ // this type assumes the passed object is entirely optional
289
+ export type AtLeast<O extends object, K extends string> = NoExpand<
290
+ O extends unknown
291
+ ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
292
+ | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
293
+ : never>;
294
+
295
+ type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
296
+
297
+ export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
298
+ /** End Helper Types for "Merge" **/
299
+
300
+ export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
301
+
302
+ export type Boolean = True | False
303
+
304
+ export type True = 1
305
+
306
+ export type False = 0
307
+
308
+ export type Not<B extends Boolean> = {
309
+ 0: 1
310
+ 1: 0
311
+ }[B]
312
+
313
+ export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
314
+ ? 0 // anything `never` is false
315
+ : A1 extends A2
316
+ ? 1
317
+ : 0
318
+
319
+ export type Has<U extends Union, U1 extends Union> = Not<
320
+ Extends<Exclude<U1, U>, U1>
321
+ >
322
+
323
+ export type Or<B1 extends Boolean, B2 extends Boolean> = {
324
+ 0: {
325
+ 0: 0
326
+ 1: 1
327
+ }
328
+ 1: {
329
+ 0: 1
330
+ 1: 1
331
+ }
332
+ }[B1][B2]
333
+
334
+ export type Keys<U extends Union> = U extends unknown ? keyof U : never
335
+
336
+ export type GetScalarType<T, O> = O extends object ? {
337
+ [P in keyof T]: P extends keyof O
338
+ ? O[P]
339
+ : never
340
+ } : never
341
+
342
+ type FieldPaths<
343
+ T,
344
+ U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
345
+ > = IsObject<T> extends True ? U : T
346
+
347
+ export type GetHavingFields<T> = {
348
+ [K in keyof T]: Or<
349
+ Or<Extends<'OR', K>, Extends<'AND', K>>,
350
+ Extends<'NOT', K>
351
+ > extends True
352
+ ? // infer is only needed to not hit TS limit
353
+ // based on the brilliant idea of Pierre-Antoine Mills
354
+ // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
355
+ T[K] extends infer TK
356
+ ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
357
+ : never
358
+ : {} extends FieldPaths<T[K]>
359
+ ? never
360
+ : K
361
+ }[keyof T]
362
+
363
+ /**
364
+ * Convert tuple to union
365
+ */
366
+ type _TupleToUnion<T> = T extends (infer E)[] ? E : never
367
+ type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
368
+ export type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
369
+
370
+ /**
371
+ * Like `Pick`, but additionally can also accept an array of keys
372
+ */
373
+ export type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>
374
+
375
+ /**
376
+ * Exclude all keys with underscores
377
+ */
378
+ export type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
379
+
380
+
381
+ export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
382
+
383
+ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
384
+
385
+
386
+ export const ModelName = {
387
+ User: 'User',
388
+ Account: 'Account',
389
+ Session: 'Session',
390
+ VerificationToken: 'VerificationToken',
391
+ File: 'File',
392
+ Subscription: 'Subscription'
393
+ } as const
394
+
395
+ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
396
+
397
+
398
+
399
+ export interface TypeMapCb<GlobalOmitOptions = {}> extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record<string, any>> {
400
+ returns: TypeMap<this['params']['extArgs'], GlobalOmitOptions>
401
+ }
402
+
403
+ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
404
+ globalOmitOptions: {
405
+ omit: GlobalOmitOptions
406
+ }
407
+ meta: {
408
+ modelProps: "user" | "account" | "session" | "verificationToken" | "file" | "subscription"
409
+ txIsolationLevel: TransactionIsolationLevel
410
+ }
411
+ model: {
412
+ User: {
413
+ payload: Prisma.$UserPayload<ExtArgs>
414
+ fields: Prisma.UserFieldRefs
415
+ operations: {
416
+ findUnique: {
417
+ args: Prisma.UserFindUniqueArgs<ExtArgs>
418
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload> | null
419
+ }
420
+ findUniqueOrThrow: {
421
+ args: Prisma.UserFindUniqueOrThrowArgs<ExtArgs>
422
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
423
+ }
424
+ findFirst: {
425
+ args: Prisma.UserFindFirstArgs<ExtArgs>
426
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload> | null
427
+ }
428
+ findFirstOrThrow: {
429
+ args: Prisma.UserFindFirstOrThrowArgs<ExtArgs>
430
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
431
+ }
432
+ findMany: {
433
+ args: Prisma.UserFindManyArgs<ExtArgs>
434
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>[]
435
+ }
436
+ create: {
437
+ args: Prisma.UserCreateArgs<ExtArgs>
438
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
439
+ }
440
+ createMany: {
441
+ args: Prisma.UserCreateManyArgs<ExtArgs>
442
+ result: BatchPayload
443
+ }
444
+ createManyAndReturn: {
445
+ args: Prisma.UserCreateManyAndReturnArgs<ExtArgs>
446
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>[]
447
+ }
448
+ delete: {
449
+ args: Prisma.UserDeleteArgs<ExtArgs>
450
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
451
+ }
452
+ update: {
453
+ args: Prisma.UserUpdateArgs<ExtArgs>
454
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
455
+ }
456
+ deleteMany: {
457
+ args: Prisma.UserDeleteManyArgs<ExtArgs>
458
+ result: BatchPayload
459
+ }
460
+ updateMany: {
461
+ args: Prisma.UserUpdateManyArgs<ExtArgs>
462
+ result: BatchPayload
463
+ }
464
+ updateManyAndReturn: {
465
+ args: Prisma.UserUpdateManyAndReturnArgs<ExtArgs>
466
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>[]
467
+ }
468
+ upsert: {
469
+ args: Prisma.UserUpsertArgs<ExtArgs>
470
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$UserPayload>
471
+ }
472
+ aggregate: {
473
+ args: Prisma.UserAggregateArgs<ExtArgs>
474
+ result: runtime.Types.Utils.Optional<Prisma.AggregateUser>
475
+ }
476
+ groupBy: {
477
+ args: Prisma.UserGroupByArgs<ExtArgs>
478
+ result: runtime.Types.Utils.Optional<Prisma.UserGroupByOutputType>[]
479
+ }
480
+ count: {
481
+ args: Prisma.UserCountArgs<ExtArgs>
482
+ result: runtime.Types.Utils.Optional<Prisma.UserCountAggregateOutputType> | number
483
+ }
484
+ }
485
+ }
486
+ Account: {
487
+ payload: Prisma.$AccountPayload<ExtArgs>
488
+ fields: Prisma.AccountFieldRefs
489
+ operations: {
490
+ findUnique: {
491
+ args: Prisma.AccountFindUniqueArgs<ExtArgs>
492
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload> | null
493
+ }
494
+ findUniqueOrThrow: {
495
+ args: Prisma.AccountFindUniqueOrThrowArgs<ExtArgs>
496
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
497
+ }
498
+ findFirst: {
499
+ args: Prisma.AccountFindFirstArgs<ExtArgs>
500
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload> | null
501
+ }
502
+ findFirstOrThrow: {
503
+ args: Prisma.AccountFindFirstOrThrowArgs<ExtArgs>
504
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
505
+ }
506
+ findMany: {
507
+ args: Prisma.AccountFindManyArgs<ExtArgs>
508
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>[]
509
+ }
510
+ create: {
511
+ args: Prisma.AccountCreateArgs<ExtArgs>
512
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
513
+ }
514
+ createMany: {
515
+ args: Prisma.AccountCreateManyArgs<ExtArgs>
516
+ result: BatchPayload
517
+ }
518
+ createManyAndReturn: {
519
+ args: Prisma.AccountCreateManyAndReturnArgs<ExtArgs>
520
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>[]
521
+ }
522
+ delete: {
523
+ args: Prisma.AccountDeleteArgs<ExtArgs>
524
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
525
+ }
526
+ update: {
527
+ args: Prisma.AccountUpdateArgs<ExtArgs>
528
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
529
+ }
530
+ deleteMany: {
531
+ args: Prisma.AccountDeleteManyArgs<ExtArgs>
532
+ result: BatchPayload
533
+ }
534
+ updateMany: {
535
+ args: Prisma.AccountUpdateManyArgs<ExtArgs>
536
+ result: BatchPayload
537
+ }
538
+ updateManyAndReturn: {
539
+ args: Prisma.AccountUpdateManyAndReturnArgs<ExtArgs>
540
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>[]
541
+ }
542
+ upsert: {
543
+ args: Prisma.AccountUpsertArgs<ExtArgs>
544
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AccountPayload>
545
+ }
546
+ aggregate: {
547
+ args: Prisma.AccountAggregateArgs<ExtArgs>
548
+ result: runtime.Types.Utils.Optional<Prisma.AggregateAccount>
549
+ }
550
+ groupBy: {
551
+ args: Prisma.AccountGroupByArgs<ExtArgs>
552
+ result: runtime.Types.Utils.Optional<Prisma.AccountGroupByOutputType>[]
553
+ }
554
+ count: {
555
+ args: Prisma.AccountCountArgs<ExtArgs>
556
+ result: runtime.Types.Utils.Optional<Prisma.AccountCountAggregateOutputType> | number
557
+ }
558
+ }
559
+ }
560
+ Session: {
561
+ payload: Prisma.$SessionPayload<ExtArgs>
562
+ fields: Prisma.SessionFieldRefs
563
+ operations: {
564
+ findUnique: {
565
+ args: Prisma.SessionFindUniqueArgs<ExtArgs>
566
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload> | null
567
+ }
568
+ findUniqueOrThrow: {
569
+ args: Prisma.SessionFindUniqueOrThrowArgs<ExtArgs>
570
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
571
+ }
572
+ findFirst: {
573
+ args: Prisma.SessionFindFirstArgs<ExtArgs>
574
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload> | null
575
+ }
576
+ findFirstOrThrow: {
577
+ args: Prisma.SessionFindFirstOrThrowArgs<ExtArgs>
578
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
579
+ }
580
+ findMany: {
581
+ args: Prisma.SessionFindManyArgs<ExtArgs>
582
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>[]
583
+ }
584
+ create: {
585
+ args: Prisma.SessionCreateArgs<ExtArgs>
586
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
587
+ }
588
+ createMany: {
589
+ args: Prisma.SessionCreateManyArgs<ExtArgs>
590
+ result: BatchPayload
591
+ }
592
+ createManyAndReturn: {
593
+ args: Prisma.SessionCreateManyAndReturnArgs<ExtArgs>
594
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>[]
595
+ }
596
+ delete: {
597
+ args: Prisma.SessionDeleteArgs<ExtArgs>
598
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
599
+ }
600
+ update: {
601
+ args: Prisma.SessionUpdateArgs<ExtArgs>
602
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
603
+ }
604
+ deleteMany: {
605
+ args: Prisma.SessionDeleteManyArgs<ExtArgs>
606
+ result: BatchPayload
607
+ }
608
+ updateMany: {
609
+ args: Prisma.SessionUpdateManyArgs<ExtArgs>
610
+ result: BatchPayload
611
+ }
612
+ updateManyAndReturn: {
613
+ args: Prisma.SessionUpdateManyAndReturnArgs<ExtArgs>
614
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>[]
615
+ }
616
+ upsert: {
617
+ args: Prisma.SessionUpsertArgs<ExtArgs>
618
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SessionPayload>
619
+ }
620
+ aggregate: {
621
+ args: Prisma.SessionAggregateArgs<ExtArgs>
622
+ result: runtime.Types.Utils.Optional<Prisma.AggregateSession>
623
+ }
624
+ groupBy: {
625
+ args: Prisma.SessionGroupByArgs<ExtArgs>
626
+ result: runtime.Types.Utils.Optional<Prisma.SessionGroupByOutputType>[]
627
+ }
628
+ count: {
629
+ args: Prisma.SessionCountArgs<ExtArgs>
630
+ result: runtime.Types.Utils.Optional<Prisma.SessionCountAggregateOutputType> | number
631
+ }
632
+ }
633
+ }
634
+ VerificationToken: {
635
+ payload: Prisma.$VerificationTokenPayload<ExtArgs>
636
+ fields: Prisma.VerificationTokenFieldRefs
637
+ operations: {
638
+ findUnique: {
639
+ args: Prisma.VerificationTokenFindUniqueArgs<ExtArgs>
640
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload> | null
641
+ }
642
+ findUniqueOrThrow: {
643
+ args: Prisma.VerificationTokenFindUniqueOrThrowArgs<ExtArgs>
644
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>
645
+ }
646
+ findFirst: {
647
+ args: Prisma.VerificationTokenFindFirstArgs<ExtArgs>
648
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload> | null
649
+ }
650
+ findFirstOrThrow: {
651
+ args: Prisma.VerificationTokenFindFirstOrThrowArgs<ExtArgs>
652
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>
653
+ }
654
+ findMany: {
655
+ args: Prisma.VerificationTokenFindManyArgs<ExtArgs>
656
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>[]
657
+ }
658
+ create: {
659
+ args: Prisma.VerificationTokenCreateArgs<ExtArgs>
660
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>
661
+ }
662
+ createMany: {
663
+ args: Prisma.VerificationTokenCreateManyArgs<ExtArgs>
664
+ result: BatchPayload
665
+ }
666
+ createManyAndReturn: {
667
+ args: Prisma.VerificationTokenCreateManyAndReturnArgs<ExtArgs>
668
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>[]
669
+ }
670
+ delete: {
671
+ args: Prisma.VerificationTokenDeleteArgs<ExtArgs>
672
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>
673
+ }
674
+ update: {
675
+ args: Prisma.VerificationTokenUpdateArgs<ExtArgs>
676
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>
677
+ }
678
+ deleteMany: {
679
+ args: Prisma.VerificationTokenDeleteManyArgs<ExtArgs>
680
+ result: BatchPayload
681
+ }
682
+ updateMany: {
683
+ args: Prisma.VerificationTokenUpdateManyArgs<ExtArgs>
684
+ result: BatchPayload
685
+ }
686
+ updateManyAndReturn: {
687
+ args: Prisma.VerificationTokenUpdateManyAndReturnArgs<ExtArgs>
688
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>[]
689
+ }
690
+ upsert: {
691
+ args: Prisma.VerificationTokenUpsertArgs<ExtArgs>
692
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$VerificationTokenPayload>
693
+ }
694
+ aggregate: {
695
+ args: Prisma.VerificationTokenAggregateArgs<ExtArgs>
696
+ result: runtime.Types.Utils.Optional<Prisma.AggregateVerificationToken>
697
+ }
698
+ groupBy: {
699
+ args: Prisma.VerificationTokenGroupByArgs<ExtArgs>
700
+ result: runtime.Types.Utils.Optional<Prisma.VerificationTokenGroupByOutputType>[]
701
+ }
702
+ count: {
703
+ args: Prisma.VerificationTokenCountArgs<ExtArgs>
704
+ result: runtime.Types.Utils.Optional<Prisma.VerificationTokenCountAggregateOutputType> | number
705
+ }
706
+ }
707
+ }
708
+ File: {
709
+ payload: Prisma.$FilePayload<ExtArgs>
710
+ fields: Prisma.FileFieldRefs
711
+ operations: {
712
+ findUnique: {
713
+ args: Prisma.FileFindUniqueArgs<ExtArgs>
714
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload> | null
715
+ }
716
+ findUniqueOrThrow: {
717
+ args: Prisma.FileFindUniqueOrThrowArgs<ExtArgs>
718
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>
719
+ }
720
+ findFirst: {
721
+ args: Prisma.FileFindFirstArgs<ExtArgs>
722
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload> | null
723
+ }
724
+ findFirstOrThrow: {
725
+ args: Prisma.FileFindFirstOrThrowArgs<ExtArgs>
726
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>
727
+ }
728
+ findMany: {
729
+ args: Prisma.FileFindManyArgs<ExtArgs>
730
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>[]
731
+ }
732
+ create: {
733
+ args: Prisma.FileCreateArgs<ExtArgs>
734
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>
735
+ }
736
+ createMany: {
737
+ args: Prisma.FileCreateManyArgs<ExtArgs>
738
+ result: BatchPayload
739
+ }
740
+ createManyAndReturn: {
741
+ args: Prisma.FileCreateManyAndReturnArgs<ExtArgs>
742
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>[]
743
+ }
744
+ delete: {
745
+ args: Prisma.FileDeleteArgs<ExtArgs>
746
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>
747
+ }
748
+ update: {
749
+ args: Prisma.FileUpdateArgs<ExtArgs>
750
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>
751
+ }
752
+ deleteMany: {
753
+ args: Prisma.FileDeleteManyArgs<ExtArgs>
754
+ result: BatchPayload
755
+ }
756
+ updateMany: {
757
+ args: Prisma.FileUpdateManyArgs<ExtArgs>
758
+ result: BatchPayload
759
+ }
760
+ updateManyAndReturn: {
761
+ args: Prisma.FileUpdateManyAndReturnArgs<ExtArgs>
762
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>[]
763
+ }
764
+ upsert: {
765
+ args: Prisma.FileUpsertArgs<ExtArgs>
766
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$FilePayload>
767
+ }
768
+ aggregate: {
769
+ args: Prisma.FileAggregateArgs<ExtArgs>
770
+ result: runtime.Types.Utils.Optional<Prisma.AggregateFile>
771
+ }
772
+ groupBy: {
773
+ args: Prisma.FileGroupByArgs<ExtArgs>
774
+ result: runtime.Types.Utils.Optional<Prisma.FileGroupByOutputType>[]
775
+ }
776
+ count: {
777
+ args: Prisma.FileCountArgs<ExtArgs>
778
+ result: runtime.Types.Utils.Optional<Prisma.FileCountAggregateOutputType> | number
779
+ }
780
+ }
781
+ }
782
+ Subscription: {
783
+ payload: Prisma.$SubscriptionPayload<ExtArgs>
784
+ fields: Prisma.SubscriptionFieldRefs
785
+ operations: {
786
+ findUnique: {
787
+ args: Prisma.SubscriptionFindUniqueArgs<ExtArgs>
788
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload> | null
789
+ }
790
+ findUniqueOrThrow: {
791
+ args: Prisma.SubscriptionFindUniqueOrThrowArgs<ExtArgs>
792
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>
793
+ }
794
+ findFirst: {
795
+ args: Prisma.SubscriptionFindFirstArgs<ExtArgs>
796
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload> | null
797
+ }
798
+ findFirstOrThrow: {
799
+ args: Prisma.SubscriptionFindFirstOrThrowArgs<ExtArgs>
800
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>
801
+ }
802
+ findMany: {
803
+ args: Prisma.SubscriptionFindManyArgs<ExtArgs>
804
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>[]
805
+ }
806
+ create: {
807
+ args: Prisma.SubscriptionCreateArgs<ExtArgs>
808
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>
809
+ }
810
+ createMany: {
811
+ args: Prisma.SubscriptionCreateManyArgs<ExtArgs>
812
+ result: BatchPayload
813
+ }
814
+ createManyAndReturn: {
815
+ args: Prisma.SubscriptionCreateManyAndReturnArgs<ExtArgs>
816
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>[]
817
+ }
818
+ delete: {
819
+ args: Prisma.SubscriptionDeleteArgs<ExtArgs>
820
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>
821
+ }
822
+ update: {
823
+ args: Prisma.SubscriptionUpdateArgs<ExtArgs>
824
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>
825
+ }
826
+ deleteMany: {
827
+ args: Prisma.SubscriptionDeleteManyArgs<ExtArgs>
828
+ result: BatchPayload
829
+ }
830
+ updateMany: {
831
+ args: Prisma.SubscriptionUpdateManyArgs<ExtArgs>
832
+ result: BatchPayload
833
+ }
834
+ updateManyAndReturn: {
835
+ args: Prisma.SubscriptionUpdateManyAndReturnArgs<ExtArgs>
836
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>[]
837
+ }
838
+ upsert: {
839
+ args: Prisma.SubscriptionUpsertArgs<ExtArgs>
840
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$SubscriptionPayload>
841
+ }
842
+ aggregate: {
843
+ args: Prisma.SubscriptionAggregateArgs<ExtArgs>
844
+ result: runtime.Types.Utils.Optional<Prisma.AggregateSubscription>
845
+ }
846
+ groupBy: {
847
+ args: Prisma.SubscriptionGroupByArgs<ExtArgs>
848
+ result: runtime.Types.Utils.Optional<Prisma.SubscriptionGroupByOutputType>[]
849
+ }
850
+ count: {
851
+ args: Prisma.SubscriptionCountArgs<ExtArgs>
852
+ result: runtime.Types.Utils.Optional<Prisma.SubscriptionCountAggregateOutputType> | number
853
+ }
854
+ }
855
+ }
856
+ }
857
+ } & {
858
+ other: {
859
+ payload: any
860
+ operations: {
861
+ $executeRaw: {
862
+ args: [query: TemplateStringsArray | Sql, ...values: any[]],
863
+ result: any
864
+ }
865
+ $executeRawUnsafe: {
866
+ args: [query: string, ...values: any[]],
867
+ result: any
868
+ }
869
+ $queryRaw: {
870
+ args: [query: TemplateStringsArray | Sql, ...values: any[]],
871
+ result: any
872
+ }
873
+ $queryRawUnsafe: {
874
+ args: [query: string, ...values: any[]],
875
+ result: any
876
+ }
877
+ }
878
+ }
879
+ }
880
+
881
+ /**
882
+ * Enums
883
+ */
884
+
885
+ export const TransactionIsolationLevel = runtime.makeStrictEnum({
886
+ ReadUncommitted: 'ReadUncommitted',
887
+ ReadCommitted: 'ReadCommitted',
888
+ RepeatableRead: 'RepeatableRead',
889
+ Serializable: 'Serializable'
890
+ } as const)
891
+
892
+ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
893
+
894
+
895
+ export const UserScalarFieldEnum = {
896
+ id: 'id',
897
+ email: 'email',
898
+ name: 'name',
899
+ password: 'password',
900
+ role: 'role',
901
+ emailVerified: 'emailVerified',
902
+ image: 'image',
903
+ createdAt: 'createdAt',
904
+ updatedAt: 'updatedAt',
905
+ failedLoginAttempts: 'failedLoginAttempts',
906
+ lastFailedLogin: 'lastFailedLogin',
907
+ lockedUntil: 'lockedUntil',
908
+ termsAcceptedAt: 'termsAcceptedAt',
909
+ privacyAcceptedAt: 'privacyAcceptedAt',
910
+ marketingOptIn: 'marketingOptIn',
911
+ marketingOptInAt: 'marketingOptInAt'
912
+ } as const
913
+
914
+ export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
915
+
916
+
917
+ export const AccountScalarFieldEnum = {
918
+ id: 'id',
919
+ userId: 'userId',
920
+ provider: 'provider',
921
+ providerAccountId: 'providerAccountId',
922
+ refreshToken: 'refreshToken',
923
+ accessToken: 'accessToken',
924
+ expiresAt: 'expiresAt',
925
+ tokenType: 'tokenType',
926
+ scope: 'scope'
927
+ } as const
928
+
929
+ export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
930
+
931
+
932
+ export const SessionScalarFieldEnum = {
933
+ id: 'id',
934
+ userId: 'userId',
935
+ token: 'token',
936
+ expiresAt: 'expiresAt',
937
+ createdAt: 'createdAt',
938
+ ipAddress: 'ipAddress',
939
+ userAgent: 'userAgent'
940
+ } as const
941
+
942
+ export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum]
943
+
944
+
945
+ export const VerificationTokenScalarFieldEnum = {
946
+ identifier: 'identifier',
947
+ token: 'token',
948
+ expires: 'expires'
949
+ } as const
950
+
951
+ export type VerificationTokenScalarFieldEnum = (typeof VerificationTokenScalarFieldEnum)[keyof typeof VerificationTokenScalarFieldEnum]
952
+
953
+
954
+ export const FileScalarFieldEnum = {
955
+ id: 'id',
956
+ userId: 'userId',
957
+ filename: 'filename',
958
+ url: 'url',
959
+ contentType: 'contentType',
960
+ size: 'size',
961
+ access: 'access',
962
+ createdAt: 'createdAt',
963
+ updatedAt: 'updatedAt'
964
+ } as const
965
+
966
+ export type FileScalarFieldEnum = (typeof FileScalarFieldEnum)[keyof typeof FileScalarFieldEnum]
967
+
968
+
969
+ export const SubscriptionScalarFieldEnum = {
970
+ id: 'id',
971
+ userId: 'userId',
972
+ stripeCustomerId: 'stripeCustomerId',
973
+ stripePriceId: 'stripePriceId',
974
+ stripeSubscriptionId: 'stripeSubscriptionId',
975
+ status: 'status',
976
+ currentPeriodEnd: 'currentPeriodEnd',
977
+ cancelAtPeriodEnd: 'cancelAtPeriodEnd',
978
+ createdAt: 'createdAt',
979
+ updatedAt: 'updatedAt'
980
+ } as const
981
+
982
+ export type SubscriptionScalarFieldEnum = (typeof SubscriptionScalarFieldEnum)[keyof typeof SubscriptionScalarFieldEnum]
983
+
984
+
985
+ export const SortOrder = {
986
+ asc: 'asc',
987
+ desc: 'desc'
988
+ } as const
989
+
990
+ export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
991
+
992
+
993
+ export const QueryMode = {
994
+ default: 'default',
995
+ insensitive: 'insensitive'
996
+ } as const
997
+
998
+ export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
999
+
1000
+
1001
+ export const NullsOrder = {
1002
+ first: 'first',
1003
+ last: 'last'
1004
+ } as const
1005
+
1006
+ export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
1007
+
1008
+
1009
+
1010
+ /**
1011
+ * Field references
1012
+ */
1013
+
1014
+
1015
+ /**
1016
+ * Reference to a field of type 'String'
1017
+ */
1018
+ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
1019
+
1020
+
1021
+
1022
+ /**
1023
+ * Reference to a field of type 'String[]'
1024
+ */
1025
+ export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>
1026
+
1027
+
1028
+
1029
+ /**
1030
+ * Reference to a field of type 'DateTime'
1031
+ */
1032
+ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
1033
+
1034
+
1035
+
1036
+ /**
1037
+ * Reference to a field of type 'DateTime[]'
1038
+ */
1039
+ export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>
1040
+
1041
+
1042
+
1043
+ /**
1044
+ * Reference to a field of type 'Int'
1045
+ */
1046
+ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
1047
+
1048
+
1049
+
1050
+ /**
1051
+ * Reference to a field of type 'Int[]'
1052
+ */
1053
+ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>
1054
+
1055
+
1056
+
1057
+ /**
1058
+ * Reference to a field of type 'Boolean'
1059
+ */
1060
+ export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
1061
+
1062
+
1063
+
1064
+ /**
1065
+ * Reference to a field of type 'Float'
1066
+ */
1067
+ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
1068
+
1069
+
1070
+
1071
+ /**
1072
+ * Reference to a field of type 'Float[]'
1073
+ */
1074
+ export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>
1075
+
1076
+
1077
+ /**
1078
+ * Batch Payload for updateMany & deleteMany & createMany
1079
+ */
1080
+ export type BatchPayload = {
1081
+ count: number
1082
+ }
1083
+
1084
+ export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs>
1085
+ export type DefaultPrismaClient = PrismaClient
1086
+ export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
1087
+ export type PrismaClientOptions = ({
1088
+ /**
1089
+ * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`.
1090
+ */
1091
+ adapter: runtime.SqlDriverAdapterFactory
1092
+ accelerateUrl?: never
1093
+ } | {
1094
+ /**
1095
+ * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database.
1096
+ */
1097
+ accelerateUrl: string
1098
+ adapter?: never
1099
+ }) & {
1100
+ /**
1101
+ * @default "colorless"
1102
+ */
1103
+ errorFormat?: ErrorFormat
1104
+ /**
1105
+ * @example
1106
+ * ```
1107
+ * // Shorthand for `emit: 'stdout'`
1108
+ * log: ['query', 'info', 'warn', 'error']
1109
+ *
1110
+ * // Emit as events only
1111
+ * log: [
1112
+ * { emit: 'event', level: 'query' },
1113
+ * { emit: 'event', level: 'info' },
1114
+ * { emit: 'event', level: 'warn' }
1115
+ * { emit: 'event', level: 'error' }
1116
+ * ]
1117
+ *
1118
+ * / Emit as events and log to stdout
1119
+ * og: [
1120
+ * { emit: 'stdout', level: 'query' },
1121
+ * { emit: 'stdout', level: 'info' },
1122
+ * { emit: 'stdout', level: 'warn' }
1123
+ * { emit: 'stdout', level: 'error' }
1124
+ *
1125
+ * ```
1126
+ * Read more in our [docs](https://pris.ly/d/logging).
1127
+ */
1128
+ log?: (LogLevel | LogDefinition)[]
1129
+ /**
1130
+ * The default values for transactionOptions
1131
+ * maxWait ?= 2000
1132
+ * timeout ?= 5000
1133
+ */
1134
+ transactionOptions?: {
1135
+ maxWait?: number
1136
+ timeout?: number
1137
+ isolationLevel?: TransactionIsolationLevel
1138
+ }
1139
+ /**
1140
+ * Global configuration for omitting model fields by default.
1141
+ *
1142
+ * @example
1143
+ * ```
1144
+ * const prisma = new PrismaClient({
1145
+ * omit: {
1146
+ * user: {
1147
+ * password: true
1148
+ * }
1149
+ * }
1150
+ * })
1151
+ * ```
1152
+ */
1153
+ omit?: GlobalOmitConfig
1154
+ /**
1155
+ * SQL commenter plugins that add metadata to SQL queries as comments.
1156
+ * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/
1157
+ *
1158
+ * @example
1159
+ * ```
1160
+ * const prisma = new PrismaClient({
1161
+ * adapter,
1162
+ * comments: [
1163
+ * traceContext(),
1164
+ * queryInsights(),
1165
+ * ],
1166
+ * })
1167
+ * ```
1168
+ */
1169
+ comments?: runtime.SqlCommenterPlugin[]
1170
+ }
1171
+ export type GlobalOmitConfig = {
1172
+ user?: Prisma.UserOmit
1173
+ account?: Prisma.AccountOmit
1174
+ session?: Prisma.SessionOmit
1175
+ verificationToken?: Prisma.VerificationTokenOmit
1176
+ file?: Prisma.FileOmit
1177
+ subscription?: Prisma.SubscriptionOmit
1178
+ }
1179
+
1180
+ /* Types for Logging */
1181
+ export type LogLevel = 'info' | 'query' | 'warn' | 'error'
1182
+ export type LogDefinition = {
1183
+ level: LogLevel
1184
+ emit: 'stdout' | 'event'
1185
+ }
1186
+
1187
+ export type CheckIsLogLevel<T> = T extends LogLevel ? T : never;
1188
+
1189
+ export type GetLogType<T> = CheckIsLogLevel<
1190
+ T extends LogDefinition ? T['level'] : T
1191
+ >;
1192
+
1193
+ export type GetEvents<T extends any[]> = T extends Array<LogLevel | LogDefinition>
1194
+ ? GetLogType<T[number]>
1195
+ : never;
1196
+
1197
+ export type QueryEvent = {
1198
+ timestamp: Date
1199
+ query: string
1200
+ params: string
1201
+ duration: number
1202
+ target: string
1203
+ }
1204
+
1205
+ export type LogEvent = {
1206
+ timestamp: Date
1207
+ message: string
1208
+ target: string
1209
+ }
1210
+ /* End Types for Logging */
1211
+
1212
+
1213
+ export type PrismaAction =
1214
+ | 'findUnique'
1215
+ | 'findUniqueOrThrow'
1216
+ | 'findMany'
1217
+ | 'findFirst'
1218
+ | 'findFirstOrThrow'
1219
+ | 'create'
1220
+ | 'createMany'
1221
+ | 'createManyAndReturn'
1222
+ | 'update'
1223
+ | 'updateMany'
1224
+ | 'updateManyAndReturn'
1225
+ | 'upsert'
1226
+ | 'delete'
1227
+ | 'deleteMany'
1228
+ | 'executeRaw'
1229
+ | 'queryRaw'
1230
+ | 'aggregate'
1231
+ | 'count'
1232
+ | 'runCommandRaw'
1233
+ | 'findRaw'
1234
+ | 'groupBy'
1235
+
1236
+ /**
1237
+ * `PrismaClient` proxy available in interactive transactions.
1238
+ */
1239
+ export type TransactionClient = Omit<DefaultPrismaClient, runtime.ITXClientDenyList>
1240
+