expo-backend-types 0.49.0-EXPO-343-Quique-Wolff.1 → 0.49.0-EXPO-350-ExpoBackend-Estadisticas-de-evento.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/src/event/dto/create-event.dto.d.ts +23 -72
  2. package/dist/src/event/dto/create-event.dto.js +1 -7
  3. package/dist/src/event/dto/delete-event.dto.d.ts +0 -18
  4. package/dist/src/event/dto/event-tickets.dto.d.ts +33 -2
  5. package/dist/src/event/dto/event-tickets.dto.js +18 -8
  6. package/dist/src/event/dto/event.dto.d.ts +0 -9
  7. package/dist/src/event/dto/event.dto.js +0 -13
  8. package/dist/src/event/dto/get-active-events.dto.d.ts +23 -33
  9. package/dist/src/event/dto/get-all-event.dto.d.ts +48 -272
  10. package/dist/src/event/dto/get-all-event.dto.js +2 -2
  11. package/dist/src/event/dto/get-by-id-event.dto.d.ts +23 -99
  12. package/dist/src/event/dto/get-statistics-by-id-event.dto.d.ts +8 -0
  13. package/dist/src/event/dto/get-statistics-by-id-event.dto.js +11 -0
  14. package/dist/src/event/dto/toggle-active-event.dto.d.ts +0 -9
  15. package/dist/src/event/dto/update-event.dto.d.ts +46 -75
  16. package/dist/src/event/dto/update-event.dto.js +2 -8
  17. package/dist/src/event-folder/dto/get-all-event-folder.dto.d.ts +0 -42
  18. package/dist/src/event-folder/dto/get-by-id-event-folder.dto.d.ts +0 -30
  19. package/dist/src/i18n/es.d.ts +1 -7
  20. package/dist/src/i18n/es.js +3 -7
  21. package/dist/src/i18n/es.js.map +1 -1
  22. package/dist/src/mi-expo/dto/get-invitations.dto.d.ts +0 -3
  23. package/dist/src/ticket/dto/create-many-ticket.dto.d.ts +0 -30
  24. package/dist/src/ticket/dto/create-ticket.dto.d.ts +0 -30
  25. package/dist/src/ticket/dto/find-all-tickets.dto.d.ts +0 -3
  26. package/dist/src/ticket/dto/find-by-event-ticket.dto.d.ts +0 -3
  27. package/dist/src/ticket/dto/find-by-id-ticket.dto.d.ts +0 -42
  28. package/dist/src/ticket/dto/find-by-mail-ticket.dto.d.ts +0 -3
  29. package/dist/src/ticket/dto/find-by-profile-id-ticket.dto.d.ts +0 -42
  30. package/dist/src/ticket-group/dto/create-ticket-group.dto.d.ts +0 -30
  31. package/dist/types/prisma-schema/edge.js +3 -6
  32. package/dist/types/prisma-schema/index-browser.js +0 -3
  33. package/dist/types/prisma-schema/index.d.ts +1 -214
  34. package/dist/types/prisma-schema/index.js +3 -6
  35. package/dist/types/prisma-schema/package.json +1 -1
  36. package/dist/types/prisma-schema/schema.prisma +6 -9
  37. package/dist/types/prisma-schema/wasm.js +0 -3
  38. package/dist/types/schema.d.ts +92 -377
  39. package/package.json +2 -1
  40. package/dist/src/event/dto/delete-banner-event.dto.d.ts +0 -18
  41. package/dist/src/event/dto/delete-banner-event.dto.js +0 -12
  42. package/dist/src/event/dto/delete-main-picture-event.dto.d.ts +0 -18
  43. package/dist/src/event/dto/delete-main-picture-event.dto.js +0 -12
  44. package/dist/src/event/dto/update-banner-event.dto.d.ts +0 -33
  45. package/dist/src/event/dto/update-banner-event.dto.js +0 -18
  46. package/dist/src/event/dto/update-main-picture-event.dto.d.ts +0 -33
  47. package/dist/src/event/dto/update-main-picture-event.dto.js +0 -18
  48. package/dist/src/profile/dto/delete-image-profile.dto.d.ts +0 -18
  49. package/dist/src/profile/dto/delete-image-profile.dto.js +0 -12
  50. package/dist/src/profile/dto/update-image-profile.dto.d.ts +0 -33
  51. package/dist/src/profile/dto/update-image-profile.dto.js +0 -18
@@ -6,9 +6,6 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
6
6
  startingDate: z.ZodDate;
7
7
  endingDate: z.ZodDate;
8
8
  location: z.ZodString;
9
- mainPictureUrl: z.ZodNullable<z.ZodString>;
10
- bannerUrl: z.ZodNullable<z.ZodString>;
11
- description: z.ZodNullable<z.ZodString>;
12
9
  folderId: z.ZodNullable<z.ZodString>;
13
10
  tagAssistedId: z.ZodString;
14
11
  tagConfirmedId: z.ZodString;
@@ -16,7 +13,7 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
16
13
  supraEventId: z.ZodNullable<z.ZodString>;
17
14
  created_at: z.ZodDate;
18
15
  updated_at: z.ZodDate;
19
- }, "description" | "location" | "name" | "date" | "startingDate" | "endingDate" | "mainPictureUrl" | "bannerUrl" | "folderId">, {
16
+ }, "location" | "name" | "date" | "startingDate" | "endingDate" | "folderId">, {
20
17
  subEvents: z.ZodOptional<z.ZodArray<z.ZodObject<Pick<{
21
18
  id: z.ZodString;
22
19
  name: z.ZodString;
@@ -24,9 +21,6 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
24
21
  startingDate: z.ZodDate;
25
22
  endingDate: z.ZodDate;
26
23
  location: z.ZodString;
27
- mainPictureUrl: z.ZodNullable<z.ZodString>;
28
- bannerUrl: z.ZodNullable<z.ZodString>;
29
- description: z.ZodNullable<z.ZodString>;
30
24
  folderId: z.ZodNullable<z.ZodString>;
31
25
  tagAssistedId: z.ZodString;
32
26
  tagConfirmedId: z.ZodString;
@@ -34,27 +28,21 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
34
28
  supraEventId: z.ZodNullable<z.ZodString>;
35
29
  created_at: z.ZodDate;
36
30
  updated_at: z.ZodDate;
37
- }, "description" | "location" | "name" | "date" | "startingDate" | "endingDate" | "mainPictureUrl" | "bannerUrl">, "strip", z.ZodTypeAny, {
38
- description: string | null;
31
+ }, "location" | "name" | "date" | "startingDate" | "endingDate">, "strip", z.ZodTypeAny, {
39
32
  location: string;
40
33
  name: string;
41
34
  date: Date;
42
35
  startingDate: Date;
43
36
  endingDate: Date;
44
- mainPictureUrl: string | null;
45
- bannerUrl: string | null;
46
37
  }, {
47
- description: string | null;
48
38
  location: string;
49
39
  name: string;
50
40
  date: Date;
51
41
  startingDate: Date;
52
42
  endingDate: Date;
53
- mainPictureUrl: string | null;
54
- bannerUrl: string | null;
55
43
  }>, "many">>;
56
44
  tagsId: z.ZodArray<z.ZodString, "many">;
57
- eventTickets: z.ZodArray<z.ZodObject<Omit<{
45
+ eventTickets: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
58
46
  id: z.ZodString;
59
47
  amount: z.ZodNullable<z.ZodNumber>;
60
48
  type: z.ZodNativeEnum<{
@@ -71,16 +59,21 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
71
59
  type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
72
60
  amount: number | null;
73
61
  price: number | null;
62
+ }>, {
63
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
64
+ amount: number | null;
65
+ price: number | null;
66
+ }, {
67
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
68
+ amount: number | null;
69
+ price: number | null;
74
70
  }>, "many">;
75
71
  }>, "strip", z.ZodTypeAny, {
76
- description: string | null;
77
72
  location: string;
78
73
  name: string;
79
74
  date: Date;
80
75
  startingDate: Date;
81
76
  endingDate: Date;
82
- mainPictureUrl: string | null;
83
- bannerUrl: string | null;
84
77
  folderId: string | null;
85
78
  tagsId: string[];
86
79
  eventTickets: {
@@ -89,24 +82,18 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
89
82
  price: number | null;
90
83
  }[];
91
84
  subEvents?: {
92
- description: string | null;
93
85
  location: string;
94
86
  name: string;
95
87
  date: Date;
96
88
  startingDate: Date;
97
89
  endingDate: Date;
98
- mainPictureUrl: string | null;
99
- bannerUrl: string | null;
100
90
  }[] | undefined;
101
91
  }, {
102
- description: string | null;
103
92
  location: string;
104
93
  name: string;
105
94
  date: Date;
106
95
  startingDate: Date;
107
96
  endingDate: Date;
108
- mainPictureUrl: string | null;
109
- bannerUrl: string | null;
110
97
  folderId: string | null;
111
98
  tagsId: string[];
112
99
  eventTickets: {
@@ -115,64 +102,58 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
115
102
  price: number | null;
116
103
  }[];
117
104
  subEvents?: {
118
- description: string | null;
119
105
  location: string;
120
106
  name: string;
121
107
  date: Date;
122
108
  startingDate: Date;
123
109
  endingDate: Date;
124
- mainPictureUrl: string | null;
125
- bannerUrl: string | null;
126
110
  }[] | undefined;
127
111
  }>;
128
112
  declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
129
- description: z.ZodNullable<z.ZodString>;
130
113
  location: z.ZodString;
131
114
  name: z.ZodString;
132
115
  date: z.ZodString;
133
116
  startingDate: z.ZodString;
134
117
  endingDate: z.ZodString;
135
- mainPictureUrl: z.ZodNullable<z.ZodString>;
136
- bannerUrl: z.ZodNullable<z.ZodString>;
137
118
  folderId: z.ZodNullable<z.ZodString>;
138
119
  subEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
139
- description: z.ZodNullable<z.ZodString>;
140
120
  location: z.ZodString;
141
121
  name: z.ZodString;
142
122
  date: z.ZodString;
143
123
  startingDate: z.ZodString;
144
124
  endingDate: z.ZodString;
145
- mainPictureUrl: z.ZodNullable<z.ZodString>;
146
- bannerUrl: z.ZodNullable<z.ZodString>;
147
125
  }, z.UnknownKeysParam, z.ZodTypeAny, {
148
- description: string | null;
149
126
  location: string;
150
127
  name: string;
151
128
  date: string;
152
129
  startingDate: string;
153
130
  endingDate: string;
154
- mainPictureUrl: string | null;
155
- bannerUrl: string | null;
156
131
  }, {
157
- description: string | null;
158
132
  location: string;
159
133
  name: string;
160
134
  date: string;
161
135
  startingDate: string;
162
136
  endingDate: string;
163
- mainPictureUrl: string | null;
164
- bannerUrl: string | null;
165
137
  }>, "many">>;
166
138
  tagsId: z.ZodArray<z.ZodString, "many">;
167
- eventTickets: z.ZodArray<z.ZodObject<{
139
+ eventTickets: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
140
+ id: z.ZodString;
141
+ amount: z.ZodNullable<z.ZodNumber>;
168
142
  type: z.ZodNativeEnum<{
169
143
  PARTICIPANT: "PARTICIPANT";
170
144
  STAFF: "STAFF";
171
145
  SPECTATOR: "SPECTATOR";
172
146
  }>;
173
- amount: z.ZodNullable<z.ZodNumber>;
174
147
  price: z.ZodNullable<z.ZodNumber>;
175
- }, z.UnknownKeysParam, z.ZodTypeAny, {
148
+ }, "id">, "strip", z.ZodTypeAny, {
149
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
150
+ amount: number | null;
151
+ price: number | null;
152
+ }, {
153
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
154
+ amount: number | null;
155
+ price: number | null;
156
+ }>, {
176
157
  type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
177
158
  amount: number | null;
178
159
  price: number | null;
@@ -182,14 +163,11 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
182
163
  price: number | null;
183
164
  }>, "many">;
184
165
  }, z.UnknownKeysParam, z.ZodTypeAny, {
185
- description: string | null;
186
166
  location: string;
187
167
  name: string;
188
168
  date: string;
189
169
  startingDate: string;
190
170
  endingDate: string;
191
- mainPictureUrl: string | null;
192
- bannerUrl: string | null;
193
171
  folderId: string | null;
194
172
  tagsId: string[];
195
173
  eventTickets: {
@@ -198,24 +176,18 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
198
176
  price: number | null;
199
177
  }[];
200
178
  subEvents?: {
201
- description: string | null;
202
179
  location: string;
203
180
  name: string;
204
181
  date: string;
205
182
  startingDate: string;
206
183
  endingDate: string;
207
- mainPictureUrl: string | null;
208
- bannerUrl: string | null;
209
184
  }[] | undefined;
210
185
  }, {
211
- description: string | null;
212
186
  location: string;
213
187
  name: string;
214
188
  date: string;
215
189
  startingDate: string;
216
190
  endingDate: string;
217
- mainPictureUrl: string | null;
218
- bannerUrl: string | null;
219
191
  folderId: string | null;
220
192
  tagsId: string[];
221
193
  eventTickets: {
@@ -224,14 +196,11 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
224
196
  price: number | null;
225
197
  }[];
226
198
  subEvents?: {
227
- description: string | null;
228
199
  location: string;
229
200
  name: string;
230
201
  date: string;
231
202
  startingDate: string;
232
203
  endingDate: string;
233
- mainPictureUrl: string | null;
234
- bannerUrl: string | null;
235
204
  }[] | undefined;
236
205
  }>>;
237
206
  export declare class CreateEventDto extends CreateEventDto_base {
@@ -243,9 +212,6 @@ export declare const createEventResponseSchema: z.ZodObject<{
243
212
  startingDate: z.ZodDate;
244
213
  endingDate: z.ZodDate;
245
214
  location: z.ZodString;
246
- mainPictureUrl: z.ZodNullable<z.ZodString>;
247
- bannerUrl: z.ZodNullable<z.ZodString>;
248
- description: z.ZodNullable<z.ZodString>;
249
215
  folderId: z.ZodNullable<z.ZodString>;
250
216
  tagAssistedId: z.ZodString;
251
217
  tagConfirmedId: z.ZodString;
@@ -254,7 +220,6 @@ export declare const createEventResponseSchema: z.ZodObject<{
254
220
  created_at: z.ZodDate;
255
221
  updated_at: z.ZodDate;
256
222
  }, "strip", z.ZodTypeAny, {
257
- description: string | null;
258
223
  location: string;
259
224
  id: string;
260
225
  name: string;
@@ -264,14 +229,11 @@ export declare const createEventResponseSchema: z.ZodObject<{
264
229
  created_at: Date;
265
230
  updated_at: Date;
266
231
  active: boolean;
267
- mainPictureUrl: string | null;
268
- bannerUrl: string | null;
269
232
  folderId: string | null;
270
233
  tagAssistedId: string;
271
234
  tagConfirmedId: string;
272
235
  supraEventId: string | null;
273
236
  }, {
274
- description: string | null;
275
237
  location: string;
276
238
  id: string;
277
239
  name: string;
@@ -281,8 +243,6 @@ export declare const createEventResponseSchema: z.ZodObject<{
281
243
  created_at: Date;
282
244
  updated_at: Date;
283
245
  active: boolean;
284
- mainPictureUrl: string | null;
285
- bannerUrl: string | null;
286
246
  folderId: string | null;
287
247
  tagAssistedId: string;
288
248
  tagConfirmedId: string;
@@ -295,9 +255,6 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
295
255
  startingDate: z.ZodString;
296
256
  endingDate: z.ZodString;
297
257
  location: z.ZodString;
298
- mainPictureUrl: z.ZodNullable<z.ZodString>;
299
- bannerUrl: z.ZodNullable<z.ZodString>;
300
- description: z.ZodNullable<z.ZodString>;
301
258
  folderId: z.ZodNullable<z.ZodString>;
302
259
  tagAssistedId: z.ZodString;
303
260
  tagConfirmedId: z.ZodString;
@@ -306,7 +263,6 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
306
263
  created_at: z.ZodString;
307
264
  updated_at: z.ZodString;
308
265
  }, z.UnknownKeysParam, z.ZodTypeAny, {
309
- description: string | null;
310
266
  location: string;
311
267
  id: string;
312
268
  name: string;
@@ -316,14 +272,11 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
316
272
  created_at: string;
317
273
  updated_at: string;
318
274
  active: boolean;
319
- mainPictureUrl: string | null;
320
- bannerUrl: string | null;
321
275
  folderId: string | null;
322
276
  tagAssistedId: string;
323
277
  tagConfirmedId: string;
324
278
  supraEventId: string | null;
325
279
  }, {
326
- description: string | null;
327
280
  location: string;
328
281
  id: string;
329
282
  name: string;
@@ -333,8 +286,6 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
333
286
  created_at: string;
334
287
  updated_at: string;
335
288
  active: boolean;
336
- mainPictureUrl: string | null;
337
- bannerUrl: string | null;
338
289
  folderId: string | null;
339
290
  tagAssistedId: string;
340
291
  tagConfirmedId: string;
@@ -17,9 +17,6 @@ exports.createEventSchema = event_dto_1.eventSchema
17
17
  endingDate: true,
18
18
  location: true,
19
19
  folderId: true,
20
- mainPictureUrl: true,
21
- bannerUrl: true,
22
- description: true,
23
20
  })
24
21
  .merge(zod_1.default.object({
25
22
  subEvents: zod_1.default
@@ -29,13 +26,10 @@ exports.createEventSchema = event_dto_1.eventSchema
29
26
  startingDate: true,
30
27
  endingDate: true,
31
28
  location: true,
32
- mainPictureUrl: true,
33
- bannerUrl: true,
34
- description: true,
35
29
  }))
36
30
  .optional(),
37
31
  tagsId: zod_1.default.array(tag_dto_1.tagSchema.shape.id),
38
- eventTickets: zod_1.default.array(event_tickets_dto_1.eventTicketsSchema.omit({ id: true })),
32
+ eventTickets: zod_1.default.array((0, event_tickets_dto_1.addEventTicketRefinements)(event_tickets_dto_1.baseEventTicketsSchema.omit({ id: true }))),
39
33
  }));
40
34
  class CreateEventDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.createEventSchema) {
41
35
  }
@@ -5,9 +5,6 @@ export declare const deleteEventResponseSchema: import("zod").ZodObject<{
5
5
  startingDate: import("zod").ZodDate;
6
6
  endingDate: import("zod").ZodDate;
7
7
  location: import("zod").ZodString;
8
- mainPictureUrl: import("zod").ZodNullable<import("zod").ZodString>;
9
- bannerUrl: import("zod").ZodNullable<import("zod").ZodString>;
10
- description: import("zod").ZodNullable<import("zod").ZodString>;
11
8
  folderId: import("zod").ZodNullable<import("zod").ZodString>;
12
9
  tagAssistedId: import("zod").ZodString;
13
10
  tagConfirmedId: import("zod").ZodString;
@@ -16,7 +13,6 @@ export declare const deleteEventResponseSchema: import("zod").ZodObject<{
16
13
  created_at: import("zod").ZodDate;
17
14
  updated_at: import("zod").ZodDate;
18
15
  }, "strip", import("zod").ZodTypeAny, {
19
- description: string | null;
20
16
  location: string;
21
17
  id: string;
22
18
  name: string;
@@ -26,14 +22,11 @@ export declare const deleteEventResponseSchema: import("zod").ZodObject<{
26
22
  created_at: Date;
27
23
  updated_at: Date;
28
24
  active: boolean;
29
- mainPictureUrl: string | null;
30
- bannerUrl: string | null;
31
25
  folderId: string | null;
32
26
  tagAssistedId: string;
33
27
  tagConfirmedId: string;
34
28
  supraEventId: string | null;
35
29
  }, {
36
- description: string | null;
37
30
  location: string;
38
31
  id: string;
39
32
  name: string;
@@ -43,8 +36,6 @@ export declare const deleteEventResponseSchema: import("zod").ZodObject<{
43
36
  created_at: Date;
44
37
  updated_at: Date;
45
38
  active: boolean;
46
- mainPictureUrl: string | null;
47
- bannerUrl: string | null;
48
39
  folderId: string | null;
49
40
  tagAssistedId: string;
50
41
  tagConfirmedId: string;
@@ -57,9 +48,6 @@ declare const DeleteEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
57
48
  startingDate: import("zod").ZodString;
58
49
  endingDate: import("zod").ZodString;
59
50
  location: import("zod").ZodString;
60
- mainPictureUrl: import("zod").ZodNullable<import("zod").ZodString>;
61
- bannerUrl: import("zod").ZodNullable<import("zod").ZodString>;
62
- description: import("zod").ZodNullable<import("zod").ZodString>;
63
51
  folderId: import("zod").ZodNullable<import("zod").ZodString>;
64
52
  tagAssistedId: import("zod").ZodString;
65
53
  tagConfirmedId: import("zod").ZodString;
@@ -68,7 +56,6 @@ declare const DeleteEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
68
56
  created_at: import("zod").ZodString;
69
57
  updated_at: import("zod").ZodString;
70
58
  }, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
71
- description: string | null;
72
59
  location: string;
73
60
  id: string;
74
61
  name: string;
@@ -78,14 +65,11 @@ declare const DeleteEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
78
65
  created_at: string;
79
66
  updated_at: string;
80
67
  active: boolean;
81
- mainPictureUrl: string | null;
82
- bannerUrl: string | null;
83
68
  folderId: string | null;
84
69
  tagAssistedId: string;
85
70
  tagConfirmedId: string;
86
71
  supraEventId: string | null;
87
72
  }, {
88
- description: string | null;
89
73
  location: string;
90
74
  id: string;
91
75
  name: string;
@@ -95,8 +79,6 @@ declare const DeleteEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
95
79
  created_at: string;
96
80
  updated_at: string;
97
81
  active: boolean;
98
- mainPictureUrl: string | null;
99
- bannerUrl: string | null;
100
82
  folderId: string | null;
101
83
  tagAssistedId: string;
102
84
  tagConfirmedId: string;
@@ -1,5 +1,5 @@
1
- import z from 'zod';
2
- export declare const eventTicketsSchema: z.ZodObject<{
1
+ import z, { ZodEffects } from 'zod';
2
+ export declare const baseEventTicketsSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  amount: z.ZodNullable<z.ZodNumber>;
5
5
  type: z.ZodNativeEnum<{
@@ -19,3 +19,34 @@ export declare const eventTicketsSchema: z.ZodObject<{
19
19
  amount: number | null;
20
20
  price: number | null;
21
21
  }>;
22
+ export declare const eventTicketsSchema: z.ZodEffects<z.ZodObject<{
23
+ id: z.ZodString;
24
+ amount: z.ZodNullable<z.ZodNumber>;
25
+ type: z.ZodNativeEnum<{
26
+ PARTICIPANT: "PARTICIPANT";
27
+ STAFF: "STAFF";
28
+ SPECTATOR: "SPECTATOR";
29
+ }>;
30
+ price: z.ZodNullable<z.ZodNumber>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ id: string;
33
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
34
+ amount: number | null;
35
+ price: number | null;
36
+ }, {
37
+ id: string;
38
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
39
+ amount: number | null;
40
+ price: number | null;
41
+ }>, {
42
+ id: string;
43
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
44
+ amount: number | null;
45
+ price: number | null;
46
+ }, {
47
+ id: string;
48
+ type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
49
+ amount: number | null;
50
+ price: number | null;
51
+ }>;
52
+ export declare function addEventTicketRefinements<T extends z.ZodTypeAny>(schema: T): ZodEffects<T, T['_output'], T['_input']>;
@@ -3,22 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.eventTicketsSchema = void 0;
6
+ exports.eventTicketsSchema = exports.baseEventTicketsSchema = void 0;
7
+ exports.addEventTicketRefinements = addEventTicketRefinements;
7
8
  const translate_1 = require("../../i18n/translate");
8
9
  const zod_1 = __importDefault(require("zod"));
9
10
  const prisma_schema_1 = require("../../../types/prisma-schema/index.js");
10
- exports.eventTicketsSchema = zod_1.default.object({
11
+ exports.baseEventTicketsSchema = zod_1.default.object({
11
12
  id: zod_1.default.string().uuid(),
12
- amount: zod_1.default
13
- .number()
14
- .min(1, {
15
- message: (0, translate_1.translate)('model.eventTicket.amount.min'),
16
- })
17
- .nullable(),
13
+ amount: zod_1.default.number().nullable(),
18
14
  type: zod_1.default.nativeEnum(prisma_schema_1.TicketType),
19
15
  price: zod_1.default
20
16
  .number()
21
17
  .min(1, { message: (0, translate_1.translate)('model.eventTicket.price.min') })
22
18
  .nullable(),
23
19
  });
20
+ exports.eventTicketsSchema = addEventTicketRefinements(exports.baseEventTicketsSchema);
21
+ function addEventTicketRefinements(schema) {
22
+ return schema.superRefine((data, ctx) => {
23
+ if (data.amount !== null && data.amount < 1) {
24
+ ctx.addIssue({
25
+ path: ['amount'],
26
+ code: zod_1.default.ZodIssueCode.custom,
27
+ message: (0, translate_1.translate)('model.eventTicket.amount.min', {
28
+ type: `${(0, translate_1.translate)(`prisma.ticketType.${data.type}`)}`,
29
+ }),
30
+ });
31
+ }
32
+ });
33
+ }
24
34
  //# sourceMappingURL=event-tickets.dto.js.map
@@ -6,9 +6,6 @@ export declare const eventSchema: z.ZodObject<{
6
6
  startingDate: z.ZodDate;
7
7
  endingDate: z.ZodDate;
8
8
  location: z.ZodString;
9
- mainPictureUrl: z.ZodNullable<z.ZodString>;
10
- bannerUrl: z.ZodNullable<z.ZodString>;
11
- description: z.ZodNullable<z.ZodString>;
12
9
  folderId: z.ZodNullable<z.ZodString>;
13
10
  tagAssistedId: z.ZodString;
14
11
  tagConfirmedId: z.ZodString;
@@ -17,7 +14,6 @@ export declare const eventSchema: z.ZodObject<{
17
14
  created_at: z.ZodDate;
18
15
  updated_at: z.ZodDate;
19
16
  }, "strip", z.ZodTypeAny, {
20
- description: string | null;
21
17
  location: string;
22
18
  id: string;
23
19
  name: string;
@@ -27,14 +23,11 @@ export declare const eventSchema: z.ZodObject<{
27
23
  created_at: Date;
28
24
  updated_at: Date;
29
25
  active: boolean;
30
- mainPictureUrl: string | null;
31
- bannerUrl: string | null;
32
26
  folderId: string | null;
33
27
  tagAssistedId: string;
34
28
  tagConfirmedId: string;
35
29
  supraEventId: string | null;
36
30
  }, {
37
- description: string | null;
38
31
  location: string;
39
32
  id: string;
40
33
  name: string;
@@ -44,8 +37,6 @@ export declare const eventSchema: z.ZodObject<{
44
37
  created_at: Date;
45
38
  updated_at: Date;
46
39
  active: boolean;
47
- mainPictureUrl: string | null;
48
- bannerUrl: string | null;
49
40
  folderId: string | null;
50
41
  tagAssistedId: string;
51
42
  tagConfirmedId: string;
@@ -21,19 +21,6 @@ exports.eventSchema = zod_1.z.object({
21
21
  invalid_type_error: (0, translate_1.translate)('model.event.endingDate.invalid'),
22
22
  }),
23
23
  location: zod_1.z.string().min(1, (0, translate_1.translate)('model.event.location.required')),
24
- mainPictureUrl: zod_1.z
25
- .string()
26
- .url({
27
- message: (0, translate_1.translate)('model.event.eventPictureUrl.invalid'),
28
- })
29
- .nullable(),
30
- bannerUrl: zod_1.z
31
- .string()
32
- .url({
33
- message: (0, translate_1.translate)('model.event.eventBannerUrl.invalid'),
34
- })
35
- .nullable(),
36
- description: zod_1.z.string().nullable(),
37
24
  folderId: event_folder_dto_1.eventFolderSchema.shape.id.nullable(),
38
25
  tagAssistedId: tag_dto_1.tagSchema.shape.id,
39
26
  tagConfirmedId: tag_dto_1.tagSchema.shape.id,