@cerbos/orm-prisma 3.3.0 → 4.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 (44) hide show
  1. package/README.md +83 -6
  2. package/lib/index.d.ts +29 -2
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +1459 -114
  5. package/lib/index.js.map +1 -1
  6. package/package.json +19 -13
  7. package/src/adversarial.test.ts +586 -0
  8. package/src/generated/prisma/commonInputTypes.ts +26 -0
  9. package/src/generated/prisma/internal/class.ts +9 -9
  10. package/src/generated/prisma/internal/prismaNamespace.ts +89 -19
  11. package/src/generated/prisma/internal/prismaNamespaceBrowser.ts +2 -1
  12. package/src/generated/prisma/models/Category.ts +1 -1
  13. package/src/generated/prisma/models/Label.ts +1 -1
  14. package/src/generated/prisma/models/NestedResource.ts +1 -1
  15. package/src/generated/prisma/models/NextLevelNestedResource.ts +1 -1
  16. package/src/generated/prisma/models/Resource.ts +62 -2
  17. package/src/generated/prisma/models/SubCategory.ts +1 -1
  18. package/src/generated/prisma/models/Tag.ts +1 -1
  19. package/src/generated/prisma/models/User.ts +1 -1
  20. package/src/generated/prisma-adversarial/browser.ts +44 -0
  21. package/src/generated/prisma-adversarial/client.ts +66 -0
  22. package/src/generated/prisma-adversarial/commonInputTypes.ts +352 -0
  23. package/src/generated/prisma-adversarial/enums.ts +15 -0
  24. package/src/generated/prisma-adversarial/internal/class.ts +244 -0
  25. package/src/generated/prisma-adversarial/internal/prismaNamespace.ts +1156 -0
  26. package/src/generated/prisma-adversarial/internal/prismaNamespaceBrowser.ts +140 -0
  27. package/src/generated/prisma-adversarial/models/AdversarialCategory.ts +1401 -0
  28. package/src/generated/prisma-adversarial/models/AdversarialLabel.ts +1272 -0
  29. package/src/generated/prisma-adversarial/models/AdversarialResource.ts +1665 -0
  30. package/src/generated/prisma-adversarial/models/AdversarialSubCategory.ts +1401 -0
  31. package/src/generated/prisma-adversarial/models/AdversarialTag.ts +1307 -0
  32. package/src/generated/prisma-adversarial/models.ts +16 -0
  33. package/src/generated/prisma-adversarial-v6/client.d.ts +1 -0
  34. package/src/generated/prisma-adversarial-v6/default.d.ts +1 -0
  35. package/src/generated/prisma-adversarial-v6/edge.d.ts +1 -0
  36. package/src/generated/prisma-adversarial-v6/index.d.ts +8640 -0
  37. package/src/generated/prisma-adversarial-v6/runtime/index-browser.d.ts +370 -0
  38. package/src/generated/prisma-adversarial-v6/runtime/library.d.ts +3982 -0
  39. package/src/generated/prisma-adversarial-v6/wasm.d.ts +1 -0
  40. package/src/generated/prisma-v6/index.d.ts +90 -3
  41. package/src/index.test.ts +3199 -636
  42. package/src/index.ts +2055 -148
  43. package/src/test-setup.adversarial.v6.ts +5 -0
  44. package/src/test-setup.adversarial.v7.ts +12 -0
@@ -0,0 +1,1272 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file exports the `AdversarialLabel` model and its related types.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+ import type * as runtime from "@prisma/client/runtime/client"
12
+ import type * as $Enums from "../enums.js"
13
+ import type * as Prisma from "../internal/prismaNamespace.js"
14
+
15
+ /**
16
+ * Model AdversarialLabel
17
+ *
18
+ */
19
+ export type AdversarialLabelModel = runtime.Types.Result.DefaultSelection<Prisma.$AdversarialLabelPayload>
20
+
21
+ export type AggregateAdversarialLabel = {
22
+ _count: AdversarialLabelCountAggregateOutputType | null
23
+ _min: AdversarialLabelMinAggregateOutputType | null
24
+ _max: AdversarialLabelMaxAggregateOutputType | null
25
+ }
26
+
27
+ export type AdversarialLabelMinAggregateOutputType = {
28
+ id: string | null
29
+ name: string | null
30
+ subCategoryId: string | null
31
+ }
32
+
33
+ export type AdversarialLabelMaxAggregateOutputType = {
34
+ id: string | null
35
+ name: string | null
36
+ subCategoryId: string | null
37
+ }
38
+
39
+ export type AdversarialLabelCountAggregateOutputType = {
40
+ id: number
41
+ name: number
42
+ subCategoryId: number
43
+ _all: number
44
+ }
45
+
46
+
47
+ export type AdversarialLabelMinAggregateInputType = {
48
+ id?: true
49
+ name?: true
50
+ subCategoryId?: true
51
+ }
52
+
53
+ export type AdversarialLabelMaxAggregateInputType = {
54
+ id?: true
55
+ name?: true
56
+ subCategoryId?: true
57
+ }
58
+
59
+ export type AdversarialLabelCountAggregateInputType = {
60
+ id?: true
61
+ name?: true
62
+ subCategoryId?: true
63
+ _all?: true
64
+ }
65
+
66
+ export type AdversarialLabelAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
67
+ /**
68
+ * Filter which AdversarialLabel to aggregate.
69
+ */
70
+ where?: Prisma.AdversarialLabelWhereInput
71
+ /**
72
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
73
+ *
74
+ * Determine the order of AdversarialLabels to fetch.
75
+ */
76
+ orderBy?: Prisma.AdversarialLabelOrderByWithRelationInput | Prisma.AdversarialLabelOrderByWithRelationInput[]
77
+ /**
78
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
79
+ *
80
+ * Sets the start position
81
+ */
82
+ cursor?: Prisma.AdversarialLabelWhereUniqueInput
83
+ /**
84
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
85
+ *
86
+ * Take `±n` AdversarialLabels from the position of the cursor.
87
+ */
88
+ take?: number
89
+ /**
90
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
91
+ *
92
+ * Skip the first `n` AdversarialLabels.
93
+ */
94
+ skip?: number
95
+ /**
96
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
97
+ *
98
+ * Count returned AdversarialLabels
99
+ **/
100
+ _count?: true | AdversarialLabelCountAggregateInputType
101
+ /**
102
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
103
+ *
104
+ * Select which fields to find the minimum value
105
+ **/
106
+ _min?: AdversarialLabelMinAggregateInputType
107
+ /**
108
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
109
+ *
110
+ * Select which fields to find the maximum value
111
+ **/
112
+ _max?: AdversarialLabelMaxAggregateInputType
113
+ }
114
+
115
+ export type GetAdversarialLabelAggregateType<T extends AdversarialLabelAggregateArgs> = {
116
+ [P in keyof T & keyof AggregateAdversarialLabel]: P extends '_count' | 'count'
117
+ ? T[P] extends true
118
+ ? number
119
+ : Prisma.GetScalarType<T[P], AggregateAdversarialLabel[P]>
120
+ : Prisma.GetScalarType<T[P], AggregateAdversarialLabel[P]>
121
+ }
122
+
123
+
124
+
125
+
126
+ export type AdversarialLabelGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
127
+ where?: Prisma.AdversarialLabelWhereInput
128
+ orderBy?: Prisma.AdversarialLabelOrderByWithAggregationInput | Prisma.AdversarialLabelOrderByWithAggregationInput[]
129
+ by: Prisma.AdversarialLabelScalarFieldEnum[] | Prisma.AdversarialLabelScalarFieldEnum
130
+ having?: Prisma.AdversarialLabelScalarWhereWithAggregatesInput
131
+ take?: number
132
+ skip?: number
133
+ _count?: AdversarialLabelCountAggregateInputType | true
134
+ _min?: AdversarialLabelMinAggregateInputType
135
+ _max?: AdversarialLabelMaxAggregateInputType
136
+ }
137
+
138
+ export type AdversarialLabelGroupByOutputType = {
139
+ id: string
140
+ name: string | null
141
+ subCategoryId: string
142
+ _count: AdversarialLabelCountAggregateOutputType | null
143
+ _min: AdversarialLabelMinAggregateOutputType | null
144
+ _max: AdversarialLabelMaxAggregateOutputType | null
145
+ }
146
+
147
+ export type GetAdversarialLabelGroupByPayload<T extends AdversarialLabelGroupByArgs> = Prisma.PrismaPromise<
148
+ Array<
149
+ Prisma.PickEnumerable<AdversarialLabelGroupByOutputType, T['by']> &
150
+ {
151
+ [P in ((keyof T) & (keyof AdversarialLabelGroupByOutputType))]: P extends '_count'
152
+ ? T[P] extends boolean
153
+ ? number
154
+ : Prisma.GetScalarType<T[P], AdversarialLabelGroupByOutputType[P]>
155
+ : Prisma.GetScalarType<T[P], AdversarialLabelGroupByOutputType[P]>
156
+ }
157
+ >
158
+ >
159
+
160
+
161
+
162
+ export type AdversarialLabelWhereInput = {
163
+ AND?: Prisma.AdversarialLabelWhereInput | Prisma.AdversarialLabelWhereInput[]
164
+ OR?: Prisma.AdversarialLabelWhereInput[]
165
+ NOT?: Prisma.AdversarialLabelWhereInput | Prisma.AdversarialLabelWhereInput[]
166
+ id?: Prisma.StringFilter<"AdversarialLabel"> | string
167
+ name?: Prisma.StringNullableFilter<"AdversarialLabel"> | string | null
168
+ subCategoryId?: Prisma.StringFilter<"AdversarialLabel"> | string
169
+ subCategory?: Prisma.XOR<Prisma.AdversarialSubCategoryScalarRelationFilter, Prisma.AdversarialSubCategoryWhereInput>
170
+ }
171
+
172
+ export type AdversarialLabelOrderByWithRelationInput = {
173
+ id?: Prisma.SortOrder
174
+ name?: Prisma.SortOrderInput | Prisma.SortOrder
175
+ subCategoryId?: Prisma.SortOrder
176
+ subCategory?: Prisma.AdversarialSubCategoryOrderByWithRelationInput
177
+ }
178
+
179
+ export type AdversarialLabelWhereUniqueInput = Prisma.AtLeast<{
180
+ id?: string
181
+ AND?: Prisma.AdversarialLabelWhereInput | Prisma.AdversarialLabelWhereInput[]
182
+ OR?: Prisma.AdversarialLabelWhereInput[]
183
+ NOT?: Prisma.AdversarialLabelWhereInput | Prisma.AdversarialLabelWhereInput[]
184
+ name?: Prisma.StringNullableFilter<"AdversarialLabel"> | string | null
185
+ subCategoryId?: Prisma.StringFilter<"AdversarialLabel"> | string
186
+ subCategory?: Prisma.XOR<Prisma.AdversarialSubCategoryScalarRelationFilter, Prisma.AdversarialSubCategoryWhereInput>
187
+ }, "id">
188
+
189
+ export type AdversarialLabelOrderByWithAggregationInput = {
190
+ id?: Prisma.SortOrder
191
+ name?: Prisma.SortOrderInput | Prisma.SortOrder
192
+ subCategoryId?: Prisma.SortOrder
193
+ _count?: Prisma.AdversarialLabelCountOrderByAggregateInput
194
+ _max?: Prisma.AdversarialLabelMaxOrderByAggregateInput
195
+ _min?: Prisma.AdversarialLabelMinOrderByAggregateInput
196
+ }
197
+
198
+ export type AdversarialLabelScalarWhereWithAggregatesInput = {
199
+ AND?: Prisma.AdversarialLabelScalarWhereWithAggregatesInput | Prisma.AdversarialLabelScalarWhereWithAggregatesInput[]
200
+ OR?: Prisma.AdversarialLabelScalarWhereWithAggregatesInput[]
201
+ NOT?: Prisma.AdversarialLabelScalarWhereWithAggregatesInput | Prisma.AdversarialLabelScalarWhereWithAggregatesInput[]
202
+ id?: Prisma.StringWithAggregatesFilter<"AdversarialLabel"> | string
203
+ name?: Prisma.StringNullableWithAggregatesFilter<"AdversarialLabel"> | string | null
204
+ subCategoryId?: Prisma.StringWithAggregatesFilter<"AdversarialLabel"> | string
205
+ }
206
+
207
+ export type AdversarialLabelCreateInput = {
208
+ id?: string
209
+ name?: string | null
210
+ subCategory: Prisma.AdversarialSubCategoryCreateNestedOneWithoutLabelsInput
211
+ }
212
+
213
+ export type AdversarialLabelUncheckedCreateInput = {
214
+ id?: string
215
+ name?: string | null
216
+ subCategoryId: string
217
+ }
218
+
219
+ export type AdversarialLabelUpdateInput = {
220
+ id?: Prisma.StringFieldUpdateOperationsInput | string
221
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
222
+ subCategory?: Prisma.AdversarialSubCategoryUpdateOneRequiredWithoutLabelsNestedInput
223
+ }
224
+
225
+ export type AdversarialLabelUncheckedUpdateInput = {
226
+ id?: Prisma.StringFieldUpdateOperationsInput | string
227
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
228
+ subCategoryId?: Prisma.StringFieldUpdateOperationsInput | string
229
+ }
230
+
231
+ export type AdversarialLabelCreateManyInput = {
232
+ id?: string
233
+ name?: string | null
234
+ subCategoryId: string
235
+ }
236
+
237
+ export type AdversarialLabelUpdateManyMutationInput = {
238
+ id?: Prisma.StringFieldUpdateOperationsInput | string
239
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
240
+ }
241
+
242
+ export type AdversarialLabelUncheckedUpdateManyInput = {
243
+ id?: Prisma.StringFieldUpdateOperationsInput | string
244
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
245
+ subCategoryId?: Prisma.StringFieldUpdateOperationsInput | string
246
+ }
247
+
248
+ export type AdversarialLabelListRelationFilter = {
249
+ every?: Prisma.AdversarialLabelWhereInput
250
+ some?: Prisma.AdversarialLabelWhereInput
251
+ none?: Prisma.AdversarialLabelWhereInput
252
+ }
253
+
254
+ export type AdversarialLabelOrderByRelationAggregateInput = {
255
+ _count?: Prisma.SortOrder
256
+ }
257
+
258
+ export type AdversarialLabelCountOrderByAggregateInput = {
259
+ id?: Prisma.SortOrder
260
+ name?: Prisma.SortOrder
261
+ subCategoryId?: Prisma.SortOrder
262
+ }
263
+
264
+ export type AdversarialLabelMaxOrderByAggregateInput = {
265
+ id?: Prisma.SortOrder
266
+ name?: Prisma.SortOrder
267
+ subCategoryId?: Prisma.SortOrder
268
+ }
269
+
270
+ export type AdversarialLabelMinOrderByAggregateInput = {
271
+ id?: Prisma.SortOrder
272
+ name?: Prisma.SortOrder
273
+ subCategoryId?: Prisma.SortOrder
274
+ }
275
+
276
+ export type AdversarialLabelCreateNestedManyWithoutSubCategoryInput = {
277
+ create?: Prisma.XOR<Prisma.AdversarialLabelCreateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput> | Prisma.AdversarialLabelCreateWithoutSubCategoryInput[] | Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput[]
278
+ connectOrCreate?: Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput | Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput[]
279
+ createMany?: Prisma.AdversarialLabelCreateManySubCategoryInputEnvelope
280
+ connect?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
281
+ }
282
+
283
+ export type AdversarialLabelUncheckedCreateNestedManyWithoutSubCategoryInput = {
284
+ create?: Prisma.XOR<Prisma.AdversarialLabelCreateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput> | Prisma.AdversarialLabelCreateWithoutSubCategoryInput[] | Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput[]
285
+ connectOrCreate?: Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput | Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput[]
286
+ createMany?: Prisma.AdversarialLabelCreateManySubCategoryInputEnvelope
287
+ connect?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
288
+ }
289
+
290
+ export type AdversarialLabelUpdateManyWithoutSubCategoryNestedInput = {
291
+ create?: Prisma.XOR<Prisma.AdversarialLabelCreateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput> | Prisma.AdversarialLabelCreateWithoutSubCategoryInput[] | Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput[]
292
+ connectOrCreate?: Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput | Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput[]
293
+ upsert?: Prisma.AdversarialLabelUpsertWithWhereUniqueWithoutSubCategoryInput | Prisma.AdversarialLabelUpsertWithWhereUniqueWithoutSubCategoryInput[]
294
+ createMany?: Prisma.AdversarialLabelCreateManySubCategoryInputEnvelope
295
+ set?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
296
+ disconnect?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
297
+ delete?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
298
+ connect?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
299
+ update?: Prisma.AdversarialLabelUpdateWithWhereUniqueWithoutSubCategoryInput | Prisma.AdversarialLabelUpdateWithWhereUniqueWithoutSubCategoryInput[]
300
+ updateMany?: Prisma.AdversarialLabelUpdateManyWithWhereWithoutSubCategoryInput | Prisma.AdversarialLabelUpdateManyWithWhereWithoutSubCategoryInput[]
301
+ deleteMany?: Prisma.AdversarialLabelScalarWhereInput | Prisma.AdversarialLabelScalarWhereInput[]
302
+ }
303
+
304
+ export type AdversarialLabelUncheckedUpdateManyWithoutSubCategoryNestedInput = {
305
+ create?: Prisma.XOR<Prisma.AdversarialLabelCreateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput> | Prisma.AdversarialLabelCreateWithoutSubCategoryInput[] | Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput[]
306
+ connectOrCreate?: Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput | Prisma.AdversarialLabelCreateOrConnectWithoutSubCategoryInput[]
307
+ upsert?: Prisma.AdversarialLabelUpsertWithWhereUniqueWithoutSubCategoryInput | Prisma.AdversarialLabelUpsertWithWhereUniqueWithoutSubCategoryInput[]
308
+ createMany?: Prisma.AdversarialLabelCreateManySubCategoryInputEnvelope
309
+ set?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
310
+ disconnect?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
311
+ delete?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
312
+ connect?: Prisma.AdversarialLabelWhereUniqueInput | Prisma.AdversarialLabelWhereUniqueInput[]
313
+ update?: Prisma.AdversarialLabelUpdateWithWhereUniqueWithoutSubCategoryInput | Prisma.AdversarialLabelUpdateWithWhereUniqueWithoutSubCategoryInput[]
314
+ updateMany?: Prisma.AdversarialLabelUpdateManyWithWhereWithoutSubCategoryInput | Prisma.AdversarialLabelUpdateManyWithWhereWithoutSubCategoryInput[]
315
+ deleteMany?: Prisma.AdversarialLabelScalarWhereInput | Prisma.AdversarialLabelScalarWhereInput[]
316
+ }
317
+
318
+ export type AdversarialLabelCreateWithoutSubCategoryInput = {
319
+ id?: string
320
+ name?: string | null
321
+ }
322
+
323
+ export type AdversarialLabelUncheckedCreateWithoutSubCategoryInput = {
324
+ id?: string
325
+ name?: string | null
326
+ }
327
+
328
+ export type AdversarialLabelCreateOrConnectWithoutSubCategoryInput = {
329
+ where: Prisma.AdversarialLabelWhereUniqueInput
330
+ create: Prisma.XOR<Prisma.AdversarialLabelCreateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput>
331
+ }
332
+
333
+ export type AdversarialLabelCreateManySubCategoryInputEnvelope = {
334
+ data: Prisma.AdversarialLabelCreateManySubCategoryInput | Prisma.AdversarialLabelCreateManySubCategoryInput[]
335
+ }
336
+
337
+ export type AdversarialLabelUpsertWithWhereUniqueWithoutSubCategoryInput = {
338
+ where: Prisma.AdversarialLabelWhereUniqueInput
339
+ update: Prisma.XOR<Prisma.AdversarialLabelUpdateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedUpdateWithoutSubCategoryInput>
340
+ create: Prisma.XOR<Prisma.AdversarialLabelCreateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedCreateWithoutSubCategoryInput>
341
+ }
342
+
343
+ export type AdversarialLabelUpdateWithWhereUniqueWithoutSubCategoryInput = {
344
+ where: Prisma.AdversarialLabelWhereUniqueInput
345
+ data: Prisma.XOR<Prisma.AdversarialLabelUpdateWithoutSubCategoryInput, Prisma.AdversarialLabelUncheckedUpdateWithoutSubCategoryInput>
346
+ }
347
+
348
+ export type AdversarialLabelUpdateManyWithWhereWithoutSubCategoryInput = {
349
+ where: Prisma.AdversarialLabelScalarWhereInput
350
+ data: Prisma.XOR<Prisma.AdversarialLabelUpdateManyMutationInput, Prisma.AdversarialLabelUncheckedUpdateManyWithoutSubCategoryInput>
351
+ }
352
+
353
+ export type AdversarialLabelScalarWhereInput = {
354
+ AND?: Prisma.AdversarialLabelScalarWhereInput | Prisma.AdversarialLabelScalarWhereInput[]
355
+ OR?: Prisma.AdversarialLabelScalarWhereInput[]
356
+ NOT?: Prisma.AdversarialLabelScalarWhereInput | Prisma.AdversarialLabelScalarWhereInput[]
357
+ id?: Prisma.StringFilter<"AdversarialLabel"> | string
358
+ name?: Prisma.StringNullableFilter<"AdversarialLabel"> | string | null
359
+ subCategoryId?: Prisma.StringFilter<"AdversarialLabel"> | string
360
+ }
361
+
362
+ export type AdversarialLabelCreateManySubCategoryInput = {
363
+ id?: string
364
+ name?: string | null
365
+ }
366
+
367
+ export type AdversarialLabelUpdateWithoutSubCategoryInput = {
368
+ id?: Prisma.StringFieldUpdateOperationsInput | string
369
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
370
+ }
371
+
372
+ export type AdversarialLabelUncheckedUpdateWithoutSubCategoryInput = {
373
+ id?: Prisma.StringFieldUpdateOperationsInput | string
374
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
375
+ }
376
+
377
+ export type AdversarialLabelUncheckedUpdateManyWithoutSubCategoryInput = {
378
+ id?: Prisma.StringFieldUpdateOperationsInput | string
379
+ name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
380
+ }
381
+
382
+
383
+
384
+ export type AdversarialLabelSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
385
+ id?: boolean
386
+ name?: boolean
387
+ subCategoryId?: boolean
388
+ subCategory?: boolean | Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>
389
+ }, ExtArgs["result"]["adversarialLabel"]>
390
+
391
+ export type AdversarialLabelSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
392
+ id?: boolean
393
+ name?: boolean
394
+ subCategoryId?: boolean
395
+ subCategory?: boolean | Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>
396
+ }, ExtArgs["result"]["adversarialLabel"]>
397
+
398
+ export type AdversarialLabelSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
399
+ id?: boolean
400
+ name?: boolean
401
+ subCategoryId?: boolean
402
+ subCategory?: boolean | Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>
403
+ }, ExtArgs["result"]["adversarialLabel"]>
404
+
405
+ export type AdversarialLabelSelectScalar = {
406
+ id?: boolean
407
+ name?: boolean
408
+ subCategoryId?: boolean
409
+ }
410
+
411
+ export type AdversarialLabelOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "subCategoryId", ExtArgs["result"]["adversarialLabel"]>
412
+ export type AdversarialLabelInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
413
+ subCategory?: boolean | Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>
414
+ }
415
+ export type AdversarialLabelIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
416
+ subCategory?: boolean | Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>
417
+ }
418
+ export type AdversarialLabelIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
419
+ subCategory?: boolean | Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>
420
+ }
421
+
422
+ export type $AdversarialLabelPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
423
+ name: "AdversarialLabel"
424
+ objects: {
425
+ subCategory: Prisma.$AdversarialSubCategoryPayload<ExtArgs>
426
+ }
427
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
428
+ id: string
429
+ name: string | null
430
+ subCategoryId: string
431
+ }, ExtArgs["result"]["adversarialLabel"]>
432
+ composites: {}
433
+ }
434
+
435
+ export type AdversarialLabelGetPayload<S extends boolean | null | undefined | AdversarialLabelDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload, S>
436
+
437
+ export type AdversarialLabelCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
438
+ Omit<AdversarialLabelFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
439
+ select?: AdversarialLabelCountAggregateInputType | true
440
+ }
441
+
442
+ export interface AdversarialLabelDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
443
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['AdversarialLabel'], meta: { name: 'AdversarialLabel' } }
444
+ /**
445
+ * Find zero or one AdversarialLabel that matches the filter.
446
+ * @param {AdversarialLabelFindUniqueArgs} args - Arguments to find a AdversarialLabel
447
+ * @example
448
+ * // Get one AdversarialLabel
449
+ * const adversarialLabel = await prisma.adversarialLabel.findUnique({
450
+ * where: {
451
+ * // ... provide filter here
452
+ * }
453
+ * })
454
+ */
455
+ findUnique<T extends AdversarialLabelFindUniqueArgs>(args: Prisma.SelectSubset<T, AdversarialLabelFindUniqueArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
456
+
457
+ /**
458
+ * Find one AdversarialLabel that matches the filter or throw an error with `error.code='P2025'`
459
+ * if no matches were found.
460
+ * @param {AdversarialLabelFindUniqueOrThrowArgs} args - Arguments to find a AdversarialLabel
461
+ * @example
462
+ * // Get one AdversarialLabel
463
+ * const adversarialLabel = await prisma.adversarialLabel.findUniqueOrThrow({
464
+ * where: {
465
+ * // ... provide filter here
466
+ * }
467
+ * })
468
+ */
469
+ findUniqueOrThrow<T extends AdversarialLabelFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, AdversarialLabelFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
470
+
471
+ /**
472
+ * Find the first AdversarialLabel that matches the filter.
473
+ * Note, that providing `undefined` is treated as the value not being there.
474
+ * Read more here: https://pris.ly/d/null-undefined
475
+ * @param {AdversarialLabelFindFirstArgs} args - Arguments to find a AdversarialLabel
476
+ * @example
477
+ * // Get one AdversarialLabel
478
+ * const adversarialLabel = await prisma.adversarialLabel.findFirst({
479
+ * where: {
480
+ * // ... provide filter here
481
+ * }
482
+ * })
483
+ */
484
+ findFirst<T extends AdversarialLabelFindFirstArgs>(args?: Prisma.SelectSubset<T, AdversarialLabelFindFirstArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
485
+
486
+ /**
487
+ * Find the first AdversarialLabel that matches the filter or
488
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
489
+ * Note, that providing `undefined` is treated as the value not being there.
490
+ * Read more here: https://pris.ly/d/null-undefined
491
+ * @param {AdversarialLabelFindFirstOrThrowArgs} args - Arguments to find a AdversarialLabel
492
+ * @example
493
+ * // Get one AdversarialLabel
494
+ * const adversarialLabel = await prisma.adversarialLabel.findFirstOrThrow({
495
+ * where: {
496
+ * // ... provide filter here
497
+ * }
498
+ * })
499
+ */
500
+ findFirstOrThrow<T extends AdversarialLabelFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, AdversarialLabelFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
501
+
502
+ /**
503
+ * Find zero or more AdversarialLabels that matches the filter.
504
+ * Note, that providing `undefined` is treated as the value not being there.
505
+ * Read more here: https://pris.ly/d/null-undefined
506
+ * @param {AdversarialLabelFindManyArgs} args - Arguments to filter and select certain fields only.
507
+ * @example
508
+ * // Get all AdversarialLabels
509
+ * const adversarialLabels = await prisma.adversarialLabel.findMany()
510
+ *
511
+ * // Get first 10 AdversarialLabels
512
+ * const adversarialLabels = await prisma.adversarialLabel.findMany({ take: 10 })
513
+ *
514
+ * // Only select the `id`
515
+ * const adversarialLabelWithIdOnly = await prisma.adversarialLabel.findMany({ select: { id: true } })
516
+ *
517
+ */
518
+ findMany<T extends AdversarialLabelFindManyArgs>(args?: Prisma.SelectSubset<T, AdversarialLabelFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
519
+
520
+ /**
521
+ * Create a AdversarialLabel.
522
+ * @param {AdversarialLabelCreateArgs} args - Arguments to create a AdversarialLabel.
523
+ * @example
524
+ * // Create one AdversarialLabel
525
+ * const AdversarialLabel = await prisma.adversarialLabel.create({
526
+ * data: {
527
+ * // ... data to create a AdversarialLabel
528
+ * }
529
+ * })
530
+ *
531
+ */
532
+ create<T extends AdversarialLabelCreateArgs>(args: Prisma.SelectSubset<T, AdversarialLabelCreateArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
533
+
534
+ /**
535
+ * Create many AdversarialLabels.
536
+ * @param {AdversarialLabelCreateManyArgs} args - Arguments to create many AdversarialLabels.
537
+ * @example
538
+ * // Create many AdversarialLabels
539
+ * const adversarialLabel = await prisma.adversarialLabel.createMany({
540
+ * data: [
541
+ * // ... provide data here
542
+ * ]
543
+ * })
544
+ *
545
+ */
546
+ createMany<T extends AdversarialLabelCreateManyArgs>(args?: Prisma.SelectSubset<T, AdversarialLabelCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
547
+
548
+ /**
549
+ * Create many AdversarialLabels and returns the data saved in the database.
550
+ * @param {AdversarialLabelCreateManyAndReturnArgs} args - Arguments to create many AdversarialLabels.
551
+ * @example
552
+ * // Create many AdversarialLabels
553
+ * const adversarialLabel = await prisma.adversarialLabel.createManyAndReturn({
554
+ * data: [
555
+ * // ... provide data here
556
+ * ]
557
+ * })
558
+ *
559
+ * // Create many AdversarialLabels and only return the `id`
560
+ * const adversarialLabelWithIdOnly = await prisma.adversarialLabel.createManyAndReturn({
561
+ * select: { id: true },
562
+ * data: [
563
+ * // ... provide data here
564
+ * ]
565
+ * })
566
+ * Note, that providing `undefined` is treated as the value not being there.
567
+ * Read more here: https://pris.ly/d/null-undefined
568
+ *
569
+ */
570
+ createManyAndReturn<T extends AdversarialLabelCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, AdversarialLabelCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>
571
+
572
+ /**
573
+ * Delete a AdversarialLabel.
574
+ * @param {AdversarialLabelDeleteArgs} args - Arguments to delete one AdversarialLabel.
575
+ * @example
576
+ * // Delete one AdversarialLabel
577
+ * const AdversarialLabel = await prisma.adversarialLabel.delete({
578
+ * where: {
579
+ * // ... filter to delete one AdversarialLabel
580
+ * }
581
+ * })
582
+ *
583
+ */
584
+ delete<T extends AdversarialLabelDeleteArgs>(args: Prisma.SelectSubset<T, AdversarialLabelDeleteArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
585
+
586
+ /**
587
+ * Update one AdversarialLabel.
588
+ * @param {AdversarialLabelUpdateArgs} args - Arguments to update one AdversarialLabel.
589
+ * @example
590
+ * // Update one AdversarialLabel
591
+ * const adversarialLabel = await prisma.adversarialLabel.update({
592
+ * where: {
593
+ * // ... provide filter here
594
+ * },
595
+ * data: {
596
+ * // ... provide data here
597
+ * }
598
+ * })
599
+ *
600
+ */
601
+ update<T extends AdversarialLabelUpdateArgs>(args: Prisma.SelectSubset<T, AdversarialLabelUpdateArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
602
+
603
+ /**
604
+ * Delete zero or more AdversarialLabels.
605
+ * @param {AdversarialLabelDeleteManyArgs} args - Arguments to filter AdversarialLabels to delete.
606
+ * @example
607
+ * // Delete a few AdversarialLabels
608
+ * const { count } = await prisma.adversarialLabel.deleteMany({
609
+ * where: {
610
+ * // ... provide filter here
611
+ * }
612
+ * })
613
+ *
614
+ */
615
+ deleteMany<T extends AdversarialLabelDeleteManyArgs>(args?: Prisma.SelectSubset<T, AdversarialLabelDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
616
+
617
+ /**
618
+ * Update zero or more AdversarialLabels.
619
+ * Note, that providing `undefined` is treated as the value not being there.
620
+ * Read more here: https://pris.ly/d/null-undefined
621
+ * @param {AdversarialLabelUpdateManyArgs} args - Arguments to update one or more rows.
622
+ * @example
623
+ * // Update many AdversarialLabels
624
+ * const adversarialLabel = await prisma.adversarialLabel.updateMany({
625
+ * where: {
626
+ * // ... provide filter here
627
+ * },
628
+ * data: {
629
+ * // ... provide data here
630
+ * }
631
+ * })
632
+ *
633
+ */
634
+ updateMany<T extends AdversarialLabelUpdateManyArgs>(args: Prisma.SelectSubset<T, AdversarialLabelUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>
635
+
636
+ /**
637
+ * Update zero or more AdversarialLabels and returns the data updated in the database.
638
+ * @param {AdversarialLabelUpdateManyAndReturnArgs} args - Arguments to update many AdversarialLabels.
639
+ * @example
640
+ * // Update many AdversarialLabels
641
+ * const adversarialLabel = await prisma.adversarialLabel.updateManyAndReturn({
642
+ * where: {
643
+ * // ... provide filter here
644
+ * },
645
+ * data: [
646
+ * // ... provide data here
647
+ * ]
648
+ * })
649
+ *
650
+ * // Update zero or more AdversarialLabels and only return the `id`
651
+ * const adversarialLabelWithIdOnly = await prisma.adversarialLabel.updateManyAndReturn({
652
+ * select: { id: true },
653
+ * where: {
654
+ * // ... provide filter here
655
+ * },
656
+ * data: [
657
+ * // ... provide data here
658
+ * ]
659
+ * })
660
+ * Note, that providing `undefined` is treated as the value not being there.
661
+ * Read more here: https://pris.ly/d/null-undefined
662
+ *
663
+ */
664
+ updateManyAndReturn<T extends AdversarialLabelUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, AdversarialLabelUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>
665
+
666
+ /**
667
+ * Create or update one AdversarialLabel.
668
+ * @param {AdversarialLabelUpsertArgs} args - Arguments to update or create a AdversarialLabel.
669
+ * @example
670
+ * // Update or create a AdversarialLabel
671
+ * const adversarialLabel = await prisma.adversarialLabel.upsert({
672
+ * create: {
673
+ * // ... data to create a AdversarialLabel
674
+ * },
675
+ * update: {
676
+ * // ... in case it already exists, update
677
+ * },
678
+ * where: {
679
+ * // ... the filter for the AdversarialLabel we want to update
680
+ * }
681
+ * })
682
+ */
683
+ upsert<T extends AdversarialLabelUpsertArgs>(args: Prisma.SelectSubset<T, AdversarialLabelUpsertArgs<ExtArgs>>): Prisma.Prisma__AdversarialLabelClient<runtime.Types.Result.GetResult<Prisma.$AdversarialLabelPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
684
+
685
+
686
+ /**
687
+ * Count the number of AdversarialLabels.
688
+ * Note, that providing `undefined` is treated as the value not being there.
689
+ * Read more here: https://pris.ly/d/null-undefined
690
+ * @param {AdversarialLabelCountArgs} args - Arguments to filter AdversarialLabels to count.
691
+ * @example
692
+ * // Count the number of AdversarialLabels
693
+ * const count = await prisma.adversarialLabel.count({
694
+ * where: {
695
+ * // ... the filter for the AdversarialLabels we want to count
696
+ * }
697
+ * })
698
+ **/
699
+ count<T extends AdversarialLabelCountArgs>(
700
+ args?: Prisma.Subset<T, AdversarialLabelCountArgs>,
701
+ ): Prisma.PrismaPromise<
702
+ T extends runtime.Types.Utils.Record<'select', any>
703
+ ? T['select'] extends true
704
+ ? number
705
+ : Prisma.GetScalarType<T['select'], AdversarialLabelCountAggregateOutputType>
706
+ : number
707
+ >
708
+
709
+ /**
710
+ * Allows you to perform aggregations operations on a AdversarialLabel.
711
+ * Note, that providing `undefined` is treated as the value not being there.
712
+ * Read more here: https://pris.ly/d/null-undefined
713
+ * @param {AdversarialLabelAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
714
+ * @example
715
+ * // Ordered by age ascending
716
+ * // Where email contains prisma.io
717
+ * // Limited to the 10 users
718
+ * const aggregations = await prisma.user.aggregate({
719
+ * _avg: {
720
+ * age: true,
721
+ * },
722
+ * where: {
723
+ * email: {
724
+ * contains: "prisma.io",
725
+ * },
726
+ * },
727
+ * orderBy: {
728
+ * age: "asc",
729
+ * },
730
+ * take: 10,
731
+ * })
732
+ **/
733
+ aggregate<T extends AdversarialLabelAggregateArgs>(args: Prisma.Subset<T, AdversarialLabelAggregateArgs>): Prisma.PrismaPromise<GetAdversarialLabelAggregateType<T>>
734
+
735
+ /**
736
+ * Group by AdversarialLabel.
737
+ * Note, that providing `undefined` is treated as the value not being there.
738
+ * Read more here: https://pris.ly/d/null-undefined
739
+ * @param {AdversarialLabelGroupByArgs} args - Group by arguments.
740
+ * @example
741
+ * // Group by city, order by createdAt, get count
742
+ * const result = await prisma.user.groupBy({
743
+ * by: ['city', 'createdAt'],
744
+ * orderBy: {
745
+ * createdAt: true
746
+ * },
747
+ * _count: {
748
+ * _all: true
749
+ * },
750
+ * })
751
+ *
752
+ **/
753
+ groupBy<
754
+ T extends AdversarialLabelGroupByArgs,
755
+ HasSelectOrTake extends Prisma.Or<
756
+ Prisma.Extends<'skip', Prisma.Keys<T>>,
757
+ Prisma.Extends<'take', Prisma.Keys<T>>
758
+ >,
759
+ OrderByArg extends Prisma.True extends HasSelectOrTake
760
+ ? { orderBy: AdversarialLabelGroupByArgs['orderBy'] }
761
+ : { orderBy?: AdversarialLabelGroupByArgs['orderBy'] },
762
+ OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
763
+ ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
764
+ ByValid extends Prisma.Has<ByFields, OrderFields>,
765
+ HavingFields extends Prisma.GetHavingFields<T['having']>,
766
+ HavingValid extends Prisma.Has<ByFields, HavingFields>,
767
+ ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False,
768
+ InputErrors extends ByEmpty extends Prisma.True
769
+ ? `Error: "by" must not be empty.`
770
+ : HavingValid extends Prisma.False
771
+ ? {
772
+ [P in HavingFields]: P extends ByFields
773
+ ? never
774
+ : P extends string
775
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
776
+ : [
777
+ Error,
778
+ 'Field ',
779
+ P,
780
+ ` in "having" needs to be provided in "by"`,
781
+ ]
782
+ }[HavingFields]
783
+ : 'take' extends Prisma.Keys<T>
784
+ ? 'orderBy' extends Prisma.Keys<T>
785
+ ? ByValid extends Prisma.True
786
+ ? {}
787
+ : {
788
+ [P in OrderFields]: P extends ByFields
789
+ ? never
790
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
791
+ }[OrderFields]
792
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
793
+ : 'skip' extends Prisma.Keys<T>
794
+ ? 'orderBy' extends Prisma.Keys<T>
795
+ ? ByValid extends Prisma.True
796
+ ? {}
797
+ : {
798
+ [P in OrderFields]: P extends ByFields
799
+ ? never
800
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
801
+ }[OrderFields]
802
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
803
+ : ByValid extends Prisma.True
804
+ ? {}
805
+ : {
806
+ [P in OrderFields]: P extends ByFields
807
+ ? never
808
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
809
+ }[OrderFields]
810
+ >(args: Prisma.SubsetIntersection<T, AdversarialLabelGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetAdversarialLabelGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
811
+ /**
812
+ * Fields of the AdversarialLabel model
813
+ */
814
+ readonly fields: AdversarialLabelFieldRefs;
815
+ }
816
+
817
+ /**
818
+ * The delegate class that acts as a "Promise-like" for AdversarialLabel.
819
+ * Why is this prefixed with `Prisma__`?
820
+ * Because we want to prevent naming conflicts as mentioned in
821
+ * https://github.com/prisma/prisma-client-js/issues/707
822
+ */
823
+ export interface Prisma__AdversarialLabelClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
824
+ readonly [Symbol.toStringTag]: "PrismaPromise"
825
+ subCategory<T extends Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AdversarialSubCategoryDefaultArgs<ExtArgs>>): Prisma.Prisma__AdversarialSubCategoryClient<runtime.Types.Result.GetResult<Prisma.$AdversarialSubCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
826
+ /**
827
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
828
+ * @param onfulfilled The callback to execute when the Promise is resolved.
829
+ * @param onrejected The callback to execute when the Promise is rejected.
830
+ * @returns A Promise for the completion of which ever callback is executed.
831
+ */
832
+ 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>
833
+ /**
834
+ * Attaches a callback for only the rejection of the Promise.
835
+ * @param onrejected The callback to execute when the Promise is rejected.
836
+ * @returns A Promise for the completion of the callback.
837
+ */
838
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
839
+ /**
840
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
841
+ * resolved value cannot be modified from the callback.
842
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
843
+ * @returns A Promise for the completion of the callback.
844
+ */
845
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>
846
+ }
847
+
848
+
849
+
850
+
851
+ /**
852
+ * Fields of the AdversarialLabel model
853
+ */
854
+ export interface AdversarialLabelFieldRefs {
855
+ readonly id: Prisma.FieldRef<"AdversarialLabel", 'String'>
856
+ readonly name: Prisma.FieldRef<"AdversarialLabel", 'String'>
857
+ readonly subCategoryId: Prisma.FieldRef<"AdversarialLabel", 'String'>
858
+ }
859
+
860
+
861
+ // Custom InputTypes
862
+ /**
863
+ * AdversarialLabel findUnique
864
+ */
865
+ export type AdversarialLabelFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
866
+ /**
867
+ * Select specific fields to fetch from the AdversarialLabel
868
+ */
869
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
870
+ /**
871
+ * Omit specific fields from the AdversarialLabel
872
+ */
873
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
874
+ /**
875
+ * Choose, which related nodes to fetch as well
876
+ */
877
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
878
+ /**
879
+ * Filter, which AdversarialLabel to fetch.
880
+ */
881
+ where: Prisma.AdversarialLabelWhereUniqueInput
882
+ }
883
+
884
+ /**
885
+ * AdversarialLabel findUniqueOrThrow
886
+ */
887
+ export type AdversarialLabelFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
888
+ /**
889
+ * Select specific fields to fetch from the AdversarialLabel
890
+ */
891
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
892
+ /**
893
+ * Omit specific fields from the AdversarialLabel
894
+ */
895
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
896
+ /**
897
+ * Choose, which related nodes to fetch as well
898
+ */
899
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
900
+ /**
901
+ * Filter, which AdversarialLabel to fetch.
902
+ */
903
+ where: Prisma.AdversarialLabelWhereUniqueInput
904
+ }
905
+
906
+ /**
907
+ * AdversarialLabel findFirst
908
+ */
909
+ export type AdversarialLabelFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
910
+ /**
911
+ * Select specific fields to fetch from the AdversarialLabel
912
+ */
913
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
914
+ /**
915
+ * Omit specific fields from the AdversarialLabel
916
+ */
917
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
918
+ /**
919
+ * Choose, which related nodes to fetch as well
920
+ */
921
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
922
+ /**
923
+ * Filter, which AdversarialLabel to fetch.
924
+ */
925
+ where?: Prisma.AdversarialLabelWhereInput
926
+ /**
927
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
928
+ *
929
+ * Determine the order of AdversarialLabels to fetch.
930
+ */
931
+ orderBy?: Prisma.AdversarialLabelOrderByWithRelationInput | Prisma.AdversarialLabelOrderByWithRelationInput[]
932
+ /**
933
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
934
+ *
935
+ * Sets the position for searching for AdversarialLabels.
936
+ */
937
+ cursor?: Prisma.AdversarialLabelWhereUniqueInput
938
+ /**
939
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
940
+ *
941
+ * Take `±n` AdversarialLabels from the position of the cursor.
942
+ */
943
+ take?: number
944
+ /**
945
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
946
+ *
947
+ * Skip the first `n` AdversarialLabels.
948
+ */
949
+ skip?: number
950
+ /**
951
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
952
+ *
953
+ * Filter by unique combinations of AdversarialLabels.
954
+ */
955
+ distinct?: Prisma.AdversarialLabelScalarFieldEnum | Prisma.AdversarialLabelScalarFieldEnum[]
956
+ }
957
+
958
+ /**
959
+ * AdversarialLabel findFirstOrThrow
960
+ */
961
+ export type AdversarialLabelFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
962
+ /**
963
+ * Select specific fields to fetch from the AdversarialLabel
964
+ */
965
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
966
+ /**
967
+ * Omit specific fields from the AdversarialLabel
968
+ */
969
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
970
+ /**
971
+ * Choose, which related nodes to fetch as well
972
+ */
973
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
974
+ /**
975
+ * Filter, which AdversarialLabel to fetch.
976
+ */
977
+ where?: Prisma.AdversarialLabelWhereInput
978
+ /**
979
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
980
+ *
981
+ * Determine the order of AdversarialLabels to fetch.
982
+ */
983
+ orderBy?: Prisma.AdversarialLabelOrderByWithRelationInput | Prisma.AdversarialLabelOrderByWithRelationInput[]
984
+ /**
985
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
986
+ *
987
+ * Sets the position for searching for AdversarialLabels.
988
+ */
989
+ cursor?: Prisma.AdversarialLabelWhereUniqueInput
990
+ /**
991
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
992
+ *
993
+ * Take `±n` AdversarialLabels from the position of the cursor.
994
+ */
995
+ take?: number
996
+ /**
997
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
998
+ *
999
+ * Skip the first `n` AdversarialLabels.
1000
+ */
1001
+ skip?: number
1002
+ /**
1003
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1004
+ *
1005
+ * Filter by unique combinations of AdversarialLabels.
1006
+ */
1007
+ distinct?: Prisma.AdversarialLabelScalarFieldEnum | Prisma.AdversarialLabelScalarFieldEnum[]
1008
+ }
1009
+
1010
+ /**
1011
+ * AdversarialLabel findMany
1012
+ */
1013
+ export type AdversarialLabelFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1014
+ /**
1015
+ * Select specific fields to fetch from the AdversarialLabel
1016
+ */
1017
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
1018
+ /**
1019
+ * Omit specific fields from the AdversarialLabel
1020
+ */
1021
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1022
+ /**
1023
+ * Choose, which related nodes to fetch as well
1024
+ */
1025
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
1026
+ /**
1027
+ * Filter, which AdversarialLabels to fetch.
1028
+ */
1029
+ where?: Prisma.AdversarialLabelWhereInput
1030
+ /**
1031
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
1032
+ *
1033
+ * Determine the order of AdversarialLabels to fetch.
1034
+ */
1035
+ orderBy?: Prisma.AdversarialLabelOrderByWithRelationInput | Prisma.AdversarialLabelOrderByWithRelationInput[]
1036
+ /**
1037
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
1038
+ *
1039
+ * Sets the position for listing AdversarialLabels.
1040
+ */
1041
+ cursor?: Prisma.AdversarialLabelWhereUniqueInput
1042
+ /**
1043
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1044
+ *
1045
+ * Take `±n` AdversarialLabels from the position of the cursor.
1046
+ */
1047
+ take?: number
1048
+ /**
1049
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
1050
+ *
1051
+ * Skip the first `n` AdversarialLabels.
1052
+ */
1053
+ skip?: number
1054
+ /**
1055
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
1056
+ *
1057
+ * Filter by unique combinations of AdversarialLabels.
1058
+ */
1059
+ distinct?: Prisma.AdversarialLabelScalarFieldEnum | Prisma.AdversarialLabelScalarFieldEnum[]
1060
+ }
1061
+
1062
+ /**
1063
+ * AdversarialLabel create
1064
+ */
1065
+ export type AdversarialLabelCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1066
+ /**
1067
+ * Select specific fields to fetch from the AdversarialLabel
1068
+ */
1069
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
1070
+ /**
1071
+ * Omit specific fields from the AdversarialLabel
1072
+ */
1073
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1074
+ /**
1075
+ * Choose, which related nodes to fetch as well
1076
+ */
1077
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
1078
+ /**
1079
+ * The data needed to create a AdversarialLabel.
1080
+ */
1081
+ data: Prisma.XOR<Prisma.AdversarialLabelCreateInput, Prisma.AdversarialLabelUncheckedCreateInput>
1082
+ }
1083
+
1084
+ /**
1085
+ * AdversarialLabel createMany
1086
+ */
1087
+ export type AdversarialLabelCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1088
+ /**
1089
+ * The data used to create many AdversarialLabels.
1090
+ */
1091
+ data: Prisma.AdversarialLabelCreateManyInput | Prisma.AdversarialLabelCreateManyInput[]
1092
+ }
1093
+
1094
+ /**
1095
+ * AdversarialLabel createManyAndReturn
1096
+ */
1097
+ export type AdversarialLabelCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1098
+ /**
1099
+ * Select specific fields to fetch from the AdversarialLabel
1100
+ */
1101
+ select?: Prisma.AdversarialLabelSelectCreateManyAndReturn<ExtArgs> | null
1102
+ /**
1103
+ * Omit specific fields from the AdversarialLabel
1104
+ */
1105
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1106
+ /**
1107
+ * The data used to create many AdversarialLabels.
1108
+ */
1109
+ data: Prisma.AdversarialLabelCreateManyInput | Prisma.AdversarialLabelCreateManyInput[]
1110
+ /**
1111
+ * Choose, which related nodes to fetch as well
1112
+ */
1113
+ include?: Prisma.AdversarialLabelIncludeCreateManyAndReturn<ExtArgs> | null
1114
+ }
1115
+
1116
+ /**
1117
+ * AdversarialLabel update
1118
+ */
1119
+ export type AdversarialLabelUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1120
+ /**
1121
+ * Select specific fields to fetch from the AdversarialLabel
1122
+ */
1123
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
1124
+ /**
1125
+ * Omit specific fields from the AdversarialLabel
1126
+ */
1127
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1128
+ /**
1129
+ * Choose, which related nodes to fetch as well
1130
+ */
1131
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
1132
+ /**
1133
+ * The data needed to update a AdversarialLabel.
1134
+ */
1135
+ data: Prisma.XOR<Prisma.AdversarialLabelUpdateInput, Prisma.AdversarialLabelUncheckedUpdateInput>
1136
+ /**
1137
+ * Choose, which AdversarialLabel to update.
1138
+ */
1139
+ where: Prisma.AdversarialLabelWhereUniqueInput
1140
+ }
1141
+
1142
+ /**
1143
+ * AdversarialLabel updateMany
1144
+ */
1145
+ export type AdversarialLabelUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1146
+ /**
1147
+ * The data used to update AdversarialLabels.
1148
+ */
1149
+ data: Prisma.XOR<Prisma.AdversarialLabelUpdateManyMutationInput, Prisma.AdversarialLabelUncheckedUpdateManyInput>
1150
+ /**
1151
+ * Filter which AdversarialLabels to update
1152
+ */
1153
+ where?: Prisma.AdversarialLabelWhereInput
1154
+ /**
1155
+ * Limit how many AdversarialLabels to update.
1156
+ */
1157
+ limit?: number
1158
+ }
1159
+
1160
+ /**
1161
+ * AdversarialLabel updateManyAndReturn
1162
+ */
1163
+ export type AdversarialLabelUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1164
+ /**
1165
+ * Select specific fields to fetch from the AdversarialLabel
1166
+ */
1167
+ select?: Prisma.AdversarialLabelSelectUpdateManyAndReturn<ExtArgs> | null
1168
+ /**
1169
+ * Omit specific fields from the AdversarialLabel
1170
+ */
1171
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1172
+ /**
1173
+ * The data used to update AdversarialLabels.
1174
+ */
1175
+ data: Prisma.XOR<Prisma.AdversarialLabelUpdateManyMutationInput, Prisma.AdversarialLabelUncheckedUpdateManyInput>
1176
+ /**
1177
+ * Filter which AdversarialLabels to update
1178
+ */
1179
+ where?: Prisma.AdversarialLabelWhereInput
1180
+ /**
1181
+ * Limit how many AdversarialLabels to update.
1182
+ */
1183
+ limit?: number
1184
+ /**
1185
+ * Choose, which related nodes to fetch as well
1186
+ */
1187
+ include?: Prisma.AdversarialLabelIncludeUpdateManyAndReturn<ExtArgs> | null
1188
+ }
1189
+
1190
+ /**
1191
+ * AdversarialLabel upsert
1192
+ */
1193
+ export type AdversarialLabelUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1194
+ /**
1195
+ * Select specific fields to fetch from the AdversarialLabel
1196
+ */
1197
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
1198
+ /**
1199
+ * Omit specific fields from the AdversarialLabel
1200
+ */
1201
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1202
+ /**
1203
+ * Choose, which related nodes to fetch as well
1204
+ */
1205
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
1206
+ /**
1207
+ * The filter to search for the AdversarialLabel to update in case it exists.
1208
+ */
1209
+ where: Prisma.AdversarialLabelWhereUniqueInput
1210
+ /**
1211
+ * In case the AdversarialLabel found by the `where` argument doesn't exist, create a new AdversarialLabel with this data.
1212
+ */
1213
+ create: Prisma.XOR<Prisma.AdversarialLabelCreateInput, Prisma.AdversarialLabelUncheckedCreateInput>
1214
+ /**
1215
+ * In case the AdversarialLabel was found with the provided `where` argument, update it with this data.
1216
+ */
1217
+ update: Prisma.XOR<Prisma.AdversarialLabelUpdateInput, Prisma.AdversarialLabelUncheckedUpdateInput>
1218
+ }
1219
+
1220
+ /**
1221
+ * AdversarialLabel delete
1222
+ */
1223
+ export type AdversarialLabelDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1224
+ /**
1225
+ * Select specific fields to fetch from the AdversarialLabel
1226
+ */
1227
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
1228
+ /**
1229
+ * Omit specific fields from the AdversarialLabel
1230
+ */
1231
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1232
+ /**
1233
+ * Choose, which related nodes to fetch as well
1234
+ */
1235
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
1236
+ /**
1237
+ * Filter which AdversarialLabel to delete.
1238
+ */
1239
+ where: Prisma.AdversarialLabelWhereUniqueInput
1240
+ }
1241
+
1242
+ /**
1243
+ * AdversarialLabel deleteMany
1244
+ */
1245
+ export type AdversarialLabelDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1246
+ /**
1247
+ * Filter which AdversarialLabels to delete
1248
+ */
1249
+ where?: Prisma.AdversarialLabelWhereInput
1250
+ /**
1251
+ * Limit how many AdversarialLabels to delete.
1252
+ */
1253
+ limit?: number
1254
+ }
1255
+
1256
+ /**
1257
+ * AdversarialLabel without action
1258
+ */
1259
+ export type AdversarialLabelDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1260
+ /**
1261
+ * Select specific fields to fetch from the AdversarialLabel
1262
+ */
1263
+ select?: Prisma.AdversarialLabelSelect<ExtArgs> | null
1264
+ /**
1265
+ * Omit specific fields from the AdversarialLabel
1266
+ */
1267
+ omit?: Prisma.AdversarialLabelOmit<ExtArgs> | null
1268
+ /**
1269
+ * Choose, which related nodes to fetch as well
1270
+ */
1271
+ include?: Prisma.AdversarialLabelInclude<ExtArgs> | null
1272
+ }