expo-backend-types 0.46.0-EXPO-344-ExpoBackend-Agregado-de-campos-en-schema.2 → 0.46.0-EXPO-339-Testing-y-bugfixing.2

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 (37) hide show
  1. package/dist/src/event/dto/create-event.dto.d.ts +24 -77
  2. package/dist/src/event/dto/create-event.dto.js +2 -14
  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 +16 -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/toggle-active-event.dto.d.ts +0 -9
  13. package/dist/src/event/dto/update-event.dto.d.ts +44 -31
  14. package/dist/src/event/dto/update-event.dto.js +2 -2
  15. package/dist/src/event-folder/dto/get-all-event-folder.dto.d.ts +0 -42
  16. package/dist/src/event-folder/dto/get-by-id-event-folder.dto.d.ts +0 -30
  17. package/dist/src/i18n/es.d.ts +1 -7
  18. package/dist/src/i18n/es.js +3 -7
  19. package/dist/src/i18n/es.js.map +1 -1
  20. package/dist/src/mi-expo/dto/get-invitations.dto.d.ts +0 -3
  21. package/dist/src/ticket/dto/create-many-ticket.dto.d.ts +0 -30
  22. package/dist/src/ticket/dto/create-ticket.dto.d.ts +0 -30
  23. package/dist/src/ticket/dto/find-all-tickets.dto.d.ts +0 -3
  24. package/dist/src/ticket/dto/find-by-event-ticket.dto.d.ts +0 -3
  25. package/dist/src/ticket/dto/find-by-id-ticket.dto.d.ts +0 -42
  26. package/dist/src/ticket/dto/find-by-mail-ticket.dto.d.ts +0 -3
  27. package/dist/src/ticket/dto/find-by-profile-id-ticket.dto.d.ts +0 -42
  28. package/dist/src/ticket-group/dto/create-ticket-group.dto.d.ts +0 -30
  29. package/dist/types/prisma-schema/edge.js +3 -6
  30. package/dist/types/prisma-schema/index-browser.js +0 -3
  31. package/dist/types/prisma-schema/index.d.ts +1 -214
  32. package/dist/types/prisma-schema/index.js +3 -6
  33. package/dist/types/prisma-schema/package.json +1 -1
  34. package/dist/types/prisma-schema/schema.prisma +6 -9
  35. package/dist/types/prisma-schema/wasm.js +0 -3
  36. package/dist/types/schema.d.ts +0 -66
  37. package/package.json +1 -1
@@ -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
- eventPictureUrl: z.ZodNullable<z.ZodString>;
10
- eventBannerUrl: z.ZodNullable<z.ZodString>;
11
- eventDescription: z.ZodNullable<z.ZodString>;
12
9
  folderId: z.ZodNullable<z.ZodString>;
13
10
  tagAssistedId: z.ZodString;
14
11
  tagConfirmedId: z.ZodString;
@@ -16,17 +13,14 @@ 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
- }, "location" | "name" | "date" | "startingDate" | "endingDate" | "eventPictureUrl" | "eventBannerUrl" | "eventDescription" | "folderId">, {
20
- subEvents: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<Pick<{
16
+ }, "location" | "name" | "date" | "startingDate" | "endingDate" | "folderId">, {
17
+ subEvents: z.ZodOptional<z.ZodArray<z.ZodObject<Pick<{
21
18
  id: z.ZodString;
22
19
  name: z.ZodString;
23
20
  date: z.ZodDate;
24
21
  startingDate: z.ZodDate;
25
22
  endingDate: z.ZodDate;
26
23
  location: z.ZodString;
27
- eventPictureUrl: z.ZodNullable<z.ZodString>;
28
- eventBannerUrl: z.ZodNullable<z.ZodString>;
29
- eventDescription: z.ZodNullable<z.ZodString>;
30
24
  folderId: z.ZodNullable<z.ZodString>;
31
25
  tagAssistedId: z.ZodString;
32
26
  tagConfirmedId: z.ZodString;
@@ -34,31 +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
- }, "location" | "name" | "date" | "startingDate" | "endingDate" | "eventPictureUrl" | "eventBannerUrl" | "eventDescription">, {
38
- eventPictureUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
39
- eventBannerUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
40
- eventDescription: z.ZodDefault<z.ZodNullable<z.ZodString>>;
41
- }>, "strip", z.ZodTypeAny, {
31
+ }, "location" | "name" | "date" | "startingDate" | "endingDate">, "strip", z.ZodTypeAny, {
42
32
  location: string;
43
33
  name: string;
44
34
  date: Date;
45
35
  startingDate: Date;
46
36
  endingDate: Date;
47
- eventPictureUrl: string | null;
48
- eventBannerUrl: string | null;
49
- eventDescription: string | null;
50
37
  }, {
51
38
  location: string;
52
39
  name: string;
53
40
  date: Date;
54
41
  startingDate: Date;
55
42
  endingDate: Date;
56
- eventPictureUrl?: string | null | undefined;
57
- eventBannerUrl?: string | null | undefined;
58
- eventDescription?: string | null | undefined;
59
43
  }>, "many">>;
60
44
  tagsId: z.ZodArray<z.ZodString, "many">;
61
- eventTickets: z.ZodArray<z.ZodObject<Omit<{
45
+ eventTickets: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
62
46
  id: z.ZodString;
63
47
  amount: z.ZodNullable<z.ZodNumber>;
64
48
  type: z.ZodNativeEnum<{
@@ -75,6 +59,14 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
75
59
  type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
76
60
  amount: number | null;
77
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;
78
70
  }>, "many">;
79
71
  }>, "strip", z.ZodTypeAny, {
80
72
  location: string;
@@ -82,9 +74,6 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
82
74
  date: Date;
83
75
  startingDate: Date;
84
76
  endingDate: Date;
85
- eventPictureUrl: string | null;
86
- eventBannerUrl: string | null;
87
- eventDescription: string | null;
88
77
  folderId: string | null;
89
78
  tagsId: string[];
90
79
  eventTickets: {
@@ -98,9 +87,6 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
98
87
  date: Date;
99
88
  startingDate: Date;
100
89
  endingDate: Date;
101
- eventPictureUrl: string | null;
102
- eventBannerUrl: string | null;
103
- eventDescription: string | null;
104
90
  }[] | undefined;
105
91
  }, {
106
92
  location: string;
@@ -108,9 +94,6 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
108
94
  date: Date;
109
95
  startingDate: Date;
110
96
  endingDate: Date;
111
- eventPictureUrl: string | null;
112
- eventBannerUrl: string | null;
113
- eventDescription: string | null;
114
97
  folderId: string | null;
115
98
  tagsId: string[];
116
99
  eventTickets: {
@@ -124,9 +107,6 @@ export declare const createEventSchema: z.ZodObject<z.objectUtil.extendShape<Pic
124
107
  date: Date;
125
108
  startingDate: Date;
126
109
  endingDate: Date;
127
- eventPictureUrl?: string | null | undefined;
128
- eventBannerUrl?: string | null | undefined;
129
- eventDescription?: string | null | undefined;
130
110
  }[] | undefined;
131
111
  }>;
132
112
  declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
@@ -135,9 +115,6 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
135
115
  date: z.ZodString;
136
116
  startingDate: z.ZodString;
137
117
  endingDate: z.ZodString;
138
- eventPictureUrl: z.ZodNullable<z.ZodString>;
139
- eventBannerUrl: z.ZodNullable<z.ZodString>;
140
- eventDescription: z.ZodNullable<z.ZodString>;
141
118
  folderId: z.ZodNullable<z.ZodString>;
142
119
  subEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
143
120
  location: z.ZodString;
@@ -145,38 +122,38 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
145
122
  date: z.ZodString;
146
123
  startingDate: z.ZodString;
147
124
  endingDate: z.ZodString;
148
- eventPictureUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
149
- eventBannerUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
150
- eventDescription: z.ZodDefault<z.ZodNullable<z.ZodString>>;
151
125
  }, z.UnknownKeysParam, z.ZodTypeAny, {
152
126
  location: string;
153
127
  name: string;
154
128
  date: string;
155
129
  startingDate: string;
156
130
  endingDate: string;
157
- eventPictureUrl: string | null;
158
- eventBannerUrl: string | null;
159
- eventDescription: string | null;
160
131
  }, {
161
132
  location: string;
162
133
  name: string;
163
134
  date: string;
164
135
  startingDate: string;
165
136
  endingDate: string;
166
- eventPictureUrl?: string | null | undefined;
167
- eventBannerUrl?: string | null | undefined;
168
- eventDescription?: string | null | undefined;
169
137
  }>, "many">>;
170
138
  tagsId: z.ZodArray<z.ZodString, "many">;
171
- eventTickets: z.ZodArray<z.ZodObject<{
139
+ eventTickets: z.ZodArray<z.ZodEffects<z.ZodObject<Omit<{
140
+ id: z.ZodString;
141
+ amount: z.ZodNullable<z.ZodNumber>;
172
142
  type: z.ZodNativeEnum<{
173
143
  PARTICIPANT: "PARTICIPANT";
174
144
  STAFF: "STAFF";
175
145
  SPECTATOR: "SPECTATOR";
176
146
  }>;
177
- amount: z.ZodNullable<z.ZodNumber>;
178
147
  price: z.ZodNullable<z.ZodNumber>;
179
- }, 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
+ }>, {
180
157
  type: "STAFF" | "SPECTATOR" | "PARTICIPANT";
181
158
  amount: number | null;
182
159
  price: number | null;
@@ -191,9 +168,6 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
191
168
  date: string;
192
169
  startingDate: string;
193
170
  endingDate: string;
194
- eventPictureUrl: string | null;
195
- eventBannerUrl: string | null;
196
- eventDescription: string | null;
197
171
  folderId: string | null;
198
172
  tagsId: string[];
199
173
  eventTickets: {
@@ -207,9 +181,6 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
207
181
  date: string;
208
182
  startingDate: string;
209
183
  endingDate: string;
210
- eventPictureUrl: string | null;
211
- eventBannerUrl: string | null;
212
- eventDescription: string | null;
213
184
  }[] | undefined;
214
185
  }, {
215
186
  location: string;
@@ -217,9 +188,6 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
217
188
  date: string;
218
189
  startingDate: string;
219
190
  endingDate: string;
220
- eventPictureUrl: string | null;
221
- eventBannerUrl: string | null;
222
- eventDescription: string | null;
223
191
  folderId: string | null;
224
192
  tagsId: string[];
225
193
  eventTickets: {
@@ -233,9 +201,6 @@ declare const CreateEventDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.
233
201
  date: string;
234
202
  startingDate: string;
235
203
  endingDate: string;
236
- eventPictureUrl?: string | null | undefined;
237
- eventBannerUrl?: string | null | undefined;
238
- eventDescription?: string | null | undefined;
239
204
  }[] | undefined;
240
205
  }>>;
241
206
  export declare class CreateEventDto extends CreateEventDto_base {
@@ -247,9 +212,6 @@ export declare const createEventResponseSchema: z.ZodObject<{
247
212
  startingDate: z.ZodDate;
248
213
  endingDate: z.ZodDate;
249
214
  location: z.ZodString;
250
- eventPictureUrl: z.ZodNullable<z.ZodString>;
251
- eventBannerUrl: z.ZodNullable<z.ZodString>;
252
- eventDescription: z.ZodNullable<z.ZodString>;
253
215
  folderId: z.ZodNullable<z.ZodString>;
254
216
  tagAssistedId: z.ZodString;
255
217
  tagConfirmedId: z.ZodString;
@@ -264,12 +226,9 @@ export declare const createEventResponseSchema: z.ZodObject<{
264
226
  date: Date;
265
227
  startingDate: Date;
266
228
  endingDate: Date;
267
- eventPictureUrl: string | null;
268
- eventBannerUrl: string | null;
269
229
  created_at: Date;
270
230
  updated_at: Date;
271
231
  active: boolean;
272
- eventDescription: string | null;
273
232
  folderId: string | null;
274
233
  tagAssistedId: string;
275
234
  tagConfirmedId: string;
@@ -281,12 +240,9 @@ export declare const createEventResponseSchema: z.ZodObject<{
281
240
  date: Date;
282
241
  startingDate: Date;
283
242
  endingDate: Date;
284
- eventPictureUrl: string | null;
285
- eventBannerUrl: string | null;
286
243
  created_at: Date;
287
244
  updated_at: Date;
288
245
  active: boolean;
289
- eventDescription: string | null;
290
246
  folderId: string | null;
291
247
  tagAssistedId: string;
292
248
  tagConfirmedId: string;
@@ -299,9 +255,6 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
299
255
  startingDate: z.ZodString;
300
256
  endingDate: z.ZodString;
301
257
  location: z.ZodString;
302
- eventPictureUrl: z.ZodNullable<z.ZodString>;
303
- eventBannerUrl: z.ZodNullable<z.ZodString>;
304
- eventDescription: z.ZodNullable<z.ZodString>;
305
258
  folderId: z.ZodNullable<z.ZodString>;
306
259
  tagAssistedId: z.ZodString;
307
260
  tagConfirmedId: z.ZodString;
@@ -316,12 +269,9 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
316
269
  date: string;
317
270
  startingDate: string;
318
271
  endingDate: string;
319
- eventPictureUrl: string | null;
320
- eventBannerUrl: string | null;
321
272
  created_at: string;
322
273
  updated_at: string;
323
274
  active: boolean;
324
- eventDescription: string | null;
325
275
  folderId: string | null;
326
276
  tagAssistedId: string;
327
277
  tagConfirmedId: string;
@@ -333,12 +283,9 @@ declare const CreateEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
333
283
  date: string;
334
284
  startingDate: string;
335
285
  endingDate: string;
336
- eventPictureUrl: string | null;
337
- eventBannerUrl: string | null;
338
286
  created_at: string;
339
287
  updated_at: string;
340
288
  active: boolean;
341
- eventDescription: string | null;
342
289
  folderId: string | null;
343
290
  tagAssistedId: string;
344
291
  tagConfirmedId: string;
@@ -17,31 +17,19 @@ exports.createEventSchema = event_dto_1.eventSchema
17
17
  endingDate: true,
18
18
  location: true,
19
19
  folderId: true,
20
- eventPictureUrl: true,
21
- eventBannerUrl: true,
22
- eventDescription: true,
23
20
  })
24
21
  .merge(zod_1.default.object({
25
22
  subEvents: zod_1.default
26
- .array(event_dto_1.eventSchema
27
- .pick({
23
+ .array(event_dto_1.eventSchema.pick({
28
24
  name: true,
29
25
  date: true,
30
26
  startingDate: true,
31
27
  endingDate: true,
32
28
  location: true,
33
- eventPictureUrl: true,
34
- eventBannerUrl: true,
35
- eventDescription: true,
36
- })
37
- .extend({
38
- eventPictureUrl: zod_1.default.string().nullable().default(null),
39
- eventBannerUrl: zod_1.default.string().nullable().default(null),
40
- eventDescription: zod_1.default.string().nullable().default(null),
41
29
  }))
42
30
  .optional(),
43
31
  tagsId: zod_1.default.array(tag_dto_1.tagSchema.shape.id),
44
- 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 }))),
45
33
  }));
46
34
  class CreateEventDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.createEventSchema) {
47
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
- eventPictureUrl: import("zod").ZodNullable<import("zod").ZodString>;
9
- eventBannerUrl: import("zod").ZodNullable<import("zod").ZodString>;
10
- eventDescription: 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;
@@ -22,12 +19,9 @@ export declare const deleteEventResponseSchema: import("zod").ZodObject<{
22
19
  date: Date;
23
20
  startingDate: Date;
24
21
  endingDate: Date;
25
- eventPictureUrl: string | null;
26
- eventBannerUrl: string | null;
27
22
  created_at: Date;
28
23
  updated_at: Date;
29
24
  active: boolean;
30
- eventDescription: string | null;
31
25
  folderId: string | null;
32
26
  tagAssistedId: string;
33
27
  tagConfirmedId: string;
@@ -39,12 +33,9 @@ export declare const deleteEventResponseSchema: import("zod").ZodObject<{
39
33
  date: Date;
40
34
  startingDate: Date;
41
35
  endingDate: Date;
42
- eventPictureUrl: string | null;
43
- eventBannerUrl: string | null;
44
36
  created_at: Date;
45
37
  updated_at: Date;
46
38
  active: boolean;
47
- eventDescription: 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
- eventPictureUrl: import("zod").ZodNullable<import("zod").ZodString>;
61
- eventBannerUrl: import("zod").ZodNullable<import("zod").ZodString>;
62
- eventDescription: 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;
@@ -74,12 +62,9 @@ declare const DeleteEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
74
62
  date: string;
75
63
  startingDate: string;
76
64
  endingDate: string;
77
- eventPictureUrl: string | null;
78
- eventBannerUrl: string | null;
79
65
  created_at: string;
80
66
  updated_at: string;
81
67
  active: boolean;
82
- eventDescription: string | null;
83
68
  folderId: string | null;
84
69
  tagAssistedId: string;
85
70
  tagConfirmedId: string;
@@ -91,12 +76,9 @@ declare const DeleteEventResponseDto_base: import("@anatine/zod-nestjs").ZodDtoS
91
76
  date: string;
92
77
  startingDate: string;
93
78
  endingDate: string;
94
- eventPictureUrl: string | null;
95
- eventBannerUrl: string | null;
96
79
  created_at: string;
97
80
  updated_at: string;
98
81
  active: boolean;
99
- eventDescription: 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,30 @@ 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', { type: data.type }),
28
+ });
29
+ }
30
+ });
31
+ }
24
32
  //# 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
- eventPictureUrl: z.ZodNullable<z.ZodString>;
10
- eventBannerUrl: z.ZodNullable<z.ZodString>;
11
- eventDescription: z.ZodNullable<z.ZodString>;
12
9
  folderId: z.ZodNullable<z.ZodString>;
13
10
  tagAssistedId: z.ZodString;
14
11
  tagConfirmedId: z.ZodString;
@@ -23,12 +20,9 @@ export declare const eventSchema: z.ZodObject<{
23
20
  date: Date;
24
21
  startingDate: Date;
25
22
  endingDate: Date;
26
- eventPictureUrl: string | null;
27
- eventBannerUrl: string | null;
28
23
  created_at: Date;
29
24
  updated_at: Date;
30
25
  active: boolean;
31
- eventDescription: string | null;
32
26
  folderId: string | null;
33
27
  tagAssistedId: string;
34
28
  tagConfirmedId: string;
@@ -40,12 +34,9 @@ export declare const eventSchema: z.ZodObject<{
40
34
  date: Date;
41
35
  startingDate: Date;
42
36
  endingDate: Date;
43
- eventPictureUrl: string | null;
44
- eventBannerUrl: string | null;
45
37
  created_at: Date;
46
38
  updated_at: Date;
47
39
  active: boolean;
48
- eventDescription: 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
- eventPictureUrl: zod_1.z
25
- .string()
26
- .url({
27
- message: (0, translate_1.translate)('model.event.eventPictureUrl.invalid'),
28
- })
29
- .nullable(),
30
- eventBannerUrl: zod_1.z
31
- .string()
32
- .url({
33
- message: (0, translate_1.translate)('model.event.eventBannerUrl.invalid'),
34
- })
35
- .nullable(),
36
- eventDescription: 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,