@deallony/shared 1.2.8 → 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 (109) hide show
  1. package/dist/cjs/dto/events/Event.d.ts +2 -0
  2. package/dist/cjs/dto/events/Event.js +5 -0
  3. package/dist/cjs/dto/events/EventTemplate.d.ts +14 -0
  4. package/dist/cjs/dto/events/EventTemplate.dto.d.ts +18 -0
  5. package/dist/cjs/dto/events/EventTemplate.dto.js +11 -0
  6. package/dist/cjs/dto/events/EventTemplate.js +14 -0
  7. package/dist/cjs/dto/events/EventType.d.ts +2 -0
  8. package/dist/cjs/dto/events/EventType.dto.d.ts +16 -0
  9. package/dist/cjs/dto/events/EventType.dto.js +10 -0
  10. package/dist/cjs/dto/events/EventType.js +5 -0
  11. package/dist/cjs/dto/events/EventWedding.d.ts +11 -0
  12. package/dist/cjs/dto/events/EventWedding.js +9 -0
  13. package/dist/cjs/dto/events/common.d.ts +5 -0
  14. package/dist/cjs/dto/events/common.js +8 -0
  15. package/dist/cjs/types/attributes/CarBody.d.ts +5 -0
  16. package/dist/cjs/types/attributes/CarBody.js +2 -0
  17. package/dist/cjs/types/attributes/Facility.d.ts +6 -0
  18. package/dist/cjs/types/attributes/Facility.js +2 -0
  19. package/dist/cjs/types/attributes/Feature.d.ts +7 -0
  20. package/dist/cjs/types/attributes/Feature.js +2 -0
  21. package/dist/cjs/types/attributes/FuelType.d.ts +5 -0
  22. package/dist/cjs/types/attributes/FuelType.js +2 -0
  23. package/dist/cjs/types/attributes/LicenseType.d.ts +5 -0
  24. package/dist/cjs/types/attributes/LicenseType.js +2 -0
  25. package/dist/cjs/types/attributes/OfferType.d.ts +5 -0
  26. package/dist/cjs/types/attributes/OfferType.js +2 -0
  27. package/dist/cjs/types/attributes/PriceType.d.ts +7 -0
  28. package/dist/cjs/types/attributes/PriceType.js +2 -0
  29. package/dist/cjs/types/attributes/PropertyStatus.d.ts +5 -0
  30. package/dist/cjs/types/attributes/PropertyStatus.js +2 -0
  31. package/dist/cjs/types/attributes/PublisherType.d.ts +5 -0
  32. package/dist/cjs/types/attributes/PublisherType.js +2 -0
  33. package/dist/cjs/types/attributes/RegionalSpec.d.ts +5 -0
  34. package/dist/cjs/types/attributes/RegionalSpec.js +2 -0
  35. package/dist/cjs/types/attributes/Transmission.d.ts +5 -0
  36. package/dist/cjs/types/attributes/Transmission.js +2 -0
  37. package/dist/cjs/types/attributes/Unit.d.ts +5 -0
  38. package/dist/cjs/types/attributes/Unit.js +2 -0
  39. package/dist/cjs/types/attributes/UsedProductAge.d.ts +7 -0
  40. package/dist/cjs/types/attributes/UsedProductAge.js +2 -0
  41. package/dist/cjs/types/attributes/UsedProductCondition.d.ts +7 -0
  42. package/dist/cjs/types/attributes/UsedProductCondition.js +2 -0
  43. package/dist/cjs/types/attributes/WorkType.d.ts +6 -0
  44. package/dist/cjs/types/attributes/WorkType.js +2 -0
  45. package/dist/cjs/types/common/AccessType.d.ts +5 -0
  46. package/dist/cjs/types/common/AccessType.js +2 -0
  47. package/dist/cjs/types/events/EventTemplate.d.ts +14 -0
  48. package/dist/cjs/types/events/EventTemplate.js +14 -0
  49. package/dist/cjs/types/events/EventType.d.ts +10 -0
  50. package/dist/cjs/types/events/EventType.js +11 -0
  51. package/dist/cjs/types/listings/Ad.d.ts +93 -0
  52. package/dist/cjs/types/listings/Ad.js +25 -0
  53. package/dist/cjs/types/listings/AdLocation.d.ts +5 -0
  54. package/dist/cjs/types/listings/AdLocation.js +2 -0
  55. package/dist/cjs/types/listings/AdPromotion.d.ts +12 -0
  56. package/dist/cjs/types/listings/AdPromotion.js +2 -0
  57. package/dist/cjs/types/listings/Motor.d.ts +24 -0
  58. package/dist/cjs/types/listings/Motor.js +17 -0
  59. package/dist/cjs/types/listings/MotorTrim.d.ts +6 -0
  60. package/dist/cjs/types/listings/MotorTrim.js +2 -0
  61. package/dist/cjs/types/listings/Property.d.ts +37 -0
  62. package/dist/cjs/types/listings/Property.js +14 -0
  63. package/dist/cjs/types/listings/PropertySubType.d.ts +6 -0
  64. package/dist/cjs/types/listings/PropertySubType.js +2 -0
  65. package/dist/cjs/types/listings/Service.d.ts +14 -0
  66. package/dist/cjs/types/listings/Service.js +9 -0
  67. package/dist/cjs/types/listings/UsedProduct.d.ts +8 -0
  68. package/dist/cjs/types/listings/UsedProduct.js +7 -0
  69. package/dist/cjs/types/listings/index.d.ts +5 -0
  70. package/dist/cjs/types/listings/index.js +21 -0
  71. package/dist/cjs/validation/ad/save-ad.d.ts +45 -0
  72. package/dist/cjs/validation/ad/save-ad.js +55 -0
  73. package/dist/esm/dto/events/Event.js +1 -0
  74. package/dist/esm/dto/events/EventTemplate.dto.js +8 -0
  75. package/dist/esm/dto/events/EventTemplate.js +11 -0
  76. package/dist/esm/dto/events/EventType.dto.js +7 -0
  77. package/dist/esm/dto/events/EventType.js +1 -0
  78. package/dist/esm/dto/events/EventWedding.js +6 -0
  79. package/dist/esm/dto/events/common.js +5 -0
  80. package/dist/esm/types/attributes/CarBody.js +1 -0
  81. package/dist/esm/types/attributes/Facility.js +1 -0
  82. package/dist/esm/types/attributes/Feature.js +1 -0
  83. package/dist/esm/types/attributes/FuelType.js +1 -0
  84. package/dist/esm/types/attributes/LicenseType.js +1 -0
  85. package/dist/esm/types/attributes/OfferType.js +1 -0
  86. package/dist/esm/types/attributes/PriceType.js +1 -0
  87. package/dist/esm/types/attributes/PropertyStatus.js +1 -0
  88. package/dist/esm/types/attributes/PublisherType.js +1 -0
  89. package/dist/esm/types/attributes/RegionalSpec.js +1 -0
  90. package/dist/esm/types/attributes/Transmission.js +1 -0
  91. package/dist/esm/types/attributes/Unit.js +1 -0
  92. package/dist/esm/types/attributes/UsedProductAge.js +1 -0
  93. package/dist/esm/types/attributes/UsedProductCondition.js +1 -0
  94. package/dist/esm/types/attributes/WorkType.js +1 -0
  95. package/dist/esm/types/common/AccessType.js +1 -0
  96. package/dist/esm/types/events/EventTemplate.js +11 -0
  97. package/dist/esm/types/events/EventType.js +8 -0
  98. package/dist/esm/types/listings/Ad.js +22 -0
  99. package/dist/esm/types/listings/AdLocation.js +1 -0
  100. package/dist/esm/types/listings/AdPromotion.js +1 -0
  101. package/dist/esm/types/listings/Motor.js +14 -0
  102. package/dist/esm/types/listings/MotorTrim.js +1 -0
  103. package/dist/esm/types/listings/Property.js +11 -0
  104. package/dist/esm/types/listings/PropertySubType.js +1 -0
  105. package/dist/esm/types/listings/Service.js +6 -0
  106. package/dist/esm/types/listings/UsedProduct.js +4 -0
  107. package/dist/esm/types/listings/index.js +5 -0
  108. package/dist/esm/validation/ad/save-ad.js +52 -0
  109. package/package.json +1 -1
@@ -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 });
@@ -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 });
@@ -0,0 +1,24 @@
1
+ import { SubjectTableEnum } from "../common/Subject";
2
+ export type MotorDoors = number | null;
3
+ export type IMotor = {
4
+ id: number;
5
+ componentType?: SubjectTableEnum.MOTORS;
6
+ trim_id?: number | null;
7
+ body_type_id: number;
8
+ regional_spec_id: number;
9
+ transmission_id: number;
10
+ fuel_type_id: number;
11
+ interior_color_id: number | null;
12
+ exterior_color_id?: number | null;
13
+ mileage: number;
14
+ offer_type_id: number;
15
+ year: number | null;
16
+ doors?: MotorDoors;
17
+ horsepower?: number | null;
18
+ created_at: string;
19
+ updated_at: string;
20
+ publisher_type_id?: number;
21
+ price_type_id?: number;
22
+ seats_count: number | null;
23
+ };
24
+ 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,6 @@
1
+ import { LocalizedName } from "../common/LocalizedName";
2
+ export type IMotorTrim = {
3
+ id?: number;
4
+ name: LocalizedName;
5
+ category_id: number;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,37 @@
1
+ import { SubjectTableEnum } from "../common/Subject";
2
+ export type PropertyBathrooms = "0" | "1" | "2" | "3" | "4" | "5" | "6";
3
+ export type PropertyFurnished = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "+10";
4
+ export type IPropertyFacility = {
5
+ distance_in_meters: number;
6
+ facility_id: number;
7
+ };
8
+ export type IPropertyFeature = {
9
+ id: number;
10
+ properties_id: number;
11
+ feature_id: number;
12
+ };
13
+ export type IProperty = {
14
+ id: number;
15
+ componentType?: SubjectTableEnum.PROPERTIES;
16
+ offer_type_id: number;
17
+ price_type_id: number;
18
+ size_m2: number;
19
+ bedrooms: number;
20
+ district_id?: number;
21
+ created_at: string;
22
+ updated_at: string;
23
+ property_facilities: IPropertyFacility[];
24
+ property_features?: IPropertyFeature[];
25
+ feature_ids: number[];
26
+ property_status_id?: number;
27
+ license_type_id?: number;
28
+ floor?: number;
29
+ total_floors?: number;
30
+ age_id?: number;
31
+ bathrooms?: number;
32
+ condition_id?: number;
33
+ publisher_type_id?: number;
34
+ furnished?: boolean;
35
+ parking?: boolean;
36
+ };
37
+ export declare const emptyProperty: IProperty;