@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.
- package/README.md +0 -0
- package/dist/definitions.d.ts +668 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +467 -0
- package/dist/definitions.js.map +1 -0
- package/dist/extendedSchemas.d.ts +2206 -0
- package/dist/extendedSchemas.d.ts.map +1 -0
- package/dist/extendedSchemas.js +429 -0
- package/dist/extendedSchemas.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/addressUtils.d.ts +14 -0
- package/dist/utils/addressUtils.d.ts.map +1 -0
- package/dist/utils/addressUtils.js +177 -0
- package/dist/utils/addressUtils.js.map +1 -0
- package/dist/utils/apiUtils.d.ts +14 -0
- package/dist/utils/apiUtils.d.ts.map +1 -0
- package/dist/utils/apiUtils.js +61 -0
- package/dist/utils/apiUtils.js.map +1 -0
- package/dist/utils/arrayUtils.d.ts +2 -0
- package/dist/utils/arrayUtils.d.ts.map +1 -0
- package/dist/utils/arrayUtils.js +5 -0
- package/dist/utils/arrayUtils.js.map +1 -0
- package/dist/utils/awsS3Utils.d.ts +10 -0
- package/dist/utils/awsS3Utils.d.ts.map +1 -0
- package/dist/utils/awsS3Utils.js +89 -0
- package/dist/utils/awsS3Utils.js.map +1 -0
- package/dist/utils/badgeUtils.d.ts +33 -0
- package/dist/utils/badgeUtils.d.ts.map +1 -0
- package/dist/utils/badgeUtils.js +57 -0
- package/dist/utils/badgeUtils.js.map +1 -0
- package/dist/utils/blog/blogDbUtils.d.ts +48 -0
- package/dist/utils/blog/blogDbUtils.d.ts.map +1 -0
- package/dist/utils/blog/blogDbUtils.js +218 -0
- package/dist/utils/blog/blogDbUtils.js.map +1 -0
- package/dist/utils/blogUtils.d.ts +19 -0
- package/dist/utils/blogUtils.d.ts.map +1 -0
- package/dist/utils/blogUtils.js +118 -0
- package/dist/utils/blogUtils.js.map +1 -0
- package/dist/utils/dateTimeUtils.d.ts +38 -0
- package/dist/utils/dateTimeUtils.d.ts.map +1 -0
- package/dist/utils/dateTimeUtils.js +207 -0
- package/dist/utils/dateTimeUtils.js.map +1 -0
- package/dist/utils/entityUtils.d.ts +5 -0
- package/dist/utils/entityUtils.d.ts.map +1 -0
- package/dist/utils/entityUtils.js +5 -0
- package/dist/utils/entityUtils.js.map +1 -0
- package/dist/utils/generalDateTimeUtils.d.ts +15 -0
- package/dist/utils/generalDateTimeUtils.d.ts.map +1 -0
- package/dist/utils/generalDateTimeUtils.js +38 -0
- package/dist/utils/generalDateTimeUtils.js.map +1 -0
- package/dist/utils/luxonUtils.d.ts +95 -0
- package/dist/utils/luxonUtils.d.ts.map +1 -0
- package/dist/utils/luxonUtils.js +623 -0
- package/dist/utils/luxonUtils.js.map +1 -0
- package/dist/utils/mathUtils.d.ts +2 -0
- package/dist/utils/mathUtils.d.ts.map +1 -0
- package/dist/utils/mathUtils.js +4 -0
- package/dist/utils/mathUtils.js.map +1 -0
- package/dist/utils/objUtils.d.ts +3 -0
- package/dist/utils/objUtils.d.ts.map +1 -0
- package/dist/utils/objUtils.js +29 -0
- package/dist/utils/objUtils.js.map +1 -0
- package/dist/utils/paymentUtils.d.ts +18 -0
- package/dist/utils/paymentUtils.d.ts.map +1 -0
- package/dist/utils/paymentUtils.js +50 -0
- package/dist/utils/paymentUtils.js.map +1 -0
- package/dist/utils/promoCodesUtils.d.ts +6 -0
- package/dist/utils/promoCodesUtils.d.ts.map +1 -0
- package/dist/utils/promoCodesUtils.js +23 -0
- package/dist/utils/promoCodesUtils.js.map +1 -0
- package/dist/utils/qrCodeUtils.d.ts +4 -0
- package/dist/utils/qrCodeUtils.d.ts.map +1 -0
- package/dist/utils/qrCodeUtils.js +22 -0
- package/dist/utils/qrCodeUtils.js.map +1 -0
- package/dist/utils/recurrenceUtils.d.ts +8 -0
- package/dist/utils/recurrenceUtils.d.ts.map +1 -0
- package/dist/utils/recurrenceUtils.js +153 -0
- package/dist/utils/recurrenceUtils.js.map +1 -0
- package/dist/utils/reviewUtils.d.ts +29 -0
- package/dist/utils/reviewUtils.d.ts.map +1 -0
- package/dist/utils/reviewUtils.js +65 -0
- package/dist/utils/reviewUtils.js.map +1 -0
- package/dist/utils/service/apiServiceBookingApiUtils.d.ts +21 -0
- package/dist/utils/service/apiServiceBookingApiUtils.d.ts.map +1 -0
- package/dist/utils/service/apiServiceBookingApiUtils.js +131 -0
- package/dist/utils/service/apiServiceBookingApiUtils.js.map +1 -0
- package/dist/utils/service/attendeeOptionUtils.d.ts +11 -0
- package/dist/utils/service/attendeeOptionUtils.d.ts.map +1 -0
- package/dist/utils/service/attendeeOptionUtils.js +9 -0
- package/dist/utils/service/attendeeOptionUtils.js.map +1 -0
- package/dist/utils/service/frontendServiceBookingUtils.d.ts +53 -0
- package/dist/utils/service/frontendServiceBookingUtils.d.ts.map +1 -0
- package/dist/utils/service/frontendServiceBookingUtils.js +134 -0
- package/dist/utils/service/frontendServiceBookingUtils.js.map +1 -0
- package/dist/utils/service/regexUtils.d.ts +6 -0
- package/dist/utils/service/regexUtils.d.ts.map +1 -0
- package/dist/utils/service/regexUtils.js +16 -0
- package/dist/utils/service/regexUtils.js.map +1 -0
- package/dist/utils/service/serviceBookingStatusUtils.d.ts +21 -0
- package/dist/utils/service/serviceBookingStatusUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceBookingStatusUtils.js +130 -0
- package/dist/utils/service/serviceBookingStatusUtils.js.map +1 -0
- package/dist/utils/service/serviceBookingTypes.d.ts +19 -0
- package/dist/utils/service/serviceBookingTypes.d.ts.map +1 -0
- package/dist/utils/service/serviceBookingTypes.js +2 -0
- package/dist/utils/service/serviceBookingTypes.js.map +1 -0
- package/dist/utils/service/serviceDBUtils.d.ts +5 -0
- package/dist/utils/service/serviceDBUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceDBUtils.js +48 -0
- package/dist/utils/service/serviceDBUtils.js.map +1 -0
- package/dist/utils/service/serviceRateDBUtils.d.ts +1 -0
- package/dist/utils/service/serviceRateDBUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceRateDBUtils.js +159 -0
- package/dist/utils/service/serviceRateDBUtils.js.map +1 -0
- package/dist/utils/service/serviceRateTypes.d.ts +9 -0
- package/dist/utils/service/serviceRateTypes.d.ts.map +1 -0
- package/dist/utils/service/serviceRateTypes.js +2 -0
- package/dist/utils/service/serviceRateTypes.js.map +1 -0
- package/dist/utils/service/serviceRateUtils.d.ts +24 -0
- package/dist/utils/service/serviceRateUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceRateUtils.js +183 -0
- package/dist/utils/service/serviceRateUtils.js.map +1 -0
- package/dist/utils/service/serviceUtils.d.ts +83 -0
- package/dist/utils/service/serviceUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceUtils.js +311 -0
- package/dist/utils/service/serviceUtils.js.map +1 -0
- package/dist/utils/service/venueUtils.d.ts +13 -0
- package/dist/utils/service/venueUtils.d.ts.map +1 -0
- package/dist/utils/service/venueUtils.js +18 -0
- package/dist/utils/service/venueUtils.js.map +1 -0
- package/dist/utils/slugUtils.d.ts +9 -0
- package/dist/utils/slugUtils.d.ts.map +1 -0
- package/dist/utils/slugUtils.js +47 -0
- package/dist/utils/slugUtils.js.map +1 -0
- package/dist/utils/sortUtils.d.ts +7 -0
- package/dist/utils/sortUtils.d.ts.map +1 -0
- package/dist/utils/sortUtils.js +26 -0
- package/dist/utils/sortUtils.js.map +1 -0
- package/dist/utils/stringUtils.d.ts +2 -0
- package/dist/utils/stringUtils.d.ts.map +1 -0
- package/dist/utils/stringUtils.js +6 -0
- package/dist/utils/stringUtils.js.map +1 -0
- package/dist/utils/stripeAccountUtils.d.ts +3 -0
- package/dist/utils/stripeAccountUtils.d.ts.map +1 -0
- package/dist/utils/stripeAccountUtils.js +10 -0
- package/dist/utils/stripeAccountUtils.js.map +1 -0
- package/dist/utils/ticketListUtils.d.ts +12 -0
- package/dist/utils/ticketListUtils.d.ts.map +1 -0
- package/dist/utils/ticketListUtils.js +78 -0
- package/dist/utils/ticketListUtils.js.map +1 -0
- package/dist/utils/typeUtils.d.ts +11 -0
- package/dist/utils/typeUtils.d.ts.map +1 -0
- package/dist/utils/typeUtils.js +8 -0
- package/dist/utils/typeUtils.js.map +1 -0
- package/dist/utils/urlUtils.d.ts +10 -0
- package/dist/utils/urlUtils.d.ts.map +1 -0
- package/dist/utils/urlUtils.js +66 -0
- package/dist/utils/urlUtils.js.map +1 -0
- package/dist/utils/userPromoCodeUtils.d.ts +21 -0
- package/dist/utils/userPromoCodeUtils.d.ts.map +1 -0
- package/dist/utils/userPromoCodeUtils.js +13 -0
- package/dist/utils/userPromoCodeUtils.js.map +1 -0
- package/dist/utils/userSubscriptionUtils.d.ts +36 -0
- package/dist/utils/userSubscriptionUtils.d.ts.map +1 -0
- package/dist/utils/userSubscriptionUtils.js +56 -0
- package/dist/utils/userSubscriptionUtils.js.map +1 -0
- package/dist/utils/userUtils.d.ts +2 -0
- package/dist/utils/userUtils.d.ts.map +1 -0
- package/dist/utils/userUtils.js +2 -0
- package/dist/utils/userUtils.js.map +1 -0
- package/package.json +4 -2
- package/prisma/schema.prisma +247 -94
- package/src/definitions.ts +52 -1
- package/src/extendedSchemas.ts +180 -13
- package/src/index.ts +32 -21
- package/src/utils/apiUtils.ts +0 -0
- package/src/utils/arrayUtils.ts +0 -0
- package/src/utils/awsS3Utils.ts +0 -0
- package/src/utils/blog/blogDbUtils.ts +343 -0
- package/src/utils/blogUtils.ts +134 -0
- package/src/utils/entityUtils.ts +0 -0
- package/src/utils/generalDateTimeUtils.ts +0 -0
- package/src/utils/mathUtils.ts +0 -0
- package/src/utils/objUtils.ts +0 -0
- package/src/utils/paymentUtils.ts +0 -0
- package/src/utils/promoCodesUtils.ts +0 -0
- package/src/utils/qrCodeUtils.ts +4 -2
- package/src/utils/service/attendeeOptionUtils.ts +0 -0
- package/src/utils/service/regexUtils.ts +0 -0
- package/src/utils/service/serviceBookingStatusUtils.ts +6 -18
- package/src/utils/service/serviceDBUtils.ts +0 -0
- package/src/utils/service/serviceRateDBUtils.ts +0 -0
- package/src/utils/service/serviceUtils.ts +0 -0
- package/src/utils/service/venueUtils.ts +0 -0
- package/src/utils/slugUtils.ts +60 -0
- package/src/utils/sortUtils.ts +0 -0
- package/src/utils/stringUtils.ts +0 -0
- package/src/utils/stripeAccountUtils.ts +0 -0
- package/src/utils/ticketListUtils.ts +24 -6
- package/src/utils/urlUtils.ts +0 -0
- package/src/utils/userPromoCodeUtils.ts +0 -0
- package/src/utils/userSubscriptionUtils.ts +0 -0
package/prisma/schema.prisma
CHANGED
|
@@ -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
|
|
237
|
+
id String @id @default(cuid())
|
|
200
238
|
creatorId String
|
|
201
|
-
creator User
|
|
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?
|
|
205
|
-
createdDateTime DateTime
|
|
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
|
|
247
|
+
type NotificationType // Notification type: "FOLLOW", "TASK", "EVENT", etc.
|
|
210
248
|
taskId String?
|
|
211
|
-
eventTask EventTask?
|
|
249
|
+
eventTask EventTask? @relation(fields: [taskId], references: [id], onDelete: Cascade)
|
|
212
250
|
invitationId String?
|
|
213
|
-
invitation Invitation?
|
|
251
|
+
invitation Invitation? @relation(fields: [invitationId], references: [id], onDelete: Cascade)
|
|
214
252
|
bashEventId String?
|
|
215
|
-
bashEvent BashEvent?
|
|
253
|
+
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
216
254
|
serviceId String?
|
|
217
|
-
service Service?
|
|
255
|
+
service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
218
256
|
serviceBookingId String?
|
|
219
|
-
serviceBooking ServiceBooking?
|
|
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
|
|
226
|
-
priority
|
|
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
|
|
1184
|
+
emailNotifications Boolean @default(true)
|
|
1141
1185
|
pushNotifications Boolean @default(true)
|
|
1142
|
-
marketingEmails Boolean @default(true)
|
|
1143
|
-
eventUpdates Boolean @default(true)
|
|
1144
|
-
serviceBookingNotifications Boolean @default(true)
|
|
1145
|
-
reviewReminders Boolean @default(true)
|
|
1146
|
-
newFollowerNotifications Boolean @default(true)
|
|
1147
|
-
trendingBashesNotify Boolean @default(true)
|
|
1148
|
-
organizerUpdatesNotify Boolean @default(true)
|
|
1149
|
-
recurringReminders Boolean @default(true)
|
|
1150
|
-
eventSuggestions Boolean @default(true)
|
|
1151
|
-
serviceSuggestions Boolean @default(true)
|
|
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
|
|
1160
|
-
eventHistoryVisibility
|
|
1161
|
-
servicesVisibility
|
|
1162
|
-
searchVisibility
|
|
1163
|
-
hideFollowLists
|
|
1164
|
-
attendancePrivacy
|
|
1165
|
-
hideEventPrices
|
|
1166
|
-
showOnlineStatus
|
|
1167
|
-
allowDirectMessages
|
|
1168
|
-
blockSearchEngineIndex
|
|
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)
|
|
1172
|
-
trackFirstEventAttended Boolean @default(true)
|
|
1173
|
-
autoAddServiceClients Boolean @default(true)
|
|
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
|
|
1177
|
-
language
|
|
1178
|
-
timeZone
|
|
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")
|
|
1182
|
-
locationRadius Int @default(50)
|
|
1183
|
-
calendarStartDay Int @default(0)
|
|
1184
|
-
defaultCalendarView String @default("MONTH")
|
|
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)
|
|
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
|
|
1201
|
-
friendRequestNotify
|
|
1202
|
-
allowTagging Boolean
|
|
1203
|
-
showActivityStatus Boolean
|
|
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
|
|
1206
|
-
allowLocationSharing Boolean
|
|
1207
|
-
defaultLandingPage String
|
|
1208
|
-
contentDensity String
|
|
1209
|
-
fontScale String
|
|
1210
|
-
animationsEnabled Boolean
|
|
1211
|
-
useHighContrastMode Boolean
|
|
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")
|
|
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)
|
|
1220
|
-
communicationFrequency String @default("NORMAL")
|
|
1221
|
-
preferredContactMethod String @default("EMAIL")
|
|
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
|
|
1617
|
+
id String @id @default(cuid())
|
|
1574
1618
|
|
|
1575
1619
|
// General classification
|
|
1576
|
-
eventServiceType
|
|
1577
|
-
eventServiceSubType
|
|
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
|
|
1582
|
-
customNote
|
|
1625
|
+
isCustom Boolean @default(false)
|
|
1626
|
+
customNote String?
|
|
1583
1627
|
|
|
1584
1628
|
// Optional linked models
|
|
1585
|
-
serviceRangeId
|
|
1586
|
-
serviceRange
|
|
1587
|
-
crowdSizeId
|
|
1588
|
-
crowdSize
|
|
1589
|
-
service
|
|
1590
|
-
serviceId
|
|
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[]
|
|
1641
|
+
secondaryVenueTypes String[] @default([])
|
|
1598
1642
|
}
|
|
1599
1643
|
|
|
1600
1644
|
model ServiceFormatOption {
|
|
1601
|
-
id
|
|
1602
|
-
eventServiceId
|
|
1603
|
-
eventService
|
|
1604
|
-
format
|
|
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
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
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
|
-
|
|
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
|
+
}
|
package/src/definitions.ts
CHANGED
|
@@ -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
|
|
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;
|