@bash-app/bash-common 30.75.2 → 30.76.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 (36) hide show
  1. package/dist/definitions.d.ts +116 -0
  2. package/dist/definitions.d.ts.map +1 -1
  3. package/dist/definitions.js +143 -1
  4. package/dist/definitions.js.map +1 -1
  5. package/dist/extendedSchemas.d.ts +7 -0
  6. package/dist/extendedSchemas.d.ts.map +1 -1
  7. package/dist/extendedSchemas.js.map +1 -1
  8. package/dist/index.d.ts +0 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/membershipDefinitions.d.ts +1 -0
  13. package/dist/membershipDefinitions.d.ts.map +1 -1
  14. package/dist/membershipDefinitions.js.map +1 -1
  15. package/dist/utils/paymentUtils.d.ts +41 -1
  16. package/dist/utils/paymentUtils.d.ts.map +1 -1
  17. package/dist/utils/paymentUtils.js +146 -1
  18. package/dist/utils/paymentUtils.js.map +1 -1
  19. package/dist/utils/service/frontendServiceBookingUtils.d.ts.map +1 -1
  20. package/dist/utils/service/frontendServiceBookingUtils.js +5 -1
  21. package/dist/utils/service/frontendServiceBookingUtils.js.map +1 -1
  22. package/dist/utils/userSubscriptionUtils.d.ts +4 -12
  23. package/dist/utils/userSubscriptionUtils.d.ts.map +1 -1
  24. package/dist/utils/userSubscriptionUtils.js +13 -20
  25. package/dist/utils/userSubscriptionUtils.js.map +1 -1
  26. package/package.json +1 -1
  27. package/prisma/schema.prisma +128 -85
  28. package/src/definitions.ts +180 -1
  29. package/src/extendedSchemas.ts +16 -2
  30. package/src/index.ts +1 -1
  31. package/src/membershipDefinitions.ts +1 -0
  32. package/src/utils/contentFilterUtils.ts +2 -0
  33. package/src/utils/paymentUtils.ts +221 -1
  34. package/src/utils/service/frontendServiceBookingUtils.ts +5 -1
  35. package/src/utils/userSubscriptionUtils.ts +20 -38
  36. package/src/utils/service/venueUtils.ts +0 -30
@@ -328,6 +328,7 @@ model BashEvent {
328
328
  vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingEvent")
329
329
  media Media[] @relation("BashEventToMedia")
330
330
  associatedServicesReferencingMe Service[] @relation("BashEventToService")
331
+ userConnections UserConnection[]
331
332
  }
332
333
 
333
334
  model Coordinates {
@@ -390,19 +391,24 @@ model UserReferralCode {
390
391
  }
391
392
 
392
393
  model UserReferralToken {
393
- id String @id @default(cuid())
394
- userId String
395
- token String @unique
396
- planName String
397
- expiresAt DateTime
398
- isUsed Boolean @default(false)
399
- createdAt DateTime @default(now())
400
- updatedAt DateTime @updatedAt
401
- user User @relation("UserReferralTokens", fields: [userId], references: [id], onDelete: Cascade)
394
+ id String @id @default(cuid())
395
+ userId String
396
+ token String @unique
397
+ planName String
398
+ redeemedByUserId String?
399
+ type String? @default("PAID_MEMBERSHIP") // "FREE_SIGNUP", "PAID_MEMBERSHIP", or planName
400
+ metadata Json? // JSONB in Postgres: signup method, IP, etc.
401
+ expiresAt DateTime
402
+ isUsed Boolean @default(false)
403
+ createdAt DateTime @default(now())
404
+ updatedAt DateTime @updatedAt
405
+ user User @relation("UserReferralTokens", fields: [userId], references: [id], onDelete: Cascade)
402
406
 
403
407
  @@index([token])
404
408
  @@index([userId])
405
409
  @@index([expiresAt])
410
+ @@index([type])
411
+ @@index([redeemedByUserId])
406
412
  }
407
413
 
408
414
  model TicketTier {
@@ -814,6 +820,7 @@ model User {
814
820
  remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
815
821
  remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
816
822
  reviews Review[]
823
+ firstFreeListingId String?
817
824
  createdServices Service[] @relation("CreatedService")
818
825
  ownedServices Service[] @relation("OwnedService")
819
826
  serviceBlocksReceived ServiceBlock[] @relation("ServiceBlocksReceived")
@@ -839,6 +846,8 @@ model User {
839
846
  favorites UserFavorite[]
840
847
  following UserFollowing[] @relation("Follower")
841
848
  followers UserFollowing[] @relation("Following")
849
+ connectionRequestsSent UserConnection[] @relation("ConnectionRequestsSent")
850
+ connectionRequestsReceived UserConnection[] @relation("ConnectionRequestsReceived")
842
851
  links UserLink[]
843
852
  preferences UserPreferences?
844
853
  userPromoCodeRedemption UserPromoCodeRedemption[]
@@ -970,6 +979,25 @@ model UserFollowing {
970
979
  @@unique([userId, followingId])
971
980
  }
972
981
 
982
+ model UserConnection {
983
+ id String @id @default(cuid())
984
+ requesterId String // User who sent the request
985
+ addresseeId String // User who received the request
986
+ status ConnectionStatus @default(Pending)
987
+ sharedBashEventId String? // The bash that enabled this connection
988
+ requestedAt DateTime @default(now())
989
+ respondedAt DateTime?
990
+ message String? // Optional message with request
991
+ requester User @relation("ConnectionRequestsSent", fields: [requesterId], references: [id], onDelete: Cascade)
992
+ addressee User @relation("ConnectionRequestsReceived", fields: [addresseeId], references: [id], onDelete: Cascade)
993
+ sharedBash BashEvent? @relation(fields: [sharedBashEventId], references: [id], onDelete: SetNull)
994
+
995
+ @@unique([requesterId, addresseeId])
996
+ @@index([requesterId])
997
+ @@index([addresseeId])
998
+ @@index([status])
999
+ }
1000
+
973
1001
  model BiometricCredential {
974
1002
  id String @id @default(cuid())
975
1003
  userId String
@@ -1121,82 +1149,88 @@ model UserSubscription {
1121
1149
  }
1122
1150
 
1123
1151
  model Service {
1124
- id String @id @default(cuid())
1125
- serviceType ServiceTypes?
1126
- serviceStatus ServiceStatus @default(Draft)
1127
- serviceCondition ServiceCondition @default(Pending)
1128
- subscriptionStatus ServiceSubscriptionStatus @default(None)
1129
- isApproved Boolean @default(false)
1130
- ownerId String?
1131
- creatorId String?
1132
- createdAt DateTime @default(now())
1133
- updatedAt DateTime? @updatedAt
1134
- serviceName String?
1135
- tagline String?
1136
- place String?
1137
- googlePlaceId String?
1138
- street String?
1139
- city String?
1140
- state String?
1141
- zipCode String?
1142
- country String?
1143
- description String?
1144
- pocName String?
1145
- pocPhoneNumber String?
1146
- pocBusinessEmail String?
1147
- additionalInfo String?
1148
- coverPhoto String?
1149
- mission String?
1150
- communityInvolvement String?
1151
- emergencyContact String?
1152
- contactDetails String?
1153
- cancellationPolicy ServiceCancellationPolicy? @default(None)
1154
- availableHours String?
1155
- allowsInstantBooking Boolean @default(false)
1156
- instantBookingLeadTimeHours Int @default(0)
1157
- displayGoogleReviewsOnDetailPage Boolean @default(true)
1158
- displayBashReviewsOnDetailPage Boolean @default(true)
1159
- serviceRating Float? @default(0)
1160
- totalRatings Int? @default(0)
1161
- stripeAccountId String?
1162
- targetAudienceId String? @unique
1163
- visibility VisibilityPreference @default(Public)
1164
- bashesNotInterestedIn BashEventType[]
1165
- customExcludedEventTypes String[] @default([])
1166
- volunteerServiceId String? @unique
1167
- eventServiceId String? @unique
1168
- entertainmentServiceId String? @unique
1169
- vendorId String? @unique
1170
- exhibitorId String? @unique
1171
- sponsorId String? @unique
1172
- venueId String? @unique
1173
- organizationId String? @unique
1174
- associatedServicesReferencingMe AssociatedService[]
1175
- exhibitorBookingRequests ExhibitorBookingRequest[] @relation("ExhibitorBookingService")
1176
- notification Notification[]
1177
- creator User? @relation("CreatedService", fields: [creatorId], references: [id])
1178
- entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id], onDelete: Cascade)
1179
- eventService EventService? @relation(fields: [eventServiceId], references: [id], onDelete: Cascade)
1180
- exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id], onDelete: Cascade)
1181
- organization Organization? @relation(fields: [organizationId], references: [id], onDelete: Cascade)
1182
- owner User? @relation("OwnedService", fields: [ownerId], references: [id])
1183
- sponsor Sponsor? @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
1184
- stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict)
1185
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
1186
- vendor Vendor? @relation(fields: [vendorId], references: [id], onDelete: Cascade)
1187
- venue Venue? @relation(fields: [venueId], references: [id], onDelete: Cascade)
1188
- serviceBlocks ServiceBlock[] @relation("ServiceBlocks")
1189
- bookings ServiceBooking[]
1190
- serviceLinks ServiceLink[]
1191
- serviceRatesAssociation ServiceRatesAssociation?
1192
- sponsorBookingRequests SponsorBookingRequest[] @relation("SponsorBookingService")
1193
- favoritedBy UserFavorite[]
1194
- userPromoCodeRedemption UserPromoCodeRedemption[]
1195
- vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingService")
1196
- volunteerService VolunteerService? @relation("ServiceToVolunteer")
1197
- associatedBashesReferencingMe AssociatedBash[] @relation("AssociatedBashToService")
1198
- bashEvent BashEvent[] @relation("BashEventToService")
1199
- media Media[] @relation("MediaToService")
1152
+ id String @id @default(cuid())
1153
+ serviceType ServiceTypes?
1154
+ serviceStatus ServiceStatus @default(Draft)
1155
+ serviceCondition ServiceCondition @default(Pending)
1156
+ subscriptionStatus ServiceSubscriptionStatus @default(None)
1157
+ isApproved Boolean @default(false)
1158
+ ownerId String?
1159
+ creatorId String?
1160
+ createdAt DateTime @default(now())
1161
+ updatedAt DateTime? @updatedAt
1162
+ serviceName String?
1163
+ tagline String?
1164
+ place String?
1165
+ googlePlaceId String?
1166
+ street String?
1167
+ city String?
1168
+ state String?
1169
+ zipCode String?
1170
+ country String?
1171
+ description String?
1172
+ pocName String?
1173
+ pocPhoneNumber String?
1174
+ pocBusinessEmail String?
1175
+ additionalInfo String?
1176
+ coverPhoto String?
1177
+ mission String?
1178
+ communityInvolvement String?
1179
+ emergencyContact String?
1180
+ contactDetails String?
1181
+ cancellationPolicy ServiceCancellationPolicy? @default(None)
1182
+ availableHours String?
1183
+ allowsInstantBooking Boolean @default(false)
1184
+ instantBookingLeadTimeHours Int @default(0)
1185
+ displayGoogleReviewsOnDetailPage Boolean @default(true)
1186
+ displayBashReviewsOnDetailPage Boolean @default(true)
1187
+ serviceRating Float? @default(0)
1188
+ totalRatings Int? @default(0)
1189
+ stripeAccountId String?
1190
+ targetAudienceId String? @unique
1191
+ visibility VisibilityPreference @default(Public)
1192
+ bashesNotInterestedIn BashEventType[]
1193
+ customExcludedEventTypes String[] @default([])
1194
+ volunteerServiceId String? @unique
1195
+ eventServiceId String? @unique
1196
+ entertainmentServiceId String? @unique
1197
+ vendorId String? @unique
1198
+ exhibitorId String? @unique
1199
+ sponsorId String? @unique
1200
+ venueId String? @unique
1201
+ organizationId String? @unique
1202
+ isFreeFirstListing Boolean @default(false)
1203
+ monthlyPrice Decimal @default(0)
1204
+ serviceListingStripeSubscriptionId String?
1205
+ associatedServicesReferencingMe AssociatedService[]
1206
+ exhibitorBookingRequests ExhibitorBookingRequest[] @relation("ExhibitorBookingService")
1207
+ notification Notification[]
1208
+ creator User? @relation("CreatedService", fields: [creatorId], references: [id])
1209
+ entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id], onDelete: Cascade)
1210
+ eventService EventService? @relation(fields: [eventServiceId], references: [id], onDelete: Cascade)
1211
+ exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id], onDelete: Cascade)
1212
+ organization Organization? @relation(fields: [organizationId], references: [id], onDelete: Cascade)
1213
+ owner User? @relation("OwnedService", fields: [ownerId], references: [id])
1214
+ sponsor Sponsor? @relation(fields: [sponsorId], references: [id], onDelete: Cascade)
1215
+ stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict)
1216
+ targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id], onDelete: Cascade)
1217
+ vendor Vendor? @relation(fields: [vendorId], references: [id], onDelete: Cascade)
1218
+ venue Venue? @relation(fields: [venueId], references: [id], onDelete: Cascade)
1219
+ serviceBlocks ServiceBlock[] @relation("ServiceBlocks")
1220
+ bookings ServiceBooking[]
1221
+ serviceLinks ServiceLink[]
1222
+ serviceRatesAssociation ServiceRatesAssociation?
1223
+ sponsorBookingRequests SponsorBookingRequest[] @relation("SponsorBookingService")
1224
+ favoritedBy UserFavorite[]
1225
+ userPromoCodeRedemption UserPromoCodeRedemption[]
1226
+ vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingService")
1227
+ volunteerService VolunteerService? @relation("ServiceToVolunteer")
1228
+ associatedBashesReferencingMe AssociatedBash[] @relation("AssociatedBashToService")
1229
+ bashEvent BashEvent[] @relation("BashEventToService")
1230
+ media Media[] @relation("MediaToService")
1231
+
1232
+ @@index([serviceListingStripeSubscriptionId])
1233
+ @@index([isFreeFirstListing])
1200
1234
  }
1201
1235
 
1202
1236
  model StripeAccount {
@@ -2241,6 +2275,8 @@ enum NotificationType {
2241
2275
  ServiceBookingCancelled
2242
2276
  ServiceBookingConfirmed
2243
2277
  Message
2278
+ ConnectionRequest
2279
+ ConnectionAccepted
2244
2280
  }
2245
2281
 
2246
2282
  enum NotificationPriority {
@@ -2516,6 +2552,13 @@ enum TransferRequestStatus {
2516
2552
  Expired
2517
2553
  }
2518
2554
 
2555
+ enum ConnectionStatus {
2556
+ Pending
2557
+ Accepted
2558
+ Rejected
2559
+ Blocked
2560
+ }
2561
+
2519
2562
  enum ServiceStatus {
2520
2563
  Draft
2521
2564
  Created
@@ -85,7 +85,186 @@ export const URL_PARAMS_TICKETS_DATE_DELIM = ";;" as const;
85
85
  export const URL_INCLUDE_QUERY_PARAM_DELIM = "," as const;
86
86
  export const URL_INCLUDE_PRISMA_DATA_KEYS_DELIM = "." as const;
87
87
 
88
- export const BASH_FEE_PERCENTAGE = 0.1;
88
+ // Platform fee structure
89
+ export const BASH_FEE_PERCENTAGE = 0.10; // 10% base platform fee for bash tickets/donations
90
+ export const SERVICE_FEE_PERCENTAGE = 0.15; // 15% platform fee for service bookings (Allies, Patrons)
91
+ export const PARTNER_FEE_PERCENTAGE = 0.08; // 8% platform fee for Partner payments (Vendors, Exhibitors, Sponsors)
92
+
93
+ // Minimum pricing (ensures quality events + sustainable model)
94
+ export const BASH_EVENT_TICKET_MINIMUM = 5.00; // $5 minimum ticket price (quality signal, prevents race to bottom)
95
+ export const BASH_EVENT_FEE_MINIMUM = 0.50; // $0.50 minimum platform fee (prevents gaming, covers Stripe fees)
96
+
97
+ // Free trial settings
98
+ export const CREATOR_TIER_TRIAL_DAYS = 30; // 30-day free trial for Creator tier (encourages conversions)
99
+
100
+ // Membership tier fee discounts (for bash tickets/donations)
101
+ // Note: BASH_EVENT_FEE_MINIMUM ($0.50) applies to all tiers, so effective minimums are higher on low-priced tickets
102
+ export const BASH_FEE_BASIC = 0.10; // 10% - Basic (free) members (min $0.50)
103
+ export const BASH_FEE_PRO = 0.08; // 8% - Pro members (20% discount, min $0.50)
104
+ export const BASH_FEE_CREATOR = 0.06; // 6% - Creator members (40% discount, min $0.50)
105
+ export const BASH_FEE_ELITE = 0.04; // 4% - Elite members (60% discount, min $0.50)
106
+ export const BASH_FEE_LEGEND = 0.02; // 2% - Legend members (80% discount, min $0.50 = 10% effective minimum on $5 tickets)
107
+
108
+ // Service fee discounts (for Allies/Patrons service bookings)
109
+ export const SERVICE_FEE_BASIC = 0.15; // 15% - Basic (free) members
110
+ export const SERVICE_FEE_PRO = 0.12; // 12% - Pro members (20% discount)
111
+ export const SERVICE_FEE_CREATOR = 0.09; // 9% - Creator members (40% discount)
112
+ export const SERVICE_FEE_ELITE = 0.06; // 6% - Elite members (60% discount)
113
+ export const SERVICE_FEE_LEGEND = 0.05; // 5% - Legend members (67% discount, sustainable floor)
114
+
115
+ // Partner fee discounts (for Vendors/Exhibitors/Sponsors payments)
116
+ export const PARTNER_FEE_BASIC = 0.08; // 8% - Basic (free) members
117
+ export const PARTNER_FEE_PRO = 0.06; // 6% - Pro members (25% discount)
118
+ export const PARTNER_FEE_CREATOR = 0.05; // 5% - Creator members (37.5% discount, sustainable floor)
119
+ export const PARTNER_FEE_ELITE = 0.05; // 5% - Elite members (same as Creator, sustainable floor)
120
+ export const PARTNER_FEE_LEGEND = 0.05; // 5% - Legend members (same as Creator/Elite, sustainable floor)
121
+
122
+ // Platform fee caps by membership tier (in cents)
123
+ export const BASH_FEE_CAP_BASIC = 25000; // $250 cap for Basic
124
+ export const BASH_FEE_CAP_PRO = 20000; // $200 cap for Pro
125
+ export const BASH_FEE_CAP_CREATOR = 15000; // $150 cap for Creator
126
+ export const BASH_FEE_CAP_ELITE = 10000; // $100 cap for Elite
127
+ export const BASH_FEE_CAP_LEGEND = 5000; // $50 cap for Legend
128
+
129
+ export const SERVICE_FEE_CAP_BASIC = 37500; // $375 cap for Basic
130
+ export const SERVICE_FEE_CAP_PRO = 30000; // $300 cap for Pro
131
+ export const SERVICE_FEE_CAP_CREATOR = 22500; // $225 cap for Creator
132
+ export const SERVICE_FEE_CAP_ELITE = 15000; // $150 cap for Elite
133
+ export const SERVICE_FEE_CAP_LEGEND = 7500; // $75 cap for Legend
134
+
135
+ // Partner payment fee caps (Partners pay less since they bring value to hosts)
136
+ export const PARTNER_FEE_CAP_BASIC = 20000; // $200 cap for Basic (8%)
137
+ export const PARTNER_FEE_CAP_PRO = 15000; // $150 cap for Pro (6%)
138
+ export const PARTNER_FEE_CAP_CREATOR = 12500; // $125 cap for Creator (5%)
139
+ export const PARTNER_FEE_CAP_ELITE = 7500; // $75 cap for Elite (3%)
140
+ export const PARTNER_FEE_CAP_LEGEND = 7500; // $75 cap for Legend (3%)
141
+
142
+ // ============================================
143
+ // SERVICE SUBSCRIPTION TIERS
144
+ // ============================================
145
+ // Service provider subscription tiers with pricing and limits
146
+ // These are separate from user membership tiers (Basic, Creator, Pro, Elite, Legend)
147
+
148
+ export type UserSubscriptionServiceTierInfo = {
149
+ name: string;
150
+ type?: ServiceSubscriptionTier;
151
+ description: string;
152
+ price: number;
153
+ features?: string[];
154
+ limits?: {
155
+ maxServices?: number;
156
+ maxPhotos?: number;
157
+ priorityPlacement?: boolean;
158
+ customBranding?: boolean;
159
+ analytics?: boolean;
160
+ prioritySupport?: boolean;
161
+ bookingFeePercentage?: number; // Percentage taken on each booking (0.15 = 15%)
162
+ };
163
+ };
164
+
165
+ export type UserSubscriptionServiceTierInfoMap = {
166
+ [key in ServiceSubscriptionTier]: UserSubscriptionServiceTierInfo;
167
+ };
168
+
169
+ export const SERVICE_SUBSCRIPTION_TIERS = {
170
+ Free: {
171
+ name: "Free",
172
+ description: "List your first service free - perfect for testing the platform",
173
+ price: 0,
174
+ features: [
175
+ "1 service listing",
176
+ "Up to 5 photos",
177
+ "Standard search placement",
178
+ "Basic booking management",
179
+ "15% booking fee",
180
+ "Community support"
181
+ ],
182
+ limits: {
183
+ maxServices: 1,
184
+ maxPhotos: 5,
185
+ priorityPlacement: false,
186
+ customBranding: false,
187
+ analytics: false,
188
+ prioritySupport: false,
189
+ bookingFeePercentage: 0.15
190
+ }
191
+ },
192
+ Ally: {
193
+ name: "Ally",
194
+ description: "Enhanced features for growing entertainment and event service providers",
195
+ price: 14,
196
+ features: [
197
+ "Up to 5 service listings",
198
+ "Unlimited photos & videos",
199
+ "Priority search placement (top 50%)",
200
+ "Featured provider badge",
201
+ "12% booking fee (save 3%)",
202
+ "Basic analytics and insights",
203
+ "Calendar integration",
204
+ "Email support"
205
+ ],
206
+ limits: {
207
+ maxServices: 5,
208
+ maxPhotos: -1, // unlimited
209
+ priorityPlacement: true,
210
+ customBranding: false,
211
+ analytics: true,
212
+ prioritySupport: false,
213
+ bookingFeePercentage: 0.12
214
+ }
215
+ },
216
+ Partner: {
217
+ name: "Partner",
218
+ description: "Professional tools for established vendors and service providers",
219
+ price: 49,
220
+ features: [
221
+ "Unlimited service listings",
222
+ "Unlimited photos & videos",
223
+ "Premium placement (top 25%)",
224
+ "Custom branding on booking pages",
225
+ "8% booking fee (save 7%)",
226
+ "Advanced analytics & reporting",
227
+ "Automated marketing campaigns",
228
+ "Priority support (chat & email)",
229
+ "Lead generation tools"
230
+ ],
231
+ limits: {
232
+ maxServices: -1, // unlimited
233
+ maxPhotos: -1, // unlimited
234
+ priorityPlacement: true,
235
+ customBranding: true,
236
+ analytics: true,
237
+ prioritySupport: true,
238
+ bookingFeePercentage: 0.08
239
+ }
240
+ },
241
+ Patron: {
242
+ name: "Patron",
243
+ description: "Premium enterprise solution for venues and large organizations",
244
+ price: 99,
245
+ features: [
246
+ "Everything in Partner +",
247
+ "Featured first (top placement)",
248
+ "5% booking fee (save 10%)",
249
+ "Dedicated account manager",
250
+ "White-label booking pages",
251
+ "Custom integrations & API access",
252
+ "Custom reporting dashboards",
253
+ "Lead generation alerts",
254
+ "24/7 priority support"
255
+ ],
256
+ limits: {
257
+ maxServices: -1, // unlimited
258
+ maxPhotos: -1, // unlimited
259
+ priorityPlacement: true,
260
+ customBranding: true,
261
+ analytics: true,
262
+ prioritySupport: true,
263
+ bookingFeePercentage: 0.05
264
+ }
265
+ },
266
+ } as const satisfies UserSubscriptionServiceTierInfoMap;
267
+
89
268
  export const GOOGLE_CALLBACK_URL = "/auth/google/callback" as const;
90
269
  export const CHECKOUT_RETURN_SUCCESS_URL =
91
270
  `/checkout-success/{CHECKOUT_SESSION_ID}` as const;
@@ -571,8 +571,10 @@ export interface ServiceExt extends Service {
571
571
 
572
572
  // googleReviews: GoogleReview[];
573
573
 
574
+ // For availability filtering - matches Prisma relation name "bookings"
575
+ bookings?: ServiceBookingExt[];
576
+
574
577
  // bookedCheckouts: ServiceBookingCheckoutExt[]; //not necessary to include
575
- // bookings?: ServiceBookingExt[];
576
578
  }
577
579
 
578
580
  export type ServiceExtNonSpecific = Exclude<
@@ -650,7 +652,19 @@ export interface VendorExt extends Vendor {
650
652
  };
651
653
  }
652
654
 
653
- export interface VenueExt extends Venue {}
655
+ // Future type for venue unavailable dates (not yet implemented in database)
656
+ // To implement: Add VenueUnavailableDate model to Prisma schema
657
+ export interface UnavailableDate {
658
+ id: string;
659
+ startDate: Date;
660
+ endDate: Date;
661
+ reason?: string;
662
+ }
663
+
664
+ export interface VenueExt extends Venue {
665
+ // Note: unavailableDates field doesn't exist in database yet
666
+ // When implemented, add: unavailableDates?: UnavailableDate[];
667
+ }
654
668
 
655
669
  export interface OrganizationExt extends Organization {
656
670
  amountOfGuests?: AmountOfGuests;
package/src/index.ts CHANGED
@@ -15,7 +15,7 @@ export * from "./utils/recurrenceUtils";
15
15
  export * from "./utils/service/attendeeOptionUtils";
16
16
  export * from "./utils/service/regexUtils";
17
17
  export * from "./utils/service/serviceUtils";
18
- export * from "./utils/service/venueUtils";
18
+ // Venue utils moved to paymentUtils.ts for better organization
19
19
  export * from "./utils/slugUtils";
20
20
  export * from "./utils/sortUtils";
21
21
  export * from "./utils/stringUtils";
@@ -41,6 +41,7 @@ export interface UserMembershipStatus {
41
41
  currentPeriodStart?: number;
42
42
  currentPeriodEnd?: number;
43
43
  cancelAtPeriodEnd?: boolean;
44
+ trialEnd?: string; // ISO string of when trial ends (if in trial period)
44
45
  }
45
46
 
46
47
  // Additional interfaces for membership API
@@ -317,3 +317,5 @@ export function shouldWarnUser(violations: ContentViolation[], userTier: string)
317
317
 
318
318
 
319
319
 
320
+
321
+