@deallony/shared 1.1.76 → 1.1.78

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.
Files changed (126) hide show
  1. package/dist/cjs/abstract/index.d.ts +1 -0
  2. package/dist/cjs/abstract/index.js +17 -0
  3. package/dist/cjs/constants/ad/Ad.d.ts +2 -0
  4. package/dist/cjs/constants/ad/Ad.js +25 -0
  5. package/dist/cjs/constants/ad/index.d.ts +1 -0
  6. package/dist/cjs/constants/ad/index.js +17 -0
  7. package/dist/cjs/constants/events/Event.d.ts +2 -2
  8. package/dist/cjs/constants/events/Event.js +18 -3
  9. package/dist/cjs/constants/events/EventTimeline.d.ts +2 -0
  10. package/dist/cjs/constants/events/EventTimeline.js +8 -0
  11. package/dist/cjs/constants/events/EventWedding.d.ts +2 -2
  12. package/dist/cjs/constants/events/index.d.ts +1 -0
  13. package/dist/cjs/constants/events/index.js +1 -0
  14. package/dist/cjs/constants/index.d.ts +6 -1
  15. package/dist/cjs/constants/index.js +6 -1
  16. package/dist/cjs/constants/motor/Motor.d.ts +2 -0
  17. package/dist/cjs/constants/motor/Motor.js +17 -0
  18. package/dist/cjs/constants/motor/index.d.ts +1 -0
  19. package/dist/cjs/constants/motor/index.js +17 -0
  20. package/dist/cjs/constants/property/Property.d.ts +2 -0
  21. package/dist/cjs/constants/property/Property.js +14 -0
  22. package/dist/cjs/constants/property/index.d.ts +1 -0
  23. package/dist/cjs/constants/property/index.js +17 -0
  24. package/dist/cjs/constants/service/Service.d.ts +2 -0
  25. package/dist/cjs/constants/service/Service.js +9 -0
  26. package/dist/cjs/constants/service/index.d.ts +1 -0
  27. package/dist/cjs/constants/service/index.js +17 -0
  28. package/dist/cjs/constants/used-product/UsedProduct.d.ts +2 -0
  29. package/dist/cjs/constants/used-product/UsedProduct.js +10 -0
  30. package/dist/cjs/constants/used-product/index.d.ts +1 -0
  31. package/dist/cjs/constants/used-product/index.js +17 -0
  32. package/dist/cjs/dto/common/localizedName.dto.d.ts +2 -4
  33. package/dist/cjs/dto/common/localizedName.dto.js +0 -6
  34. package/dist/cjs/dto/events/Event.dto.d.ts +1 -152
  35. package/dist/cjs/dto/events/Event.dto.js +0 -25
  36. package/dist/cjs/dto/events/EventTimeline.dto.d.ts +1 -53
  37. package/dist/cjs/dto/events/EventTimeline.dto.js +0 -28
  38. package/dist/cjs/dto/events/EventWedding.dto.d.ts +1 -58
  39. package/dist/cjs/dto/events/EventWedding.dto.js +0 -32
  40. package/dist/cjs/dto/events/index.d.ts +0 -1
  41. package/dist/cjs/index.d.ts +5 -5
  42. package/dist/cjs/index.js +48 -9
  43. package/dist/cjs/schema/ad/index.d.ts +1 -0
  44. package/dist/cjs/schema/ad/index.js +17 -0
  45. package/dist/cjs/schema/ad/save-ad.schema.d.ts +88 -0
  46. package/dist/cjs/schema/ad/save-ad.schema.js +37 -0
  47. package/dist/cjs/schema/common/index.d.ts +1 -0
  48. package/dist/cjs/schema/common/index.js +17 -0
  49. package/dist/cjs/schema/common/localizedName.schema.d.ts +5 -0
  50. package/dist/cjs/schema/common/localizedName.schema.js +8 -0
  51. package/dist/cjs/schema/events/Event.schema.d.ts +117 -0
  52. package/dist/cjs/schema/events/Event.schema.js +31 -0
  53. package/dist/cjs/schema/events/EventTimeline.schema.d.ts +40 -0
  54. package/dist/cjs/schema/events/EventTimeline.schema.js +24 -0
  55. package/dist/cjs/schema/events/EventWedding.schema.d.ts +40 -0
  56. package/dist/cjs/schema/events/EventWedding.schema.js +24 -0
  57. package/dist/cjs/schema/events/index.d.ts +3 -0
  58. package/dist/cjs/schema/events/index.js +19 -0
  59. package/dist/cjs/schema/index.d.ts +3 -0
  60. package/dist/cjs/schema/index.js +39 -0
  61. package/dist/cjs/types/ad/Ad.js +10 -14
  62. package/dist/cjs/types/common/FilterParams.d.ts +1 -1
  63. package/dist/cjs/types/events/Event.d.ts +5 -2
  64. package/dist/cjs/types/events/Event.js +0 -11
  65. package/dist/cjs/types/events/EventTimeline.d.ts +11 -0
  66. package/dist/cjs/types/events/EventTimeline.js +2 -0
  67. package/dist/cjs/types/events/EventWedding.d.ts +5 -5
  68. package/dist/cjs/types/events/EventWedding.js +0 -7
  69. package/dist/cjs/types/events/index.d.ts +1 -2
  70. package/dist/cjs/types/events/index.js +1 -2
  71. package/dist/cjs/types/index.d.ts +3 -2
  72. package/dist/cjs/types/index.js +8 -4
  73. package/dist/cjs/utils/index.d.ts +1 -0
  74. package/dist/cjs/utils/index.js +17 -0
  75. package/dist/esm/abstract/index.js +1 -0
  76. package/dist/esm/constants/ad/Ad.js +22 -0
  77. package/dist/esm/constants/ad/index.js +1 -0
  78. package/dist/esm/constants/events/Event.js +18 -3
  79. package/dist/esm/constants/events/EventTimeline.js +5 -0
  80. package/dist/esm/constants/events/index.js +5 -4
  81. package/dist/esm/constants/index.js +6 -1
  82. package/dist/esm/constants/motor/Motor.js +14 -0
  83. package/dist/esm/constants/motor/index.js +1 -0
  84. package/dist/esm/constants/property/Property.js +11 -0
  85. package/dist/esm/constants/property/index.js +1 -0
  86. package/dist/esm/constants/service/Service.js +6 -0
  87. package/dist/esm/constants/service/index.js +1 -0
  88. package/dist/esm/constants/used-product/UsedProduct.js +7 -0
  89. package/dist/esm/constants/used-product/index.js +1 -0
  90. package/dist/esm/dto/common/localizedName.dto.js +1 -5
  91. package/dist/esm/dto/events/Event.dto.js +1 -24
  92. package/dist/esm/dto/events/EventTimeline.dto.js +1 -27
  93. package/dist/esm/dto/events/EventWedding.dto.js +1 -31
  94. package/dist/esm/dto/events/index.js +3 -3
  95. package/dist/esm/dto/index.js +2 -2
  96. package/dist/esm/index.js +49 -7
  97. package/dist/esm/schema/ad/index.js +1 -0
  98. package/dist/esm/schema/ad/save-ad.schema.js +34 -0
  99. package/dist/esm/schema/common/index.js +1 -0
  100. package/dist/esm/schema/common/localizedName.schema.js +5 -0
  101. package/dist/esm/schema/events/Event.schema.js +28 -0
  102. package/dist/esm/schema/events/EventTimeline.schema.js +21 -0
  103. package/dist/esm/schema/events/EventWedding.schema.js +21 -0
  104. package/dist/esm/schema/events/index.js +3 -0
  105. package/dist/esm/schema/index.js +3 -0
  106. package/dist/esm/types/ad/Ad.js +10 -14
  107. package/dist/esm/types/ad/index.js +3 -3
  108. package/dist/esm/types/ad-common/index.js +6 -6
  109. package/dist/esm/types/attributes/index.js +4 -4
  110. package/dist/esm/types/common/index.js +5 -5
  111. package/dist/esm/types/communication/index.js +5 -5
  112. package/dist/esm/types/events/Event.js +1 -10
  113. package/dist/esm/types/events/EventTimeline.js +1 -0
  114. package/dist/esm/types/events/EventWedding.js +1 -6
  115. package/dist/esm/types/events/index.js +1 -2
  116. package/dist/esm/types/geo/index.js +3 -3
  117. package/dist/esm/types/index.js +60 -56
  118. package/dist/esm/types/integrations/index.js +1 -1
  119. package/dist/esm/types/media/index.js +4 -4
  120. package/dist/esm/types/motor/index.js +6 -6
  121. package/dist/esm/types/property/index.js +5 -5
  122. package/dist/esm/types/service/index.js +4 -4
  123. package/dist/esm/types/used-product/index.js +1 -1
  124. package/dist/esm/types/user/index.js +5 -5
  125. package/dist/esm/utils/index.js +1 -0
  126. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ export * from './baseService';
@@ -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("./baseService"), exports);
@@ -0,0 +1,2 @@
1
+ import { IAd } from "../../types/ad";
2
+ export declare const emptyAd: IAd;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyAd = void 0;
4
+ const motor_1 = require("../motor");
5
+ const property_1 = require("../property");
6
+ const service_1 = require("../service");
7
+ const used_product_1 = require("../used-product");
8
+ exports.emptyAd = {
9
+ id: 0,
10
+ user_id: 0,
11
+ status_id: 0,
12
+ title: "",
13
+ description: "",
14
+ negotiable: false,
15
+ latitude: 0,
16
+ longitude: 0,
17
+ baseAdminBoundaryId: 0,
18
+ contact_methods: null,
19
+ selected_phone: null,
20
+ media: [],
21
+ property: property_1.emptyProperty,
22
+ motor: motor_1.emptyMotor,
23
+ service: service_1.emptyService,
24
+ product: used_product_1.emptyUsedProduct,
25
+ };
@@ -0,0 +1 @@
1
+ export * from "./Ad";
@@ -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("./Ad"), exports);
@@ -1,2 +1,2 @@
1
- import { EVENTS } from "../../dto";
2
- export declare const emptyEvent: EVENTS.IEvent;
1
+ import { DTO } from '../..';
2
+ export declare const emptyEvent: DTO.EVENTS.SaveEventDto;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emptyEvent = void 0;
4
+ const EventTimeline_1 = require("./EventTimeline");
5
+ const EventWedding_1 = require("./EventWedding");
4
6
  exports.emptyEvent = {
5
- id: 0,
7
+ id: undefined,
6
8
  lat: null,
7
9
  long: null,
8
10
  start_date: null,
@@ -11,6 +13,19 @@ exports.emptyEvent = {
11
13
  event_type: null,
12
14
  event_template: null,
13
15
  slug: '',
14
- wedding: null,
15
- timeline: null,
16
+ wedding: {
17
+ ...EventWedding_1.emptyEventWedding,
18
+ id: undefined,
19
+ event_id: undefined,
20
+ first_bride_name: '',
21
+ last_bride_name: '',
22
+ first_groom_name: '',
23
+ last_groom_name: '',
24
+ },
25
+ timeline: {
26
+ ...EventTimeline_1.emptyEventTimeline,
27
+ id: undefined,
28
+ event_id: undefined,
29
+ timelines: [],
30
+ },
16
31
  };
@@ -0,0 +1,2 @@
1
+ import { TYPES } from '../..';
2
+ export declare const emptyEventTimeline: TYPES.EventTimeline.IEventTimeline;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyEventTimeline = void 0;
4
+ exports.emptyEventTimeline = {
5
+ id: 0,
6
+ event_id: 0,
7
+ timelines: [],
8
+ };
@@ -1,2 +1,2 @@
1
- import { EVENTS } from "../../dto";
2
- export declare const emptyEventWedding: EVENTS.IEventWedding;
1
+ import { TYPES } from '../..';
2
+ export declare const emptyEventWedding: TYPES.EventWedding.IEventWedding;
@@ -2,3 +2,4 @@ export * from './Event';
2
2
  export * from './EventType';
3
3
  export * from './EventWedding';
4
4
  export * from './EventTemplate';
5
+ export * from './EventTimeline';
@@ -18,3 +18,4 @@ __exportStar(require("./Event"), exports);
18
18
  __exportStar(require("./EventType"), exports);
19
19
  __exportStar(require("./EventWedding"), exports);
20
20
  __exportStar(require("./EventTemplate"), exports);
21
+ __exportStar(require("./EventTimeline"), exports);
@@ -1 +1,6 @@
1
- export * as EVENTS from './events';
1
+ export * as AD from "./ad";
2
+ export * as EVENTS from "./events";
3
+ export * as MOTOR from "./motor";
4
+ export * as PROPERTY from "./property";
5
+ export * as SERVICE from "./service";
6
+ export * as USED_PRODUCT from "./used-product";
@@ -33,5 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.EVENTS = void 0;
36
+ exports.USED_PRODUCT = exports.SERVICE = exports.PROPERTY = exports.MOTOR = exports.EVENTS = exports.AD = void 0;
37
+ exports.AD = __importStar(require("./ad"));
37
38
  exports.EVENTS = __importStar(require("./events"));
39
+ exports.MOTOR = __importStar(require("./motor"));
40
+ exports.PROPERTY = __importStar(require("./property"));
41
+ exports.SERVICE = __importStar(require("./service"));
42
+ exports.USED_PRODUCT = __importStar(require("./used-product"));
@@ -0,0 +1,2 @@
1
+ import { IMotor } from "../../types/motor";
2
+ export declare const emptyMotor: IMotor;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyMotor = void 0;
4
+ exports.emptyMotor = {
5
+ id: 0,
6
+ body_type_id: 0,
7
+ regional_spec_id: 0,
8
+ transmission_id: 0,
9
+ fuel_type_id: 0,
10
+ interior_color_id: null,
11
+ mileage: 0,
12
+ offer_type_id: 0,
13
+ year: null,
14
+ created_at: "",
15
+ updated_at: "",
16
+ seats_count: null,
17
+ };
@@ -0,0 +1 @@
1
+ export * from "./Motor";
@@ -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("./Motor"), exports);
@@ -0,0 +1,2 @@
1
+ import { IProperty } from "../../types/property";
2
+ export declare const emptyProperty: IProperty;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyProperty = void 0;
4
+ exports.emptyProperty = {
5
+ id: 0,
6
+ offer_type_id: 0,
7
+ price_type_id: 0,
8
+ size_m2: 0,
9
+ bedrooms: 0,
10
+ created_at: "",
11
+ updated_at: "",
12
+ property_facilities: [],
13
+ feature_ids: [],
14
+ };
@@ -0,0 +1 @@
1
+ export * from "./Property";
@@ -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("./Property"), exports);
@@ -0,0 +1,2 @@
1
+ import { IService } from "../../types/service";
2
+ export declare const emptyService: IService;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyService = void 0;
4
+ exports.emptyService = {
5
+ unit_id: null,
6
+ access_type_id: null,
7
+ work_type_id: null,
8
+ locations: [],
9
+ };
@@ -0,0 +1 @@
1
+ export * from "./Service";
@@ -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("./Service"), exports);
@@ -0,0 +1,2 @@
1
+ import { IUsedProduct } from "../../types/used-product";
2
+ export declare const emptyUsedProduct: IUsedProduct;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyUsedProduct = void 0;
4
+ exports.emptyUsedProduct = {
5
+ condition_id: 0,
6
+ age_id: null,
7
+ isFree: null,
8
+ isDeliveryAvailable: null,
9
+ product_type_id: null,
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./UsedProduct";
@@ -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("./UsedProduct"), exports);
@@ -1,5 +1,3 @@
1
1
  import { z } from 'zod';
2
- export declare const localizedNameSchema: z.ZodObject<{
3
- en: z.ZodString;
4
- ar: z.ZodString;
5
- }, z.core.$strip>;
2
+ import { localizedNameSchema } from '../../schema/common/localizedName.schema';
3
+ export type LocalizedNameDto = z.infer<typeof localizedNameSchema>;
@@ -1,8 +1,2 @@
1
1
  "use strict";
2
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
- });
@@ -1,157 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { type IEventWedding } from './EventWedding.dto';
3
- import type { IEventTimeline } from './EventTimeline.dto';
4
- export declare const eventBaseSchema: z.ZodObject<{
5
- lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
6
- long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
7
- start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
8
- end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
9
- is_published: z.ZodOptional<z.ZodBoolean>;
10
- slug: z.ZodString;
11
- wedding: z.ZodUnion<readonly [z.ZodObject<{
12
- event_id: z.ZodCoercedNumber<unknown>;
13
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
14
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
- }, z.core.$strip>, z.ZodObject<{
19
- event_id: z.ZodCoercedNumber<unknown>;
20
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
21
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
- id: z.ZodCoercedNumber<unknown>;
26
- }, z.core.$strip>]>;
27
- event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
- event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
- }, z.core.$strip>;
30
- export declare const createEventSchema: z.ZodObject<{
31
- lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
32
- long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
33
- start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
34
- end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
35
- is_published: z.ZodOptional<z.ZodBoolean>;
36
- slug: z.ZodString;
37
- wedding: z.ZodUnion<readonly [z.ZodObject<{
38
- event_id: z.ZodCoercedNumber<unknown>;
39
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
40
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
- }, z.core.$strip>, z.ZodObject<{
45
- event_id: z.ZodCoercedNumber<unknown>;
46
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
47
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
- id: z.ZodCoercedNumber<unknown>;
52
- }, z.core.$strip>]>;
53
- event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
- event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
- }, z.core.$strip>;
56
- export declare const updateEventSchema: z.ZodObject<{
57
- lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
58
- long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
59
- start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
60
- end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
61
- is_published: z.ZodOptional<z.ZodBoolean>;
62
- slug: z.ZodString;
63
- wedding: z.ZodUnion<readonly [z.ZodObject<{
64
- event_id: z.ZodCoercedNumber<unknown>;
65
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
66
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
- }, z.core.$strip>, z.ZodObject<{
71
- event_id: z.ZodCoercedNumber<unknown>;
72
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
73
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
- id: z.ZodCoercedNumber<unknown>;
78
- }, z.core.$strip>]>;
79
- event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
- event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
- id: z.ZodCoercedNumber<unknown>;
82
- }, z.core.$strip>;
83
- export declare const saveEventSchema: z.ZodUnion<readonly [z.ZodObject<{
84
- lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
85
- long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
86
- start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
87
- end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
88
- is_published: z.ZodOptional<z.ZodBoolean>;
89
- slug: z.ZodString;
90
- wedding: z.ZodUnion<readonly [z.ZodObject<{
91
- event_id: z.ZodCoercedNumber<unknown>;
92
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
93
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
- }, z.core.$strip>, z.ZodObject<{
98
- event_id: z.ZodCoercedNumber<unknown>;
99
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
100
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
- id: z.ZodCoercedNumber<unknown>;
105
- }, z.core.$strip>]>;
106
- event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
- event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
- }, z.core.$strip>, z.ZodObject<{
109
- lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
110
- long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
111
- start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
112
- end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
113
- is_published: z.ZodOptional<z.ZodBoolean>;
114
- slug: z.ZodString;
115
- wedding: z.ZodUnion<readonly [z.ZodObject<{
116
- event_id: z.ZodCoercedNumber<unknown>;
117
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
118
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
- }, z.core.$strip>, z.ZodObject<{
123
- event_id: z.ZodCoercedNumber<unknown>;
124
- cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
125
- first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
- last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
- first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
- last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
- id: z.ZodCoercedNumber<unknown>;
130
- }, z.core.$strip>]>;
131
- event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
- event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
- id: z.ZodCoercedNumber<unknown>;
134
- }, z.core.$strip>]>;
135
- export declare const getEventsFilterSchema: z.ZodObject<{
136
- is_published: z.ZodOptional<z.ZodBoolean>;
137
- search: z.ZodOptional<z.ZodString>;
138
- page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
139
- limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
140
- }, z.core.$strip>;
2
+ import { createEventSchema, getEventsFilterSchema, saveEventSchema, updateEventSchema } from '../../schema/events/Event.schema';
141
3
  export type CreateEventDto = z.infer<typeof createEventSchema>;
142
4
  export type UpdateEventDto = z.infer<typeof updateEventSchema>;
143
5
  export type SaveEventDto = z.infer<typeof saveEventSchema>;
144
6
  export type GetEventsFilterDto = z.infer<typeof getEventsFilterSchema>;
145
- export type IEvent = {
146
- id?: number;
147
- lat: number | null;
148
- long: number | null;
149
- start_date: string | Date | null;
150
- end_date: string | Date | null;
151
- is_published: boolean;
152
- event_type: string | null;
153
- event_template: string | null;
154
- slug: string;
155
- wedding?: IEventWedding | null;
156
- timeline?: IEventTimeline | null;
157
- };
@@ -1,27 +1,2 @@
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;
4
- const zod_1 = require("zod");
5
- const EventWedding_dto_1 = require("./EventWedding.dto");
6
- exports.eventBaseSchema = zod_1.z.object({
7
- lat: zod_1.z.coerce.number().optional().nullable(),
8
- long: zod_1.z.coerce.number().optional().nullable(),
9
- start_date: zod_1.z.coerce.date().optional().nullable(),
10
- end_date: zod_1.z.coerce.date().optional().nullable(),
11
- is_published: zod_1.z.boolean().optional(),
12
- slug: zod_1.z.string().trim().min(1).max(255),
13
- wedding: EventWedding_dto_1.saveEventWeddingSchema,
14
- event_type: zod_1.z.string().trim().max(255).nullable().optional(),
15
- event_template: zod_1.z.string().trim().max(255).nullable().optional(),
16
- });
17
- exports.createEventSchema = exports.eventBaseSchema;
18
- exports.updateEventSchema = exports.eventBaseSchema.extend({
19
- id: zod_1.z.coerce.number().int().positive(),
20
- });
21
- exports.saveEventSchema = zod_1.z.union([exports.createEventSchema, exports.updateEventSchema]);
22
- exports.getEventsFilterSchema = zod_1.z.object({
23
- is_published: zod_1.z.boolean().optional(),
24
- search: zod_1.z.string().trim().optional(),
25
- page: zod_1.z.coerce.number().int().positive().optional(),
26
- limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
27
- });
@@ -1,59 +1,7 @@
1
1
  import { z } from 'zod';
2
- import type { IEvent } from './Event.dto';
3
- export declare const timelinePayloadSchema: z.ZodObject<{
4
- title: z.ZodString;
5
- start_time: z.ZodString;
6
- }, z.core.$strip>;
7
- export declare const eventTimelineBaseSchema: z.ZodObject<{
8
- event_id: z.ZodCoercedNumber<unknown>;
9
- timelines: z.ZodArray<z.ZodObject<{
10
- title: z.ZodString;
11
- start_time: z.ZodString;
12
- }, z.core.$strip>>;
13
- }, z.core.$strip>;
14
- export declare const createEventTimelineSchema: z.ZodObject<{
15
- event_id: z.ZodCoercedNumber<unknown>;
16
- timelines: z.ZodArray<z.ZodObject<{
17
- title: z.ZodString;
18
- start_time: z.ZodString;
19
- }, z.core.$strip>>;
20
- }, z.core.$strip>;
21
- export declare const updateEventTimelineSchema: z.ZodObject<{
22
- event_id: z.ZodCoercedNumber<unknown>;
23
- timelines: z.ZodArray<z.ZodObject<{
24
- title: z.ZodString;
25
- start_time: z.ZodString;
26
- }, z.core.$strip>>;
27
- id: z.ZodCoercedNumber<unknown>;
28
- }, z.core.$strip>;
29
- export declare const saveEventTimelineSchema: z.ZodUnion<readonly [z.ZodObject<{
30
- event_id: z.ZodCoercedNumber<unknown>;
31
- timelines: z.ZodArray<z.ZodObject<{
32
- title: z.ZodString;
33
- start_time: z.ZodString;
34
- }, z.core.$strip>>;
35
- }, z.core.$strip>, z.ZodObject<{
36
- event_id: z.ZodCoercedNumber<unknown>;
37
- timelines: z.ZodArray<z.ZodObject<{
38
- title: z.ZodString;
39
- start_time: z.ZodString;
40
- }, z.core.$strip>>;
41
- id: z.ZodCoercedNumber<unknown>;
42
- }, z.core.$strip>]>;
43
- export declare const getEventTimelineFilterSchema: z.ZodObject<{
44
- event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
45
- page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
46
- limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
47
- }, z.core.$strip>;
2
+ import { createEventTimelineSchema, getEventTimelineFilterSchema, saveEventTimelineSchema, timelinePayloadSchema, updateEventTimelineSchema } from '../../schema/events/EventTimeline.schema';
48
3
  export type TimelinePayloadDto = z.infer<typeof timelinePayloadSchema>;
49
4
  export type CreateEventTimelineDto = z.infer<typeof createEventTimelineSchema>;
50
5
  export type UpdateEventTimelineDto = z.infer<typeof updateEventTimelineSchema>;
51
6
  export type SaveEventTimelineDto = z.infer<typeof saveEventTimelineSchema>;
52
7
  export type GetEventTimelineFilterDto = z.infer<typeof getEventTimelineFilterSchema>;
53
- export type IEventTimeline = {
54
- id?: number;
55
- event_id: number;
56
- timelines: TimelinePayloadDto[];
57
- event?: IEvent;
58
- };
59
- export declare const emptyEventTimeline: IEventTimeline;
@@ -1,30 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emptyEventTimeline = exports.getEventTimelineFilterSchema = exports.saveEventTimelineSchema = exports.updateEventTimelineSchema = exports.createEventTimelineSchema = exports.eventTimelineBaseSchema = exports.timelinePayloadSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.timelinePayloadSchema = zod_1.z.object({
6
- title: zod_1.z.string().trim().min(1).max(255),
7
- start_time: zod_1.z.string().trim().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),
8
- });
9
- exports.eventTimelineBaseSchema = zod_1.z.object({
10
- event_id: zod_1.z.coerce.number().int().positive(),
11
- timelines: zod_1.z.array(exports.timelinePayloadSchema),
12
- });
13
- exports.createEventTimelineSchema = exports.eventTimelineBaseSchema;
14
- exports.updateEventTimelineSchema = exports.eventTimelineBaseSchema.extend({
15
- id: zod_1.z.coerce.number().int().positive(),
16
- });
17
- exports.saveEventTimelineSchema = zod_1.z.union([
18
- exports.createEventTimelineSchema,
19
- exports.updateEventTimelineSchema,
20
- ]);
21
- exports.getEventTimelineFilterSchema = zod_1.z.object({
22
- event_id: zod_1.z.coerce.number().int().positive().optional(),
23
- page: zod_1.z.coerce.number().int().positive().optional(),
24
- limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
25
- });
26
- exports.emptyEventTimeline = {
27
- id: 0,
28
- event_id: 0,
29
- timelines: [],
30
- };