@deallony/shared 1.2.81 → 1.2.83

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 (69) hide show
  1. package/dist/cjs/constants/events/EventCustomization.d.ts +18 -0
  2. package/dist/cjs/constants/events/EventCustomization.js +21 -1
  3. package/dist/cjs/constants/events/EventGuests.d.ts +3 -0
  4. package/dist/cjs/constants/events/EventGuests.js +6 -0
  5. package/dist/cjs/constants/events/EventHost.d.ts +79 -0
  6. package/dist/cjs/constants/events/EventHost.js +155 -0
  7. package/dist/cjs/constants/events/EventTemplate.js +3 -3
  8. package/dist/cjs/constants/events/EventType.d.ts +21 -90
  9. package/dist/cjs/constants/events/EventType.js +15 -8
  10. package/dist/cjs/constants/events/EventWeddingReligion.d.ts +10 -5
  11. package/dist/cjs/constants/events/EventWeddingReligion.js +12 -27
  12. package/dist/cjs/constants/events/index.d.ts +2 -0
  13. package/dist/cjs/constants/events/index.js +2 -0
  14. package/dist/cjs/constants/routes/app.d.ts +21 -0
  15. package/dist/cjs/constants/routes/app.js +6 -0
  16. package/dist/cjs/dto/events/EventHost.dto.d.ts +7 -0
  17. package/dist/cjs/dto/events/EventHost.dto.js +2 -0
  18. package/dist/cjs/dto/events/index.d.ts +1 -0
  19. package/dist/cjs/dto/events/index.js +1 -0
  20. package/dist/cjs/schema/communication/ai-conversation.schema.d.ts +4 -2
  21. package/dist/cjs/schema/communication/offer.schema.d.ts +3 -3
  22. package/dist/cjs/schema/events/Event.schema.d.ts +70 -0
  23. package/dist/cjs/schema/events/Event.schema.js +34 -0
  24. package/dist/cjs/schema/events/EventHost.schema.d.ts +36 -0
  25. package/dist/cjs/schema/events/EventHost.schema.js +44 -0
  26. package/dist/cjs/schema/events/index.d.ts +1 -0
  27. package/dist/cjs/schema/events/index.js +1 -0
  28. package/dist/cjs/types/ad/Ad.d.ts +2 -0
  29. package/dist/cjs/types/communication/Notification.d.ts +12 -0
  30. package/dist/cjs/types/communication/Notification.js +15 -0
  31. package/dist/cjs/types/events/Event.d.ts +28 -0
  32. package/dist/cjs/types/events/EventCustomization.d.ts +11 -0
  33. package/dist/cjs/types/events/EventDay.d.ts +89 -0
  34. package/dist/cjs/types/events/EventDay.js +2 -0
  35. package/dist/cjs/types/events/EventHost.d.ts +29 -0
  36. package/dist/cjs/types/events/EventHost.js +2 -0
  37. package/dist/cjs/types/events/EventInvited.d.ts +25 -0
  38. package/dist/cjs/types/events/EventInvited.js +2 -0
  39. package/dist/cjs/types/events/EventRsvp.d.ts +12 -1
  40. package/dist/cjs/types/events/index.d.ts +3 -0
  41. package/dist/cjs/types/events/index.js +3 -0
  42. package/dist/cjs/types/index.d.ts +3 -0
  43. package/dist/cjs/types/index.js +5 -2
  44. package/dist/cjs/utils/adSeoTitle.d.ts +35 -0
  45. package/dist/cjs/utils/adSeoTitle.js +26 -0
  46. package/dist/cjs/utils/index.d.ts +1 -0
  47. package/dist/cjs/utils/index.js +1 -0
  48. package/dist/esm/constants/events/EventCustomization.js +20 -0
  49. package/dist/esm/constants/events/EventGuests.js +3 -0
  50. package/dist/esm/constants/events/EventHost.js +147 -0
  51. package/dist/esm/constants/events/EventTemplate.js +3 -3
  52. package/dist/esm/constants/events/EventType.js +14 -7
  53. package/dist/esm/constants/events/EventWeddingReligion.js +11 -26
  54. package/dist/esm/constants/events/index.js +2 -0
  55. package/dist/esm/constants/routes/app.js +6 -0
  56. package/dist/esm/dto/events/EventHost.dto.js +1 -0
  57. package/dist/esm/dto/events/index.js +1 -0
  58. package/dist/esm/schema/events/Event.schema.js +35 -1
  59. package/dist/esm/schema/events/EventHost.schema.js +41 -0
  60. package/dist/esm/schema/events/index.js +1 -0
  61. package/dist/esm/types/communication/Notification.js +15 -0
  62. package/dist/esm/types/events/EventDay.js +1 -0
  63. package/dist/esm/types/events/EventHost.js +1 -0
  64. package/dist/esm/types/events/EventInvited.js +1 -0
  65. package/dist/esm/types/events/index.js +3 -0
  66. package/dist/esm/types/index.js +3 -0
  67. package/dist/esm/utils/adSeoTitle.js +23 -0
  68. package/dist/esm/utils/index.js +1 -0
  69. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eventWeddingReligionTexts = exports.findEventWeddingVerse = exports.eventWeddingVersesFor = exports.normalizeEventWeddingReligion = exports.EVENT_WEDDING_CEREMONY_TIMELINE_TITLE = exports.EventWeddingReligionTextsMap = exports.eventWeddingCustomVerse = exports.EventWeddingVerseValues = exports.EVENT_WEDDING_CUSTOM_VERSE_MAX = exports.EVENT_WEDDING_CUSTOM_VERSE = exports.EventWeddingVerses = exports.EventWeddingReligionOptions = exports.EventWeddingReligionNames = exports.DEFAULT_EVENT_WEDDING_RELIGION = exports.EventWeddingReligion = exports.EventWeddingReligionValues = void 0;
3
+ exports.eventWeddingReligionTexts = exports.findEventWeddingVerse = exports.eventWeddingVersesFor = exports.normalizeEventWeddingReligion = exports.EVENT_WEDDING_CEREMONY_TIMELINE_TITLE = exports.EventWeddingReligionTextsMap = exports.eventWeddingCustomVerse = exports.EventWeddingVerseValues = exports.EVENT_WEDDING_LEGACY_VERSE_KEYS = exports.EVENT_WEDDING_CUSTOM_VERSE_MAX = exports.EVENT_WEDDING_CUSTOM_VERSE = exports.EventWeddingVerses = exports.EventWeddingReligionOptions = exports.EventWeddingReligionNames = exports.DEFAULT_EVENT_WEDDING_RELIGION = exports.EventWeddingReligion = exports.EventWeddingReligionValues = void 0;
4
4
  /**
5
5
  * Invitation style of a wedding (also used by engagement and marriage, which share event.wedding).
6
- * muslim = the Islamic opening, Quran verse and dua (the original templates).
6
+ * muslim = the Islamic opening (bismillah) and dua. No Quran excerpt (removed 2026-11-08 by owner request).
7
7
  * general = social congratulations only: names, place, date, program. Suits Christian weddings.
8
8
  *
9
9
  * Content rule (owner decision 2026-11-04): no Christian religious symbols, creeds, Bible verses or rites
@@ -19,8 +19,8 @@ exports.EventWeddingReligionNames = {
19
19
  muslim: {
20
20
  en: "Islamic",
21
21
  ar: "إسلامي",
22
- hint_en: "Bismillah, a Quran verse and a dua.",
23
- hint_ar: "البسملة وآية قرآنية ودعاء للعروسين.",
22
+ hint_en: "Bismillah and a dua for the couple.",
23
+ hint_ar: "البسملة ودعاء للعروسين.",
24
24
  },
25
25
  general: {
26
26
  en: "General",
@@ -34,27 +34,6 @@ exports.EventWeddingReligionOptions = exports.EventWeddingReligionValues.map((va
34
34
  name: exports.EventWeddingReligionNames[value],
35
35
  }));
36
36
  exports.EventWeddingVerses = [
37
- {
38
- value: "rum-21",
39
- religion: "muslim",
40
- text: "﴿ وَمِنْ آيَاتِهِ أَنْ خَلَقَ لَكُمْ مِنْ أَنْفُسِكُمْ أَزْوَاجًا لِتَسْكُنُوا إِلَيْهَا وَجَعَلَ بَيْنَكُمْ مَوَدَّةً وَرَحْمَةً ﴾",
41
- reference: "سورة الروم - آية ٢١",
42
- label: { en: "Ar-Rum 21", ar: "سورة الروم - آية ٢١" },
43
- },
44
- {
45
- value: "furqan-74",
46
- religion: "muslim",
47
- text: "﴿ رَبَّنَا هَبْ لَنَا مِنْ أَزْوَاجِنَا وَذُرِّيَّاتِنَا قُرَّةَ أَعْيُنٍ وَاجْعَلْنَا لِلْمُتَّقِينَ إِمَامًا ﴾",
48
- reference: "سورة الفرقان - آية ٧٤",
49
- label: { en: "Al-Furqan 74", ar: "سورة الفرقان - آية ٧٤" },
50
- },
51
- {
52
- value: "rum-mawadda",
53
- religion: "muslim",
54
- text: "﴿ وَجَعَلَ بَيْنَكُم مَّوَدَّةً وَرَحْمَةً ﴾",
55
- reference: "سورة الروم",
56
- label: { en: "Mawadda wa rahma", ar: "وجعل بينكم مودة ورحمة" },
57
- },
58
37
  {
59
38
  value: "together",
60
39
  religion: "general",
@@ -80,9 +59,15 @@ exports.EventWeddingVerses = [
80
59
  /** General style only: the owner writes the couple's words by hand (event.wedding.custom_verse) */
81
60
  exports.EVENT_WEDDING_CUSTOM_VERSE = "custom";
82
61
  exports.EVENT_WEDDING_CUSTOM_VERSE_MAX = 160;
62
+ /**
63
+ * Quran excerpt keys from before 2026-11-08. Still accepted so older apps can save,
64
+ * but the backend drops them and no invitation shows them any more.
65
+ */
66
+ exports.EVENT_WEDDING_LEGACY_VERSE_KEYS = ["rum-21", "furqan-74", "rum-mawadda"];
83
67
  exports.EventWeddingVerseValues = [
84
68
  exports.EVENT_WEDDING_CUSTOM_VERSE,
85
69
  ...exports.EventWeddingVerses.map((v) => v.value),
70
+ ...exports.EVENT_WEDDING_LEGACY_VERSE_KEYS,
86
71
  ];
87
72
  /** The hand-written text applies only to the general style */
88
73
  const eventWeddingCustomVerse = (verseKey, religion, customVerse) => verseKey === exports.EVENT_WEDDING_CUSTOM_VERSE && (0, exports.normalizeEventWeddingReligion)(religion) === "general"
@@ -92,7 +77,7 @@ exports.eventWeddingCustomVerse = eventWeddingCustomVerse;
92
77
  exports.EventWeddingReligionTextsMap = {
93
78
  muslim: {
94
79
  opening: "بسم الله الرحمن الرحيم",
95
- verse_title: "مقتطف قرآني مبارك",
80
+ verse_title: null,
96
81
  blessing: "اللهم بارك لهما وبارك عليهما واجمع بينهما في خير، واجعل أيامهما مودة ورحمة وسكينة.",
97
82
  blessing_title: "دعاء",
98
83
  symbol: "۞",
@@ -115,7 +100,7 @@ const normalizeEventWeddingReligion = (value) => exports.EventWeddingReligionVal
115
100
  exports.normalizeEventWeddingReligion = normalizeEventWeddingReligion;
116
101
  const eventWeddingVersesFor = (religion) => exports.EventWeddingVerses.filter((v) => v.religion === (0, exports.normalizeEventWeddingReligion)(religion));
117
102
  exports.eventWeddingVersesFor = eventWeddingVersesFor;
118
- /** The saved verse when it belongs to the style, otherwise the style's first one */
103
+ /** The saved phrase when it belongs to the style, otherwise the style's first one (undefined for muslim) */
119
104
  const findEventWeddingVerse = (value, religion) => {
120
105
  var _a;
121
106
  const list = (0, exports.eventWeddingVersesFor)(religion);
@@ -13,3 +13,5 @@ export * from "./EventVisibility";
13
13
  export * from "./EventWeddingReligion";
14
14
  export * from "./EventTextPolicy";
15
15
  export * from "./EventDressCode";
16
+ export * from "./EventHost";
17
+ export * from "./EventGuests";
@@ -29,3 +29,5 @@ __exportStar(require("./EventVisibility"), exports);
29
29
  __exportStar(require("./EventWeddingReligion"), exports);
30
30
  __exportStar(require("./EventTextPolicy"), exports);
31
31
  __exportStar(require("./EventDressCode"), exports);
32
+ __exportStar(require("./EventHost"), exports);
33
+ __exportStar(require("./EventGuests"), exports);
@@ -485,6 +485,20 @@ export declare const APP_ROUTES: {
485
485
  readonly mine: () => {
486
486
  pathname: string;
487
487
  };
488
+ /** «دعواتي»: the events the user was invited to, as a chip of «مناسباتي» */
489
+ readonly invitations: () => {
490
+ pathname: string;
491
+ params: {
492
+ tab: string;
493
+ };
494
+ };
495
+ /** One event the user was invited to, as a guest sees it */
496
+ readonly invited: (eventId: number | string) => {
497
+ pathname: string;
498
+ params: {
499
+ id: string | number;
500
+ };
501
+ };
488
502
  /** Upcoming public events (optionally of one venue) */
489
503
  readonly upcoming: (venueId?: number | string) => {
490
504
  pathname: string;
@@ -513,6 +527,13 @@ export declare const APP_ROUTES: {
513
527
  id: string | number;
514
528
  };
515
529
  };
530
+ /** People of the event (owner, organisers, guest managers) */
531
+ readonly hosts: (id: number | string) => {
532
+ pathname: string;
533
+ params: {
534
+ id: string | number;
535
+ };
536
+ };
516
537
  };
517
538
  };
518
539
  export type SharedAppRoutes = typeof APP_ROUTES;
@@ -206,10 +206,16 @@ exports.APP_ROUTES = {
206
206
  newOfType: (eventType) => ({ pathname: "/event/new", params: { personal: "1", event_type: eventType } }),
207
207
  start: () => ({ pathname: "/event/start" }),
208
208
  mine: () => ({ pathname: "/event/mine" }),
209
+ /** «دعواتي»: the events the user was invited to, as a chip of «مناسباتي» */
210
+ invitations: () => ({ pathname: "/event/mine", params: { tab: "invited" } }),
211
+ /** One event the user was invited to, as a guest sees it */
212
+ invited: (eventId) => ({ pathname: "/event/invited/[id]", params: { id: eventId } }),
209
213
  /** Upcoming public events (optionally of one venue) */
210
214
  upcoming: (venueId) => venueId ? { pathname: "/event/upcoming", params: { venue_id: venueId } } : { pathname: "/event/upcoming" },
211
215
  publish: (id) => ({ pathname: "/event/publish/[id]", params: { id } }),
212
216
  edit: (id) => ({ pathname: "/event/new", params: { id } }),
213
217
  details: (id) => ({ pathname: "/event/details/[id]", params: { id } }),
218
+ /** People of the event (owner, organisers, guest managers) */
219
+ hosts: (id) => ({ pathname: "/event/hosts/[id]", params: { id } }),
214
220
  },
215
221
  };
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ import { addEventHostSchema, eventHostIdSchema, eventHostsListSchema, eventPersonInputSchema, updateEventHostSchema } from '../../schema/events/EventHost.schema';
3
+ export type EventPersonInputDto = z.infer<typeof eventPersonInputSchema>;
4
+ export type AddEventHostDto = z.infer<typeof addEventHostSchema>;
5
+ export type UpdateEventHostDto = z.infer<typeof updateEventHostSchema>;
6
+ export type EventHostIdDto = z.infer<typeof eventHostIdSchema>;
7
+ export type EventHostsListDto = z.infer<typeof eventHostsListSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,3 +5,4 @@ export * from './EventWedding.dto';
5
5
  export * from './EventBirthday.dto';
6
6
  export * from './EventOccasion.dto';
7
7
  export * from './EventVenue.dto';
8
+ export * from './EventHost.dto';
@@ -21,3 +21,4 @@ __exportStar(require("./EventWedding.dto"), exports);
21
21
  __exportStar(require("./EventBirthday.dto"), exports);
22
22
  __exportStar(require("./EventOccasion.dto"), exports);
23
23
  __exportStar(require("./EventVenue.dto"), exports);
24
+ __exportStar(require("./EventHost.dto"), exports);
@@ -140,6 +140,8 @@ export type AiConversationListItem = {
140
140
  reply_after?: string | null;
141
141
  /** The opening waits for the sending hours: it goes out at this time */
142
142
  send_after?: string | null;
143
+ /** Support ticket this conversation was started from (support chats), so the dashboard can open it */
144
+ support_ticket_id?: number | null;
143
145
  /** Filled in by the marketplace from the potential user record. */
144
146
  potential_user?: {
145
147
  id: number;
@@ -173,9 +175,9 @@ export declare const AiApprovalSettingsSchema: z.ZodObject<{
173
175
  * outdated: the customer wrote again, so a newer draft replaced it. failed: approved but WhatsApp refused it.
174
176
  */
175
177
  export declare const AiDraftStatusSchema: z.ZodEnum<{
178
+ pending: "pending";
176
179
  scheduled: "scheduled";
177
180
  failed: "failed";
178
- pending: "pending";
179
181
  sent: "sent";
180
182
  rejected: "rejected";
181
183
  outdated: "outdated";
@@ -190,9 +192,9 @@ export declare const AiDraftListSchema: z.ZodObject<{
190
192
  page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
191
193
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
192
194
  statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
195
+ pending: "pending";
193
196
  scheduled: "scheduled";
194
197
  failed: "failed";
195
- pending: "pending";
196
198
  sent: "sent";
197
199
  rejected: "rejected";
198
200
  outdated: "outdated";
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
2
  export declare const offerStatusSchema: z.ZodEnum<{
3
3
  pending: "pending";
4
+ declined: "declined";
4
5
  accepted: "accepted";
5
6
  countered: "countered";
6
- declined: "declined";
7
7
  }>;
8
8
  /** PRICE_OFFER payload. Replies (accept, counter, decline) point at the offer they answer. */
9
9
  export declare const priceOfferPayloadSchema: z.ZodObject<{
@@ -17,9 +17,9 @@ export declare const priceOfferPayloadSchema: z.ZodObject<{
17
17
  }, z.core.$strip>;
18
18
  status: z.ZodOptional<z.ZodEnum<{
19
19
  pending: "pending";
20
+ declined: "declined";
20
21
  accepted: "accepted";
21
22
  countered: "countered";
22
- declined: "declined";
23
23
  }>>;
24
24
  reply_to_message_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
25
25
  note: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -36,9 +36,9 @@ export declare const rentOfferPayloadSchema: z.ZodObject<{
36
36
  }, z.core.$strip>;
37
37
  status: z.ZodOptional<z.ZodEnum<{
38
38
  pending: "pending";
39
+ declined: "declined";
39
40
  accepted: "accepted";
40
41
  countered: "countered";
41
- declined: "declined";
42
42
  }>>;
43
43
  reply_to_message_id: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
44
44
  note: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -14,9 +14,13 @@ export declare const eventCustomizationSchema: z.ZodObject<{
14
14
  rsvp: "rsvp";
15
15
  music: "music";
16
16
  dress_code: "dress_code";
17
+ attendance: "attendance";
18
+ video: "video";
17
19
  }> & z.core.$partial, z.ZodBoolean>>>;
18
20
  welcome_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
19
21
  rsvp_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
22
+ children_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
23
+ food_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
20
24
  music: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
21
25
  [x: string]: string;
22
26
  }>>>;
@@ -27,6 +31,8 @@ export declare const eventCustomizationSchema: z.ZodObject<{
27
31
  card: "card";
28
32
  }>>>;
29
33
  auto_scroll: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
34
+ cover_video: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
35
+ cover_video_muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
30
36
  }, z.core.$strip>;
31
37
  export declare const eventDressCodeSchema: z.ZodObject<{
32
38
  style: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -109,6 +115,7 @@ export declare const eventBaseSchema: z.ZodObject<{
109
115
  venue_id: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
110
116
  venue_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
117
  location_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
+ expected_guests: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
112
119
  invitation_scan_type: z.ZodOptional<z.ZodEnum<{
113
120
  none: "none";
114
121
  qrcode: "qrcode";
@@ -129,9 +136,13 @@ export declare const eventBaseSchema: z.ZodObject<{
129
136
  rsvp: "rsvp";
130
137
  music: "music";
131
138
  dress_code: "dress_code";
139
+ attendance: "attendance";
140
+ video: "video";
132
141
  }> & z.core.$partial, z.ZodBoolean>>>;
133
142
  welcome_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
134
143
  rsvp_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
144
+ children_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
145
+ food_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
135
146
  music: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
136
147
  [x: string]: string;
137
148
  }>>>;
@@ -142,6 +153,8 @@ export declare const eventBaseSchema: z.ZodObject<{
142
153
  card: "card";
143
154
  }>>>;
144
155
  auto_scroll: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
156
+ cover_video: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
157
+ cover_video_muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
145
158
  }, z.core.$strip>>>;
146
159
  dress_code: z.ZodOptional<z.ZodNullable<z.ZodObject<{
147
160
  style: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -164,10 +177,19 @@ export declare const eventBaseSchema: z.ZodObject<{
164
177
  }>>>;
165
178
  note: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
166
179
  }, z.core.$strip>>>;
180
+ children_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
181
+ food_included: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
167
182
  visibility: z.ZodOptional<z.ZodEnum<{
168
183
  private: "private";
169
184
  public: "public";
170
185
  }>>;
186
+ creator_role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
187
+ people: z.ZodOptional<z.ZodArray<z.ZodObject<{
188
+ slot: z.ZodString;
189
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
190
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
191
+ surprise: z.ZodOptional<z.ZodBoolean>;
192
+ }, z.core.$strip>>>;
171
193
  }, z.core.$strip>;
172
194
  export declare const createEventSchema: z.ZodObject<{
173
195
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -229,6 +251,7 @@ export declare const createEventSchema: z.ZodObject<{
229
251
  venue_id: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
230
252
  venue_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
231
253
  location_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
+ expected_guests: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
232
255
  invitation_scan_type: z.ZodOptional<z.ZodEnum<{
233
256
  none: "none";
234
257
  qrcode: "qrcode";
@@ -249,9 +272,13 @@ export declare const createEventSchema: z.ZodObject<{
249
272
  rsvp: "rsvp";
250
273
  music: "music";
251
274
  dress_code: "dress_code";
275
+ attendance: "attendance";
276
+ video: "video";
252
277
  }> & z.core.$partial, z.ZodBoolean>>>;
253
278
  welcome_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
254
279
  rsvp_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
280
+ children_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
281
+ food_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
255
282
  music: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
256
283
  [x: string]: string;
257
284
  }>>>;
@@ -262,6 +289,8 @@ export declare const createEventSchema: z.ZodObject<{
262
289
  card: "card";
263
290
  }>>>;
264
291
  auto_scroll: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
292
+ cover_video: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
293
+ cover_video_muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
265
294
  }, z.core.$strip>>>;
266
295
  dress_code: z.ZodOptional<z.ZodNullable<z.ZodObject<{
267
296
  style: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -284,10 +313,19 @@ export declare const createEventSchema: z.ZodObject<{
284
313
  }>>>;
285
314
  note: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
286
315
  }, z.core.$strip>>>;
316
+ children_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
317
+ food_included: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
287
318
  visibility: z.ZodOptional<z.ZodEnum<{
288
319
  private: "private";
289
320
  public: "public";
290
321
  }>>;
322
+ creator_role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
323
+ people: z.ZodOptional<z.ZodArray<z.ZodObject<{
324
+ slot: z.ZodString;
325
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
327
+ surprise: z.ZodOptional<z.ZodBoolean>;
328
+ }, z.core.$strip>>>;
291
329
  }, z.core.$strip>;
292
330
  export declare const updateEventSchema: z.ZodObject<{
293
331
  lat: z.ZodNullable<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
@@ -349,6 +387,7 @@ export declare const updateEventSchema: z.ZodObject<{
349
387
  venue_id: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
350
388
  venue_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
351
389
  location_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
+ expected_guests: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
352
391
  invitation_scan_type: z.ZodOptional<z.ZodEnum<{
353
392
  none: "none";
354
393
  qrcode: "qrcode";
@@ -369,9 +408,13 @@ export declare const updateEventSchema: z.ZodObject<{
369
408
  rsvp: "rsvp";
370
409
  music: "music";
371
410
  dress_code: "dress_code";
411
+ attendance: "attendance";
412
+ video: "video";
372
413
  }> & z.core.$partial, z.ZodBoolean>>>;
373
414
  welcome_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
374
415
  rsvp_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
416
+ children_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
417
+ food_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
375
418
  music: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
376
419
  [x: string]: string;
377
420
  }>>>;
@@ -382,6 +425,8 @@ export declare const updateEventSchema: z.ZodObject<{
382
425
  card: "card";
383
426
  }>>>;
384
427
  auto_scroll: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
428
+ cover_video: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
429
+ cover_video_muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
385
430
  }, z.core.$strip>>>;
386
431
  dress_code: z.ZodOptional<z.ZodNullable<z.ZodObject<{
387
432
  style: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -404,10 +449,19 @@ export declare const updateEventSchema: z.ZodObject<{
404
449
  }>>>;
405
450
  note: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
406
451
  }, z.core.$strip>>>;
452
+ children_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
453
+ food_included: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
407
454
  visibility: z.ZodOptional<z.ZodEnum<{
408
455
  private: "private";
409
456
  public: "public";
410
457
  }>>;
458
+ creator_role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
459
+ people: z.ZodOptional<z.ZodArray<z.ZodObject<{
460
+ slot: z.ZodString;
461
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
462
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
463
+ surprise: z.ZodOptional<z.ZodBoolean>;
464
+ }, z.core.$strip>>>;
411
465
  id: z.ZodCoercedNumber<unknown>;
412
466
  }, z.core.$strip>;
413
467
  export declare const saveEventSchema: z.ZodObject<{
@@ -470,6 +524,7 @@ export declare const saveEventSchema: z.ZodObject<{
470
524
  venue_id: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
471
525
  venue_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
472
526
  location_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
527
+ expected_guests: z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
473
528
  invitation_scan_type: z.ZodOptional<z.ZodEnum<{
474
529
  none: "none";
475
530
  qrcode: "qrcode";
@@ -490,9 +545,13 @@ export declare const saveEventSchema: z.ZodObject<{
490
545
  rsvp: "rsvp";
491
546
  music: "music";
492
547
  dress_code: "dress_code";
548
+ attendance: "attendance";
549
+ video: "video";
493
550
  }> & z.core.$partial, z.ZodBoolean>>>;
494
551
  welcome_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
495
552
  rsvp_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
553
+ children_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
554
+ food_message: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
496
555
  music: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
497
556
  [x: string]: string;
498
557
  }>>>;
@@ -503,6 +562,8 @@ export declare const saveEventSchema: z.ZodObject<{
503
562
  card: "card";
504
563
  }>>>;
505
564
  auto_scroll: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
565
+ cover_video: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
566
+ cover_video_muted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
506
567
  }, z.core.$strip>>>;
507
568
  dress_code: z.ZodOptional<z.ZodNullable<z.ZodObject<{
508
569
  style: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
@@ -525,10 +586,19 @@ export declare const saveEventSchema: z.ZodObject<{
525
586
  }>>>;
526
587
  note: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
527
588
  }, z.core.$strip>>>;
589
+ children_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
590
+ food_included: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
528
591
  visibility: z.ZodOptional<z.ZodEnum<{
529
592
  private: "private";
530
593
  public: "public";
531
594
  }>>;
595
+ creator_role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
596
+ people: z.ZodOptional<z.ZodArray<z.ZodObject<{
597
+ slot: z.ZodString;
598
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
599
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
600
+ surprise: z.ZodOptional<z.ZodBoolean>;
601
+ }, z.core.$strip>>>;
532
602
  id: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
533
603
  }, z.core.$strip>;
534
604
  export declare const publishEventSchema: z.ZodObject<{
@@ -6,6 +6,7 @@ const EventTimeline_schema_1 = require("./EventTimeline.schema");
6
6
  const EventWedding_schema_1 = require("./EventWedding.schema");
7
7
  const EventBirthday_schema_1 = require("./EventBirthday.schema");
8
8
  const EventOccasion_schema_1 = require("./EventOccasion.schema");
9
+ const EventHost_schema_1 = require("./EventHost.schema");
9
10
  const events_1 = require("../../constants/events");
10
11
  const EventTextPolicy_1 = require("../../constants/events/EventTextPolicy");
11
12
  const customizationText = zod_1.z
@@ -16,6 +17,15 @@ const customizationText = zod_1.z
16
17
  .transform((v) => (v.length ? v : null))
17
18
  .nullable()
18
19
  .optional();
20
+ /** Owner's own wording for the children / food line on the invitation; empty keeps the default */
21
+ const attendanceText = zod_1.z
22
+ .string()
23
+ .trim()
24
+ .max(events_1.EVENT_ATTENDANCE_TEXT_MAX)
25
+ .refine((v) => !(0, EventTextPolicy_1.hasBlockedReligiousText)(v), { message: EventTextPolicy_1.BLOCKED_RELIGIOUS_TEXT_MESSAGE.ar })
26
+ .transform((v) => (v.length ? v : null))
27
+ .nullable()
28
+ .optional();
19
29
  exports.eventCustomizationSchema = zod_1.z.object({
20
30
  palette: zod_1.z.enum(events_1.EventCustomizationPaletteValues).nullable().optional(),
21
31
  font: zod_1.z.enum(events_1.EventCustomizationFontValues).nullable().optional(),
@@ -25,9 +35,23 @@ exports.eventCustomizationSchema = zod_1.z.object({
25
35
  .optional(),
26
36
  welcome_message: customizationText,
27
37
  rsvp_message: customizationText,
38
+ children_message: attendanceText,
39
+ food_message: attendanceText,
28
40
  music: zod_1.z.enum(events_1.EventCustomizationTrackValues).nullable().optional(),
29
41
  opening: zod_1.z.enum(events_1.EventCustomizationOpeningValues).nullable().optional(),
30
42
  auto_scroll: zod_1.z.boolean().nullable().optional(),
43
+ cover_video: zod_1.z
44
+ .record(zod_1.z.string(), zod_1.z.any())
45
+ .refine((v) => typeof v.url === "string" && v.url.length > 0, { message: "Video URL is missing" })
46
+ .refine((v) => !(Number(v.size) > events_1.EVENT_COVER_VIDEO_MAX_BYTES), {
47
+ message: "حجم الفيديو أكبر من 100 ميغابايت",
48
+ })
49
+ .refine((v) => !(Number(v.durationSeconds) > events_1.EVENT_COVER_VIDEO_MAX_SECONDS + 1), {
50
+ message: "الفيديو أطول من 60 ثانية",
51
+ })
52
+ .nullable()
53
+ .optional(),
54
+ cover_video_muted: zod_1.z.boolean().nullable().optional(),
31
55
  });
32
56
  exports.eventDressCodeSchema = zod_1.z.object({
33
57
  style: zod_1.z.enum(events_1.EventDressCodeStyleValues).nullable().optional(),
@@ -71,10 +95,20 @@ exports.eventBaseSchema = zod_1.z.object({
71
95
  venue_id: zod_1.z.coerce.number().int().positive().nullable().optional(),
72
96
  venue_name: zod_1.z.string().trim().max(255).nullable().optional(),
73
97
  location_label: zod_1.z.string().trim().nullable().optional(),
98
+ /** Expected number of guests; the app asks for it on every new event (old events may have none) */
99
+ expected_guests: zod_1.z.coerce.number().int().min(events_1.EVENT_EXPECTED_GUESTS_MIN).max(events_1.EVENT_EXPECTED_GUESTS_MAX).nullable().optional(),
74
100
  invitation_scan_type: zod_1.z.enum(events_1.EventInvitationScanTypeValues).optional(),
75
101
  customization: exports.eventCustomizationSchema.nullable().optional(),
76
102
  dress_code: exports.eventDressCodeSchema.nullable().optional(),
103
+ /** Children may come; null for events created before it was asked */
104
+ children_allowed: zod_1.z.boolean().nullable().optional(),
105
+ /** Food is served; null for events created before it was asked */
106
+ food_included: zod_1.z.boolean().nullable().optional(),
77
107
  visibility: zod_1.z.enum(events_1.EventVisibilityValues).optional(),
108
+ /** «من أنت في هذه المناسبة؟»: a slot key of the type, "company" or "other" */
109
+ creator_role: zod_1.z.string().trim().max(40).nullable().optional(),
110
+ /** Suggested people of the type (CONSTANTS.EVENTS.EventPeopleSlots) without their own field */
111
+ people: zod_1.z.array(EventHost_schema_1.eventPersonInputSchema).max(20).optional(),
78
112
  });
79
113
  exports.createEventSchema = exports.eventBaseSchema;
80
114
  exports.updateEventSchema = exports.eventBaseSchema.extend({
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ /** One suggested person in the create/edit form; an empty phone removes them */
3
+ export declare const eventPersonInputSchema: z.ZodObject<{
4
+ slot: z.ZodString;
5
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
7
+ surprise: z.ZodOptional<z.ZodBoolean>;
8
+ }, z.core.$strip>;
9
+ /** Add someone to an event by hand */
10
+ export declare const addEventHostSchema: z.ZodObject<{
11
+ event_id: z.ZodCoercedNumber<unknown>;
12
+ phone: z.ZodString;
13
+ role: z.ZodEnum<{
14
+ organiser: "organiser";
15
+ guests: "guests";
16
+ }>;
17
+ label: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
18
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
19
+ surprise: z.ZodOptional<z.ZodBoolean>;
20
+ }, z.core.$strip>;
21
+ export declare const updateEventHostSchema: z.ZodObject<{
22
+ host_id: z.ZodCoercedNumber<unknown>;
23
+ role: z.ZodOptional<z.ZodEnum<{
24
+ organiser: "organiser";
25
+ guests: "guests";
26
+ }>>;
27
+ label: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
28
+ name: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>>>;
29
+ surprise: z.ZodOptional<z.ZodBoolean>;
30
+ }, z.core.$strip>;
31
+ export declare const eventHostIdSchema: z.ZodObject<{
32
+ host_id: z.ZodCoercedNumber<unknown>;
33
+ }, z.core.$strip>;
34
+ export declare const eventHostsListSchema: z.ZodObject<{
35
+ event_id: z.ZodCoercedNumber<unknown>;
36
+ }, z.core.$strip>;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eventHostsListSchema = exports.eventHostIdSchema = exports.updateEventHostSchema = exports.addEventHostSchema = exports.eventPersonInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Phone_schema_1 = require("../common/Phone.schema");
6
+ const EventHost_1 = require("../../constants/events/EventHost");
7
+ const hostName = zod_1.z
8
+ .string()
9
+ .trim()
10
+ .max(EventHost_1.EVENT_HOST_LABEL_MAX)
11
+ .transform((v) => (v.length ? v : null))
12
+ .nullable()
13
+ .optional();
14
+ /** One suggested person in the create/edit form; an empty phone removes them */
15
+ exports.eventPersonInputSchema = zod_1.z.object({
16
+ slot: zod_1.z.string().trim().min(1).max(40),
17
+ phone: Phone_schema_1.internationalPhoneSchema.nullable().optional(),
18
+ name: hostName,
19
+ /** Don't tell them or give access before the event ends */
20
+ surprise: zod_1.z.boolean().optional(),
21
+ });
22
+ /** Add someone to an event by hand */
23
+ exports.addEventHostSchema = zod_1.z.object({
24
+ event_id: zod_1.z.coerce.number().int().positive(),
25
+ phone: Phone_schema_1.internationalPhoneSchema,
26
+ role: zod_1.z.enum(EventHost_1.EventHostRoleValues),
27
+ /** e.g. «أم العروس» */
28
+ label: hostName,
29
+ name: hostName,
30
+ surprise: zod_1.z.boolean().optional(),
31
+ });
32
+ exports.updateEventHostSchema = zod_1.z.object({
33
+ host_id: zod_1.z.coerce.number().int().positive(),
34
+ role: zod_1.z.enum(EventHost_1.EventHostRoleValues).optional(),
35
+ label: hostName,
36
+ name: hostName,
37
+ surprise: zod_1.z.boolean().optional(),
38
+ });
39
+ exports.eventHostIdSchema = zod_1.z.object({
40
+ host_id: zod_1.z.coerce.number().int().positive(),
41
+ });
42
+ exports.eventHostsListSchema = zod_1.z.object({
43
+ event_id: zod_1.z.coerce.number().int().positive(),
44
+ });
@@ -6,3 +6,4 @@ export * from "./EventBirthday.schema";
6
6
  export * from "./EventOccasion.schema";
7
7
  export * from "./EventVenue.schema";
8
8
  export { internationalPhoneSchema } from "../common/Phone.schema";
9
+ export * from "./EventHost.schema";
@@ -24,3 +24,4 @@ __exportStar(require("./EventOccasion.schema"), exports);
24
24
  __exportStar(require("./EventVenue.schema"), exports);
25
25
  var Phone_schema_1 = require("../common/Phone.schema");
26
26
  Object.defineProperty(exports, "internationalPhoneSchema", { enumerable: true, get: function () { return Phone_schema_1.internationalPhoneSchema; } });
27
+ __exportStar(require("./EventHost.schema"), exports);
@@ -27,6 +27,8 @@ export type IAd = {
27
27
  user_id?: number;
28
28
  status_id?: number;
29
29
  title?: string;
30
+ /** Auto-generated title saved by the backend on add/update (UTILS.buildAdSeoTitle) */
31
+ seo_title?: string | null;
30
32
  description?: string | null;
31
33
  category_id?: number | null;
32
34
  price?: number | null;