@deallony/shared 1.1.51 → 1.1.54

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,12 +1,2 @@
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;
1
+ export type { IEvent } from './Event.dto';
2
+ export { emptyEvent } from './Event.dto';
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import type { IEventWedding } from './EventWedding.dto';
2
3
  export declare const eventBaseSchema: z.ZodObject<{
3
4
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
4
5
  long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
5
6
  start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
6
7
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
7
8
  is_published: z.ZodOptional<z.ZodBoolean>;
9
+ event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
10
  slug: z.ZodString;
9
11
  }, z.core.$strip>;
10
12
  export declare const createEventSchema: z.ZodObject<{
@@ -13,6 +15,7 @@ export declare const createEventSchema: z.ZodObject<{
13
15
  start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
14
16
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
15
17
  is_published: z.ZodOptional<z.ZodBoolean>;
18
+ event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
19
  slug: z.ZodString;
17
20
  }, z.core.$strip>;
18
21
  export declare const updateEventSchema: z.ZodObject<{
@@ -21,6 +24,7 @@ export declare const updateEventSchema: z.ZodObject<{
21
24
  start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
22
25
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
23
26
  is_published: z.ZodOptional<z.ZodBoolean>;
27
+ event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
28
  slug: z.ZodString;
25
29
  id: z.ZodCoercedNumber<unknown>;
26
30
  }, z.core.$strip>;
@@ -30,6 +34,7 @@ export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
30
34
  start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
31
35
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
32
36
  is_published: z.ZodOptional<z.ZodBoolean>;
37
+ event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
38
  slug: z.ZodString;
34
39
  }, z.core.$strip>, z.ZodObject<{
35
40
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -37,6 +42,7 @@ export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
37
42
  start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
38
43
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
39
44
  is_published: z.ZodOptional<z.ZodBoolean>;
45
+ event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
46
  slug: z.ZodString;
41
47
  id: z.ZodCoercedNumber<unknown>;
42
48
  }, z.core.$strip>]>;
@@ -50,3 +56,15 @@ export type CreateEventDto = z.infer<typeof createEventSchema>;
50
56
  export type UpdateEventDto = z.infer<typeof updateEventSchema>;
51
57
  export type SaveEventDto = z.infer<typeof saveEventSchema>;
52
58
  export type GetEventsFilterDto = z.infer<typeof getEventsFilterSchema>;
59
+ export type IEvent = {
60
+ id?: number;
61
+ lat: number | null;
62
+ long: number | null;
63
+ start_date: string | Date | null;
64
+ end_date: string | Date | null;
65
+ is_published: boolean;
66
+ event_type: string | null;
67
+ slug: string;
68
+ weddings?: IEventWedding[];
69
+ };
70
+ export declare const emptyEvent: IEvent;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEventsFilterSchema = exports.saveEventSchema = exports.updateEventSchema = exports.createEventSchema = exports.eventBaseSchema = void 0;
3
+ exports.emptyEvent = exports.getEventsFilterSchema = exports.saveEventSchema = exports.updateEventSchema = exports.createEventSchema = exports.eventBaseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.eventBaseSchema = zod_1.z.object({
6
6
  lat: zod_1.z.coerce.number().optional().nullable(),
@@ -8,6 +8,7 @@ exports.eventBaseSchema = zod_1.z.object({
8
8
  start_date: zod_1.z.coerce.date().optional().nullable(),
9
9
  end_date: zod_1.z.coerce.date().optional().nullable(),
10
10
  is_published: zod_1.z.boolean().optional(),
11
+ event_type: zod_1.z.string().trim().max(255).nullable().optional(),
11
12
  slug: zod_1.z.string().trim().min(1).max(255),
12
13
  });
13
14
  exports.createEventSchema = exports.eventBaseSchema;
@@ -21,3 +22,14 @@ exports.getEventsFilterSchema = zod_1.z.object({
21
22
  page: zod_1.z.coerce.number().int().positive().optional(),
22
23
  limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
23
24
  });
25
+ exports.emptyEvent = {
26
+ id: 0,
27
+ lat: null,
28
+ long: null,
29
+ start_date: null,
30
+ end_date: null,
31
+ is_published: false,
32
+ event_type: null,
33
+ slug: '',
34
+ weddings: [],
35
+ };
@@ -1,13 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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
- };
4
+ var Event_dto_1 = require("./Event.dto");
5
+ Object.defineProperty(exports, "emptyEvent", { enumerable: true, get: function () { return Event_dto_1.emptyEvent; } });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { type LocalizedName } from '../../types/common/LocalizedName';
3
- import type { IEventType } from './EventType';
3
+ import type { IEventType } from './EventType.dto';
4
4
  import type { IEventWedding } from './EventWedding.dto';
5
5
  export declare const eventTemplateBaseSchema: z.ZodObject<{
6
6
  code: z.ZodString;
@@ -1,10 +1,2 @@
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;
1
+ export type { IEventType } from './EventType.dto';
2
+ export { emptyEventType } from './EventType.dto';
@@ -1,52 +1,16 @@
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>;
1
+ export declare const EventTypes: {
2
+ WEDDING: {
3
+ value: string;
4
+ name: {
5
+ en: string;
6
+ ar: string;
7
+ };
8
+ };
9
+ };
10
+ export declare const EventTypeOptions: {
11
+ value: string;
12
+ name: {
13
+ en: string;
14
+ ar: string;
15
+ };
16
+ }[];
@@ -1,24 +1,10 @@
1
1
  "use strict";
2
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
- });
3
+ exports.EventTypeOptions = exports.EventTypes = void 0;
4
+ exports.EventTypes = {
5
+ WEDDING: { value: 'wedding', name: { en: 'Wedding', ar: 'زفاف' } },
6
+ };
7
+ exports.EventTypeOptions = Object.values(exports.EventTypes).map((type) => ({
8
+ value: type.value,
9
+ name: type.name,
10
+ }));
@@ -1,11 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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
- };
4
+ var EventType_dto_1 = require("./EventType.dto");
5
+ Object.defineProperty(exports, "emptyEventType", { enumerable: true, get: function () { return EventType_dto_1.emptyEventType; } });
@@ -1,35 +1,28 @@
1
1
  import { z } from 'zod';
2
- import type { IEvent } from './Event';
3
- import type { IEventTemplate } from './EventTemplate.dto';
2
+ import type { IEvent } from './Event.dto';
4
3
  export declare const eventWeddingBaseSchema: z.ZodObject<{
5
4
  event_id: z.ZodCoercedNumber<unknown>;
6
- event_template_id: z.ZodCoercedNumber<unknown>;
7
5
  cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
8
6
  }, z.core.$strip>;
9
7
  export declare const createEventWeddingSchema: z.ZodObject<{
10
8
  event_id: z.ZodCoercedNumber<unknown>;
11
- event_template_id: z.ZodCoercedNumber<unknown>;
12
9
  cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
13
10
  }, z.core.$strip>;
14
11
  export declare const updateEventWeddingSchema: z.ZodObject<{
15
12
  event_id: z.ZodCoercedNumber<unknown>;
16
- event_template_id: z.ZodCoercedNumber<unknown>;
17
13
  cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
18
14
  id: z.ZodCoercedNumber<unknown>;
19
15
  }, z.core.$strip>;
20
16
  export declare const saveEventWeddingSchema: z.ZodUnion<readonly [z.ZodObject<{
21
17
  event_id: z.ZodCoercedNumber<unknown>;
22
- event_template_id: z.ZodCoercedNumber<unknown>;
23
18
  cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
24
19
  }, z.core.$strip>, z.ZodObject<{
25
20
  event_id: z.ZodCoercedNumber<unknown>;
26
- event_template_id: z.ZodCoercedNumber<unknown>;
27
21
  cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
28
22
  id: z.ZodCoercedNumber<unknown>;
29
23
  }, z.core.$strip>]>;
30
24
  export declare const getEventWeddingFilterSchema: z.ZodObject<{
31
25
  event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
32
- event_template_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
33
26
  page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
34
27
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
35
28
  }, z.core.$strip>;
@@ -40,9 +33,7 @@ export type GetEventWeddingFilterDto = z.infer<typeof getEventWeddingFilterSchem
40
33
  export type IEventWedding = {
41
34
  id?: number;
42
35
  event_id: number;
43
- event_template_id: number;
44
36
  cover: Record<string, any> | null;
45
37
  event?: IEvent;
46
- eventTemplate?: IEventTemplate;
47
38
  };
48
39
  export declare const emptyEventWedding: IEventWedding;
@@ -4,7 +4,6 @@ exports.emptyEventWedding = exports.getEventWeddingFilterSchema = exports.saveEv
4
4
  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
- event_template_id: zod_1.z.coerce.number().int().positive(),
8
7
  cover: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable().optional(),
9
8
  });
10
9
  exports.createEventWeddingSchema = exports.eventWeddingBaseSchema;
@@ -17,13 +16,11 @@ exports.saveEventWeddingSchema = zod_1.z.union([
17
16
  ]);
18
17
  exports.getEventWeddingFilterSchema = zod_1.z.object({
19
18
  event_id: zod_1.z.coerce.number().int().positive().optional(),
20
- event_template_id: zod_1.z.coerce.number().int().positive().optional(),
21
19
  page: zod_1.z.coerce.number().int().positive().optional(),
22
20
  limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
23
21
  });
24
22
  exports.emptyEventWedding = {
25
23
  id: 0,
26
24
  event_id: 0,
27
- event_template_id: 0,
28
25
  cover: null,
29
26
  };
@@ -1,6 +1,3 @@
1
1
  export * from './Event.dto';
2
- export * from './EventTemplate.dto';
3
- export * from './EventType.dto';
4
2
  export * from './EventWedding.dto';
5
- export * from './Event';
6
- export * from './EventType';
3
+ export * from './EventType.dto';
@@ -15,8 +15,5 @@ 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);
19
- __exportStar(require("./EventType.dto"), exports);
20
18
  __exportStar(require("./EventWedding.dto"), exports);
21
- __exportStar(require("./Event"), exports);
22
- __exportStar(require("./EventType"), exports);
19
+ __exportStar(require("./EventType.dto"), exports);
@@ -36,9 +36,7 @@ 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";
39
+ export * as Event from "../dto/events/Event.dto";
42
40
  export * as EventWedding from "../dto/events/EventWedding.dto";
43
41
  export * as User from "./user/User";
44
42
  export * as Role from "./user/Role";
@@ -33,8 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
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;
36
+ exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.PotentialUser = exports.Wallet = exports.Permission = exports.Role = exports.User = exports.EventWedding = 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 = void 0;
38
38
  // common
39
39
  exports.LocalizedName = __importStar(require("./common/LocalizedName"));
40
40
  exports.Response = __importStar(require("./common/Response"));
@@ -78,9 +78,7 @@ exports.AdminBoundary = __importStar(require("./geo/AdminBoundary"));
78
78
  exports.City = __importStar(require("./geo/City"));
79
79
  exports.District = __importStar(require("./geo/District"));
80
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"));
81
+ exports.Event = __importStar(require("../dto/events/Event.dto"));
84
82
  exports.EventWedding = __importStar(require("../dto/events/EventWedding.dto"));
85
83
  // user
86
84
  exports.User = __importStar(require("./user/User"));
@@ -5,6 +5,7 @@ export const eventBaseSchema = z.object({
5
5
  start_date: z.coerce.date().optional().nullable(),
6
6
  end_date: z.coerce.date().optional().nullable(),
7
7
  is_published: z.boolean().optional(),
8
+ event_type: z.string().trim().max(255).nullable().optional(),
8
9
  slug: z.string().trim().min(1).max(255),
9
10
  });
10
11
  export const createEventSchema = eventBaseSchema;
@@ -18,3 +19,14 @@ export const getEventsFilterSchema = z.object({
18
19
  page: z.coerce.number().int().positive().optional(),
19
20
  limit: z.coerce.number().int().positive().max(100).optional(),
20
21
  });
22
+ export const emptyEvent = {
23
+ id: 0,
24
+ lat: null,
25
+ long: null,
26
+ start_date: null,
27
+ end_date: null,
28
+ is_published: false,
29
+ event_type: null,
30
+ slug: '',
31
+ weddings: [],
32
+ };
@@ -1,10 +1 @@
1
- export const emptyEvent = {
2
- id: 0,
3
- lat: null,
4
- long: null,
5
- start_date: null,
6
- end_date: null,
7
- is_published: false,
8
- slug: '',
9
- weddings: [],
10
- };
1
+ export { emptyEvent } from './Event.dto';
@@ -1,21 +1,7 @@
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
- });
1
+ export const EventTypes = {
2
+ WEDDING: { value: 'wedding', name: { en: 'Wedding', ar: 'زفاف' } },
3
+ };
4
+ export const EventTypeOptions = Object.values(EventTypes).map((type) => ({
5
+ value: type.value,
6
+ name: type.name,
7
+ }));
@@ -1,8 +1 @@
1
- import { createEmptyLocalizedName } from '../../types/common/LocalizedName';
2
- export const emptyEventType = {
3
- id: 0,
4
- code: '',
5
- name: createEmptyLocalizedName(),
6
- active: true,
7
- templates: [],
8
- };
1
+ export { emptyEventType } from './EventType.dto';
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export const eventWeddingBaseSchema = z.object({
3
3
  event_id: z.coerce.number().int().positive(),
4
- event_template_id: z.coerce.number().int().positive(),
5
4
  cover: z.record(z.string(), z.any()).nullable().optional(),
6
5
  });
7
6
  export const createEventWeddingSchema = eventWeddingBaseSchema;
@@ -14,13 +13,11 @@ export const saveEventWeddingSchema = z.union([
14
13
  ]);
15
14
  export const getEventWeddingFilterSchema = z.object({
16
15
  event_id: z.coerce.number().int().positive().optional(),
17
- event_template_id: z.coerce.number().int().positive().optional(),
18
16
  page: z.coerce.number().int().positive().optional(),
19
17
  limit: z.coerce.number().int().positive().max(100).optional(),
20
18
  });
21
19
  export const emptyEventWedding = {
22
20
  id: 0,
23
21
  event_id: 0,
24
- event_template_id: 0,
25
22
  cover: null,
26
23
  };
@@ -1,6 +1,3 @@
1
1
  export * from './Event.dto';
2
- export * from './EventTemplate.dto';
3
- export * from './EventType.dto';
4
2
  export * from './EventWedding.dto';
5
- export * from './Event';
6
- export * from './EventType';
3
+ export * from './EventType.dto';
@@ -41,9 +41,7 @@ export * as AdminBoundary from "./geo/AdminBoundary";
41
41
  export * as City from "./geo/City";
42
42
  export * as District from "./geo/District";
43
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";
44
+ export * as Event from "../dto/events/Event.dto";
47
45
  export * as EventWedding from "../dto/events/EventWedding.dto";
48
46
  // user
49
47
  export * as User from "./user/User";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deallony/shared",
3
- "version": "1.1.51",
3
+ "version": "1.1.54",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "scripts": {
21
21
  "login": "npm login",
22
- "deploy": "node scripts/publish.js",
22
+ "deploy": "npm run build && node ./scripts/publish.js && npm run deploy:publish",
23
23
  "=========": "============= UPDATE APPS LIBRARY =============",
24
24
  "all:update": "npm run mobile:update && npm run backend:update",
25
25
  "mobile:update": "cd ../app && npm install @deallony/shared@latest",
@@ -38,4 +38,4 @@
38
38
  "@types/node": "^25.0.3",
39
39
  "typescript": "^5.9.3"
40
40
  }
41
- }
41
+ }