@deallony/shared 1.1.77 → 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.
- package/dist/cjs/constants/ad/Ad.d.ts +2 -0
- package/dist/cjs/constants/ad/Ad.js +25 -0
- package/dist/cjs/constants/ad/index.d.ts +1 -0
- package/dist/cjs/constants/ad/index.js +17 -0
- package/dist/cjs/constants/events/Event.d.ts +2 -2
- package/dist/cjs/constants/events/Event.js +18 -3
- package/dist/cjs/constants/index.d.ts +6 -1
- package/dist/cjs/constants/index.js +6 -1
- package/dist/cjs/constants/motor/Motor.d.ts +2 -0
- package/dist/cjs/constants/motor/Motor.js +17 -0
- package/dist/cjs/constants/motor/index.d.ts +1 -0
- package/dist/cjs/constants/motor/index.js +17 -0
- package/dist/cjs/constants/property/Property.d.ts +2 -0
- package/dist/cjs/constants/property/Property.js +14 -0
- package/dist/cjs/constants/property/index.d.ts +1 -0
- package/dist/cjs/constants/property/index.js +17 -0
- package/dist/cjs/constants/service/Service.d.ts +2 -0
- package/dist/cjs/constants/service/Service.js +9 -0
- package/dist/cjs/constants/service/index.d.ts +1 -0
- package/dist/cjs/constants/service/index.js +17 -0
- package/dist/cjs/constants/used-product/UsedProduct.d.ts +2 -0
- package/dist/cjs/constants/used-product/UsedProduct.js +10 -0
- package/dist/cjs/constants/used-product/index.d.ts +1 -0
- package/dist/cjs/constants/used-product/index.js +17 -0
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/schema/events/Event.schema.d.ts +51 -72
- package/dist/cjs/schema/events/Event.schema.js +5 -1
- package/dist/cjs/schema/events/EventTimeline.schema.d.ts +7 -13
- package/dist/cjs/schema/events/EventTimeline.schema.js +4 -5
- package/dist/cjs/schema/events/EventWedding.schema.d.ts +7 -14
- package/dist/cjs/schema/events/EventWedding.schema.js +4 -5
- package/dist/cjs/types/ad/Ad.js +10 -14
- package/dist/cjs/types/common/FilterParams.d.ts +1 -1
- package/dist/cjs/types/events/EventTimeline.d.ts +1 -1
- package/dist/cjs/types/events/EventWedding.d.ts +1 -1
- package/dist/esm/constants/ad/Ad.js +22 -0
- package/dist/esm/constants/ad/index.js +1 -0
- package/dist/esm/constants/events/Event.js +18 -3
- package/dist/esm/constants/index.js +6 -1
- package/dist/esm/constants/motor/Motor.js +14 -0
- package/dist/esm/constants/motor/index.js +1 -0
- package/dist/esm/constants/property/Property.js +11 -0
- package/dist/esm/constants/property/index.js +1 -0
- package/dist/esm/constants/service/Service.js +6 -0
- package/dist/esm/constants/service/index.js +1 -0
- package/dist/esm/constants/used-product/UsedProduct.js +7 -0
- package/dist/esm/constants/used-product/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/schema/events/Event.schema.js +5 -1
- package/dist/esm/schema/events/EventTimeline.schema.js +4 -5
- package/dist/esm/schema/events/EventWedding.schema.js +4 -5
- package/dist/esm/types/ad/Ad.js +10 -14
- package/package.json +1 -1
|
@@ -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 {
|
|
2
|
-
export declare const emptyEvent:
|
|
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:
|
|
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:
|
|
15
|
-
|
|
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
|
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export * as
|
|
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,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,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 @@
|
|
|
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 @@
|
|
|
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);
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ export * as CONSTANTS from './constants/index';
|
|
|
3
3
|
export * as DTO from './dto/index';
|
|
4
4
|
export * as SCHEMA from './schema/index';
|
|
5
5
|
export * as ABSTRACT from './abstract';
|
|
6
|
+
export { ClassService, IObjectService } from './abstract/baseService';
|
|
6
7
|
export * as UTILS from './utils';
|
|
8
|
+
export type { FilterParams } from './types/common/FilterParams';
|
package/dist/cjs/index.js
CHANGED
|
@@ -39,7 +39,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
39
39
|
};
|
|
40
40
|
})();
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.UTILS = exports.ABSTRACT = exports.SCHEMA = exports.DTO = exports.CONSTANTS = exports.TYPES = void 0;
|
|
42
|
+
exports.UTILS = exports.ClassService = exports.ABSTRACT = exports.SCHEMA = exports.DTO = exports.CONSTANTS = exports.TYPES = void 0;
|
|
43
43
|
exports.TYPES = __importStar(require("./types/index"));
|
|
44
44
|
// CONSTANTS
|
|
45
45
|
// Contains static values that never change at runtime.
|
|
@@ -75,6 +75,8 @@ exports.SCHEMA = __importStar(require("./schema/index"));
|
|
|
75
75
|
// abstract findById(id: number): Promise<any>;
|
|
76
76
|
// }
|
|
77
77
|
exports.ABSTRACT = __importStar(require("./abstract"));
|
|
78
|
+
var baseService_1 = require("./abstract/baseService");
|
|
79
|
+
Object.defineProperty(exports, "ClassService", { enumerable: true, get: function () { return baseService_1.ClassService; } });
|
|
78
80
|
// UTILS
|
|
79
81
|
// Contains pure helper functions with no side effects.
|
|
80
82
|
// Reusable logic across the application.
|
|
@@ -6,22 +6,23 @@ export declare const eventBaseSchema: z.ZodObject<{
|
|
|
6
6
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
7
7
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
slug: z.ZodString;
|
|
9
|
-
wedding: z.
|
|
10
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
9
|
+
wedding: z.ZodObject<{
|
|
10
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
11
11
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
12
12
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
13
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
14
|
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
15
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
timeline: z.ZodObject<{
|
|
19
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
20
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
start_time: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
25
26
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
27
|
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
28
|
}, z.core.$strip>;
|
|
@@ -32,22 +33,23 @@ export declare const createEventSchema: z.ZodObject<{
|
|
|
32
33
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
33
34
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
34
35
|
slug: z.ZodString;
|
|
35
|
-
wedding: z.
|
|
36
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
37
|
-
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
38
|
-
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
-
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
-
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
-
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
36
|
+
wedding: z.ZodObject<{
|
|
37
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
44
38
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
45
39
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
40
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
41
|
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
42
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
-
id: z.ZodCoercedNumber<unknown
|
|
50
|
-
}, z.core.$strip
|
|
43
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
timeline: z.ZodObject<{
|
|
46
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
47
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
48
|
+
title: z.ZodString;
|
|
49
|
+
start_time: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
51
53
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
54
|
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
55
|
}, z.core.$strip>;
|
|
@@ -58,78 +60,55 @@ export declare const updateEventSchema: z.ZodObject<{
|
|
|
58
60
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
59
61
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
60
62
|
slug: z.ZodString;
|
|
61
|
-
wedding: z.
|
|
62
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
63
|
+
wedding: z.ZodObject<{
|
|
64
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
63
65
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
64
66
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
67
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
68
|
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
69
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
timeline: z.ZodObject<{
|
|
73
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
74
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
75
|
+
title: z.ZodString;
|
|
76
|
+
start_time: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
77
80
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
81
|
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
82
|
id: z.ZodCoercedNumber<unknown>;
|
|
80
83
|
}, z.core.$strip>;
|
|
81
|
-
export declare const saveEventSchema: z.
|
|
82
|
-
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
83
|
-
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
84
|
-
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
85
|
-
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
86
|
-
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
-
slug: z.ZodString;
|
|
88
|
-
wedding: z.ZodUnion<readonly [z.ZodObject<{
|
|
89
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
90
|
-
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
91
|
-
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
-
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
-
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
97
|
-
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
98
|
-
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
|
-
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
|
-
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
-
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
|
-
id: z.ZodCoercedNumber<unknown>;
|
|
103
|
-
}, z.core.$strip>]>;
|
|
104
|
-
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
-
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
export declare const saveEventSchema: z.ZodObject<{
|
|
107
85
|
lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
108
86
|
long: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
109
87
|
start_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
110
88
|
end_date: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
111
89
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
112
90
|
slug: z.ZodString;
|
|
113
|
-
wedding: z.
|
|
114
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
115
|
-
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
116
|
-
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
-
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
-
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
-
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
121
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
91
|
+
wedding: z.ZodObject<{
|
|
92
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
122
93
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
123
94
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
95
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
96
|
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
97
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
127
|
-
id: z.ZodCoercedNumber<unknown
|
|
128
|
-
}, z.core.$strip
|
|
98
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
timeline: z.ZodObject<{
|
|
101
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
102
|
+
timelines: z.ZodArray<z.ZodObject<{
|
|
103
|
+
title: z.ZodString;
|
|
104
|
+
start_time: z.ZodString;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
107
|
+
}, z.core.$strip>;
|
|
129
108
|
event_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
109
|
event_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
|
-
id: z.ZodCoercedNumber<unknown
|
|
132
|
-
}, z.core.$strip
|
|
110
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
133
112
|
export declare const getEventsFilterSchema: z.ZodObject<{
|
|
134
113
|
is_published: z.ZodOptional<z.ZodBoolean>;
|
|
135
114
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEventsFilterSchema = exports.saveEventSchema = exports.updateEventSchema = exports.createEventSchema = exports.eventBaseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const EventTimeline_schema_1 = require("./EventTimeline.schema");
|
|
5
6
|
const EventWedding_schema_1 = require("./EventWedding.schema");
|
|
6
7
|
exports.eventBaseSchema = zod_1.z.object({
|
|
7
8
|
lat: zod_1.z.coerce.number().optional().nullable(),
|
|
@@ -11,6 +12,7 @@ exports.eventBaseSchema = zod_1.z.object({
|
|
|
11
12
|
is_published: zod_1.z.boolean().optional(),
|
|
12
13
|
slug: zod_1.z.string().trim().min(1).max(255),
|
|
13
14
|
wedding: EventWedding_schema_1.saveEventWeddingSchema,
|
|
15
|
+
timeline: EventTimeline_schema_1.saveEventTimelineSchema,
|
|
14
16
|
event_type: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
15
17
|
event_template: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
16
18
|
});
|
|
@@ -18,7 +20,9 @@ exports.createEventSchema = exports.eventBaseSchema;
|
|
|
18
20
|
exports.updateEventSchema = exports.eventBaseSchema.extend({
|
|
19
21
|
id: zod_1.z.coerce.number().int().positive(),
|
|
20
22
|
});
|
|
21
|
-
exports.saveEventSchema =
|
|
23
|
+
exports.saveEventSchema = exports.eventBaseSchema.extend({
|
|
24
|
+
id: zod_1.z.coerce.number().int().positive().optional(),
|
|
25
|
+
});
|
|
22
26
|
exports.getEventsFilterSchema = zod_1.z.object({
|
|
23
27
|
is_published: zod_1.z.boolean().optional(),
|
|
24
28
|
search: zod_1.z.string().trim().optional(),
|
|
@@ -4,41 +4,35 @@ export declare const timelinePayloadSchema: z.ZodObject<{
|
|
|
4
4
|
start_time: z.ZodString;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export declare const eventTimelineBaseSchema: z.ZodObject<{
|
|
7
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
7
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
8
8
|
timelines: z.ZodArray<z.ZodObject<{
|
|
9
9
|
title: z.ZodString;
|
|
10
10
|
start_time: z.ZodString;
|
|
11
11
|
}, z.core.$strip>>;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export declare const createEventTimelineSchema: z.ZodObject<{
|
|
14
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
14
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
15
15
|
timelines: z.ZodArray<z.ZodObject<{
|
|
16
16
|
title: z.ZodString;
|
|
17
17
|
start_time: z.ZodString;
|
|
18
18
|
}, z.core.$strip>>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
export declare const updateEventTimelineSchema: z.ZodObject<{
|
|
21
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
21
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
22
22
|
timelines: z.ZodArray<z.ZodObject<{
|
|
23
23
|
title: z.ZodString;
|
|
24
24
|
start_time: z.ZodString;
|
|
25
25
|
}, z.core.$strip>>;
|
|
26
26
|
id: z.ZodCoercedNumber<unknown>;
|
|
27
27
|
}, z.core.$strip>;
|
|
28
|
-
export declare const saveEventTimelineSchema: z.
|
|
29
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
30
|
-
timelines: z.ZodArray<z.ZodObject<{
|
|
31
|
-
title: z.ZodString;
|
|
32
|
-
start_time: z.ZodString;
|
|
33
|
-
}, z.core.$strip>>;
|
|
34
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
28
|
+
export declare const saveEventTimelineSchema: z.ZodObject<{
|
|
29
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
36
30
|
timelines: z.ZodArray<z.ZodObject<{
|
|
37
31
|
title: z.ZodString;
|
|
38
32
|
start_time: z.ZodString;
|
|
39
33
|
}, z.core.$strip>>;
|
|
40
|
-
id: z.ZodCoercedNumber<unknown
|
|
41
|
-
}, z.core.$strip
|
|
34
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
42
36
|
export declare const getEventTimelineFilterSchema: z.ZodObject<{
|
|
43
37
|
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
44
38
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -7,17 +7,16 @@ exports.timelinePayloadSchema = zod_1.z.object({
|
|
|
7
7
|
start_time: zod_1.z.string().trim().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),
|
|
8
8
|
});
|
|
9
9
|
exports.eventTimelineBaseSchema = zod_1.z.object({
|
|
10
|
-
event_id: zod_1.z.coerce.number().int().positive(),
|
|
10
|
+
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
11
11
|
timelines: zod_1.z.array(exports.timelinePayloadSchema),
|
|
12
12
|
});
|
|
13
13
|
exports.createEventTimelineSchema = exports.eventTimelineBaseSchema;
|
|
14
14
|
exports.updateEventTimelineSchema = exports.eventTimelineBaseSchema.extend({
|
|
15
15
|
id: zod_1.z.coerce.number().int().positive(),
|
|
16
16
|
});
|
|
17
|
-
exports.saveEventTimelineSchema =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]);
|
|
17
|
+
exports.saveEventTimelineSchema = exports.eventTimelineBaseSchema.extend({
|
|
18
|
+
id: zod_1.z.coerce.number().int().positive().optional(),
|
|
19
|
+
});
|
|
21
20
|
exports.getEventTimelineFilterSchema = zod_1.z.object({
|
|
22
21
|
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
23
22
|
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const eventWeddingBaseSchema: z.ZodObject<{
|
|
3
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
3
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
4
4
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
5
5
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -8,7 +8,7 @@ export declare const eventWeddingBaseSchema: z.ZodObject<{
|
|
|
8
8
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
export declare const createEventWeddingSchema: z.ZodObject<{
|
|
11
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
11
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
12
12
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
13
13
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
14
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -16,7 +16,7 @@ export declare const createEventWeddingSchema: z.ZodObject<{
|
|
|
16
16
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
export declare const updateEventWeddingSchema: z.ZodObject<{
|
|
19
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
19
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
20
20
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
21
21
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
22
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -24,22 +24,15 @@ export declare const updateEventWeddingSchema: z.ZodObject<{
|
|
|
24
24
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
25
|
id: z.ZodCoercedNumber<unknown>;
|
|
26
26
|
}, z.core.$strip>;
|
|
27
|
-
export declare const saveEventWeddingSchema: z.
|
|
28
|
-
event_id: z.ZodCoercedNumber<unknown
|
|
29
|
-
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
30
|
-
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
-
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
-
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
-
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
-
event_id: z.ZodCoercedNumber<unknown>;
|
|
27
|
+
export declare const saveEventWeddingSchema: z.ZodObject<{
|
|
28
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
36
29
|
cover: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
37
30
|
first_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
31
|
last_bride_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
32
|
first_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
33
|
last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
-
id: z.ZodCoercedNumber<unknown
|
|
42
|
-
}, z.core.$strip
|
|
34
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
43
36
|
export declare const getEventWeddingFilterSchema: z.ZodObject<{
|
|
44
37
|
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
45
38
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getEventWeddingFilterSchema = exports.saveEventWeddingSchema = exports.updateEventWeddingSchema = exports.createEventWeddingSchema = exports.eventWeddingBaseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.eventWeddingBaseSchema = zod_1.z.object({
|
|
6
|
-
event_id: zod_1.z.coerce.number().int().positive(),
|
|
6
|
+
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
7
7
|
cover: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable().optional(),
|
|
8
8
|
first_bride_name: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
9
9
|
last_bride_name: zod_1.z.string().trim().max(255).nullable().optional(),
|
|
@@ -14,10 +14,9 @@ exports.createEventWeddingSchema = exports.eventWeddingBaseSchema;
|
|
|
14
14
|
exports.updateEventWeddingSchema = exports.eventWeddingBaseSchema.extend({
|
|
15
15
|
id: zod_1.z.coerce.number().int().positive(),
|
|
16
16
|
});
|
|
17
|
-
exports.saveEventWeddingSchema =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]);
|
|
17
|
+
exports.saveEventWeddingSchema = exports.eventWeddingBaseSchema.extend({
|
|
18
|
+
id: zod_1.z.coerce.number().int().positive().optional(),
|
|
19
|
+
});
|
|
21
20
|
exports.getEventWeddingFilterSchema = zod_1.z.object({
|
|
22
21
|
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
23
22
|
page: zod_1.z.coerce.number().int().positive().optional(),
|
package/dist/cjs/types/ad/Ad.js
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.emptyValues = exports.emptyAd = void 0;
|
|
4
|
-
const Motor_1 = require("../motor/Motor");
|
|
5
|
-
const Property_1 = require("../property/Property");
|
|
6
|
-
const Service_1 = require("../service/Service");
|
|
7
|
-
const UsedProduct_1 = require("../used-product/UsedProduct");
|
|
8
4
|
exports.emptyAd = {
|
|
9
|
-
id:
|
|
10
|
-
user_id:
|
|
11
|
-
status_id:
|
|
5
|
+
id: undefined,
|
|
6
|
+
user_id: undefined,
|
|
7
|
+
status_id: undefined,
|
|
12
8
|
title: "",
|
|
13
9
|
description: "",
|
|
14
10
|
negotiable: false,
|
|
15
|
-
latitude:
|
|
16
|
-
longitude:
|
|
17
|
-
baseAdminBoundaryId:
|
|
11
|
+
latitude: null,
|
|
12
|
+
longitude: null,
|
|
13
|
+
baseAdminBoundaryId: null,
|
|
18
14
|
contact_methods: null,
|
|
19
15
|
selected_phone: null,
|
|
20
16
|
media: [],
|
|
21
|
-
property:
|
|
22
|
-
motor:
|
|
23
|
-
service:
|
|
24
|
-
product:
|
|
17
|
+
property: null,
|
|
18
|
+
motor: null,
|
|
19
|
+
service: null,
|
|
20
|
+
product: null,
|
|
25
21
|
};
|
|
26
22
|
exports.emptyValues = exports.emptyAd;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* // With domain-specific extra fields
|
|
13
13
|
* type MotorFilterParams = FilterParams<{ make?: string; model?: string }>;
|
|
14
14
|
*/
|
|
15
|
-
export type FilterParams<TExtra extends Record<string, unknown> =
|
|
15
|
+
export type FilterParams<TExtra extends Record<string, unknown> = {}> = {
|
|
16
16
|
search?: string;
|
|
17
17
|
id?: number;
|
|
18
18
|
subject_type?: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { emptyMotor } from "../motor/index.js";
|
|
2
|
+
import { emptyProperty } from "../property/index.js";
|
|
3
|
+
import { emptyService } from "../service/index.js";
|
|
4
|
+
import { emptyUsedProduct } from "../used-product/index.js";
|
|
5
|
+
export const emptyAd = {
|
|
6
|
+
id: 0,
|
|
7
|
+
user_id: 0,
|
|
8
|
+
status_id: 0,
|
|
9
|
+
title: "",
|
|
10
|
+
description: "",
|
|
11
|
+
negotiable: false,
|
|
12
|
+
latitude: 0,
|
|
13
|
+
longitude: 0,
|
|
14
|
+
baseAdminBoundaryId: 0,
|
|
15
|
+
contact_methods: null,
|
|
16
|
+
selected_phone: null,
|
|
17
|
+
media: [],
|
|
18
|
+
property: emptyProperty,
|
|
19
|
+
motor: emptyMotor,
|
|
20
|
+
service: emptyService,
|
|
21
|
+
product: emptyUsedProduct,
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Ad.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { emptyEventTimeline } from './EventTimeline.js';
|
|
2
|
+
import { emptyEventWedding } from './EventWedding.js';
|
|
1
3
|
export const emptyEvent = {
|
|
2
|
-
id:
|
|
4
|
+
id: undefined,
|
|
3
5
|
lat: null,
|
|
4
6
|
long: null,
|
|
5
7
|
start_date: null,
|
|
@@ -8,6 +10,19 @@ export const emptyEvent = {
|
|
|
8
10
|
event_type: null,
|
|
9
11
|
event_template: null,
|
|
10
12
|
slug: '',
|
|
11
|
-
wedding:
|
|
12
|
-
|
|
13
|
+
wedding: {
|
|
14
|
+
...emptyEventWedding,
|
|
15
|
+
id: undefined,
|
|
16
|
+
event_id: undefined,
|
|
17
|
+
first_bride_name: '',
|
|
18
|
+
last_bride_name: '',
|
|
19
|
+
first_groom_name: '',
|
|
20
|
+
last_groom_name: '',
|
|
21
|
+
},
|
|
22
|
+
timeline: {
|
|
23
|
+
...emptyEventTimeline,
|
|
24
|
+
id: undefined,
|
|
25
|
+
event_id: undefined,
|
|
26
|
+
timelines: [],
|
|
27
|
+
},
|
|
13
28
|
};
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as AD from "./ad/index.js";
|
|
2
|
+
export * as EVENTS from "./events/index.js";
|
|
3
|
+
export * as MOTOR from "./motor/index.js";
|
|
4
|
+
export * as PROPERTY from "./property/index.js";
|
|
5
|
+
export * as SERVICE from "./service/index.js";
|
|
6
|
+
export * as USED_PRODUCT from "./used-product/index.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const emptyMotor = {
|
|
2
|
+
id: 0,
|
|
3
|
+
body_type_id: 0,
|
|
4
|
+
regional_spec_id: 0,
|
|
5
|
+
transmission_id: 0,
|
|
6
|
+
fuel_type_id: 0,
|
|
7
|
+
interior_color_id: null,
|
|
8
|
+
mileage: 0,
|
|
9
|
+
offer_type_id: 0,
|
|
10
|
+
year: null,
|
|
11
|
+
created_at: "",
|
|
12
|
+
updated_at: "",
|
|
13
|
+
seats_count: null,
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Motor.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Property.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Service.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./UsedProduct.js";
|
package/dist/esm/index.js
CHANGED
|
@@ -39,6 +39,7 @@ export * as SCHEMA from './schema/index.js';
|
|
|
39
39
|
// abstract findById(id: number): Promise<any>;
|
|
40
40
|
// }
|
|
41
41
|
export * as ABSTRACT from './abstract/index.js';
|
|
42
|
+
export { ClassService } from './abstract/baseService.js';
|
|
42
43
|
// UTILS
|
|
43
44
|
// Contains pure helper functions with no side effects.
|
|
44
45
|
// Reusable logic across the application.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { saveEventTimelineSchema } from './EventTimeline.schema.js';
|
|
2
3
|
import { saveEventWeddingSchema } from './EventWedding.schema.js';
|
|
3
4
|
export const eventBaseSchema = z.object({
|
|
4
5
|
lat: z.coerce.number().optional().nullable(),
|
|
@@ -8,6 +9,7 @@ export const eventBaseSchema = z.object({
|
|
|
8
9
|
is_published: z.boolean().optional(),
|
|
9
10
|
slug: z.string().trim().min(1).max(255),
|
|
10
11
|
wedding: saveEventWeddingSchema,
|
|
12
|
+
timeline: saveEventTimelineSchema,
|
|
11
13
|
event_type: z.string().trim().max(255).nullable().optional(),
|
|
12
14
|
event_template: z.string().trim().max(255).nullable().optional(),
|
|
13
15
|
});
|
|
@@ -15,7 +17,9 @@ export const createEventSchema = eventBaseSchema;
|
|
|
15
17
|
export const updateEventSchema = eventBaseSchema.extend({
|
|
16
18
|
id: z.coerce.number().int().positive(),
|
|
17
19
|
});
|
|
18
|
-
export const saveEventSchema =
|
|
20
|
+
export const saveEventSchema = eventBaseSchema.extend({
|
|
21
|
+
id: z.coerce.number().int().positive().optional(),
|
|
22
|
+
});
|
|
19
23
|
export const getEventsFilterSchema = z.object({
|
|
20
24
|
is_published: z.boolean().optional(),
|
|
21
25
|
search: z.string().trim().optional(),
|
|
@@ -4,17 +4,16 @@ export const timelinePayloadSchema = z.object({
|
|
|
4
4
|
start_time: z.string().trim().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),
|
|
5
5
|
});
|
|
6
6
|
export const eventTimelineBaseSchema = z.object({
|
|
7
|
-
event_id: z.coerce.number().int().positive(),
|
|
7
|
+
event_id: z.coerce.number().int().positive().optional(),
|
|
8
8
|
timelines: z.array(timelinePayloadSchema),
|
|
9
9
|
});
|
|
10
10
|
export const createEventTimelineSchema = eventTimelineBaseSchema;
|
|
11
11
|
export const updateEventTimelineSchema = eventTimelineBaseSchema.extend({
|
|
12
12
|
id: z.coerce.number().int().positive(),
|
|
13
13
|
});
|
|
14
|
-
export const saveEventTimelineSchema =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
]);
|
|
14
|
+
export const saveEventTimelineSchema = eventTimelineBaseSchema.extend({
|
|
15
|
+
id: z.coerce.number().int().positive().optional(),
|
|
16
|
+
});
|
|
18
17
|
export const getEventTimelineFilterSchema = z.object({
|
|
19
18
|
event_id: z.coerce.number().int().positive().optional(),
|
|
20
19
|
page: z.coerce.number().int().positive().optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const eventWeddingBaseSchema = z.object({
|
|
3
|
-
event_id: z.coerce.number().int().positive(),
|
|
3
|
+
event_id: z.coerce.number().int().positive().optional(),
|
|
4
4
|
cover: z.record(z.string(), z.any()).nullable().optional(),
|
|
5
5
|
first_bride_name: z.string().trim().max(255).nullable().optional(),
|
|
6
6
|
last_bride_name: z.string().trim().max(255).nullable().optional(),
|
|
@@ -11,10 +11,9 @@ export const createEventWeddingSchema = eventWeddingBaseSchema;
|
|
|
11
11
|
export const updateEventWeddingSchema = eventWeddingBaseSchema.extend({
|
|
12
12
|
id: z.coerce.number().int().positive(),
|
|
13
13
|
});
|
|
14
|
-
export const saveEventWeddingSchema =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
]);
|
|
14
|
+
export const saveEventWeddingSchema = eventWeddingBaseSchema.extend({
|
|
15
|
+
id: z.coerce.number().int().positive().optional(),
|
|
16
|
+
});
|
|
18
17
|
export const getEventWeddingFilterSchema = z.object({
|
|
19
18
|
event_id: z.coerce.number().int().positive().optional(),
|
|
20
19
|
page: z.coerce.number().int().positive().optional(),
|
package/dist/esm/types/ad/Ad.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { emptyMotor } from "../motor/Motor.js";
|
|
2
|
-
import { emptyProperty } from "../property/Property.js";
|
|
3
|
-
import { emptyService } from "../service/Service.js";
|
|
4
|
-
import { emptyUsedProduct } from "../used-product/UsedProduct.js";
|
|
5
1
|
export const emptyAd = {
|
|
6
|
-
id:
|
|
7
|
-
user_id:
|
|
8
|
-
status_id:
|
|
2
|
+
id: undefined,
|
|
3
|
+
user_id: undefined,
|
|
4
|
+
status_id: undefined,
|
|
9
5
|
title: "",
|
|
10
6
|
description: "",
|
|
11
7
|
negotiable: false,
|
|
12
|
-
latitude:
|
|
13
|
-
longitude:
|
|
14
|
-
baseAdminBoundaryId:
|
|
8
|
+
latitude: null,
|
|
9
|
+
longitude: null,
|
|
10
|
+
baseAdminBoundaryId: null,
|
|
15
11
|
contact_methods: null,
|
|
16
12
|
selected_phone: null,
|
|
17
13
|
media: [],
|
|
18
|
-
property:
|
|
19
|
-
motor:
|
|
20
|
-
service:
|
|
21
|
-
product:
|
|
14
|
+
property: null,
|
|
15
|
+
motor: null,
|
|
16
|
+
service: null,
|
|
17
|
+
product: null,
|
|
22
18
|
};
|
|
23
19
|
export const emptyValues = emptyAd;
|