@deallony/shared 1.1.59 → 1.1.61
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/cjs/dto/events/Event.dto.d.ts +2 -0
- package/dist/cjs/dto/events/Event.dto.js +1 -0
- package/dist/cjs/dto/events/EventTimeline.dto.d.ts +59 -0
- package/dist/cjs/dto/events/EventTimeline.dto.js +30 -0
- package/dist/cjs/dto/events/EventWedding.dto.d.ts +24 -0
- package/dist/cjs/dto/events/EventWedding.dto.js +8 -0
- package/dist/cjs/dto/events/index.d.ts +1 -0
- package/dist/cjs/dto/events/index.js +1 -0
- package/dist/esm/dto/events/Event.dto.js +1 -0
- package/dist/esm/dto/events/EventTimeline.dto.js +27 -0
- package/dist/esm/dto/events/EventWedding.dto.js +8 -0
- package/dist/esm/dto/events/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { IEventWedding } from './EventWedding.dto';
|
|
3
|
+
import type { IEventTimeline } from './EventTimeline.dto';
|
|
3
4
|
export declare const eventBaseSchema: z.ZodObject<{
|
|
4
5
|
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
5
6
|
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -66,5 +67,6 @@ export type IEvent = {
|
|
|
66
67
|
event_type: string | null;
|
|
67
68
|
slug: string;
|
|
68
69
|
weddings?: IEventWedding[];
|
|
70
|
+
timeline?: IEventTimeline | null;
|
|
69
71
|
};
|
|
70
72
|
export declare const emptyEvent: IEvent;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { IEvent } from './Event.dto';
|
|
3
|
+
export declare const timelinePayloadSchema: z.ZodObject<{
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
start_time: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const eventTimelineBaseSchema: z.ZodObject<{
|
|
8
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
9
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
start_time: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const createEventTimelineSchema: z.ZodObject<{
|
|
15
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
16
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
17
|
+
title: z.ZodString;
|
|
18
|
+
start_time: z.ZodString;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export declare const updateEventTimelineSchema: z.ZodObject<{
|
|
22
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
23
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
24
|
+
title: z.ZodString;
|
|
25
|
+
start_time: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const saveEventTimelineSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
30
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
31
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
32
|
+
title: z.ZodString;
|
|
33
|
+
start_time: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
37
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
start_time: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
42
|
+
}, z.core.$strip>]>;
|
|
43
|
+
export declare const getEventTimelineFilterSchema: z.ZodObject<{
|
|
44
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
45
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
46
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type TimelinePayloadDto = z.infer<typeof timelinePayloadSchema>;
|
|
49
|
+
export type CreateEventTimelineDto = z.infer<typeof createEventTimelineSchema>;
|
|
50
|
+
export type UpdateEventTimelineDto = z.infer<typeof updateEventTimelineSchema>;
|
|
51
|
+
export type SaveEventTimelineDto = z.infer<typeof saveEventTimelineSchema>;
|
|
52
|
+
export type GetEventTimelineFilterDto = z.infer<typeof getEventTimelineFilterSchema>;
|
|
53
|
+
export type IEventTimeline = {
|
|
54
|
+
id?: number;
|
|
55
|
+
event_id: number;
|
|
56
|
+
timelines: TimelinePayloadDto[];
|
|
57
|
+
event?: IEvent;
|
|
58
|
+
};
|
|
59
|
+
export declare const emptyEventTimeline: IEventTimeline;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventTimeline = exports.getEventTimelineFilterSchema = exports.saveEventTimelineSchema = exports.updateEventTimelineSchema = exports.createEventTimelineSchema = exports.eventTimelineBaseSchema = exports.timelinePayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.timelinePayloadSchema = zod_1.z.object({
|
|
6
|
+
title: zod_1.z.string().trim().min(1).max(255),
|
|
7
|
+
start_time: zod_1.z.string().trim().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),
|
|
8
|
+
});
|
|
9
|
+
exports.eventTimelineBaseSchema = zod_1.z.object({
|
|
10
|
+
event_id: zod_1.z.coerce.number().int().positive(),
|
|
11
|
+
timelines: zod_1.z.array(exports.timelinePayloadSchema),
|
|
12
|
+
});
|
|
13
|
+
exports.createEventTimelineSchema = exports.eventTimelineBaseSchema;
|
|
14
|
+
exports.updateEventTimelineSchema = exports.eventTimelineBaseSchema.extend({
|
|
15
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
16
|
+
});
|
|
17
|
+
exports.saveEventTimelineSchema = zod_1.z.union([
|
|
18
|
+
exports.createEventTimelineSchema,
|
|
19
|
+
exports.updateEventTimelineSchema,
|
|
20
|
+
]);
|
|
21
|
+
exports.getEventTimelineFilterSchema = zod_1.z.object({
|
|
22
|
+
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
23
|
+
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
24
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
25
|
+
});
|
|
26
|
+
exports.emptyEventTimeline = {
|
|
27
|
+
id: 0,
|
|
28
|
+
event_id: 0,
|
|
29
|
+
timelines: [],
|
|
30
|
+
};
|
|
@@ -3,22 +3,42 @@ import type { IEvent } from './Event.dto';
|
|
|
3
3
|
export declare const eventWeddingBaseSchema: z.ZodObject<{
|
|
4
4
|
event_id: z.ZodCoercedNumber<unknown>;
|
|
5
5
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
6
|
+
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
10
|
}, z.core.$strip>;
|
|
7
11
|
export declare const createEventWeddingSchema: z.ZodObject<{
|
|
8
12
|
event_id: z.ZodCoercedNumber<unknown>;
|
|
9
13
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
14
|
+
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
18
|
}, z.core.$strip>;
|
|
11
19
|
export declare const updateEventWeddingSchema: z.ZodObject<{
|
|
12
20
|
event_id: z.ZodCoercedNumber<unknown>;
|
|
13
21
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
22
|
+
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
+
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
26
|
id: z.ZodCoercedNumber<unknown>;
|
|
15
27
|
}, z.core.$strip>;
|
|
16
28
|
export declare const saveEventWeddingSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
17
29
|
event_id: z.ZodCoercedNumber<unknown>;
|
|
18
30
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
31
|
+
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
35
|
}, z.core.$strip>, z.ZodObject<{
|
|
20
36
|
event_id: z.ZodCoercedNumber<unknown>;
|
|
21
37
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
38
|
+
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
+
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
42
|
id: z.ZodCoercedNumber<unknown>;
|
|
23
43
|
}, z.core.$strip>]>;
|
|
24
44
|
export declare const getEventWeddingFilterSchema: z.ZodObject<{
|
|
@@ -34,6 +54,10 @@ export type IEventWedding = {
|
|
|
34
54
|
id?: number;
|
|
35
55
|
event_id: number;
|
|
36
56
|
cover: Record<string, any> | null;
|
|
57
|
+
first_bride_name: string | null;
|
|
58
|
+
last_bride_name: string | null;
|
|
59
|
+
first_groom_name: string | null;
|
|
60
|
+
last_groom_name: string | null;
|
|
37
61
|
event?: IEvent;
|
|
38
62
|
};
|
|
39
63
|
export declare const emptyEventWedding: IEventWedding;
|
|
@@ -5,6 +5,10 @@ const zod_1 = require("zod");
|
|
|
5
5
|
exports.eventWeddingBaseSchema = zod_1.z.object({
|
|
6
6
|
event_id: zod_1.z.coerce.number().int().positive(),
|
|
7
7
|
cover: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable().optional(),
|
|
8
|
+
first_bride_name: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
9
|
+
last_bride_name: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
10
|
+
first_groom_name: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
11
|
+
last_groom_name: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
8
12
|
});
|
|
9
13
|
exports.createEventWeddingSchema = exports.eventWeddingBaseSchema;
|
|
10
14
|
exports.updateEventWeddingSchema = exports.eventWeddingBaseSchema.extend({
|
|
@@ -23,4 +27,8 @@ exports.emptyEventWedding = {
|
|
|
23
27
|
id: 0,
|
|
24
28
|
event_id: 0,
|
|
25
29
|
cover: null,
|
|
30
|
+
first_bride_name: null,
|
|
31
|
+
last_bride_name: null,
|
|
32
|
+
first_groom_name: null,
|
|
33
|
+
last_groom_name: null,
|
|
26
34
|
};
|
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Event.dto"), exports);
|
|
18
|
+
__exportStar(require("./EventTimeline.dto"), exports);
|
|
18
19
|
__exportStar(require("./EventWedding.dto"), exports);
|
|
19
20
|
__exportStar(require("./EventType.dto"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const timelinePayloadSchema = z.object({
|
|
3
|
+
title: z.string().trim().min(1).max(255),
|
|
4
|
+
start_time: z.string().trim().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),
|
|
5
|
+
});
|
|
6
|
+
export const eventTimelineBaseSchema = z.object({
|
|
7
|
+
event_id: z.coerce.number().int().positive(),
|
|
8
|
+
timelines: z.array(timelinePayloadSchema),
|
|
9
|
+
});
|
|
10
|
+
export const createEventTimelineSchema = eventTimelineBaseSchema;
|
|
11
|
+
export const updateEventTimelineSchema = eventTimelineBaseSchema.extend({
|
|
12
|
+
id: z.coerce.number().int().positive(),
|
|
13
|
+
});
|
|
14
|
+
export const saveEventTimelineSchema = z.union([
|
|
15
|
+
createEventTimelineSchema,
|
|
16
|
+
updateEventTimelineSchema,
|
|
17
|
+
]);
|
|
18
|
+
export const getEventTimelineFilterSchema = z.object({
|
|
19
|
+
event_id: z.coerce.number().int().positive().optional(),
|
|
20
|
+
page: z.coerce.number().int().positive().optional(),
|
|
21
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
22
|
+
});
|
|
23
|
+
export const emptyEventTimeline = {
|
|
24
|
+
id: 0,
|
|
25
|
+
event_id: 0,
|
|
26
|
+
timelines: [],
|
|
27
|
+
};
|
|
@@ -2,6 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
export const eventWeddingBaseSchema = z.object({
|
|
3
3
|
event_id: z.coerce.number().int().positive(),
|
|
4
4
|
cover: z.record(z.string(), z.any()).nullable().optional(),
|
|
5
|
+
first_bride_name: z.string().trim().max(255).nullable().optional(),
|
|
6
|
+
last_bride_name: z.string().trim().max(255).nullable().optional(),
|
|
7
|
+
first_groom_name: z.string().trim().max(255).nullable().optional(),
|
|
8
|
+
last_groom_name: z.string().trim().max(255).nullable().optional(),
|
|
5
9
|
});
|
|
6
10
|
export const createEventWeddingSchema = eventWeddingBaseSchema;
|
|
7
11
|
export const updateEventWeddingSchema = eventWeddingBaseSchema.extend({
|
|
@@ -20,4 +24,8 @@ export const emptyEventWedding = {
|
|
|
20
24
|
id: 0,
|
|
21
25
|
event_id: 0,
|
|
22
26
|
cover: null,
|
|
27
|
+
first_bride_name: null,
|
|
28
|
+
last_bride_name: null,
|
|
29
|
+
first_groom_name: null,
|
|
30
|
+
last_groom_name: null,
|
|
23
31
|
};
|