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