@bash-app/bash-common 30.47.0 → 30.49.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "30.47.0",
3
+ "version": "30.49.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -24,6 +24,7 @@
24
24
  "@testing-library/jest-dom": "^6.6.3",
25
25
  "@types/qrcode": "^1.5.5",
26
26
  "lodash-es": "^4.17.21",
27
+ "mixpanel-browser": "^2.65.0",
27
28
  "npm": "^10.5.0",
28
29
  "qrcode": "^1.5.3"
29
30
  },
@@ -38,6 +39,7 @@
38
39
  "devDependencies": {
39
40
  "@types/jest": "^29.5.5",
40
41
  "@types/luxon": "^3.4.2",
42
+ "@types/mixpanel-browser": "^2.60.0",
41
43
  "@types/node": "^20.11.1",
42
44
  "@types/react": "^18.3.2",
43
45
  "@types/shelljs": "^0.8.15",
@@ -262,6 +262,11 @@ model Invitation {
262
262
  enum BashEventSource {
263
263
  Bash
264
264
  Eventbrite
265
+ Insomniac
266
+ UtahValley
267
+ LinkedIn
268
+ Meetup
269
+ Facebook
265
270
  }
266
271
 
267
272
  model BashEvent {
@@ -751,7 +756,14 @@ enum Education {
751
756
  enum UserIntent {
752
757
  EventSeeker
753
758
  EventOrganizer
759
+ Volunteer
760
+ EntertainmentService
761
+ EventService
762
+ Vendor
763
+ Sponsor
764
+ Exhibitor
754
765
  VenueOwner
766
+ OrganizationOwner
755
767
  Lonely
756
768
  }
757
769
 
@@ -1115,6 +1127,8 @@ model User {
1115
1127
  trendingBashThreshold Int @default(10) // Min attendees to trigger notification
1116
1128
  organizerUser UserFollowing[] @relation("FollowingOrganizers")
1117
1129
  favorites UserFavorite[]
1130
+
1131
+ vendorBid VendorBid[]
1118
1132
  }
1119
1133
 
1120
1134
  model UserPreferences {
@@ -1123,68 +1137,90 @@ model UserPreferences {
1123
1137
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1124
1138
 
1125
1139
  // Notification Preferences
1126
- emailNotifications Boolean @default(true)
1127
- pushNotifications Boolean @default(true)
1128
- smsNotifications Boolean @default(false)
1129
- newMessageNotify Boolean @default(true)
1130
- eventReminderNotify Boolean @default(true)
1131
- friendRequestNotify Boolean @default(true)
1132
- commentNotify Boolean @default(true)
1133
- invitationNotify Boolean @default(true)
1134
- eventUpdatesNotify Boolean @default(true)
1135
- servicePromotionsNotify Boolean @default(true)
1136
- trendingBashesNotify Boolean @default(false) // New field
1137
- organizerUpdatesNotify Boolean @default(false) // New field
1140
+ emailNotifications Boolean @default(true)
1141
+ 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
1152
+ eventReminderNotify Boolean @default(true)
1153
+ newMessageNotify Boolean @default(true)
1154
+ invitationNotify Boolean @default(true)
1155
+ commentNotify Boolean @default(true)
1156
+ servicePromotionsNotify Boolean @default(true)
1138
1157
 
1139
1158
  // Privacy Settings
1140
- profileVisibility String @default("PUBLIC") // PUBLIC, FRIENDS, PRIVATE
1141
- showOnlineStatus Boolean @default(true)
1142
- allowTagging Boolean @default(true)
1143
- allowDirectMessages Boolean @default(true)
1144
- showActivityStatus Boolean @default(true)
1145
- hiddenBashIds String[] @default([])
1146
- hideActivitySection Boolean @default(false)
1147
- allowLocationSharing Boolean @default(false)
1148
- blockSearchEngineIndex Boolean @default(false)
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)
1169
+
1170
+ // 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
1149
1174
 
1150
1175
  // UI/UX Preferences
1151
- theme String @default("SYSTEM") // LIGHT, DARK, SYSTEM
1152
- language String @default("en-US")
1176
+ theme String @default("system") // Updated to lowercase, matches our UI
1177
+ language String @default("en") // Simplified from en-US
1153
1178
  timeZone String @default("America/New_York")
1154
- defaultLandingPage String @default("dashboard")
1155
- contentDensity String @default("COMFORTABLE") // COMPACT, COMFORTABLE, SPACIOUS
1156
- fontScale String @default("MEDIUM") // SMALL, MEDIUM, LARGE
1157
- animationsEnabled Boolean @default(true)
1158
- useHighContrastMode Boolean @default(false)
1159
-
1160
- // Content Preferences
1161
- contentFilters String[] @default([])
1162
- topicInterests String[] @default([])
1163
- hideSeenContent Boolean @default(false)
1164
- autoplayVideos Boolean @default(true)
1165
- contentSortPreference String @default("RECENT") // RECENT, POPULAR, RELEVANT
1166
- contentLanguages String[] @default(["en"])
1167
- showSensitiveContent Boolean @default(false)
1168
-
1169
- // Calendar & Event Preferences
1170
- defaultCalendarView String @default("MONTH") // DAY, WEEK, MONTH, AGENDA
1171
- calendarStartDay Int @default(0) // 0=Sunday, 1=Monday
1172
- defaultEventReminder Int @default(60) // Minutes before event
1173
- attendancePrivacy String @default("PUBLIC") // PUBLIC, FRIENDS, PRIVATE
1174
-
1175
- // Communications Preferences
1176
- communicationFrequency String @default("NORMAL") // LOW, NORMAL, HIGH
1177
- preferredContactMethod String @default("EMAIL") // EMAIL, PUSH, SMS
1178
-
1179
- // Data & Payment Preferences
1180
- dataUsageConsent Boolean @default(true)
1181
- analyticsConsent Boolean @default(true)
1179
+
1180
+ // 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
1185
+
1186
+ // Security & Consent Preferences
1187
+ biometricAuthEnabled Boolean @default(false) // NEW - Face ID/Touch ID/Fingerprint
1188
+ dataUsageConsent Boolean @default(true)
1189
+ analyticsConsent Boolean @default(true)
1190
+
1191
+ // Payment Preferences
1182
1192
  preferredCurrency String @default("USD")
1183
1193
  savePaymentInfo Boolean @default(false)
1184
1194
  showEventPrices Boolean @default(true)
1185
1195
 
1186
1196
  createdAt DateTime @default(now())
1187
1197
  updatedAt DateTime @updatedAt
1198
+
1199
+ // 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)
1204
+ 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)
1212
+ contentFilters String[] @default([])
1213
+ topicInterests String[] @default([])
1214
+ hideSeenContent Boolean @default(false)
1215
+ autoplayVideos Boolean @default(true)
1216
+ contentSortPreference String @default("RECENT") // RECENT, POPULAR, RELEVANT
1217
+ contentLanguages String[] @default(["en"])
1218
+ 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
1222
+
1223
+ @@map("user_preferences")
1188
1224
  }
1189
1225
 
1190
1226
  model UserFollowing {
@@ -1602,9 +1638,58 @@ model Vendor {
1602
1638
  subType String?
1603
1639
  otherSubType String?
1604
1640
  detailsText String?
1605
- service Service?
1641
+
1642
+ // Booth fee range fields
1643
+ minBoothFeeCents Int? @default(0)
1644
+ maxBoothFeeCents Int? @default(0)
1645
+ preferredBoothFeeCents Int? @default(0)
1646
+
1647
+ service Service?
1648
+ vendorBids VendorBid[] // Relation to bids
1606
1649
  }
1607
1650
 
1651
+ model VendorBid {
1652
+ id String @id @default(cuid())
1653
+ vendorId String
1654
+ vendor Vendor @relation(fields: [vendorId], references: [id], onDelete: Cascade)
1655
+
1656
+ // Host (bidder) information
1657
+ userId String
1658
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1659
+
1660
+ // Bid details
1661
+ bidAmountCents Int
1662
+ eventDetails String @db.Text
1663
+ eventDate DateTime?
1664
+ expectedAttendees Int?
1665
+
1666
+ // Bid status
1667
+ status VendorBidStatus @default(Pending)
1668
+ respondedAt DateTime?
1669
+ responseMessage String?
1670
+
1671
+ // Payment tracking (if accepted)
1672
+ stripePaymentIntentId String?
1673
+ paidAt DateTime?
1674
+
1675
+ createdAt DateTime @default(now())
1676
+ updatedAt DateTime @updatedAt
1677
+
1678
+ @@index([vendorId])
1679
+ @@index([userId])
1680
+ @@index([status])
1681
+ }
1682
+
1683
+ enum VendorBidStatus {
1684
+ Pending
1685
+ Accepted
1686
+ Rejected
1687
+ Withdrawn
1688
+ Expired
1689
+ Paid
1690
+ }
1691
+
1692
+
1608
1693
  model Exhibitor {
1609
1694
  id String @id @default(cuid())
1610
1695
  serviceRangeId String?
@@ -1875,6 +1960,42 @@ enum EventManagerFormat {
1875
1960
  MultiVenueManager
1876
1961
  }
1877
1962
 
1963
+ enum LightCleaningFormat {
1964
+ PreEventSetup
1965
+ DuringEventMaintenance
1966
+ PostEventCleanup
1967
+ VenueWipeDown
1968
+ TrashRemoval
1969
+ BathroomMaintenance
1970
+ DiningAreaCleanup
1971
+ KitchenBasics
1972
+ FloorSweeping
1973
+ SurfaceCleaning
1974
+ WindowCleaning
1975
+ TableReset
1976
+ ChairArrangement
1977
+ BasicVacuuming
1978
+ SpotCleaning
1979
+ }
1980
+
1981
+ enum DeepCleaningFormat {
1982
+ PreEventDeepClean
1983
+ PostEventRestoration
1984
+ CarpetCleaning
1985
+ FloorStripping
1986
+ WindowWashing
1987
+ KitchenDeepClean
1988
+ BathroomSanitization
1989
+ UpholsteryClean
1990
+ VenueDisinfection
1991
+ EquipmentCleaning
1992
+ HighDusting
1993
+ PressureWashing
1994
+ GraffitiRemoval
1995
+ FloorWaxing
1996
+ DetailedSanitization
1997
+ }
1998
+
1878
1999
  enum VirtualAssistantFormat {
1879
2000
  EventScheduling
1880
2001
  VendorCoordination
@@ -3111,6 +3232,11 @@ model ServiceBooking {
3111
3232
  bashEventId String?
3112
3233
  bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
3113
3234
 
3235
+ // Vendor-specific booking fields
3236
+ isVendorBid Boolean @default(false)
3237
+ vendorBidAmountCents Int? // Custom bid amount for vendor bookings
3238
+ vendorEventDetails String? // Additional event details for vendor
3239
+
3114
3240
  @@index([status])
3115
3241
  @@index([creatorId])
3116
3242
  @@index([forUserId])
@@ -721,6 +721,7 @@ export const INVITATION_DATA_TO_INCLUDE = {
721
721
  export interface InvitationExtraData extends Invitation {
722
722
  isFreeGuest: boolean;
723
723
  isOrganizer?: boolean;
724
+ isOwnershipTransfer?: boolean;
724
725
  }
725
726
 
726
727
  export interface AssociatedBashExt extends AssociatedBash {
@@ -763,7 +763,10 @@ export interface TimeSlots {
763
763
  // } as TimeSlots;
764
764
  // }
765
765
 
766
- export function generateTimeSlots(filteredHours: LuxonDateRange[]): TimeSlots {
766
+ export function generateTimeSlots(
767
+ filteredHours: LuxonDateRange[],
768
+ incMin: number = 15
769
+ ): TimeSlots {
767
770
  const timeSlotsStart: string[] = [];
768
771
  let timeSlotsEnd: string[] = [];
769
772
 
@@ -775,13 +778,13 @@ export function generateTimeSlots(filteredHours: LuxonDateRange[]): TimeSlots {
775
778
 
776
779
  while (currentTime < startEnd) {
777
780
  timeSlotsStart.push(dateTimeFormatTime(currentTime)); // Add the time in "HH:mm" format
778
- currentTime = currentTime.plus({ minutes: 30 }); // Increment by 30 minutes
781
+ currentTime = currentTime.plus({ minutes: incMin }); // Increment by 30 minutes
779
782
  }
780
783
 
781
784
  currentTime = end;
782
785
  while (currentTime < endEnd) {
783
786
  timeSlotsEnd.push(dateTimeFormatTime(currentTime)); // Add the time in "HH:mm" format
784
- currentTime = currentTime.plus({ minutes: 30 }); // Increment by 30 minutes
787
+ currentTime = currentTime.plus({ minutes: incMin }); // Increment by 30 minutes
785
788
  }
786
789
 
787
790
  const finalTime =
@@ -85,9 +85,6 @@ export function frontendServiceGetBookingDayInfo({
85
85
  }: FrontendServiceGetBookingDayInfoFrontParams): FrontendServiceBookingDayInfo[] {
86
86
  const bookingDayResults: FrontendServiceBookingDayInfo[] =
87
87
  daysToBookParams.map((day) => {
88
- const rates = serviceRatesFilter(filteredRates, [day.dateTimeRange]);
89
- const { generalRate, specialRates, dailyRates } = rates;
90
-
91
88
  let priceBreakdown: ServiceBookingPriceBreakdownBaseT[] = [];
92
89
  const durationHours = dateTimeDiffHours(
93
90
  day.dateTimeRange.start,
@@ -101,6 +98,9 @@ export function frontendServiceGetBookingDayInfo({
101
98
  let hoursRemaining = durationHours;
102
99
  let currentRange = { ...day.dateTimeRange };
103
100
  let baseCostDiscountedCents = 0;
101
+
102
+ const rates = serviceRatesFilter(filteredRates, [day.dateTimeRange]);
103
+ const { generalRate, specialRates, dailyRates } = rates;
104
104
  while (serviceRatesHasRates(rates) && hoursRemaining > 0) {
105
105
  const pricingInfo = getServiceRatePricingInfo(
106
106
  currentRange,