@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.
Files changed (133) hide show
  1. package/dist/cjs/constants/common/Role.d.ts +9 -0
  2. package/dist/cjs/constants/common/Role.js +14 -0
  3. package/dist/cjs/constants/common/index.d.ts +1 -0
  4. package/dist/cjs/constants/common/index.js +1 -0
  5. package/dist/cjs/dto/events/EventRsvp.dto.d.ts +6 -0
  6. package/dist/cjs/dto/events/index.d.ts +1 -0
  7. package/dist/cjs/dto/events/index.js +1 -0
  8. package/dist/cjs/schema/events/EventRsvp.schema.d.ts +71 -0
  9. package/dist/cjs/schema/events/EventRsvp.schema.js +29 -0
  10. package/dist/cjs/schema/events/index.d.ts +1 -0
  11. package/dist/cjs/schema/events/index.js +1 -0
  12. package/dist/cjs/types/events/Event.d.ts +2 -0
  13. package/dist/cjs/types/events/EventRsvp.d.ts +15 -0
  14. package/dist/cjs/types/events/index.d.ts +1 -0
  15. package/dist/cjs/types/events/index.js +1 -0
  16. package/dist/cjs/types/index.d.ts +1 -0
  17. package/dist/cjs/types/index.js +3 -2
  18. package/dist/esm/constants/common/Role.js +11 -0
  19. package/dist/esm/constants/common/index.js +1 -0
  20. package/dist/esm/dto/events/index.js +1 -0
  21. package/dist/esm/schema/events/EventRsvp.schema.js +26 -0
  22. package/dist/esm/schema/events/index.js +1 -0
  23. package/dist/esm/types/events/index.js +1 -0
  24. package/dist/esm/types/index.js +1 -0
  25. package/package.json +1 -1
  26. package/dist/cjs/dto/events/Event.d.ts +0 -2
  27. package/dist/cjs/dto/events/Event.js +0 -5
  28. package/dist/cjs/dto/events/EventTemplate.d.ts +0 -14
  29. package/dist/cjs/dto/events/EventTemplate.dto.d.ts +0 -18
  30. package/dist/cjs/dto/events/EventTemplate.dto.js +0 -11
  31. package/dist/cjs/dto/events/EventTemplate.js +0 -14
  32. package/dist/cjs/dto/events/EventType.d.ts +0 -2
  33. package/dist/cjs/dto/events/EventType.dto.d.ts +0 -16
  34. package/dist/cjs/dto/events/EventType.dto.js +0 -10
  35. package/dist/cjs/dto/events/EventType.js +0 -5
  36. package/dist/cjs/dto/events/EventWedding.d.ts +0 -11
  37. package/dist/cjs/dto/events/EventWedding.js +0 -9
  38. package/dist/cjs/dto/events/common.d.ts +0 -5
  39. package/dist/cjs/dto/events/common.js +0 -8
  40. package/dist/cjs/types/attributes/CarBody.d.ts +0 -5
  41. package/dist/cjs/types/attributes/Facility.d.ts +0 -6
  42. package/dist/cjs/types/attributes/Feature.d.ts +0 -7
  43. package/dist/cjs/types/attributes/Feature.js +0 -2
  44. package/dist/cjs/types/attributes/FuelType.d.ts +0 -5
  45. package/dist/cjs/types/attributes/FuelType.js +0 -2
  46. package/dist/cjs/types/attributes/LicenseType.d.ts +0 -5
  47. package/dist/cjs/types/attributes/LicenseType.js +0 -2
  48. package/dist/cjs/types/attributes/OfferType.d.ts +0 -5
  49. package/dist/cjs/types/attributes/OfferType.js +0 -2
  50. package/dist/cjs/types/attributes/PriceType.d.ts +0 -7
  51. package/dist/cjs/types/attributes/PriceType.js +0 -2
  52. package/dist/cjs/types/attributes/PropertyStatus.d.ts +0 -5
  53. package/dist/cjs/types/attributes/PropertyStatus.js +0 -2
  54. package/dist/cjs/types/attributes/PublisherType.d.ts +0 -5
  55. package/dist/cjs/types/attributes/PublisherType.js +0 -2
  56. package/dist/cjs/types/attributes/RegionalSpec.d.ts +0 -5
  57. package/dist/cjs/types/attributes/RegionalSpec.js +0 -2
  58. package/dist/cjs/types/attributes/Transmission.d.ts +0 -5
  59. package/dist/cjs/types/attributes/Transmission.js +0 -2
  60. package/dist/cjs/types/attributes/Unit.d.ts +0 -5
  61. package/dist/cjs/types/attributes/Unit.js +0 -2
  62. package/dist/cjs/types/attributes/UsedProductAge.d.ts +0 -7
  63. package/dist/cjs/types/attributes/UsedProductAge.js +0 -2
  64. package/dist/cjs/types/attributes/UsedProductCondition.d.ts +0 -7
  65. package/dist/cjs/types/attributes/UsedProductCondition.js +0 -2
  66. package/dist/cjs/types/attributes/WorkType.d.ts +0 -6
  67. package/dist/cjs/types/attributes/WorkType.js +0 -2
  68. package/dist/cjs/types/common/AccessType.d.ts +0 -5
  69. package/dist/cjs/types/common/AccessType.js +0 -2
  70. package/dist/cjs/types/events/EventTemplate.d.ts +0 -14
  71. package/dist/cjs/types/events/EventTemplate.js +0 -14
  72. package/dist/cjs/types/events/EventType.d.ts +0 -10
  73. package/dist/cjs/types/events/EventType.js +0 -11
  74. package/dist/cjs/types/listings/Ad.d.ts +0 -93
  75. package/dist/cjs/types/listings/Ad.js +0 -25
  76. package/dist/cjs/types/listings/AdLocation.d.ts +0 -5
  77. package/dist/cjs/types/listings/AdLocation.js +0 -2
  78. package/dist/cjs/types/listings/AdPromotion.d.ts +0 -12
  79. package/dist/cjs/types/listings/AdPromotion.js +0 -2
  80. package/dist/cjs/types/listings/Motor.d.ts +0 -24
  81. package/dist/cjs/types/listings/Motor.js +0 -17
  82. package/dist/cjs/types/listings/MotorTrim.d.ts +0 -6
  83. package/dist/cjs/types/listings/MotorTrim.js +0 -2
  84. package/dist/cjs/types/listings/Property.d.ts +0 -37
  85. package/dist/cjs/types/listings/Property.js +0 -14
  86. package/dist/cjs/types/listings/PropertySubType.d.ts +0 -6
  87. package/dist/cjs/types/listings/PropertySubType.js +0 -2
  88. package/dist/cjs/types/listings/Service.d.ts +0 -14
  89. package/dist/cjs/types/listings/Service.js +0 -9
  90. package/dist/cjs/types/listings/UsedProduct.d.ts +0 -8
  91. package/dist/cjs/types/listings/UsedProduct.js +0 -7
  92. package/dist/cjs/types/listings/index.d.ts +0 -5
  93. package/dist/cjs/types/listings/index.js +0 -21
  94. package/dist/cjs/validation/ad/save-ad.d.ts +0 -45
  95. package/dist/cjs/validation/ad/save-ad.js +0 -55
  96. package/dist/esm/dto/events/Event.js +0 -1
  97. package/dist/esm/dto/events/EventTemplate.dto.js +0 -8
  98. package/dist/esm/dto/events/EventTemplate.js +0 -11
  99. package/dist/esm/dto/events/EventType.dto.js +0 -7
  100. package/dist/esm/dto/events/EventType.js +0 -1
  101. package/dist/esm/dto/events/EventWedding.js +0 -6
  102. package/dist/esm/dto/events/common.js +0 -5
  103. package/dist/esm/types/attributes/Feature.js +0 -1
  104. package/dist/esm/types/attributes/FuelType.js +0 -1
  105. package/dist/esm/types/attributes/LicenseType.js +0 -1
  106. package/dist/esm/types/attributes/OfferType.js +0 -1
  107. package/dist/esm/types/attributes/PriceType.js +0 -1
  108. package/dist/esm/types/attributes/PropertyStatus.js +0 -1
  109. package/dist/esm/types/attributes/PublisherType.js +0 -1
  110. package/dist/esm/types/attributes/RegionalSpec.js +0 -1
  111. package/dist/esm/types/attributes/Transmission.js +0 -1
  112. package/dist/esm/types/attributes/Unit.js +0 -1
  113. package/dist/esm/types/attributes/UsedProductAge.js +0 -1
  114. package/dist/esm/types/attributes/UsedProductCondition.js +0 -1
  115. package/dist/esm/types/attributes/WorkType.js +0 -1
  116. package/dist/esm/types/common/AccessType.js +0 -1
  117. package/dist/esm/types/events/EventTemplate.js +0 -11
  118. package/dist/esm/types/events/EventType.js +0 -8
  119. package/dist/esm/types/listings/Ad.js +0 -22
  120. package/dist/esm/types/listings/AdLocation.js +0 -1
  121. package/dist/esm/types/listings/AdPromotion.js +0 -1
  122. package/dist/esm/types/listings/Motor.js +0 -14
  123. package/dist/esm/types/listings/MotorTrim.js +0 -1
  124. package/dist/esm/types/listings/Property.js +0 -11
  125. package/dist/esm/types/listings/PropertySubType.js +0 -1
  126. package/dist/esm/types/listings/Service.js +0 -6
  127. package/dist/esm/types/listings/UsedProduct.js +0 -4
  128. package/dist/esm/types/listings/index.js +0 -5
  129. package/dist/esm/validation/ad/save-ad.js +0 -52
  130. /package/dist/cjs/{types/attributes/CarBody.js → dto/events/EventRsvp.dto.js} +0 -0
  131. /package/dist/cjs/types/{attributes/Facility.js → events/EventRsvp.js} +0 -0
  132. /package/dist/esm/{types/attributes/CarBody.js → dto/events/EventRsvp.dto.js} +0 -0
  133. /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,8 +0,0 @@
1
- import { createEmptyLocalizedName } from '../common/LocalizedName.js';
2
- export const emptyEventType = {
3
- id: 0,
4
- code: '',
5
- name: createEmptyLocalizedName(),
6
- active: true,
7
- templates: [],
8
- };
@@ -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,11 +0,0 @@
1
- export const emptyProperty = {
2
- id: 0,
3
- offer_type_id: 0,
4
- price_type_id: 0,
5
- size_m2: 0,
6
- bedrooms: 0,
7
- created_at: "",
8
- updated_at: "",
9
- property_facilities: [],
10
- feature_ids: [],
11
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export const emptyService = {
2
- unit_id: null,
3
- access_type_id: null,
4
- work_type_id: null,
5
- locations: [],
6
- };
@@ -1,4 +0,0 @@
1
- export const emptyUsedProduct = {
2
- isDeliveryAvailable: undefined,
3
- product_type_id: undefined,
4
- };
@@ -1,5 +0,0 @@
1
- export * from "../ad/index.js";
2
- export * from "../motor/index.js";
3
- export * from "../property/index.js";
4
- export * from "../service/index.js";
5
- export * from "../used-product/index.js";
@@ -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
- });