@bash-app/bash-common 30.97.1 → 30.99.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/dist/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export * from "./utils/service/serviceDBUtils";
36
36
  export * from "./utils/service/serviceRateUtils";
37
37
  export * from "./utils/stripeAccountUtils";
38
38
  export * from "./utils/userUtils";
39
+ export * from "./utils/venueTypeFormatter";
39
40
  export { createAllTrueObject } from "./utils/typeUtils";
40
41
  export type { DeepPartial, MakeOptional, MakeRequired, Override, RemoveCommonProperties, UnionFromArray } from "./utils/typeUtils";
41
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAE7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAE9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC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c,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAG3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EACR,WAAW,EAAE,YAAY,EACzB,YAAY,EAAE,QAAQ,EAAE,sBAAsB,EAAE,cAAc,EACjE,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -38,6 +38,7 @@ export * from "./utils/service/serviceDBUtils";
38
38
  export * from "./utils/service/serviceRateUtils";
39
39
  export * from "./utils/stripeAccountUtils";
40
40
  export * from "./utils/userUtils";
41
+ export * from "./utils/venueTypeFormatter";
41
42
  // Export typeUtils types individually to avoid ValueOf conflict with definitions
42
43
  export { createAllTrueObject } from "./utils/typeUtils";
43
44
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc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c,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,+DAA+D;AAC/D,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,sDAAsD;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAE3C,iFAAiF;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,42 @@
1
+ export * from './addressUtils';
2
+ export * from './apiUtils';
3
+ export * from './arrayUtils';
4
+ export * from './awsS3Utils';
5
+ export * from './badgeUtils';
6
+ export * from './bashCashPaymentUtils';
7
+ export * from './blog/blogDbUtils';
8
+ export * from './blogUtils';
9
+ export * from './contentFilterUtils';
10
+ export * from './dateTimeUtils';
11
+ export * from './entityUtils';
12
+ export * from './generalDateTimeUtils';
13
+ export * from './luxonUtils';
14
+ export * from './mathUtils';
15
+ export * from './objUtils';
16
+ export * from './paymentUtils';
17
+ export * from './promoCodesUtils';
18
+ export * from './qrCodeUtils';
19
+ export * from './recurrenceUtils';
20
+ export * from './reviewUtils';
21
+ export * from './service/apiServiceBookingApiUtils';
22
+ export * from './service/attendeeOptionUtils';
23
+ export * from './service/frontendServiceBookingUtils';
24
+ export * from './service/regexUtils';
25
+ export * from './service/serviceBookingStatusUtils';
26
+ export * from './service/serviceBookingTypes';
27
+ export * from './service/serviceDBUtils';
28
+ export * from './service/serviceRateTypes';
29
+ export * from './service/serviceRateUtils';
30
+ export * from './service/serviceUtils';
31
+ export * from './slugUtils';
32
+ export * from './sortUtils';
33
+ export * from './stringUtils';
34
+ export * from './stripeAccountUtils';
35
+ export * from './ticketListUtils';
36
+ export * from './typeUtils';
37
+ export * from './urlUtils';
38
+ export * from './userPromoCodeUtils';
39
+ export * from './userSubscriptionUtils';
40
+ export * from './userUtils';
41
+ export * from './venueTypeFormatter';
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,43 @@
1
+ export * from './addressUtils';
2
+ export * from './apiUtils';
3
+ export * from './arrayUtils';
4
+ export * from './awsS3Utils';
5
+ export * from './badgeUtils';
6
+ export * from './bashCashPaymentUtils';
7
+ export * from './blog/blogDbUtils';
8
+ export * from './blogUtils';
9
+ export * from './contentFilterUtils';
10
+ export * from './dateTimeUtils';
11
+ export * from './entityUtils';
12
+ export * from './generalDateTimeUtils';
13
+ export * from './luxonUtils';
14
+ export * from './mathUtils';
15
+ export * from './objUtils';
16
+ export * from './paymentUtils';
17
+ export * from './promoCodesUtils';
18
+ export * from './qrCodeUtils';
19
+ export * from './recurrenceUtils';
20
+ export * from './reviewUtils';
21
+ export * from './service/apiServiceBookingApiUtils';
22
+ export * from './service/attendeeOptionUtils';
23
+ export * from './service/frontendServiceBookingUtils';
24
+ export * from './service/regexUtils';
25
+ export * from './service/serviceBookingStatusUtils';
26
+ export * from './service/serviceBookingTypes';
27
+ export * from './service/serviceDBUtils';
28
+ // export * from './service/serviceRateDBUtils'; // File is all commented out
29
+ export * from './service/serviceRateTypes';
30
+ export * from './service/serviceRateUtils';
31
+ export * from './service/serviceUtils';
32
+ export * from './slugUtils';
33
+ export * from './sortUtils';
34
+ export * from './stringUtils';
35
+ export * from './stripeAccountUtils';
36
+ export * from './ticketListUtils';
37
+ export * from './typeUtils';
38
+ export * from './urlUtils';
39
+ export * from './userPromoCodeUtils';
40
+ export * from './userSubscriptionUtils';
41
+ export * from './userUtils';
42
+ export * from './venueTypeFormatter';
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,6EAA6E;AAC7E,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Formats venue type enum values into human-readable display names
3
+ * Example: "OutdoorSpace" -> "Outdoor Space", "WeddingVenue" -> "Wedding Venue"
4
+ */
5
+ export declare function formatVenueType(venueType: string): string;
6
+ /**
7
+ * Formats an array of venue types into a human-readable string
8
+ */
9
+ export declare function formatVenueTypes(venueTypes: string[], maxDisplay?: number): string;
10
+ //# sourceMappingURL=venueTypeFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"venueTypeFormatter.d.ts","sourceRoot":"","sources":["../../src/utils/venueTypeFormatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAKzD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,MAAU,GAAG,MAAM,CAarF"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Formats venue type enum values into human-readable display names
3
+ * Example: "OutdoorSpace" -> "Outdoor Space", "WeddingVenue" -> "Wedding Venue"
4
+ */
5
+ export function formatVenueType(venueType) {
6
+ if (!venueType)
7
+ return '';
8
+ // Insert space before capital letters (but not at the start)
9
+ return venueType.replace(/([A-Z])/g, ' $1').trim();
10
+ }
11
+ /**
12
+ * Formats an array of venue types into a human-readable string
13
+ */
14
+ export function formatVenueTypes(venueTypes, maxDisplay = 2) {
15
+ if (!Array.isArray(venueTypes) || venueTypes.length === 0) {
16
+ return '';
17
+ }
18
+ const formatted = venueTypes.slice(0, maxDisplay).map(formatVenueType);
19
+ const remaining = venueTypes.length - maxDisplay;
20
+ if (remaining > 0) {
21
+ return `${formatted.join(', ')} +${remaining} more`;
22
+ }
23
+ return formatted.join(', ');
24
+ }
25
+ //# sourceMappingURL=venueTypeFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"venueTypeFormatter.js","sourceRoot":"","sources":["../../src/utils/venueTypeFormatter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,6DAA6D;IAC7D,OAAO,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAoB,EAAE,aAAqB,CAAC;IAC3E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1D,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC;IAEjD,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS,OAAO,CAAC;IACtD,CAAC;IAED,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "30.97.1",
3
+ "version": "30.99.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -374,6 +374,8 @@ model BashEvent {
374
374
  media Media[] @relation("BashEventToMedia")
375
375
  associatedServicesReferencingMe Service[] @relation("BashEventToService")
376
376
  userConnections UserConnection[]
377
+ aiRecommendationLogs AIRecommendationLog[]
378
+ aiRecommendationCaches AIRecommendationCache[]
377
379
  }
378
380
 
379
381
  model Coordinates {
@@ -1001,6 +1003,7 @@ model User {
1001
1003
  connectionRequestsReceived UserConnection[] @relation("ConnectionRequestsReceived")
1002
1004
  links UserLink[]
1003
1005
  preferences UserPreferences?
1006
+ rankings UserRankings?
1004
1007
  userPromoCodeRedemption UserPromoCodeRedemption[]
1005
1008
  referralCode UserReferralCode?
1006
1009
  referralTokens UserReferralToken[] @relation("UserReferralTokens")
@@ -1011,6 +1014,7 @@ model User {
1011
1014
  userSubscription UserSubscription?
1012
1015
  vendorBid VendorBid[]
1013
1016
  vendorBookingMessages VendorBookingMessage[] @relation("VendorMessageSender")
1017
+ serviceAnalytics ServiceAnalytics[] // Track service analytics for this user
1014
1018
  vendorBookingRequestsAsHost VendorBookingRequest[] @relation("VendorBookingHost")
1015
1019
  volunteerService VolunteerService[]
1016
1020
  reviewedAmbashadorApps AmbashadorApplication[] @relation("AmbashadorReviewer")
@@ -1020,6 +1024,7 @@ model User {
1020
1024
  bashEventPromoCodesIUsed BashEventPromoCode[] @relation("BashEventPromoCodeToUser")
1021
1025
  ticketTiersWaitListsIveJoined TicketTier[] @relation("TicketTierToUser")
1022
1026
  scoutReferralsMade ScoutReferral[] @relation("ScoutReferrer")
1027
+ aiRecommendationLogs AIRecommendationLog[]
1023
1028
  scoutReferralsReceived ScoutReferral[] @relation("ScoutReferred")
1024
1029
  bookingCommissionsEarned BookingCommission[] @relation("CommissionReferrer")
1025
1030
 
@@ -1120,6 +1125,9 @@ model UserPreferences {
1120
1125
  localEventsToCalendarSync Boolean @default(false)
1121
1126
  localEventsCity String @default("")
1122
1127
  localEventsState String @default("")
1128
+ showRankings Boolean @default(true) // Show rankings on profile
1129
+ showAttendeeRank Boolean @default(true) // Show attendee rank publicly
1130
+ showHostRank Boolean @default(true) // Show host rank publicly
1123
1131
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1124
1132
  }
1125
1133
 
@@ -1138,6 +1146,42 @@ model UserFollowing {
1138
1146
  @@unique([userId, followingId])
1139
1147
  }
1140
1148
 
1149
+ model UserRankings {
1150
+ id String @id @default(cuid())
1151
+ userId String @unique
1152
+ attendeeScore Int @default(0) // Number of events attended
1153
+ hostScore Int @default(0) // Number of events hosted
1154
+ totalAttendeesScore Int @default(0) // Total attendees across all hosted events
1155
+ attendeeRankGlobal Int? // Global rank as attendee
1156
+ attendeeRankNational Int? // National rank as attendee
1157
+ attendeeRankCity Int? // City rank as attendee
1158
+ hostRankGlobal Int? // Global rank as host
1159
+ hostRankNational Int? // National rank as host
1160
+ hostRankCity Int? // City rank as host
1161
+ totalAttendeesRankGlobal Int? // Global rank by total attendees
1162
+ totalAttendeesRankNational Int? // National rank by total attendees
1163
+ totalAttendeesRankCity Int? // City rank by total attendees
1164
+ attendeePercentile Float? // Percentile rank as attendee (0-100)
1165
+ hostPercentile Float? // Percentile rank as host (0-100)
1166
+ totalAttendeesPercentile Float? // Percentile rank by total attendees (0-100)
1167
+ city String? // City for location-based rankings
1168
+ country String @default("US") // Country for location-based rankings
1169
+ lastScoreUpdate DateTime @default(now()) // When scores were last calculated
1170
+ lastCalculated DateTime @default(now()) // When ranks were last calculated
1171
+ createdAt DateTime @default(now())
1172
+ updatedAt DateTime @updatedAt
1173
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1174
+
1175
+ @@index([userId])
1176
+ @@index([attendeeScore])
1177
+ @@index([hostScore])
1178
+ @@index([totalAttendeesScore])
1179
+ @@index([city])
1180
+ @@index([country])
1181
+ @@index([attendeeRankGlobal])
1182
+ @@index([hostRankGlobal])
1183
+ }
1184
+
1141
1185
  model UserConnection {
1142
1186
  id String @id @default(cuid())
1143
1187
  requesterId String // User who sent the request
@@ -1388,6 +1432,7 @@ model Service {
1388
1432
  associatedBashesReferencingMe AssociatedBash[] @relation("AssociatedBashToService")
1389
1433
  bashEvent BashEvent[] @relation("BashEventToService")
1390
1434
  media Media[] @relation("MediaToService")
1435
+ analytics ServiceAnalytics[] // Track service analytics
1391
1436
  scoutReferrals ScoutReferral[] @relation("ScoutServiceProfile")
1392
1437
  bookingCommissions BookingCommission[] @relation("CommissionServiceProfile")
1393
1438
 
@@ -4398,6 +4443,88 @@ enum AuditSeverity {
4398
4443
  Critical // Security incidents
4399
4444
  }
4400
4445
 
4446
+ // Service Analytics Tracking
4447
+ model ServiceAnalytics {
4448
+ id String @id @default(cuid())
4449
+ serviceId String
4450
+ userId String? // null for anonymous views
4451
+ eventType ServiceAnalyticsEvent
4452
+ serviceType ServiceTypes? // Venues, EventServices, etc.
4453
+ specificType String? // For detailed tracking (e.g., "WeddingVenue", "Restaurant")
4454
+ timestamp DateTime @default(now())
4455
+ sessionId String? // Track user sessions
4456
+ referrer String? // Where the user came from
4457
+ deviceType String? // mobile, desktop, tablet
4458
+ metadata Json? // Additional context data
4459
+
4460
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
4461
+ user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
4462
+
4463
+ @@index([serviceId])
4464
+ @@index([userId])
4465
+ @@index([eventType])
4466
+ @@index([timestamp])
4467
+ @@index([serviceType])
4468
+ @@index([specificType])
4469
+ }
4470
+
4471
+ enum ServiceAnalyticsEvent {
4472
+ VIEW // Card/listing viewed
4473
+ CLICK // Card clicked
4474
+ DETAIL_VIEW // Detail page viewed
4475
+ FAVORITE // Added to favorites
4476
+ UNFAVORITE // Removed from favorites
4477
+ SHARE // Shared via link/social
4478
+ CONTACT_CLICK // Contact button clicked
4479
+ BOOKING_STARTED // Booking process initiated
4480
+ BOOKING_COMPLETED // Booking confirmed
4481
+ BOOKING_ABANDONED // User left during booking
4482
+ INQUIRY_SENT // Inquiry form submitted
4483
+ PHONE_CLICK // Phone number clicked
4484
+ EMAIL_CLICK // Email clicked
4485
+ WEBSITE_CLICK // Website link clicked
4486
+ DIRECTIONS_CLICK // Directions/map clicked
4487
+ PHOTO_VIEW // Photo gallery viewed
4488
+ VIDEO_PLAY // Video played
4489
+ REVIEW_VIEW // Reviews section viewed
4490
+ FILTER_APPLIED // When a user filters results
4491
+ }
4492
+
4493
+ // AI Recommendation System - Logs each recommendation request
4494
+ model AIRecommendationLog {
4495
+ id String @id @default(cuid())
4496
+ eventId String
4497
+ userId String
4498
+ venueId String?
4499
+ serviceType ServiceTypes
4500
+ recommendationCount Int @default(0)
4501
+ cacheHit Boolean @default(false)
4502
+ createdAt DateTime @default(now())
4503
+
4504
+ event BashEvent @relation(fields: [eventId], references: [id], onDelete: Cascade)
4505
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
4506
+
4507
+ @@index([eventId])
4508
+ @@index([userId])
4509
+ @@index([createdAt])
4510
+ }
4511
+
4512
+ // AI Recommendation Cache - Stores recommendations to reduce API costs
4513
+ model AIRecommendationCache {
4514
+ id String @id @default(cuid())
4515
+ cacheKey String @unique
4516
+ eventId String
4517
+ serviceType ServiceTypes
4518
+ recommendations Json // Array of ServiceRecommendation objects
4519
+ expiresAt DateTime
4520
+ createdAt DateTime @default(now())
4521
+
4522
+ event BashEvent @relation(fields: [eventId], references: [id], onDelete: Cascade)
4523
+
4524
+ @@index([eventId])
4525
+ @@index([expiresAt])
4526
+ }
4527
+
4401
4528
  enum VoucherStatus {
4402
4529
  Active
4403
4530
  Redeemed
package/src/index.ts CHANGED
@@ -38,6 +38,7 @@ export * from "./utils/service/serviceDBUtils";
38
38
  export * from "./utils/service/serviceRateUtils";
39
39
  export * from "./utils/stripeAccountUtils";
40
40
  export * from "./utils/userUtils";
41
+ export * from "./utils/venueTypeFormatter";
41
42
 
42
43
  // Export typeUtils types individually to avoid ValueOf conflict with definitions
43
44
  export { createAllTrueObject } from "./utils/typeUtils";
@@ -319,3 +319,4 @@ export function shouldWarnUser(violations: ContentViolation[], userTier: string)
319
319
 
320
320
 
321
321
 
322
+
@@ -0,0 +1,43 @@
1
+ export * from './addressUtils';
2
+ export * from './apiUtils';
3
+ export * from './arrayUtils';
4
+ export * from './awsS3Utils';
5
+ export * from './badgeUtils';
6
+ export * from './bashCashPaymentUtils';
7
+ export * from './blog/blogDbUtils';
8
+ export * from './blogUtils';
9
+ export * from './contentFilterUtils';
10
+ export * from './dateTimeUtils';
11
+ export * from './entityUtils';
12
+ export * from './generalDateTimeUtils';
13
+ export * from './luxonUtils';
14
+ export * from './mathUtils';
15
+ export * from './objUtils';
16
+ export * from './paymentUtils';
17
+ export * from './promoCodesUtils';
18
+ export * from './qrCodeUtils';
19
+ export * from './recurrenceUtils';
20
+ export * from './reviewUtils';
21
+ export * from './service/apiServiceBookingApiUtils';
22
+ export * from './service/attendeeOptionUtils';
23
+ export * from './service/frontendServiceBookingUtils';
24
+ export * from './service/regexUtils';
25
+ export * from './service/serviceBookingStatusUtils';
26
+ export * from './service/serviceBookingTypes';
27
+ export * from './service/serviceDBUtils';
28
+ // export * from './service/serviceRateDBUtils'; // File is all commented out
29
+ export * from './service/serviceRateTypes';
30
+ export * from './service/serviceRateUtils';
31
+ export * from './service/serviceUtils';
32
+ export * from './slugUtils';
33
+ export * from './sortUtils';
34
+ export * from './stringUtils';
35
+ export * from './stripeAccountUtils';
36
+ export * from './ticketListUtils';
37
+ export * from './typeUtils';
38
+ export * from './urlUtils';
39
+ export * from './userPromoCodeUtils';
40
+ export * from './userSubscriptionUtils';
41
+ export * from './userUtils';
42
+ export * from './venueTypeFormatter';
43
+
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Formats venue type enum values into human-readable display names
3
+ * Example: "OutdoorSpace" -> "Outdoor Space", "WeddingVenue" -> "Wedding Venue"
4
+ */
5
+ export function formatVenueType(venueType: string): string {
6
+ if (!venueType) return '';
7
+
8
+ // Insert space before capital letters (but not at the start)
9
+ return venueType.replace(/([A-Z])/g, ' $1').trim();
10
+ }
11
+
12
+ /**
13
+ * Formats an array of venue types into a human-readable string
14
+ */
15
+ export function formatVenueTypes(venueTypes: string[], maxDisplay: number = 2): string {
16
+ if (!Array.isArray(venueTypes) || venueTypes.length === 0) {
17
+ return '';
18
+ }
19
+
20
+ const formatted = venueTypes.slice(0, maxDisplay).map(formatVenueType);
21
+ const remaining = venueTypes.length - maxDisplay;
22
+
23
+ if (remaining > 0) {
24
+ return `${formatted.join(', ')} +${remaining} more`;
25
+ }
26
+
27
+ return formatted.join(', ');
28
+ }
29
+
30
+