@deallony/shared 1.2.7 → 1.2.9

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 (119) hide show
  1. package/dist/cjs/constants/company/Company.d.ts +9 -0
  2. package/dist/cjs/constants/company/Company.js +12 -0
  3. package/dist/cjs/constants/company/index.d.ts +1 -0
  4. package/dist/cjs/constants/company/index.js +17 -0
  5. package/dist/cjs/constants/index.d.ts +1 -0
  6. package/dist/cjs/constants/index.js +2 -1
  7. package/dist/cjs/dto/events/Event.d.ts +2 -0
  8. package/dist/cjs/dto/events/Event.js +5 -0
  9. package/dist/cjs/dto/events/EventTemplate.d.ts +14 -0
  10. package/dist/cjs/dto/events/EventTemplate.dto.d.ts +18 -0
  11. package/dist/cjs/dto/events/EventTemplate.dto.js +11 -0
  12. package/dist/cjs/dto/events/EventTemplate.js +14 -0
  13. package/dist/cjs/dto/events/EventType.d.ts +2 -0
  14. package/dist/cjs/dto/events/EventType.dto.d.ts +16 -0
  15. package/dist/cjs/dto/events/EventType.dto.js +10 -0
  16. package/dist/cjs/dto/events/EventType.js +5 -0
  17. package/dist/cjs/dto/events/EventWedding.d.ts +11 -0
  18. package/dist/cjs/dto/events/EventWedding.js +9 -0
  19. package/dist/cjs/dto/events/common.d.ts +5 -0
  20. package/dist/cjs/dto/events/common.js +8 -0
  21. package/dist/cjs/types/attributes/CarBody.d.ts +5 -0
  22. package/dist/cjs/types/attributes/CarBody.js +2 -0
  23. package/dist/cjs/types/attributes/Facility.d.ts +6 -0
  24. package/dist/cjs/types/attributes/Facility.js +2 -0
  25. package/dist/cjs/types/attributes/Feature.d.ts +7 -0
  26. package/dist/cjs/types/attributes/Feature.js +2 -0
  27. package/dist/cjs/types/attributes/FuelType.d.ts +5 -0
  28. package/dist/cjs/types/attributes/FuelType.js +2 -0
  29. package/dist/cjs/types/attributes/LicenseType.d.ts +5 -0
  30. package/dist/cjs/types/attributes/LicenseType.js +2 -0
  31. package/dist/cjs/types/attributes/OfferType.d.ts +5 -0
  32. package/dist/cjs/types/attributes/OfferType.js +2 -0
  33. package/dist/cjs/types/attributes/PriceType.d.ts +7 -0
  34. package/dist/cjs/types/attributes/PriceType.js +2 -0
  35. package/dist/cjs/types/attributes/PropertyStatus.d.ts +5 -0
  36. package/dist/cjs/types/attributes/PropertyStatus.js +2 -0
  37. package/dist/cjs/types/attributes/PublisherType.d.ts +5 -0
  38. package/dist/cjs/types/attributes/PublisherType.js +2 -0
  39. package/dist/cjs/types/attributes/RegionalSpec.d.ts +5 -0
  40. package/dist/cjs/types/attributes/RegionalSpec.js +2 -0
  41. package/dist/cjs/types/attributes/Transmission.d.ts +5 -0
  42. package/dist/cjs/types/attributes/Transmission.js +2 -0
  43. package/dist/cjs/types/attributes/Unit.d.ts +5 -0
  44. package/dist/cjs/types/attributes/Unit.js +2 -0
  45. package/dist/cjs/types/attributes/UsedProductAge.d.ts +7 -0
  46. package/dist/cjs/types/attributes/UsedProductAge.js +2 -0
  47. package/dist/cjs/types/attributes/UsedProductCondition.d.ts +7 -0
  48. package/dist/cjs/types/attributes/UsedProductCondition.js +2 -0
  49. package/dist/cjs/types/attributes/WorkType.d.ts +6 -0
  50. package/dist/cjs/types/attributes/WorkType.js +2 -0
  51. package/dist/cjs/types/common/AccessType.d.ts +5 -0
  52. package/dist/cjs/types/common/AccessType.js +2 -0
  53. package/dist/cjs/types/company/Company.d.ts +1 -0
  54. package/dist/cjs/types/events/EventTemplate.d.ts +14 -0
  55. package/dist/cjs/types/events/EventTemplate.js +14 -0
  56. package/dist/cjs/types/events/EventType.d.ts +10 -0
  57. package/dist/cjs/types/events/EventType.js +11 -0
  58. package/dist/cjs/types/listings/Ad.d.ts +93 -0
  59. package/dist/cjs/types/listings/Ad.js +25 -0
  60. package/dist/cjs/types/listings/AdLocation.d.ts +5 -0
  61. package/dist/cjs/types/listings/AdLocation.js +2 -0
  62. package/dist/cjs/types/listings/AdPromotion.d.ts +12 -0
  63. package/dist/cjs/types/listings/AdPromotion.js +2 -0
  64. package/dist/cjs/types/listings/Motor.d.ts +24 -0
  65. package/dist/cjs/types/listings/Motor.js +17 -0
  66. package/dist/cjs/types/listings/MotorTrim.d.ts +6 -0
  67. package/dist/cjs/types/listings/MotorTrim.js +2 -0
  68. package/dist/cjs/types/listings/Property.d.ts +37 -0
  69. package/dist/cjs/types/listings/Property.js +14 -0
  70. package/dist/cjs/types/listings/PropertySubType.d.ts +6 -0
  71. package/dist/cjs/types/listings/PropertySubType.js +2 -0
  72. package/dist/cjs/types/listings/Service.d.ts +14 -0
  73. package/dist/cjs/types/listings/Service.js +9 -0
  74. package/dist/cjs/types/listings/UsedProduct.d.ts +8 -0
  75. package/dist/cjs/types/listings/UsedProduct.js +7 -0
  76. package/dist/cjs/types/listings/index.d.ts +5 -0
  77. package/dist/cjs/types/listings/index.js +21 -0
  78. package/dist/cjs/validation/ad/save-ad.d.ts +45 -0
  79. package/dist/cjs/validation/ad/save-ad.js +55 -0
  80. package/dist/esm/constants/company/Company.js +9 -0
  81. package/dist/esm/constants/company/index.js +1 -0
  82. package/dist/esm/constants/index.js +1 -0
  83. package/dist/esm/dto/events/Event.js +1 -0
  84. package/dist/esm/dto/events/EventTemplate.dto.js +8 -0
  85. package/dist/esm/dto/events/EventTemplate.js +11 -0
  86. package/dist/esm/dto/events/EventType.dto.js +7 -0
  87. package/dist/esm/dto/events/EventType.js +1 -0
  88. package/dist/esm/dto/events/EventWedding.js +6 -0
  89. package/dist/esm/dto/events/common.js +5 -0
  90. package/dist/esm/types/attributes/CarBody.js +1 -0
  91. package/dist/esm/types/attributes/Facility.js +1 -0
  92. package/dist/esm/types/attributes/Feature.js +1 -0
  93. package/dist/esm/types/attributes/FuelType.js +1 -0
  94. package/dist/esm/types/attributes/LicenseType.js +1 -0
  95. package/dist/esm/types/attributes/OfferType.js +1 -0
  96. package/dist/esm/types/attributes/PriceType.js +1 -0
  97. package/dist/esm/types/attributes/PropertyStatus.js +1 -0
  98. package/dist/esm/types/attributes/PublisherType.js +1 -0
  99. package/dist/esm/types/attributes/RegionalSpec.js +1 -0
  100. package/dist/esm/types/attributes/Transmission.js +1 -0
  101. package/dist/esm/types/attributes/Unit.js +1 -0
  102. package/dist/esm/types/attributes/UsedProductAge.js +1 -0
  103. package/dist/esm/types/attributes/UsedProductCondition.js +1 -0
  104. package/dist/esm/types/attributes/WorkType.js +1 -0
  105. package/dist/esm/types/common/AccessType.js +1 -0
  106. package/dist/esm/types/events/EventTemplate.js +11 -0
  107. package/dist/esm/types/events/EventType.js +8 -0
  108. package/dist/esm/types/listings/Ad.js +22 -0
  109. package/dist/esm/types/listings/AdLocation.js +1 -0
  110. package/dist/esm/types/listings/AdPromotion.js +1 -0
  111. package/dist/esm/types/listings/Motor.js +14 -0
  112. package/dist/esm/types/listings/MotorTrim.js +1 -0
  113. package/dist/esm/types/listings/Property.js +11 -0
  114. package/dist/esm/types/listings/PropertySubType.js +1 -0
  115. package/dist/esm/types/listings/Service.js +6 -0
  116. package/dist/esm/types/listings/UsedProduct.js +4 -0
  117. package/dist/esm/types/listings/index.js +5 -0
  118. package/dist/esm/validation/ad/save-ad.js +52 -0
  119. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ export declare const COMPANY_STATUS: {
2
+ PENDING: string;
3
+ APPROVED: string;
4
+ REJECTED: string;
5
+ };
6
+ export declare const CompanyStatusOptions: {
7
+ value: string;
8
+ label: string;
9
+ }[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyStatusOptions = exports.COMPANY_STATUS = void 0;
4
+ exports.COMPANY_STATUS = {
5
+ PENDING: 'pending',
6
+ APPROVED: 'approved',
7
+ REJECTED: 'rejected',
8
+ };
9
+ exports.CompanyStatusOptions = Object.values(exports.COMPANY_STATUS).map((status) => ({
10
+ value: status,
11
+ label: status.charAt(0).toUpperCase() + status.slice(1),
12
+ }));
@@ -0,0 +1 @@
1
+ export * from './Company';
@@ -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("./Company"), exports);
@@ -1,6 +1,7 @@
1
1
  export * as Subject from "./common/Subject";
2
2
  export * as COMMON from "./common";
3
3
  export * as AD from "./ad";
4
+ export * as COMPANY from "./company";
4
5
  export * as EVENTS from "./events";
5
6
  export * as MOTOR from "./motor";
6
7
  export * as PROPERTY from "./property";
@@ -33,10 +33,11 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.USED_PRODUCT = exports.SERVICE = exports.ROUTES = exports.PROPERTY = exports.MOTOR = exports.EVENTS = exports.AD = exports.COMMON = exports.Subject = void 0;
36
+ exports.USED_PRODUCT = exports.SERVICE = exports.ROUTES = exports.PROPERTY = exports.MOTOR = exports.EVENTS = exports.COMPANY = exports.AD = exports.COMMON = exports.Subject = void 0;
37
37
  exports.Subject = __importStar(require("./common/Subject"));
38
38
  exports.COMMON = __importStar(require("./common"));
39
39
  exports.AD = __importStar(require("./ad"));
40
+ exports.COMPANY = __importStar(require("./company"));
40
41
  exports.EVENTS = __importStar(require("./events"));
41
42
  exports.MOTOR = __importStar(require("./motor"));
42
43
  exports.PROPERTY = __importStar(require("./property"));
@@ -0,0 +1,2 @@
1
+ export type { IEvent } from './Event.dto';
2
+ export { emptyEvent } from './Event.dto';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyEvent = void 0;
4
+ var Event_dto_1 = require("./Event.dto");
5
+ Object.defineProperty(exports, "emptyEvent", { enumerable: true, get: function () { return Event_dto_1.emptyEvent; } });
@@ -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,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,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,2 @@
1
+ export type { IEventType } from './EventType.dto';
2
+ export { emptyEventType } from './EventType.dto';
@@ -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,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyEventType = void 0;
4
+ var EventType_dto_1 = require("./EventType.dto");
5
+ Object.defineProperty(exports, "emptyEventType", { enumerable: true, get: function () { return EventType_dto_1.emptyEventType; } });
@@ -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,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyEventWedding = void 0;
4
+ exports.emptyEventWedding = {
5
+ id: 0,
6
+ event_id: 0,
7
+ event_template_id: 0,
8
+ cover: null,
9
+ };
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const localizedNameSchema: z.ZodObject<{
3
+ en: z.ZodString;
4
+ ar: z.ZodString;
5
+ }, z.core.$strip>;
@@ -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,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type ICarBody = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IFacility = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ type?: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ import { SubjectTableEnum } from "../common/Subject";
3
+ export type IFeature = {
4
+ id?: number;
5
+ name: LocalizedName;
6
+ type?: SubjectTableEnum;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IFuelType = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type ILicenseType = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IOfferType = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IPriceType = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ display_order?: number;
6
+ offer_type_id?: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IPropertyStatus = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IPublisherType = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IRegionalSpec = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type ITransmission = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type IUnit = {
2
+ id?: number;
3
+ name: string;
4
+ should_validate: boolean;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { SubjectTable } from "../common/Subject";
2
+ export type IUsedProductAge = {
3
+ id?: number;
4
+ name: string;
5
+ description?: string;
6
+ subject_type?: SubjectTable;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { SubjectTable } from "../common/Subject";
2
+ export type IUsedProductCondition = {
3
+ id?: number;
4
+ name: string;
5
+ description?: string;
6
+ subject_type?: SubjectTable;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { ICategoryWorkType } from "./CategoryWorkType";
2
+ export type IWorkType = {
3
+ id?: number;
4
+ name: string;
5
+ categoryWorkTypes?: ICategoryWorkType[];
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type IAccessType = {
2
+ id?: string;
3
+ name: string;
4
+ description: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,4 +6,5 @@ export type ICompany = {
6
6
  user_id?: number | null;
7
7
  user?: IUser | null;
8
8
  venues?: IEventVenue[];
9
+ status: string;
9
10
  };
@@ -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,93 @@
1
+ import { IMedia } from "../media/Media";
2
+ import { IUser } from "../user/User";
3
+ import { IAdLocations } from "./AdLocation";
4
+ import { IAdPromotion } from "./AdPromotion";
5
+ import { IMotor } from "./Motor";
6
+ import { IProperty } from "./Property";
7
+ import { IService } from "./Service";
8
+ import { IUsedProduct } from "./UsedProduct";
9
+ import { SubjectTable } from "../common/Subject";
10
+ export type IAd = {
11
+ id?: number;
12
+ user_id?: number;
13
+ status_id?: number;
14
+ title?: string;
15
+ description?: string;
16
+ category_id?: number;
17
+ price?: number;
18
+ base_price?: number;
19
+ currency_id?: number;
20
+ negotiable?: boolean;
21
+ views?: number;
22
+ city_id?: number;
23
+ latitude: number;
24
+ longitude: number;
25
+ baseAdminBoundaryId: number;
26
+ adLocations?: IAdLocations;
27
+ subject_id?: number;
28
+ contact_methods: {
29
+ by_message?: boolean;
30
+ by_whatsapp?: boolean;
31
+ by_call?: boolean;
32
+ } | null;
33
+ selected_phone: string | null;
34
+ user?: IUser;
35
+ media: IMedia[];
36
+ subject_type?: SubjectTable;
37
+ promotions?: IAdPromotion[];
38
+ property?: IProperty;
39
+ motor?: IMotor;
40
+ service?: IService;
41
+ product?: IUsedProduct;
42
+ created_at?: string;
43
+ updated_at?: string;
44
+ };
45
+ export type SaveAdDto = Partial<Omit<IAd, "created_at" | "updated_at" | "views" | "user" | "promotions">> & {
46
+ id?: number;
47
+ latitude?: number;
48
+ longitude?: number;
49
+ baseAdminBoundaryId?: number;
50
+ adLocations?: IAdLocations;
51
+ };
52
+ export type GetAdsFilterDto = {
53
+ ids?: number[];
54
+ city_id?: number;
55
+ district_ids?: number[];
56
+ boundary_ids?: number[];
57
+ category_id?: number;
58
+ user_id?: number;
59
+ subject_type?: SubjectTable;
60
+ search?: string;
61
+ status?: string;
62
+ page?: number;
63
+ limit?: number;
64
+ currency_id?: number;
65
+ min_price?: number;
66
+ max_price?: number;
67
+ parent_category_id?: number;
68
+ property?: {
69
+ property_type_id?: number;
70
+ offer_type_id?: number;
71
+ bedrooms?: number[];
72
+ bathrooms?: number[];
73
+ };
74
+ service?: {
75
+ access_type_id?: number;
76
+ district_ids?: number[];
77
+ };
78
+ product?: {
79
+ condition_id?: number;
80
+ age_id?: number;
81
+ };
82
+ motor?: {
83
+ transmission_ids?: number[];
84
+ fuel_type_ids?: number[];
85
+ offer_type_ids?: number[];
86
+ color_ids?: number[];
87
+ min_year?: number;
88
+ max_year?: number;
89
+ min_mileage?: number;
90
+ max_mileage?: number;
91
+ };
92
+ };
93
+ 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 UsedProduct_1 = require("./UsedProduct");
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: UsedProduct_1.emptyUsedProduct,
25
+ };
@@ -0,0 +1,5 @@
1
+ export type IAdLocation = {
2
+ ad_id?: number;
3
+ admin_boundary_id: number;
4
+ };
5
+ export type IAdLocations = IAdLocation[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export type PromotionKind = "highlight" | "featured" | "top";
2
+ export type IAdPromotion = {
3
+ id?: number;
4
+ ad_id: number;
5
+ active: boolean;
6
+ promotion_type: PromotionKind;
7
+ promoted_from: string;
8
+ promoted_until: string;
9
+ amount_paid?: number | null;
10
+ created_at?: string;
11
+ updated_at?: string;
12
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });