@deallony/shared 1.2.2 → 1.2.4
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.
- package/dist/cjs/constants/common/Role.d.ts +9 -0
- package/dist/cjs/constants/common/Role.js +14 -0
- package/dist/cjs/constants/common/index.d.ts +1 -0
- package/dist/cjs/constants/common/index.js +1 -0
- package/dist/cjs/dto/events/EventRsvp.dto.d.ts +6 -0
- package/dist/cjs/dto/events/index.d.ts +1 -0
- package/dist/cjs/dto/events/index.js +1 -0
- package/dist/cjs/schema/events/EventRsvp.schema.d.ts +71 -0
- package/dist/cjs/schema/events/EventRsvp.schema.js +29 -0
- package/dist/cjs/schema/events/index.d.ts +1 -0
- package/dist/cjs/schema/events/index.js +1 -0
- package/dist/cjs/types/events/Event.d.ts +2 -0
- package/dist/cjs/types/events/EventRsvp.d.ts +15 -0
- package/dist/cjs/types/events/index.d.ts +1 -0
- package/dist/cjs/types/events/index.js +1 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.js +3 -2
- package/dist/esm/constants/common/Role.js +11 -0
- package/dist/esm/constants/common/index.js +1 -0
- package/dist/esm/dto/events/index.js +1 -0
- package/dist/esm/schema/events/EventRsvp.schema.js +26 -0
- package/dist/esm/schema/events/index.js +1 -0
- package/dist/esm/types/events/index.js +1 -0
- package/dist/esm/types/index.js +1 -0
- package/package.json +1 -1
- package/dist/cjs/dto/events/Event.d.ts +0 -2
- package/dist/cjs/dto/events/Event.js +0 -5
- package/dist/cjs/dto/events/EventTemplate.d.ts +0 -14
- package/dist/cjs/dto/events/EventTemplate.dto.d.ts +0 -18
- package/dist/cjs/dto/events/EventTemplate.dto.js +0 -11
- package/dist/cjs/dto/events/EventTemplate.js +0 -14
- package/dist/cjs/dto/events/EventType.d.ts +0 -2
- package/dist/cjs/dto/events/EventType.dto.d.ts +0 -16
- package/dist/cjs/dto/events/EventType.dto.js +0 -10
- package/dist/cjs/dto/events/EventType.js +0 -5
- package/dist/cjs/dto/events/EventWedding.d.ts +0 -11
- package/dist/cjs/dto/events/EventWedding.js +0 -9
- package/dist/cjs/dto/events/common.d.ts +0 -5
- package/dist/cjs/dto/events/common.js +0 -8
- package/dist/cjs/types/attributes/CarBody.d.ts +0 -5
- package/dist/cjs/types/attributes/Facility.d.ts +0 -6
- package/dist/cjs/types/attributes/Feature.d.ts +0 -7
- package/dist/cjs/types/attributes/Feature.js +0 -2
- package/dist/cjs/types/attributes/FuelType.d.ts +0 -5
- package/dist/cjs/types/attributes/FuelType.js +0 -2
- package/dist/cjs/types/attributes/LicenseType.d.ts +0 -5
- package/dist/cjs/types/attributes/LicenseType.js +0 -2
- package/dist/cjs/types/attributes/OfferType.d.ts +0 -5
- package/dist/cjs/types/attributes/OfferType.js +0 -2
- package/dist/cjs/types/attributes/PriceType.d.ts +0 -7
- package/dist/cjs/types/attributes/PriceType.js +0 -2
- package/dist/cjs/types/attributes/PropertyStatus.d.ts +0 -5
- package/dist/cjs/types/attributes/PropertyStatus.js +0 -2
- package/dist/cjs/types/attributes/PublisherType.d.ts +0 -5
- package/dist/cjs/types/attributes/PublisherType.js +0 -2
- package/dist/cjs/types/attributes/RegionalSpec.d.ts +0 -5
- package/dist/cjs/types/attributes/RegionalSpec.js +0 -2
- package/dist/cjs/types/attributes/Transmission.d.ts +0 -5
- package/dist/cjs/types/attributes/Transmission.js +0 -2
- package/dist/cjs/types/attributes/Unit.d.ts +0 -5
- package/dist/cjs/types/attributes/Unit.js +0 -2
- package/dist/cjs/types/attributes/UsedProductAge.d.ts +0 -7
- package/dist/cjs/types/attributes/UsedProductAge.js +0 -2
- package/dist/cjs/types/attributes/UsedProductCondition.d.ts +0 -7
- package/dist/cjs/types/attributes/UsedProductCondition.js +0 -2
- package/dist/cjs/types/attributes/WorkType.d.ts +0 -6
- package/dist/cjs/types/attributes/WorkType.js +0 -2
- package/dist/cjs/types/common/AccessType.d.ts +0 -5
- package/dist/cjs/types/common/AccessType.js +0 -2
- package/dist/cjs/types/events/EventTemplate.d.ts +0 -14
- package/dist/cjs/types/events/EventTemplate.js +0 -14
- package/dist/cjs/types/events/EventType.d.ts +0 -10
- package/dist/cjs/types/events/EventType.js +0 -11
- package/dist/cjs/types/listings/Ad.d.ts +0 -93
- package/dist/cjs/types/listings/Ad.js +0 -25
- package/dist/cjs/types/listings/AdLocation.d.ts +0 -5
- package/dist/cjs/types/listings/AdLocation.js +0 -2
- package/dist/cjs/types/listings/AdPromotion.d.ts +0 -12
- package/dist/cjs/types/listings/AdPromotion.js +0 -2
- package/dist/cjs/types/listings/Motor.d.ts +0 -24
- package/dist/cjs/types/listings/Motor.js +0 -17
- package/dist/cjs/types/listings/MotorTrim.d.ts +0 -6
- package/dist/cjs/types/listings/MotorTrim.js +0 -2
- package/dist/cjs/types/listings/Property.d.ts +0 -37
- package/dist/cjs/types/listings/Property.js +0 -14
- package/dist/cjs/types/listings/PropertySubType.d.ts +0 -6
- package/dist/cjs/types/listings/PropertySubType.js +0 -2
- package/dist/cjs/types/listings/Service.d.ts +0 -14
- package/dist/cjs/types/listings/Service.js +0 -9
- package/dist/cjs/types/listings/UsedProduct.d.ts +0 -8
- package/dist/cjs/types/listings/UsedProduct.js +0 -7
- package/dist/cjs/types/listings/index.d.ts +0 -5
- package/dist/cjs/types/listings/index.js +0 -21
- package/dist/cjs/validation/ad/save-ad.d.ts +0 -45
- package/dist/cjs/validation/ad/save-ad.js +0 -55
- package/dist/esm/dto/events/Event.js +0 -1
- package/dist/esm/dto/events/EventTemplate.dto.js +0 -8
- package/dist/esm/dto/events/EventTemplate.js +0 -11
- package/dist/esm/dto/events/EventType.dto.js +0 -7
- package/dist/esm/dto/events/EventType.js +0 -1
- package/dist/esm/dto/events/EventWedding.js +0 -6
- package/dist/esm/dto/events/common.js +0 -5
- package/dist/esm/types/attributes/Feature.js +0 -1
- package/dist/esm/types/attributes/FuelType.js +0 -1
- package/dist/esm/types/attributes/LicenseType.js +0 -1
- package/dist/esm/types/attributes/OfferType.js +0 -1
- package/dist/esm/types/attributes/PriceType.js +0 -1
- package/dist/esm/types/attributes/PropertyStatus.js +0 -1
- package/dist/esm/types/attributes/PublisherType.js +0 -1
- package/dist/esm/types/attributes/RegionalSpec.js +0 -1
- package/dist/esm/types/attributes/Transmission.js +0 -1
- package/dist/esm/types/attributes/Unit.js +0 -1
- package/dist/esm/types/attributes/UsedProductAge.js +0 -1
- package/dist/esm/types/attributes/UsedProductCondition.js +0 -1
- package/dist/esm/types/attributes/WorkType.js +0 -1
- package/dist/esm/types/common/AccessType.js +0 -1
- package/dist/esm/types/events/EventTemplate.js +0 -11
- package/dist/esm/types/events/EventType.js +0 -8
- package/dist/esm/types/listings/Ad.js +0 -22
- package/dist/esm/types/listings/AdLocation.js +0 -1
- package/dist/esm/types/listings/AdPromotion.js +0 -1
- package/dist/esm/types/listings/Motor.js +0 -14
- package/dist/esm/types/listings/MotorTrim.js +0 -1
- package/dist/esm/types/listings/Property.js +0 -11
- package/dist/esm/types/listings/PropertySubType.js +0 -1
- package/dist/esm/types/listings/Service.js +0 -6
- package/dist/esm/types/listings/UsedProduct.js +0 -4
- package/dist/esm/types/listings/index.js +0 -5
- package/dist/esm/validation/ad/save-ad.js +0 -52
- /package/dist/cjs/{types/attributes/CarBody.js → dto/events/EventRsvp.dto.js} +0 -0
- /package/dist/cjs/types/{attributes/Facility.js → events/EventRsvp.js} +0 -0
- /package/dist/esm/{types/attributes/CarBody.js → dto/events/EventRsvp.dto.js} +0 -0
- /package/dist/esm/types/{attributes/Facility.js → events/EventRsvp.js} +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
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;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
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;
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type IServiceLocation = {
|
|
2
|
-
id?: number;
|
|
3
|
-
service_id?: number;
|
|
4
|
-
district_id?: number;
|
|
5
|
-
city_id: number;
|
|
6
|
-
};
|
|
7
|
-
export type IService = {
|
|
8
|
-
id?: number;
|
|
9
|
-
unit_id: number | null;
|
|
10
|
-
access_type_id: number | null;
|
|
11
|
-
work_type_id: number | null;
|
|
12
|
-
locations: IServiceLocation[];
|
|
13
|
-
};
|
|
14
|
-
export declare const emptyService: IService;
|
|
@@ -1,21 +0,0 @@
|
|
|
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);
|
|
18
|
-
__exportStar(require("../motor"), exports);
|
|
19
|
-
__exportStar(require("../property"), exports);
|
|
20
|
-
__exportStar(require("../service"), exports);
|
|
21
|
-
__exportStar(require("../used-product"), exports);
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const createAdSchema: z.ZodObject<{
|
|
3
|
-
title: z.ZodOptional<z.ZodString>;
|
|
4
|
-
status_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
5
|
-
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
|
-
category_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
7
|
-
price: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
8
|
-
currency_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
9
|
-
negotiable: z.ZodNullable<z.ZodOptional<z.ZodCoercedBoolean<unknown>>>;
|
|
10
|
-
city_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
11
|
-
latitude: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
12
|
-
longitude: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
13
|
-
media: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodAny>>>;
|
|
14
|
-
base_price: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
15
|
-
contact_methods: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
16
|
-
by_message: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
by_whatsapp: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
by_call: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
}, z.core.$strip>>>;
|
|
20
|
-
selected_phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
-
user_id: z.ZodCoercedNumber<unknown>;
|
|
22
|
-
id: z.ZodOptional<z.ZodNever>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
export declare const updateAdSchema: z.ZodObject<{
|
|
25
|
-
id: z.ZodCoercedNumber<unknown>;
|
|
26
|
-
title: z.ZodOptional<z.ZodString>;
|
|
27
|
-
status_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
28
|
-
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
29
|
-
category_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
30
|
-
price: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
31
|
-
currency_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
32
|
-
negotiable: z.ZodNullable<z.ZodOptional<z.ZodCoercedBoolean<unknown>>>;
|
|
33
|
-
city_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
34
|
-
latitude: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
35
|
-
longitude: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
36
|
-
media: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodAny>>>;
|
|
37
|
-
base_price: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
38
|
-
contact_methods: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
39
|
-
by_message: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
by_whatsapp: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
-
by_call: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
-
}, z.core.$strip>>>;
|
|
43
|
-
selected_phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
44
|
-
user_id: z.ZodCoercedNumber<unknown>;
|
|
45
|
-
}, z.core.$strip>;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAdSchema = exports.createAdSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const baseAdCommon = zod_1.z.object({
|
|
6
|
-
title: zod_1.z.string().trim().optional(),
|
|
7
|
-
status_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
8
|
-
description: zod_1.z.string().trim().optional().nullable(),
|
|
9
|
-
category_id: zod_1.z.coerce.number().int().positive().optional().nullable(),
|
|
10
|
-
price: zod_1.z.coerce.number().min(0).optional().nullable(),
|
|
11
|
-
currency_id: zod_1.z.coerce.number().int().positive().optional().nullable(),
|
|
12
|
-
negotiable: zod_1.z.coerce.boolean().optional().nullable(),
|
|
13
|
-
city_id: zod_1.z.coerce.number().int().positive().optional().nullable(),
|
|
14
|
-
latitude: zod_1.z.coerce.number().optional().nullable(),
|
|
15
|
-
longitude: zod_1.z.coerce.number().optional().nullable(),
|
|
16
|
-
media: zod_1.z.array(zod_1.z.any()).optional().nullable(),
|
|
17
|
-
// subject_type: SubjectTypeSchema.optional(),
|
|
18
|
-
base_price: zod_1.z.coerce.number().optional().nullable(),
|
|
19
|
-
contact_methods: zod_1.z.object({
|
|
20
|
-
by_message: zod_1.z.boolean().optional(),
|
|
21
|
-
by_whatsapp: zod_1.z.boolean().optional(),
|
|
22
|
-
by_call: zod_1.z.boolean().optional(),
|
|
23
|
-
}).optional().nullable(),
|
|
24
|
-
selected_phone: zod_1.z.string().trim().optional().nullable(),
|
|
25
|
-
});
|
|
26
|
-
exports.createAdSchema = zod_1.z.object({
|
|
27
|
-
user_id: zod_1.z.coerce.number().int().positive(),
|
|
28
|
-
id: zod_1.z.never().optional(), // disallow id on create
|
|
29
|
-
...baseAdCommon.shape,
|
|
30
|
-
// motor: createMotorSchema
|
|
31
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
32
|
-
// .optional()
|
|
33
|
-
// .nullable(),
|
|
34
|
-
// // Make nested ad_id optional/nullable without changing original schemas
|
|
35
|
-
// property: createPropertySchema
|
|
36
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
37
|
-
// .optional()
|
|
38
|
-
// .nullable(),
|
|
39
|
-
// product: createUsedProductSchema
|
|
40
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
41
|
-
// .optional()
|
|
42
|
-
// .nullable(),
|
|
43
|
-
// service: createServiceSchema
|
|
44
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
45
|
-
// .optional()
|
|
46
|
-
// .nullable(),
|
|
47
|
-
});
|
|
48
|
-
exports.updateAdSchema = zod_1.z.object({
|
|
49
|
-
...exports.createAdSchema.shape,
|
|
50
|
-
id: zod_1.z.coerce.number().int().positive(),
|
|
51
|
-
// motor: updateMotorSchema.optional().nullable(),
|
|
52
|
-
// property: updatePropertySchema.optional().nullable(),
|
|
53
|
-
// product: updateUsedProductSchema.optional().nullable(),
|
|
54
|
-
// service: updateServiceSchema.optional().nullable(),
|
|
55
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { emptyEvent } from './Event.dto.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
}));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createEmptyLocalizedName } from '../../types/common/LocalizedName.js';
|
|
2
|
-
export const emptyEventTemplate = {
|
|
3
|
-
id: 0,
|
|
4
|
-
code: '',
|
|
5
|
-
name: createEmptyLocalizedName(),
|
|
6
|
-
active: true,
|
|
7
|
-
religion: null,
|
|
8
|
-
event_type_id: 0,
|
|
9
|
-
eventType: undefined,
|
|
10
|
-
weddings: [],
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { emptyEventType } from './EventType.dto.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|