@deallony/shared 1.2.80 → 1.2.81

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 (101) hide show
  1. package/dist/cjs/constants/events/EventBirthday.d.ts +2 -0
  2. package/dist/cjs/constants/events/EventBirthday.js +12 -0
  3. package/dist/cjs/constants/events/EventCustomization.d.ts +21 -0
  4. package/dist/cjs/constants/events/EventCustomization.js +23 -2
  5. package/dist/cjs/constants/events/EventDressCode.d.ts +65 -0
  6. package/dist/cjs/constants/events/EventDressCode.js +56 -0
  7. package/dist/cjs/constants/events/EventOccasion.d.ts +63 -0
  8. package/dist/cjs/constants/events/EventOccasion.js +242 -0
  9. package/dist/cjs/constants/events/EventPreview.d.ts +3 -0
  10. package/dist/cjs/constants/events/EventPreview.js +9 -1
  11. package/dist/cjs/constants/events/EventTemplate.d.ts +518 -10
  12. package/dist/cjs/constants/events/EventTemplate.js +81 -11
  13. package/dist/cjs/constants/events/EventTextPolicy.d.ts +7 -0
  14. package/dist/cjs/constants/events/EventTextPolicy.js +66 -0
  15. package/dist/cjs/constants/events/EventType.d.ts +273 -8
  16. package/dist/cjs/constants/events/EventType.js +38 -2
  17. package/dist/cjs/constants/events/EventVisibility.d.ts +19 -0
  18. package/dist/cjs/constants/events/EventVisibility.js +18 -0
  19. package/dist/cjs/constants/events/EventWedding.js +3 -0
  20. package/dist/cjs/constants/events/EventWeddingReligion.d.ts +72 -0
  21. package/dist/cjs/constants/events/EventWeddingReligion.js +126 -0
  22. package/dist/cjs/constants/events/index.d.ts +6 -0
  23. package/dist/cjs/constants/events/index.js +6 -0
  24. package/dist/cjs/constants/routes/app.d.ts +42 -0
  25. package/dist/cjs/constants/routes/app.js +14 -0
  26. package/dist/cjs/dto/events/EventBirthday.dto.d.ts +3 -0
  27. package/dist/cjs/dto/events/EventBirthday.dto.js +2 -0
  28. package/dist/cjs/dto/events/EventOccasion.dto.d.ts +3 -0
  29. package/dist/cjs/dto/events/EventOccasion.dto.js +2 -0
  30. package/dist/cjs/dto/events/index.d.ts +2 -0
  31. package/dist/cjs/dto/events/index.js +2 -0
  32. package/dist/cjs/schema/communication/ai-conversation.schema.d.ts +53 -1
  33. package/dist/cjs/schema/communication/ai-conversation.schema.js +28 -3
  34. package/dist/cjs/schema/communication/support-ticket.schema.d.ts +136 -0
  35. package/dist/cjs/schema/communication/support-ticket.schema.js +47 -2
  36. package/dist/cjs/schema/events/Event.schema.d.ts +294 -0
  37. package/dist/cjs/schema/events/Event.schema.js +48 -1
  38. package/dist/cjs/schema/events/EventBirthday.schema.d.ts +19 -0
  39. package/dist/cjs/schema/events/EventBirthday.schema.js +17 -0
  40. package/dist/cjs/schema/events/EventOccasion.schema.d.ts +22 -0
  41. package/dist/cjs/schema/events/EventOccasion.schema.js +31 -0
  42. package/dist/cjs/schema/events/EventRsvp.schema.d.ts +4 -0
  43. package/dist/cjs/schema/events/EventRsvp.schema.js +1 -0
  44. package/dist/cjs/schema/events/EventTimeline.schema.d.ts +5 -0
  45. package/dist/cjs/schema/events/EventTimeline.schema.js +14 -1
  46. package/dist/cjs/schema/events/EventWedding.schema.d.ts +32 -0
  47. package/dist/cjs/schema/events/EventWedding.schema.js +11 -0
  48. package/dist/cjs/schema/events/index.d.ts +2 -0
  49. package/dist/cjs/schema/events/index.js +2 -0
  50. package/dist/cjs/types/communication/Notification.d.ts +13 -2
  51. package/dist/cjs/types/communication/Notification.js +8 -0
  52. package/dist/cjs/types/events/Event.d.ts +14 -1
  53. package/dist/cjs/types/events/EventBirthday.d.ts +17 -0
  54. package/dist/cjs/types/events/EventBirthday.js +2 -0
  55. package/dist/cjs/types/events/EventCustomization.d.ts +4 -0
  56. package/dist/cjs/types/events/EventDressCode.d.ts +13 -0
  57. package/dist/cjs/types/events/EventDressCode.js +2 -0
  58. package/dist/cjs/types/events/EventOccasion.d.ts +24 -0
  59. package/dist/cjs/types/events/EventOccasion.js +2 -0
  60. package/dist/cjs/types/events/EventRsvp.d.ts +2 -0
  61. package/dist/cjs/types/events/EventTimeline.d.ts +2 -0
  62. package/dist/cjs/types/events/EventWedding.d.ts +7 -0
  63. package/dist/cjs/types/events/index.d.ts +3 -0
  64. package/dist/cjs/types/events/index.js +3 -0
  65. package/dist/cjs/types/index.d.ts +3 -0
  66. package/dist/cjs/types/index.js +5 -2
  67. package/dist/cjs/types/user/SavedSearch.d.ts +38 -0
  68. package/dist/cjs/types/user/SavedSearch.js +11 -0
  69. package/dist/esm/constants/events/EventBirthday.js +9 -0
  70. package/dist/esm/constants/events/EventCustomization.js +21 -1
  71. package/dist/esm/constants/events/EventDressCode.js +49 -0
  72. package/dist/esm/constants/events/EventOccasion.js +235 -0
  73. package/dist/esm/constants/events/EventPreview.js +7 -0
  74. package/dist/esm/constants/events/EventTemplate.js +78 -10
  75. package/dist/esm/constants/events/EventTextPolicy.js +61 -0
  76. package/dist/esm/constants/events/EventType.js +34 -1
  77. package/dist/esm/constants/events/EventVisibility.js +15 -0
  78. package/dist/esm/constants/events/EventWedding.js +3 -0
  79. package/dist/esm/constants/events/EventWeddingReligion.js +118 -0
  80. package/dist/esm/constants/events/index.js +6 -0
  81. package/dist/esm/constants/routes/app.js +14 -0
  82. package/dist/esm/dto/events/EventBirthday.dto.js +1 -0
  83. package/dist/esm/dto/events/EventOccasion.dto.js +1 -0
  84. package/dist/esm/dto/events/index.js +2 -0
  85. package/dist/esm/schema/communication/ai-conversation.schema.js +27 -2
  86. package/dist/esm/schema/communication/support-ticket.schema.js +46 -1
  87. package/dist/esm/schema/events/Event.schema.js +48 -1
  88. package/dist/esm/schema/events/EventBirthday.schema.js +14 -0
  89. package/dist/esm/schema/events/EventOccasion.schema.js +28 -0
  90. package/dist/esm/schema/events/EventRsvp.schema.js +1 -0
  91. package/dist/esm/schema/events/EventTimeline.schema.js +14 -1
  92. package/dist/esm/schema/events/EventWedding.schema.js +11 -0
  93. package/dist/esm/schema/events/index.js +2 -0
  94. package/dist/esm/types/communication/Notification.js +8 -0
  95. package/dist/esm/types/events/EventBirthday.js +1 -0
  96. package/dist/esm/types/events/EventDressCode.js +1 -0
  97. package/dist/esm/types/events/EventOccasion.js +1 -0
  98. package/dist/esm/types/events/index.js +3 -0
  99. package/dist/esm/types/index.js +3 -0
  100. package/dist/esm/types/user/SavedSearch.js +8 -0
  101. package/package.json +1 -1
@@ -2,12 +2,14 @@ import { z } from 'zod';
2
2
  export declare const timelinePayloadSchema: z.ZodObject<{
3
3
  title: z.ZodString;
4
4
  start_time: z.ZodString;
5
+ place: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
6
  }, z.core.$strip>;
6
7
  export declare const eventTimelineBaseSchema: z.ZodObject<{
7
8
  event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
8
9
  timelines: z.ZodArray<z.ZodObject<{
9
10
  title: z.ZodString;
10
11
  start_time: z.ZodString;
12
+ place: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
13
  }, z.core.$strip>>;
12
14
  }, z.core.$strip>;
13
15
  export declare const createEventTimelineSchema: z.ZodObject<{
@@ -15,6 +17,7 @@ export declare const createEventTimelineSchema: z.ZodObject<{
15
17
  timelines: z.ZodArray<z.ZodObject<{
16
18
  title: z.ZodString;
17
19
  start_time: z.ZodString;
20
+ place: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
21
  }, z.core.$strip>>;
19
22
  }, z.core.$strip>;
20
23
  export declare const updateEventTimelineSchema: z.ZodObject<{
@@ -22,6 +25,7 @@ export declare const updateEventTimelineSchema: z.ZodObject<{
22
25
  timelines: z.ZodArray<z.ZodObject<{
23
26
  title: z.ZodString;
24
27
  start_time: z.ZodString;
28
+ place: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
29
  }, z.core.$strip>>;
26
30
  id: z.ZodCoercedNumber<unknown>;
27
31
  }, z.core.$strip>;
@@ -30,6 +34,7 @@ export declare const saveEventTimelineSchema: z.ZodObject<{
30
34
  timelines: z.ZodArray<z.ZodObject<{
31
35
  title: z.ZodString;
32
36
  start_time: z.ZodString;
37
+ place: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
38
  }, z.core.$strip>>;
34
39
  id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
35
40
  }, z.core.$strip>;
@@ -2,9 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getEventTimelineFilterSchema = exports.saveEventTimelineSchema = exports.updateEventTimelineSchema = exports.createEventTimelineSchema = exports.eventTimelineBaseSchema = exports.timelinePayloadSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const EventTextPolicy_1 = require("../../constants/events/EventTextPolicy");
5
6
  exports.timelinePayloadSchema = zod_1.z.object({
6
- title: zod_1.z.string().trim().min(1).max(255),
7
+ title: zod_1.z
8
+ .string()
9
+ .trim()
10
+ .min(1)
11
+ .max(255)
12
+ .refine((v) => !(0, EventTextPolicy_1.hasBlockedReligiousText)(v), { message: EventTextPolicy_1.BLOCKED_RELIGIOUS_TEXT_MESSAGE.ar }),
7
13
  start_time: zod_1.z.string().trim().regex(/^([01]\d|2[0-3]):([0-5]\d)$/),
14
+ place: zod_1.z
15
+ .string()
16
+ .trim()
17
+ .max(255)
18
+ .refine((v) => !(0, EventTextPolicy_1.hasBlockedReligiousText)(v), { message: EventTextPolicy_1.BLOCKED_RELIGIOUS_TEXT_MESSAGE.ar })
19
+ .nullable()
20
+ .optional(),
8
21
  });
9
22
  exports.eventTimelineBaseSchema = zod_1.z.object({
10
23
  event_id: zod_1.z.coerce.number().int().positive().optional(),
@@ -8,6 +8,14 @@ export declare const eventWeddingBaseSchema: z.ZodObject<{
8
8
  last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  bride_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
10
  groom_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ religion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
12
+ muslim: "muslim";
13
+ general: "general";
14
+ }>>>;
15
+ verse_key: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
16
+ [x: string]: string;
17
+ }>>>;
18
+ custom_verse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
19
  }, z.core.$strip>;
12
20
  export declare const createEventWeddingSchema: z.ZodObject<{
13
21
  event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -18,6 +26,14 @@ export declare const createEventWeddingSchema: z.ZodObject<{
18
26
  last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
27
  bride_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
28
  groom_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
+ religion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
30
+ muslim: "muslim";
31
+ general: "general";
32
+ }>>>;
33
+ verse_key: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
34
+ [x: string]: string;
35
+ }>>>;
36
+ custom_verse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
37
  }, z.core.$strip>;
22
38
  export declare const updateEventWeddingSchema: z.ZodObject<{
23
39
  event_id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -28,6 +44,14 @@ export declare const updateEventWeddingSchema: z.ZodObject<{
28
44
  last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
45
  bride_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
46
  groom_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ religion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
48
+ muslim: "muslim";
49
+ general: "general";
50
+ }>>>;
51
+ verse_key: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
52
+ [x: string]: string;
53
+ }>>>;
54
+ custom_verse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
55
  id: z.ZodCoercedNumber<unknown>;
32
56
  }, z.core.$strip>;
33
57
  export declare const saveEventWeddingSchema: z.ZodObject<{
@@ -39,6 +63,14 @@ export declare const saveEventWeddingSchema: z.ZodObject<{
39
63
  last_groom_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
64
  bride_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
65
  groom_phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ religion: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
67
+ muslim: "muslim";
68
+ general: "general";
69
+ }>>>;
70
+ verse_key: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
71
+ [x: string]: string;
72
+ }>>>;
73
+ custom_verse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
74
  id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
43
75
  }, z.core.$strip>;
44
76
  export declare const getEventWeddingFilterSchema: z.ZodObject<{
@@ -3,6 +3,8 @@ 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
  const Phone_schema_1 = require("../common/Phone.schema");
6
+ const EventWeddingReligion_1 = require("../../constants/events/EventWeddingReligion");
7
+ const EventTextPolicy_1 = require("../../constants/events/EventTextPolicy");
6
8
  exports.eventWeddingBaseSchema = zod_1.z.object({
7
9
  event_id: zod_1.z.coerce.number().int().positive().optional(),
8
10
  cover: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullable().optional(),
@@ -12,6 +14,15 @@ exports.eventWeddingBaseSchema = zod_1.z.object({
12
14
  last_groom_name: zod_1.z.string().trim().max(255).nullable().optional(),
13
15
  bride_phone: Phone_schema_1.internationalPhoneSchema.nullable().optional(),
14
16
  groom_phone: Phone_schema_1.internationalPhoneSchema.nullable().optional(),
17
+ religion: zod_1.z.enum(EventWeddingReligion_1.EventWeddingReligionValues).nullable().optional(),
18
+ verse_key: zod_1.z.enum(EventWeddingReligion_1.EventWeddingVerseValues).nullable().optional(),
19
+ custom_verse: zod_1.z
20
+ .string()
21
+ .trim()
22
+ .max(EventWeddingReligion_1.EVENT_WEDDING_CUSTOM_VERSE_MAX)
23
+ .refine((v) => !(0, EventTextPolicy_1.hasBlockedReligiousText)(v), { message: EventTextPolicy_1.BLOCKED_RELIGIOUS_TEXT_MESSAGE.ar })
24
+ .nullable()
25
+ .optional(),
15
26
  });
16
27
  exports.createEventWeddingSchema = exports.eventWeddingBaseSchema;
17
28
  exports.updateEventWeddingSchema = exports.eventWeddingBaseSchema.extend({
@@ -2,5 +2,7 @@ export * from "./Event.schema";
2
2
  export * from "./EventRsvp.schema";
3
3
  export * from "./EventTimeline.schema";
4
4
  export * from "./EventWedding.schema";
5
+ export * from "./EventBirthday.schema";
6
+ export * from "./EventOccasion.schema";
5
7
  export * from "./EventVenue.schema";
6
8
  export { internationalPhoneSchema } from "../common/Phone.schema";
@@ -19,6 +19,8 @@ __exportStar(require("./Event.schema"), exports);
19
19
  __exportStar(require("./EventRsvp.schema"), exports);
20
20
  __exportStar(require("./EventTimeline.schema"), exports);
21
21
  __exportStar(require("./EventWedding.schema"), exports);
22
+ __exportStar(require("./EventBirthday.schema"), exports);
23
+ __exportStar(require("./EventOccasion.schema"), exports);
22
24
  __exportStar(require("./EventVenue.schema"), exports);
23
25
  var Phone_schema_1 = require("../common/Phone.schema");
24
26
  Object.defineProperty(exports, "internationalPhoneSchema", { enumerable: true, get: function () { return Phone_schema_1.internationalPhoneSchema; } });
@@ -14,14 +14,20 @@ export declare enum NotificationTypeEnum {
14
14
  /** Loyalty points earned */
15
15
  POINTS_EARNED = "points_earned",
16
16
  /** Sent by Deallony from the dashboard */
17
- DEALLONY_NEWS = "deallony_news"
17
+ DEALLONY_NEWS = "deallony_news",
18
+ /** A guest opened their personal invitation or replied to it */
19
+ EVENT_GUESTS = "event_guests",
20
+ /** New ads match one of the user's saved searches */
21
+ SAVED_SEARCH = "saved_search"
18
22
  }
19
23
  /** How the centre groups types for its filter chips and settings */
20
24
  export declare enum NotificationCategoryEnum {
21
25
  FAVORITES = "favorites",
22
26
  MY_ADS = "my_ads",
23
27
  POINTS = "points",
24
- DEALLONY = "deallony"
28
+ DEALLONY = "deallony",
29
+ EVENTS = "events",
30
+ SAVED_SEARCHES = "saved_searches"
25
31
  }
26
32
  export declare const NOTIFICATION_CATEGORY: Record<NotificationTypeEnum, NotificationCategoryEnum>;
27
33
  export type NotificationText = {
@@ -42,6 +48,11 @@ export type INotificationData = {
42
48
  route?: unknown;
43
49
  points?: number;
44
50
  expires_at?: Date | string | null;
51
+ /** EVENT_GUESTS: the event and the guest it is about */
52
+ event_id?: number;
53
+ rsvp_id?: number;
54
+ /** SAVED_SEARCH: the saved search the new ads (ad_ids, count) match */
55
+ saved_search_id?: number;
45
56
  };
46
57
  export type INotification = {
47
58
  id: number;
@@ -18,6 +18,10 @@ var NotificationTypeEnum;
18
18
  NotificationTypeEnum["POINTS_EARNED"] = "points_earned";
19
19
  /** Sent by Deallony from the dashboard */
20
20
  NotificationTypeEnum["DEALLONY_NEWS"] = "deallony_news";
21
+ /** A guest opened their personal invitation or replied to it */
22
+ NotificationTypeEnum["EVENT_GUESTS"] = "event_guests";
23
+ /** New ads match one of the user's saved searches */
24
+ NotificationTypeEnum["SAVED_SEARCH"] = "saved_search";
21
25
  })(NotificationTypeEnum || (exports.NotificationTypeEnum = NotificationTypeEnum = {}));
22
26
  /** How the centre groups types for its filter chips and settings */
23
27
  var NotificationCategoryEnum;
@@ -26,6 +30,8 @@ var NotificationCategoryEnum;
26
30
  NotificationCategoryEnum["MY_ADS"] = "my_ads";
27
31
  NotificationCategoryEnum["POINTS"] = "points";
28
32
  NotificationCategoryEnum["DEALLONY"] = "deallony";
33
+ NotificationCategoryEnum["EVENTS"] = "events";
34
+ NotificationCategoryEnum["SAVED_SEARCHES"] = "saved_searches";
29
35
  })(NotificationCategoryEnum || (exports.NotificationCategoryEnum = NotificationCategoryEnum = {}));
30
36
  exports.NOTIFICATION_CATEGORY = {
31
37
  [NotificationTypeEnum.FAVORITE_PRICE_DROP]: NotificationCategoryEnum.FAVORITES,
@@ -37,4 +43,6 @@ exports.NOTIFICATION_CATEGORY = {
37
43
  [NotificationTypeEnum.AD_SAVED]: NotificationCategoryEnum.MY_ADS,
38
44
  [NotificationTypeEnum.POINTS_EARNED]: NotificationCategoryEnum.POINTS,
39
45
  [NotificationTypeEnum.DEALLONY_NEWS]: NotificationCategoryEnum.DEALLONY,
46
+ [NotificationTypeEnum.EVENT_GUESTS]: NotificationCategoryEnum.EVENTS,
47
+ [NotificationTypeEnum.SAVED_SEARCH]: NotificationCategoryEnum.SAVED_SEARCHES,
40
48
  };
@@ -1,11 +1,14 @@
1
1
  import type { IEventTimeline } from "./EventTimeline";
2
2
  import type { IEventRsvp } from "./EventRsvp";
3
3
  import type { IEventWedding } from "./EventWedding";
4
+ import type { IEventBirthday } from "./EventBirthday";
5
+ import type { IEventOccasion } from "./EventOccasion";
4
6
  import type { IEventVenue } from "./EventVenue";
5
7
  import type { IEventCustomization } from "./EventCustomization";
8
+ import type { IEventDressCode } from "./EventDressCode";
6
9
  export type { IEventCustomization };
7
10
  import type { IUser } from "../user/User";
8
- import { EventInvitationScanType } from "../../constants/events";
11
+ import { EventInvitationScanType, EventVisibility } from "../../constants/events";
9
12
  export type IEvent = {
10
13
  id?: number;
11
14
  lat: number | null;
@@ -17,9 +20,17 @@ export type IEvent = {
17
20
  event_template: string | null;
18
21
  slug: string;
19
22
  invitation_scan_type: EventInvitationScanType;
23
+ /** private (default): link only, never listed or indexed; public: can be listed and indexed */
24
+ visibility?: EventVisibility;
20
25
  /** Owner customization of the invitation page; null keeps the template look */
21
26
  customization?: IEventCustomization | null;
27
+ /** Optional dress code for guests; null hides it */
28
+ dress_code?: IEventDressCode | null;
22
29
  wedding?: IEventWedding | null;
30
+ /** @deprecated birthdays are in `occasion` since 2026-11 */
31
+ birthday?: IEventBirthday | null;
32
+ /** Set for occasion types (birthday, graduation, newborn, ...): see CONSTANTS.EVENTS.isOccasionEventType */
33
+ occasion?: IEventOccasion | null;
23
34
  timeline?: IEventTimeline | null;
24
35
  rsvps?: IEventRsvp[];
25
36
  venue_id?: number | null;
@@ -35,4 +46,6 @@ export type IEvent = {
35
46
  public_url?: string | null;
36
47
  /** Private preview page that works before publishing; returned to the owner only */
37
48
  preview_url?: string | null;
49
+ /** Couple's secret guest-management page; returned to the owner only */
50
+ manage_url?: string | null;
38
51
  };
@@ -0,0 +1,17 @@
1
+ import { IFile } from '../media';
2
+ import type { IEvent } from './Event';
3
+ /** Birthday details of an event whose event_type is birthday */
4
+ export type IEventBirthday = {
5
+ id?: number;
6
+ event_id?: number;
7
+ cover: IFile | null;
8
+ /** Whose birthday it is, e.g. «ريم» */
9
+ celebrant_name: string | null;
10
+ /** The age they are turning, shown large on the invitation */
11
+ age: number | null;
12
+ /** Who invites, e.g. «والدا ريم» */
13
+ host_name: string | null;
14
+ /** Contact number, never shown to guests */
15
+ phone: string | null;
16
+ event?: IEvent;
17
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,4 +13,8 @@ export type IEventCustomization = {
13
13
  rsvp_message?: string | null;
14
14
  /** EventCustomizationTracks value */
15
15
  music?: string | null;
16
+ /** EventCustomizationOpening value: how the invitation opens; empty keeps the template's own */
17
+ opening?: string | null;
18
+ /** False stops the page scrolling by itself; empty means on */
19
+ auto_scroll?: boolean | null;
16
20
  };
@@ -0,0 +1,13 @@
1
+ import type { EventDressCodeColorMode, EventDressCodeStyle } from "../../constants/events/EventDressCode";
2
+ /** Optional dress code shown on the invitation; null or empty hides the section */
3
+ export type IEventDressCode = {
4
+ style?: EventDressCodeStyle | null;
5
+ /** Colours guests are asked to wear (EventDressCodeColors values, any number) */
6
+ colors?: string[] | null;
7
+ /** Colours guests should not wear (EventDressCodeColors values, any number) */
8
+ avoid_colors?: string[] | null;
9
+ /** @deprecated old saves: "avoid" meant `colors` were colours to avoid; new saves use avoid_colors */
10
+ color_mode?: EventDressCodeColorMode | null;
11
+ /** Short note for guests, at most EVENT_DRESS_CODE_NOTE_MAX characters */
12
+ note?: string | null;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { IFile } from '../media';
2
+ import type { IEvent } from './Event';
3
+ /**
4
+ * Details of an event whose type stores them in event.occasion (birthday, graduation, newborn, ...).
5
+ * The form and wording of each type come from CONSTANTS.EVENTS.EventOccasionTypeConfigs.
6
+ */
7
+ export type IEventOccasion = {
8
+ id?: number;
9
+ event_id?: number;
10
+ /** Main name: the celebrant, baby, graduate, pilgrim, shop, or the party title */
11
+ primary_name: string | null;
12
+ /** Second name when the type has one (partner, second pilgrim) */
13
+ secondary_name: string | null;
14
+ /** Who invites, e.g. «عائلة الأحمد» */
15
+ host_name: string | null;
16
+ /** Organiser's number, never shown to guests */
17
+ phone: string | null;
18
+ cover: IFile | null;
19
+ /** Extra pictures for designs that show more than one (the cover is the first picture) */
20
+ photos?: (IFile | null)[] | null;
21
+ /** The type's own fields, e.g. { age: 7 } or { institution, major, class_year } */
22
+ details: Record<string, any>;
23
+ event?: IEvent;
24
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,8 @@ export type IEventRsvp = {
8
8
  attendance_status: 'attending' | 'not_attending' | 'maybe';
9
9
  guest_count: number;
10
10
  message: string | null;
11
+ /** Extra answers with the reply, e.g. { gender_guess: 'boy' } for a gender reveal */
12
+ answers?: Record<string, any> | null;
11
13
  responded_at: string | Date | null;
12
14
  created_at?: string | Date;
13
15
  updated_at?: string | Date;
@@ -2,6 +2,8 @@ import type { IEvent } from './Event';
2
2
  export type ITimelinePayload = {
3
3
  title: string;
4
4
  start_time: string;
5
+ /** Optional place of this item (e.g. the marriage ceremony), shown with a map search link */
6
+ place?: string | null;
5
7
  };
6
8
  export type IEventTimeline = {
7
9
  id?: number;
@@ -1,3 +1,4 @@
1
+ import type { EventWeddingReligion } from '../../constants/events/EventWeddingReligion';
1
2
  import { IFile } from '../media';
2
3
  import type { IEvent } from './Event';
3
4
  export type IEventWedding = {
@@ -10,5 +11,11 @@ export type IEventWedding = {
10
11
  last_groom_name: string | null;
11
12
  bride_phone: string | null;
12
13
  groom_phone: string | null;
14
+ /** EventWeddingReligion value; missing = muslim */
15
+ religion?: EventWeddingReligion | null;
16
+ /** EventWeddingVerses value; missing = the style's first verse */
17
+ verse_key?: string | null;
18
+ /** Hand-written couple's words when verse_key is "custom" (general style) */
19
+ custom_verse?: string | null;
13
20
  event?: IEvent;
14
21
  };
@@ -2,4 +2,7 @@ export * from './Event';
2
2
  export * from './EventRsvp';
3
3
  export * from './EventTimeline';
4
4
  export * from './EventWedding';
5
+ export * from './EventBirthday';
6
+ export * from './EventOccasion';
5
7
  export * from './EventCustomization';
8
+ export * from "./EventDressCode";
@@ -18,4 +18,7 @@ __exportStar(require("./Event"), exports);
18
18
  __exportStar(require("./EventRsvp"), exports);
19
19
  __exportStar(require("./EventTimeline"), exports);
20
20
  __exportStar(require("./EventWedding"), exports);
21
+ __exportStar(require("./EventBirthday"), exports);
22
+ __exportStar(require("./EventOccasion"), exports);
21
23
  __exportStar(require("./EventCustomization"), exports);
24
+ __exportStar(require("./EventDressCode"), exports);
@@ -42,12 +42,15 @@ export * as Event from './events/Event';
42
42
  export * as EventRsvp from './events/EventRsvp';
43
43
  export * as EventTimeline from './events/EventTimeline';
44
44
  export * as EventWedding from './events/EventWedding';
45
+ export * as EventBirthday from './events/EventBirthday';
46
+ export * as EventOccasion from './events/EventOccasion';
45
47
  export * as EventVenue from './events/EventVenue';
46
48
  export * as User from "./user/User";
47
49
  export * as Role from "./user/Role";
48
50
  export * as Permission from "./user/Permission";
49
51
  export * as Wallet from "./user/Wallet";
50
52
  export * as Favorite from "./user/Favorite";
53
+ export * as SavedSearch from "./user/SavedSearch";
51
54
  export * as Loyalty from "./user/Loyalty";
52
55
  export * as PotentialUser from "./user/PotentialUser";
53
56
  export * as Company from './company/Company';
@@ -36,8 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- 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.Addresses = exports.AdDailyViews = exports.AdLocation = exports.Ad = exports.FilterParams = exports.ModuleFetchEndpoints = exports.Config = exports.AccessType = exports.Status = exports.Response = exports.LocalizedName = void 0;
40
- exports.Payment = exports.Analysis = exports.GeminiApiKey = exports.Google = exports.Kyc = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.File = exports.Notification = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = exports.Company = exports.PotentialUser = exports.Loyalty = void 0;
39
+ exports.Permission = exports.Role = exports.User = exports.EventVenue = exports.EventOccasion = exports.EventBirthday = 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.Addresses = exports.AdDailyViews = exports.AdLocation = exports.Ad = exports.FilterParams = exports.ModuleFetchEndpoints = exports.Config = exports.AccessType = exports.Status = exports.Response = exports.LocalizedName = void 0;
40
+ exports.Payment = exports.Analysis = exports.GeminiApiKey = exports.Google = exports.Kyc = exports.SocialMediaProfile = exports.SocialMediaPlatform = exports.Image = exports.Media = exports.File = exports.Notification = exports.NotificationToken = exports.MessageTemplate = exports.Device = exports.Chat = exports.AppStartScreen = exports.MetaData = exports.Company = exports.PotentialUser = exports.Loyalty = exports.SavedSearch = exports.Favorite = exports.Wallet = void 0;
41
41
  // common
42
42
  exports.LocalizedName = __importStar(require("./common/LocalizedName"));
43
43
  exports.Response = __importStar(require("./common/Response"));
@@ -87,6 +87,8 @@ exports.Event = __importStar(require("./events/Event"));
87
87
  exports.EventRsvp = __importStar(require("./events/EventRsvp"));
88
88
  exports.EventTimeline = __importStar(require("./events/EventTimeline"));
89
89
  exports.EventWedding = __importStar(require("./events/EventWedding"));
90
+ exports.EventBirthday = __importStar(require("./events/EventBirthday"));
91
+ exports.EventOccasion = __importStar(require("./events/EventOccasion"));
90
92
  exports.EventVenue = __importStar(require("./events/EventVenue"));
91
93
  // user
92
94
  exports.User = __importStar(require("./user/User"));
@@ -94,6 +96,7 @@ exports.Role = __importStar(require("./user/Role"));
94
96
  exports.Permission = __importStar(require("./user/Permission"));
95
97
  exports.Wallet = __importStar(require("./user/Wallet"));
96
98
  exports.Favorite = __importStar(require("./user/Favorite"));
99
+ exports.SavedSearch = __importStar(require("./user/SavedSearch"));
97
100
  exports.Loyalty = __importStar(require("./user/Loyalty"));
98
101
  exports.PotentialUser = __importStar(require("./user/PotentialUser"));
99
102
  exports.Company = __importStar(require("./company/Company"));
@@ -0,0 +1,38 @@
1
+ import { GetAdsFilterDto, SubjectTable } from "../ad/Ad";
2
+ /** How often a saved search alerts: as new ads come in, or one summary each morning */
3
+ export declare enum SavedSearchFrequency {
4
+ INSTANT = "instant",
5
+ DAILY = "daily"
6
+ }
7
+ /** Most saved searches one user can keep */
8
+ export declare const SAVED_SEARCH_LIMIT = 20;
9
+ /** The filter as the ads list uses it, without paging or sorting */
10
+ export type SavedSearchFilter = Omit<GetAdsFilterDto, "page" | "limit" | "sort_by" | "sort_order">;
11
+ /** A user's saved ad search ("بحثي المحفوظ"). New matching ads are announced as SAVED_SEARCH notifications. */
12
+ export type ISavedSearch = {
13
+ id: number;
14
+ user_id: number;
15
+ name: string;
16
+ subject_type: SubjectTable;
17
+ filter: SavedSearchFilter;
18
+ /** Alerts for new matching ads */
19
+ notify: boolean;
20
+ frequency: SavedSearchFrequency;
21
+ /** When the user last opened its results; ads newer than this are "new" */
22
+ last_opened_at: Date | string | null;
23
+ created_at: Date | string;
24
+ updated_at?: Date | string;
25
+ /** Sent with the list: matching ads posted since last_opened_at (at most 99) */
26
+ new_count?: number;
27
+ /** Sent with the list: ids of those new ads, newest first (at most 20) */
28
+ new_ad_ids?: number[];
29
+ };
30
+ export type CreateSavedSearchDto = {
31
+ name: string;
32
+ filter: SavedSearchFilter & {
33
+ subject_type: SubjectTable;
34
+ };
35
+ notify?: boolean;
36
+ frequency?: SavedSearchFrequency;
37
+ };
38
+ export type UpdateSavedSearchDto = Partial<CreateSavedSearchDto>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SAVED_SEARCH_LIMIT = exports.SavedSearchFrequency = void 0;
4
+ /** How often a saved search alerts: as new ads come in, or one summary each morning */
5
+ var SavedSearchFrequency;
6
+ (function (SavedSearchFrequency) {
7
+ SavedSearchFrequency["INSTANT"] = "instant";
8
+ SavedSearchFrequency["DAILY"] = "daily";
9
+ })(SavedSearchFrequency || (exports.SavedSearchFrequency = SavedSearchFrequency = {}));
10
+ /** Most saved searches one user can keep */
11
+ exports.SAVED_SEARCH_LIMIT = 20;
@@ -0,0 +1,9 @@
1
+ export const emptyEventBirthday = {
2
+ id: 0,
3
+ event_id: 0,
4
+ cover: null,
5
+ celebrant_name: null,
6
+ age: null,
7
+ host_name: null,
8
+ phone: null,
9
+ };
@@ -17,7 +17,9 @@ export const EventCustomizationFonts = [
17
17
  ];
18
18
  /** Music the owner can pick; add a track here once its file is on the event site under /music */
19
19
  export const EventCustomizationTracks = [
20
- { value: "wedding-theme", name: { en: "Wedding theme", ar: "لحن الزفاف" }, src: "/music/wedding-theme.mp3" },
20
+ { value: "wedding-theme", name: { en: "Wedding theme", ar: "لحن الزفاف" }, src: "/music/wedding-theme.mp3", event_types: ["wedding", "engagement", "marriage", "proposal", "valentine"] },
21
+ { value: "birthday-theme", name: { en: "Happy birthday", ar: "لحن عيد الميلاد" }, src: "/music/birthday-theme.mp3", event_types: ["birthday"] },
22
+ { value: "celebration-theme", name: { en: "Celebration", ar: "لحن الاحتفال" }, src: "/music/celebration-theme.mp3", event_types: ["bachelor", "newborn", "gender_reveal", "circumcision", "graduation", "hajj", "mothers_day", "valentine", "opening", "general", "proposal", "engagement", "marriage"] },
21
23
  ];
22
24
  export const EventCustomizationSection = {
23
25
  COUNTDOWN: "countdown",
@@ -26,6 +28,7 @@ export const EventCustomizationSection = {
26
28
  GALLERY: "gallery",
27
29
  RSVP: "rsvp",
28
30
  MUSIC: "music",
31
+ DRESS_CODE: "dress_code",
29
32
  };
30
33
  export const EventCustomizationSectionOptions = [
31
34
  { value: "countdown", name: { en: "Countdown", ar: "العد التنازلي" } },
@@ -34,12 +37,29 @@ export const EventCustomizationSectionOptions = [
34
37
  { value: "gallery", name: { en: "Photos", ar: "الصور" } },
35
38
  { value: "rsvp", name: { en: "RSVP", ar: "تأكيد الحضور" } },
36
39
  { value: "music", name: { en: "Music", ar: "الموسيقى" } },
40
+ { value: "dress_code", name: { en: "Dress code", ar: "اللباس المطلوب" } },
37
41
  ];
38
42
  export const EVENT_CUSTOMIZATION_TEXT_MAX = 160;
43
+ /** How the invitation opens for a guest; no value keeps the template's own opening */
44
+ export const EventCustomizationOpening = {
45
+ NONE: "none",
46
+ ENVELOPE: "envelope",
47
+ CURTAIN: "curtain",
48
+ CARD: "card",
49
+ };
50
+ export const EventCustomizationOpeningOptions = [
51
+ { value: "none", name: { en: "None", ar: "بدون" } },
52
+ { value: "envelope", name: { en: "Envelope", ar: "ظرف" } },
53
+ { value: "curtain", name: { en: "Curtain", ar: "ستارة" } },
54
+ { value: "card", name: { en: "Card", ar: "بطاقة" } },
55
+ ];
39
56
  export const EventCustomizationPaletteValues = EventCustomizationPalettes.map((p) => p.value);
40
57
  export const EventCustomizationFontValues = EventCustomizationFonts.map((f) => f.value);
41
58
  export const EventCustomizationTrackValues = EventCustomizationTracks.map((t) => t.value);
42
59
  export const EventCustomizationSectionValues = EventCustomizationSectionOptions.map((s) => s.value);
60
+ export const EventCustomizationOpeningValues = EventCustomizationOpeningOptions.map((o) => o.value);
43
61
  export const findEventCustomizationPalette = (value) => { var _a; return (_a = EventCustomizationPalettes.find((p) => p.value === value)) !== null && _a !== void 0 ? _a : null; };
44
62
  export const findEventCustomizationFont = (value) => { var _a; return (_a = EventCustomizationFonts.find((f) => f.value === value)) !== null && _a !== void 0 ? _a : null; };
63
+ /** Tracks offered for an event type; events without a type are weddings */
64
+ export const eventCustomizationTracksFor = (eventType) => EventCustomizationTracks.filter((t) => t.event_types.includes(eventType || "wedding"));
45
65
  export const findEventCustomizationTrack = (value) => { var _a; return (_a = EventCustomizationTracks.find((t) => t.value === value)) !== null && _a !== void 0 ? _a : null; };
@@ -0,0 +1,49 @@
1
+ /** Optional dress code an event owner can show on the invitation (all event types) */
2
+ export const EventDressCodeStyleValues = ["formal", "evening", "semi_formal", "smart_casual", "traditional", "custom"];
3
+ export const EventDressCodeStyleOptions = [
4
+ { value: "formal", name: { en: "Formal", ar: "رسمي" } },
5
+ { value: "evening", name: { en: "Evening wear", ar: "سهرة" } },
6
+ { value: "semi_formal", name: { en: "Semi-formal", ar: "شبه رسمي" } },
7
+ { value: "smart_casual", name: { en: "Smart casual", ar: "كاجوال أنيق" } },
8
+ { value: "traditional", name: { en: "Traditional", ar: "تقليدي" } },
9
+ { value: "custom", name: { en: "Custom text", ar: "نص خاص" } },
10
+ ];
11
+ /** wear = colours guests are asked to wear, avoid = colours guests should not wear */
12
+ export const EventDressCodeColorModeValues = ["wear", "avoid"];
13
+ export const EventDressCodeColorModeNames = {
14
+ wear: { en: "Colours to wear", ar: "ألوان مرغوبة" },
15
+ avoid: { en: "Colours to avoid", ar: "ألوان يجب تجنبها" },
16
+ };
17
+ /** Heading shown on the invitation above the colour dots */
18
+ export const EventDressCodeColorModeTitles = {
19
+ wear: { en: "Suggested colours", ar: "ألوان مقترحة" },
20
+ avoid: { en: "Please avoid", ar: "نرجو تجنّب" },
21
+ };
22
+ export const EventDressCodeColors = [
23
+ { value: "white", hex: "#FFFFFF", name: { en: "White", ar: "أبيض" } },
24
+ { value: "black", hex: "#000000", name: { en: "Black", ar: "أسود" } },
25
+ { value: "gold", hex: "#D4AF37", name: { en: "Gold", ar: "ذهبي" } },
26
+ { value: "beige", hex: "#C9C0B3", name: { en: "Beige", ar: "بيج" } },
27
+ { value: "navy", hex: "#1F3A5F", name: { en: "Navy", ar: "كحلي" } },
28
+ { value: "burgundy", hex: "#7A1F2B", name: { en: "Burgundy", ar: "عنابي" } },
29
+ { value: "sage", hex: "#B7C9A8", name: { en: "Light green", ar: "أخضر فاتح" } },
30
+ { value: "pink", hex: "#E8B4BC", name: { en: "Pink", ar: "وردي" } },
31
+ { value: "grey", hex: "#9AA5B1", name: { en: "Grey", ar: "رمادي" } },
32
+ ];
33
+ export const EventDressCodeColorValues = EventDressCodeColors.map((c) => c.value);
34
+ /** @deprecated colours are no longer limited; kept for older imports */
35
+ export const EVENT_DRESS_CODE_MAX_COLORS = 9;
36
+ export const EVENT_DRESS_CODE_NOTE_MAX = 120;
37
+ export const findEventDressCodeStyle = (value) => { var _a; return (_a = EventDressCodeStyleOptions.find((s) => s.value === value)) !== null && _a !== void 0 ? _a : null; };
38
+ export const findEventDressCodeColor = (value) => { var _a; return (_a = EventDressCodeColors.find((c) => c.value === value)) !== null && _a !== void 0 ? _a : null; };
39
+ /** True when the owner filled at least one part of the dress code */
40
+ export const hasEventDressCode = (dc) => { var _a, _b, _c; return !!dc && (!!dc.style || !!((_a = dc.colors) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = dc.avoid_colors) === null || _b === void 0 ? void 0 : _b.length) || !!((_c = dc.note) === null || _c === void 0 ? void 0 : _c.trim())); };
41
+ /** Wanted and avoided colours, reading old saves where color_mode "avoid" marked `colors` */
42
+ export const eventDressCodeColorLists = (dc) => {
43
+ var _a, _b, _c;
44
+ const legacyAvoid = (dc === null || dc === void 0 ? void 0 : dc.color_mode) === "avoid";
45
+ return {
46
+ wear: legacyAvoid ? [] : ((_a = dc === null || dc === void 0 ? void 0 : dc.colors) !== null && _a !== void 0 ? _a : []),
47
+ avoid: [...(legacyAvoid ? ((_b = dc === null || dc === void 0 ? void 0 : dc.colors) !== null && _b !== void 0 ? _b : []) : []), ...((_c = dc === null || dc === void 0 ? void 0 : dc.avoid_colors) !== null && _c !== void 0 ? _c : [])],
48
+ };
49
+ };