@sortipei/api-contracts 0.1.9 → 0.1.11

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.
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const EventDTOSchema: z.ZodObject<{
3
+ adress: z.ZodString;
3
4
  capacity: z.ZodNullable<z.ZodNumber>;
4
5
  description: z.ZodString;
5
6
  finishTime: z.ZodNullable<z.ZodString>;
@@ -24,6 +25,7 @@ export declare const EventDTOSchema: z.ZodObject<{
24
25
  name: string;
25
26
  }>, "many">;
26
27
  }, "strip", z.ZodTypeAny, {
28
+ adress: string;
27
29
  capacity: number | null;
28
30
  description: string;
29
31
  finishTime: string | null;
@@ -42,6 +44,7 @@ export declare const EventDTOSchema: z.ZodObject<{
42
44
  name: string;
43
45
  }[];
44
46
  }, {
47
+ adress: string;
45
48
  capacity: number | null;
46
49
  description: string;
47
50
  finishTime: string | null;
@@ -60,7 +63,74 @@ export declare const EventDTOSchema: z.ZodObject<{
60
63
  name: string;
61
64
  }[];
62
65
  }>;
66
+ export declare const EventPublicDTOSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
67
+ adress: z.ZodString;
68
+ capacity: z.ZodNullable<z.ZodNumber>;
69
+ description: z.ZodString;
70
+ finishTime: z.ZodNullable<z.ZodString>;
71
+ hasHandicapAccess: z.ZodNullable<z.ZodBoolean>;
72
+ id: z.ZodBranded<z.ZodString, "EventId">;
73
+ imageUrls: z.ZodArray<z.ZodString, "many">;
74
+ isDisplayed: z.ZodBoolean;
75
+ isPromoted: z.ZodBoolean;
76
+ link: z.ZodNullable<z.ZodString>;
77
+ price: z.ZodNullable<z.ZodNumber>;
78
+ region: z.ZodNativeEnum<typeof import('../../shared').Region>;
79
+ startTime: z.ZodString;
80
+ title: z.ZodString;
81
+ organizers: z.ZodArray<z.ZodObject<{
82
+ id: z.ZodBranded<z.ZodString, "OrganizerId">;
83
+ name: z.ZodString;
84
+ }, "strip", z.ZodTypeAny, {
85
+ id: string & z.BRAND<"OrganizerId">;
86
+ name: string;
87
+ }, {
88
+ id: string;
89
+ name: string;
90
+ }>, "many">;
91
+ }, "isDisplayed">, {
92
+ isFavorite: z.ZodBoolean;
93
+ }>, "strip", z.ZodTypeAny, {
94
+ adress: string;
95
+ capacity: number | null;
96
+ description: string;
97
+ finishTime: string | null;
98
+ hasHandicapAccess: boolean | null;
99
+ id: string & z.BRAND<"EventId">;
100
+ imageUrls: string[];
101
+ isPromoted: boolean;
102
+ link: string | null;
103
+ price: number | null;
104
+ region: import('../../shared').Region;
105
+ startTime: string;
106
+ title: string;
107
+ organizers: {
108
+ id: string & z.BRAND<"OrganizerId">;
109
+ name: string;
110
+ }[];
111
+ isFavorite: boolean;
112
+ }, {
113
+ adress: string;
114
+ capacity: number | null;
115
+ description: string;
116
+ finishTime: string | null;
117
+ hasHandicapAccess: boolean | null;
118
+ id: string;
119
+ imageUrls: string[];
120
+ isPromoted: boolean;
121
+ link: string | null;
122
+ price: number | null;
123
+ region: import('../../shared').Region;
124
+ startTime: string;
125
+ title: string;
126
+ organizers: {
127
+ id: string;
128
+ name: string;
129
+ }[];
130
+ isFavorite: boolean;
131
+ }>;
63
132
  export declare const CreateEventDTOSchema: z.ZodObject<{
133
+ adress: z.ZodString;
64
134
  capacity: z.ZodNullable<z.ZodNumber>;
65
135
  description: z.ZodString;
66
136
  finishTime: z.ZodNullable<z.ZodString>;
@@ -75,6 +145,7 @@ export declare const CreateEventDTOSchema: z.ZodObject<{
75
145
  startTime: z.ZodString;
76
146
  title: z.ZodString;
77
147
  }, "strip", z.ZodTypeAny, {
148
+ adress: string;
78
149
  capacity: number | null;
79
150
  description: string;
80
151
  finishTime: string | null;
@@ -89,6 +160,7 @@ export declare const CreateEventDTOSchema: z.ZodObject<{
89
160
  title: string;
90
161
  organizersIds: (string & z.BRAND<"OrganizerId">)[];
91
162
  }, {
163
+ adress: string;
92
164
  capacity: number | null;
93
165
  description: string;
94
166
  finishTime: string | null;
@@ -104,6 +176,7 @@ export declare const CreateEventDTOSchema: z.ZodObject<{
104
176
  organizersIds: string[];
105
177
  }>;
106
178
  export declare const UpdateEventDTOSchema: z.ZodObject<Omit<{
179
+ adress: z.ZodString;
107
180
  capacity: z.ZodNullable<z.ZodNumber>;
108
181
  description: z.ZodString;
109
182
  finishTime: z.ZodNullable<z.ZodString>;
@@ -118,6 +191,7 @@ export declare const UpdateEventDTOSchema: z.ZodObject<Omit<{
118
191
  startTime: z.ZodString;
119
192
  title: z.ZodString;
120
193
  }, "id">, "strip", z.ZodTypeAny, {
194
+ adress: string;
121
195
  capacity: number | null;
122
196
  description: string;
123
197
  finishTime: string | null;
@@ -131,6 +205,7 @@ export declare const UpdateEventDTOSchema: z.ZodObject<Omit<{
131
205
  title: string;
132
206
  organizersIds: (string & z.BRAND<"OrganizerId">)[];
133
207
  }, {
208
+ adress: string;
134
209
  capacity: number | null;
135
210
  description: string;
136
211
  finishTime: string | null;
@@ -174,7 +249,12 @@ export type DisplayEventDTO = z.infer<typeof DisplayEventDTOSchema>;
174
249
  export type PromoteEventDTO = z.infer<typeof PromoteEventDTOSchema>;
175
250
  export type EventFileUploadsDTO = z.infer<typeof EventFileUploadsDTOSchema>;
176
251
  export type EventDTO = z.infer<typeof EventDTOSchema>;
252
+ export type EventPublicDTO = z.infer<typeof EventPublicDTOSchema>;
177
253
  export declare const constraints: {
254
+ adress: {
255
+ minLength: number;
256
+ maxLength: number;
257
+ };
178
258
  description: {
179
259
  minLength: number;
180
260
  maxLength: number;
@@ -189,6 +269,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
189
269
  userId: z.ZodString;
190
270
  createdAt: z.ZodString;
191
271
  partialEventState: z.ZodObject<{
272
+ adress: z.ZodOptional<z.ZodString>;
192
273
  capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
193
274
  description: z.ZodOptional<z.ZodString>;
194
275
  finishTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -213,6 +294,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
213
294
  name: string;
214
295
  }>, "many">>;
215
296
  }, "strip", z.ZodTypeAny, {
297
+ adress?: string | undefined;
216
298
  capacity?: number | null | undefined;
217
299
  description?: string | undefined;
218
300
  finishTime?: string | null | undefined;
@@ -231,6 +313,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
231
313
  name: string;
232
314
  }[] | undefined;
233
315
  }, {
316
+ adress?: string | undefined;
234
317
  capacity?: number | null | undefined;
235
318
  description?: string | undefined;
236
319
  finishTime?: string | null | undefined;
@@ -254,6 +337,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
254
337
  userId: string;
255
338
  createdAt: string;
256
339
  partialEventState: {
340
+ adress?: string | undefined;
257
341
  capacity?: number | null | undefined;
258
342
  description?: string | undefined;
259
343
  finishTime?: string | null | undefined;
@@ -277,6 +361,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
277
361
  userId: string;
278
362
  createdAt: string;
279
363
  partialEventState: {
364
+ adress?: string | undefined;
280
365
  capacity?: number | null | undefined;
281
366
  description?: string | undefined;
282
367
  finishTime?: string | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../src/V1/api/event.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,yBAAyB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number;
8
+ };
5
9
  description: {
6
10
  minLength: number;
7
11
  maxLength: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/V1/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAK5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAGvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/V1/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAK5B,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;CAGvB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const CreatePartialImportedEventDTOSchema: z.ZodObject<{
3
3
  partialEventState: z.ZodObject<{
4
+ adress: z.ZodOptional<z.ZodString>;
4
5
  capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
5
6
  description: z.ZodOptional<z.ZodString>;
6
7
  finishTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -25,6 +26,7 @@ export declare const CreatePartialImportedEventDTOSchema: z.ZodObject<{
25
26
  name: string;
26
27
  }>, "many">>;
27
28
  }, "strip", z.ZodTypeAny, {
29
+ adress?: string | undefined;
28
30
  capacity?: number | null | undefined;
29
31
  description?: string | undefined;
30
32
  finishTime?: string | null | undefined;
@@ -43,6 +45,7 @@ export declare const CreatePartialImportedEventDTOSchema: z.ZodObject<{
43
45
  name: string;
44
46
  }[] | undefined;
45
47
  }, {
48
+ adress?: string | undefined;
46
49
  capacity?: number | null | undefined;
47
50
  description?: string | undefined;
48
51
  finishTime?: string | null | undefined;
@@ -66,6 +69,7 @@ export declare const CreatePartialImportedEventDTOSchema: z.ZodObject<{
66
69
  }, "strip", z.ZodTypeAny, {
67
70
  userId: string;
68
71
  partialEventState: {
72
+ adress?: string | undefined;
69
73
  capacity?: number | null | undefined;
70
74
  description?: string | undefined;
71
75
  finishTime?: string | null | undefined;
@@ -88,6 +92,7 @@ export declare const CreatePartialImportedEventDTOSchema: z.ZodObject<{
88
92
  }, {
89
93
  userId: string;
90
94
  partialEventState: {
95
+ adress?: string | undefined;
91
96
  capacity?: number | null | undefined;
92
97
  description?: string | undefined;
93
98
  finishTime?: string | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"partial-imported-event.d.ts","sourceRoot":"","sources":["../../../src/V1/external/partial-imported-event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
1
+ {"version":3,"file":"partial-imported-event.d.ts","sourceRoot":"","sources":["../../../src/V1/external/partial-imported-event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -4072,6 +4072,7 @@ const createOrganizerId = (id = crypto.randomUUID()) => OrganizerIdSchema.parse(
4072
4072
  const UserIdSchema = UUIDSchema.brand("UserId");
4073
4073
  const createUserId = (id = crypto.randomUUID()) => UserIdSchema.parse(id);
4074
4074
  const EventDTOSchema = z.object({
4075
+ adress: StringSchema,
4075
4076
  capacity: SafeNonNegativeIntegerSchema.nullable(),
4076
4077
  description: StringSchema,
4077
4078
  finishTime: z.string().datetime().nullable(),
@@ -4090,7 +4091,13 @@ const EventDTOSchema = z.object({
4090
4091
  name: StringSchema
4091
4092
  }).array().min(1)
4092
4093
  });
4094
+ const EventPublicDTOSchema = EventDTOSchema.omit({
4095
+ isDisplayed: true
4096
+ }).extend({
4097
+ isFavorite: z.boolean()
4098
+ });
4093
4099
  const CreateEventDTOSchema = z.object({
4100
+ adress: StringSchema,
4094
4101
  capacity: SafeNonNegativeIntegerSchema.nullable(),
4095
4102
  description: StringSchema,
4096
4103
  finishTime: z.string().datetime().nullable(),
@@ -4119,6 +4126,10 @@ const EventFileUploadsDTOSchema = z.object({
4119
4126
  uploadUrl: URLSchema
4120
4127
  }).array();
4121
4128
  const constraints$2 = {
4129
+ adress: {
4130
+ minLength: 3,
4131
+ maxLength: 500
4132
+ },
4122
4133
  description: {
4123
4134
  minLength: 3,
4124
4135
  maxLength: 1e4
@@ -4161,6 +4172,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
4161
4172
  DisplayEventDTOSchema,
4162
4173
  EventDTOSchema,
4163
4174
  EventFileUploadsDTOSchema,
4175
+ EventPublicDTOSchema,
4164
4176
  ImportDTOSchema,
4165
4177
  OrganizerDTOSchema,
4166
4178
  PromoteEventDTOSchema,
@@ -4070,6 +4070,7 @@ const createOrganizerId = (id = crypto.randomUUID()) => OrganizerIdSchema.parse(
4070
4070
  const UserIdSchema = UUIDSchema.brand("UserId");
4071
4071
  const createUserId = (id = crypto.randomUUID()) => UserIdSchema.parse(id);
4072
4072
  const EventDTOSchema = z.object({
4073
+ adress: StringSchema,
4073
4074
  capacity: SafeNonNegativeIntegerSchema.nullable(),
4074
4075
  description: StringSchema,
4075
4076
  finishTime: z.string().datetime().nullable(),
@@ -4088,7 +4089,13 @@ const EventDTOSchema = z.object({
4088
4089
  name: StringSchema
4089
4090
  }).array().min(1)
4090
4091
  });
4092
+ const EventPublicDTOSchema = EventDTOSchema.omit({
4093
+ isDisplayed: true
4094
+ }).extend({
4095
+ isFavorite: z.boolean()
4096
+ });
4091
4097
  const CreateEventDTOSchema = z.object({
4098
+ adress: StringSchema,
4092
4099
  capacity: SafeNonNegativeIntegerSchema.nullable(),
4093
4100
  description: StringSchema,
4094
4101
  finishTime: z.string().datetime().nullable(),
@@ -4117,6 +4124,10 @@ const EventFileUploadsDTOSchema = z.object({
4117
4124
  uploadUrl: URLSchema
4118
4125
  }).array();
4119
4126
  const constraints$2 = {
4127
+ adress: {
4128
+ minLength: 3,
4129
+ maxLength: 500
4130
+ },
4120
4131
  description: {
4121
4132
  minLength: 3,
4122
4133
  maxLength: 1e4
@@ -4159,6 +4170,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
4159
4170
  DisplayEventDTOSchema,
4160
4171
  EventDTOSchema,
4161
4172
  EventFileUploadsDTOSchema,
4173
+ EventPublicDTOSchema,
4162
4174
  ImportDTOSchema,
4163
4175
  OrganizerDTOSchema,
4164
4176
  PromoteEventDTOSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sortipei/api-contracts",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "license": "UNLICENCED",
5
5
  "main": "dist/api-contracts.js",
6
6
  "module": "dist/api-contracts.mjs",