@kosha-ai/server 0.0.1

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