@bash-app/bash-common 30.48.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/README.md +0 -0
- package/package.json +3 -1
- package/prisma/schema.prisma +178 -52
- package/src/extendedSchemas.ts +1 -0
- package/src/utils/apiUtils.ts +0 -0
- package/src/utils/arrayUtils.ts +0 -0
- package/src/utils/awsS3Utils.ts +0 -0
- package/src/utils/dateTimeUtils.ts +0 -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 +0 -0
- package/src/utils/recurrenceUtils.ts +0 -0
- package/src/utils/service/apiServiceBookingApiUtils.ts +0 -0
- package/src/utils/service/attendeeOptionUtils.ts +0 -0
- package/src/utils/service/regexUtils.ts +0 -0
- package/src/utils/service/serviceBookingStatusUtils.ts +14 -14
- 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/sortUtils.ts +0 -0
- package/src/utils/stringUtils.ts +0 -0
- package/src/utils/stripeAccountUtils.ts +0 -0
- package/src/utils/ticketListUtils.ts +0 -0
- package/src/utils/typeUtils.ts +0 -0
- package/src/utils/urlUtils.ts +0 -0
- package/src/utils/userPromoCodeUtils.ts +0 -0
- package/src/utils/userSubscriptionUtils.ts +0 -0
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bash-app/bash-common",
|
|
3
|
-
"version": "30.
|
|
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",
|
package/prisma/schema.prisma
CHANGED
|
@@ -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
|
|
1127
|
-
pushNotifications
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
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
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
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("
|
|
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
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
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
|
-
|
|
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])
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -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 {
|
package/src/utils/apiUtils.ts
CHANGED
|
File without changes
|
package/src/utils/arrayUtils.ts
CHANGED
|
File without changes
|
package/src/utils/awsS3Utils.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/utils/entityUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/utils/mathUtils.ts
CHANGED
|
File without changes
|
package/src/utils/objUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/utils/qrCodeUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -107,20 +107,20 @@ export function serviceBookingCanHaveApprovalDecision(
|
|
|
107
107
|
errorMessage: "Approval decisions can only be made on booking requests.",
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
if (serviceBookingIsCanceled(booking)) {
|
|
111
|
+
return {
|
|
112
|
+
valid: false,
|
|
113
|
+
errorMessage:
|
|
114
|
+
"Approval decisions can not be made on canceled booking requests.",
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (serviceBookingIsConfirmed(booking)) {
|
|
118
|
+
return {
|
|
119
|
+
valid: false,
|
|
120
|
+
errorMessage:
|
|
121
|
+
"Approval decisions can not be made on confirmed booking requests.",
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
124
|
|
|
125
125
|
return { valid: true };
|
|
126
126
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/utils/sortUtils.ts
CHANGED
|
File without changes
|
package/src/utils/stringUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/utils/typeUtils.ts
CHANGED
|
File without changes
|
package/src/utils/urlUtils.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|