@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.
- package/dist/definitions.d.ts +116 -0
- package/dist/definitions.d.ts.map +1 -1
- package/dist/definitions.js +143 -1
- package/dist/definitions.js.map +1 -1
- package/dist/extendedSchemas.d.ts +7 -0
- package/dist/extendedSchemas.d.ts.map +1 -1
- package/dist/extendedSchemas.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/membershipDefinitions.d.ts +1 -0
- package/dist/membershipDefinitions.d.ts.map +1 -1
- package/dist/membershipDefinitions.js.map +1 -1
- package/dist/utils/paymentUtils.d.ts +41 -1
- package/dist/utils/paymentUtils.d.ts.map +1 -1
- package/dist/utils/paymentUtils.js +146 -1
- package/dist/utils/paymentUtils.js.map +1 -1
- package/dist/utils/service/frontendServiceBookingUtils.d.ts.map +1 -1
- package/dist/utils/service/frontendServiceBookingUtils.js +5 -1
- package/dist/utils/service/frontendServiceBookingUtils.js.map +1 -1
- package/dist/utils/userSubscriptionUtils.d.ts +4 -12
- package/dist/utils/userSubscriptionUtils.d.ts.map +1 -1
- package/dist/utils/userSubscriptionUtils.js +13 -20
- package/dist/utils/userSubscriptionUtils.js.map +1 -1
- package/package.json +1 -1
- package/prisma/schema.prisma +128 -85
- package/src/definitions.ts +180 -1
- package/src/extendedSchemas.ts +16 -2
- package/src/index.ts +1 -1
- package/src/membershipDefinitions.ts +1 -0
- package/src/utils/contentFilterUtils.ts +2 -0
- package/src/utils/paymentUtils.ts +221 -1
- package/src/utils/service/frontendServiceBookingUtils.ts +5 -1
- package/src/utils/userSubscriptionUtils.ts +20 -38
- package/src/utils/service/venueUtils.ts +0 -30
package/prisma/schema.prisma
CHANGED
|
@@ -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
|
|
394
|
-
userId
|
|
395
|
-
token
|
|
396
|
-
planName
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
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
|
|
1125
|
-
serviceType
|
|
1126
|
-
serviceStatus
|
|
1127
|
-
serviceCondition
|
|
1128
|
-
subscriptionStatus
|
|
1129
|
-
isApproved
|
|
1130
|
-
ownerId
|
|
1131
|
-
creatorId
|
|
1132
|
-
createdAt
|
|
1133
|
-
updatedAt
|
|
1134
|
-
serviceName
|
|
1135
|
-
tagline
|
|
1136
|
-
place
|
|
1137
|
-
googlePlaceId
|
|
1138
|
-
street
|
|
1139
|
-
city
|
|
1140
|
-
state
|
|
1141
|
-
zipCode
|
|
1142
|
-
country
|
|
1143
|
-
description
|
|
1144
|
-
pocName
|
|
1145
|
-
pocPhoneNumber
|
|
1146
|
-
pocBusinessEmail
|
|
1147
|
-
additionalInfo
|
|
1148
|
-
coverPhoto
|
|
1149
|
-
mission
|
|
1150
|
-
communityInvolvement
|
|
1151
|
-
emergencyContact
|
|
1152
|
-
contactDetails
|
|
1153
|
-
cancellationPolicy
|
|
1154
|
-
availableHours
|
|
1155
|
-
allowsInstantBooking
|
|
1156
|
-
instantBookingLeadTimeHours
|
|
1157
|
-
displayGoogleReviewsOnDetailPage
|
|
1158
|
-
displayBashReviewsOnDetailPage
|
|
1159
|
-
serviceRating
|
|
1160
|
-
totalRatings
|
|
1161
|
-
stripeAccountId
|
|
1162
|
-
targetAudienceId
|
|
1163
|
-
visibility
|
|
1164
|
-
bashesNotInterestedIn
|
|
1165
|
-
customExcludedEventTypes
|
|
1166
|
-
volunteerServiceId
|
|
1167
|
-
eventServiceId
|
|
1168
|
-
entertainmentServiceId
|
|
1169
|
-
vendorId
|
|
1170
|
-
exhibitorId
|
|
1171
|
-
sponsorId
|
|
1172
|
-
venueId
|
|
1173
|
-
organizationId
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
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
|
package/src/definitions.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|