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