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