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