@appweaver/data 0.0.0-stage → 2.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 (157) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -2
  3. package/config.d.ts +6 -0
  4. package/config.js +22 -0
  5. package/database/create-client.d.ts +11 -0
  6. package/database/create-client.js +145 -0
  7. package/database/database-config.d.ts +14 -0
  8. package/database/database-config.js +40 -0
  9. package/database/database-error.d.ts +49 -0
  10. package/database/database-error.js +216 -0
  11. package/database/index.d.ts +3 -0
  12. package/database/index.js +19 -0
  13. package/database/prisma-database.d.ts +33 -0
  14. package/database/prisma-database.js +178 -0
  15. package/database/run-transaction.d.ts +21 -0
  16. package/database/run-transaction.js +15 -0
  17. package/export/export-config.d.ts +7 -0
  18. package/export/export-config.js +17 -0
  19. package/export/export-service.d.ts +22 -0
  20. package/export/export-service.js +188 -0
  21. package/export/index.d.ts +1 -0
  22. package/export/index.js +17 -0
  23. package/factory/create-model.d.ts +11 -0
  24. package/factory/create-model.js +479 -0
  25. package/factory/create-policy.d.ts +12 -0
  26. package/factory/create-policy.js +20 -0
  27. package/factory/create-service.d.ts +14 -0
  28. package/factory/create-service.js +116 -0
  29. package/index.d.ts +22 -0
  30. package/index.js +38 -0
  31. package/internal.d.ts +2 -0
  32. package/internal.js +6 -0
  33. package/module.d.ts +3 -0
  34. package/module.js +81 -0
  35. package/package.json +67 -3
  36. package/prisma/client/browser.d.ts +39 -0
  37. package/prisma/client/browser.js +56 -0
  38. package/prisma/client/client.d.ts +58 -0
  39. package/prisma/client/client.js +70 -0
  40. package/prisma/client/commonInputTypes.d.ts +345 -0
  41. package/prisma/client/commonInputTypes.js +11 -0
  42. package/prisma/client/enums.d.ts +1 -0
  43. package/prisma/client/enums.js +11 -0
  44. package/prisma/client/internal/class.d.ts +198 -0
  45. package/prisma/client/internal/class.js +85 -0
  46. package/prisma/client/internal/prismaNamespace.d.ts +1125 -0
  47. package/prisma/client/internal/prismaNamespace.js +204 -0
  48. package/prisma/client/internal/prismaNamespaceBrowser.d.ts +137 -0
  49. package/prisma/client/internal/prismaNamespaceBrowser.js +175 -0
  50. package/prisma/client/models/ApiKey.d.ts +1167 -0
  51. package/prisma/client/models/ApiKey.js +2 -0
  52. package/prisma/client/models/ConnectedAccount.d.ts +1094 -0
  53. package/prisma/client/models/ConnectedAccount.js +2 -0
  54. package/prisma/client/models/File.d.ts +1291 -0
  55. package/prisma/client/models/File.js +2 -0
  56. package/prisma/client/models/OneTimeToken.d.ts +1055 -0
  57. package/prisma/client/models/OneTimeToken.js +2 -0
  58. package/prisma/client/models/Permission.d.ts +1209 -0
  59. package/prisma/client/models/Permission.js +2 -0
  60. package/prisma/client/models/Role.d.ts +1209 -0
  61. package/prisma/client/models/Role.js +2 -0
  62. package/prisma/client/models/Seeder.d.ts +1023 -0
  63. package/prisma/client/models/Seeder.js +2 -0
  64. package/prisma/client/models.d.ts +8 -0
  65. package/prisma/client/models.js +2 -0
  66. package/resource/load-data-resources.d.ts +13 -0
  67. package/resource/load-data-resources.js +37 -0
  68. package/resource/model-schema.d.ts +34 -0
  69. package/resource/model-schema.js +54 -0
  70. package/resource/resource-config.d.ts +16 -0
  71. package/resource/resource-config.js +62 -0
  72. package/resource/resource-loader.d.ts +25 -0
  73. package/resource/resource-loader.js +138 -0
  74. package/resource/resource-service.d.ts +462 -0
  75. package/resource/resource-service.js +1042 -0
  76. package/resource/schemas/index.d.ts +3 -0
  77. package/resource/schemas/index.js +19 -0
  78. package/resource/schemas/resource-aggregate-schema.d.ts +53 -0
  79. package/resource/schemas/resource-aggregate-schema.js +130 -0
  80. package/resource/schemas/resource-filter-schema.d.ts +39 -0
  81. package/resource/schemas/resource-filter-schema.js +153 -0
  82. package/resource/schemas/resource-sort-schema.d.ts +38 -0
  83. package/resource/schemas/resource-sort-schema.js +113 -0
  84. package/resource/utils/aggregate-util.d.ts +113 -0
  85. package/resource/utils/aggregate-util.js +322 -0
  86. package/resource/utils/cursor-util.d.ts +60 -0
  87. package/resource/utils/cursor-util.js +116 -0
  88. package/resource/utils/date-util.d.ts +22 -0
  89. package/resource/utils/date-util.js +112 -0
  90. package/resource/utils/delete-util.d.ts +131 -0
  91. package/resource/utils/delete-util.js +385 -0
  92. package/resource/utils/filter-util.d.ts +24 -0
  93. package/resource/utils/filter-util.js +289 -0
  94. package/resource/utils/prune-util.d.ts +11 -0
  95. package/resource/utils/prune-util.js +56 -0
  96. package/resource/utils/relation-util.d.ts +75 -0
  97. package/resource/utils/relation-util.js +400 -0
  98. package/resource/utils/sort-util.d.ts +31 -0
  99. package/resource/utils/sort-util.js +235 -0
  100. package/resource/utils/text-search-util.d.ts +14 -0
  101. package/resource/utils/text-search-util.js +39 -0
  102. package/resources.d.ts +10 -0
  103. package/resources.js +26 -0
  104. package/security/auth-config.d.ts +23 -0
  105. package/security/auth-config.js +43 -0
  106. package/security/create-auth-resources.d.ts +28 -0
  107. package/security/create-auth-resources.js +163 -0
  108. package/security/helper.d.ts +109 -0
  109. package/security/helper.js +298 -0
  110. package/security/resources/api-key/model.d.ts +2 -0
  111. package/security/resources/api-key/model.js +67 -0
  112. package/security/resources/api-key/policy.d.ts +2 -0
  113. package/security/resources/api-key/policy.js +27 -0
  114. package/security/resources/api-key/service.d.ts +3 -0
  115. package/security/resources/api-key/service.js +34 -0
  116. package/security/resources/connected-account/model.d.ts +2 -0
  117. package/security/resources/connected-account/model.js +57 -0
  118. package/security/resources/connected-account/service.d.ts +2 -0
  119. package/security/resources/connected-account/service.js +7 -0
  120. package/security/resources/one-time-token/model.d.ts +2 -0
  121. package/security/resources/one-time-token/model.js +36 -0
  122. package/security/resources/permission/model.d.ts +2 -0
  123. package/security/resources/permission/model.js +16 -0
  124. package/security/resources/role/model.d.ts +2 -0
  125. package/security/resources/role/model.js +22 -0
  126. package/security/store/database-security-store.d.ts +5 -0
  127. package/security/store/database-security-store.js +54 -0
  128. package/seeder/create-seeder.d.ts +29 -0
  129. package/seeder/create-seeder.js +28 -0
  130. package/seeder/index.d.ts +2 -0
  131. package/seeder/index.js +18 -0
  132. package/seeder/resources/seeder/model.d.ts +2 -0
  133. package/seeder/resources/seeder/model.js +38 -0
  134. package/seeder/seeder.d.ts +29 -0
  135. package/seeder/seeder.js +197 -0
  136. package/storage/file-service.d.ts +133 -0
  137. package/storage/file-service.js +586 -0
  138. package/storage/image-config.d.ts +3 -0
  139. package/storage/image-config.js +11 -0
  140. package/storage/resources/file/model.d.ts +2 -0
  141. package/storage/resources/file/model.js +80 -0
  142. package/types/auth.d.ts +23 -0
  143. package/types/auth.js +2 -0
  144. package/types/generated.d.ts +366 -0
  145. package/types/generated.js +3 -0
  146. package/types/storage.d.ts +35 -0
  147. package/types/storage.js +2 -0
  148. package/utils/export-util.d.ts +8 -0
  149. package/utils/export-util.js +26 -0
  150. package/utils/file-util.d.ts +106 -0
  151. package/utils/file-util.js +254 -0
  152. package/utils/model-util.d.ts +36 -0
  153. package/utils/model-util.js +154 -0
  154. package/utils/policy-util.d.ts +18 -0
  155. package/utils/policy-util.js +28 -0
  156. package/utils/virtual-util.d.ts +11 -0
  157. package/utils/virtual-util.js +53 -0
@@ -0,0 +1,1055 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace";
3
+ /**
4
+ * Model OneTimeToken
5
+ *
6
+ */
7
+ export type OneTimeTokenModel = runtime.Types.Result.DefaultSelection<Prisma.$OneTimeTokenPayload>;
8
+ export type AggregateOneTimeToken = {
9
+ _count: OneTimeTokenCountAggregateOutputType | null;
10
+ _avg: OneTimeTokenAvgAggregateOutputType | null;
11
+ _sum: OneTimeTokenSumAggregateOutputType | null;
12
+ _min: OneTimeTokenMinAggregateOutputType | null;
13
+ _max: OneTimeTokenMaxAggregateOutputType | null;
14
+ };
15
+ export type OneTimeTokenAvgAggregateOutputType = {
16
+ id: number | null;
17
+ };
18
+ export type OneTimeTokenSumAggregateOutputType = {
19
+ id: number | null;
20
+ };
21
+ export type OneTimeTokenMinAggregateOutputType = {
22
+ id: number | null;
23
+ tokenHash: string | null;
24
+ purpose: string | null;
25
+ expiresAt: Date | null;
26
+ createdAt: Date | null;
27
+ };
28
+ export type OneTimeTokenMaxAggregateOutputType = {
29
+ id: number | null;
30
+ tokenHash: string | null;
31
+ purpose: string | null;
32
+ expiresAt: Date | null;
33
+ createdAt: Date | null;
34
+ };
35
+ export type OneTimeTokenCountAggregateOutputType = {
36
+ id: number;
37
+ tokenHash: number;
38
+ purpose: number;
39
+ data: number;
40
+ expiresAt: number;
41
+ createdAt: number;
42
+ _all: number;
43
+ };
44
+ export type OneTimeTokenAvgAggregateInputType = {
45
+ id?: true;
46
+ };
47
+ export type OneTimeTokenSumAggregateInputType = {
48
+ id?: true;
49
+ };
50
+ export type OneTimeTokenMinAggregateInputType = {
51
+ id?: true;
52
+ tokenHash?: true;
53
+ purpose?: true;
54
+ expiresAt?: true;
55
+ createdAt?: true;
56
+ };
57
+ export type OneTimeTokenMaxAggregateInputType = {
58
+ id?: true;
59
+ tokenHash?: true;
60
+ purpose?: true;
61
+ expiresAt?: true;
62
+ createdAt?: true;
63
+ };
64
+ export type OneTimeTokenCountAggregateInputType = {
65
+ id?: true;
66
+ tokenHash?: true;
67
+ purpose?: true;
68
+ data?: true;
69
+ expiresAt?: true;
70
+ createdAt?: true;
71
+ _all?: true;
72
+ };
73
+ export type OneTimeTokenAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
74
+ /**
75
+ * Filter which OneTimeToken to aggregate.
76
+ */
77
+ where?: Prisma.OneTimeTokenWhereInput;
78
+ /**
79
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
80
+ *
81
+ * Determine the order of OneTimeTokens to fetch.
82
+ */
83
+ orderBy?: Prisma.OneTimeTokenOrderByWithRelationInput | Prisma.OneTimeTokenOrderByWithRelationInput[];
84
+ /**
85
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
86
+ *
87
+ * Sets the start position
88
+ */
89
+ cursor?: Prisma.OneTimeTokenWhereUniqueInput;
90
+ /**
91
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
92
+ *
93
+ * Take `±n` OneTimeTokens from the position of the cursor.
94
+ */
95
+ take?: number;
96
+ /**
97
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
98
+ *
99
+ * Skip the first `n` OneTimeTokens.
100
+ */
101
+ skip?: number;
102
+ /**
103
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
104
+ *
105
+ * Count returned OneTimeTokens
106
+ **/
107
+ _count?: true | OneTimeTokenCountAggregateInputType;
108
+ /**
109
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
110
+ *
111
+ * Select which fields to average
112
+ **/
113
+ _avg?: OneTimeTokenAvgAggregateInputType;
114
+ /**
115
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
116
+ *
117
+ * Select which fields to sum
118
+ **/
119
+ _sum?: OneTimeTokenSumAggregateInputType;
120
+ /**
121
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
122
+ *
123
+ * Select which fields to find the minimum value
124
+ **/
125
+ _min?: OneTimeTokenMinAggregateInputType;
126
+ /**
127
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
128
+ *
129
+ * Select which fields to find the maximum value
130
+ **/
131
+ _max?: OneTimeTokenMaxAggregateInputType;
132
+ };
133
+ export type GetOneTimeTokenAggregateType<T extends OneTimeTokenAggregateArgs> = {
134
+ [P in keyof T & keyof AggregateOneTimeToken]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateOneTimeToken[P]> : Prisma.GetScalarType<T[P], AggregateOneTimeToken[P]>;
135
+ };
136
+ export type OneTimeTokenGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
137
+ where?: Prisma.OneTimeTokenWhereInput;
138
+ orderBy?: Prisma.OneTimeTokenOrderByWithAggregationInput | Prisma.OneTimeTokenOrderByWithAggregationInput[];
139
+ by: Prisma.OneTimeTokenScalarFieldEnum[] | Prisma.OneTimeTokenScalarFieldEnum;
140
+ having?: Prisma.OneTimeTokenScalarWhereWithAggregatesInput;
141
+ take?: number;
142
+ skip?: number;
143
+ _count?: OneTimeTokenCountAggregateInputType | true;
144
+ _avg?: OneTimeTokenAvgAggregateInputType;
145
+ _sum?: OneTimeTokenSumAggregateInputType;
146
+ _min?: OneTimeTokenMinAggregateInputType;
147
+ _max?: OneTimeTokenMaxAggregateInputType;
148
+ };
149
+ export type OneTimeTokenGroupByOutputType = {
150
+ id: number;
151
+ tokenHash: string;
152
+ purpose: string;
153
+ data: runtime.JsonValue;
154
+ expiresAt: Date;
155
+ createdAt: Date;
156
+ _count: OneTimeTokenCountAggregateOutputType | null;
157
+ _avg: OneTimeTokenAvgAggregateOutputType | null;
158
+ _sum: OneTimeTokenSumAggregateOutputType | null;
159
+ _min: OneTimeTokenMinAggregateOutputType | null;
160
+ _max: OneTimeTokenMaxAggregateOutputType | null;
161
+ };
162
+ export type GetOneTimeTokenGroupByPayload<T extends OneTimeTokenGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<OneTimeTokenGroupByOutputType, T['by']> & {
163
+ [P in ((keyof T) & (keyof OneTimeTokenGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], OneTimeTokenGroupByOutputType[P]> : Prisma.GetScalarType<T[P], OneTimeTokenGroupByOutputType[P]>;
164
+ }>>;
165
+ export type OneTimeTokenWhereInput = {
166
+ AND?: Prisma.OneTimeTokenWhereInput | Prisma.OneTimeTokenWhereInput[];
167
+ OR?: Prisma.OneTimeTokenWhereInput[];
168
+ NOT?: Prisma.OneTimeTokenWhereInput | Prisma.OneTimeTokenWhereInput[];
169
+ id?: Prisma.IntFilter<"OneTimeToken"> | number;
170
+ tokenHash?: Prisma.StringFilter<"OneTimeToken"> | string;
171
+ purpose?: Prisma.StringFilter<"OneTimeToken"> | string;
172
+ data?: Prisma.JsonFilter<"OneTimeToken">;
173
+ expiresAt?: Prisma.DateTimeFilter<"OneTimeToken"> | Date | string;
174
+ createdAt?: Prisma.DateTimeFilter<"OneTimeToken"> | Date | string;
175
+ };
176
+ export type OneTimeTokenOrderByWithRelationInput = {
177
+ id?: Prisma.SortOrder;
178
+ tokenHash?: Prisma.SortOrder;
179
+ purpose?: Prisma.SortOrder;
180
+ data?: Prisma.SortOrder;
181
+ expiresAt?: Prisma.SortOrder;
182
+ createdAt?: Prisma.SortOrder;
183
+ };
184
+ export type OneTimeTokenWhereUniqueInput = Prisma.AtLeast<{
185
+ id?: number;
186
+ tokenHash?: string;
187
+ AND?: Prisma.OneTimeTokenWhereInput | Prisma.OneTimeTokenWhereInput[];
188
+ OR?: Prisma.OneTimeTokenWhereInput[];
189
+ NOT?: Prisma.OneTimeTokenWhereInput | Prisma.OneTimeTokenWhereInput[];
190
+ purpose?: Prisma.StringFilter<"OneTimeToken"> | string;
191
+ data?: Prisma.JsonFilter<"OneTimeToken">;
192
+ expiresAt?: Prisma.DateTimeFilter<"OneTimeToken"> | Date | string;
193
+ createdAt?: Prisma.DateTimeFilter<"OneTimeToken"> | Date | string;
194
+ }, "id" | "tokenHash">;
195
+ export type OneTimeTokenOrderByWithAggregationInput = {
196
+ id?: Prisma.SortOrder;
197
+ tokenHash?: Prisma.SortOrder;
198
+ purpose?: Prisma.SortOrder;
199
+ data?: Prisma.SortOrder;
200
+ expiresAt?: Prisma.SortOrder;
201
+ createdAt?: Prisma.SortOrder;
202
+ _count?: Prisma.OneTimeTokenCountOrderByAggregateInput;
203
+ _avg?: Prisma.OneTimeTokenAvgOrderByAggregateInput;
204
+ _max?: Prisma.OneTimeTokenMaxOrderByAggregateInput;
205
+ _min?: Prisma.OneTimeTokenMinOrderByAggregateInput;
206
+ _sum?: Prisma.OneTimeTokenSumOrderByAggregateInput;
207
+ };
208
+ export type OneTimeTokenScalarWhereWithAggregatesInput = {
209
+ AND?: Prisma.OneTimeTokenScalarWhereWithAggregatesInput | Prisma.OneTimeTokenScalarWhereWithAggregatesInput[];
210
+ OR?: Prisma.OneTimeTokenScalarWhereWithAggregatesInput[];
211
+ NOT?: Prisma.OneTimeTokenScalarWhereWithAggregatesInput | Prisma.OneTimeTokenScalarWhereWithAggregatesInput[];
212
+ id?: Prisma.IntWithAggregatesFilter<"OneTimeToken"> | number;
213
+ tokenHash?: Prisma.StringWithAggregatesFilter<"OneTimeToken"> | string;
214
+ purpose?: Prisma.StringWithAggregatesFilter<"OneTimeToken"> | string;
215
+ data?: Prisma.JsonWithAggregatesFilter<"OneTimeToken">;
216
+ expiresAt?: Prisma.DateTimeWithAggregatesFilter<"OneTimeToken"> | Date | string;
217
+ createdAt?: Prisma.DateTimeWithAggregatesFilter<"OneTimeToken"> | Date | string;
218
+ };
219
+ export type OneTimeTokenCreateInput = {
220
+ tokenHash: string;
221
+ purpose: string;
222
+ data: Prisma.JsonNullValueInput | runtime.InputJsonValue;
223
+ expiresAt: Date | string;
224
+ createdAt?: Date | string;
225
+ };
226
+ export type OneTimeTokenUncheckedCreateInput = {
227
+ id?: number;
228
+ tokenHash: string;
229
+ purpose: string;
230
+ data: Prisma.JsonNullValueInput | runtime.InputJsonValue;
231
+ expiresAt: Date | string;
232
+ createdAt?: Date | string;
233
+ };
234
+ export type OneTimeTokenUpdateInput = {
235
+ tokenHash?: Prisma.StringFieldUpdateOperationsInput | string;
236
+ purpose?: Prisma.StringFieldUpdateOperationsInput | string;
237
+ data?: Prisma.JsonNullValueInput | runtime.InputJsonValue;
238
+ expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
239
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
240
+ };
241
+ export type OneTimeTokenUncheckedUpdateInput = {
242
+ id?: Prisma.IntFieldUpdateOperationsInput | number;
243
+ tokenHash?: Prisma.StringFieldUpdateOperationsInput | string;
244
+ purpose?: Prisma.StringFieldUpdateOperationsInput | string;
245
+ data?: Prisma.JsonNullValueInput | runtime.InputJsonValue;
246
+ expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
247
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
248
+ };
249
+ export type OneTimeTokenCreateManyInput = {
250
+ id?: number;
251
+ tokenHash: string;
252
+ purpose: string;
253
+ data: Prisma.JsonNullValueInput | runtime.InputJsonValue;
254
+ expiresAt: Date | string;
255
+ createdAt?: Date | string;
256
+ };
257
+ export type OneTimeTokenUpdateManyMutationInput = {
258
+ tokenHash?: Prisma.StringFieldUpdateOperationsInput | string;
259
+ purpose?: Prisma.StringFieldUpdateOperationsInput | string;
260
+ data?: Prisma.JsonNullValueInput | runtime.InputJsonValue;
261
+ expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
262
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
263
+ };
264
+ export type OneTimeTokenUncheckedUpdateManyInput = {
265
+ id?: Prisma.IntFieldUpdateOperationsInput | number;
266
+ tokenHash?: Prisma.StringFieldUpdateOperationsInput | string;
267
+ purpose?: Prisma.StringFieldUpdateOperationsInput | string;
268
+ data?: Prisma.JsonNullValueInput | runtime.InputJsonValue;
269
+ expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
270
+ createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
271
+ };
272
+ export type OneTimeTokenCountOrderByAggregateInput = {
273
+ id?: Prisma.SortOrder;
274
+ tokenHash?: Prisma.SortOrder;
275
+ purpose?: Prisma.SortOrder;
276
+ data?: Prisma.SortOrder;
277
+ expiresAt?: Prisma.SortOrder;
278
+ createdAt?: Prisma.SortOrder;
279
+ };
280
+ export type OneTimeTokenAvgOrderByAggregateInput = {
281
+ id?: Prisma.SortOrder;
282
+ };
283
+ export type OneTimeTokenMaxOrderByAggregateInput = {
284
+ id?: Prisma.SortOrder;
285
+ tokenHash?: Prisma.SortOrder;
286
+ purpose?: Prisma.SortOrder;
287
+ expiresAt?: Prisma.SortOrder;
288
+ createdAt?: Prisma.SortOrder;
289
+ };
290
+ export type OneTimeTokenMinOrderByAggregateInput = {
291
+ id?: Prisma.SortOrder;
292
+ tokenHash?: Prisma.SortOrder;
293
+ purpose?: Prisma.SortOrder;
294
+ expiresAt?: Prisma.SortOrder;
295
+ createdAt?: Prisma.SortOrder;
296
+ };
297
+ export type OneTimeTokenSumOrderByAggregateInput = {
298
+ id?: Prisma.SortOrder;
299
+ };
300
+ export type OneTimeTokenSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
301
+ id?: boolean;
302
+ tokenHash?: boolean;
303
+ purpose?: boolean;
304
+ data?: boolean;
305
+ expiresAt?: boolean;
306
+ createdAt?: boolean;
307
+ }, ExtArgs["result"]["oneTimeToken"]>;
308
+ export type OneTimeTokenSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
309
+ id?: boolean;
310
+ tokenHash?: boolean;
311
+ purpose?: boolean;
312
+ data?: boolean;
313
+ expiresAt?: boolean;
314
+ createdAt?: boolean;
315
+ }, ExtArgs["result"]["oneTimeToken"]>;
316
+ export type OneTimeTokenSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
317
+ id?: boolean;
318
+ tokenHash?: boolean;
319
+ purpose?: boolean;
320
+ data?: boolean;
321
+ expiresAt?: boolean;
322
+ createdAt?: boolean;
323
+ }, ExtArgs["result"]["oneTimeToken"]>;
324
+ export type OneTimeTokenSelectScalar = {
325
+ id?: boolean;
326
+ tokenHash?: boolean;
327
+ purpose?: boolean;
328
+ data?: boolean;
329
+ expiresAt?: boolean;
330
+ createdAt?: boolean;
331
+ };
332
+ export type OneTimeTokenOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "tokenHash" | "purpose" | "data" | "expiresAt" | "createdAt", ExtArgs["result"]["oneTimeToken"]>;
333
+ export type $OneTimeTokenPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
334
+ name: "OneTimeToken";
335
+ objects: {};
336
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
337
+ id: number;
338
+ tokenHash: string;
339
+ purpose: string;
340
+ data: runtime.JsonValue;
341
+ expiresAt: Date;
342
+ /**
343
+ * Audit columns
344
+ */
345
+ createdAt: Date;
346
+ }, ExtArgs["result"]["oneTimeToken"]>;
347
+ composites: {};
348
+ };
349
+ export type OneTimeTokenGetPayload<S extends boolean | null | undefined | OneTimeTokenDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload, S>;
350
+ export type OneTimeTokenCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<OneTimeTokenFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
351
+ select?: OneTimeTokenCountAggregateInputType | true;
352
+ };
353
+ export interface OneTimeTokenDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
354
+ [K: symbol]: {
355
+ types: Prisma.TypeMap<ExtArgs>['model']['OneTimeToken'];
356
+ meta: {
357
+ name: 'OneTimeToken';
358
+ };
359
+ };
360
+ /**
361
+ * Find zero or one OneTimeToken that matches the filter.
362
+ * @param {OneTimeTokenFindUniqueArgs} args - Arguments to find a OneTimeToken
363
+ * @example
364
+ * // Get one OneTimeToken
365
+ * const oneTimeToken = await prisma.oneTimeToken.findUnique({
366
+ * where: {
367
+ * // ... provide filter here
368
+ * }
369
+ * })
370
+ */
371
+ findUnique<T extends OneTimeTokenFindUniqueArgs>(args: Prisma.SelectSubset<T, OneTimeTokenFindUniqueArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
372
+ /**
373
+ * Find one OneTimeToken that matches the filter or throw an error with `error.code='P2025'`
374
+ * if no matches were found.
375
+ * @param {OneTimeTokenFindUniqueOrThrowArgs} args - Arguments to find a OneTimeToken
376
+ * @example
377
+ * // Get one OneTimeToken
378
+ * const oneTimeToken = await prisma.oneTimeToken.findUniqueOrThrow({
379
+ * where: {
380
+ * // ... provide filter here
381
+ * }
382
+ * })
383
+ */
384
+ findUniqueOrThrow<T extends OneTimeTokenFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, OneTimeTokenFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
385
+ /**
386
+ * Find the first OneTimeToken that matches the filter.
387
+ * Note, that providing `undefined` is treated as the value not being there.
388
+ * Read more here: https://pris.ly/d/null-undefined
389
+ * @param {OneTimeTokenFindFirstArgs} args - Arguments to find a OneTimeToken
390
+ * @example
391
+ * // Get one OneTimeToken
392
+ * const oneTimeToken = await prisma.oneTimeToken.findFirst({
393
+ * where: {
394
+ * // ... provide filter here
395
+ * }
396
+ * })
397
+ */
398
+ findFirst<T extends OneTimeTokenFindFirstArgs>(args?: Prisma.SelectSubset<T, OneTimeTokenFindFirstArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
399
+ /**
400
+ * Find the first OneTimeToken that matches the filter or
401
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
402
+ * Note, that providing `undefined` is treated as the value not being there.
403
+ * Read more here: https://pris.ly/d/null-undefined
404
+ * @param {OneTimeTokenFindFirstOrThrowArgs} args - Arguments to find a OneTimeToken
405
+ * @example
406
+ * // Get one OneTimeToken
407
+ * const oneTimeToken = await prisma.oneTimeToken.findFirstOrThrow({
408
+ * where: {
409
+ * // ... provide filter here
410
+ * }
411
+ * })
412
+ */
413
+ findFirstOrThrow<T extends OneTimeTokenFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, OneTimeTokenFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
414
+ /**
415
+ * Find zero or more OneTimeTokens that matches the filter.
416
+ * Note, that providing `undefined` is treated as the value not being there.
417
+ * Read more here: https://pris.ly/d/null-undefined
418
+ * @param {OneTimeTokenFindManyArgs} args - Arguments to filter and select certain fields only.
419
+ * @example
420
+ * // Get all OneTimeTokens
421
+ * const oneTimeTokens = await prisma.oneTimeToken.findMany()
422
+ *
423
+ * // Get first 10 OneTimeTokens
424
+ * const oneTimeTokens = await prisma.oneTimeToken.findMany({ take: 10 })
425
+ *
426
+ * // Only select the `id`
427
+ * const oneTimeTokenWithIdOnly = await prisma.oneTimeToken.findMany({ select: { id: true } })
428
+ *
429
+ */
430
+ findMany<T extends OneTimeTokenFindManyArgs>(args?: Prisma.SelectSubset<T, OneTimeTokenFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
431
+ /**
432
+ * Create a OneTimeToken.
433
+ * @param {OneTimeTokenCreateArgs} args - Arguments to create a OneTimeToken.
434
+ * @example
435
+ * // Create one OneTimeToken
436
+ * const OneTimeToken = await prisma.oneTimeToken.create({
437
+ * data: {
438
+ * // ... data to create a OneTimeToken
439
+ * }
440
+ * })
441
+ *
442
+ */
443
+ create<T extends OneTimeTokenCreateArgs>(args: Prisma.SelectSubset<T, OneTimeTokenCreateArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
444
+ /**
445
+ * Create many OneTimeTokens.
446
+ * @param {OneTimeTokenCreateManyArgs} args - Arguments to create many OneTimeTokens.
447
+ * @example
448
+ * // Create many OneTimeTokens
449
+ * const oneTimeToken = await prisma.oneTimeToken.createMany({
450
+ * data: [
451
+ * // ... provide data here
452
+ * ]
453
+ * })
454
+ *
455
+ */
456
+ createMany<T extends OneTimeTokenCreateManyArgs>(args?: Prisma.SelectSubset<T, OneTimeTokenCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
457
+ /**
458
+ * Create many OneTimeTokens and returns the data saved in the database.
459
+ * @param {OneTimeTokenCreateManyAndReturnArgs} args - Arguments to create many OneTimeTokens.
460
+ * @example
461
+ * // Create many OneTimeTokens
462
+ * const oneTimeToken = await prisma.oneTimeToken.createManyAndReturn({
463
+ * data: [
464
+ * // ... provide data here
465
+ * ]
466
+ * })
467
+ *
468
+ * // Create many OneTimeTokens and only return the `id`
469
+ * const oneTimeTokenWithIdOnly = await prisma.oneTimeToken.createManyAndReturn({
470
+ * select: { id: true },
471
+ * data: [
472
+ * // ... provide data here
473
+ * ]
474
+ * })
475
+ * Note, that providing `undefined` is treated as the value not being there.
476
+ * Read more here: https://pris.ly/d/null-undefined
477
+ *
478
+ */
479
+ createManyAndReturn<T extends OneTimeTokenCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, OneTimeTokenCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
480
+ /**
481
+ * Delete a OneTimeToken.
482
+ * @param {OneTimeTokenDeleteArgs} args - Arguments to delete one OneTimeToken.
483
+ * @example
484
+ * // Delete one OneTimeToken
485
+ * const OneTimeToken = await prisma.oneTimeToken.delete({
486
+ * where: {
487
+ * // ... filter to delete one OneTimeToken
488
+ * }
489
+ * })
490
+ *
491
+ */
492
+ delete<T extends OneTimeTokenDeleteArgs>(args: Prisma.SelectSubset<T, OneTimeTokenDeleteArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
493
+ /**
494
+ * Update one OneTimeToken.
495
+ * @param {OneTimeTokenUpdateArgs} args - Arguments to update one OneTimeToken.
496
+ * @example
497
+ * // Update one OneTimeToken
498
+ * const oneTimeToken = await prisma.oneTimeToken.update({
499
+ * where: {
500
+ * // ... provide filter here
501
+ * },
502
+ * data: {
503
+ * // ... provide data here
504
+ * }
505
+ * })
506
+ *
507
+ */
508
+ update<T extends OneTimeTokenUpdateArgs>(args: Prisma.SelectSubset<T, OneTimeTokenUpdateArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
509
+ /**
510
+ * Delete zero or more OneTimeTokens.
511
+ * @param {OneTimeTokenDeleteManyArgs} args - Arguments to filter OneTimeTokens to delete.
512
+ * @example
513
+ * // Delete a few OneTimeTokens
514
+ * const { count } = await prisma.oneTimeToken.deleteMany({
515
+ * where: {
516
+ * // ... provide filter here
517
+ * }
518
+ * })
519
+ *
520
+ */
521
+ deleteMany<T extends OneTimeTokenDeleteManyArgs>(args?: Prisma.SelectSubset<T, OneTimeTokenDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
522
+ /**
523
+ * Update zero or more OneTimeTokens.
524
+ * Note, that providing `undefined` is treated as the value not being there.
525
+ * Read more here: https://pris.ly/d/null-undefined
526
+ * @param {OneTimeTokenUpdateManyArgs} args - Arguments to update one or more rows.
527
+ * @example
528
+ * // Update many OneTimeTokens
529
+ * const oneTimeToken = await prisma.oneTimeToken.updateMany({
530
+ * where: {
531
+ * // ... provide filter here
532
+ * },
533
+ * data: {
534
+ * // ... provide data here
535
+ * }
536
+ * })
537
+ *
538
+ */
539
+ updateMany<T extends OneTimeTokenUpdateManyArgs>(args: Prisma.SelectSubset<T, OneTimeTokenUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
540
+ /**
541
+ * Update zero or more OneTimeTokens and returns the data updated in the database.
542
+ * @param {OneTimeTokenUpdateManyAndReturnArgs} args - Arguments to update many OneTimeTokens.
543
+ * @example
544
+ * // Update many OneTimeTokens
545
+ * const oneTimeToken = await prisma.oneTimeToken.updateManyAndReturn({
546
+ * where: {
547
+ * // ... provide filter here
548
+ * },
549
+ * data: [
550
+ * // ... provide data here
551
+ * ]
552
+ * })
553
+ *
554
+ * // Update zero or more OneTimeTokens and only return the `id`
555
+ * const oneTimeTokenWithIdOnly = await prisma.oneTimeToken.updateManyAndReturn({
556
+ * select: { id: true },
557
+ * where: {
558
+ * // ... provide filter here
559
+ * },
560
+ * data: [
561
+ * // ... provide data here
562
+ * ]
563
+ * })
564
+ * Note, that providing `undefined` is treated as the value not being there.
565
+ * Read more here: https://pris.ly/d/null-undefined
566
+ *
567
+ */
568
+ updateManyAndReturn<T extends OneTimeTokenUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, OneTimeTokenUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
569
+ /**
570
+ * Create or update one OneTimeToken.
571
+ * @param {OneTimeTokenUpsertArgs} args - Arguments to update or create a OneTimeToken.
572
+ * @example
573
+ * // Update or create a OneTimeToken
574
+ * const oneTimeToken = await prisma.oneTimeToken.upsert({
575
+ * create: {
576
+ * // ... data to create a OneTimeToken
577
+ * },
578
+ * update: {
579
+ * // ... in case it already exists, update
580
+ * },
581
+ * where: {
582
+ * // ... the filter for the OneTimeToken we want to update
583
+ * }
584
+ * })
585
+ */
586
+ upsert<T extends OneTimeTokenUpsertArgs>(args: Prisma.SelectSubset<T, OneTimeTokenUpsertArgs<ExtArgs>>): Prisma.Prisma__OneTimeTokenClient<runtime.Types.Result.GetResult<Prisma.$OneTimeTokenPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
587
+ /**
588
+ * Count the number of OneTimeTokens.
589
+ * Note, that providing `undefined` is treated as the value not being there.
590
+ * Read more here: https://pris.ly/d/null-undefined
591
+ * @param {OneTimeTokenCountArgs} args - Arguments to filter OneTimeTokens to count.
592
+ * @example
593
+ * // Count the number of OneTimeTokens
594
+ * const count = await prisma.oneTimeToken.count({
595
+ * where: {
596
+ * // ... the filter for the OneTimeTokens we want to count
597
+ * }
598
+ * })
599
+ **/
600
+ count<T extends OneTimeTokenCountArgs>(args?: Prisma.Subset<T, OneTimeTokenCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], OneTimeTokenCountAggregateOutputType> : number>;
601
+ /**
602
+ * Allows you to perform aggregations operations on a OneTimeToken.
603
+ * Note, that providing `undefined` is treated as the value not being there.
604
+ * Read more here: https://pris.ly/d/null-undefined
605
+ * @param {OneTimeTokenAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
606
+ * @example
607
+ * // Ordered by age ascending
608
+ * // Where email contains prisma.io
609
+ * // Limited to the 10 users
610
+ * const aggregations = await prisma.user.aggregate({
611
+ * _avg: {
612
+ * age: true,
613
+ * },
614
+ * where: {
615
+ * email: {
616
+ * contains: "prisma.io",
617
+ * },
618
+ * },
619
+ * orderBy: {
620
+ * age: "asc",
621
+ * },
622
+ * take: 10,
623
+ * })
624
+ **/
625
+ aggregate<T extends OneTimeTokenAggregateArgs>(args: Prisma.Subset<T, OneTimeTokenAggregateArgs>): Prisma.PrismaPromise<GetOneTimeTokenAggregateType<T>>;
626
+ /**
627
+ * Group by OneTimeToken.
628
+ * Note, that providing `undefined` is treated as the value not being there.
629
+ * Read more here: https://pris.ly/d/null-undefined
630
+ * @param {OneTimeTokenGroupByArgs} args - Group by arguments.
631
+ * @example
632
+ * // Group by city, order by createdAt, get count
633
+ * const result = await prisma.user.groupBy({
634
+ * by: ['city', 'createdAt'],
635
+ * orderBy: {
636
+ * createdAt: true
637
+ * },
638
+ * _count: {
639
+ * _all: true
640
+ * },
641
+ * })
642
+ *
643
+ **/
644
+ groupBy<T extends OneTimeTokenGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
645
+ orderBy: OneTimeTokenGroupByArgs['orderBy'];
646
+ } : {
647
+ orderBy?: OneTimeTokenGroupByArgs['orderBy'];
648
+ }, 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 ? {
649
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
650
+ Error,
651
+ 'Field ',
652
+ P,
653
+ ` in "having" needs to be provided in "by"`
654
+ ];
655
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
656
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
657
+ }[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 ? {} : {
658
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
659
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
660
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
661
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, OneTimeTokenGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetOneTimeTokenGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
662
+ /**
663
+ * Fields of the OneTimeToken model
664
+ */
665
+ readonly fields: OneTimeTokenFieldRefs;
666
+ }
667
+ /**
668
+ * The delegate class that acts as a "Promise-like" for OneTimeToken.
669
+ * Why is this prefixed with `Prisma__`?
670
+ * Because we want to prevent naming conflicts as mentioned in
671
+ * https://github.com/prisma/prisma-client-js/issues/707
672
+ */
673
+ export interface Prisma__OneTimeTokenClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
674
+ readonly [Symbol.toStringTag]: "PrismaPromise";
675
+ /**
676
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
677
+ * @param onfulfilled The callback to execute when the Promise is resolved.
678
+ * @param onrejected The callback to execute when the Promise is rejected.
679
+ * @returns A Promise for the completion of which ever callback is executed.
680
+ */
681
+ 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>;
682
+ /**
683
+ * Attaches a callback for only the rejection of the Promise.
684
+ * @param onrejected The callback to execute when the Promise is rejected.
685
+ * @returns A Promise for the completion of the callback.
686
+ */
687
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
688
+ /**
689
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
690
+ * resolved value cannot be modified from the callback.
691
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
692
+ * @returns A Promise for the completion of the callback.
693
+ */
694
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
695
+ }
696
+ /**
697
+ * Fields of the OneTimeToken model
698
+ */
699
+ export interface OneTimeTokenFieldRefs {
700
+ readonly id: Prisma.FieldRef<"OneTimeToken", 'Int'>;
701
+ readonly tokenHash: Prisma.FieldRef<"OneTimeToken", 'String'>;
702
+ readonly purpose: Prisma.FieldRef<"OneTimeToken", 'String'>;
703
+ readonly data: Prisma.FieldRef<"OneTimeToken", 'Json'>;
704
+ readonly expiresAt: Prisma.FieldRef<"OneTimeToken", 'DateTime'>;
705
+ readonly createdAt: Prisma.FieldRef<"OneTimeToken", 'DateTime'>;
706
+ }
707
+ /**
708
+ * OneTimeToken findUnique
709
+ */
710
+ export type OneTimeTokenFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
711
+ /**
712
+ * Select specific fields to fetch from the OneTimeToken
713
+ */
714
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
715
+ /**
716
+ * Omit specific fields from the OneTimeToken
717
+ */
718
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
719
+ /**
720
+ * Filter, which OneTimeToken to fetch.
721
+ */
722
+ where: Prisma.OneTimeTokenWhereUniqueInput;
723
+ };
724
+ /**
725
+ * OneTimeToken findUniqueOrThrow
726
+ */
727
+ export type OneTimeTokenFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
728
+ /**
729
+ * Select specific fields to fetch from the OneTimeToken
730
+ */
731
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
732
+ /**
733
+ * Omit specific fields from the OneTimeToken
734
+ */
735
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
736
+ /**
737
+ * Filter, which OneTimeToken to fetch.
738
+ */
739
+ where: Prisma.OneTimeTokenWhereUniqueInput;
740
+ };
741
+ /**
742
+ * OneTimeToken findFirst
743
+ */
744
+ export type OneTimeTokenFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
745
+ /**
746
+ * Select specific fields to fetch from the OneTimeToken
747
+ */
748
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
749
+ /**
750
+ * Omit specific fields from the OneTimeToken
751
+ */
752
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
753
+ /**
754
+ * Filter, which OneTimeToken to fetch.
755
+ */
756
+ where?: Prisma.OneTimeTokenWhereInput;
757
+ /**
758
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
759
+ *
760
+ * Determine the order of OneTimeTokens to fetch.
761
+ */
762
+ orderBy?: Prisma.OneTimeTokenOrderByWithRelationInput | Prisma.OneTimeTokenOrderByWithRelationInput[];
763
+ /**
764
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
765
+ *
766
+ * Sets the position for searching for OneTimeTokens.
767
+ */
768
+ cursor?: Prisma.OneTimeTokenWhereUniqueInput;
769
+ /**
770
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
771
+ *
772
+ * Take `±n` OneTimeTokens from the position of the cursor.
773
+ */
774
+ take?: number;
775
+ /**
776
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
777
+ *
778
+ * Skip the first `n` OneTimeTokens.
779
+ */
780
+ skip?: number;
781
+ /**
782
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
783
+ *
784
+ * Filter by unique combinations of OneTimeTokens.
785
+ */
786
+ distinct?: Prisma.OneTimeTokenScalarFieldEnum | Prisma.OneTimeTokenScalarFieldEnum[];
787
+ };
788
+ /**
789
+ * OneTimeToken findFirstOrThrow
790
+ */
791
+ export type OneTimeTokenFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
792
+ /**
793
+ * Select specific fields to fetch from the OneTimeToken
794
+ */
795
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
796
+ /**
797
+ * Omit specific fields from the OneTimeToken
798
+ */
799
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
800
+ /**
801
+ * Filter, which OneTimeToken to fetch.
802
+ */
803
+ where?: Prisma.OneTimeTokenWhereInput;
804
+ /**
805
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
806
+ *
807
+ * Determine the order of OneTimeTokens to fetch.
808
+ */
809
+ orderBy?: Prisma.OneTimeTokenOrderByWithRelationInput | Prisma.OneTimeTokenOrderByWithRelationInput[];
810
+ /**
811
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
812
+ *
813
+ * Sets the position for searching for OneTimeTokens.
814
+ */
815
+ cursor?: Prisma.OneTimeTokenWhereUniqueInput;
816
+ /**
817
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
818
+ *
819
+ * Take `±n` OneTimeTokens from the position of the cursor.
820
+ */
821
+ take?: number;
822
+ /**
823
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
824
+ *
825
+ * Skip the first `n` OneTimeTokens.
826
+ */
827
+ skip?: number;
828
+ /**
829
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
830
+ *
831
+ * Filter by unique combinations of OneTimeTokens.
832
+ */
833
+ distinct?: Prisma.OneTimeTokenScalarFieldEnum | Prisma.OneTimeTokenScalarFieldEnum[];
834
+ };
835
+ /**
836
+ * OneTimeToken findMany
837
+ */
838
+ export type OneTimeTokenFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
839
+ /**
840
+ * Select specific fields to fetch from the OneTimeToken
841
+ */
842
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
843
+ /**
844
+ * Omit specific fields from the OneTimeToken
845
+ */
846
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
847
+ /**
848
+ * Filter, which OneTimeTokens to fetch.
849
+ */
850
+ where?: Prisma.OneTimeTokenWhereInput;
851
+ /**
852
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
853
+ *
854
+ * Determine the order of OneTimeTokens to fetch.
855
+ */
856
+ orderBy?: Prisma.OneTimeTokenOrderByWithRelationInput | Prisma.OneTimeTokenOrderByWithRelationInput[];
857
+ /**
858
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
859
+ *
860
+ * Sets the position for listing OneTimeTokens.
861
+ */
862
+ cursor?: Prisma.OneTimeTokenWhereUniqueInput;
863
+ /**
864
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
865
+ *
866
+ * Take `±n` OneTimeTokens from the position of the cursor.
867
+ */
868
+ take?: number;
869
+ /**
870
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
871
+ *
872
+ * Skip the first `n` OneTimeTokens.
873
+ */
874
+ skip?: number;
875
+ /**
876
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
877
+ *
878
+ * Filter by unique combinations of OneTimeTokens.
879
+ */
880
+ distinct?: Prisma.OneTimeTokenScalarFieldEnum | Prisma.OneTimeTokenScalarFieldEnum[];
881
+ };
882
+ /**
883
+ * OneTimeToken create
884
+ */
885
+ export type OneTimeTokenCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
886
+ /**
887
+ * Select specific fields to fetch from the OneTimeToken
888
+ */
889
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
890
+ /**
891
+ * Omit specific fields from the OneTimeToken
892
+ */
893
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
894
+ /**
895
+ * The data needed to create a OneTimeToken.
896
+ */
897
+ data: Prisma.XOR<Prisma.OneTimeTokenCreateInput, Prisma.OneTimeTokenUncheckedCreateInput>;
898
+ };
899
+ /**
900
+ * OneTimeToken createMany
901
+ */
902
+ export type OneTimeTokenCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
903
+ /**
904
+ * The data used to create many OneTimeTokens.
905
+ */
906
+ data: Prisma.OneTimeTokenCreateManyInput | Prisma.OneTimeTokenCreateManyInput[];
907
+ };
908
+ /**
909
+ * OneTimeToken createManyAndReturn
910
+ */
911
+ export type OneTimeTokenCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
912
+ /**
913
+ * Select specific fields to fetch from the OneTimeToken
914
+ */
915
+ select?: Prisma.OneTimeTokenSelectCreateManyAndReturn<ExtArgs> | null;
916
+ /**
917
+ * Omit specific fields from the OneTimeToken
918
+ */
919
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
920
+ /**
921
+ * The data used to create many OneTimeTokens.
922
+ */
923
+ data: Prisma.OneTimeTokenCreateManyInput | Prisma.OneTimeTokenCreateManyInput[];
924
+ };
925
+ /**
926
+ * OneTimeToken update
927
+ */
928
+ export type OneTimeTokenUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
929
+ /**
930
+ * Select specific fields to fetch from the OneTimeToken
931
+ */
932
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
933
+ /**
934
+ * Omit specific fields from the OneTimeToken
935
+ */
936
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
937
+ /**
938
+ * The data needed to update a OneTimeToken.
939
+ */
940
+ data: Prisma.XOR<Prisma.OneTimeTokenUpdateInput, Prisma.OneTimeTokenUncheckedUpdateInput>;
941
+ /**
942
+ * Choose, which OneTimeToken to update.
943
+ */
944
+ where: Prisma.OneTimeTokenWhereUniqueInput;
945
+ };
946
+ /**
947
+ * OneTimeToken updateMany
948
+ */
949
+ export type OneTimeTokenUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
950
+ /**
951
+ * The data used to update OneTimeTokens.
952
+ */
953
+ data: Prisma.XOR<Prisma.OneTimeTokenUpdateManyMutationInput, Prisma.OneTimeTokenUncheckedUpdateManyInput>;
954
+ /**
955
+ * Filter which OneTimeTokens to update
956
+ */
957
+ where?: Prisma.OneTimeTokenWhereInput;
958
+ /**
959
+ * Limit how many OneTimeTokens to update.
960
+ */
961
+ limit?: number;
962
+ };
963
+ /**
964
+ * OneTimeToken updateManyAndReturn
965
+ */
966
+ export type OneTimeTokenUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
967
+ /**
968
+ * Select specific fields to fetch from the OneTimeToken
969
+ */
970
+ select?: Prisma.OneTimeTokenSelectUpdateManyAndReturn<ExtArgs> | null;
971
+ /**
972
+ * Omit specific fields from the OneTimeToken
973
+ */
974
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
975
+ /**
976
+ * The data used to update OneTimeTokens.
977
+ */
978
+ data: Prisma.XOR<Prisma.OneTimeTokenUpdateManyMutationInput, Prisma.OneTimeTokenUncheckedUpdateManyInput>;
979
+ /**
980
+ * Filter which OneTimeTokens to update
981
+ */
982
+ where?: Prisma.OneTimeTokenWhereInput;
983
+ /**
984
+ * Limit how many OneTimeTokens to update.
985
+ */
986
+ limit?: number;
987
+ };
988
+ /**
989
+ * OneTimeToken upsert
990
+ */
991
+ export type OneTimeTokenUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
992
+ /**
993
+ * Select specific fields to fetch from the OneTimeToken
994
+ */
995
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
996
+ /**
997
+ * Omit specific fields from the OneTimeToken
998
+ */
999
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
1000
+ /**
1001
+ * The filter to search for the OneTimeToken to update in case it exists.
1002
+ */
1003
+ where: Prisma.OneTimeTokenWhereUniqueInput;
1004
+ /**
1005
+ * In case the OneTimeToken found by the `where` argument doesn't exist, create a new OneTimeToken with this data.
1006
+ */
1007
+ create: Prisma.XOR<Prisma.OneTimeTokenCreateInput, Prisma.OneTimeTokenUncheckedCreateInput>;
1008
+ /**
1009
+ * In case the OneTimeToken was found with the provided `where` argument, update it with this data.
1010
+ */
1011
+ update: Prisma.XOR<Prisma.OneTimeTokenUpdateInput, Prisma.OneTimeTokenUncheckedUpdateInput>;
1012
+ };
1013
+ /**
1014
+ * OneTimeToken delete
1015
+ */
1016
+ export type OneTimeTokenDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1017
+ /**
1018
+ * Select specific fields to fetch from the OneTimeToken
1019
+ */
1020
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
1021
+ /**
1022
+ * Omit specific fields from the OneTimeToken
1023
+ */
1024
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
1025
+ /**
1026
+ * Filter which OneTimeToken to delete.
1027
+ */
1028
+ where: Prisma.OneTimeTokenWhereUniqueInput;
1029
+ };
1030
+ /**
1031
+ * OneTimeToken deleteMany
1032
+ */
1033
+ export type OneTimeTokenDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1034
+ /**
1035
+ * Filter which OneTimeTokens to delete
1036
+ */
1037
+ where?: Prisma.OneTimeTokenWhereInput;
1038
+ /**
1039
+ * Limit how many OneTimeTokens to delete.
1040
+ */
1041
+ limit?: number;
1042
+ };
1043
+ /**
1044
+ * OneTimeToken without action
1045
+ */
1046
+ export type OneTimeTokenDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1047
+ /**
1048
+ * Select specific fields to fetch from the OneTimeToken
1049
+ */
1050
+ select?: Prisma.OneTimeTokenSelect<ExtArgs> | null;
1051
+ /**
1052
+ * Omit specific fields from the OneTimeToken
1053
+ */
1054
+ omit?: Prisma.OneTimeTokenOmit<ExtArgs> | null;
1055
+ };