@deallony/shared 1.1.64 → 1.1.66
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 +6 -0
- package/dist/cjs/dto/events/Event.dto.js +2 -0
- package/dist/cjs/dto/events/EventTemplate.dto.d.ts +17 -76
- package/dist/cjs/dto/events/EventTemplate.dto.js +8 -35
- 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 +2 -0
- package/dist/esm/dto/events/EventTemplate.dto.js +7 -34
- package/dist/esm/dto/events/index.js +1 -0
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export declare const eventBaseSchema: z.ZodObject<{
|
|
|
8
8
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
9
9
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
12
|
slug: z.ZodString;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
export declare const createEventSchema: z.ZodObject<{
|
|
@@ -17,6 +18,7 @@ export declare const createEventSchema: z.ZodObject<{
|
|
|
17
18
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
18
19
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
19
20
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
22
|
slug: z.ZodString;
|
|
21
23
|
}, z.core.$strip>;
|
|
22
24
|
export declare const updateEventSchema: z.ZodObject<{
|
|
@@ -26,6 +28,7 @@ export declare const updateEventSchema: z.ZodObject<{
|
|
|
26
28
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
27
29
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
28
30
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
32
|
slug: z.ZodString;
|
|
30
33
|
id: z.ZodCoercedNumber<unknown>;
|
|
31
34
|
}, z.core.$strip>;
|
|
@@ -36,6 +39,7 @@ export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
36
39
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
37
40
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
38
41
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
+
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
43
|
slug: z.ZodString;
|
|
40
44
|
}, z.core.$strip>, z.ZodObject<{
|
|
41
45
|
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -44,6 +48,7 @@ export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
44
48
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
45
49
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
46
50
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
52
|
slug: z.ZodString;
|
|
48
53
|
id: z.ZodCoercedNumber<unknown>;
|
|
49
54
|
}, z.core.$strip>]>;
|
|
@@ -65,6 +70,7 @@ export type IEvent = {
|
|
|
65
70
|
end_date: string | Date | null;
|
|
66
71
|
is_published: boolean;
|
|
67
72
|
event_type: string | null;
|
|
73
|
+
event_template: string | null;
|
|
68
74
|
slug: string;
|
|
69
75
|
wedding?: IEventWedding | null;
|
|
70
76
|
timeline?: IEventTimeline | null;
|
|
@@ -9,6 +9,7 @@ exports.eventBaseSchema = zod_1.z.object({
|
|
|
9
9
|
end_date: zod_1.z.coerce.date().optional().nullable(),
|
|
10
10
|
is_published: zod_1.z.boolean().optional(),
|
|
11
11
|
event_type: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
12
|
+
event_template: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
12
13
|
slug: zod_1.z.string().trim().min(1).max(255),
|
|
13
14
|
});
|
|
14
15
|
exports.createEventSchema = exports.eventBaseSchema;
|
|
@@ -30,6 +31,7 @@ exports.emptyEvent = {
|
|
|
30
31
|
end_date: null,
|
|
31
32
|
is_published: false,
|
|
32
33
|
event_type: null,
|
|
34
|
+
event_template: null,
|
|
33
35
|
slug: '',
|
|
34
36
|
wedding: null,
|
|
35
37
|
timeline: null,
|
|
@@ -1,77 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
religion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
-
event_type_id: z.ZodCoercedNumber<unknown>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export declare const createEventTemplateSchema: z.ZodObject<{
|
|
16
|
-
code: z.ZodString;
|
|
17
|
-
name: z.ZodObject<{
|
|
18
|
-
en: z.ZodString;
|
|
19
|
-
ar: z.ZodString;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
-
religion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
-
event_type_id: z.ZodCoercedNumber<unknown>;
|
|
24
|
-
}, z.core.$strip>;
|
|
25
|
-
export declare const updateEventTemplateSchema: z.ZodObject<{
|
|
26
|
-
code: z.ZodString;
|
|
27
|
-
name: z.ZodObject<{
|
|
28
|
-
en: z.ZodString;
|
|
29
|
-
ar: z.ZodString;
|
|
30
|
-
}, z.core.$strip>;
|
|
31
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
-
religion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
-
event_type_id: z.ZodCoercedNumber<unknown>;
|
|
34
|
-
id: z.ZodCoercedNumber<unknown>;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
|
-
export declare const saveEventTemplateSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
37
|
-
code: z.ZodString;
|
|
38
|
-
name: z.ZodObject<{
|
|
39
|
-
en: z.ZodString;
|
|
40
|
-
ar: z.ZodString;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
-
religion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
-
event_type_id: z.ZodCoercedNumber<unknown>;
|
|
45
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
-
code: z.ZodString;
|
|
47
|
-
name: z.ZodObject<{
|
|
48
|
-
en: z.ZodString;
|
|
49
|
-
ar: z.ZodString;
|
|
50
|
-
}, z.core.$strip>;
|
|
51
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
-
religion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
-
event_type_id: z.ZodCoercedNumber<unknown>;
|
|
54
|
-
id: z.ZodCoercedNumber<unknown>;
|
|
55
|
-
}, z.core.$strip>]>;
|
|
56
|
-
export declare const getEventTemplatesFilterSchema: z.ZodObject<{
|
|
57
|
-
search: z.ZodOptional<z.ZodString>;
|
|
58
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
-
event_type_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
60
|
-
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
61
|
-
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
62
|
-
}, z.core.$strip>;
|
|
63
|
-
export type CreateEventTemplateDto = z.infer<typeof createEventTemplateSchema>;
|
|
64
|
-
export type UpdateEventTemplateDto = z.infer<typeof updateEventTemplateSchema>;
|
|
65
|
-
export type SaveEventTemplateDto = z.infer<typeof saveEventTemplateSchema>;
|
|
66
|
-
export type GetEventTemplatesFilterDto = z.infer<typeof getEventTemplatesFilterSchema>;
|
|
67
|
-
export type IEventTemplate = {
|
|
68
|
-
id?: number;
|
|
69
|
-
code: string;
|
|
70
|
-
name: LocalizedName;
|
|
71
|
-
active: boolean;
|
|
72
|
-
religion: string | null;
|
|
73
|
-
event_type_id: number;
|
|
74
|
-
eventType?: IEventType;
|
|
75
|
-
weddings?: IEventWedding[];
|
|
1
|
+
export declare const EventTemplate: {
|
|
2
|
+
WEDDING: {
|
|
3
|
+
value: string;
|
|
4
|
+
name: {
|
|
5
|
+
en: string;
|
|
6
|
+
ar: string;
|
|
7
|
+
};
|
|
8
|
+
event_types: string[];
|
|
9
|
+
};
|
|
76
10
|
};
|
|
77
|
-
export declare const
|
|
11
|
+
export declare const EventTemplateOptions: {
|
|
12
|
+
value: string;
|
|
13
|
+
name: {
|
|
14
|
+
en: string;
|
|
15
|
+
ar: string;
|
|
16
|
+
};
|
|
17
|
+
event_types: string[];
|
|
18
|
+
}[];
|
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const localizedName_dto_1 = require("../common/localizedName.dto");
|
|
7
|
-
exports.eventTemplateBaseSchema = zod_1.z.object({
|
|
8
|
-
code: zod_1.z.string().trim().min(1).max(100),
|
|
9
|
-
name: localizedName_dto_1.localizedNameSchema,
|
|
10
|
-
active: zod_1.z.boolean().optional(),
|
|
11
|
-
religion: zod_1.z.string().trim().max(100).nullable().optional(),
|
|
12
|
-
event_type_id: zod_1.z.coerce.number().int().positive(),
|
|
13
|
-
});
|
|
14
|
-
exports.createEventTemplateSchema = exports.eventTemplateBaseSchema;
|
|
15
|
-
exports.updateEventTemplateSchema = exports.eventTemplateBaseSchema.extend({
|
|
16
|
-
id: zod_1.z.coerce.number().int().positive(),
|
|
17
|
-
});
|
|
18
|
-
exports.saveEventTemplateSchema = zod_1.z.union([
|
|
19
|
-
exports.createEventTemplateSchema,
|
|
20
|
-
exports.updateEventTemplateSchema,
|
|
21
|
-
]);
|
|
22
|
-
exports.getEventTemplatesFilterSchema = zod_1.z.object({
|
|
23
|
-
search: zod_1.z.string().trim().optional(),
|
|
24
|
-
active: zod_1.z.boolean().optional(),
|
|
25
|
-
event_type_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
26
|
-
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
27
|
-
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
28
|
-
});
|
|
29
|
-
exports.emptyEventTemplate = {
|
|
30
|
-
id: 0,
|
|
31
|
-
code: '',
|
|
32
|
-
name: (0, LocalizedName_1.createEmptyLocalizedName)(),
|
|
33
|
-
active: true,
|
|
34
|
-
religion: null,
|
|
35
|
-
event_type_id: 0,
|
|
36
|
-
eventType: undefined,
|
|
37
|
-
weddings: [],
|
|
3
|
+
exports.EventTemplateOptions = exports.EventTemplate = void 0;
|
|
4
|
+
exports.EventTemplate = {
|
|
5
|
+
WEDDING: { value: 'wedding-1', name: { en: 'Wedding', ar: 'زفاف' }, event_types: ['wedding'] },
|
|
38
6
|
};
|
|
7
|
+
exports.EventTemplateOptions = Object.values(exports.EventTemplate).map((type) => ({
|
|
8
|
+
value: type.value,
|
|
9
|
+
name: type.name,
|
|
10
|
+
event_types: type.event_types,
|
|
11
|
+
}));
|
|
@@ -15,6 +15,7 @@ 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("./EventTemplate.dto"), exports);
|
|
18
19
|
__exportStar(require("./EventTimeline.dto"), exports);
|
|
19
20
|
__exportStar(require("./EventWedding.dto"), exports);
|
|
20
21
|
__exportStar(require("./EventType.dto"), exports);
|
|
@@ -6,6 +6,7 @@ export const eventBaseSchema = z.object({
|
|
|
6
6
|
end_date: z.coerce.date().optional().nullable(),
|
|
7
7
|
is_published: z.boolean().optional(),
|
|
8
8
|
event_type: z.string().trim().max(255).nullable().optional(),
|
|
9
|
+
event_template: z.string().trim().max(255).nullable().optional(),
|
|
9
10
|
slug: z.string().trim().min(1).max(255),
|
|
10
11
|
});
|
|
11
12
|
export const createEventSchema = eventBaseSchema;
|
|
@@ -27,6 +28,7 @@ export const emptyEvent = {
|
|
|
27
28
|
end_date: null,
|
|
28
29
|
is_published: false,
|
|
29
30
|
event_type: null,
|
|
31
|
+
event_template: null,
|
|
30
32
|
slug: '',
|
|
31
33
|
wedding: null,
|
|
32
34
|
timeline: null,
|
|
@@ -1,35 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { localizedNameSchema } from '../common/localizedName.dto.js';
|
|
4
|
-
export const eventTemplateBaseSchema = z.object({
|
|
5
|
-
code: z.string().trim().min(1).max(100),
|
|
6
|
-
name: localizedNameSchema,
|
|
7
|
-
active: z.boolean().optional(),
|
|
8
|
-
religion: z.string().trim().max(100).nullable().optional(),
|
|
9
|
-
event_type_id: z.coerce.number().int().positive(),
|
|
10
|
-
});
|
|
11
|
-
export const createEventTemplateSchema = eventTemplateBaseSchema;
|
|
12
|
-
export const updateEventTemplateSchema = eventTemplateBaseSchema.extend({
|
|
13
|
-
id: z.coerce.number().int().positive(),
|
|
14
|
-
});
|
|
15
|
-
export const saveEventTemplateSchema = z.union([
|
|
16
|
-
createEventTemplateSchema,
|
|
17
|
-
updateEventTemplateSchema,
|
|
18
|
-
]);
|
|
19
|
-
export const getEventTemplatesFilterSchema = z.object({
|
|
20
|
-
search: z.string().trim().optional(),
|
|
21
|
-
active: z.boolean().optional(),
|
|
22
|
-
event_type_id: z.coerce.number().int().positive().optional(),
|
|
23
|
-
page: z.coerce.number().int().positive().optional(),
|
|
24
|
-
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
25
|
-
});
|
|
26
|
-
export const emptyEventTemplate = {
|
|
27
|
-
id: 0,
|
|
28
|
-
code: '',
|
|
29
|
-
name: createEmptyLocalizedName(),
|
|
30
|
-
active: true,
|
|
31
|
-
religion: null,
|
|
32
|
-
event_type_id: 0,
|
|
33
|
-
eventType: undefined,
|
|
34
|
-
weddings: [],
|
|
1
|
+
export const EventTemplate = {
|
|
2
|
+
WEDDING: { value: 'wedding-1', name: { en: 'Wedding', ar: 'زفاف' }, event_types: ['wedding'] },
|
|
35
3
|
};
|
|
4
|
+
export const EventTemplateOptions = Object.values(EventTemplate).map((type) => ({
|
|
5
|
+
value: type.value,
|
|
6
|
+
name: type.name,
|
|
7
|
+
event_types: type.event_types,
|
|
8
|
+
}));
|