@sortipei/api-contracts 0.1.8 → 0.1.10
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.
- package/dist/V1/api/event.d.ts +64 -0
- package/dist/V1/api/event.d.ts.map +1 -1
- package/dist/V1/api/index.d.ts.map +1 -1
- package/dist/api-contracts.js +10 -0
- package/dist/api-contracts.mjs +11 -1
- package/dist/flavors.d.ts +3 -0
- package/dist/flavors.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/V1/api/event.d.ts
CHANGED
|
@@ -60,6 +60,69 @@ export declare const EventDTOSchema: z.ZodObject<{
|
|
|
60
60
|
name: string;
|
|
61
61
|
}[];
|
|
62
62
|
}>;
|
|
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
|
+
}>;
|
|
63
126
|
export declare const CreateEventDTOSchema: z.ZodObject<{
|
|
64
127
|
capacity: z.ZodNullable<z.ZodNumber>;
|
|
65
128
|
description: z.ZodString;
|
|
@@ -174,6 +237,7 @@ export type DisplayEventDTO = z.infer<typeof DisplayEventDTOSchema>;
|
|
|
174
237
|
export type PromoteEventDTO = z.infer<typeof PromoteEventDTOSchema>;
|
|
175
238
|
export type EventFileUploadsDTO = z.infer<typeof EventFileUploadsDTOSchema>;
|
|
176
239
|
export type EventDTO = z.infer<typeof EventDTOSchema>;
|
|
240
|
+
export type EventPublicDTO = z.infer<typeof EventPublicDTOSchema>;
|
|
177
241
|
export declare const constraints: {
|
|
178
242
|
description: {
|
|
179
243
|
minLength: number;
|
|
@@ -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;;;;;;;;;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;
|
|
1
|
+
{"version":3,"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WAAW;;;;;;;;;CASvB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -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;
|
|
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"}
|
package/dist/api-contracts.js
CHANGED
|
@@ -4069,6 +4069,8 @@ const EventIdSchema = UUIDSchema.brand("EventId");
|
|
|
4069
4069
|
const createEventId = (id = crypto.randomUUID()) => EventIdSchema.parse(id);
|
|
4070
4070
|
const OrganizerIdSchema = UUIDSchema.brand("OrganizerId");
|
|
4071
4071
|
const createOrganizerId = (id = crypto.randomUUID()) => OrganizerIdSchema.parse(id);
|
|
4072
|
+
const UserIdSchema = UUIDSchema.brand("UserId");
|
|
4073
|
+
const createUserId = (id = crypto.randomUUID()) => UserIdSchema.parse(id);
|
|
4072
4074
|
const EventDTOSchema = z.object({
|
|
4073
4075
|
capacity: SafeNonNegativeIntegerSchema.nullable(),
|
|
4074
4076
|
description: StringSchema,
|
|
@@ -4088,6 +4090,11 @@ const EventDTOSchema = z.object({
|
|
|
4088
4090
|
name: StringSchema
|
|
4089
4091
|
}).array().min(1)
|
|
4090
4092
|
});
|
|
4093
|
+
const EventPublicDTOSchema = EventDTOSchema.omit({
|
|
4094
|
+
isDisplayed: true
|
|
4095
|
+
}).extend({
|
|
4096
|
+
isFavorite: z.boolean()
|
|
4097
|
+
});
|
|
4091
4098
|
const CreateEventDTOSchema = z.object({
|
|
4092
4099
|
capacity: SafeNonNegativeIntegerSchema.nullable(),
|
|
4093
4100
|
description: StringSchema,
|
|
@@ -4159,6 +4166,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
4159
4166
|
DisplayEventDTOSchema,
|
|
4160
4167
|
EventDTOSchema,
|
|
4161
4168
|
EventFileUploadsDTOSchema,
|
|
4169
|
+
EventPublicDTOSchema,
|
|
4162
4170
|
ImportDTOSchema,
|
|
4163
4171
|
OrganizerDTOSchema,
|
|
4164
4172
|
PromoteEventDTOSchema,
|
|
@@ -4192,6 +4200,8 @@ exports.SafeNonNegativeIntegerSchema = SafeNonNegativeIntegerSchema;
|
|
|
4192
4200
|
exports.StringSchema = StringSchema;
|
|
4193
4201
|
exports.URLSchema = URLSchema;
|
|
4194
4202
|
exports.UUIDSchema = UUIDSchema;
|
|
4203
|
+
exports.UserIdSchema = UserIdSchema;
|
|
4195
4204
|
exports.V1 = index;
|
|
4196
4205
|
exports.createEventId = createEventId;
|
|
4197
4206
|
exports.createOrganizerId = createOrganizerId;
|
|
4207
|
+
exports.createUserId = createUserId;
|
package/dist/api-contracts.mjs
CHANGED
|
@@ -4067,6 +4067,8 @@ const EventIdSchema = UUIDSchema.brand("EventId");
|
|
|
4067
4067
|
const createEventId = (id = crypto.randomUUID()) => EventIdSchema.parse(id);
|
|
4068
4068
|
const OrganizerIdSchema = UUIDSchema.brand("OrganizerId");
|
|
4069
4069
|
const createOrganizerId = (id = crypto.randomUUID()) => OrganizerIdSchema.parse(id);
|
|
4070
|
+
const UserIdSchema = UUIDSchema.brand("UserId");
|
|
4071
|
+
const createUserId = (id = crypto.randomUUID()) => UserIdSchema.parse(id);
|
|
4070
4072
|
const EventDTOSchema = z.object({
|
|
4071
4073
|
capacity: SafeNonNegativeIntegerSchema.nullable(),
|
|
4072
4074
|
description: StringSchema,
|
|
@@ -4086,6 +4088,11 @@ const EventDTOSchema = z.object({
|
|
|
4086
4088
|
name: StringSchema
|
|
4087
4089
|
}).array().min(1)
|
|
4088
4090
|
});
|
|
4091
|
+
const EventPublicDTOSchema = EventDTOSchema.omit({
|
|
4092
|
+
isDisplayed: true
|
|
4093
|
+
}).extend({
|
|
4094
|
+
isFavorite: z.boolean()
|
|
4095
|
+
});
|
|
4089
4096
|
const CreateEventDTOSchema = z.object({
|
|
4090
4097
|
capacity: SafeNonNegativeIntegerSchema.nullable(),
|
|
4091
4098
|
description: StringSchema,
|
|
@@ -4157,6 +4164,7 @@ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
|
|
|
4157
4164
|
DisplayEventDTOSchema,
|
|
4158
4165
|
EventDTOSchema,
|
|
4159
4166
|
EventFileUploadsDTOSchema,
|
|
4167
|
+
EventPublicDTOSchema,
|
|
4160
4168
|
ImportDTOSchema,
|
|
4161
4169
|
OrganizerDTOSchema,
|
|
4162
4170
|
PromoteEventDTOSchema,
|
|
@@ -4191,7 +4199,9 @@ export {
|
|
|
4191
4199
|
StringSchema,
|
|
4192
4200
|
URLSchema,
|
|
4193
4201
|
UUIDSchema,
|
|
4202
|
+
UserIdSchema,
|
|
4194
4203
|
index as V1,
|
|
4195
4204
|
createEventId,
|
|
4196
|
-
createOrganizerId
|
|
4205
|
+
createOrganizerId,
|
|
4206
|
+
createUserId
|
|
4197
4207
|
};
|
package/dist/flavors.d.ts
CHANGED
|
@@ -5,4 +5,7 @@ export declare const createEventId: (id?: string) => EventId;
|
|
|
5
5
|
export declare const OrganizerIdSchema: z.ZodBranded<z.ZodString, "OrganizerId">;
|
|
6
6
|
export type OrganizerId = z.infer<typeof OrganizerIdSchema>;
|
|
7
7
|
export declare const createOrganizerId: (id?: string) => OrganizerId;
|
|
8
|
+
export declare const UserIdSchema: z.ZodBranded<z.ZodString, "UserId">;
|
|
9
|
+
export type UserId = z.infer<typeof UserIdSchema>;
|
|
10
|
+
export declare const createUserId: (id?: string) => UserId;
|
|
8
11
|
//# sourceMappingURL=flavors.d.ts.map
|
package/dist/flavors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flavors.d.ts","sourceRoot":"","sources":["../src/flavors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa,sCAA8B,CAAC;AACzD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,aAAa,QAAQ,MAAM,KAAyB,OAAkC,CAAC;AAEpG,eAAO,MAAM,iBAAiB,0CAAkC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB,QAAQ,MAAM,KAAyB,WAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"flavors.d.ts","sourceRoot":"","sources":["../src/flavors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa,sCAA8B,CAAC;AACzD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,aAAa,QAAQ,MAAM,KAAyB,OAAkC,CAAC;AAEpG,eAAO,MAAM,iBAAiB,0CAAkC,CAAC;AACjE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB,QAAQ,MAAM,KAAyB,WAA0C,CAAC;AAEhH,eAAO,MAAM,YAAY,qCAA6B,CAAC;AACvD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,YAAY,QAAQ,MAAM,KAAyB,MAAgC,CAAC"}
|