@triskcraft/db 0.1.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 (148) hide show
  1. package/README.md +45 -0
  2. package/dist/generated/browser.d.ts +110 -0
  3. package/dist/generated/browser.d.ts.map +1 -0
  4. package/dist/generated/browser.js +18 -0
  5. package/dist/generated/browser.js.map +1 -0
  6. package/dist/generated/client.d.ts +129 -0
  7. package/dist/generated/client.d.ts.map +1 -0
  8. package/dist/generated/client.js +35 -0
  9. package/dist/generated/client.js.map +1 -0
  10. package/dist/generated/commonInputTypes.d.ts +501 -0
  11. package/dist/generated/commonInputTypes.d.ts.map +1 -0
  12. package/dist/generated/commonInputTypes.js +11 -0
  13. package/dist/generated/commonInputTypes.js.map +1 -0
  14. package/dist/generated/enums.d.ts +19 -0
  15. package/dist/generated/enums.d.ts.map +1 -0
  16. package/dist/generated/enums.js +25 -0
  17. package/dist/generated/enums.js.map +1 -0
  18. package/dist/generated/internal/class.d.ts +363 -0
  19. package/dist/generated/internal/class.d.ts.map +1 -0
  20. package/dist/generated/internal/class.js +52 -0
  21. package/dist/generated/internal/class.js.map +1 -0
  22. package/dist/generated/internal/prismaNamespace.d.ts +2282 -0
  23. package/dist/generated/internal/prismaNamespace.d.ts.map +1 -0
  24. package/dist/generated/internal/prismaNamespace.js +262 -0
  25. package/dist/generated/internal/prismaNamespace.js.map +1 -0
  26. package/dist/generated/internal/prismaNamespaceBrowser.d.ts +243 -0
  27. package/dist/generated/internal/prismaNamespaceBrowser.d.ts.map +1 -0
  28. package/dist/generated/internal/prismaNamespaceBrowser.js +233 -0
  29. package/dist/generated/internal/prismaNamespaceBrowser.js.map +1 -0
  30. package/dist/generated/models/AuthorizationCode.d.ts +1445 -0
  31. package/dist/generated/models/AuthorizationCode.d.ts.map +1 -0
  32. package/dist/generated/models/AuthorizationCode.js +2 -0
  33. package/dist/generated/models/AuthorizationCode.js.map +1 -0
  34. package/dist/generated/models/Client.d.ts +1301 -0
  35. package/dist/generated/models/Client.d.ts.map +1 -0
  36. package/dist/generated/models/Client.js +2 -0
  37. package/dist/generated/models/Client.js.map +1 -0
  38. package/dist/generated/models/DiscordUser.d.ts +1335 -0
  39. package/dist/generated/models/DiscordUser.d.ts.map +1 -0
  40. package/dist/generated/models/DiscordUser.js +2 -0
  41. package/dist/generated/models/DiscordUser.js.map +1 -0
  42. package/dist/generated/models/InactivityPeriod.d.ts +1255 -0
  43. package/dist/generated/models/InactivityPeriod.d.ts.map +1 -0
  44. package/dist/generated/models/InactivityPeriod.js +2 -0
  45. package/dist/generated/models/InactivityPeriod.js.map +1 -0
  46. package/dist/generated/models/LinkCode.d.ts +1100 -0
  47. package/dist/generated/models/LinkCode.d.ts.map +1 -0
  48. package/dist/generated/models/LinkCode.js +2 -0
  49. package/dist/generated/models/LinkCode.js.map +1 -0
  50. package/dist/generated/models/LinkedMinecraftRole.d.ts +1162 -0
  51. package/dist/generated/models/LinkedMinecraftRole.d.ts.map +1 -0
  52. package/dist/generated/models/LinkedMinecraftRole.js +2 -0
  53. package/dist/generated/models/LinkedMinecraftRole.js.map +1 -0
  54. package/dist/generated/models/LinkedRole.d.ts +1162 -0
  55. package/dist/generated/models/LinkedRole.d.ts.map +1 -0
  56. package/dist/generated/models/LinkedRole.js +2 -0
  57. package/dist/generated/models/LinkedRole.js.map +1 -0
  58. package/dist/generated/models/Media.d.ts +1146 -0
  59. package/dist/generated/models/Media.d.ts.map +1 -0
  60. package/dist/generated/models/Media.js +2 -0
  61. package/dist/generated/models/Media.js.map +1 -0
  62. package/dist/generated/models/MinecraftRole.d.ts +1064 -0
  63. package/dist/generated/models/MinecraftRole.d.ts.map +1 -0
  64. package/dist/generated/models/MinecraftRole.js +2 -0
  65. package/dist/generated/models/MinecraftRole.js.map +1 -0
  66. package/dist/generated/models/Player.d.ts +1458 -0
  67. package/dist/generated/models/Player.d.ts.map +1 -0
  68. package/dist/generated/models/Player.js +2 -0
  69. package/dist/generated/models/Player.js.map +1 -0
  70. package/dist/generated/models/Post.d.ts +1534 -0
  71. package/dist/generated/models/Post.d.ts.map +1 -0
  72. package/dist/generated/models/Post.js +2 -0
  73. package/dist/generated/models/Post.js.map +1 -0
  74. package/dist/generated/models/PostBlockMedia.d.ts +1243 -0
  75. package/dist/generated/models/PostBlockMedia.d.ts.map +1 -0
  76. package/dist/generated/models/PostBlockMedia.js +2 -0
  77. package/dist/generated/models/PostBlockMedia.js.map +1 -0
  78. package/dist/generated/models/PostBlocks.d.ts +1506 -0
  79. package/dist/generated/models/PostBlocks.d.ts.map +1 -0
  80. package/dist/generated/models/PostBlocks.js +2 -0
  81. package/dist/generated/models/PostBlocks.js.map +1 -0
  82. package/dist/generated/models/PostMedia.d.ts +1497 -0
  83. package/dist/generated/models/PostMedia.d.ts.map +1 -0
  84. package/dist/generated/models/PostMedia.js +2 -0
  85. package/dist/generated/models/PostMedia.js.map +1 -0
  86. package/dist/generated/models/Role.d.ts +1144 -0
  87. package/dist/generated/models/Role.d.ts.map +1 -0
  88. package/dist/generated/models/Role.js +2 -0
  89. package/dist/generated/models/Role.js.map +1 -0
  90. package/dist/generated/models/RoleStatistic.d.ts +1077 -0
  91. package/dist/generated/models/RoleStatistic.d.ts.map +1 -0
  92. package/dist/generated/models/RoleStatistic.js +2 -0
  93. package/dist/generated/models/RoleStatistic.js.map +1 -0
  94. package/dist/generated/models/Session.d.ts +1366 -0
  95. package/dist/generated/models/Session.d.ts.map +1 -0
  96. package/dist/generated/models/Session.js +2 -0
  97. package/dist/generated/models/Session.js.map +1 -0
  98. package/dist/generated/models/State.d.ts +970 -0
  99. package/dist/generated/models/State.d.ts.map +1 -0
  100. package/dist/generated/models/State.js +2 -0
  101. package/dist/generated/models/State.js.map +1 -0
  102. package/dist/generated/models/TrackedRole.d.ts +947 -0
  103. package/dist/generated/models/TrackedRole.d.ts.map +1 -0
  104. package/dist/generated/models/TrackedRole.js +2 -0
  105. package/dist/generated/models/TrackedRole.js.map +1 -0
  106. package/dist/generated/models/User.d.ts +1842 -0
  107. package/dist/generated/models/User.d.ts.map +1 -0
  108. package/dist/generated/models/User.js +2 -0
  109. package/dist/generated/models/User.js.map +1 -0
  110. package/dist/generated/models/WebhookToken.d.ts +1219 -0
  111. package/dist/generated/models/WebhookToken.d.ts.map +1 -0
  112. package/dist/generated/models/WebhookToken.js +2 -0
  113. package/dist/generated/models/WebhookToken.js.map +1 -0
  114. package/dist/generated/models.d.ts +23 -0
  115. package/dist/generated/models.d.ts.map +1 -0
  116. package/dist/generated/models.js +2 -0
  117. package/dist/generated/models.js.map +1 -0
  118. package/dist/index.d.ts +6 -0
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +15 -0
  121. package/dist/index.js.map +1 -0
  122. package/package.json +50 -0
  123. package/prisma/migrations/20251231000230_init/migration.sql +156 -0
  124. package/prisma/migrations/20251231011118_add_rank/migration.sql +2 -0
  125. package/prisma/migrations/20251231014040_discord_code/migration.sql +2 -0
  126. package/prisma/migrations/20260107232913_webhook_tokens/migration.sql +13 -0
  127. package/prisma/migrations/20260108014222_token_name/migration.sql +8 -0
  128. package/prisma/migrations/20260120042444_states/migration.sql +13 -0
  129. package/prisma/migrations/20260120052250_at/migration.sql +10 -0
  130. package/prisma/migrations/20260120061112_uq_token/migration.sql +8 -0
  131. package/prisma/migrations/20260121013517_uq_nick/migration.sql +8 -0
  132. package/prisma/migrations/20260125034645_mc_rank/migration.sql +2 -0
  133. package/prisma/migrations/20260202222436_remove_rank_from_discord/migration.sql +8 -0
  134. package/prisma/migrations/20260202234919_discord_user_username/migration.sql +2 -0
  135. package/prisma/migrations/20260202235832_uq_discord_username/migration.sql +12 -0
  136. package/prisma/migrations/20260301230127_blog/migration.sql +45 -0
  137. package/prisma/migrations/20260308062159_player_status/migration.sql +5 -0
  138. package/prisma/migrations/20260314152500_last_seen/migration.sql +2 -0
  139. package/prisma/migrations/20260430073735_oauth_prepare/migration.sql +102 -0
  140. package/prisma/migrations/20260603052836_scopes/migration.sql +11 -0
  141. package/prisma/migrations/20260603055719_scopes_sesion/migration.sql +2 -0
  142. package/prisma/migrations/20260603201228_user_roles/migration.sql +38 -0
  143. package/prisma/migrations/20260608060633_blog_media/migration.sql +61 -0
  144. package/prisma/migrations/20260612000040_prepare_post_users/migration.sql +5 -0
  145. package/prisma/migrations/20260612165923_prepare_webhook_user/migration.sql +53 -0
  146. package/prisma/migrations/20260612210328_remove_webhook_discord_user/migration.sql +19 -0
  147. package/prisma/migrations/migration_lock.toml +3 -0
  148. package/prisma/schema.prisma +325 -0
@@ -0,0 +1,1077 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace.ts";
3
+ /**
4
+ * Model RoleStatistic
5
+ * Instantáneas de actividad/inactividad por rol para graficar tendencias.
6
+ */
7
+ export type RoleStatisticModel = runtime.Types.Result.DefaultSelection<Prisma.$RoleStatisticPayload>;
8
+ export type AggregateRoleStatistic = {
9
+ _count: RoleStatisticCountAggregateOutputType | null;
10
+ _avg: RoleStatisticAvgAggregateOutputType | null;
11
+ _sum: RoleStatisticSumAggregateOutputType | null;
12
+ _min: RoleStatisticMinAggregateOutputType | null;
13
+ _max: RoleStatisticMaxAggregateOutputType | null;
14
+ };
15
+ export type RoleStatisticAvgAggregateOutputType = {
16
+ inactive_count: number | null;
17
+ active_count: number | null;
18
+ };
19
+ export type RoleStatisticSumAggregateOutputType = {
20
+ inactive_count: number | null;
21
+ active_count: number | null;
22
+ };
23
+ export type RoleStatisticMinAggregateOutputType = {
24
+ id: string | null;
25
+ guild_id: string | null;
26
+ role_id: string | null;
27
+ inactive_count: number | null;
28
+ active_count: number | null;
29
+ captured_at: Date | null;
30
+ };
31
+ export type RoleStatisticMaxAggregateOutputType = {
32
+ id: string | null;
33
+ guild_id: string | null;
34
+ role_id: string | null;
35
+ inactive_count: number | null;
36
+ active_count: number | null;
37
+ captured_at: Date | null;
38
+ };
39
+ export type RoleStatisticCountAggregateOutputType = {
40
+ id: number;
41
+ guild_id: number;
42
+ role_id: number;
43
+ inactive_count: number;
44
+ active_count: number;
45
+ captured_at: number;
46
+ _all: number;
47
+ };
48
+ export type RoleStatisticAvgAggregateInputType = {
49
+ inactive_count?: true;
50
+ active_count?: true;
51
+ };
52
+ export type RoleStatisticSumAggregateInputType = {
53
+ inactive_count?: true;
54
+ active_count?: true;
55
+ };
56
+ export type RoleStatisticMinAggregateInputType = {
57
+ id?: true;
58
+ guild_id?: true;
59
+ role_id?: true;
60
+ inactive_count?: true;
61
+ active_count?: true;
62
+ captured_at?: true;
63
+ };
64
+ export type RoleStatisticMaxAggregateInputType = {
65
+ id?: true;
66
+ guild_id?: true;
67
+ role_id?: true;
68
+ inactive_count?: true;
69
+ active_count?: true;
70
+ captured_at?: true;
71
+ };
72
+ export type RoleStatisticCountAggregateInputType = {
73
+ id?: true;
74
+ guild_id?: true;
75
+ role_id?: true;
76
+ inactive_count?: true;
77
+ active_count?: true;
78
+ captured_at?: true;
79
+ _all?: true;
80
+ };
81
+ export type RoleStatisticAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
82
+ /**
83
+ * Filter which RoleStatistic to aggregate.
84
+ */
85
+ where?: Prisma.RoleStatisticWhereInput;
86
+ /**
87
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
88
+ *
89
+ * Determine the order of RoleStatistics to fetch.
90
+ */
91
+ orderBy?: Prisma.RoleStatisticOrderByWithRelationInput | Prisma.RoleStatisticOrderByWithRelationInput[];
92
+ /**
93
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
94
+ *
95
+ * Sets the start position
96
+ */
97
+ cursor?: Prisma.RoleStatisticWhereUniqueInput;
98
+ /**
99
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
100
+ *
101
+ * Take `±n` RoleStatistics from the position of the cursor.
102
+ */
103
+ take?: number;
104
+ /**
105
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
106
+ *
107
+ * Skip the first `n` RoleStatistics.
108
+ */
109
+ skip?: number;
110
+ /**
111
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
112
+ *
113
+ * Count returned RoleStatistics
114
+ **/
115
+ _count?: true | RoleStatisticCountAggregateInputType;
116
+ /**
117
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
118
+ *
119
+ * Select which fields to average
120
+ **/
121
+ _avg?: RoleStatisticAvgAggregateInputType;
122
+ /**
123
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
124
+ *
125
+ * Select which fields to sum
126
+ **/
127
+ _sum?: RoleStatisticSumAggregateInputType;
128
+ /**
129
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
130
+ *
131
+ * Select which fields to find the minimum value
132
+ **/
133
+ _min?: RoleStatisticMinAggregateInputType;
134
+ /**
135
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
136
+ *
137
+ * Select which fields to find the maximum value
138
+ **/
139
+ _max?: RoleStatisticMaxAggregateInputType;
140
+ };
141
+ export type GetRoleStatisticAggregateType<T extends RoleStatisticAggregateArgs> = {
142
+ [P in keyof T & keyof AggregateRoleStatistic]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateRoleStatistic[P]> : Prisma.GetScalarType<T[P], AggregateRoleStatistic[P]>;
143
+ };
144
+ export type RoleStatisticGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
145
+ where?: Prisma.RoleStatisticWhereInput;
146
+ orderBy?: Prisma.RoleStatisticOrderByWithAggregationInput | Prisma.RoleStatisticOrderByWithAggregationInput[];
147
+ by: Prisma.RoleStatisticScalarFieldEnum[] | Prisma.RoleStatisticScalarFieldEnum;
148
+ having?: Prisma.RoleStatisticScalarWhereWithAggregatesInput;
149
+ take?: number;
150
+ skip?: number;
151
+ _count?: RoleStatisticCountAggregateInputType | true;
152
+ _avg?: RoleStatisticAvgAggregateInputType;
153
+ _sum?: RoleStatisticSumAggregateInputType;
154
+ _min?: RoleStatisticMinAggregateInputType;
155
+ _max?: RoleStatisticMaxAggregateInputType;
156
+ };
157
+ export type RoleStatisticGroupByOutputType = {
158
+ id: string;
159
+ guild_id: string;
160
+ role_id: string;
161
+ inactive_count: number;
162
+ active_count: number;
163
+ captured_at: Date;
164
+ _count: RoleStatisticCountAggregateOutputType | null;
165
+ _avg: RoleStatisticAvgAggregateOutputType | null;
166
+ _sum: RoleStatisticSumAggregateOutputType | null;
167
+ _min: RoleStatisticMinAggregateOutputType | null;
168
+ _max: RoleStatisticMaxAggregateOutputType | null;
169
+ };
170
+ export type GetRoleStatisticGroupByPayload<T extends RoleStatisticGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<RoleStatisticGroupByOutputType, T['by']> & {
171
+ [P in ((keyof T) & (keyof RoleStatisticGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], RoleStatisticGroupByOutputType[P]> : Prisma.GetScalarType<T[P], RoleStatisticGroupByOutputType[P]>;
172
+ }>>;
173
+ export type RoleStatisticWhereInput = {
174
+ AND?: Prisma.RoleStatisticWhereInput | Prisma.RoleStatisticWhereInput[];
175
+ OR?: Prisma.RoleStatisticWhereInput[];
176
+ NOT?: Prisma.RoleStatisticWhereInput | Prisma.RoleStatisticWhereInput[];
177
+ id?: Prisma.StringFilter<"RoleStatistic"> | string;
178
+ guild_id?: Prisma.StringFilter<"RoleStatistic"> | string;
179
+ role_id?: Prisma.StringFilter<"RoleStatistic"> | string;
180
+ inactive_count?: Prisma.IntFilter<"RoleStatistic"> | number;
181
+ active_count?: Prisma.IntFilter<"RoleStatistic"> | number;
182
+ captured_at?: Prisma.DateTimeFilter<"RoleStatistic"> | Date | string;
183
+ };
184
+ export type RoleStatisticOrderByWithRelationInput = {
185
+ id?: Prisma.SortOrder;
186
+ guild_id?: Prisma.SortOrder;
187
+ role_id?: Prisma.SortOrder;
188
+ inactive_count?: Prisma.SortOrder;
189
+ active_count?: Prisma.SortOrder;
190
+ captured_at?: Prisma.SortOrder;
191
+ };
192
+ export type RoleStatisticWhereUniqueInput = Prisma.AtLeast<{
193
+ id?: string;
194
+ AND?: Prisma.RoleStatisticWhereInput | Prisma.RoleStatisticWhereInput[];
195
+ OR?: Prisma.RoleStatisticWhereInput[];
196
+ NOT?: Prisma.RoleStatisticWhereInput | Prisma.RoleStatisticWhereInput[];
197
+ guild_id?: Prisma.StringFilter<"RoleStatistic"> | string;
198
+ role_id?: Prisma.StringFilter<"RoleStatistic"> | string;
199
+ inactive_count?: Prisma.IntFilter<"RoleStatistic"> | number;
200
+ active_count?: Prisma.IntFilter<"RoleStatistic"> | number;
201
+ captured_at?: Prisma.DateTimeFilter<"RoleStatistic"> | Date | string;
202
+ }, "id">;
203
+ export type RoleStatisticOrderByWithAggregationInput = {
204
+ id?: Prisma.SortOrder;
205
+ guild_id?: Prisma.SortOrder;
206
+ role_id?: Prisma.SortOrder;
207
+ inactive_count?: Prisma.SortOrder;
208
+ active_count?: Prisma.SortOrder;
209
+ captured_at?: Prisma.SortOrder;
210
+ _count?: Prisma.RoleStatisticCountOrderByAggregateInput;
211
+ _avg?: Prisma.RoleStatisticAvgOrderByAggregateInput;
212
+ _max?: Prisma.RoleStatisticMaxOrderByAggregateInput;
213
+ _min?: Prisma.RoleStatisticMinOrderByAggregateInput;
214
+ _sum?: Prisma.RoleStatisticSumOrderByAggregateInput;
215
+ };
216
+ export type RoleStatisticScalarWhereWithAggregatesInput = {
217
+ AND?: Prisma.RoleStatisticScalarWhereWithAggregatesInput | Prisma.RoleStatisticScalarWhereWithAggregatesInput[];
218
+ OR?: Prisma.RoleStatisticScalarWhereWithAggregatesInput[];
219
+ NOT?: Prisma.RoleStatisticScalarWhereWithAggregatesInput | Prisma.RoleStatisticScalarWhereWithAggregatesInput[];
220
+ id?: Prisma.StringWithAggregatesFilter<"RoleStatistic"> | string;
221
+ guild_id?: Prisma.StringWithAggregatesFilter<"RoleStatistic"> | string;
222
+ role_id?: Prisma.StringWithAggregatesFilter<"RoleStatistic"> | string;
223
+ inactive_count?: Prisma.IntWithAggregatesFilter<"RoleStatistic"> | number;
224
+ active_count?: Prisma.IntWithAggregatesFilter<"RoleStatistic"> | number;
225
+ captured_at?: Prisma.DateTimeWithAggregatesFilter<"RoleStatistic"> | Date | string;
226
+ };
227
+ export type RoleStatisticCreateInput = {
228
+ id?: string;
229
+ guild_id: string;
230
+ role_id: string;
231
+ inactive_count?: number;
232
+ active_count?: number;
233
+ captured_at?: Date | string;
234
+ };
235
+ export type RoleStatisticUncheckedCreateInput = {
236
+ id?: string;
237
+ guild_id: string;
238
+ role_id: string;
239
+ inactive_count?: number;
240
+ active_count?: number;
241
+ captured_at?: Date | string;
242
+ };
243
+ export type RoleStatisticUpdateInput = {
244
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
245
+ guild_id?: Prisma.StringFieldUpdateOperationsInput | string;
246
+ role_id?: Prisma.StringFieldUpdateOperationsInput | string;
247
+ inactive_count?: Prisma.IntFieldUpdateOperationsInput | number;
248
+ active_count?: Prisma.IntFieldUpdateOperationsInput | number;
249
+ captured_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
250
+ };
251
+ export type RoleStatisticUncheckedUpdateInput = {
252
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
253
+ guild_id?: Prisma.StringFieldUpdateOperationsInput | string;
254
+ role_id?: Prisma.StringFieldUpdateOperationsInput | string;
255
+ inactive_count?: Prisma.IntFieldUpdateOperationsInput | number;
256
+ active_count?: Prisma.IntFieldUpdateOperationsInput | number;
257
+ captured_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
258
+ };
259
+ export type RoleStatisticCreateManyInput = {
260
+ id?: string;
261
+ guild_id: string;
262
+ role_id: string;
263
+ inactive_count?: number;
264
+ active_count?: number;
265
+ captured_at?: Date | string;
266
+ };
267
+ export type RoleStatisticUpdateManyMutationInput = {
268
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
269
+ guild_id?: Prisma.StringFieldUpdateOperationsInput | string;
270
+ role_id?: Prisma.StringFieldUpdateOperationsInput | string;
271
+ inactive_count?: Prisma.IntFieldUpdateOperationsInput | number;
272
+ active_count?: Prisma.IntFieldUpdateOperationsInput | number;
273
+ captured_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
274
+ };
275
+ export type RoleStatisticUncheckedUpdateManyInput = {
276
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
277
+ guild_id?: Prisma.StringFieldUpdateOperationsInput | string;
278
+ role_id?: Prisma.StringFieldUpdateOperationsInput | string;
279
+ inactive_count?: Prisma.IntFieldUpdateOperationsInput | number;
280
+ active_count?: Prisma.IntFieldUpdateOperationsInput | number;
281
+ captured_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string;
282
+ };
283
+ export type RoleStatisticCountOrderByAggregateInput = {
284
+ id?: Prisma.SortOrder;
285
+ guild_id?: Prisma.SortOrder;
286
+ role_id?: Prisma.SortOrder;
287
+ inactive_count?: Prisma.SortOrder;
288
+ active_count?: Prisma.SortOrder;
289
+ captured_at?: Prisma.SortOrder;
290
+ };
291
+ export type RoleStatisticAvgOrderByAggregateInput = {
292
+ inactive_count?: Prisma.SortOrder;
293
+ active_count?: Prisma.SortOrder;
294
+ };
295
+ export type RoleStatisticMaxOrderByAggregateInput = {
296
+ id?: Prisma.SortOrder;
297
+ guild_id?: Prisma.SortOrder;
298
+ role_id?: Prisma.SortOrder;
299
+ inactive_count?: Prisma.SortOrder;
300
+ active_count?: Prisma.SortOrder;
301
+ captured_at?: Prisma.SortOrder;
302
+ };
303
+ export type RoleStatisticMinOrderByAggregateInput = {
304
+ id?: Prisma.SortOrder;
305
+ guild_id?: Prisma.SortOrder;
306
+ role_id?: Prisma.SortOrder;
307
+ inactive_count?: Prisma.SortOrder;
308
+ active_count?: Prisma.SortOrder;
309
+ captured_at?: Prisma.SortOrder;
310
+ };
311
+ export type RoleStatisticSumOrderByAggregateInput = {
312
+ inactive_count?: Prisma.SortOrder;
313
+ active_count?: Prisma.SortOrder;
314
+ };
315
+ export type IntFieldUpdateOperationsInput = {
316
+ set?: number;
317
+ increment?: number;
318
+ decrement?: number;
319
+ multiply?: number;
320
+ divide?: number;
321
+ };
322
+ export type RoleStatisticSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
323
+ id?: boolean;
324
+ guild_id?: boolean;
325
+ role_id?: boolean;
326
+ inactive_count?: boolean;
327
+ active_count?: boolean;
328
+ captured_at?: boolean;
329
+ }, ExtArgs["result"]["roleStatistic"]>;
330
+ export type RoleStatisticSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
331
+ id?: boolean;
332
+ guild_id?: boolean;
333
+ role_id?: boolean;
334
+ inactive_count?: boolean;
335
+ active_count?: boolean;
336
+ captured_at?: boolean;
337
+ }, ExtArgs["result"]["roleStatistic"]>;
338
+ export type RoleStatisticSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
339
+ id?: boolean;
340
+ guild_id?: boolean;
341
+ role_id?: boolean;
342
+ inactive_count?: boolean;
343
+ active_count?: boolean;
344
+ captured_at?: boolean;
345
+ }, ExtArgs["result"]["roleStatistic"]>;
346
+ export type RoleStatisticSelectScalar = {
347
+ id?: boolean;
348
+ guild_id?: boolean;
349
+ role_id?: boolean;
350
+ inactive_count?: boolean;
351
+ active_count?: boolean;
352
+ captured_at?: boolean;
353
+ };
354
+ export type RoleStatisticOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "guild_id" | "role_id" | "inactive_count" | "active_count" | "captured_at", ExtArgs["result"]["roleStatistic"]>;
355
+ export type $RoleStatisticPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
356
+ name: "RoleStatistic";
357
+ objects: {};
358
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
359
+ id: string;
360
+ guild_id: string;
361
+ role_id: string;
362
+ inactive_count: number;
363
+ active_count: number;
364
+ captured_at: Date;
365
+ }, ExtArgs["result"]["roleStatistic"]>;
366
+ composites: {};
367
+ };
368
+ export type RoleStatisticGetPayload<S extends boolean | null | undefined | RoleStatisticDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload, S>;
369
+ export type RoleStatisticCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<RoleStatisticFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
370
+ select?: RoleStatisticCountAggregateInputType | true;
371
+ };
372
+ export interface RoleStatisticDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
373
+ [K: symbol]: {
374
+ types: Prisma.TypeMap<ExtArgs>['model']['RoleStatistic'];
375
+ meta: {
376
+ name: 'RoleStatistic';
377
+ };
378
+ };
379
+ /**
380
+ * Find zero or one RoleStatistic that matches the filter.
381
+ * @param {RoleStatisticFindUniqueArgs} args - Arguments to find a RoleStatistic
382
+ * @example
383
+ * // Get one RoleStatistic
384
+ * const roleStatistic = await prisma.roleStatistic.findUnique({
385
+ * where: {
386
+ * // ... provide filter here
387
+ * }
388
+ * })
389
+ */
390
+ findUnique<T extends RoleStatisticFindUniqueArgs>(args: Prisma.SelectSubset<T, RoleStatisticFindUniqueArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
391
+ /**
392
+ * Find one RoleStatistic that matches the filter or throw an error with `error.code='P2025'`
393
+ * if no matches were found.
394
+ * @param {RoleStatisticFindUniqueOrThrowArgs} args - Arguments to find a RoleStatistic
395
+ * @example
396
+ * // Get one RoleStatistic
397
+ * const roleStatistic = await prisma.roleStatistic.findUniqueOrThrow({
398
+ * where: {
399
+ * // ... provide filter here
400
+ * }
401
+ * })
402
+ */
403
+ findUniqueOrThrow<T extends RoleStatisticFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, RoleStatisticFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
404
+ /**
405
+ * Find the first RoleStatistic that matches the filter.
406
+ * Note, that providing `undefined` is treated as the value not being there.
407
+ * Read more here: https://pris.ly/d/null-undefined
408
+ * @param {RoleStatisticFindFirstArgs} args - Arguments to find a RoleStatistic
409
+ * @example
410
+ * // Get one RoleStatistic
411
+ * const roleStatistic = await prisma.roleStatistic.findFirst({
412
+ * where: {
413
+ * // ... provide filter here
414
+ * }
415
+ * })
416
+ */
417
+ findFirst<T extends RoleStatisticFindFirstArgs>(args?: Prisma.SelectSubset<T, RoleStatisticFindFirstArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
418
+ /**
419
+ * Find the first RoleStatistic that matches the filter or
420
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
421
+ * Note, that providing `undefined` is treated as the value not being there.
422
+ * Read more here: https://pris.ly/d/null-undefined
423
+ * @param {RoleStatisticFindFirstOrThrowArgs} args - Arguments to find a RoleStatistic
424
+ * @example
425
+ * // Get one RoleStatistic
426
+ * const roleStatistic = await prisma.roleStatistic.findFirstOrThrow({
427
+ * where: {
428
+ * // ... provide filter here
429
+ * }
430
+ * })
431
+ */
432
+ findFirstOrThrow<T extends RoleStatisticFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, RoleStatisticFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
433
+ /**
434
+ * Find zero or more RoleStatistics that matches the filter.
435
+ * Note, that providing `undefined` is treated as the value not being there.
436
+ * Read more here: https://pris.ly/d/null-undefined
437
+ * @param {RoleStatisticFindManyArgs} args - Arguments to filter and select certain fields only.
438
+ * @example
439
+ * // Get all RoleStatistics
440
+ * const roleStatistics = await prisma.roleStatistic.findMany()
441
+ *
442
+ * // Get first 10 RoleStatistics
443
+ * const roleStatistics = await prisma.roleStatistic.findMany({ take: 10 })
444
+ *
445
+ * // Only select the `id`
446
+ * const roleStatisticWithIdOnly = await prisma.roleStatistic.findMany({ select: { id: true } })
447
+ *
448
+ */
449
+ findMany<T extends RoleStatisticFindManyArgs>(args?: Prisma.SelectSubset<T, RoleStatisticFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
450
+ /**
451
+ * Create a RoleStatistic.
452
+ * @param {RoleStatisticCreateArgs} args - Arguments to create a RoleStatistic.
453
+ * @example
454
+ * // Create one RoleStatistic
455
+ * const RoleStatistic = await prisma.roleStatistic.create({
456
+ * data: {
457
+ * // ... data to create a RoleStatistic
458
+ * }
459
+ * })
460
+ *
461
+ */
462
+ create<T extends RoleStatisticCreateArgs>(args: Prisma.SelectSubset<T, RoleStatisticCreateArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
463
+ /**
464
+ * Create many RoleStatistics.
465
+ * @param {RoleStatisticCreateManyArgs} args - Arguments to create many RoleStatistics.
466
+ * @example
467
+ * // Create many RoleStatistics
468
+ * const roleStatistic = await prisma.roleStatistic.createMany({
469
+ * data: [
470
+ * // ... provide data here
471
+ * ]
472
+ * })
473
+ *
474
+ */
475
+ createMany<T extends RoleStatisticCreateManyArgs>(args?: Prisma.SelectSubset<T, RoleStatisticCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
476
+ /**
477
+ * Create many RoleStatistics and returns the data saved in the database.
478
+ * @param {RoleStatisticCreateManyAndReturnArgs} args - Arguments to create many RoleStatistics.
479
+ * @example
480
+ * // Create many RoleStatistics
481
+ * const roleStatistic = await prisma.roleStatistic.createManyAndReturn({
482
+ * data: [
483
+ * // ... provide data here
484
+ * ]
485
+ * })
486
+ *
487
+ * // Create many RoleStatistics and only return the `id`
488
+ * const roleStatisticWithIdOnly = await prisma.roleStatistic.createManyAndReturn({
489
+ * select: { id: true },
490
+ * data: [
491
+ * // ... provide data here
492
+ * ]
493
+ * })
494
+ * Note, that providing `undefined` is treated as the value not being there.
495
+ * Read more here: https://pris.ly/d/null-undefined
496
+ *
497
+ */
498
+ createManyAndReturn<T extends RoleStatisticCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, RoleStatisticCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
499
+ /**
500
+ * Delete a RoleStatistic.
501
+ * @param {RoleStatisticDeleteArgs} args - Arguments to delete one RoleStatistic.
502
+ * @example
503
+ * // Delete one RoleStatistic
504
+ * const RoleStatistic = await prisma.roleStatistic.delete({
505
+ * where: {
506
+ * // ... filter to delete one RoleStatistic
507
+ * }
508
+ * })
509
+ *
510
+ */
511
+ delete<T extends RoleStatisticDeleteArgs>(args: Prisma.SelectSubset<T, RoleStatisticDeleteArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
512
+ /**
513
+ * Update one RoleStatistic.
514
+ * @param {RoleStatisticUpdateArgs} args - Arguments to update one RoleStatistic.
515
+ * @example
516
+ * // Update one RoleStatistic
517
+ * const roleStatistic = await prisma.roleStatistic.update({
518
+ * where: {
519
+ * // ... provide filter here
520
+ * },
521
+ * data: {
522
+ * // ... provide data here
523
+ * }
524
+ * })
525
+ *
526
+ */
527
+ update<T extends RoleStatisticUpdateArgs>(args: Prisma.SelectSubset<T, RoleStatisticUpdateArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
528
+ /**
529
+ * Delete zero or more RoleStatistics.
530
+ * @param {RoleStatisticDeleteManyArgs} args - Arguments to filter RoleStatistics to delete.
531
+ * @example
532
+ * // Delete a few RoleStatistics
533
+ * const { count } = await prisma.roleStatistic.deleteMany({
534
+ * where: {
535
+ * // ... provide filter here
536
+ * }
537
+ * })
538
+ *
539
+ */
540
+ deleteMany<T extends RoleStatisticDeleteManyArgs>(args?: Prisma.SelectSubset<T, RoleStatisticDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
541
+ /**
542
+ * Update zero or more RoleStatistics.
543
+ * Note, that providing `undefined` is treated as the value not being there.
544
+ * Read more here: https://pris.ly/d/null-undefined
545
+ * @param {RoleStatisticUpdateManyArgs} args - Arguments to update one or more rows.
546
+ * @example
547
+ * // Update many RoleStatistics
548
+ * const roleStatistic = await prisma.roleStatistic.updateMany({
549
+ * where: {
550
+ * // ... provide filter here
551
+ * },
552
+ * data: {
553
+ * // ... provide data here
554
+ * }
555
+ * })
556
+ *
557
+ */
558
+ updateMany<T extends RoleStatisticUpdateManyArgs>(args: Prisma.SelectSubset<T, RoleStatisticUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
559
+ /**
560
+ * Update zero or more RoleStatistics and returns the data updated in the database.
561
+ * @param {RoleStatisticUpdateManyAndReturnArgs} args - Arguments to update many RoleStatistics.
562
+ * @example
563
+ * // Update many RoleStatistics
564
+ * const roleStatistic = await prisma.roleStatistic.updateManyAndReturn({
565
+ * where: {
566
+ * // ... provide filter here
567
+ * },
568
+ * data: [
569
+ * // ... provide data here
570
+ * ]
571
+ * })
572
+ *
573
+ * // Update zero or more RoleStatistics and only return the `id`
574
+ * const roleStatisticWithIdOnly = await prisma.roleStatistic.updateManyAndReturn({
575
+ * select: { id: true },
576
+ * where: {
577
+ * // ... provide filter here
578
+ * },
579
+ * data: [
580
+ * // ... provide data here
581
+ * ]
582
+ * })
583
+ * Note, that providing `undefined` is treated as the value not being there.
584
+ * Read more here: https://pris.ly/d/null-undefined
585
+ *
586
+ */
587
+ updateManyAndReturn<T extends RoleStatisticUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, RoleStatisticUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
588
+ /**
589
+ * Create or update one RoleStatistic.
590
+ * @param {RoleStatisticUpsertArgs} args - Arguments to update or create a RoleStatistic.
591
+ * @example
592
+ * // Update or create a RoleStatistic
593
+ * const roleStatistic = await prisma.roleStatistic.upsert({
594
+ * create: {
595
+ * // ... data to create a RoleStatistic
596
+ * },
597
+ * update: {
598
+ * // ... in case it already exists, update
599
+ * },
600
+ * where: {
601
+ * // ... the filter for the RoleStatistic we want to update
602
+ * }
603
+ * })
604
+ */
605
+ upsert<T extends RoleStatisticUpsertArgs>(args: Prisma.SelectSubset<T, RoleStatisticUpsertArgs<ExtArgs>>): Prisma.Prisma__RoleStatisticClient<runtime.Types.Result.GetResult<Prisma.$RoleStatisticPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
606
+ /**
607
+ * Count the number of RoleStatistics.
608
+ * Note, that providing `undefined` is treated as the value not being there.
609
+ * Read more here: https://pris.ly/d/null-undefined
610
+ * @param {RoleStatisticCountArgs} args - Arguments to filter RoleStatistics to count.
611
+ * @example
612
+ * // Count the number of RoleStatistics
613
+ * const count = await prisma.roleStatistic.count({
614
+ * where: {
615
+ * // ... the filter for the RoleStatistics we want to count
616
+ * }
617
+ * })
618
+ **/
619
+ count<T extends RoleStatisticCountArgs>(args?: Prisma.Subset<T, RoleStatisticCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], RoleStatisticCountAggregateOutputType> : number>;
620
+ /**
621
+ * Allows you to perform aggregations operations on a RoleStatistic.
622
+ * Note, that providing `undefined` is treated as the value not being there.
623
+ * Read more here: https://pris.ly/d/null-undefined
624
+ * @param {RoleStatisticAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
625
+ * @example
626
+ * // Ordered by age ascending
627
+ * // Where email contains prisma.io
628
+ * // Limited to the 10 users
629
+ * const aggregations = await prisma.user.aggregate({
630
+ * _avg: {
631
+ * age: true,
632
+ * },
633
+ * where: {
634
+ * email: {
635
+ * contains: "prisma.io",
636
+ * },
637
+ * },
638
+ * orderBy: {
639
+ * age: "asc",
640
+ * },
641
+ * take: 10,
642
+ * })
643
+ **/
644
+ aggregate<T extends RoleStatisticAggregateArgs>(args: Prisma.Subset<T, RoleStatisticAggregateArgs>): Prisma.PrismaPromise<GetRoleStatisticAggregateType<T>>;
645
+ /**
646
+ * Group by RoleStatistic.
647
+ * Note, that providing `undefined` is treated as the value not being there.
648
+ * Read more here: https://pris.ly/d/null-undefined
649
+ * @param {RoleStatisticGroupByArgs} args - Group by arguments.
650
+ * @example
651
+ * // Group by city, order by createdAt, get count
652
+ * const result = await prisma.user.groupBy({
653
+ * by: ['city', 'createdAt'],
654
+ * orderBy: {
655
+ * createdAt: true
656
+ * },
657
+ * _count: {
658
+ * _all: true
659
+ * },
660
+ * })
661
+ *
662
+ **/
663
+ groupBy<T extends RoleStatisticGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
664
+ orderBy: RoleStatisticGroupByArgs['orderBy'];
665
+ } : {
666
+ orderBy?: RoleStatisticGroupByArgs['orderBy'];
667
+ }, 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 ? {
668
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
669
+ Error,
670
+ 'Field ',
671
+ P,
672
+ ` in "having" needs to be provided in "by"`
673
+ ];
674
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
675
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
676
+ }[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 ? {} : {
677
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
678
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
679
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
680
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, RoleStatisticGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetRoleStatisticGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
681
+ /**
682
+ * Fields of the RoleStatistic model
683
+ */
684
+ readonly fields: RoleStatisticFieldRefs;
685
+ }
686
+ /**
687
+ * The delegate class that acts as a "Promise-like" for RoleStatistic.
688
+ * Why is this prefixed with `Prisma__`?
689
+ * Because we want to prevent naming conflicts as mentioned in
690
+ * https://github.com/prisma/prisma-client-js/issues/707
691
+ */
692
+ export interface Prisma__RoleStatisticClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
693
+ readonly [Symbol.toStringTag]: "PrismaPromise";
694
+ /**
695
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
696
+ * @param onfulfilled The callback to execute when the Promise is resolved.
697
+ * @param onrejected The callback to execute when the Promise is rejected.
698
+ * @returns A Promise for the completion of which ever callback is executed.
699
+ */
700
+ 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>;
701
+ /**
702
+ * Attaches a callback for only the rejection of the Promise.
703
+ * @param onrejected The callback to execute when the Promise is rejected.
704
+ * @returns A Promise for the completion of the callback.
705
+ */
706
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
707
+ /**
708
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
709
+ * resolved value cannot be modified from the callback.
710
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
711
+ * @returns A Promise for the completion of the callback.
712
+ */
713
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
714
+ }
715
+ /**
716
+ * Fields of the RoleStatistic model
717
+ */
718
+ export interface RoleStatisticFieldRefs {
719
+ readonly id: Prisma.FieldRef<"RoleStatistic", 'String'>;
720
+ readonly guild_id: Prisma.FieldRef<"RoleStatistic", 'String'>;
721
+ readonly role_id: Prisma.FieldRef<"RoleStatistic", 'String'>;
722
+ readonly inactive_count: Prisma.FieldRef<"RoleStatistic", 'Int'>;
723
+ readonly active_count: Prisma.FieldRef<"RoleStatistic", 'Int'>;
724
+ readonly captured_at: Prisma.FieldRef<"RoleStatistic", 'DateTime'>;
725
+ }
726
+ /**
727
+ * RoleStatistic findUnique
728
+ */
729
+ export type RoleStatisticFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
730
+ /**
731
+ * Select specific fields to fetch from the RoleStatistic
732
+ */
733
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
734
+ /**
735
+ * Omit specific fields from the RoleStatistic
736
+ */
737
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
738
+ /**
739
+ * Filter, which RoleStatistic to fetch.
740
+ */
741
+ where: Prisma.RoleStatisticWhereUniqueInput;
742
+ };
743
+ /**
744
+ * RoleStatistic findUniqueOrThrow
745
+ */
746
+ export type RoleStatisticFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
747
+ /**
748
+ * Select specific fields to fetch from the RoleStatistic
749
+ */
750
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
751
+ /**
752
+ * Omit specific fields from the RoleStatistic
753
+ */
754
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
755
+ /**
756
+ * Filter, which RoleStatistic to fetch.
757
+ */
758
+ where: Prisma.RoleStatisticWhereUniqueInput;
759
+ };
760
+ /**
761
+ * RoleStatistic findFirst
762
+ */
763
+ export type RoleStatisticFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
764
+ /**
765
+ * Select specific fields to fetch from the RoleStatistic
766
+ */
767
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
768
+ /**
769
+ * Omit specific fields from the RoleStatistic
770
+ */
771
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
772
+ /**
773
+ * Filter, which RoleStatistic to fetch.
774
+ */
775
+ where?: Prisma.RoleStatisticWhereInput;
776
+ /**
777
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
778
+ *
779
+ * Determine the order of RoleStatistics to fetch.
780
+ */
781
+ orderBy?: Prisma.RoleStatisticOrderByWithRelationInput | Prisma.RoleStatisticOrderByWithRelationInput[];
782
+ /**
783
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
784
+ *
785
+ * Sets the position for searching for RoleStatistics.
786
+ */
787
+ cursor?: Prisma.RoleStatisticWhereUniqueInput;
788
+ /**
789
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
790
+ *
791
+ * Take `±n` RoleStatistics from the position of the cursor.
792
+ */
793
+ take?: number;
794
+ /**
795
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
796
+ *
797
+ * Skip the first `n` RoleStatistics.
798
+ */
799
+ skip?: number;
800
+ /**
801
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
802
+ *
803
+ * Filter by unique combinations of RoleStatistics.
804
+ */
805
+ distinct?: Prisma.RoleStatisticScalarFieldEnum | Prisma.RoleStatisticScalarFieldEnum[];
806
+ };
807
+ /**
808
+ * RoleStatistic findFirstOrThrow
809
+ */
810
+ export type RoleStatisticFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
811
+ /**
812
+ * Select specific fields to fetch from the RoleStatistic
813
+ */
814
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
815
+ /**
816
+ * Omit specific fields from the RoleStatistic
817
+ */
818
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
819
+ /**
820
+ * Filter, which RoleStatistic to fetch.
821
+ */
822
+ where?: Prisma.RoleStatisticWhereInput;
823
+ /**
824
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
825
+ *
826
+ * Determine the order of RoleStatistics to fetch.
827
+ */
828
+ orderBy?: Prisma.RoleStatisticOrderByWithRelationInput | Prisma.RoleStatisticOrderByWithRelationInput[];
829
+ /**
830
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
831
+ *
832
+ * Sets the position for searching for RoleStatistics.
833
+ */
834
+ cursor?: Prisma.RoleStatisticWhereUniqueInput;
835
+ /**
836
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
837
+ *
838
+ * Take `±n` RoleStatistics from the position of the cursor.
839
+ */
840
+ take?: number;
841
+ /**
842
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
843
+ *
844
+ * Skip the first `n` RoleStatistics.
845
+ */
846
+ skip?: number;
847
+ /**
848
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
849
+ *
850
+ * Filter by unique combinations of RoleStatistics.
851
+ */
852
+ distinct?: Prisma.RoleStatisticScalarFieldEnum | Prisma.RoleStatisticScalarFieldEnum[];
853
+ };
854
+ /**
855
+ * RoleStatistic findMany
856
+ */
857
+ export type RoleStatisticFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
858
+ /**
859
+ * Select specific fields to fetch from the RoleStatistic
860
+ */
861
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
862
+ /**
863
+ * Omit specific fields from the RoleStatistic
864
+ */
865
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
866
+ /**
867
+ * Filter, which RoleStatistics to fetch.
868
+ */
869
+ where?: Prisma.RoleStatisticWhereInput;
870
+ /**
871
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
872
+ *
873
+ * Determine the order of RoleStatistics to fetch.
874
+ */
875
+ orderBy?: Prisma.RoleStatisticOrderByWithRelationInput | Prisma.RoleStatisticOrderByWithRelationInput[];
876
+ /**
877
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
878
+ *
879
+ * Sets the position for listing RoleStatistics.
880
+ */
881
+ cursor?: Prisma.RoleStatisticWhereUniqueInput;
882
+ /**
883
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
884
+ *
885
+ * Take `±n` RoleStatistics from the position of the cursor.
886
+ */
887
+ take?: number;
888
+ /**
889
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
890
+ *
891
+ * Skip the first `n` RoleStatistics.
892
+ */
893
+ skip?: number;
894
+ /**
895
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
896
+ *
897
+ * Filter by unique combinations of RoleStatistics.
898
+ */
899
+ distinct?: Prisma.RoleStatisticScalarFieldEnum | Prisma.RoleStatisticScalarFieldEnum[];
900
+ };
901
+ /**
902
+ * RoleStatistic create
903
+ */
904
+ export type RoleStatisticCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
905
+ /**
906
+ * Select specific fields to fetch from the RoleStatistic
907
+ */
908
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
909
+ /**
910
+ * Omit specific fields from the RoleStatistic
911
+ */
912
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
913
+ /**
914
+ * The data needed to create a RoleStatistic.
915
+ */
916
+ data: Prisma.XOR<Prisma.RoleStatisticCreateInput, Prisma.RoleStatisticUncheckedCreateInput>;
917
+ };
918
+ /**
919
+ * RoleStatistic createMany
920
+ */
921
+ export type RoleStatisticCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
922
+ /**
923
+ * The data used to create many RoleStatistics.
924
+ */
925
+ data: Prisma.RoleStatisticCreateManyInput | Prisma.RoleStatisticCreateManyInput[];
926
+ skipDuplicates?: boolean;
927
+ };
928
+ /**
929
+ * RoleStatistic createManyAndReturn
930
+ */
931
+ export type RoleStatisticCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
932
+ /**
933
+ * Select specific fields to fetch from the RoleStatistic
934
+ */
935
+ select?: Prisma.RoleStatisticSelectCreateManyAndReturn<ExtArgs> | null;
936
+ /**
937
+ * Omit specific fields from the RoleStatistic
938
+ */
939
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
940
+ /**
941
+ * The data used to create many RoleStatistics.
942
+ */
943
+ data: Prisma.RoleStatisticCreateManyInput | Prisma.RoleStatisticCreateManyInput[];
944
+ skipDuplicates?: boolean;
945
+ };
946
+ /**
947
+ * RoleStatistic update
948
+ */
949
+ export type RoleStatisticUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
950
+ /**
951
+ * Select specific fields to fetch from the RoleStatistic
952
+ */
953
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
954
+ /**
955
+ * Omit specific fields from the RoleStatistic
956
+ */
957
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
958
+ /**
959
+ * The data needed to update a RoleStatistic.
960
+ */
961
+ data: Prisma.XOR<Prisma.RoleStatisticUpdateInput, Prisma.RoleStatisticUncheckedUpdateInput>;
962
+ /**
963
+ * Choose, which RoleStatistic to update.
964
+ */
965
+ where: Prisma.RoleStatisticWhereUniqueInput;
966
+ };
967
+ /**
968
+ * RoleStatistic updateMany
969
+ */
970
+ export type RoleStatisticUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
971
+ /**
972
+ * The data used to update RoleStatistics.
973
+ */
974
+ data: Prisma.XOR<Prisma.RoleStatisticUpdateManyMutationInput, Prisma.RoleStatisticUncheckedUpdateManyInput>;
975
+ /**
976
+ * Filter which RoleStatistics to update
977
+ */
978
+ where?: Prisma.RoleStatisticWhereInput;
979
+ /**
980
+ * Limit how many RoleStatistics to update.
981
+ */
982
+ limit?: number;
983
+ };
984
+ /**
985
+ * RoleStatistic updateManyAndReturn
986
+ */
987
+ export type RoleStatisticUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
988
+ /**
989
+ * Select specific fields to fetch from the RoleStatistic
990
+ */
991
+ select?: Prisma.RoleStatisticSelectUpdateManyAndReturn<ExtArgs> | null;
992
+ /**
993
+ * Omit specific fields from the RoleStatistic
994
+ */
995
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
996
+ /**
997
+ * The data used to update RoleStatistics.
998
+ */
999
+ data: Prisma.XOR<Prisma.RoleStatisticUpdateManyMutationInput, Prisma.RoleStatisticUncheckedUpdateManyInput>;
1000
+ /**
1001
+ * Filter which RoleStatistics to update
1002
+ */
1003
+ where?: Prisma.RoleStatisticWhereInput;
1004
+ /**
1005
+ * Limit how many RoleStatistics to update.
1006
+ */
1007
+ limit?: number;
1008
+ };
1009
+ /**
1010
+ * RoleStatistic upsert
1011
+ */
1012
+ export type RoleStatisticUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1013
+ /**
1014
+ * Select specific fields to fetch from the RoleStatistic
1015
+ */
1016
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
1017
+ /**
1018
+ * Omit specific fields from the RoleStatistic
1019
+ */
1020
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
1021
+ /**
1022
+ * The filter to search for the RoleStatistic to update in case it exists.
1023
+ */
1024
+ where: Prisma.RoleStatisticWhereUniqueInput;
1025
+ /**
1026
+ * In case the RoleStatistic found by the `where` argument doesn't exist, create a new RoleStatistic with this data.
1027
+ */
1028
+ create: Prisma.XOR<Prisma.RoleStatisticCreateInput, Prisma.RoleStatisticUncheckedCreateInput>;
1029
+ /**
1030
+ * In case the RoleStatistic was found with the provided `where` argument, update it with this data.
1031
+ */
1032
+ update: Prisma.XOR<Prisma.RoleStatisticUpdateInput, Prisma.RoleStatisticUncheckedUpdateInput>;
1033
+ };
1034
+ /**
1035
+ * RoleStatistic delete
1036
+ */
1037
+ export type RoleStatisticDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1038
+ /**
1039
+ * Select specific fields to fetch from the RoleStatistic
1040
+ */
1041
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
1042
+ /**
1043
+ * Omit specific fields from the RoleStatistic
1044
+ */
1045
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
1046
+ /**
1047
+ * Filter which RoleStatistic to delete.
1048
+ */
1049
+ where: Prisma.RoleStatisticWhereUniqueInput;
1050
+ };
1051
+ /**
1052
+ * RoleStatistic deleteMany
1053
+ */
1054
+ export type RoleStatisticDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1055
+ /**
1056
+ * Filter which RoleStatistics to delete
1057
+ */
1058
+ where?: Prisma.RoleStatisticWhereInput;
1059
+ /**
1060
+ * Limit how many RoleStatistics to delete.
1061
+ */
1062
+ limit?: number;
1063
+ };
1064
+ /**
1065
+ * RoleStatistic without action
1066
+ */
1067
+ export type RoleStatisticDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1068
+ /**
1069
+ * Select specific fields to fetch from the RoleStatistic
1070
+ */
1071
+ select?: Prisma.RoleStatisticSelect<ExtArgs> | null;
1072
+ /**
1073
+ * Omit specific fields from the RoleStatistic
1074
+ */
1075
+ omit?: Prisma.RoleStatisticOmit<ExtArgs> | null;
1076
+ };
1077
+ //# sourceMappingURL=RoleStatistic.d.ts.map