@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,11 +0,0 @@
|
|
|
1
|
-
import { createEmptyLocalizedName } from '../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,22 +0,0 @@
|
|
|
1
|
-
import { emptyMotor } from "./Motor.js";
|
|
2
|
-
import { emptyProperty } from "./Property.js";
|
|
3
|
-
import { emptyService } from "./Service.js";
|
|
4
|
-
import { emptyUsedProduct } from "./UsedProduct.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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
const baseAdCommon = z.object({
|
|
3
|
-
title: z.string().trim().optional(),
|
|
4
|
-
status_id: z.coerce.number().int().positive().optional(),
|
|
5
|
-
description: z.string().trim().optional().nullable(),
|
|
6
|
-
category_id: z.coerce.number().int().positive().optional().nullable(),
|
|
7
|
-
price: z.coerce.number().min(0).optional().nullable(),
|
|
8
|
-
currency_id: z.coerce.number().int().positive().optional().nullable(),
|
|
9
|
-
negotiable: z.coerce.boolean().optional().nullable(),
|
|
10
|
-
city_id: z.coerce.number().int().positive().optional().nullable(),
|
|
11
|
-
latitude: z.coerce.number().optional().nullable(),
|
|
12
|
-
longitude: z.coerce.number().optional().nullable(),
|
|
13
|
-
media: z.array(z.any()).optional().nullable(),
|
|
14
|
-
// subject_type: SubjectTypeSchema.optional(),
|
|
15
|
-
base_price: z.coerce.number().optional().nullable(),
|
|
16
|
-
contact_methods: z.object({
|
|
17
|
-
by_message: z.boolean().optional(),
|
|
18
|
-
by_whatsapp: z.boolean().optional(),
|
|
19
|
-
by_call: z.boolean().optional(),
|
|
20
|
-
}).optional().nullable(),
|
|
21
|
-
selected_phone: z.string().trim().optional().nullable(),
|
|
22
|
-
});
|
|
23
|
-
export const createAdSchema = z.object({
|
|
24
|
-
user_id: z.coerce.number().int().positive(),
|
|
25
|
-
id: z.never().optional(), // disallow id on create
|
|
26
|
-
...baseAdCommon.shape,
|
|
27
|
-
// motor: createMotorSchema
|
|
28
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
29
|
-
// .optional()
|
|
30
|
-
// .nullable(),
|
|
31
|
-
// // Make nested ad_id optional/nullable without changing original schemas
|
|
32
|
-
// property: createPropertySchema
|
|
33
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
34
|
-
// .optional()
|
|
35
|
-
// .nullable(),
|
|
36
|
-
// product: createUsedProductSchema
|
|
37
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
38
|
-
// .optional()
|
|
39
|
-
// .nullable(),
|
|
40
|
-
// service: createServiceSchema
|
|
41
|
-
// .extend({ ad_id: z.coerce.number().optional() })
|
|
42
|
-
// .optional()
|
|
43
|
-
// .nullable(),
|
|
44
|
-
});
|
|
45
|
-
export const updateAdSchema = z.object({
|
|
46
|
-
...createAdSchema.shape,
|
|
47
|
-
id: z.coerce.number().int().positive(),
|
|
48
|
-
// motor: updateMotorSchema.optional().nullable(),
|
|
49
|
-
// property: updatePropertySchema.optional().nullable(),
|
|
50
|
-
// product: updateUsedProductSchema.optional().nullable(),
|
|
51
|
-
// service: updateServiceSchema.optional().nullable(),
|
|
52
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|