@deallony/shared 1.1.65 → 1.1.68

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.
@@ -0,0 +1,2 @@
1
+ import { IEvent } from "../../dto";
2
+ export declare const emptyEvent: IEvent;
@@ -0,0 +1,16 @@
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
+ event_type: null,
12
+ event_template: null,
13
+ slug: '',
14
+ wedding: null,
15
+ timeline: null,
16
+ };
@@ -0,0 +1,18 @@
1
+ export declare const EventTemplate: {
2
+ WEDDING: {
3
+ value: string;
4
+ name: {
5
+ en: string;
6
+ ar: string;
7
+ };
8
+ event_types: string[];
9
+ };
10
+ };
11
+ export declare const EventTemplateOptions: {
12
+ value: string;
13
+ name: {
14
+ en: string;
15
+ ar: string;
16
+ };
17
+ event_types: string[];
18
+ }[];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventTemplateOptions = exports.EventTemplate = void 0;
4
+ exports.EventTemplate = {
5
+ WEDDING: { value: 'wedding-1', name: { en: 'Wedding', ar: 'زفاف' }, event_types: ['wedding'] },
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
+ }));
@@ -0,0 +1,16 @@
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
+ }[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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
+ }));
@@ -0,0 +1,3 @@
1
+ export * from './Event';
2
+ export * from './EventType';
3
+ export * from './EventTemplate';
@@ -0,0 +1,19 @@
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("./EventType"), exports);
19
+ __exportStar(require("./EventTemplate"), exports);
@@ -0,0 +1 @@
1
+ export * from './events';
@@ -0,0 +1,17 @@
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("./events"), exports);
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { IEventWedding } from './EventWedding.dto';
2
+ import { type IEventWedding } from './EventWedding.dto';
3
3
  import type { IEventTimeline } from './EventTimeline.dto';
4
4
  export declare const eventBaseSchema: z.ZodObject<{
5
5
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -8,7 +8,24 @@ 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;
13
+ wedding: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
14
+ event_id: z.ZodCoercedNumber<unknown>;
15
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
16
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ event_id: z.ZodCoercedNumber<unknown>;
22
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
23
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ id: z.ZodCoercedNumber<unknown>;
28
+ }, z.core.$strip>]>>>;
12
29
  }, z.core.$strip>;
13
30
  export declare const createEventSchema: z.ZodObject<{
14
31
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -17,7 +34,24 @@ export declare const createEventSchema: z.ZodObject<{
17
34
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
18
35
  is_published: z.ZodOptional<z.ZodBoolean>;
19
36
  event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
38
  slug: z.ZodString;
39
+ wedding: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
40
+ event_id: z.ZodCoercedNumber<unknown>;
41
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
42
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ event_id: z.ZodCoercedNumber<unknown>;
48
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
49
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ id: z.ZodCoercedNumber<unknown>;
54
+ }, z.core.$strip>]>>>;
21
55
  }, z.core.$strip>;
22
56
  export declare const updateEventSchema: z.ZodObject<{
23
57
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -26,7 +60,24 @@ export declare const updateEventSchema: z.ZodObject<{
26
60
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
27
61
  is_published: z.ZodOptional<z.ZodBoolean>;
28
62
  event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
64
  slug: z.ZodString;
65
+ wedding: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
66
+ event_id: z.ZodCoercedNumber<unknown>;
67
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
68
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ }, z.core.$strip>, z.ZodObject<{
73
+ event_id: z.ZodCoercedNumber<unknown>;
74
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
75
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ id: z.ZodCoercedNumber<unknown>;
80
+ }, z.core.$strip>]>>>;
30
81
  id: z.ZodCoercedNumber<unknown>;
31
82
  }, z.core.$strip>;
32
83
  export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
@@ -36,7 +87,24 @@ export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
36
87
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
37
88
  is_published: z.ZodOptional<z.ZodBoolean>;
38
89
  event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
+ event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
91
  slug: z.ZodString;
92
+ wedding: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
93
+ event_id: z.ZodCoercedNumber<unknown>;
94
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
95
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ event_id: z.ZodCoercedNumber<unknown>;
101
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
102
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ id: z.ZodCoercedNumber<unknown>;
107
+ }, z.core.$strip>]>>>;
40
108
  }, z.core.$strip>, z.ZodObject<{
41
109
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
42
110
  long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -44,7 +112,24 @@ export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
44
112
  end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
45
113
  is_published: z.ZodOptional<z.ZodBoolean>;
46
114
  event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
+ event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
116
  slug: z.ZodString;
117
+ wedding: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
118
+ event_id: z.ZodCoercedNumber<unknown>;
119
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
120
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ }, z.core.$strip>, z.ZodObject<{
125
+ event_id: z.ZodCoercedNumber<unknown>;
126
+ cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
127
+ first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
+ last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
+ first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
131
+ id: z.ZodCoercedNumber<unknown>;
132
+ }, z.core.$strip>]>>>;
48
133
  id: z.ZodCoercedNumber<unknown>;
49
134
  }, z.core.$strip>]>;
50
135
  export declare const getEventsFilterSchema: z.ZodObject<{
@@ -65,8 +150,8 @@ export type IEvent = {
65
150
  end_date: string | Date | null;
66
151
  is_published: boolean;
67
152
  event_type: string | null;
153
+ event_template: string | null;
68
154
  slug: string;
69
155
  wedding?: IEventWedding | null;
70
156
  timeline?: IEventTimeline | null;
71
157
  };
72
- export declare const emptyEvent: IEvent;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emptyEvent = exports.getEventsFilterSchema = exports.saveEventSchema = exports.updateEventSchema = exports.createEventSchema = exports.eventBaseSchema = void 0;
3
+ exports.getEventsFilterSchema = exports.saveEventSchema = exports.updateEventSchema = exports.createEventSchema = exports.eventBaseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const EventWedding_dto_1 = require("./EventWedding.dto");
5
6
  exports.eventBaseSchema = zod_1.z.object({
6
7
  lat: zod_1.z.coerce.number().optional().nullable(),
7
8
  long: zod_1.z.coerce.number().optional().nullable(),
@@ -9,7 +10,9 @@ exports.eventBaseSchema = zod_1.z.object({
9
10
  end_date: zod_1.z.coerce.date().optional().nullable(),
10
11
  is_published: zod_1.z.boolean().optional(),
11
12
  event_type: zod_1.z.string().trim().max(255).nullable().optional(),
13
+ event_template: zod_1.z.string().trim().max(255).nullable().optional(),
12
14
  slug: zod_1.z.string().trim().min(1).max(255),
15
+ wedding: EventWedding_dto_1.saveEventWeddingSchema.optional().nullable(),
13
16
  });
14
17
  exports.createEventSchema = exports.eventBaseSchema;
15
18
  exports.updateEventSchema = exports.eventBaseSchema.extend({
@@ -22,15 +25,3 @@ exports.getEventsFilterSchema = zod_1.z.object({
22
25
  page: zod_1.z.coerce.number().int().positive().optional(),
23
26
  limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
24
27
  });
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
- wedding: null,
35
- timeline: null,
36
- };
@@ -1,4 +1,3 @@
1
1
  export * from './Event.dto';
2
2
  export * from './EventTimeline.dto';
3
3
  export * from './EventWedding.dto';
4
- export * from './EventType.dto';
@@ -17,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Event.dto"), exports);
18
18
  __exportStar(require("./EventTimeline.dto"), exports);
19
19
  __exportStar(require("./EventWedding.dto"), exports);
20
- __exportStar(require("./EventType.dto"), exports);
@@ -0,0 +1,13 @@
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
+ event_type: null,
9
+ event_template: null,
10
+ slug: '',
11
+ wedding: null,
12
+ timeline: null,
13
+ };
@@ -0,0 +1,8 @@
1
+ export const EventTemplate = {
2
+ WEDDING: { value: 'wedding-1', name: { en: 'Wedding', ar: 'زفاف' }, event_types: ['wedding'] },
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
+ }));
@@ -0,0 +1,7 @@
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
+ }));
@@ -0,0 +1,3 @@
1
+ export * from './Event.js';
2
+ export * from './EventType.js';
3
+ export * from './EventTemplate.js';
@@ -0,0 +1 @@
1
+ export * from './events/index.js';
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { saveEventWeddingSchema } from './EventWedding.dto.js';
2
3
  export const eventBaseSchema = z.object({
3
4
  lat: z.coerce.number().optional().nullable(),
4
5
  long: z.coerce.number().optional().nullable(),
@@ -6,7 +7,9 @@ export const eventBaseSchema = z.object({
6
7
  end_date: z.coerce.date().optional().nullable(),
7
8
  is_published: z.boolean().optional(),
8
9
  event_type: z.string().trim().max(255).nullable().optional(),
10
+ event_template: z.string().trim().max(255).nullable().optional(),
9
11
  slug: z.string().trim().min(1).max(255),
12
+ wedding: saveEventWeddingSchema.optional().nullable(),
10
13
  });
11
14
  export const createEventSchema = eventBaseSchema;
12
15
  export const updateEventSchema = eventBaseSchema.extend({
@@ -19,15 +22,3 @@ export const getEventsFilterSchema = z.object({
19
22
  page: z.coerce.number().int().positive().optional(),
20
23
  limit: z.coerce.number().int().positive().max(100).optional(),
21
24
  });
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
- wedding: null,
32
- timeline: null,
33
- };
@@ -1,4 +1,3 @@
1
1
  export * from './Event.dto.js';
2
2
  export * from './EventTimeline.dto.js';
3
3
  export * from './EventWedding.dto.js';
4
- export * from './EventType.dto.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deallony/shared",
3
- "version": "1.1.65",
3
+ "version": "1.1.68",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",