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