@deallony/shared 1.0.59 → 1.0.61
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/types/AdType.d.ts +44 -1
- package/dist/types/SubjectType.d.ts +1 -0
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +5 -5
- package/dist/types/product/ProductCategoryType.d.ts +15 -15
- package/dist/types/product/ProductCategoryType.js +1 -1
- package/dist/types/product/UsedProductAge.d.ts +7 -7
- package/dist/types/product/UsedProductAge.js +1 -1
- package/dist/types/product/UsedProductCondation.d.ts +7 -7
- package/dist/types/product/UsedProductCondation.js +1 -1
- package/dist/types/product/UsedProductType.d.ts +6 -6
- package/dist/types/product/UsedProductType.js +2 -2
- package/dist/validation/ad/save-ad.d.ts +2 -45
- package/package.json +3 -2
- package/dist/types/AdminBoundary.d.ts +0 -17
- package/dist/types/AdminBoundary.js +0 -1
package/dist/types/AdType.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { MotorType } from "./MotorType";
|
|
|
4
4
|
import { UsedProductType } from "./UsedProductType";
|
|
5
5
|
import { PropertyType } from "./PropertyType";
|
|
6
6
|
import { ServiceType } from "./ServiceType";
|
|
7
|
-
import { SubjectTableType } from "./SubjectType";
|
|
7
|
+
import { SubjectTableType, SubjectType } from "./SubjectType";
|
|
8
8
|
import { IUser } from "./UserType";
|
|
9
9
|
export type IAd = {
|
|
10
10
|
id?: number;
|
|
@@ -40,3 +40,46 @@ export type IAd = {
|
|
|
40
40
|
created_at?: string;
|
|
41
41
|
updated_at?: string;
|
|
42
42
|
};
|
|
43
|
+
export type GetAdsFilterDto = {
|
|
44
|
+
ids?: number[];
|
|
45
|
+
city_id?: number;
|
|
46
|
+
district_ids?: number[];
|
|
47
|
+
boundary_ids?: number[];
|
|
48
|
+
category_id?: number;
|
|
49
|
+
user_id?: number;
|
|
50
|
+
subject_type?: SubjectType;
|
|
51
|
+
search?: string;
|
|
52
|
+
status?: string;
|
|
53
|
+
page?: number;
|
|
54
|
+
limit?: number;
|
|
55
|
+
currency_id?: number;
|
|
56
|
+
min_price?: number;
|
|
57
|
+
max_price?: number;
|
|
58
|
+
parent_category_id?: number;
|
|
59
|
+
property?: {
|
|
60
|
+
property_type_id?: number;
|
|
61
|
+
offer_type_id?: number;
|
|
62
|
+
bedrooms?: number[];
|
|
63
|
+
bathrooms?: number[];
|
|
64
|
+
};
|
|
65
|
+
service?: {
|
|
66
|
+
access_type_id?: number;
|
|
67
|
+
district_ids?: number[];
|
|
68
|
+
};
|
|
69
|
+
product?: {
|
|
70
|
+
condition_id?: number;
|
|
71
|
+
age_id?: number;
|
|
72
|
+
};
|
|
73
|
+
motor?: {
|
|
74
|
+
transmission_ids?: number[];
|
|
75
|
+
fuel_type_ids?: number[];
|
|
76
|
+
offer_type_ids?: number[];
|
|
77
|
+
color_ids?: number[];
|
|
78
|
+
min_year?: number;
|
|
79
|
+
max_year?: number;
|
|
80
|
+
min_mileage?: number;
|
|
81
|
+
max_mileage?: number;
|
|
82
|
+
};
|
|
83
|
+
sort_by?: 'price' | 'created_at' | 'views';
|
|
84
|
+
sort_order?: 'ASC' | 'DESC';
|
|
85
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * as Ad from './AdType';
|
|
2
|
-
export * as AdminBoundary from './AdminBoundaryType';
|
|
3
|
-
export * as Media from './MediaType';
|
|
4
|
-
export * from './PropertyTypeType';
|
|
5
|
-
export * as Google from './GoogleType';
|
|
1
|
+
export * as Ad from './AdType';
|
|
2
|
+
export * as AdminBoundary from './AdminBoundaryType';
|
|
3
|
+
export * as Media from './MediaType';
|
|
4
|
+
export * from './PropertyTypeType';
|
|
5
|
+
export * as Google from './GoogleType';
|
package/dist/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * as Ad from './AdType';
|
|
2
|
-
export * as AdminBoundary from './AdminBoundaryType';
|
|
3
|
-
export * as Media from './MediaType';
|
|
4
|
-
export * from './PropertyTypeType';
|
|
5
|
-
export * as Google from './GoogleType';
|
|
1
|
+
export * as Ad from './AdType';
|
|
2
|
+
export * as AdminBoundary from './AdminBoundaryType';
|
|
3
|
+
export * as Media from './MediaType';
|
|
4
|
+
export * from './PropertyTypeType';
|
|
5
|
+
export * as Google from './GoogleType';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { MediaType } from "../MediaType";
|
|
2
|
-
export type ProductCategoryType = {
|
|
3
|
-
id?: number;
|
|
4
|
-
parent_id: number | null;
|
|
5
|
-
name: string;
|
|
6
|
-
media?: MediaType;
|
|
7
|
-
created_at: string;
|
|
8
|
-
updated_at: string;
|
|
9
|
-
parent?: ProductCategoryType;
|
|
10
|
-
isBranch?: boolean;
|
|
11
|
-
children?: ProductCategoryType[];
|
|
12
|
-
savedBy?: {
|
|
13
|
-
id: number;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
1
|
+
import { MediaType } from "../MediaType";
|
|
2
|
+
export type ProductCategoryType = {
|
|
3
|
+
id?: number;
|
|
4
|
+
parent_id: number | null;
|
|
5
|
+
name: string;
|
|
6
|
+
media?: MediaType;
|
|
7
|
+
created_at: string;
|
|
8
|
+
updated_at: string;
|
|
9
|
+
parent?: ProductCategoryType;
|
|
10
|
+
isBranch?: boolean;
|
|
11
|
+
children?: ProductCategoryType[];
|
|
12
|
+
savedBy?: {
|
|
13
|
+
id: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SubjectTableType } from "../SubjectType";
|
|
2
|
-
export type UsedProductAgeType = {
|
|
3
|
-
id?: number;
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
subject_type?: SubjectTableType;
|
|
7
|
-
};
|
|
1
|
+
import { SubjectTableType } from "../SubjectType";
|
|
2
|
+
export type UsedProductAgeType = {
|
|
3
|
+
id?: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
subject_type?: SubjectTableType;
|
|
7
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SubjectTableType } from "../SubjectType";
|
|
2
|
-
export type UsedProductConditionType = {
|
|
3
|
-
id?: number;
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
subject_type?: SubjectTableType;
|
|
7
|
-
};
|
|
1
|
+
import { SubjectTableType } from "../SubjectType";
|
|
2
|
+
export type UsedProductConditionType = {
|
|
3
|
+
id?: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
subject_type?: SubjectTableType;
|
|
7
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type UsedProductType = {
|
|
2
|
-
id?: number;
|
|
3
|
-
condition_id: number;
|
|
4
|
-
age_id?: number;
|
|
5
|
-
isFree?: boolean;
|
|
6
|
-
};
|
|
1
|
+
export type UsedProductType = {
|
|
2
|
+
id?: number;
|
|
3
|
+
condition_id: number;
|
|
4
|
+
age_id?: number;
|
|
5
|
+
isFree?: boolean;
|
|
6
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
// import { IMedia } from "../MediaType";
|
|
2
|
-
export {};
|
|
1
|
+
// import { IMedia } from "../MediaType";
|
|
2
|
+
export {};
|
|
@@ -1,45 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
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
|
+
export declare const createAdSchema: any;
|
|
2
|
+
export declare const updateAdSchema: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deallony/shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.61",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"login": "npm login",
|
|
12
12
|
"deploy": "node scripts/publish.js",
|
|
13
|
+
"all:update": "npm run deploy && npm run mobile:update",
|
|
13
14
|
"=========": "============= UPDATE APPS LIBRARY =============",
|
|
14
|
-
"mobile:update": "cd ../
|
|
15
|
+
"mobile:update": "cd ../app && npm install @deallony/shared@latest",
|
|
15
16
|
"========": "============ DEFAULT ============",
|
|
16
17
|
"build": "tsc",
|
|
17
18
|
"watch": "tsc --watch",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export type AdminBoundary = {
|
|
2
|
-
id: number;
|
|
3
|
-
parentId?: number | null;
|
|
4
|
-
active?: boolean;
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
osmId?: number | null;
|
|
7
|
-
adminLevel?: number | null;
|
|
8
|
-
path?: string | null;
|
|
9
|
-
normalizedLevel?: number | null;
|
|
10
|
-
name?: string | null;
|
|
11
|
-
nameEn?: string | null;
|
|
12
|
-
boundary?: string | null;
|
|
13
|
-
adminCentreNodeId?: number | null;
|
|
14
|
-
adminCentreNodeLat?: number | null;
|
|
15
|
-
adminCentreNodeLng?: number | null;
|
|
16
|
-
geometry?: any | null;
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|