@deallony/shared 1.1.49 → 1.1.51
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/common/localizedName.dto.d.ts +5 -0
- package/dist/cjs/dto/common/localizedName.dto.js +8 -0
- package/dist/cjs/dto/events/Event.d.ts +12 -0
- package/dist/cjs/dto/events/Event.dto.d.ts +52 -0
- package/dist/cjs/dto/events/Event.dto.js +23 -0
- package/dist/cjs/dto/events/Event.js +13 -0
- package/dist/cjs/dto/events/EventTemplate.d.ts +14 -0
- package/dist/cjs/dto/events/EventTemplate.dto.d.ts +77 -0
- package/dist/cjs/dto/events/EventTemplate.dto.js +38 -0
- package/dist/cjs/dto/events/EventTemplate.js +14 -0
- package/dist/cjs/dto/events/EventType.d.ts +10 -0
- package/dist/cjs/dto/events/EventType.dto.d.ts +52 -0
- package/dist/cjs/dto/events/EventType.dto.js +24 -0
- package/dist/cjs/dto/events/EventType.js +11 -0
- package/dist/cjs/dto/events/EventWedding.d.ts +11 -0
- package/dist/cjs/dto/events/EventWedding.dto.d.ts +48 -0
- package/dist/cjs/dto/events/EventWedding.dto.js +29 -0
- package/dist/cjs/dto/events/EventWedding.js +9 -0
- package/dist/cjs/dto/events/common.d.ts +5 -0
- package/dist/cjs/dto/events/common.js +8 -0
- package/dist/cjs/dto/events/index.d.ts +6 -0
- package/dist/cjs/dto/events/index.js +22 -0
- package/dist/cjs/dto/index.d.ts +1 -0
- package/dist/cjs/dto/index.js +15 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/types/ad/Ad.d.ts +1 -0
- package/dist/cjs/types/ad/Ad.js +2 -1
- package/dist/cjs/types/events/Event.d.ts +12 -0
- package/dist/cjs/types/events/Event.js +13 -0
- package/dist/cjs/types/events/EventTemplate.d.ts +14 -0
- package/dist/cjs/types/events/EventTemplate.js +14 -0
- package/dist/cjs/types/events/EventType.d.ts +10 -0
- package/dist/cjs/types/events/EventType.js +11 -0
- package/dist/cjs/types/events/EventWedding.d.ts +11 -0
- package/dist/cjs/types/events/EventWedding.js +9 -0
- package/dist/cjs/types/events/index.d.ts +4 -0
- package/dist/cjs/types/events/index.js +20 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/index.js +7 -2
- package/dist/esm/dto/common/localizedName.dto.js +5 -0
- package/dist/esm/dto/events/Event.dto.js +20 -0
- package/dist/esm/dto/events/Event.js +10 -0
- package/dist/esm/dto/events/EventTemplate.dto.js +35 -0
- package/dist/esm/dto/events/EventTemplate.js +11 -0
- package/dist/esm/dto/events/EventType.dto.js +21 -0
- package/dist/esm/dto/events/EventType.js +8 -0
- package/dist/esm/dto/events/EventWedding.dto.js +26 -0
- package/dist/esm/dto/events/EventWedding.js +6 -0
- package/dist/esm/dto/events/common.js +5 -0
- package/dist/esm/dto/events/index.js +6 -0
- package/dist/esm/dto/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/types/ad/Ad.js +1 -0
- package/dist/esm/types/events/Event.js +10 -0
- package/dist/esm/types/events/EventTemplate.js +11 -0
- package/dist/esm/types/events/EventType.js +8 -0
- package/dist/esm/types/events/EventWedding.js +6 -0
- package/dist/esm/types/events/index.js +4 -0
- package/dist/esm/types/index.js +5 -0
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.localizedNameSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.localizedNameSchema = zod_1.z.object({
|
|
6
|
+
en: zod_1.z.string().trim().min(1),
|
|
7
|
+
ar: zod_1.z.string().trim().min(1),
|
|
8
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IEventWedding } from './EventWedding.dto';
|
|
2
|
+
export type IEvent = {
|
|
3
|
+
id?: number;
|
|
4
|
+
lat: number | null;
|
|
5
|
+
long: number | null;
|
|
6
|
+
start_date: string | Date | null;
|
|
7
|
+
end_date: string | Date | null;
|
|
8
|
+
is_published: boolean;
|
|
9
|
+
slug: string;
|
|
10
|
+
weddings?: IEventWedding[];
|
|
11
|
+
};
|
|
12
|
+
export declare const emptyEvent: IEvent;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const eventBaseSchema: z.ZodObject<{
|
|
3
|
+
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
4
|
+
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
5
|
+
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
6
|
+
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
7
|
+
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
slug: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const createEventSchema: z.ZodObject<{
|
|
11
|
+
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
12
|
+
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
13
|
+
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
14
|
+
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
15
|
+
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
slug: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const updateEventSchema: z.ZodObject<{
|
|
19
|
+
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
20
|
+
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
21
|
+
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
22
|
+
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
23
|
+
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
slug: z.ZodString;
|
|
25
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
28
|
+
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
29
|
+
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
30
|
+
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
31
|
+
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
32
|
+
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
slug: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
36
|
+
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
37
|
+
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
38
|
+
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
39
|
+
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
slug: z.ZodString;
|
|
41
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
42
|
+
}, z.core.$strip>]>;
|
|
43
|
+
export declare const getEventsFilterSchema: z.ZodObject<{
|
|
44
|
+
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
search: z.ZodOptional<z.ZodString>;
|
|
46
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
47
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type CreateEventDto = z.infer<typeof createEventSchema>;
|
|
50
|
+
export type UpdateEventDto = z.infer<typeof updateEventSchema>;
|
|
51
|
+
export type SaveEventDto = z.infer<typeof saveEventSchema>;
|
|
52
|
+
export type GetEventsFilterDto = z.infer<typeof getEventsFilterSchema>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEventsFilterSchema = exports.saveEventSchema = exports.updateEventSchema = exports.createEventSchema = exports.eventBaseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.eventBaseSchema = zod_1.z.object({
|
|
6
|
+
lat: zod_1.z.coerce.number().optional().nullable(),
|
|
7
|
+
long: zod_1.z.coerce.number().optional().nullable(),
|
|
8
|
+
start_date: zod_1.z.coerce.date().optional().nullable(),
|
|
9
|
+
end_date: zod_1.z.coerce.date().optional().nullable(),
|
|
10
|
+
is_published: zod_1.z.boolean().optional(),
|
|
11
|
+
slug: zod_1.z.string().trim().min(1).max(255),
|
|
12
|
+
});
|
|
13
|
+
exports.createEventSchema = exports.eventBaseSchema;
|
|
14
|
+
exports.updateEventSchema = exports.eventBaseSchema.extend({
|
|
15
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
16
|
+
});
|
|
17
|
+
exports.saveEventSchema = zod_1.z.union([exports.createEventSchema, exports.updateEventSchema]);
|
|
18
|
+
exports.getEventsFilterSchema = zod_1.z.object({
|
|
19
|
+
is_published: zod_1.z.boolean().optional(),
|
|
20
|
+
search: zod_1.z.string().trim().optional(),
|
|
21
|
+
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
22
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
23
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEvent = void 0;
|
|
4
|
+
exports.emptyEvent = {
|
|
5
|
+
id: 0,
|
|
6
|
+
lat: null,
|
|
7
|
+
long: null,
|
|
8
|
+
start_date: null,
|
|
9
|
+
end_date: null,
|
|
10
|
+
is_published: false,
|
|
11
|
+
slug: '',
|
|
12
|
+
weddings: [],
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LocalizedName } from '../../types/common/LocalizedName';
|
|
2
|
+
import type { IEventType } from './EventType';
|
|
3
|
+
import type { IEventWedding } from './EventWedding';
|
|
4
|
+
export type IEventTemplate = {
|
|
5
|
+
id?: number;
|
|
6
|
+
code: string;
|
|
7
|
+
name: LocalizedName;
|
|
8
|
+
active: boolean;
|
|
9
|
+
religion: string | null;
|
|
10
|
+
event_type_id: number;
|
|
11
|
+
eventType?: IEventType;
|
|
12
|
+
weddings?: IEventWedding[];
|
|
13
|
+
};
|
|
14
|
+
export declare const emptyEventTemplate: IEventTemplate;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type LocalizedName } from '../../types/common/LocalizedName';
|
|
3
|
+
import type { IEventType } from './EventType';
|
|
4
|
+
import type { IEventWedding } from './EventWedding.dto';
|
|
5
|
+
export declare const eventTemplateBaseSchema: z.ZodObject<{
|
|
6
|
+
code: z.ZodString;
|
|
7
|
+
name: z.ZodObject<{
|
|
8
|
+
en: z.ZodString;
|
|
9
|
+
ar: z.ZodString;
|
|
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[];
|
|
76
|
+
};
|
|
77
|
+
export declare const emptyEventTemplate: IEventTemplate;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventTemplate = exports.getEventTemplatesFilterSchema = exports.saveEventTemplateSchema = exports.updateEventTemplateSchema = exports.createEventTemplateSchema = exports.eventTemplateBaseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const LocalizedName_1 = require("../../types/common/LocalizedName");
|
|
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: [],
|
|
38
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventTemplate = void 0;
|
|
4
|
+
const LocalizedName_1 = require("../../types/common/LocalizedName");
|
|
5
|
+
exports.emptyEventTemplate = {
|
|
6
|
+
id: 0,
|
|
7
|
+
code: '',
|
|
8
|
+
name: (0, LocalizedName_1.createEmptyLocalizedName)(),
|
|
9
|
+
active: true,
|
|
10
|
+
religion: null,
|
|
11
|
+
event_type_id: 0,
|
|
12
|
+
eventType: undefined,
|
|
13
|
+
weddings: [],
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type LocalizedName } from '../../types/common/LocalizedName';
|
|
2
|
+
import type { IEventTemplate } from './EventTemplate.dto';
|
|
3
|
+
export type IEventType = {
|
|
4
|
+
id?: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: LocalizedName;
|
|
7
|
+
active: boolean;
|
|
8
|
+
templates?: IEventTemplate[];
|
|
9
|
+
};
|
|
10
|
+
export declare const emptyEventType: IEventType;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const eventTypeBaseSchema: z.ZodObject<{
|
|
3
|
+
code: z.ZodString;
|
|
4
|
+
name: z.ZodObject<{
|
|
5
|
+
en: z.ZodString;
|
|
6
|
+
ar: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const createEventTypeSchema: z.ZodObject<{
|
|
11
|
+
code: z.ZodString;
|
|
12
|
+
name: z.ZodObject<{
|
|
13
|
+
en: z.ZodString;
|
|
14
|
+
ar: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const updateEventTypeSchema: z.ZodObject<{
|
|
19
|
+
code: z.ZodString;
|
|
20
|
+
name: z.ZodObject<{
|
|
21
|
+
en: z.ZodString;
|
|
22
|
+
ar: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const saveEventTypeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
28
|
+
code: z.ZodString;
|
|
29
|
+
name: z.ZodObject<{
|
|
30
|
+
en: z.ZodString;
|
|
31
|
+
ar: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
code: z.ZodString;
|
|
36
|
+
name: z.ZodObject<{
|
|
37
|
+
en: z.ZodString;
|
|
38
|
+
ar: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
42
|
+
}, z.core.$strip>]>;
|
|
43
|
+
export declare const getEventTypesFilterSchema: z.ZodObject<{
|
|
44
|
+
search: z.ZodOptional<z.ZodString>;
|
|
45
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
47
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type CreateEventTypeDto = z.infer<typeof createEventTypeSchema>;
|
|
50
|
+
export type UpdateEventTypeDto = z.infer<typeof updateEventTypeSchema>;
|
|
51
|
+
export type SaveEventTypeDto = z.infer<typeof saveEventTypeSchema>;
|
|
52
|
+
export type GetEventTypesFilterDto = z.infer<typeof getEventTypesFilterSchema>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEventTypesFilterSchema = exports.saveEventTypeSchema = exports.updateEventTypeSchema = exports.createEventTypeSchema = exports.eventTypeBaseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const localizedName_dto_1 = require("../common/localizedName.dto");
|
|
6
|
+
exports.eventTypeBaseSchema = zod_1.z.object({
|
|
7
|
+
code: zod_1.z.string().trim().min(1).max(100),
|
|
8
|
+
name: localizedName_dto_1.localizedNameSchema,
|
|
9
|
+
active: zod_1.z.boolean().optional(),
|
|
10
|
+
});
|
|
11
|
+
exports.createEventTypeSchema = exports.eventTypeBaseSchema;
|
|
12
|
+
exports.updateEventTypeSchema = exports.eventTypeBaseSchema.extend({
|
|
13
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
14
|
+
});
|
|
15
|
+
exports.saveEventTypeSchema = zod_1.z.union([
|
|
16
|
+
exports.createEventTypeSchema,
|
|
17
|
+
exports.updateEventTypeSchema,
|
|
18
|
+
]);
|
|
19
|
+
exports.getEventTypesFilterSchema = zod_1.z.object({
|
|
20
|
+
search: zod_1.z.string().trim().optional(),
|
|
21
|
+
active: zod_1.z.boolean().optional(),
|
|
22
|
+
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
23
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
24
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventType = void 0;
|
|
4
|
+
const LocalizedName_1 = require("../../types/common/LocalizedName");
|
|
5
|
+
exports.emptyEventType = {
|
|
6
|
+
id: 0,
|
|
7
|
+
code: '',
|
|
8
|
+
name: (0, LocalizedName_1.createEmptyLocalizedName)(),
|
|
9
|
+
active: true,
|
|
10
|
+
templates: [],
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IEvent } from './Event';
|
|
2
|
+
import type { IEventTemplate } from './EventTemplate';
|
|
3
|
+
export type IEventWedding = {
|
|
4
|
+
id?: number;
|
|
5
|
+
event_id: number;
|
|
6
|
+
event_template_id: number;
|
|
7
|
+
cover: Record<string, any> | null;
|
|
8
|
+
event?: IEvent;
|
|
9
|
+
eventTemplate?: IEventTemplate;
|
|
10
|
+
};
|
|
11
|
+
export declare const emptyEventWedding: IEventWedding;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { IEvent } from './Event';
|
|
3
|
+
import type { IEventTemplate } from './EventTemplate.dto';
|
|
4
|
+
export declare const eventWeddingBaseSchema: z.ZodObject<{
|
|
5
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
6
|
+
event_template_id: z.ZodCoercedNumber<unknown>;
|
|
7
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const createEventWeddingSchema: z.ZodObject<{
|
|
10
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
11
|
+
event_template_id: z.ZodCoercedNumber<unknown>;
|
|
12
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const updateEventWeddingSchema: z.ZodObject<{
|
|
15
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
16
|
+
event_template_id: z.ZodCoercedNumber<unknown>;
|
|
17
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
18
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const saveEventWeddingSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
21
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
22
|
+
event_template_id: z.ZodCoercedNumber<unknown>;
|
|
23
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
26
|
+
event_template_id: z.ZodCoercedNumber<unknown>;
|
|
27
|
+
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
28
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
29
|
+
}, z.core.$strip>]>;
|
|
30
|
+
export declare const getEventWeddingFilterSchema: z.ZodObject<{
|
|
31
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
32
|
+
event_template_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
33
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
34
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type CreateEventWeddingDto = z.infer<typeof createEventWeddingSchema>;
|
|
37
|
+
export type UpdateEventWeddingDto = z.infer<typeof updateEventWeddingSchema>;
|
|
38
|
+
export type SaveEventWeddingDto = z.infer<typeof saveEventWeddingSchema>;
|
|
39
|
+
export type GetEventWeddingFilterDto = z.infer<typeof getEventWeddingFilterSchema>;
|
|
40
|
+
export type IEventWedding = {
|
|
41
|
+
id?: number;
|
|
42
|
+
event_id: number;
|
|
43
|
+
event_template_id: number;
|
|
44
|
+
cover: Record<string, any> | null;
|
|
45
|
+
event?: IEvent;
|
|
46
|
+
eventTemplate?: IEventTemplate;
|
|
47
|
+
};
|
|
48
|
+
export declare const emptyEventWedding: IEventWedding;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventWedding = exports.getEventWeddingFilterSchema = exports.saveEventWeddingSchema = exports.updateEventWeddingSchema = exports.createEventWeddingSchema = exports.eventWeddingBaseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.eventWeddingBaseSchema = zod_1.z.object({
|
|
6
|
+
event_id: zod_1.z.coerce.number().int().positive(),
|
|
7
|
+
event_template_id: zod_1.z.coerce.number().int().positive(),
|
|
8
|
+
cover: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable().optional(),
|
|
9
|
+
});
|
|
10
|
+
exports.createEventWeddingSchema = exports.eventWeddingBaseSchema;
|
|
11
|
+
exports.updateEventWeddingSchema = exports.eventWeddingBaseSchema.extend({
|
|
12
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
13
|
+
});
|
|
14
|
+
exports.saveEventWeddingSchema = zod_1.z.union([
|
|
15
|
+
exports.createEventWeddingSchema,
|
|
16
|
+
exports.updateEventWeddingSchema,
|
|
17
|
+
]);
|
|
18
|
+
exports.getEventWeddingFilterSchema = zod_1.z.object({
|
|
19
|
+
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
20
|
+
event_template_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
21
|
+
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
22
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
23
|
+
});
|
|
24
|
+
exports.emptyEventWedding = {
|
|
25
|
+
id: 0,
|
|
26
|
+
event_id: 0,
|
|
27
|
+
event_template_id: 0,
|
|
28
|
+
cover: null,
|
|
29
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.localizedNameSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.localizedNameSchema = zod_1.z.object({
|
|
6
|
+
en: zod_1.z.string().trim().min(1),
|
|
7
|
+
ar: zod_1.z.string().trim().min(1),
|
|
8
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Event.dto"), exports);
|
|
18
|
+
__exportStar(require("./EventTemplate.dto"), exports);
|
|
19
|
+
__exportStar(require("./EventType.dto"), exports);
|
|
20
|
+
__exportStar(require("./EventWedding.dto"), exports);
|
|
21
|
+
__exportStar(require("./Event"), exports);
|
|
22
|
+
__exportStar(require("./EventType"), exports);
|
package/dist/cjs/dto/index.d.ts
CHANGED
package/dist/cjs/dto/index.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.AdDto = void 0;
|
|
4
18
|
var Ad_dto_1 = require("./ad/Ad.dto");
|
|
5
19
|
Object.defineProperty(exports, "AdDto", { enumerable: true, get: function () { return Ad_dto_1.AdDto; } });
|
|
20
|
+
__exportStar(require("./events"), exports);
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export { ClassService, IObjectService } from './abstract/baseService';
|
|
|
2
2
|
export { Converter, Converter as con } from './utils/converter';
|
|
3
3
|
export type { FilterParams } from './types/common/FilterParams';
|
|
4
4
|
export * as TYPES from './types/index';
|
|
5
|
+
export * as EventsDto from './dto/events';
|
|
5
6
|
export { AdDto } from './dto';
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,12 +33,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.AdDto = exports.TYPES = exports.con = exports.Converter = exports.ClassService = void 0;
|
|
36
|
+
exports.AdDto = exports.EventsDto = exports.TYPES = exports.con = exports.Converter = exports.ClassService = void 0;
|
|
37
37
|
var baseService_1 = require("./abstract/baseService");
|
|
38
38
|
Object.defineProperty(exports, "ClassService", { enumerable: true, get: function () { return baseService_1.ClassService; } });
|
|
39
39
|
var converter_1 = require("./utils/converter");
|
|
40
40
|
Object.defineProperty(exports, "Converter", { enumerable: true, get: function () { return converter_1.Converter; } });
|
|
41
41
|
Object.defineProperty(exports, "con", { enumerable: true, get: function () { return converter_1.Converter; } });
|
|
42
42
|
exports.TYPES = __importStar(require("./types/index"));
|
|
43
|
+
exports.EventsDto = __importStar(require("./dto/events"));
|
|
43
44
|
var dto_1 = require("./dto");
|
|
44
45
|
Object.defineProperty(exports, "AdDto", { enumerable: true, get: function () { return dto_1.AdDto; } });
|
package/dist/cjs/types/ad/Ad.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyAd = void 0;
|
|
3
|
+
exports.emptyValues = exports.emptyAd = void 0;
|
|
4
4
|
const Motor_1 = require("../motor/Motor");
|
|
5
5
|
const Property_1 = require("../property/Property");
|
|
6
6
|
const Service_1 = require("../service/Service");
|
|
@@ -23,3 +23,4 @@ exports.emptyAd = {
|
|
|
23
23
|
service: Service_1.emptyService,
|
|
24
24
|
product: UsedProduct_1.emptyUsedProduct,
|
|
25
25
|
};
|
|
26
|
+
exports.emptyValues = exports.emptyAd;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IEventWedding } from './EventWedding';
|
|
2
|
+
export type IEvent = {
|
|
3
|
+
id?: number;
|
|
4
|
+
lat: number | null;
|
|
5
|
+
long: number | null;
|
|
6
|
+
start_date: string | Date | null;
|
|
7
|
+
end_date: string | Date | null;
|
|
8
|
+
is_published: boolean;
|
|
9
|
+
slug: string;
|
|
10
|
+
weddings?: IEventWedding[];
|
|
11
|
+
};
|
|
12
|
+
export declare const emptyEvent: IEvent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEvent = void 0;
|
|
4
|
+
exports.emptyEvent = {
|
|
5
|
+
id: 0,
|
|
6
|
+
lat: null,
|
|
7
|
+
long: null,
|
|
8
|
+
start_date: null,
|
|
9
|
+
end_date: null,
|
|
10
|
+
is_published: false,
|
|
11
|
+
slug: '',
|
|
12
|
+
weddings: [],
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LocalizedName } from '../common/LocalizedName';
|
|
2
|
+
import type { IEventType } from './EventType';
|
|
3
|
+
import type { IEventWedding } from './EventWedding';
|
|
4
|
+
export type IEventTemplate = {
|
|
5
|
+
id?: number;
|
|
6
|
+
code: string;
|
|
7
|
+
name: LocalizedName;
|
|
8
|
+
active: boolean;
|
|
9
|
+
religion: string | null;
|
|
10
|
+
event_type_id: number;
|
|
11
|
+
eventType?: IEventType;
|
|
12
|
+
weddings?: IEventWedding[];
|
|
13
|
+
};
|
|
14
|
+
export declare const emptyEventTemplate: IEventTemplate;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventTemplate = void 0;
|
|
4
|
+
const LocalizedName_1 = require("../common/LocalizedName");
|
|
5
|
+
exports.emptyEventTemplate = {
|
|
6
|
+
id: 0,
|
|
7
|
+
code: '',
|
|
8
|
+
name: (0, LocalizedName_1.createEmptyLocalizedName)(),
|
|
9
|
+
active: true,
|
|
10
|
+
religion: null,
|
|
11
|
+
event_type_id: 0,
|
|
12
|
+
eventType: undefined,
|
|
13
|
+
weddings: [],
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type LocalizedName } from '../common/LocalizedName';
|
|
2
|
+
import type { IEventTemplate } from './EventTemplate';
|
|
3
|
+
export type IEventType = {
|
|
4
|
+
id?: number;
|
|
5
|
+
code: string;
|
|
6
|
+
name: LocalizedName;
|
|
7
|
+
active: boolean;
|
|
8
|
+
templates?: IEventTemplate[];
|
|
9
|
+
};
|
|
10
|
+
export declare const emptyEventType: IEventType;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyEventType = void 0;
|
|
4
|
+
const LocalizedName_1 = require("../common/LocalizedName");
|
|
5
|
+
exports.emptyEventType = {
|
|
6
|
+
id: 0,
|
|
7
|
+
code: '',
|
|
8
|
+
name: (0, LocalizedName_1.createEmptyLocalizedName)(),
|
|
9
|
+
active: true,
|
|
10
|
+
templates: [],
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IEvent } from './Event';
|
|
2
|
+
import type { IEventTemplate } from './EventTemplate';
|
|
3
|
+
export type IEventWedding = {
|
|
4
|
+
id?: number;
|
|
5
|
+
event_id: number;
|
|
6
|
+
event_template_id: number;
|
|
7
|
+
cover: Record<string, any> | null;
|
|
8
|
+
event?: IEvent;
|
|
9
|
+
eventTemplate?: IEventTemplate;
|
|
10
|
+
};
|
|
11
|
+
export declare const emptyEventWedding: IEventWedding;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Event"), exports);
|
|
18
|
+
__exportStar(require("./EventTemplate"), exports);
|
|
19
|
+
__exportStar(require("./EventType"), exports);
|
|
20
|
+
__exportStar(require("./EventWedding"), exports);
|
|
@@ -36,6 +36,10 @@ export * as WorkType from "./service/WorkType";
|
|
|
36
36
|
export * as AdminBoundary from "./geo/AdminBoundary";
|
|
37
37
|
export * as City from "./geo/City";
|
|
38
38
|
export * as District from "./geo/District";
|
|
39
|
+
export * as Event from "../dto/events/Event";
|
|
40
|
+
export * as EventTemplate from "../dto/events/EventTemplate.dto";
|
|
41
|
+
export * as EventType from "../dto/events/EventType";
|
|
42
|
+
export * as EventWedding from "../dto/events/EventWedding.dto";
|
|
39
43
|
export * as User from "./user/User";
|
|
40
44
|
export * as Role from "./user/Role";
|
|
41
45
|
export * as Permission from "./user/Permission";
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -33,8 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = void 0;
|
|
36
|
+
exports.Device = exports.Chat = exports.AppStartScreen = exports.PotentialUser = exports.Wallet = exports.Permission = exports.Role = exports.User = exports.EventWedding = exports.EventType = exports.EventTemplate = exports.Event = exports.District = exports.City = exports.AdminBoundary = exports.WorkType = exports.UsedProductCondition = exports.UsedProductAge = exports.Unit = exports.Transmission = exports.RegionalSpec = exports.PublisherType = exports.PropertyStatus = exports.PriceType = exports.OfferType = exports.LicenseType = exports.FuelType = exports.Feature = exports.Facility = exports.Currency = exports.Color = exports.CategoryWorkType = exports.Category = exports.CarBody = exports.UsedProduct = exports.Service = exports.PropertySubType = exports.Property = exports.MotorTrim = exports.Motor = exports.AdPromotion = exports.AdLocation = exports.Ad = exports.FilterParams = exports.Config = exports.AccessType = exports.Status = exports.Subject = exports.Response = exports.LocalizedName = void 0;
|
|
37
|
+
exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.NotificationToken = exports.MessageTemplate = void 0;
|
|
38
38
|
// common
|
|
39
39
|
exports.LocalizedName = __importStar(require("./common/LocalizedName"));
|
|
40
40
|
exports.Response = __importStar(require("./common/Response"));
|
|
@@ -77,6 +77,11 @@ exports.WorkType = __importStar(require("./service/WorkType"));
|
|
|
77
77
|
exports.AdminBoundary = __importStar(require("./geo/AdminBoundary"));
|
|
78
78
|
exports.City = __importStar(require("./geo/City"));
|
|
79
79
|
exports.District = __importStar(require("./geo/District"));
|
|
80
|
+
// events
|
|
81
|
+
exports.Event = __importStar(require("../dto/events/Event"));
|
|
82
|
+
exports.EventTemplate = __importStar(require("../dto/events/EventTemplate.dto"));
|
|
83
|
+
exports.EventType = __importStar(require("../dto/events/EventType"));
|
|
84
|
+
exports.EventWedding = __importStar(require("../dto/events/EventWedding.dto"));
|
|
80
85
|
// user
|
|
81
86
|
exports.User = __importStar(require("./user/User"));
|
|
82
87
|
exports.Role = __importStar(require("./user/Role"));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const eventBaseSchema = z.object({
|
|
3
|
+
lat: z.coerce.number().optional().nullable(),
|
|
4
|
+
long: z.coerce.number().optional().nullable(),
|
|
5
|
+
start_date: z.coerce.date().optional().nullable(),
|
|
6
|
+
end_date: z.coerce.date().optional().nullable(),
|
|
7
|
+
is_published: z.boolean().optional(),
|
|
8
|
+
slug: z.string().trim().min(1).max(255),
|
|
9
|
+
});
|
|
10
|
+
export const createEventSchema = eventBaseSchema;
|
|
11
|
+
export const updateEventSchema = eventBaseSchema.extend({
|
|
12
|
+
id: z.coerce.number().int().positive(),
|
|
13
|
+
});
|
|
14
|
+
export const saveEventSchema = z.union([createEventSchema, updateEventSchema]);
|
|
15
|
+
export const getEventsFilterSchema = z.object({
|
|
16
|
+
is_published: z.boolean().optional(),
|
|
17
|
+
search: z.string().trim().optional(),
|
|
18
|
+
page: z.coerce.number().int().positive().optional(),
|
|
19
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
20
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createEmptyLocalizedName } from '../../types/common/LocalizedName';
|
|
3
|
+
import { localizedNameSchema } from '../common/localizedName.dto';
|
|
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: [],
|
|
35
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createEmptyLocalizedName } from '../../types/common/LocalizedName';
|
|
2
|
+
export const emptyEventTemplate = {
|
|
3
|
+
id: 0,
|
|
4
|
+
code: '',
|
|
5
|
+
name: createEmptyLocalizedName(),
|
|
6
|
+
active: true,
|
|
7
|
+
religion: null,
|
|
8
|
+
event_type_id: 0,
|
|
9
|
+
eventType: undefined,
|
|
10
|
+
weddings: [],
|
|
11
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { localizedNameSchema } from '../common/localizedName.dto';
|
|
3
|
+
export const eventTypeBaseSchema = z.object({
|
|
4
|
+
code: z.string().trim().min(1).max(100),
|
|
5
|
+
name: localizedNameSchema,
|
|
6
|
+
active: z.boolean().optional(),
|
|
7
|
+
});
|
|
8
|
+
export const createEventTypeSchema = eventTypeBaseSchema;
|
|
9
|
+
export const updateEventTypeSchema = eventTypeBaseSchema.extend({
|
|
10
|
+
id: z.coerce.number().int().positive(),
|
|
11
|
+
});
|
|
12
|
+
export const saveEventTypeSchema = z.union([
|
|
13
|
+
createEventTypeSchema,
|
|
14
|
+
updateEventTypeSchema,
|
|
15
|
+
]);
|
|
16
|
+
export const getEventTypesFilterSchema = z.object({
|
|
17
|
+
search: z.string().trim().optional(),
|
|
18
|
+
active: z.boolean().optional(),
|
|
19
|
+
page: z.coerce.number().int().positive().optional(),
|
|
20
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
21
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const eventWeddingBaseSchema = z.object({
|
|
3
|
+
event_id: z.coerce.number().int().positive(),
|
|
4
|
+
event_template_id: z.coerce.number().int().positive(),
|
|
5
|
+
cover: z.record(z.string(), z.any()).nullable().optional(),
|
|
6
|
+
});
|
|
7
|
+
export const createEventWeddingSchema = eventWeddingBaseSchema;
|
|
8
|
+
export const updateEventWeddingSchema = eventWeddingBaseSchema.extend({
|
|
9
|
+
id: z.coerce.number().int().positive(),
|
|
10
|
+
});
|
|
11
|
+
export const saveEventWeddingSchema = z.union([
|
|
12
|
+
createEventWeddingSchema,
|
|
13
|
+
updateEventWeddingSchema,
|
|
14
|
+
]);
|
|
15
|
+
export const getEventWeddingFilterSchema = z.object({
|
|
16
|
+
event_id: z.coerce.number().int().positive().optional(),
|
|
17
|
+
event_template_id: z.coerce.number().int().positive().optional(),
|
|
18
|
+
page: z.coerce.number().int().positive().optional(),
|
|
19
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
20
|
+
});
|
|
21
|
+
export const emptyEventWedding = {
|
|
22
|
+
id: 0,
|
|
23
|
+
event_id: 0,
|
|
24
|
+
event_template_id: 0,
|
|
25
|
+
cover: null,
|
|
26
|
+
};
|
package/dist/esm/dto/index.js
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/types/ad/Ad.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createEmptyLocalizedName } from '../common/LocalizedName';
|
|
2
|
+
export const emptyEventTemplate = {
|
|
3
|
+
id: 0,
|
|
4
|
+
code: '',
|
|
5
|
+
name: createEmptyLocalizedName(),
|
|
6
|
+
active: true,
|
|
7
|
+
religion: null,
|
|
8
|
+
event_type_id: 0,
|
|
9
|
+
eventType: undefined,
|
|
10
|
+
weddings: [],
|
|
11
|
+
};
|
package/dist/esm/types/index.js
CHANGED
|
@@ -40,6 +40,11 @@ export * as WorkType from "./service/WorkType";
|
|
|
40
40
|
export * as AdminBoundary from "./geo/AdminBoundary";
|
|
41
41
|
export * as City from "./geo/City";
|
|
42
42
|
export * as District from "./geo/District";
|
|
43
|
+
// events
|
|
44
|
+
export * as Event from "../dto/events/Event";
|
|
45
|
+
export * as EventTemplate from "../dto/events/EventTemplate.dto";
|
|
46
|
+
export * as EventType from "../dto/events/EventType";
|
|
47
|
+
export * as EventWedding from "../dto/events/EventWedding.dto";
|
|
43
48
|
// user
|
|
44
49
|
export * as User from "./user/User";
|
|
45
50
|
export * as Role from "./user/Role";
|
package/package.json
CHANGED