@deallony/shared 1.2.3 → 1.2.5
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/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/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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createEventRsvpSchema, getEventRsvpFilterSchema, saveEventRsvpSchema, updateEventRsvpSchema } from '../../schema/events/EventRsvp.schema';
|
|
3
|
+
export type CreateEventRsvpDto = z.infer<typeof createEventRsvpSchema>;
|
|
4
|
+
export type UpdateEventRsvpDto = z.infer<typeof updateEventRsvpSchema>;
|
|
5
|
+
export type SaveEventRsvpDto = z.infer<typeof saveEventRsvpSchema>;
|
|
6
|
+
export type GetEventRsvpFilterDto = z.infer<typeof getEventRsvpFilterSchema>;
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Event.dto"), exports);
|
|
18
|
+
__exportStar(require("./EventRsvp.dto"), exports);
|
|
18
19
|
__exportStar(require("./EventTimeline.dto"), exports);
|
|
19
20
|
__exportStar(require("./EventWedding.dto"), exports);
|
|
20
21
|
__exportStar(require("./EventVenue.dto"), exports);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const attendanceStatusValues: readonly ["attending", "not_attending", "maybe"];
|
|
3
|
+
export declare const eventRsvpBaseSchema: z.ZodObject<{
|
|
4
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
5
|
+
first_name: z.ZodString;
|
|
6
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
phone: z.ZodString;
|
|
8
|
+
attendance_status: z.ZodEnum<{
|
|
9
|
+
attending: "attending";
|
|
10
|
+
not_attending: "not_attending";
|
|
11
|
+
maybe: "maybe";
|
|
12
|
+
}>;
|
|
13
|
+
guest_count: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
14
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
responded_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const createEventRsvpSchema: z.ZodObject<{
|
|
18
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
19
|
+
first_name: z.ZodString;
|
|
20
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
phone: z.ZodString;
|
|
22
|
+
attendance_status: z.ZodEnum<{
|
|
23
|
+
attending: "attending";
|
|
24
|
+
not_attending: "not_attending";
|
|
25
|
+
maybe: "maybe";
|
|
26
|
+
}>;
|
|
27
|
+
guest_count: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
28
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
responded_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const updateEventRsvpSchema: z.ZodObject<{
|
|
32
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
33
|
+
first_name: z.ZodString;
|
|
34
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
phone: z.ZodString;
|
|
36
|
+
attendance_status: z.ZodEnum<{
|
|
37
|
+
attending: "attending";
|
|
38
|
+
not_attending: "not_attending";
|
|
39
|
+
maybe: "maybe";
|
|
40
|
+
}>;
|
|
41
|
+
guest_count: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
42
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
responded_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
44
|
+
id: z.ZodCoercedNumber<unknown>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export declare const saveEventRsvpSchema: z.ZodObject<{
|
|
47
|
+
event_id: z.ZodCoercedNumber<unknown>;
|
|
48
|
+
first_name: z.ZodString;
|
|
49
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
phone: z.ZodString;
|
|
51
|
+
attendance_status: z.ZodEnum<{
|
|
52
|
+
attending: "attending";
|
|
53
|
+
not_attending: "not_attending";
|
|
54
|
+
maybe: "maybe";
|
|
55
|
+
}>;
|
|
56
|
+
guest_count: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
57
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
responded_at: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
59
|
+
id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export declare const getEventRsvpFilterSchema: z.ZodObject<{
|
|
62
|
+
event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
63
|
+
attendance_status: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
attending: "attending";
|
|
65
|
+
not_attending: "not_attending";
|
|
66
|
+
maybe: "maybe";
|
|
67
|
+
}>>;
|
|
68
|
+
search: z.ZodOptional<z.ZodString>;
|
|
69
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
70
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEventRsvpFilterSchema = exports.saveEventRsvpSchema = exports.updateEventRsvpSchema = exports.createEventRsvpSchema = exports.eventRsvpBaseSchema = exports.attendanceStatusValues = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.attendanceStatusValues = ['attending', 'not_attending', 'maybe'];
|
|
6
|
+
exports.eventRsvpBaseSchema = zod_1.z.object({
|
|
7
|
+
event_id: zod_1.z.coerce.number().int().positive(),
|
|
8
|
+
first_name: zod_1.z.string().trim().min(1).max(150),
|
|
9
|
+
last_name: zod_1.z.string().trim().max(150).nullable().optional(),
|
|
10
|
+
phone: zod_1.z.string().trim().min(1).max(20),
|
|
11
|
+
attendance_status: zod_1.z.enum(exports.attendanceStatusValues),
|
|
12
|
+
guest_count: zod_1.z.coerce.number().int().positive().max(100).default(1),
|
|
13
|
+
message: zod_1.z.string().trim().max(5000).nullable().optional(),
|
|
14
|
+
responded_at: zod_1.z.coerce.date().optional(),
|
|
15
|
+
});
|
|
16
|
+
exports.createEventRsvpSchema = exports.eventRsvpBaseSchema;
|
|
17
|
+
exports.updateEventRsvpSchema = exports.eventRsvpBaseSchema.extend({
|
|
18
|
+
id: zod_1.z.coerce.number().int().positive(),
|
|
19
|
+
});
|
|
20
|
+
exports.saveEventRsvpSchema = exports.eventRsvpBaseSchema.extend({
|
|
21
|
+
id: zod_1.z.coerce.number().int().positive().optional(),
|
|
22
|
+
});
|
|
23
|
+
exports.getEventRsvpFilterSchema = zod_1.z.object({
|
|
24
|
+
event_id: zod_1.z.coerce.number().int().positive().optional(),
|
|
25
|
+
attendance_status: zod_1.z.enum(exports.attendanceStatusValues).optional(),
|
|
26
|
+
search: zod_1.z.string().trim().optional(),
|
|
27
|
+
page: zod_1.z.coerce.number().int().positive().optional(),
|
|
28
|
+
limit: zod_1.z.coerce.number().int().positive().max(100).optional(),
|
|
29
|
+
});
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Event.schema"), exports);
|
|
18
|
+
__exportStar(require("./EventRsvp.schema"), exports);
|
|
18
19
|
__exportStar(require("./EventTimeline.schema"), exports);
|
|
19
20
|
__exportStar(require("./EventWedding.schema"), exports);
|
|
20
21
|
__exportStar(require("./EventVenue.schema"), exports);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IEventTimeline } from './EventTimeline';
|
|
2
|
+
import type { IEventRsvp } from './EventRsvp';
|
|
2
3
|
import type { IEventWedding } from './EventWedding';
|
|
3
4
|
import type { IEventVenue } from './EventVenue';
|
|
4
5
|
export type IEvent = {
|
|
@@ -13,6 +14,7 @@ export type IEvent = {
|
|
|
13
14
|
slug: string;
|
|
14
15
|
wedding?: IEventWedding | null;
|
|
15
16
|
timeline?: IEventTimeline | null;
|
|
17
|
+
rsvps?: IEventRsvp[];
|
|
16
18
|
venue_id?: number | null;
|
|
17
19
|
venue?: IEventVenue | null;
|
|
18
20
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IEvent } from './Event';
|
|
2
|
+
export type IEventRsvp = {
|
|
3
|
+
id?: number;
|
|
4
|
+
event_id: number;
|
|
5
|
+
first_name: string;
|
|
6
|
+
last_name: string | null;
|
|
7
|
+
phone: string;
|
|
8
|
+
attendance_status: 'attending' | 'not_attending' | 'maybe';
|
|
9
|
+
guest_count: number;
|
|
10
|
+
message: string | null;
|
|
11
|
+
responded_at: string | Date | null;
|
|
12
|
+
created_at?: string | Date;
|
|
13
|
+
updated_at?: string | Date;
|
|
14
|
+
event?: IEvent;
|
|
15
|
+
};
|
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Event"), exports);
|
|
18
|
+
__exportStar(require("./EventRsvp"), exports);
|
|
18
19
|
__exportStar(require("./EventTimeline"), exports);
|
|
19
20
|
__exportStar(require("./EventWedding"), exports);
|
|
@@ -37,6 +37,7 @@ export * as AdminBoundary from "./geo/AdminBoundary";
|
|
|
37
37
|
export * as City from "./geo/City";
|
|
38
38
|
export * as District from "./geo/District";
|
|
39
39
|
export * as Event from './events/Event';
|
|
40
|
+
export * as EventRsvp from './events/EventRsvp';
|
|
40
41
|
export * as EventTimeline from './events/EventTimeline';
|
|
41
42
|
export * as EventWedding from './events/EventWedding';
|
|
42
43
|
export * as EventVenue from './events/EventVenue';
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -36,8 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = void 0;
|
|
39
|
+
exports.PotentialUser = exports.Loyalty = exports.Favorite = exports.Wallet = exports.Permission = exports.Role = exports.User = exports.EventVenue = exports.EventWedding = exports.EventTimeline = exports.EventRsvp = exports.Event = exports.District = exports.City = exports.AdminBoundary = exports.WorkType = exports.UsedProductCondition = exports.UsedProductAge = exports.Unit = exports.Transmission = exports.RegionalSpec = exports.PublisherType = exports.PropertyStatus = exports.PriceType = exports.OfferType = exports.LicenseType = exports.FuelType = exports.Feature = exports.Facility = exports.Currency = exports.Color = exports.CategoryWorkType = exports.Category = exports.CarBody = exports.UsedProduct = exports.Service = exports.PropertySubType = exports.Property = exports.MotorTrim = exports.Motor = exports.AdPromotion = exports.AdLocation = exports.Ad = exports.FilterParams = exports.Config = exports.AccessType = exports.Status = exports.Subject = exports.Response = exports.LocalizedName = void 0;
|
|
40
|
+
exports.Analysis = exports.Google = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = exports.Company = void 0;
|
|
41
41
|
// common
|
|
42
42
|
exports.LocalizedName = __importStar(require("./common/LocalizedName"));
|
|
43
43
|
exports.Response = __importStar(require("./common/Response"));
|
|
@@ -82,6 +82,7 @@ exports.City = __importStar(require("./geo/City"));
|
|
|
82
82
|
exports.District = __importStar(require("./geo/District"));
|
|
83
83
|
// events
|
|
84
84
|
exports.Event = __importStar(require("./events/Event"));
|
|
85
|
+
exports.EventRsvp = __importStar(require("./events/EventRsvp"));
|
|
85
86
|
exports.EventTimeline = __importStar(require("./events/EventTimeline"));
|
|
86
87
|
exports.EventWedding = __importStar(require("./events/EventWedding"));
|
|
87
88
|
exports.EventVenue = __importStar(require("./events/EventVenue"));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const attendanceStatusValues = ['attending', 'not_attending', 'maybe'];
|
|
3
|
+
export const eventRsvpBaseSchema = z.object({
|
|
4
|
+
event_id: z.coerce.number().int().positive(),
|
|
5
|
+
first_name: z.string().trim().min(1).max(150),
|
|
6
|
+
last_name: z.string().trim().max(150).nullable().optional(),
|
|
7
|
+
phone: z.string().trim().min(1).max(20),
|
|
8
|
+
attendance_status: z.enum(attendanceStatusValues),
|
|
9
|
+
guest_count: z.coerce.number().int().positive().max(100).default(1),
|
|
10
|
+
message: z.string().trim().max(5000).nullable().optional(),
|
|
11
|
+
responded_at: z.coerce.date().optional(),
|
|
12
|
+
});
|
|
13
|
+
export const createEventRsvpSchema = eventRsvpBaseSchema;
|
|
14
|
+
export const updateEventRsvpSchema = eventRsvpBaseSchema.extend({
|
|
15
|
+
id: z.coerce.number().int().positive(),
|
|
16
|
+
});
|
|
17
|
+
export const saveEventRsvpSchema = eventRsvpBaseSchema.extend({
|
|
18
|
+
id: z.coerce.number().int().positive().optional(),
|
|
19
|
+
});
|
|
20
|
+
export const getEventRsvpFilterSchema = z.object({
|
|
21
|
+
event_id: z.coerce.number().int().positive().optional(),
|
|
22
|
+
attendance_status: z.enum(attendanceStatusValues).optional(),
|
|
23
|
+
search: z.string().trim().optional(),
|
|
24
|
+
page: z.coerce.number().int().positive().optional(),
|
|
25
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
26
|
+
});
|
package/dist/esm/types/index.js
CHANGED
|
@@ -45,6 +45,7 @@ export * as City from "./geo/City.js";
|
|
|
45
45
|
export * as District from "./geo/District.js";
|
|
46
46
|
// events
|
|
47
47
|
export * as Event from './events/Event.js';
|
|
48
|
+
export * as EventRsvp from './events/EventRsvp.js';
|
|
48
49
|
export * as EventTimeline from './events/EventTimeline.js';
|
|
49
50
|
export * as EventWedding from './events/EventWedding.js';
|
|
50
51
|
export * as EventVenue from './events/EventVenue.js';
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyEvent = void 0;
|
|
4
|
-
var Event_dto_1 = require("./Event.dto");
|
|
5
|
-
Object.defineProperty(exports, "emptyEvent", { enumerable: true, get: function () { return Event_dto_1.emptyEvent; } });
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type LocalizedName } from '../../types/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,18 +0,0 @@
|
|
|
1
|
-
export declare const EventTemplate: {
|
|
2
|
-
WEDDING: {
|
|
3
|
-
value: string;
|
|
4
|
-
name: {
|
|
5
|
-
en: string;
|
|
6
|
-
ar: string;
|
|
7
|
-
};
|
|
8
|
-
event_types: string[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare const EventTemplateOptions: {
|
|
12
|
-
value: string;
|
|
13
|
-
name: {
|
|
14
|
-
en: string;
|
|
15
|
-
ar: string;
|
|
16
|
-
};
|
|
17
|
-
event_types: string[];
|
|
18
|
-
}[];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventTemplateOptions = exports.EventTemplate = void 0;
|
|
4
|
-
exports.EventTemplate = {
|
|
5
|
-
WEDDING: { value: 'wedding-1', name: { en: 'Wedding', ar: 'زفاف' }, event_types: ['wedding'] },
|
|
6
|
-
};
|
|
7
|
-
exports.EventTemplateOptions = Object.values(exports.EventTemplate).map((type) => ({
|
|
8
|
-
value: type.value,
|
|
9
|
-
name: type.name,
|
|
10
|
-
event_types: type.event_types,
|
|
11
|
-
}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyEventTemplate = void 0;
|
|
4
|
-
const LocalizedName_1 = require("../../types/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
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventTypeOptions = exports.EventTypes = void 0;
|
|
4
|
-
exports.EventTypes = {
|
|
5
|
-
WEDDING: { value: 'wedding', name: { en: 'Wedding', ar: 'زفاف' } },
|
|
6
|
-
};
|
|
7
|
-
exports.EventTypeOptions = Object.values(exports.EventTypes).map((type) => ({
|
|
8
|
-
value: type.value,
|
|
9
|
-
name: type.name,
|
|
10
|
-
}));
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emptyEventType = void 0;
|
|
4
|
-
var EventType_dto_1 = require("./EventType.dto");
|
|
5
|
-
Object.defineProperty(exports, "emptyEventType", { enumerable: true, get: function () { return EventType_dto_1.emptyEventType; } });
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IEvent } from './Event';
|
|
2
|
-
import type { IEventTemplate } from './EventTemplate';
|
|
3
|
-
export type IEventWedding = {
|
|
4
|
-
id?: number;
|
|
5
|
-
event_id: number;
|
|
6
|
-
event_template_id: number;
|
|
7
|
-
cover: Record<string, any> | null;
|
|
8
|
-
event?: IEvent;
|
|
9
|
-
eventTemplate?: IEventTemplate;
|
|
10
|
-
};
|
|
11
|
-
export declare const emptyEventWedding: IEventWedding;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.localizedNameSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.localizedNameSchema = zod_1.z.object({
|
|
6
|
-
en: zod_1.z.string().trim().min(1),
|
|
7
|
-
ar: zod_1.z.string().trim().min(1),
|
|
8
|
-
});
|