@bash-app/bash-common 30.50.1 → 30.52.0

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 (205) hide show
  1. package/README.md +0 -0
  2. package/dist/definitions.d.ts +668 -0
  3. package/dist/definitions.d.ts.map +1 -0
  4. package/dist/definitions.js +467 -0
  5. package/dist/definitions.js.map +1 -0
  6. package/dist/extendedSchemas.d.ts +2206 -0
  7. package/dist/extendedSchemas.d.ts.map +1 -0
  8. package/dist/extendedSchemas.js +429 -0
  9. package/dist/extendedSchemas.js.map +1 -0
  10. package/dist/index.d.ts +39 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +40 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/utils/addressUtils.d.ts +14 -0
  15. package/dist/utils/addressUtils.d.ts.map +1 -0
  16. package/dist/utils/addressUtils.js +177 -0
  17. package/dist/utils/addressUtils.js.map +1 -0
  18. package/dist/utils/apiUtils.d.ts +14 -0
  19. package/dist/utils/apiUtils.d.ts.map +1 -0
  20. package/dist/utils/apiUtils.js +61 -0
  21. package/dist/utils/apiUtils.js.map +1 -0
  22. package/dist/utils/arrayUtils.d.ts +2 -0
  23. package/dist/utils/arrayUtils.d.ts.map +1 -0
  24. package/dist/utils/arrayUtils.js +5 -0
  25. package/dist/utils/arrayUtils.js.map +1 -0
  26. package/dist/utils/awsS3Utils.d.ts +10 -0
  27. package/dist/utils/awsS3Utils.d.ts.map +1 -0
  28. package/dist/utils/awsS3Utils.js +89 -0
  29. package/dist/utils/awsS3Utils.js.map +1 -0
  30. package/dist/utils/badgeUtils.d.ts +33 -0
  31. package/dist/utils/badgeUtils.d.ts.map +1 -0
  32. package/dist/utils/badgeUtils.js +57 -0
  33. package/dist/utils/badgeUtils.js.map +1 -0
  34. package/dist/utils/blog/blogDbUtils.d.ts +48 -0
  35. package/dist/utils/blog/blogDbUtils.d.ts.map +1 -0
  36. package/dist/utils/blog/blogDbUtils.js +218 -0
  37. package/dist/utils/blog/blogDbUtils.js.map +1 -0
  38. package/dist/utils/blogUtils.d.ts +19 -0
  39. package/dist/utils/blogUtils.d.ts.map +1 -0
  40. package/dist/utils/blogUtils.js +118 -0
  41. package/dist/utils/blogUtils.js.map +1 -0
  42. package/dist/utils/dateTimeUtils.d.ts +38 -0
  43. package/dist/utils/dateTimeUtils.d.ts.map +1 -0
  44. package/dist/utils/dateTimeUtils.js +207 -0
  45. package/dist/utils/dateTimeUtils.js.map +1 -0
  46. package/dist/utils/entityUtils.d.ts +5 -0
  47. package/dist/utils/entityUtils.d.ts.map +1 -0
  48. package/dist/utils/entityUtils.js +5 -0
  49. package/dist/utils/entityUtils.js.map +1 -0
  50. package/dist/utils/generalDateTimeUtils.d.ts +15 -0
  51. package/dist/utils/generalDateTimeUtils.d.ts.map +1 -0
  52. package/dist/utils/generalDateTimeUtils.js +38 -0
  53. package/dist/utils/generalDateTimeUtils.js.map +1 -0
  54. package/dist/utils/luxonUtils.d.ts +95 -0
  55. package/dist/utils/luxonUtils.d.ts.map +1 -0
  56. package/dist/utils/luxonUtils.js +623 -0
  57. package/dist/utils/luxonUtils.js.map +1 -0
  58. package/dist/utils/mathUtils.d.ts +2 -0
  59. package/dist/utils/mathUtils.d.ts.map +1 -0
  60. package/dist/utils/mathUtils.js +4 -0
  61. package/dist/utils/mathUtils.js.map +1 -0
  62. package/dist/utils/objUtils.d.ts +3 -0
  63. package/dist/utils/objUtils.d.ts.map +1 -0
  64. package/dist/utils/objUtils.js +29 -0
  65. package/dist/utils/objUtils.js.map +1 -0
  66. package/dist/utils/paymentUtils.d.ts +18 -0
  67. package/dist/utils/paymentUtils.d.ts.map +1 -0
  68. package/dist/utils/paymentUtils.js +50 -0
  69. package/dist/utils/paymentUtils.js.map +1 -0
  70. package/dist/utils/promoCodesUtils.d.ts +6 -0
  71. package/dist/utils/promoCodesUtils.d.ts.map +1 -0
  72. package/dist/utils/promoCodesUtils.js +23 -0
  73. package/dist/utils/promoCodesUtils.js.map +1 -0
  74. package/dist/utils/qrCodeUtils.d.ts +4 -0
  75. package/dist/utils/qrCodeUtils.d.ts.map +1 -0
  76. package/dist/utils/qrCodeUtils.js +22 -0
  77. package/dist/utils/qrCodeUtils.js.map +1 -0
  78. package/dist/utils/recurrenceUtils.d.ts +8 -0
  79. package/dist/utils/recurrenceUtils.d.ts.map +1 -0
  80. package/dist/utils/recurrenceUtils.js +153 -0
  81. package/dist/utils/recurrenceUtils.js.map +1 -0
  82. package/dist/utils/reviewUtils.d.ts +29 -0
  83. package/dist/utils/reviewUtils.d.ts.map +1 -0
  84. package/dist/utils/reviewUtils.js +65 -0
  85. package/dist/utils/reviewUtils.js.map +1 -0
  86. package/dist/utils/service/apiServiceBookingApiUtils.d.ts +21 -0
  87. package/dist/utils/service/apiServiceBookingApiUtils.d.ts.map +1 -0
  88. package/dist/utils/service/apiServiceBookingApiUtils.js +131 -0
  89. package/dist/utils/service/apiServiceBookingApiUtils.js.map +1 -0
  90. package/dist/utils/service/attendeeOptionUtils.d.ts +11 -0
  91. package/dist/utils/service/attendeeOptionUtils.d.ts.map +1 -0
  92. package/dist/utils/service/attendeeOptionUtils.js +9 -0
  93. package/dist/utils/service/attendeeOptionUtils.js.map +1 -0
  94. package/dist/utils/service/frontendServiceBookingUtils.d.ts +53 -0
  95. package/dist/utils/service/frontendServiceBookingUtils.d.ts.map +1 -0
  96. package/dist/utils/service/frontendServiceBookingUtils.js +134 -0
  97. package/dist/utils/service/frontendServiceBookingUtils.js.map +1 -0
  98. package/dist/utils/service/regexUtils.d.ts +6 -0
  99. package/dist/utils/service/regexUtils.d.ts.map +1 -0
  100. package/dist/utils/service/regexUtils.js +16 -0
  101. package/dist/utils/service/regexUtils.js.map +1 -0
  102. package/dist/utils/service/serviceBookingStatusUtils.d.ts +21 -0
  103. package/dist/utils/service/serviceBookingStatusUtils.d.ts.map +1 -0
  104. package/dist/utils/service/serviceBookingStatusUtils.js +130 -0
  105. package/dist/utils/service/serviceBookingStatusUtils.js.map +1 -0
  106. package/dist/utils/service/serviceBookingTypes.d.ts +19 -0
  107. package/dist/utils/service/serviceBookingTypes.d.ts.map +1 -0
  108. package/dist/utils/service/serviceBookingTypes.js +2 -0
  109. package/dist/utils/service/serviceBookingTypes.js.map +1 -0
  110. package/dist/utils/service/serviceDBUtils.d.ts +5 -0
  111. package/dist/utils/service/serviceDBUtils.d.ts.map +1 -0
  112. package/dist/utils/service/serviceDBUtils.js +48 -0
  113. package/dist/utils/service/serviceDBUtils.js.map +1 -0
  114. package/dist/utils/service/serviceRateDBUtils.d.ts +1 -0
  115. package/dist/utils/service/serviceRateDBUtils.d.ts.map +1 -0
  116. package/dist/utils/service/serviceRateDBUtils.js +159 -0
  117. package/dist/utils/service/serviceRateDBUtils.js.map +1 -0
  118. package/dist/utils/service/serviceRateTypes.d.ts +9 -0
  119. package/dist/utils/service/serviceRateTypes.d.ts.map +1 -0
  120. package/dist/utils/service/serviceRateTypes.js +2 -0
  121. package/dist/utils/service/serviceRateTypes.js.map +1 -0
  122. package/dist/utils/service/serviceRateUtils.d.ts +24 -0
  123. package/dist/utils/service/serviceRateUtils.d.ts.map +1 -0
  124. package/dist/utils/service/serviceRateUtils.js +183 -0
  125. package/dist/utils/service/serviceRateUtils.js.map +1 -0
  126. package/dist/utils/service/serviceUtils.d.ts +83 -0
  127. package/dist/utils/service/serviceUtils.d.ts.map +1 -0
  128. package/dist/utils/service/serviceUtils.js +311 -0
  129. package/dist/utils/service/serviceUtils.js.map +1 -0
  130. package/dist/utils/service/venueUtils.d.ts +13 -0
  131. package/dist/utils/service/venueUtils.d.ts.map +1 -0
  132. package/dist/utils/service/venueUtils.js +18 -0
  133. package/dist/utils/service/venueUtils.js.map +1 -0
  134. package/dist/utils/slugUtils.d.ts +9 -0
  135. package/dist/utils/slugUtils.d.ts.map +1 -0
  136. package/dist/utils/slugUtils.js +47 -0
  137. package/dist/utils/slugUtils.js.map +1 -0
  138. package/dist/utils/sortUtils.d.ts +7 -0
  139. package/dist/utils/sortUtils.d.ts.map +1 -0
  140. package/dist/utils/sortUtils.js +26 -0
  141. package/dist/utils/sortUtils.js.map +1 -0
  142. package/dist/utils/stringUtils.d.ts +2 -0
  143. package/dist/utils/stringUtils.d.ts.map +1 -0
  144. package/dist/utils/stringUtils.js +6 -0
  145. package/dist/utils/stringUtils.js.map +1 -0
  146. package/dist/utils/stripeAccountUtils.d.ts +3 -0
  147. package/dist/utils/stripeAccountUtils.d.ts.map +1 -0
  148. package/dist/utils/stripeAccountUtils.js +10 -0
  149. package/dist/utils/stripeAccountUtils.js.map +1 -0
  150. package/dist/utils/ticketListUtils.d.ts +12 -0
  151. package/dist/utils/ticketListUtils.d.ts.map +1 -0
  152. package/dist/utils/ticketListUtils.js +78 -0
  153. package/dist/utils/ticketListUtils.js.map +1 -0
  154. package/dist/utils/typeUtils.d.ts +11 -0
  155. package/dist/utils/typeUtils.d.ts.map +1 -0
  156. package/dist/utils/typeUtils.js +8 -0
  157. package/dist/utils/typeUtils.js.map +1 -0
  158. package/dist/utils/urlUtils.d.ts +10 -0
  159. package/dist/utils/urlUtils.d.ts.map +1 -0
  160. package/dist/utils/urlUtils.js +66 -0
  161. package/dist/utils/urlUtils.js.map +1 -0
  162. package/dist/utils/userPromoCodeUtils.d.ts +21 -0
  163. package/dist/utils/userPromoCodeUtils.d.ts.map +1 -0
  164. package/dist/utils/userPromoCodeUtils.js +13 -0
  165. package/dist/utils/userPromoCodeUtils.js.map +1 -0
  166. package/dist/utils/userSubscriptionUtils.d.ts +36 -0
  167. package/dist/utils/userSubscriptionUtils.d.ts.map +1 -0
  168. package/dist/utils/userSubscriptionUtils.js +56 -0
  169. package/dist/utils/userSubscriptionUtils.js.map +1 -0
  170. package/dist/utils/userUtils.d.ts +2 -0
  171. package/dist/utils/userUtils.d.ts.map +1 -0
  172. package/dist/utils/userUtils.js +2 -0
  173. package/dist/utils/userUtils.js.map +1 -0
  174. package/package.json +4 -2
  175. package/prisma/schema.prisma +247 -94
  176. package/src/definitions.ts +52 -1
  177. package/src/extendedSchemas.ts +180 -13
  178. package/src/index.ts +32 -21
  179. package/src/utils/apiUtils.ts +0 -0
  180. package/src/utils/arrayUtils.ts +0 -0
  181. package/src/utils/awsS3Utils.ts +0 -0
  182. package/src/utils/blog/blogDbUtils.ts +343 -0
  183. package/src/utils/blogUtils.ts +134 -0
  184. package/src/utils/entityUtils.ts +0 -0
  185. package/src/utils/generalDateTimeUtils.ts +0 -0
  186. package/src/utils/mathUtils.ts +0 -0
  187. package/src/utils/objUtils.ts +0 -0
  188. package/src/utils/paymentUtils.ts +0 -0
  189. package/src/utils/promoCodesUtils.ts +0 -0
  190. package/src/utils/qrCodeUtils.ts +4 -2
  191. package/src/utils/service/attendeeOptionUtils.ts +0 -0
  192. package/src/utils/service/regexUtils.ts +0 -0
  193. package/src/utils/service/serviceBookingStatusUtils.ts +6 -18
  194. package/src/utils/service/serviceDBUtils.ts +0 -0
  195. package/src/utils/service/serviceRateDBUtils.ts +0 -0
  196. package/src/utils/service/serviceUtils.ts +0 -0
  197. package/src/utils/service/venueUtils.ts +0 -0
  198. package/src/utils/slugUtils.ts +60 -0
  199. package/src/utils/sortUtils.ts +0 -0
  200. package/src/utils/stringUtils.ts +0 -0
  201. package/src/utils/stripeAccountUtils.ts +0 -0
  202. package/src/utils/ticketListUtils.ts +24 -6
  203. package/src/utils/urlUtils.ts +0 -0
  204. package/src/utils/userPromoCodeUtils.ts +0 -0
  205. package/src/utils/userSubscriptionUtils.ts +0 -0
@@ -195,40 +195,78 @@ model PromoterClick {
195
195
  clickedAt DateTime @default(now())
196
196
  }
197
197
 
198
+ enum NotificationType {
199
+ General
200
+ Follow
201
+ TaskAssigned
202
+ TaskUnassigned
203
+ TaskRequest
204
+ TaskCompleted
205
+ BashApprovalRequest
206
+ BashApproved
207
+ BashRejected
208
+ BashTrending
209
+ BashOrganizerNewBash
210
+ BashCheckIn
211
+ BashAutoCheckIn
212
+ Invitation
213
+ ServiceBookingRequest
214
+ ServiceBookingApproved
215
+ ServiceBookingDeclined
216
+ ServiceBookingCancelled
217
+ ServiceBookingConfirmed
218
+ }
219
+
220
+ enum NotificationPriority {
221
+ High
222
+ Medium
223
+ Low
224
+ }
225
+
226
+ enum NotificationActionType {
227
+ Accept
228
+ Approve
229
+ Reject
230
+ View
231
+ Complete
232
+ Cancel
233
+ Other
234
+ }
235
+
198
236
  model Notification {
199
- id String @id @default(cuid())
237
+ id String @id @default(cuid())
200
238
  creatorId String
201
- creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
239
+ creator User @relation("NotificationsCreatedByMe", fields: [creatorId], references: [id], onDelete: Cascade)
202
240
  email String
203
241
  userId String? // Direct reference to recipient user
204
- user User? @relation("NotificationsReceivedByMe", fields: [userId], references: [id], onDelete: Cascade)
205
- createdDateTime DateTime @default(now())
242
+ user User? @relation("NotificationsReceivedByMe", fields: [userId], references: [id], onDelete: Cascade)
243
+ createdDateTime DateTime @default(now())
206
244
  message String
207
245
  image String?
208
246
  readDateTime DateTime?
209
- type String // Notification type: "FOLLOW", "TASK", "EVENT", etc.
247
+ type NotificationType // Notification type: "FOLLOW", "TASK", "EVENT", etc.
210
248
  taskId String?
211
- eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
249
+ eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
212
250
  invitationId String?
213
- invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
251
+ invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
214
252
  bashEventId String?
215
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
253
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
216
254
  serviceId String?
217
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
255
+ service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
218
256
  serviceBookingId String?
219
- serviceBooking ServiceBooking? @relation(fields: [serviceBookingId], references: [id], onDelete: Cascade)
257
+ serviceBooking ServiceBooking? @relation(fields: [serviceBookingId], references: [id], onDelete: Cascade)
220
258
  reminders Reminder[]
221
259
  redirectUrl String?
222
260
 
223
261
  // Additional specific fields for different notification types
224
262
  actionTaken Boolean? // For notifications that may require action
225
- actionType String? // Type of action taken (ACCEPT, REJECT, etc.)
226
- priority String? // Priority level (HIGH, MEDIUM, LOW)
263
+ actionType NotificationActionType?
264
+ priority NotificationPriority?
227
265
  expiresAt DateTime? // For time-sensitive notifications
228
266
 
229
- @@unique([creatorId, email, bashEventId, taskId])
230
- @@unique([creatorId, email, invitationId])
231
- @@unique([creatorId, email, serviceBookingId])
267
+ // @@unique([creatorId, email, bashEventId, taskId, type])
268
+ @@unique([creatorId, email, invitationId, type])
269
+ @@unique([creatorId, email, serviceBookingId, type])
232
270
  @@index([creatorId])
233
271
  @@index([userId])
234
272
  @@index([type]) // Add index for efficient filtering by notification type
@@ -273,6 +311,7 @@ model BashEvent {
273
311
  id String @id @default(cuid())
274
312
  source BashEventSource @default(Bash)
275
313
  title String
314
+ slug String? @unique
276
315
  creatorId String
277
316
  creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
278
317
  createdAt DateTime? @default(now())
@@ -336,6 +375,7 @@ model BashEvent {
336
375
  serviceBookings ServiceBooking[] // Add this field to create the reverse relation
337
376
  userReport UserReport[]
338
377
  favoritedBy UserFavorite[]
378
+ slugHistory BashSlugHistory[]
339
379
  }
340
380
 
341
381
  model Coordinates {
@@ -1129,6 +1169,10 @@ model User {
1129
1169
  favorites UserFavorite[]
1130
1170
 
1131
1171
  vendorBid VendorBid[]
1172
+
1173
+ // Blog relations
1174
+ blogPosts BlogPost[] @relation("BlogAuthor")
1175
+ blogComments BlogComment[] @relation("BlogCommentAuthor")
1132
1176
  }
1133
1177
 
1134
1178
  model UserPreferences {
@@ -1137,18 +1181,18 @@ model UserPreferences {
1137
1181
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1138
1182
 
1139
1183
  // Notification Preferences
1140
- emailNotifications Boolean @default(true)
1184
+ emailNotifications Boolean @default(true)
1141
1185
  pushNotifications Boolean @default(true)
1142
- marketingEmails Boolean @default(true) // Added from our UI
1143
- eventUpdates Boolean @default(true) // Added from our UI
1144
- serviceBookingNotifications Boolean @default(true) // Added from our UI
1145
- reviewReminders Boolean @default(true) // Added from our UI
1146
- newFollowerNotifications Boolean @default(true) // Added from our UI
1147
- trendingBashesNotify Boolean @default(true) // Updated default to true
1148
- organizerUpdatesNotify Boolean @default(true) // Updated default to true
1149
- recurringReminders Boolean @default(true) // NEW - multiple reminders as event approaches
1150
- eventSuggestions Boolean @default(true) // NEW - event planning tips and suggestions
1151
- serviceSuggestions Boolean @default(true) // NEW - vendor/service recommendations
1186
+ marketingEmails Boolean @default(true) // Added from our UI
1187
+ eventUpdates Boolean @default(true) // Added from our UI
1188
+ serviceBookingNotifications Boolean @default(true) // Added from our UI
1189
+ reviewReminders Boolean @default(true) // Added from our UI
1190
+ newFollowerNotifications Boolean @default(true) // Added from our UI
1191
+ trendingBashesNotify Boolean @default(true) // Updated default to true
1192
+ organizerUpdatesNotify Boolean @default(true) // Updated default to true
1193
+ recurringReminders Boolean @default(true) // NEW - multiple reminders as event approaches
1194
+ eventSuggestions Boolean @default(true) // NEW - event planning tips and suggestions
1195
+ serviceSuggestions Boolean @default(true) // NEW - vendor/service recommendations
1152
1196
  eventReminderNotify Boolean @default(true)
1153
1197
  newMessageNotify Boolean @default(true)
1154
1198
  invitationNotify Boolean @default(true)
@@ -1156,35 +1200,35 @@ model UserPreferences {
1156
1200
  servicePromotionsNotify Boolean @default(true)
1157
1201
 
1158
1202
  // Privacy Settings
1159
- profileVisibility String @default("public") // Updated to lowercase, matches our UI
1160
- eventHistoryVisibility Boolean @default(true) // Added from our UI
1161
- servicesVisibility Boolean @default(true) // Added from our UI
1162
- searchVisibility Boolean @default(true) // Added from our UI
1163
- hideFollowLists Boolean @default(false) // NEW - hide follower/following lists
1164
- attendancePrivacy String @default("public") // Updated to lowercase, matches our UI
1165
- hideEventPrices Boolean @default(false) // NEW - hide prices until day of event
1166
- showOnlineStatus Boolean @default(true)
1167
- allowDirectMessages Boolean @default(true)
1168
- blockSearchEngineIndex Boolean @default(false)
1203
+ profileVisibility String @default("public") // Updated to lowercase, matches our UI
1204
+ eventHistoryVisibility Boolean @default(true) // Added from our UI
1205
+ servicesVisibility Boolean @default(true) // Added from our UI
1206
+ searchVisibility Boolean @default(true) // Added from our UI
1207
+ hideFollowLists Boolean @default(false) // NEW - hide follower/following lists
1208
+ attendancePrivacy String @default("public") // Updated to lowercase, matches our UI
1209
+ hideEventPrices Boolean @default(false) // NEW - hide prices until day of event
1210
+ showOnlineStatus Boolean @default(true)
1211
+ allowDirectMessages Boolean @default(true)
1212
+ blockSearchEngineIndex Boolean @default(false)
1169
1213
 
1170
1214
  // Contact Management (NEW SECTION)
1171
- autoAddEventAttendees Boolean @default(true) // NEW - auto-add event attendees to contacts
1172
- trackFirstEventAttended Boolean @default(true) // NEW - remember which bash connected you
1173
- autoAddServiceClients Boolean @default(true) // NEW - auto-add service clients to contacts
1215
+ autoAddEventAttendees Boolean @default(true) // NEW - auto-add event attendees to contacts
1216
+ trackFirstEventAttended Boolean @default(true) // NEW - remember which bash connected you
1217
+ autoAddServiceClients Boolean @default(true) // NEW - auto-add service clients to contacts
1174
1218
 
1175
1219
  // UI/UX Preferences
1176
- theme String @default("system") // Updated to lowercase, matches our UI
1177
- language String @default("en") // Simplified from en-US
1178
- timeZone String @default("America/New_York")
1220
+ theme String @default("system") // Updated to lowercase, matches our UI
1221
+ language String @default("en") // Simplified from en-US
1222
+ timeZone String @default("America/New_York")
1179
1223
 
1180
1224
  // Event Preferences
1181
- eventReminderTiming String @default("1day") // NEW - 1hour, 1day, 1week (replaces defaultEventReminder)
1182
- locationRadius Int @default(50) // NEW - miles for event suggestions
1183
- calendarStartDay Int @default(0) // 0=Sunday, 1=Monday
1184
- defaultCalendarView String @default("MONTH") // DAY, WEEK, MONTH, AGENDA
1225
+ eventReminderTiming String @default("1day") // NEW - 1hour, 1day, 1week (replaces defaultEventReminder)
1226
+ locationRadius Int @default(50) // NEW - miles for event suggestions
1227
+ calendarStartDay Int @default(0) // 0=Sunday, 1=Monday
1228
+ defaultCalendarView String @default("MONTH") // DAY, WEEK, MONTH, AGENDA
1185
1229
 
1186
1230
  // Security & Consent Preferences
1187
- biometricAuthEnabled Boolean @default(false) // NEW - Face ID/Touch ID/Fingerprint
1231
+ biometricAuthEnabled Boolean @default(false) // NEW - Face ID/Touch ID/Fingerprint
1188
1232
  dataUsageConsent Boolean @default(true)
1189
1233
  analyticsConsent Boolean @default(true)
1190
1234
 
@@ -1197,28 +1241,28 @@ model UserPreferences {
1197
1241
  updatedAt DateTime @updatedAt
1198
1242
 
1199
1243
  // Less Relevant Fields (moved to bottom)
1200
- smsNotifications Boolean @default(false) // We're not using SMS
1201
- friendRequestNotify Boolean @default(true) // We use followers, not friends
1202
- allowTagging Boolean @default(true)
1203
- showActivityStatus Boolean @default(true)
1244
+ smsNotifications Boolean @default(false) // We're not using SMS
1245
+ friendRequestNotify Boolean @default(true) // We use followers, not friends
1246
+ allowTagging Boolean @default(true)
1247
+ showActivityStatus Boolean @default(true)
1204
1248
  hiddenBashIds String[] @default([])
1205
- hideActivitySection Boolean @default(false)
1206
- allowLocationSharing Boolean @default(false)
1207
- defaultLandingPage String @default("dashboard")
1208
- contentDensity String @default("COMFORTABLE") // COMPACT, COMFORTABLE, SPACIOUS
1209
- fontScale String @default("MEDIUM") // SMALL, MEDIUM, LARGE
1210
- animationsEnabled Boolean @default(true)
1211
- useHighContrastMode Boolean @default(false)
1249
+ hideActivitySection Boolean @default(false)
1250
+ allowLocationSharing Boolean @default(false)
1251
+ defaultLandingPage String @default("dashboard")
1252
+ contentDensity String @default("COMFORTABLE") // COMPACT, COMFORTABLE, SPACIOUS
1253
+ fontScale String @default("MEDIUM") // SMALL, MEDIUM, LARGE
1254
+ animationsEnabled Boolean @default(true)
1255
+ useHighContrastMode Boolean @default(false)
1212
1256
  contentFilters String[] @default([])
1213
1257
  topicInterests String[] @default([])
1214
1258
  hideSeenContent Boolean @default(false)
1215
1259
  autoplayVideos Boolean @default(true)
1216
- contentSortPreference String @default("RECENT") // RECENT, POPULAR, RELEVANT
1260
+ contentSortPreference String @default("RECENT") // RECENT, POPULAR, RELEVANT
1217
1261
  contentLanguages String[] @default(["en"])
1218
1262
  showSensitiveContent Boolean @default(false)
1219
- defaultEventReminder Int @default(60) // Minutes before event (replaced by eventReminderTiming)
1220
- communicationFrequency String @default("NORMAL") // LOW, NORMAL, HIGH
1221
- preferredContactMethod String @default("EMAIL") // EMAIL, PUSH, SMS
1263
+ defaultEventReminder Int @default(60) // Minutes before event (replaced by eventReminderTiming)
1264
+ communicationFrequency String @default("NORMAL") // LOW, NORMAL, HIGH
1265
+ preferredContactMethod String @default("EMAIL") // EMAIL, PUSH, SMS
1222
1266
 
1223
1267
  @@map("user_preferences")
1224
1268
  }
@@ -1570,41 +1614,40 @@ model VolunteerService {
1570
1614
  }
1571
1615
 
1572
1616
  model EventService {
1573
- id String @id @default(cuid())
1617
+ id String @id @default(cuid())
1574
1618
 
1575
1619
  // General classification
1576
- eventServiceType EventServiceType // e.g. DecorAndDesign
1577
- eventServiceSubType String? // e.g. "BalloonArt"
1620
+ eventServiceType EventServiceType // e.g. DecorAndDesign
1621
+ eventServiceSubType String? // e.g. "BalloonArt"
1578
1622
  formatOptions ServiceFormatOption[] // Related formats for this subtype
1579
1623
 
1580
1624
  // Custom input support
1581
- isCustom Boolean @default(false)
1582
- customNote String?
1625
+ isCustom Boolean @default(false)
1626
+ customNote String?
1583
1627
 
1584
1628
  // Optional linked models
1585
- serviceRangeId String?
1586
- serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1587
- crowdSizeId String? @unique
1588
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1589
- service Service?
1590
- serviceId String?
1629
+ serviceRangeId String?
1630
+ serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
1631
+ crowdSizeId String? @unique
1632
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1633
+ service Service?
1634
+ serviceId String?
1591
1635
 
1592
1636
  // Other descriptors
1593
1637
  yearsOfExperience YearsOfExperience
1594
1638
  goodsOrServices String[]
1595
1639
  menuItems String?
1596
1640
  venueTypes String[]
1597
- secondaryVenueTypes String[] @default([])
1641
+ secondaryVenueTypes String[] @default([])
1598
1642
  }
1599
1643
 
1600
1644
  model ServiceFormatOption {
1601
- id String @id @default(cuid())
1602
- eventServiceId String
1603
- eventService EventService @relation(fields: [eventServiceId], references: [id], onDelete: Cascade)
1604
- format String // e.g. "BalloonGarlands", "BuffetStyle", "WeddingFlorals"
1645
+ id String @id @default(cuid())
1646
+ eventServiceId String
1647
+ eventService EventService @relation(fields: [eventServiceId], references: [id], onDelete: Cascade)
1648
+ format String // e.g. "BalloonGarlands", "BuffetStyle", "WeddingFlorals"
1605
1649
  }
1606
1650
 
1607
-
1608
1651
  model EntertainmentService {
1609
1652
  id String @id @default(cuid())
1610
1653
  serviceRangeId String?
@@ -1689,7 +1732,6 @@ enum VendorBidStatus {
1689
1732
  Paid
1690
1733
  }
1691
1734
 
1692
-
1693
1735
  model Exhibitor {
1694
1736
  id String @id @default(cuid())
1695
1737
  serviceRangeId String?
@@ -1784,19 +1826,19 @@ model Organization {
1784
1826
  }
1785
1827
 
1786
1828
  enum EventServiceType {
1787
- Financing
1788
- EventPlanningAndManagement
1789
- FoodAndBeverage
1790
- Cleaning
1791
- DecorAndDesign
1792
- RentalEquipment
1793
- MediaProductionAndCreative
1794
- AudioVisualSupport
1795
- HostingSupport
1796
- PromotionAndMarketing
1797
- Staffing
1798
- Transportation
1799
- Other
1829
+ Financing
1830
+ EventPlanningAndManagement
1831
+ FoodAndBeverage
1832
+ Cleaning
1833
+ DecorAndDesign
1834
+ RentalEquipment
1835
+ MediaProductionAndCreative
1836
+ AudioVisualSupport
1837
+ HostingSupport
1838
+ PromotionAndMarketing
1839
+ Staffing
1840
+ Transportation
1841
+ Other
1800
1842
  }
1801
1843
 
1802
1844
  enum FinancingSubType {
@@ -3232,7 +3274,7 @@ model ServiceBooking {
3232
3274
  bashEventId String?
3233
3275
  bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
3234
3276
 
3235
- // Vendor-specific booking fields
3277
+ // Vendor-specific booking fields
3236
3278
  isVendorBid Boolean @default(false)
3237
3279
  vendorBidAmountCents Int? // Custom bid amount for vendor bookings
3238
3280
  vendorEventDetails String? // Additional event details for vendor
@@ -3430,3 +3472,114 @@ model UserFavorite {
3430
3472
  @@index([serviceId])
3431
3473
  @@index([bashEventId])
3432
3474
  }
3475
+
3476
+ model BashSlugHistory {
3477
+ id String @id @default(cuid())
3478
+ bashId String
3479
+ bash BashEvent @relation(fields: [bashId], references: [id], onDelete: Cascade)
3480
+ oldSlug String
3481
+ createdAt DateTime @default(now())
3482
+
3483
+ @@index([oldSlug])
3484
+ @@index([bashId])
3485
+ }
3486
+
3487
+ model BlogPost {
3488
+ id String @id @default(cuid())
3489
+ title String
3490
+ slug String @unique
3491
+ excerpt String?
3492
+ content String // Rich text content
3493
+ coverImage String?
3494
+ authorId String
3495
+ author User @relation("BlogAuthor", fields: [authorId], references: [id], onDelete: Cascade)
3496
+
3497
+ // SEO fields
3498
+ metaTitle String?
3499
+ metaDescription String?
3500
+ metaKeywords String[] @default([])
3501
+
3502
+ // Publishing
3503
+ status BlogStatus @default(Draft)
3504
+ publishedAt DateTime?
3505
+ scheduledFor DateTime?
3506
+
3507
+ // Engagement
3508
+ viewCount Int @default(0)
3509
+ readTime Int? // Estimated read time in minutes
3510
+
3511
+ // Categorization
3512
+ categoryId String?
3513
+ category BlogCategory? @relation(fields: [categoryId], references: [id], onDelete: SetNull)
3514
+ tags BlogTag[]
3515
+
3516
+ // Timestamps
3517
+ createdAt DateTime @default(now())
3518
+ updatedAt DateTime @updatedAt
3519
+
3520
+ // Relations
3521
+ comments BlogComment[]
3522
+
3523
+ @@index([status, publishedAt])
3524
+ @@index([categoryId])
3525
+ @@index([authorId])
3526
+ @@index([slug])
3527
+ }
3528
+
3529
+ model BlogCategory {
3530
+ id String @id @default(cuid())
3531
+ name String @unique
3532
+ slug String @unique
3533
+ description String?
3534
+ color String? // Hex color for UI
3535
+ posts BlogPost[]
3536
+ createdAt DateTime @default(now())
3537
+ updatedAt DateTime @updatedAt
3538
+ }
3539
+
3540
+ model BlogTag {
3541
+ id String @id @default(cuid())
3542
+ name String @unique
3543
+ slug String @unique
3544
+ color String? // Hex color for UI
3545
+ posts BlogPost[]
3546
+ createdAt DateTime @default(now())
3547
+ updatedAt DateTime @updatedAt
3548
+ }
3549
+
3550
+ model BlogComment {
3551
+ id String @id @default(cuid())
3552
+ content String
3553
+ authorId String
3554
+ author User @relation("BlogCommentAuthor", fields: [authorId], references: [id], onDelete: Cascade)
3555
+ postId String
3556
+ post BlogPost @relation(fields: [postId], references: [id], onDelete: Cascade)
3557
+
3558
+ // Nested comments
3559
+ parentId String?
3560
+ parent BlogComment? @relation("CommentReplies", fields: [parentId], references: [id], onDelete: Cascade)
3561
+ replies BlogComment[] @relation("CommentReplies")
3562
+
3563
+ // Moderation
3564
+ status CommentStatus @default(Published)
3565
+
3566
+ createdAt DateTime @default(now())
3567
+ updatedAt DateTime @updatedAt
3568
+
3569
+ @@index([postId])
3570
+ @@index([authorId])
3571
+ }
3572
+
3573
+ enum BlogStatus {
3574
+ Draft
3575
+ Published
3576
+ Scheduled
3577
+ Archived
3578
+ }
3579
+
3580
+ enum CommentStatus {
3581
+ Published
3582
+ Pending
3583
+ Spam
3584
+ Trash
3585
+ }
@@ -137,7 +137,8 @@ export const SERVICE_BOOKING_DETAILS_SERVICE_VIEW_URL_PAGE =
137
137
 
138
138
  export const VERIFICATION_RETURN_URL = `/sign-up` as const;
139
139
  export const MY_SERVICES_URL = "/my-services" as const;
140
- export const BASH_DETAIL_URL = `/bash-detail` as const;
140
+ export const BASH_DETAIL_URL = `/bash` as const;
141
+ export const BASH_DETAIL_URL_PATTERN = `/bash/$bashEventIdSlug` as const;
141
142
  export const SERVICE_PAGE_URL = `/service-page` as const;
142
143
  export const LOGIN_URL = `/login` as const;
143
144
  export const TICKET_DETAILS = `/ticket-details` as const;
@@ -969,6 +970,20 @@ export enum BadgeCategory {
969
970
  Special = "Special"
970
971
  }
971
972
 
973
+ export enum BlogStatus {
974
+ Draft = "Draft",
975
+ Published = "Published",
976
+ Scheduled = "Scheduled",
977
+ Archived = "Archived"
978
+ }
979
+
980
+ export enum CommentStatus {
981
+ Published = "Published",
982
+ Pending = "Pending",
983
+ Spam = "Spam",
984
+ Trash = "Trash"
985
+ }
986
+
972
987
  // Type definitions for badges and reviews
973
988
  export interface Badge {
974
989
  id: string;
@@ -1160,3 +1175,39 @@ export const REVIEW_API_ENDPOINTS = {
1160
1175
  `/user/${userId}/eligible-for-review/${hostId}`,
1161
1176
  CREATE_REVIEW: () => `/reviews`,
1162
1177
  };
1178
+
1179
+ export const DEFAULT_BASH_EVENT_IMAGE = "https://via.placeholder.com/400x300/e5e7eb/6b7280?text=Bash+Event" as const;
1180
+
1181
+ // Blog constants
1182
+ export const BLOG_URL = "/blog" as const;
1183
+ export const BLOG_DETAIL_URL = "/blog" as const;
1184
+ export const DEFAULT_BLOG_IMAGE = "https://via.placeholder.com/800x400/e5e7eb/6b7280?text=Blog+Post" as const;
1185
+
1186
+ // Blog pagination
1187
+ export const BLOG_POSTS_PER_PAGE = 12 as const;
1188
+ export const BLOG_EXCERPT_LENGTH = 150 as const;
1189
+
1190
+ // Blog categories
1191
+ export const DEFAULT_BLOG_CATEGORIES = [
1192
+ { name: "Event Planning", slug: "event-planning", color: "#3B82F6" },
1193
+ { name: "Industry News", slug: "industry-news", color: "#10B981" },
1194
+ { name: "Tips & Tricks", slug: "tips-tricks", color: "#F59E0B" },
1195
+ { name: "Success Stories", slug: "success-stories", color: "#8B5CF6" },
1196
+ { name: "Community", slug: "community", color: "#EF4444" },
1197
+ ] as const;
1198
+
1199
+ // Blog tags
1200
+ export const POPULAR_BLOG_TAGS = [
1201
+ "event-planning",
1202
+ "networking",
1203
+ "marketing",
1204
+ "venues",
1205
+ "catering",
1206
+ "entertainment",
1207
+ "photography",
1208
+ "decorations",
1209
+ "budgeting",
1210
+ "timeline",
1211
+ ] as const;
1212
+
1213
+ export const SITE_NAME = "Bash" as const;