@sortipei/api-contracts 0.1.10 → 0.1.12

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,70 +63,8 @@ export declare const EventDTOSchema: z.ZodObject<{
60
63
  name: string;
61
64
  }[];
62
65
  }>;
63
- export declare const EventPublicDTOSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
64
- capacity: z.ZodNullable<z.ZodNumber>;
65
- description: z.ZodString;
66
- finishTime: z.ZodNullable<z.ZodString>;
67
- hasHandicapAccess: z.ZodNullable<z.ZodBoolean>;
68
- id: z.ZodBranded<z.ZodString, "EventId">;
69
- imageUrls: z.ZodArray<z.ZodString, "many">;
70
- isDisplayed: z.ZodBoolean;
71
- isPromoted: z.ZodBoolean;
72
- link: z.ZodNullable<z.ZodString>;
73
- price: z.ZodNullable<z.ZodNumber>;
74
- region: z.ZodNativeEnum<typeof import('../../shared').Region>;
75
- startTime: z.ZodString;
76
- title: z.ZodString;
77
- organizers: z.ZodArray<z.ZodObject<{
78
- id: z.ZodBranded<z.ZodString, "OrganizerId">;
79
- name: z.ZodString;
80
- }, "strip", z.ZodTypeAny, {
81
- id: string & z.BRAND<"OrganizerId">;
82
- name: string;
83
- }, {
84
- id: string;
85
- name: string;
86
- }>, "many">;
87
- }, "isDisplayed">, {
88
- isFavorite: z.ZodBoolean;
89
- }>, "strip", z.ZodTypeAny, {
90
- capacity: number | null;
91
- description: string;
92
- finishTime: string | null;
93
- hasHandicapAccess: boolean | null;
94
- id: string & z.BRAND<"EventId">;
95
- imageUrls: string[];
96
- isPromoted: boolean;
97
- link: string | null;
98
- price: number | null;
99
- region: import('../../shared').Region;
100
- startTime: string;
101
- title: string;
102
- organizers: {
103
- id: string & z.BRAND<"OrganizerId">;
104
- name: string;
105
- }[];
106
- isFavorite: boolean;
107
- }, {
108
- capacity: number | null;
109
- description: string;
110
- finishTime: string | null;
111
- hasHandicapAccess: boolean | null;
112
- id: string;
113
- imageUrls: string[];
114
- isPromoted: boolean;
115
- link: string | null;
116
- price: number | null;
117
- region: import('../../shared').Region;
118
- startTime: string;
119
- title: string;
120
- organizers: {
121
- id: string;
122
- name: string;
123
- }[];
124
- isFavorite: boolean;
125
- }>;
126
66
  export declare const CreateEventDTOSchema: z.ZodObject<{
67
+ adress: z.ZodString;
127
68
  capacity: z.ZodNullable<z.ZodNumber>;
128
69
  description: z.ZodString;
129
70
  finishTime: z.ZodNullable<z.ZodString>;
@@ -138,6 +79,7 @@ export declare const CreateEventDTOSchema: z.ZodObject<{
138
79
  startTime: z.ZodString;
139
80
  title: z.ZodString;
140
81
  }, "strip", z.ZodTypeAny, {
82
+ adress: string;
141
83
  capacity: number | null;
142
84
  description: string;
143
85
  finishTime: string | null;
@@ -152,6 +94,7 @@ export declare const CreateEventDTOSchema: z.ZodObject<{
152
94
  title: string;
153
95
  organizersIds: (string & z.BRAND<"OrganizerId">)[];
154
96
  }, {
97
+ adress: string;
155
98
  capacity: number | null;
156
99
  description: string;
157
100
  finishTime: string | null;
@@ -167,6 +110,7 @@ export declare const CreateEventDTOSchema: z.ZodObject<{
167
110
  organizersIds: string[];
168
111
  }>;
169
112
  export declare const UpdateEventDTOSchema: z.ZodObject<Omit<{
113
+ adress: z.ZodString;
170
114
  capacity: z.ZodNullable<z.ZodNumber>;
171
115
  description: z.ZodString;
172
116
  finishTime: z.ZodNullable<z.ZodString>;
@@ -181,6 +125,7 @@ export declare const UpdateEventDTOSchema: z.ZodObject<Omit<{
181
125
  startTime: z.ZodString;
182
126
  title: z.ZodString;
183
127
  }, "id">, "strip", z.ZodTypeAny, {
128
+ adress: string;
184
129
  capacity: number | null;
185
130
  description: string;
186
131
  finishTime: string | null;
@@ -194,6 +139,7 @@ export declare const UpdateEventDTOSchema: z.ZodObject<Omit<{
194
139
  title: string;
195
140
  organizersIds: (string & z.BRAND<"OrganizerId">)[];
196
141
  }, {
142
+ adress: string;
197
143
  capacity: number | null;
198
144
  description: string;
199
145
  finishTime: string | null;
@@ -237,8 +183,11 @@ export type DisplayEventDTO = z.infer<typeof DisplayEventDTOSchema>;
237
183
  export type PromoteEventDTO = z.infer<typeof PromoteEventDTOSchema>;
238
184
  export type EventFileUploadsDTO = z.infer<typeof EventFileUploadsDTOSchema>;
239
185
  export type EventDTO = z.infer<typeof EventDTOSchema>;
240
- export type EventPublicDTO = z.infer<typeof EventPublicDTOSchema>;
241
186
  export declare const constraints: {
187
+ adress: {
188
+ minLength: number;
189
+ maxLength: number;
190
+ };
242
191
  description: {
243
192
  minLength: number;
244
193
  maxLength: number;
@@ -253,6 +202,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
253
202
  userId: z.ZodString;
254
203
  createdAt: z.ZodString;
255
204
  partialEventState: z.ZodObject<{
205
+ adress: z.ZodOptional<z.ZodString>;
256
206
  capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
257
207
  description: z.ZodOptional<z.ZodString>;
258
208
  finishTime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -277,6 +227,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
277
227
  name: string;
278
228
  }>, "many">>;
279
229
  }, "strip", z.ZodTypeAny, {
230
+ adress?: string | undefined;
280
231
  capacity?: number | null | undefined;
281
232
  description?: string | undefined;
282
233
  finishTime?: string | null | undefined;
@@ -295,6 +246,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
295
246
  name: string;
296
247
  }[] | undefined;
297
248
  }, {
249
+ adress?: string | undefined;
298
250
  capacity?: number | null | undefined;
299
251
  description?: string | undefined;
300
252
  finishTime?: string | null | undefined;
@@ -318,6 +270,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
318
270
  userId: string;
319
271
  createdAt: string;
320
272
  partialEventState: {
273
+ adress?: string | undefined;
321
274
  capacity?: number | null | undefined;
322
275
  description?: string | undefined;
323
276
  finishTime?: string | null | undefined;
@@ -341,6 +294,7 @@ export declare const ImportDTOSchema: z.ZodObject<{
341
294
  userId: string;
342
295
  createdAt: string;
343
296
  partialEventState: {
297
+ adress?: string | undefined;
344
298
  capacity?: number | null | undefined;
345
299
  description?: string | undefined;
346
300
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI/B,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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B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;WAK5B,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAavB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -2,6 +2,10 @@ export * from './event';
2
2
  export * from './organizer';
3
3
  export declare const constraints: {
4
4
  events: {
5
+ adress: {
6
+ minLength: number;
7
+ maxLength: 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,12 +4091,8 @@ const EventDTOSchema = z.object({
4090
4091
  name: StringSchema
4091
4092
  }).array().min(1)
4092
4093
  });
4093
- const EventPublicDTOSchema = EventDTOSchema.omit({
4094
- isDisplayed: true
4095
- }).extend({
4096
- isFavorite: z.boolean()
4097
- });
4098
4094
  const CreateEventDTOSchema = z.object({
4095
+ adress: StringSchema,
4099
4096
  capacity: SafeNonNegativeIntegerSchema.nullable(),
4100
4097
  description: StringSchema,
4101
4098
  finishTime: z.string().datetime().nullable(),
@@ -4124,6 +4121,10 @@ const EventFileUploadsDTOSchema = z.object({
4124
4121
  uploadUrl: URLSchema
4125
4122
  }).array();
4126
4123
  const constraints$2 = {
4124
+ adress: {
4125
+ minLength: 3,
4126
+ maxLength: 500
4127
+ },
4127
4128
  description: {
4128
4129
  minLength: 3,
4129
4130
  maxLength: 1e4
@@ -4166,7 +4167,6 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
4166
4167
  DisplayEventDTOSchema,
4167
4168
  EventDTOSchema,
4168
4169
  EventFileUploadsDTOSchema,
4169
- EventPublicDTOSchema,
4170
4170
  ImportDTOSchema,
4171
4171
  OrganizerDTOSchema,
4172
4172
  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,12 +4089,8 @@ const EventDTOSchema = z.object({
4088
4089
  name: StringSchema
4089
4090
  }).array().min(1)
4090
4091
  });
4091
- const EventPublicDTOSchema = EventDTOSchema.omit({
4092
- isDisplayed: true
4093
- }).extend({
4094
- isFavorite: z.boolean()
4095
- });
4096
4092
  const CreateEventDTOSchema = z.object({
4093
+ adress: StringSchema,
4097
4094
  capacity: SafeNonNegativeIntegerSchema.nullable(),
4098
4095
  description: StringSchema,
4099
4096
  finishTime: z.string().datetime().nullable(),
@@ -4122,6 +4119,10 @@ const EventFileUploadsDTOSchema = z.object({
4122
4119
  uploadUrl: URLSchema
4123
4120
  }).array();
4124
4121
  const constraints$2 = {
4122
+ adress: {
4123
+ minLength: 3,
4124
+ maxLength: 500
4125
+ },
4125
4126
  description: {
4126
4127
  minLength: 3,
4127
4128
  maxLength: 1e4
@@ -4164,7 +4165,6 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
4164
4165
  DisplayEventDTOSchema,
4165
4166
  EventDTOSchema,
4166
4167
  EventFileUploadsDTOSchema,
4167
- EventPublicDTOSchema,
4168
4168
  ImportDTOSchema,
4169
4169
  OrganizerDTOSchema,
4170
4170
  PromoteEventDTOSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sortipei/api-contracts",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "license": "UNLICENCED",
5
5
  "main": "dist/api-contracts.js",
6
6
  "module": "dist/api-contracts.mjs",