@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,1146 @@
1
+ import type * as runtime from "@prisma/client/runtime/client";
2
+ import type * as Prisma from "../internal/prismaNamespace.ts";
3
+ /**
4
+ * Model Media
5
+ * Medios o enlaces externos asociados a cada jugador de Minecraft.
6
+ */
7
+ export type MediaModel = runtime.Types.Result.DefaultSelection<Prisma.$MediaPayload>;
8
+ export type AggregateMedia = {
9
+ _count: MediaCountAggregateOutputType | null;
10
+ _min: MediaMinAggregateOutputType | null;
11
+ _max: MediaMaxAggregateOutputType | null;
12
+ };
13
+ export type MediaMinAggregateOutputType = {
14
+ id: string | null;
15
+ mc_user_uuid: string | null;
16
+ type: string | null;
17
+ url: string | null;
18
+ };
19
+ export type MediaMaxAggregateOutputType = {
20
+ id: string | null;
21
+ mc_user_uuid: string | null;
22
+ type: string | null;
23
+ url: string | null;
24
+ };
25
+ export type MediaCountAggregateOutputType = {
26
+ id: number;
27
+ mc_user_uuid: number;
28
+ type: number;
29
+ url: number;
30
+ _all: number;
31
+ };
32
+ export type MediaMinAggregateInputType = {
33
+ id?: true;
34
+ mc_user_uuid?: true;
35
+ type?: true;
36
+ url?: true;
37
+ };
38
+ export type MediaMaxAggregateInputType = {
39
+ id?: true;
40
+ mc_user_uuid?: true;
41
+ type?: true;
42
+ url?: true;
43
+ };
44
+ export type MediaCountAggregateInputType = {
45
+ id?: true;
46
+ mc_user_uuid?: true;
47
+ type?: true;
48
+ url?: true;
49
+ _all?: true;
50
+ };
51
+ export type MediaAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
52
+ /**
53
+ * Filter which Media to aggregate.
54
+ */
55
+ where?: Prisma.MediaWhereInput;
56
+ /**
57
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
58
+ *
59
+ * Determine the order of Media to fetch.
60
+ */
61
+ orderBy?: Prisma.MediaOrderByWithRelationInput | Prisma.MediaOrderByWithRelationInput[];
62
+ /**
63
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
64
+ *
65
+ * Sets the start position
66
+ */
67
+ cursor?: Prisma.MediaWhereUniqueInput;
68
+ /**
69
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
70
+ *
71
+ * Take `±n` Media from the position of the cursor.
72
+ */
73
+ take?: number;
74
+ /**
75
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
76
+ *
77
+ * Skip the first `n` Media.
78
+ */
79
+ skip?: number;
80
+ /**
81
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
82
+ *
83
+ * Count returned Media
84
+ **/
85
+ _count?: true | MediaCountAggregateInputType;
86
+ /**
87
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
88
+ *
89
+ * Select which fields to find the minimum value
90
+ **/
91
+ _min?: MediaMinAggregateInputType;
92
+ /**
93
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
94
+ *
95
+ * Select which fields to find the maximum value
96
+ **/
97
+ _max?: MediaMaxAggregateInputType;
98
+ };
99
+ export type GetMediaAggregateType<T extends MediaAggregateArgs> = {
100
+ [P in keyof T & keyof AggregateMedia]: P extends '_count' | 'count' ? T[P] extends true ? number : Prisma.GetScalarType<T[P], AggregateMedia[P]> : Prisma.GetScalarType<T[P], AggregateMedia[P]>;
101
+ };
102
+ export type MediaGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
103
+ where?: Prisma.MediaWhereInput;
104
+ orderBy?: Prisma.MediaOrderByWithAggregationInput | Prisma.MediaOrderByWithAggregationInput[];
105
+ by: Prisma.MediaScalarFieldEnum[] | Prisma.MediaScalarFieldEnum;
106
+ having?: Prisma.MediaScalarWhereWithAggregatesInput;
107
+ take?: number;
108
+ skip?: number;
109
+ _count?: MediaCountAggregateInputType | true;
110
+ _min?: MediaMinAggregateInputType;
111
+ _max?: MediaMaxAggregateInputType;
112
+ };
113
+ export type MediaGroupByOutputType = {
114
+ id: string;
115
+ mc_user_uuid: string;
116
+ type: string;
117
+ url: string;
118
+ _count: MediaCountAggregateOutputType | null;
119
+ _min: MediaMinAggregateOutputType | null;
120
+ _max: MediaMaxAggregateOutputType | null;
121
+ };
122
+ export type GetMediaGroupByPayload<T extends MediaGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<MediaGroupByOutputType, T['by']> & {
123
+ [P in ((keyof T) & (keyof MediaGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], MediaGroupByOutputType[P]> : Prisma.GetScalarType<T[P], MediaGroupByOutputType[P]>;
124
+ }>>;
125
+ export type MediaWhereInput = {
126
+ AND?: Prisma.MediaWhereInput | Prisma.MediaWhereInput[];
127
+ OR?: Prisma.MediaWhereInput[];
128
+ NOT?: Prisma.MediaWhereInput | Prisma.MediaWhereInput[];
129
+ id?: Prisma.StringFilter<"Media"> | string;
130
+ mc_user_uuid?: Prisma.StringFilter<"Media"> | string;
131
+ type?: Prisma.StringFilter<"Media"> | string;
132
+ url?: Prisma.StringFilter<"Media"> | string;
133
+ player?: Prisma.XOR<Prisma.PlayerScalarRelationFilter, Prisma.PlayerWhereInput>;
134
+ };
135
+ export type MediaOrderByWithRelationInput = {
136
+ id?: Prisma.SortOrder;
137
+ mc_user_uuid?: Prisma.SortOrder;
138
+ type?: Prisma.SortOrder;
139
+ url?: Prisma.SortOrder;
140
+ player?: Prisma.PlayerOrderByWithRelationInput;
141
+ };
142
+ export type MediaWhereUniqueInput = Prisma.AtLeast<{
143
+ id?: string;
144
+ mc_user_uuid_type?: Prisma.MediaMc_user_uuidTypeCompoundUniqueInput;
145
+ AND?: Prisma.MediaWhereInput | Prisma.MediaWhereInput[];
146
+ OR?: Prisma.MediaWhereInput[];
147
+ NOT?: Prisma.MediaWhereInput | Prisma.MediaWhereInput[];
148
+ mc_user_uuid?: Prisma.StringFilter<"Media"> | string;
149
+ type?: Prisma.StringFilter<"Media"> | string;
150
+ url?: Prisma.StringFilter<"Media"> | string;
151
+ player?: Prisma.XOR<Prisma.PlayerScalarRelationFilter, Prisma.PlayerWhereInput>;
152
+ }, "id" | "mc_user_uuid_type">;
153
+ export type MediaOrderByWithAggregationInput = {
154
+ id?: Prisma.SortOrder;
155
+ mc_user_uuid?: Prisma.SortOrder;
156
+ type?: Prisma.SortOrder;
157
+ url?: Prisma.SortOrder;
158
+ _count?: Prisma.MediaCountOrderByAggregateInput;
159
+ _max?: Prisma.MediaMaxOrderByAggregateInput;
160
+ _min?: Prisma.MediaMinOrderByAggregateInput;
161
+ };
162
+ export type MediaScalarWhereWithAggregatesInput = {
163
+ AND?: Prisma.MediaScalarWhereWithAggregatesInput | Prisma.MediaScalarWhereWithAggregatesInput[];
164
+ OR?: Prisma.MediaScalarWhereWithAggregatesInput[];
165
+ NOT?: Prisma.MediaScalarWhereWithAggregatesInput | Prisma.MediaScalarWhereWithAggregatesInput[];
166
+ id?: Prisma.StringWithAggregatesFilter<"Media"> | string;
167
+ mc_user_uuid?: Prisma.StringWithAggregatesFilter<"Media"> | string;
168
+ type?: Prisma.StringWithAggregatesFilter<"Media"> | string;
169
+ url?: Prisma.StringWithAggregatesFilter<"Media"> | string;
170
+ };
171
+ export type MediaCreateInput = {
172
+ id?: string;
173
+ type: string;
174
+ url: string;
175
+ player: Prisma.PlayerCreateNestedOneWithoutMediasInput;
176
+ };
177
+ export type MediaUncheckedCreateInput = {
178
+ id?: string;
179
+ mc_user_uuid: string;
180
+ type: string;
181
+ url: string;
182
+ };
183
+ export type MediaUpdateInput = {
184
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
185
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
186
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
187
+ player?: Prisma.PlayerUpdateOneRequiredWithoutMediasNestedInput;
188
+ };
189
+ export type MediaUncheckedUpdateInput = {
190
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
191
+ mc_user_uuid?: Prisma.StringFieldUpdateOperationsInput | string;
192
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
193
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
194
+ };
195
+ export type MediaCreateManyInput = {
196
+ id?: string;
197
+ mc_user_uuid: string;
198
+ type: string;
199
+ url: string;
200
+ };
201
+ export type MediaUpdateManyMutationInput = {
202
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
203
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
204
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
205
+ };
206
+ export type MediaUncheckedUpdateManyInput = {
207
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
208
+ mc_user_uuid?: Prisma.StringFieldUpdateOperationsInput | string;
209
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
210
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
211
+ };
212
+ export type MediaMc_user_uuidTypeCompoundUniqueInput = {
213
+ mc_user_uuid: string;
214
+ type: string;
215
+ };
216
+ export type MediaCountOrderByAggregateInput = {
217
+ id?: Prisma.SortOrder;
218
+ mc_user_uuid?: Prisma.SortOrder;
219
+ type?: Prisma.SortOrder;
220
+ url?: Prisma.SortOrder;
221
+ };
222
+ export type MediaMaxOrderByAggregateInput = {
223
+ id?: Prisma.SortOrder;
224
+ mc_user_uuid?: Prisma.SortOrder;
225
+ type?: Prisma.SortOrder;
226
+ url?: Prisma.SortOrder;
227
+ };
228
+ export type MediaMinOrderByAggregateInput = {
229
+ id?: Prisma.SortOrder;
230
+ mc_user_uuid?: Prisma.SortOrder;
231
+ type?: Prisma.SortOrder;
232
+ url?: Prisma.SortOrder;
233
+ };
234
+ export type MediaListRelationFilter = {
235
+ every?: Prisma.MediaWhereInput;
236
+ some?: Prisma.MediaWhereInput;
237
+ none?: Prisma.MediaWhereInput;
238
+ };
239
+ export type MediaOrderByRelationAggregateInput = {
240
+ _count?: Prisma.SortOrder;
241
+ };
242
+ export type MediaCreateNestedManyWithoutPlayerInput = {
243
+ create?: Prisma.XOR<Prisma.MediaCreateWithoutPlayerInput, Prisma.MediaUncheckedCreateWithoutPlayerInput> | Prisma.MediaCreateWithoutPlayerInput[] | Prisma.MediaUncheckedCreateWithoutPlayerInput[];
244
+ connectOrCreate?: Prisma.MediaCreateOrConnectWithoutPlayerInput | Prisma.MediaCreateOrConnectWithoutPlayerInput[];
245
+ createMany?: Prisma.MediaCreateManyPlayerInputEnvelope;
246
+ connect?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
247
+ };
248
+ export type MediaUncheckedCreateNestedManyWithoutPlayerInput = {
249
+ create?: Prisma.XOR<Prisma.MediaCreateWithoutPlayerInput, Prisma.MediaUncheckedCreateWithoutPlayerInput> | Prisma.MediaCreateWithoutPlayerInput[] | Prisma.MediaUncheckedCreateWithoutPlayerInput[];
250
+ connectOrCreate?: Prisma.MediaCreateOrConnectWithoutPlayerInput | Prisma.MediaCreateOrConnectWithoutPlayerInput[];
251
+ createMany?: Prisma.MediaCreateManyPlayerInputEnvelope;
252
+ connect?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
253
+ };
254
+ export type MediaUpdateManyWithoutPlayerNestedInput = {
255
+ create?: Prisma.XOR<Prisma.MediaCreateWithoutPlayerInput, Prisma.MediaUncheckedCreateWithoutPlayerInput> | Prisma.MediaCreateWithoutPlayerInput[] | Prisma.MediaUncheckedCreateWithoutPlayerInput[];
256
+ connectOrCreate?: Prisma.MediaCreateOrConnectWithoutPlayerInput | Prisma.MediaCreateOrConnectWithoutPlayerInput[];
257
+ upsert?: Prisma.MediaUpsertWithWhereUniqueWithoutPlayerInput | Prisma.MediaUpsertWithWhereUniqueWithoutPlayerInput[];
258
+ createMany?: Prisma.MediaCreateManyPlayerInputEnvelope;
259
+ set?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
260
+ disconnect?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
261
+ delete?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
262
+ connect?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
263
+ update?: Prisma.MediaUpdateWithWhereUniqueWithoutPlayerInput | Prisma.MediaUpdateWithWhereUniqueWithoutPlayerInput[];
264
+ updateMany?: Prisma.MediaUpdateManyWithWhereWithoutPlayerInput | Prisma.MediaUpdateManyWithWhereWithoutPlayerInput[];
265
+ deleteMany?: Prisma.MediaScalarWhereInput | Prisma.MediaScalarWhereInput[];
266
+ };
267
+ export type MediaUncheckedUpdateManyWithoutPlayerNestedInput = {
268
+ create?: Prisma.XOR<Prisma.MediaCreateWithoutPlayerInput, Prisma.MediaUncheckedCreateWithoutPlayerInput> | Prisma.MediaCreateWithoutPlayerInput[] | Prisma.MediaUncheckedCreateWithoutPlayerInput[];
269
+ connectOrCreate?: Prisma.MediaCreateOrConnectWithoutPlayerInput | Prisma.MediaCreateOrConnectWithoutPlayerInput[];
270
+ upsert?: Prisma.MediaUpsertWithWhereUniqueWithoutPlayerInput | Prisma.MediaUpsertWithWhereUniqueWithoutPlayerInput[];
271
+ createMany?: Prisma.MediaCreateManyPlayerInputEnvelope;
272
+ set?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
273
+ disconnect?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
274
+ delete?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
275
+ connect?: Prisma.MediaWhereUniqueInput | Prisma.MediaWhereUniqueInput[];
276
+ update?: Prisma.MediaUpdateWithWhereUniqueWithoutPlayerInput | Prisma.MediaUpdateWithWhereUniqueWithoutPlayerInput[];
277
+ updateMany?: Prisma.MediaUpdateManyWithWhereWithoutPlayerInput | Prisma.MediaUpdateManyWithWhereWithoutPlayerInput[];
278
+ deleteMany?: Prisma.MediaScalarWhereInput | Prisma.MediaScalarWhereInput[];
279
+ };
280
+ export type MediaCreateWithoutPlayerInput = {
281
+ id?: string;
282
+ type: string;
283
+ url: string;
284
+ };
285
+ export type MediaUncheckedCreateWithoutPlayerInput = {
286
+ id?: string;
287
+ type: string;
288
+ url: string;
289
+ };
290
+ export type MediaCreateOrConnectWithoutPlayerInput = {
291
+ where: Prisma.MediaWhereUniqueInput;
292
+ create: Prisma.XOR<Prisma.MediaCreateWithoutPlayerInput, Prisma.MediaUncheckedCreateWithoutPlayerInput>;
293
+ };
294
+ export type MediaCreateManyPlayerInputEnvelope = {
295
+ data: Prisma.MediaCreateManyPlayerInput | Prisma.MediaCreateManyPlayerInput[];
296
+ skipDuplicates?: boolean;
297
+ };
298
+ export type MediaUpsertWithWhereUniqueWithoutPlayerInput = {
299
+ where: Prisma.MediaWhereUniqueInput;
300
+ update: Prisma.XOR<Prisma.MediaUpdateWithoutPlayerInput, Prisma.MediaUncheckedUpdateWithoutPlayerInput>;
301
+ create: Prisma.XOR<Prisma.MediaCreateWithoutPlayerInput, Prisma.MediaUncheckedCreateWithoutPlayerInput>;
302
+ };
303
+ export type MediaUpdateWithWhereUniqueWithoutPlayerInput = {
304
+ where: Prisma.MediaWhereUniqueInput;
305
+ data: Prisma.XOR<Prisma.MediaUpdateWithoutPlayerInput, Prisma.MediaUncheckedUpdateWithoutPlayerInput>;
306
+ };
307
+ export type MediaUpdateManyWithWhereWithoutPlayerInput = {
308
+ where: Prisma.MediaScalarWhereInput;
309
+ data: Prisma.XOR<Prisma.MediaUpdateManyMutationInput, Prisma.MediaUncheckedUpdateManyWithoutPlayerInput>;
310
+ };
311
+ export type MediaScalarWhereInput = {
312
+ AND?: Prisma.MediaScalarWhereInput | Prisma.MediaScalarWhereInput[];
313
+ OR?: Prisma.MediaScalarWhereInput[];
314
+ NOT?: Prisma.MediaScalarWhereInput | Prisma.MediaScalarWhereInput[];
315
+ id?: Prisma.StringFilter<"Media"> | string;
316
+ mc_user_uuid?: Prisma.StringFilter<"Media"> | string;
317
+ type?: Prisma.StringFilter<"Media"> | string;
318
+ url?: Prisma.StringFilter<"Media"> | string;
319
+ };
320
+ export type MediaCreateManyPlayerInput = {
321
+ id?: string;
322
+ type: string;
323
+ url: string;
324
+ };
325
+ export type MediaUpdateWithoutPlayerInput = {
326
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
327
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
328
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
329
+ };
330
+ export type MediaUncheckedUpdateWithoutPlayerInput = {
331
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
332
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
333
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
334
+ };
335
+ export type MediaUncheckedUpdateManyWithoutPlayerInput = {
336
+ id?: Prisma.StringFieldUpdateOperationsInput | string;
337
+ type?: Prisma.StringFieldUpdateOperationsInput | string;
338
+ url?: Prisma.StringFieldUpdateOperationsInput | string;
339
+ };
340
+ export type MediaSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
341
+ id?: boolean;
342
+ mc_user_uuid?: boolean;
343
+ type?: boolean;
344
+ url?: boolean;
345
+ player?: boolean | Prisma.PlayerDefaultArgs<ExtArgs>;
346
+ }, ExtArgs["result"]["media"]>;
347
+ export type MediaSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
348
+ id?: boolean;
349
+ mc_user_uuid?: boolean;
350
+ type?: boolean;
351
+ url?: boolean;
352
+ player?: boolean | Prisma.PlayerDefaultArgs<ExtArgs>;
353
+ }, ExtArgs["result"]["media"]>;
354
+ export type MediaSelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
355
+ id?: boolean;
356
+ mc_user_uuid?: boolean;
357
+ type?: boolean;
358
+ url?: boolean;
359
+ player?: boolean | Prisma.PlayerDefaultArgs<ExtArgs>;
360
+ }, ExtArgs["result"]["media"]>;
361
+ export type MediaSelectScalar = {
362
+ id?: boolean;
363
+ mc_user_uuid?: boolean;
364
+ type?: boolean;
365
+ url?: boolean;
366
+ };
367
+ export type MediaOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "mc_user_uuid" | "type" | "url", ExtArgs["result"]["media"]>;
368
+ export type MediaInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
369
+ player?: boolean | Prisma.PlayerDefaultArgs<ExtArgs>;
370
+ };
371
+ export type MediaIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
372
+ player?: boolean | Prisma.PlayerDefaultArgs<ExtArgs>;
373
+ };
374
+ export type MediaIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
375
+ player?: boolean | Prisma.PlayerDefaultArgs<ExtArgs>;
376
+ };
377
+ export type $MediaPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
378
+ name: "Media";
379
+ objects: {
380
+ player: Prisma.$PlayerPayload<ExtArgs>;
381
+ };
382
+ scalars: runtime.Types.Extensions.GetPayloadResult<{
383
+ id: string;
384
+ mc_user_uuid: string;
385
+ type: string;
386
+ url: string;
387
+ }, ExtArgs["result"]["media"]>;
388
+ composites: {};
389
+ };
390
+ export type MediaGetPayload<S extends boolean | null | undefined | MediaDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$MediaPayload, S>;
391
+ export type MediaCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = Omit<MediaFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
392
+ select?: MediaCountAggregateInputType | true;
393
+ };
394
+ export interface MediaDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
395
+ [K: symbol]: {
396
+ types: Prisma.TypeMap<ExtArgs>['model']['Media'];
397
+ meta: {
398
+ name: 'Media';
399
+ };
400
+ };
401
+ /**
402
+ * Find zero or one Media that matches the filter.
403
+ * @param {MediaFindUniqueArgs} args - Arguments to find a Media
404
+ * @example
405
+ * // Get one Media
406
+ * const media = await prisma.media.findUnique({
407
+ * where: {
408
+ * // ... provide filter here
409
+ * }
410
+ * })
411
+ */
412
+ findUnique<T extends MediaFindUniqueArgs>(args: Prisma.SelectSubset<T, MediaFindUniqueArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
413
+ /**
414
+ * Find one Media that matches the filter or throw an error with `error.code='P2025'`
415
+ * if no matches were found.
416
+ * @param {MediaFindUniqueOrThrowArgs} args - Arguments to find a Media
417
+ * @example
418
+ * // Get one Media
419
+ * const media = await prisma.media.findUniqueOrThrow({
420
+ * where: {
421
+ * // ... provide filter here
422
+ * }
423
+ * })
424
+ */
425
+ findUniqueOrThrow<T extends MediaFindUniqueOrThrowArgs>(args: Prisma.SelectSubset<T, MediaFindUniqueOrThrowArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
426
+ /**
427
+ * Find the first Media that matches the filter.
428
+ * Note, that providing `undefined` is treated as the value not being there.
429
+ * Read more here: https://pris.ly/d/null-undefined
430
+ * @param {MediaFindFirstArgs} args - Arguments to find a Media
431
+ * @example
432
+ * // Get one Media
433
+ * const media = await prisma.media.findFirst({
434
+ * where: {
435
+ * // ... provide filter here
436
+ * }
437
+ * })
438
+ */
439
+ findFirst<T extends MediaFindFirstArgs>(args?: Prisma.SelectSubset<T, MediaFindFirstArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>;
440
+ /**
441
+ * Find the first Media that matches the filter or
442
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
443
+ * Note, that providing `undefined` is treated as the value not being there.
444
+ * Read more here: https://pris.ly/d/null-undefined
445
+ * @param {MediaFindFirstOrThrowArgs} args - Arguments to find a Media
446
+ * @example
447
+ * // Get one Media
448
+ * const media = await prisma.media.findFirstOrThrow({
449
+ * where: {
450
+ * // ... provide filter here
451
+ * }
452
+ * })
453
+ */
454
+ findFirstOrThrow<T extends MediaFindFirstOrThrowArgs>(args?: Prisma.SelectSubset<T, MediaFindFirstOrThrowArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
455
+ /**
456
+ * Find zero or more Media that matches the filter.
457
+ * Note, that providing `undefined` is treated as the value not being there.
458
+ * Read more here: https://pris.ly/d/null-undefined
459
+ * @param {MediaFindManyArgs} args - Arguments to filter and select certain fields only.
460
+ * @example
461
+ * // Get all Media
462
+ * const media = await prisma.media.findMany()
463
+ *
464
+ * // Get first 10 Media
465
+ * const media = await prisma.media.findMany({ take: 10 })
466
+ *
467
+ * // Only select the `id`
468
+ * const mediaWithIdOnly = await prisma.media.findMany({ select: { id: true } })
469
+ *
470
+ */
471
+ findMany<T extends MediaFindManyArgs>(args?: Prisma.SelectSubset<T, MediaFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>;
472
+ /**
473
+ * Create a Media.
474
+ * @param {MediaCreateArgs} args - Arguments to create a Media.
475
+ * @example
476
+ * // Create one Media
477
+ * const Media = await prisma.media.create({
478
+ * data: {
479
+ * // ... data to create a Media
480
+ * }
481
+ * })
482
+ *
483
+ */
484
+ create<T extends MediaCreateArgs>(args: Prisma.SelectSubset<T, MediaCreateArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
485
+ /**
486
+ * Create many Media.
487
+ * @param {MediaCreateManyArgs} args - Arguments to create many Media.
488
+ * @example
489
+ * // Create many Media
490
+ * const media = await prisma.media.createMany({
491
+ * data: [
492
+ * // ... provide data here
493
+ * ]
494
+ * })
495
+ *
496
+ */
497
+ createMany<T extends MediaCreateManyArgs>(args?: Prisma.SelectSubset<T, MediaCreateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
498
+ /**
499
+ * Create many Media and returns the data saved in the database.
500
+ * @param {MediaCreateManyAndReturnArgs} args - Arguments to create many Media.
501
+ * @example
502
+ * // Create many Media
503
+ * const media = await prisma.media.createManyAndReturn({
504
+ * data: [
505
+ * // ... provide data here
506
+ * ]
507
+ * })
508
+ *
509
+ * // Create many Media and only return the `id`
510
+ * const mediaWithIdOnly = await prisma.media.createManyAndReturn({
511
+ * select: { id: true },
512
+ * data: [
513
+ * // ... provide data here
514
+ * ]
515
+ * })
516
+ * Note, that providing `undefined` is treated as the value not being there.
517
+ * Read more here: https://pris.ly/d/null-undefined
518
+ *
519
+ */
520
+ createManyAndReturn<T extends MediaCreateManyAndReturnArgs>(args?: Prisma.SelectSubset<T, MediaCreateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "createManyAndReturn", GlobalOmitOptions>>;
521
+ /**
522
+ * Delete a Media.
523
+ * @param {MediaDeleteArgs} args - Arguments to delete one Media.
524
+ * @example
525
+ * // Delete one Media
526
+ * const Media = await prisma.media.delete({
527
+ * where: {
528
+ * // ... filter to delete one Media
529
+ * }
530
+ * })
531
+ *
532
+ */
533
+ delete<T extends MediaDeleteArgs>(args: Prisma.SelectSubset<T, MediaDeleteArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
534
+ /**
535
+ * Update one Media.
536
+ * @param {MediaUpdateArgs} args - Arguments to update one Media.
537
+ * @example
538
+ * // Update one Media
539
+ * const media = await prisma.media.update({
540
+ * where: {
541
+ * // ... provide filter here
542
+ * },
543
+ * data: {
544
+ * // ... provide data here
545
+ * }
546
+ * })
547
+ *
548
+ */
549
+ update<T extends MediaUpdateArgs>(args: Prisma.SelectSubset<T, MediaUpdateArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
550
+ /**
551
+ * Delete zero or more Media.
552
+ * @param {MediaDeleteManyArgs} args - Arguments to filter Media to delete.
553
+ * @example
554
+ * // Delete a few Media
555
+ * const { count } = await prisma.media.deleteMany({
556
+ * where: {
557
+ * // ... provide filter here
558
+ * }
559
+ * })
560
+ *
561
+ */
562
+ deleteMany<T extends MediaDeleteManyArgs>(args?: Prisma.SelectSubset<T, MediaDeleteManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
563
+ /**
564
+ * Update zero or more Media.
565
+ * Note, that providing `undefined` is treated as the value not being there.
566
+ * Read more here: https://pris.ly/d/null-undefined
567
+ * @param {MediaUpdateManyArgs} args - Arguments to update one or more rows.
568
+ * @example
569
+ * // Update many Media
570
+ * const media = await prisma.media.updateMany({
571
+ * where: {
572
+ * // ... provide filter here
573
+ * },
574
+ * data: {
575
+ * // ... provide data here
576
+ * }
577
+ * })
578
+ *
579
+ */
580
+ updateMany<T extends MediaUpdateManyArgs>(args: Prisma.SelectSubset<T, MediaUpdateManyArgs<ExtArgs>>): Prisma.PrismaPromise<Prisma.BatchPayload>;
581
+ /**
582
+ * Update zero or more Media and returns the data updated in the database.
583
+ * @param {MediaUpdateManyAndReturnArgs} args - Arguments to update many Media.
584
+ * @example
585
+ * // Update many Media
586
+ * const media = await prisma.media.updateManyAndReturn({
587
+ * where: {
588
+ * // ... provide filter here
589
+ * },
590
+ * data: [
591
+ * // ... provide data here
592
+ * ]
593
+ * })
594
+ *
595
+ * // Update zero or more Media and only return the `id`
596
+ * const mediaWithIdOnly = await prisma.media.updateManyAndReturn({
597
+ * select: { id: true },
598
+ * where: {
599
+ * // ... provide filter here
600
+ * },
601
+ * data: [
602
+ * // ... provide data here
603
+ * ]
604
+ * })
605
+ * Note, that providing `undefined` is treated as the value not being there.
606
+ * Read more here: https://pris.ly/d/null-undefined
607
+ *
608
+ */
609
+ updateManyAndReturn<T extends MediaUpdateManyAndReturnArgs>(args: Prisma.SelectSubset<T, MediaUpdateManyAndReturnArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "updateManyAndReturn", GlobalOmitOptions>>;
610
+ /**
611
+ * Create or update one Media.
612
+ * @param {MediaUpsertArgs} args - Arguments to update or create a Media.
613
+ * @example
614
+ * // Update or create a Media
615
+ * const media = await prisma.media.upsert({
616
+ * create: {
617
+ * // ... data to create a Media
618
+ * },
619
+ * update: {
620
+ * // ... in case it already exists, update
621
+ * },
622
+ * where: {
623
+ * // ... the filter for the Media we want to update
624
+ * }
625
+ * })
626
+ */
627
+ upsert<T extends MediaUpsertArgs>(args: Prisma.SelectSubset<T, MediaUpsertArgs<ExtArgs>>): Prisma.Prisma__MediaClient<runtime.Types.Result.GetResult<Prisma.$MediaPayload<ExtArgs>, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>;
628
+ /**
629
+ * Count the number of Media.
630
+ * Note, that providing `undefined` is treated as the value not being there.
631
+ * Read more here: https://pris.ly/d/null-undefined
632
+ * @param {MediaCountArgs} args - Arguments to filter Media to count.
633
+ * @example
634
+ * // Count the number of Media
635
+ * const count = await prisma.media.count({
636
+ * where: {
637
+ * // ... the filter for the Media we want to count
638
+ * }
639
+ * })
640
+ **/
641
+ count<T extends MediaCountArgs>(args?: Prisma.Subset<T, MediaCountArgs>): Prisma.PrismaPromise<T extends runtime.Types.Utils.Record<'select', any> ? T['select'] extends true ? number : Prisma.GetScalarType<T['select'], MediaCountAggregateOutputType> : number>;
642
+ /**
643
+ * Allows you to perform aggregations operations on a Media.
644
+ * Note, that providing `undefined` is treated as the value not being there.
645
+ * Read more here: https://pris.ly/d/null-undefined
646
+ * @param {MediaAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
647
+ * @example
648
+ * // Ordered by age ascending
649
+ * // Where email contains prisma.io
650
+ * // Limited to the 10 users
651
+ * const aggregations = await prisma.user.aggregate({
652
+ * _avg: {
653
+ * age: true,
654
+ * },
655
+ * where: {
656
+ * email: {
657
+ * contains: "prisma.io",
658
+ * },
659
+ * },
660
+ * orderBy: {
661
+ * age: "asc",
662
+ * },
663
+ * take: 10,
664
+ * })
665
+ **/
666
+ aggregate<T extends MediaAggregateArgs>(args: Prisma.Subset<T, MediaAggregateArgs>): Prisma.PrismaPromise<GetMediaAggregateType<T>>;
667
+ /**
668
+ * Group by Media.
669
+ * Note, that providing `undefined` is treated as the value not being there.
670
+ * Read more here: https://pris.ly/d/null-undefined
671
+ * @param {MediaGroupByArgs} args - Group by arguments.
672
+ * @example
673
+ * // Group by city, order by createdAt, get count
674
+ * const result = await prisma.user.groupBy({
675
+ * by: ['city', 'createdAt'],
676
+ * orderBy: {
677
+ * createdAt: true
678
+ * },
679
+ * _count: {
680
+ * _all: true
681
+ * },
682
+ * })
683
+ *
684
+ **/
685
+ groupBy<T extends MediaGroupByArgs, HasSelectOrTake extends Prisma.Or<Prisma.Extends<'skip', Prisma.Keys<T>>, Prisma.Extends<'take', Prisma.Keys<T>>>, OrderByArg extends Prisma.True extends HasSelectOrTake ? {
686
+ orderBy: MediaGroupByArgs['orderBy'];
687
+ } : {
688
+ orderBy?: MediaGroupByArgs['orderBy'];
689
+ }, 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 ? {
690
+ [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [
691
+ Error,
692
+ 'Field ',
693
+ P,
694
+ ` in "having" needs to be provided in "by"`
695
+ ];
696
+ }[HavingFields] : 'take' extends Prisma.Keys<T> ? 'orderBy' extends Prisma.Keys<T> ? ByValid extends Prisma.True ? {} : {
697
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
698
+ }[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 ? {} : {
699
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
700
+ }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends Prisma.True ? {} : {
701
+ [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`;
702
+ }[OrderFields]>(args: Prisma.SubsetIntersection<T, MediaGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetMediaGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>;
703
+ /**
704
+ * Fields of the Media model
705
+ */
706
+ readonly fields: MediaFieldRefs;
707
+ }
708
+ /**
709
+ * The delegate class that acts as a "Promise-like" for Media.
710
+ * Why is this prefixed with `Prisma__`?
711
+ * Because we want to prevent naming conflicts as mentioned in
712
+ * https://github.com/prisma/prisma-client-js/issues/707
713
+ */
714
+ export interface Prisma__MediaClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
715
+ readonly [Symbol.toStringTag]: "PrismaPromise";
716
+ player<T extends Prisma.PlayerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PlayerDefaultArgs<ExtArgs>>): Prisma.Prisma__PlayerClient<runtime.Types.Result.GetResult<Prisma.$PlayerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>;
717
+ /**
718
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
719
+ * @param onfulfilled The callback to execute when the Promise is resolved.
720
+ * @param onrejected The callback to execute when the Promise is rejected.
721
+ * @returns A Promise for the completion of which ever callback is executed.
722
+ */
723
+ 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>;
724
+ /**
725
+ * Attaches a callback for only the rejection of the Promise.
726
+ * @param onrejected The callback to execute when the Promise is rejected.
727
+ * @returns A Promise for the completion of the callback.
728
+ */
729
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>;
730
+ /**
731
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
732
+ * resolved value cannot be modified from the callback.
733
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
734
+ * @returns A Promise for the completion of the callback.
735
+ */
736
+ finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise<T>;
737
+ }
738
+ /**
739
+ * Fields of the Media model
740
+ */
741
+ export interface MediaFieldRefs {
742
+ readonly id: Prisma.FieldRef<"Media", 'String'>;
743
+ readonly mc_user_uuid: Prisma.FieldRef<"Media", 'String'>;
744
+ readonly type: Prisma.FieldRef<"Media", 'String'>;
745
+ readonly url: Prisma.FieldRef<"Media", 'String'>;
746
+ }
747
+ /**
748
+ * Media findUnique
749
+ */
750
+ export type MediaFindUniqueArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
751
+ /**
752
+ * Select specific fields to fetch from the Media
753
+ */
754
+ select?: Prisma.MediaSelect<ExtArgs> | null;
755
+ /**
756
+ * Omit specific fields from the Media
757
+ */
758
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
759
+ /**
760
+ * Choose, which related nodes to fetch as well
761
+ */
762
+ include?: Prisma.MediaInclude<ExtArgs> | null;
763
+ /**
764
+ * Filter, which Media to fetch.
765
+ */
766
+ where: Prisma.MediaWhereUniqueInput;
767
+ };
768
+ /**
769
+ * Media findUniqueOrThrow
770
+ */
771
+ export type MediaFindUniqueOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
772
+ /**
773
+ * Select specific fields to fetch from the Media
774
+ */
775
+ select?: Prisma.MediaSelect<ExtArgs> | null;
776
+ /**
777
+ * Omit specific fields from the Media
778
+ */
779
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
780
+ /**
781
+ * Choose, which related nodes to fetch as well
782
+ */
783
+ include?: Prisma.MediaInclude<ExtArgs> | null;
784
+ /**
785
+ * Filter, which Media to fetch.
786
+ */
787
+ where: Prisma.MediaWhereUniqueInput;
788
+ };
789
+ /**
790
+ * Media findFirst
791
+ */
792
+ export type MediaFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
793
+ /**
794
+ * Select specific fields to fetch from the Media
795
+ */
796
+ select?: Prisma.MediaSelect<ExtArgs> | null;
797
+ /**
798
+ * Omit specific fields from the Media
799
+ */
800
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
801
+ /**
802
+ * Choose, which related nodes to fetch as well
803
+ */
804
+ include?: Prisma.MediaInclude<ExtArgs> | null;
805
+ /**
806
+ * Filter, which Media to fetch.
807
+ */
808
+ where?: Prisma.MediaWhereInput;
809
+ /**
810
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
811
+ *
812
+ * Determine the order of Media to fetch.
813
+ */
814
+ orderBy?: Prisma.MediaOrderByWithRelationInput | Prisma.MediaOrderByWithRelationInput[];
815
+ /**
816
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
817
+ *
818
+ * Sets the position for searching for Media.
819
+ */
820
+ cursor?: Prisma.MediaWhereUniqueInput;
821
+ /**
822
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
823
+ *
824
+ * Take `±n` Media from the position of the cursor.
825
+ */
826
+ take?: number;
827
+ /**
828
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
829
+ *
830
+ * Skip the first `n` Media.
831
+ */
832
+ skip?: number;
833
+ /**
834
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
835
+ *
836
+ * Filter by unique combinations of Media.
837
+ */
838
+ distinct?: Prisma.MediaScalarFieldEnum | Prisma.MediaScalarFieldEnum[];
839
+ };
840
+ /**
841
+ * Media findFirstOrThrow
842
+ */
843
+ export type MediaFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
844
+ /**
845
+ * Select specific fields to fetch from the Media
846
+ */
847
+ select?: Prisma.MediaSelect<ExtArgs> | null;
848
+ /**
849
+ * Omit specific fields from the Media
850
+ */
851
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
852
+ /**
853
+ * Choose, which related nodes to fetch as well
854
+ */
855
+ include?: Prisma.MediaInclude<ExtArgs> | null;
856
+ /**
857
+ * Filter, which Media to fetch.
858
+ */
859
+ where?: Prisma.MediaWhereInput;
860
+ /**
861
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
862
+ *
863
+ * Determine the order of Media to fetch.
864
+ */
865
+ orderBy?: Prisma.MediaOrderByWithRelationInput | Prisma.MediaOrderByWithRelationInput[];
866
+ /**
867
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
868
+ *
869
+ * Sets the position for searching for Media.
870
+ */
871
+ cursor?: Prisma.MediaWhereUniqueInput;
872
+ /**
873
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
874
+ *
875
+ * Take `±n` Media from the position of the cursor.
876
+ */
877
+ take?: number;
878
+ /**
879
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
880
+ *
881
+ * Skip the first `n` Media.
882
+ */
883
+ skip?: number;
884
+ /**
885
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
886
+ *
887
+ * Filter by unique combinations of Media.
888
+ */
889
+ distinct?: Prisma.MediaScalarFieldEnum | Prisma.MediaScalarFieldEnum[];
890
+ };
891
+ /**
892
+ * Media findMany
893
+ */
894
+ export type MediaFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
895
+ /**
896
+ * Select specific fields to fetch from the Media
897
+ */
898
+ select?: Prisma.MediaSelect<ExtArgs> | null;
899
+ /**
900
+ * Omit specific fields from the Media
901
+ */
902
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
903
+ /**
904
+ * Choose, which related nodes to fetch as well
905
+ */
906
+ include?: Prisma.MediaInclude<ExtArgs> | null;
907
+ /**
908
+ * Filter, which Media to fetch.
909
+ */
910
+ where?: Prisma.MediaWhereInput;
911
+ /**
912
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
913
+ *
914
+ * Determine the order of Media to fetch.
915
+ */
916
+ orderBy?: Prisma.MediaOrderByWithRelationInput | Prisma.MediaOrderByWithRelationInput[];
917
+ /**
918
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
919
+ *
920
+ * Sets the position for listing Media.
921
+ */
922
+ cursor?: Prisma.MediaWhereUniqueInput;
923
+ /**
924
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
925
+ *
926
+ * Take `±n` Media from the position of the cursor.
927
+ */
928
+ take?: number;
929
+ /**
930
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
931
+ *
932
+ * Skip the first `n` Media.
933
+ */
934
+ skip?: number;
935
+ /**
936
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
937
+ *
938
+ * Filter by unique combinations of Media.
939
+ */
940
+ distinct?: Prisma.MediaScalarFieldEnum | Prisma.MediaScalarFieldEnum[];
941
+ };
942
+ /**
943
+ * Media create
944
+ */
945
+ export type MediaCreateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
946
+ /**
947
+ * Select specific fields to fetch from the Media
948
+ */
949
+ select?: Prisma.MediaSelect<ExtArgs> | null;
950
+ /**
951
+ * Omit specific fields from the Media
952
+ */
953
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
954
+ /**
955
+ * Choose, which related nodes to fetch as well
956
+ */
957
+ include?: Prisma.MediaInclude<ExtArgs> | null;
958
+ /**
959
+ * The data needed to create a Media.
960
+ */
961
+ data: Prisma.XOR<Prisma.MediaCreateInput, Prisma.MediaUncheckedCreateInput>;
962
+ };
963
+ /**
964
+ * Media createMany
965
+ */
966
+ export type MediaCreateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
967
+ /**
968
+ * The data used to create many Media.
969
+ */
970
+ data: Prisma.MediaCreateManyInput | Prisma.MediaCreateManyInput[];
971
+ skipDuplicates?: boolean;
972
+ };
973
+ /**
974
+ * Media createManyAndReturn
975
+ */
976
+ export type MediaCreateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
977
+ /**
978
+ * Select specific fields to fetch from the Media
979
+ */
980
+ select?: Prisma.MediaSelectCreateManyAndReturn<ExtArgs> | null;
981
+ /**
982
+ * Omit specific fields from the Media
983
+ */
984
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
985
+ /**
986
+ * The data used to create many Media.
987
+ */
988
+ data: Prisma.MediaCreateManyInput | Prisma.MediaCreateManyInput[];
989
+ skipDuplicates?: boolean;
990
+ /**
991
+ * Choose, which related nodes to fetch as well
992
+ */
993
+ include?: Prisma.MediaIncludeCreateManyAndReturn<ExtArgs> | null;
994
+ };
995
+ /**
996
+ * Media update
997
+ */
998
+ export type MediaUpdateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
999
+ /**
1000
+ * Select specific fields to fetch from the Media
1001
+ */
1002
+ select?: Prisma.MediaSelect<ExtArgs> | null;
1003
+ /**
1004
+ * Omit specific fields from the Media
1005
+ */
1006
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
1007
+ /**
1008
+ * Choose, which related nodes to fetch as well
1009
+ */
1010
+ include?: Prisma.MediaInclude<ExtArgs> | null;
1011
+ /**
1012
+ * The data needed to update a Media.
1013
+ */
1014
+ data: Prisma.XOR<Prisma.MediaUpdateInput, Prisma.MediaUncheckedUpdateInput>;
1015
+ /**
1016
+ * Choose, which Media to update.
1017
+ */
1018
+ where: Prisma.MediaWhereUniqueInput;
1019
+ };
1020
+ /**
1021
+ * Media updateMany
1022
+ */
1023
+ export type MediaUpdateManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1024
+ /**
1025
+ * The data used to update Media.
1026
+ */
1027
+ data: Prisma.XOR<Prisma.MediaUpdateManyMutationInput, Prisma.MediaUncheckedUpdateManyInput>;
1028
+ /**
1029
+ * Filter which Media to update
1030
+ */
1031
+ where?: Prisma.MediaWhereInput;
1032
+ /**
1033
+ * Limit how many Media to update.
1034
+ */
1035
+ limit?: number;
1036
+ };
1037
+ /**
1038
+ * Media updateManyAndReturn
1039
+ */
1040
+ export type MediaUpdateManyAndReturnArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1041
+ /**
1042
+ * Select specific fields to fetch from the Media
1043
+ */
1044
+ select?: Prisma.MediaSelectUpdateManyAndReturn<ExtArgs> | null;
1045
+ /**
1046
+ * Omit specific fields from the Media
1047
+ */
1048
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
1049
+ /**
1050
+ * The data used to update Media.
1051
+ */
1052
+ data: Prisma.XOR<Prisma.MediaUpdateManyMutationInput, Prisma.MediaUncheckedUpdateManyInput>;
1053
+ /**
1054
+ * Filter which Media to update
1055
+ */
1056
+ where?: Prisma.MediaWhereInput;
1057
+ /**
1058
+ * Limit how many Media to update.
1059
+ */
1060
+ limit?: number;
1061
+ /**
1062
+ * Choose, which related nodes to fetch as well
1063
+ */
1064
+ include?: Prisma.MediaIncludeUpdateManyAndReturn<ExtArgs> | null;
1065
+ };
1066
+ /**
1067
+ * Media upsert
1068
+ */
1069
+ export type MediaUpsertArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1070
+ /**
1071
+ * Select specific fields to fetch from the Media
1072
+ */
1073
+ select?: Prisma.MediaSelect<ExtArgs> | null;
1074
+ /**
1075
+ * Omit specific fields from the Media
1076
+ */
1077
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
1078
+ /**
1079
+ * Choose, which related nodes to fetch as well
1080
+ */
1081
+ include?: Prisma.MediaInclude<ExtArgs> | null;
1082
+ /**
1083
+ * The filter to search for the Media to update in case it exists.
1084
+ */
1085
+ where: Prisma.MediaWhereUniqueInput;
1086
+ /**
1087
+ * In case the Media found by the `where` argument doesn't exist, create a new Media with this data.
1088
+ */
1089
+ create: Prisma.XOR<Prisma.MediaCreateInput, Prisma.MediaUncheckedCreateInput>;
1090
+ /**
1091
+ * In case the Media was found with the provided `where` argument, update it with this data.
1092
+ */
1093
+ update: Prisma.XOR<Prisma.MediaUpdateInput, Prisma.MediaUncheckedUpdateInput>;
1094
+ };
1095
+ /**
1096
+ * Media delete
1097
+ */
1098
+ export type MediaDeleteArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1099
+ /**
1100
+ * Select specific fields to fetch from the Media
1101
+ */
1102
+ select?: Prisma.MediaSelect<ExtArgs> | null;
1103
+ /**
1104
+ * Omit specific fields from the Media
1105
+ */
1106
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
1107
+ /**
1108
+ * Choose, which related nodes to fetch as well
1109
+ */
1110
+ include?: Prisma.MediaInclude<ExtArgs> | null;
1111
+ /**
1112
+ * Filter which Media to delete.
1113
+ */
1114
+ where: Prisma.MediaWhereUniqueInput;
1115
+ };
1116
+ /**
1117
+ * Media deleteMany
1118
+ */
1119
+ export type MediaDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1120
+ /**
1121
+ * Filter which Media to delete
1122
+ */
1123
+ where?: Prisma.MediaWhereInput;
1124
+ /**
1125
+ * Limit how many Media to delete.
1126
+ */
1127
+ limit?: number;
1128
+ };
1129
+ /**
1130
+ * Media without action
1131
+ */
1132
+ export type MediaDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
1133
+ /**
1134
+ * Select specific fields to fetch from the Media
1135
+ */
1136
+ select?: Prisma.MediaSelect<ExtArgs> | null;
1137
+ /**
1138
+ * Omit specific fields from the Media
1139
+ */
1140
+ omit?: Prisma.MediaOmit<ExtArgs> | null;
1141
+ /**
1142
+ * Choose, which related nodes to fetch as well
1143
+ */
1144
+ include?: Prisma.MediaInclude<ExtArgs> | null;
1145
+ };
1146
+ //# sourceMappingURL=Media.d.ts.map