@bash-app/bash-common 30.423.0 → 30.425.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/__tests__/agePolicy.test.js +6 -6
- package/dist/__tests__/agePolicy.test.js.map +1 -1
- package/dist/__tests__/bashEventCancellationPolicy.test.js +2 -2
- package/dist/__tests__/bashEventCancellationPolicy.test.js.map +1 -1
- package/dist/__tests__/bashSectionTitleForBashType.test.js +3 -3
- package/dist/__tests__/definitionsHelpers.test.js +1 -1
- package/dist/__tests__/definitionsHelpers.test.js.map +1 -1
- package/dist/__tests__/entertainmentNotableVenues.test.js +1 -1
- package/dist/__tests__/entertainmentNotableVenues.test.js.map +1 -1
- package/dist/__tests__/hostCrmCrowdPulse.test.js +1 -1
- package/dist/__tests__/hostCrmSegments.test.js +2 -2
- package/dist/__tests__/hostCrmSegments.test.js.map +1 -1
- package/dist/__tests__/hostPromoter.test.js +1 -1
- package/dist/__tests__/influencerAudience.test.js +1 -1
- package/dist/__tests__/influencerAudience.test.js.map +1 -1
- package/dist/__tests__/promoterCompetitionUtils.test.js +3 -3
- package/dist/__tests__/promoterCompetitionUtils.test.js.map +1 -1
- package/dist/__tests__/scenePulse.test.js +1 -1
- package/dist/__tests__/seatMap.test.js +1 -1
- package/dist/__tests__/seatMap.test.js.map +1 -1
- package/dist/__tests__/ticketAdmission.test.d.ts +1 -1
- package/dist/__tests__/ticketAdmission.test.js +1 -1
- package/dist/accessScreening.js +1 -1
- package/dist/aiApproval.d.ts +3 -3
- package/dist/aiApproval.js +3 -3
- package/dist/appleIapProducts.d.ts +1 -1
- package/dist/appleIapProducts.d.ts.map +1 -1
- package/dist/appleIapProducts.js +1 -1
- package/dist/appleIapProducts.js.map +1 -1
- package/dist/applicationFunnel.d.ts +1 -1
- package/dist/applicationFunnel.js +1 -1
- package/dist/audienceImport.d.ts +2 -2
- package/dist/audienceImport.d.ts.map +1 -1
- package/dist/audienceImport.js +2 -2
- package/dist/audienceImport.js.map +1 -1
- package/dist/bashEventCancellationPolicy.js +3 -3
- package/dist/bashEventCancellationPolicy.js.map +1 -1
- package/dist/budgetApproval.d.ts +1 -1
- package/dist/budgetApproval.js +1 -1
- package/dist/causeTags.js +4 -4
- package/dist/causeTags.js.map +1 -1
- package/dist/competitionIdeas.js +12 -12
- package/dist/competitionIdeas.js.map +1 -1
- package/dist/competitionValidation.d.ts +1 -1
- package/dist/competitionValidation.d.ts.map +1 -1
- package/dist/competitionValidation.js +1 -1
- package/dist/competitionValidation.js.map +1 -1
- package/dist/definitions.d.ts +35 -35
- package/dist/definitions.d.ts.map +1 -1
- package/dist/definitions.js +30 -30
- package/dist/definitions.js.map +1 -1
- package/dist/discoveryScope.d.ts +2 -2
- package/dist/discoveryScope.js +2 -2
- package/dist/entertainmentNotableVenues.js +1 -1
- package/dist/entertainmentNotableVenues.js.map +1 -1
- package/dist/extendedSchemas.d.ts +150 -150
- package/dist/extendedSchemas.d.ts.map +1 -1
- package/dist/extendedSchemas.js +11 -11
- package/dist/extendedSchemas.js.map +1 -1
- package/dist/fundingMeter.d.ts +1 -1
- package/dist/fundingMeter.js +1 -1
- package/dist/giveaway.d.ts +2 -2
- package/dist/giveaway.d.ts.map +1 -1
- package/dist/giveaway.js +2 -2
- package/dist/giveaway.js.map +1 -1
- package/dist/guestPartySize.js +3 -3
- package/dist/guestPartySize.js.map +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/homepageSyntheticRows.d.ts +4 -4
- package/dist/homepageSyntheticRows.d.ts.map +1 -1
- package/dist/homepageSyntheticRows.js +3 -4
- package/dist/homepageSyntheticRows.js.map +1 -1
- package/dist/hostCrmAutomation.d.ts +11 -11
- package/dist/hostCrmAutomation.d.ts.map +1 -1
- package/dist/hostCrmAutomation.js +9 -9
- package/dist/hostCrmAutomation.js.map +1 -1
- package/dist/hostCrmConstants.d.ts +1 -1
- package/dist/hostCrmConstants.d.ts.map +1 -1
- package/dist/hostCrmConstants.js +1 -1
- package/dist/hostCrmConstants.js.map +1 -1
- package/dist/hostCrmCrowdPulse.d.ts +2 -2
- package/dist/hostCrmCrowdPulse.d.ts.map +1 -1
- package/dist/hostCrmCrowdPulse.js +1 -1
- package/dist/hostCrmInsights.d.ts +3 -3
- package/dist/hostCrmLastBashProof.d.ts +2 -2
- package/dist/hostCrmLastBashProof.d.ts.map +1 -1
- package/dist/hostCrmLastBashProof.js +1 -1
- package/dist/hostCrmSegments.d.ts +10 -10
- package/dist/hostCrmSegments.d.ts.map +1 -1
- package/dist/hostCrmSegments.js +2 -2
- package/dist/hostCrmSegments.js.map +1 -1
- package/dist/hostPromoter.d.ts +1 -1
- package/dist/hostPromoter.d.ts.map +1 -1
- package/dist/hostPromoter.js +1 -1
- package/dist/hostPromoter.js.map +1 -1
- package/dist/icebreakerPrompts.js +2 -2
- package/dist/icebreakerPrompts.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/influencerAudience.js +3 -3
- package/dist/influencerAudience.js.map +1 -1
- package/dist/liveActivity/liveActivityTypes.d.ts +10 -10
- package/dist/liveActivity/liveActivityTypes.d.ts.map +1 -1
- package/dist/liveActivity/liveActivityTypes.js +2 -2
- package/dist/liveActivity/liveActivityTypes.js.map +1 -1
- package/dist/locationShare.d.ts +2 -2
- package/dist/locationShare.d.ts.map +1 -1
- package/dist/locationShare.js +2 -2
- package/dist/locationShare.js.map +1 -1
- package/dist/membershipDefinitions.d.ts +5 -5
- package/dist/membershipDefinitions.d.ts.map +1 -1
- package/dist/membershipDefinitions.js +21 -21
- package/dist/membershipDefinitions.js.map +1 -1
- package/dist/mirroredPrismaEnums.d.ts +6 -6
- package/dist/mirroredPrismaEnums.js +6 -6
- package/dist/onSaleCapabilityRecommendations.d.ts +1 -1
- package/dist/onSaleCapabilityRecommendations.js +1 -1
- package/dist/partnerStoreTypes.d.ts +1 -1
- package/dist/partnerStoreTypes.d.ts.map +1 -1
- package/dist/productLaunch.d.ts +2 -2
- package/dist/productLaunch.d.ts.map +1 -1
- package/dist/productLaunch.js +2 -2
- package/dist/productLaunch.js.map +1 -1
- package/dist/relationshipHealth.d.ts +3 -3
- package/dist/relationshipHealth.d.ts.map +1 -1
- package/dist/relationshipHealth.js +3 -3
- package/dist/relationshipHealth.js.map +1 -1
- package/dist/scenePulse.d.ts +2 -2
- package/dist/scenePulse.js +1 -1
- package/dist/seatMap.d.ts +1 -1
- package/dist/seatMap.d.ts.map +1 -1
- package/dist/seatMap.js +2 -2
- package/dist/seatMap.js.map +1 -1
- package/dist/seatMapBestAvailable.js +2 -2
- package/dist/seatMapBestAvailable.js.map +1 -1
- package/dist/serviceTypeLabels.d.ts +3 -3
- package/dist/serviceTypeLabels.js +3 -3
- package/dist/sideQuestIdeas.js +8 -8
- package/dist/sideQuestIdeas.js.map +1 -1
- package/dist/sideQuestTypes.js +2 -2
- package/dist/sideQuestTypes.js.map +1 -1
- package/dist/sms/smsTemplates.d.ts +1 -1
- package/dist/sms/smsTemplates.js +1 -1
- package/dist/stripeListingSubscriptionMessages.d.ts +1 -1
- package/dist/stripeListingSubscriptionMessages.js +1 -1
- package/dist/targetAudienceLabels.d.ts +1 -1
- package/dist/targetAudienceLabels.js +1 -1
- package/dist/ticketBnplPaymentMethods.d.ts +3 -3
- package/dist/ticketBnplPaymentMethods.d.ts.map +1 -1
- package/dist/ticketBnplPaymentMethods.js +2 -2
- package/dist/userReportTypes.d.ts +1 -1
- package/dist/userReportTypes.d.ts.map +1 -1
- package/dist/userReportTypes.js +1 -1
- package/dist/userReportTypes.js.map +1 -1
- package/dist/userTaste.d.ts +2 -2
- package/dist/userTaste.d.ts.map +1 -1
- package/dist/userTaste.js +2 -2
- package/dist/userTaste.js.map +1 -1
- package/dist/utils/__tests__/badgeUtils.test.js +5 -5
- package/dist/utils/__tests__/badgeUtils.test.js.map +1 -1
- package/dist/utils/__tests__/bashPointsPaymentUtils.test.js +4 -4
- package/dist/utils/__tests__/bashPointsPaymentUtils.test.js.map +1 -1
- package/dist/utils/__tests__/contentFilterUtils.test.js +23 -23
- package/dist/utils/__tests__/contentFilterUtils.test.js.map +1 -1
- package/dist/utils/__tests__/dateTimeUtils.test.js +1 -1
- package/dist/utils/__tests__/displayDateUtils.test.js +1 -1
- package/dist/utils/__tests__/flyerUtils.test.js +1 -1
- package/dist/utils/__tests__/flyerUtils.test.js.map +1 -1
- package/dist/utils/__tests__/getBackendHost.test.js +8 -8
- package/dist/utils/__tests__/getBackendHost.test.js.map +1 -1
- package/dist/utils/__tests__/getFrontendHost.native.test.js +1 -1
- package/dist/utils/__tests__/getFrontendHost.native.test.js.map +1 -1
- package/dist/utils/__tests__/getFrontendHost.test.js +9 -9
- package/dist/utils/__tests__/getFrontendHost.test.js.map +1 -1
- package/dist/utils/__tests__/organizationEntitlements.test.js +1 -1
- package/dist/utils/__tests__/organizationEntitlements.test.js.map +1 -1
- package/dist/utils/__tests__/paymentUtils.test.js +7 -7
- package/dist/utils/__tests__/paymentUtils.test.js.map +1 -1
- package/dist/utils/__tests__/promoCodesUtils.test.js +2 -2
- package/dist/utils/__tests__/promoCodesUtils.test.js.map +1 -1
- package/dist/utils/__tests__/qrCodeUtils.test.js +4 -4
- package/dist/utils/__tests__/qrCodeUtils.test.js.map +1 -1
- package/dist/utils/__tests__/reviewDimensionUtils.test.js +1 -1
- package/dist/utils/__tests__/reviewDimensionUtils.test.js.map +1 -1
- package/dist/utils/__tests__/stripeAccountUtils.test.js +1 -1
- package/dist/utils/__tests__/ticketPrintPostageUtils.test.js +1 -1
- package/dist/utils/__tests__/ticketPrintPostageUtils.test.js.map +1 -1
- package/dist/utils/addressUtils.js +1 -1
- package/dist/utils/addressUtils.js.map +1 -1
- package/dist/utils/apiUtils.js +1 -1
- package/dist/utils/apiUtils.js.map +1 -1
- package/dist/utils/birthdayExperienceQuality.d.ts +1 -1
- package/dist/utils/birthdayExperienceQuality.js +4 -4
- package/dist/utils/birthdayExperienceQuality.js.map +1 -1
- package/dist/utils/blogUtils.d.ts +1 -1
- package/dist/utils/blogUtils.d.ts.map +1 -1
- package/dist/utils/blogUtils.js +2 -2
- package/dist/utils/blogUtils.js.map +1 -1
- package/dist/utils/discountEngine/discountCalculator.js +1 -1
- package/dist/utils/discountEngine/discountCalculator.js.map +1 -1
- package/dist/utils/displayDateUtils.d.ts +2 -2
- package/dist/utils/displayDateUtils.d.ts.map +1 -1
- package/dist/utils/displayDateUtils.js +2 -2
- package/dist/utils/displayDateUtils.js.map +1 -1
- package/dist/utils/entertainmentDrawFit.d.ts +1 -1
- package/dist/utils/entertainmentDrawFit.js +1 -1
- package/dist/utils/eventTimezoneIana.d.ts +1 -1
- package/dist/utils/eventTimezoneIana.js +4 -4
- package/dist/utils/eventTimezoneIana.js.map +1 -1
- package/dist/utils/flyerUtils.d.ts +2 -2
- package/dist/utils/flyerUtils.d.ts.map +1 -1
- package/dist/utils/flyerUtils.js +3 -3
- package/dist/utils/flyerUtils.js.map +1 -1
- package/dist/utils/groupTicketCartUtils.js +1 -1
- package/dist/utils/groupTicketCartUtils.js.map +1 -1
- package/dist/utils/guestSurface.d.ts +2 -2
- package/dist/utils/guestSurface.d.ts.map +1 -1
- package/dist/utils/guestSurface.js +4 -4
- package/dist/utils/guestSurface.js.map +1 -1
- package/dist/utils/lobFlyerUtils.d.ts +2 -2
- package/dist/utils/lobFlyerUtils.js +2 -2
- package/dist/utils/luxonUtils.d.ts +4 -4
- package/dist/utils/luxonUtils.js +5 -5
- package/dist/utils/luxonUtils.js.map +1 -1
- package/dist/utils/moodTrackUtils.d.ts +1 -1
- package/dist/utils/moodTrackUtils.js +1 -1
- package/dist/utils/nonprofitUtils.d.ts +3 -3
- package/dist/utils/nonprofitUtils.js +2 -2
- package/dist/utils/orgPromotionalPackageUtils.d.ts +1 -1
- package/dist/utils/orgPromotionalPackageUtils.js +1 -1
- package/dist/utils/organizationEntitlements.d.ts +4 -4
- package/dist/utils/organizationEntitlements.js +3 -3
- package/dist/utils/paymentUtils.d.ts +10 -10
- package/dist/utils/paymentUtils.js +9 -9
- package/dist/utils/promoterCompetitionUtils.d.ts +4 -4
- package/dist/utils/promoterCompetitionUtils.d.ts.map +1 -1
- package/dist/utils/promoterCompetitionUtils.js +7 -7
- package/dist/utils/promoterCompetitionUtils.js.map +1 -1
- package/dist/utils/promotionBlastUtils.d.ts +1 -1
- package/dist/utils/promotionBlastUtils.js +4 -4
- package/dist/utils/promotionBlastUtils.js.map +1 -1
- package/dist/utils/qrCodeUtils.d.ts +3 -3
- package/dist/utils/qrCodeUtils.d.ts.map +1 -1
- package/dist/utils/qrCodeUtils.js +3 -3
- package/dist/utils/qrCodeUtils.js.map +1 -1
- package/dist/utils/recurrenceUtils.d.ts +1 -1
- package/dist/utils/recurrenceUtils.js +1 -1
- package/dist/utils/reputationUtils.d.ts +2 -2
- package/dist/utils/reputationUtils.d.ts.map +1 -1
- package/dist/utils/reputationUtils.js +1 -1
- package/dist/utils/reputationUtils.js.map +1 -1
- package/dist/utils/reviewDimensionUtils.d.ts +2 -2
- package/dist/utils/reviewDimensionUtils.d.ts.map +1 -1
- package/dist/utils/reviewDimensionUtils.js +1 -1
- package/dist/utils/reviewDimensionUtils.js.map +1 -1
- package/dist/utils/service/__tests__/billingCapUtils.test.js +3 -3
- package/dist/utils/service/__tests__/billingCapUtils.test.js.map +1 -1
- package/dist/utils/service/__tests__/eventPromoterPhase3.test.js +1 -1
- package/dist/utils/service/__tests__/eventPromoterUtils.test.js +1 -1
- package/dist/utils/service/__tests__/eventPromoterUtils.test.js.map +1 -1
- package/dist/utils/service/__tests__/frontendServiceBookingUtils.test.js +2 -2
- package/dist/utils/service/__tests__/frontendServiceBookingUtils.test.js.map +1 -1
- package/dist/utils/service/__tests__/serviceBookingExposureUtils.test.js +1 -1
- package/dist/utils/service/__tests__/serviceBookingExposureUtils.test.js.map +1 -1
- package/dist/utils/service/__tests__/serviceBookingStatusUtils.test.js +2 -2
- package/dist/utils/service/__tests__/serviceBookingStatusUtils.test.js.map +1 -1
- package/dist/utils/service/__tests__/serviceRateUtils.test.js +6 -6
- package/dist/utils/service/__tests__/serviceRateUtils.test.js.map +1 -1
- package/dist/utils/service/apiServiceBookingApiUtils.js +1 -1
- package/dist/utils/service/apiServiceBookingApiUtils.js.map +1 -1
- package/dist/utils/service/billingCapUtils.d.ts +5 -5
- package/dist/utils/service/billingCapUtils.js +5 -5
- package/dist/utils/service/cancellationPolicyRefundResolver.d.ts +1 -1
- package/dist/utils/service/cancellationPolicyRefundResolver.d.ts.map +1 -1
- package/dist/utils/service/eventPromoterUtils.d.ts +17 -17
- package/dist/utils/service/eventPromoterUtils.d.ts.map +1 -1
- package/dist/utils/service/eventPromoterUtils.js +11 -11
- package/dist/utils/service/eventPromoterUtils.js.map +1 -1
- package/dist/utils/service/foodAndBeverageQuote.d.ts +8 -8
- package/dist/utils/service/foodAndBeverageQuote.js +8 -8
- package/dist/utils/service/offerAllowListUtils.d.ts +1 -1
- package/dist/utils/service/offerComparisonUtils.d.ts +6 -6
- package/dist/utils/service/offerComparisonUtils.js +2 -2
- package/dist/utils/service/offerComparisonUtils.js.map +1 -1
- package/dist/utils/service/serviceBookingExposureUtils.d.ts +7 -7
- package/dist/utils/service/serviceBookingExposureUtils.js +5 -5
- package/dist/utils/service/serviceBookingExposureUtils.js.map +1 -1
- package/dist/utils/service/serviceFeaturedSortUtils.js +2 -2
- package/dist/utils/service/serviceFeaturedSortUtils.js.map +1 -1
- package/dist/utils/service/serviceListingMediaUtils.d.ts +2 -2
- package/dist/utils/service/serviceListingMediaUtils.d.ts.map +1 -1
- package/dist/utils/service/serviceListingMediaUtils.js +2 -2
- package/dist/utils/service/serviceListingMediaUtils.js.map +1 -1
- package/dist/utils/service/serviceUtils.js +2 -2
- package/dist/utils/service/serviceUtils.js.map +1 -1
- package/dist/utils/service/unifiedPricingResolver.d.ts +5 -5
- package/dist/utils/service/unifiedPricingResolver.d.ts.map +1 -1
- package/dist/utils/service/venueSettlementUtils.d.ts +2 -2
- package/dist/utils/service/venueSettlementUtils.js +3 -3
- package/dist/utils/service/venueSettlementUtils.js.map +1 -1
- package/dist/utils/service/volunteerCompensationUtils.d.ts +2 -2
- package/dist/utils/service/volunteerCompensationUtils.js +1 -1
- package/dist/utils/service/volunteerCompensationUtils.js.map +1 -1
- package/dist/utils/slugUtils.d.ts +1 -1
- package/dist/utils/slugUtils.js +1 -1
- package/dist/utils/ticketPrintPostageUtils.d.ts +4 -4
- package/dist/utils/ticketPrintPostageUtils.js +5 -5
- package/dist/utils/ticketPrintPostageUtils.js.map +1 -1
- package/dist/utils/ticketTierSchedule.d.ts +1 -1
- package/dist/utils/ticketTierSchedule.js +4 -4
- package/dist/utils/ticketTierSchedule.js.map +1 -1
- package/dist/utils/trustScoreUtils.d.ts +1 -1
- package/dist/utils/trustScoreUtils.js +1 -1
- package/dist/utils/urlUtils.d.ts +2 -2
- package/dist/utils/urlUtils.js +2 -2
- package/dist/utils/userUtils.d.ts +4 -4
- package/dist/utils/userUtils.js +3 -3
- package/dist/utils/venueLoyalty/__tests__/eligibilityUtils.test.js +1 -1
- package/dist/utils/venueLoyalty/__tests__/redemptionCodeUtils.test.js +1 -1
- package/dist/utils/venueLoyalty/redemptionCodeUtils.d.ts +3 -3
- package/dist/utils/venueLoyalty/redemptionCodeUtils.js +3 -3
- package/dist/venueLoyaltyRedemption.d.ts +2 -2
- package/dist/venueLoyaltyRedemption.js +1 -1
- package/dist/venueMatch.d.ts +4 -4
- package/dist/venueMatch.d.ts.map +1 -1
- package/dist/venueMatch.js +1 -1
- package/dist/venueMatch.js.map +1 -1
- package/package.json +1 -1
- package/prisma/schema.prisma +2 -0
- package/src/__tests__/agePolicy.test.ts +6 -6
- package/src/__tests__/bashEventCancellationPolicy.test.ts +2 -2
- package/src/__tests__/bashSectionTitleForBashType.test.ts +3 -3
- package/src/__tests__/definitionsHelpers.test.ts +1 -1
- package/src/__tests__/entertainmentNotableVenues.test.ts +1 -1
- package/src/__tests__/hostCrmCrowdPulse.test.ts +1 -1
- package/src/__tests__/hostCrmSegments.test.ts +2 -2
- package/src/__tests__/hostPromoter.test.ts +1 -1
- package/src/__tests__/influencerAudience.test.ts +1 -1
- package/src/__tests__/promoterCompetitionUtils.test.ts +3 -3
- package/src/__tests__/scenePulse.test.ts +1 -1
- package/src/__tests__/seatMap.test.ts +1 -1
- package/src/__tests__/ticketAdmission.test.ts +1 -1
- package/src/accessScreening.ts +1 -1
- package/src/aiApproval.ts +3 -3
- package/src/appleIapProducts.ts +1 -1
- package/src/applicationFunnel.ts +1 -1
- package/src/audienceImport.ts +2 -2
- package/src/bashEventCancellationPolicy.ts +3 -3
- package/src/budgetApproval.ts +1 -1
- package/src/causeTags.ts +4 -4
- package/src/competitionIdeas.ts +12 -12
- package/src/competitionValidation.ts +1 -1
- package/src/definitions.ts +42 -42
- package/src/discoveryScope.ts +2 -2
- package/src/entertainmentNotableVenues.ts +1 -1
- package/src/extendedSchemas.ts +41 -41
- package/src/fundingMeter.ts +1 -1
- package/src/giveaway.ts +2 -2
- package/src/guestPartySize.ts +3 -3
- package/src/home.ts +1 -1
- package/src/homepageSyntheticRows.ts +3 -4
- package/src/hostCrmAutomation.ts +11 -11
- package/src/hostCrmConstants.ts +1 -1
- package/src/hostCrmCrowdPulse.ts +2 -2
- package/src/hostCrmInsights.ts +3 -3
- package/src/hostCrmLastBashProof.ts +2 -2
- package/src/hostCrmSegments.ts +12 -12
- package/src/hostPromoter.ts +1 -1
- package/src/icebreakerPrompts.ts +2 -2
- package/src/index.ts +1 -1
- package/src/influencerAudience.ts +3 -3
- package/src/liveActivity/liveActivityTypes.ts +10 -10
- package/src/locationShare.ts +2 -2
- package/src/membershipDefinitions.ts +21 -21
- package/src/mirroredPrismaEnums.ts +6 -6
- package/src/onSaleCapabilityRecommendations.ts +1 -1
- package/src/partnerStoreTypes.ts +1 -1
- package/src/productLaunch.ts +2 -2
- package/src/relationshipHealth.ts +5 -5
- package/src/scenePulse.ts +2 -2
- package/src/seatMap.ts +3 -3
- package/src/seatMapBestAvailable.ts +2 -2
- package/src/serviceTypeLabels.ts +3 -3
- package/src/sideQuestIdeas.ts +8 -8
- package/src/sideQuestTypes.ts +2 -2
- package/src/sms/smsTemplates.ts +1 -1
- package/src/stripeListingSubscriptionMessages.ts +1 -1
- package/src/targetAudienceLabels.ts +1 -1
- package/src/ticketBnplPaymentMethods.ts +3 -3
- package/src/userReportTypes.ts +1 -1
- package/src/userTaste.ts +2 -2
- package/src/utils/__tests__/badgeUtils.test.ts +5 -5
- package/src/utils/__tests__/bashPointsPaymentUtils.test.ts +4 -4
- package/src/utils/__tests__/contentFilterUtils.test.ts +23 -23
- package/src/utils/__tests__/dateTimeUtils.test.ts +1 -1
- package/src/utils/__tests__/displayDateUtils.test.ts +1 -1
- package/src/utils/__tests__/flyerUtils.test.ts +1 -1
- package/src/utils/__tests__/getBackendHost.test.ts +8 -8
- package/src/utils/__tests__/getFrontendHost.native.test.ts +1 -1
- package/src/utils/__tests__/getFrontendHost.test.ts +9 -9
- package/src/utils/__tests__/organizationEntitlements.test.ts +1 -1
- package/src/utils/__tests__/paymentUtils.test.ts +7 -7
- package/src/utils/__tests__/promoCodesUtils.test.ts +2 -2
- package/src/utils/__tests__/qrCodeUtils.test.ts +4 -4
- package/src/utils/__tests__/reviewDimensionUtils.test.ts +1 -1
- package/src/utils/__tests__/stripeAccountUtils.test.ts +1 -1
- package/src/utils/__tests__/ticketPrintPostageUtils.test.ts +1 -1
- package/src/utils/addressUtils.ts +1 -1
- package/src/utils/apiUtils.ts +1 -1
- package/src/utils/birthdayExperienceQuality.ts +4 -4
- package/src/utils/blogUtils.ts +2 -2
- package/src/utils/discountEngine/discountCalculator.ts +1 -1
- package/src/utils/displayDateUtils.ts +2 -2
- package/src/utils/entertainmentDrawFit.ts +1 -1
- package/src/utils/eventTimezoneIana.ts +4 -4
- package/src/utils/flyerUtils.ts +3 -3
- package/src/utils/groupTicketCartUtils.ts +1 -1
- package/src/utils/guestSurface.ts +5 -5
- package/src/utils/lobFlyerUtils.ts +2 -2
- package/src/utils/luxonUtils.ts +5 -5
- package/src/utils/moodTrackUtils.ts +1 -1
- package/src/utils/nonprofitUtils.ts +3 -3
- package/src/utils/orgPromotionalPackageUtils.ts +1 -1
- package/src/utils/organizationEntitlements.ts +4 -4
- package/src/utils/paymentUtils.ts +10 -10
- package/src/utils/promoterCompetitionUtils.ts +8 -8
- package/src/utils/promotionBlastUtils.ts +4 -4
- package/src/utils/qrCodeUtils.ts +3 -3
- package/src/utils/recurrenceUtils.ts +1 -1
- package/src/utils/reputationUtils.ts +3 -3
- package/src/utils/reviewDimensionUtils.ts +2 -2
- package/src/utils/service/__tests__/billingCapUtils.test.ts +3 -3
- package/src/utils/service/__tests__/eventPromoterPhase3.test.ts +1 -1
- package/src/utils/service/__tests__/eventPromoterUtils.test.ts +1 -1
- package/src/utils/service/__tests__/frontendServiceBookingUtils.test.ts +2 -2
- package/src/utils/service/__tests__/serviceBookingExposureUtils.test.ts +1 -1
- package/src/utils/service/__tests__/serviceBookingStatusUtils.test.ts +2 -2
- package/src/utils/service/__tests__/serviceRateUtils.test.ts +6 -6
- package/src/utils/service/apiServiceBookingApiUtils.ts +1 -1
- package/src/utils/service/billingCapUtils.ts +5 -5
- package/src/utils/service/cancellationPolicyRefundResolver.ts +1 -1
- package/src/utils/service/eventPromoterUtils.ts +27 -27
- package/src/utils/service/foodAndBeverageQuote.ts +8 -8
- package/src/utils/service/offerAllowListUtils.ts +1 -1
- package/src/utils/service/offerComparisonUtils.ts +8 -8
- package/src/utils/service/serviceBookingExposureUtils.ts +8 -8
- package/src/utils/service/serviceBookingTypes.ts +2 -2
- package/src/utils/service/serviceFeaturedSortUtils.ts +2 -2
- package/src/utils/service/serviceListingMediaUtils.ts +2 -2
- package/src/utils/service/serviceUtils.ts +2 -2
- package/src/utils/service/unifiedPricingResolver.ts +5 -5
- package/src/utils/service/venueSettlementUtils.ts +3 -3
- package/src/utils/service/volunteerCompensationUtils.ts +3 -3
- package/src/utils/slugUtils.ts +1 -1
- package/src/utils/ticketPrintPostageUtils.ts +5 -5
- package/src/utils/ticketTierSchedule.ts +4 -4
- package/src/utils/trustScoreUtils.ts +1 -1
- package/src/utils/urlUtils.ts +2 -2
- package/src/utils/userUtils.ts +4 -4
- package/src/utils/venueLoyalty/__tests__/eligibilityUtils.test.ts +1 -1
- package/src/utils/venueLoyalty/__tests__/redemptionCodeUtils.test.ts +1 -1
- package/src/utils/venueLoyalty/redemptionCodeUtils.ts +3 -3
- package/src/venueLoyaltyRedemption.ts +2 -2
- package/src/venueMatch.ts +4 -4
|
@@ -328,7 +328,7 @@ export function servicePriceToBookToApiBookingBase({
|
|
|
328
328
|
packages: packages as ServiceBookingPackageExt[],
|
|
329
329
|
allowPromiseToPay: allowPromiseToPay,
|
|
330
330
|
isFreeGuest: isFreeGuest,
|
|
331
|
-
// Phase 3
|
|
331
|
+
// Phase 3. Providers opt in per-booking when they want BP-paid tickets
|
|
332
332
|
// to count toward PER_PAID_ATTENDEE settlement. Defaults to false so
|
|
333
333
|
// legacy bookings keep their original counting semantics.
|
|
334
334
|
countsBashPointsTickets: false,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Phase 0 adoption guardrails
|
|
2
|
+
* Phase 0 adoption guardrails. Host-side soft cap on variable-pricing bookings.
|
|
3
3
|
*
|
|
4
4
|
* Any booking whose `pricingModel` is not flat/hourly/daily can run up the host's
|
|
5
5
|
* tab if turnout exceeds expectations. `maxBillableCents` lets the host put a
|
|
6
6
|
* dollar ceiling on each booking. The default ceiling is `1.5x` of
|
|
7
|
-
* `expectedAttendees * baseRateCents`, rounded up to the nearest $10
|
|
7
|
+
* `expectedAttendees * baseRateCents`, rounded up to the nearest $10. Generous
|
|
8
8
|
* enough that hosts almost never trip it on a good night, but tight enough to
|
|
9
9
|
* protect against a runaway viral bash.
|
|
10
10
|
*
|
|
@@ -49,7 +49,7 @@ export interface DefaultMaxBillableCentsInput {
|
|
|
49
49
|
* Computes the default Phase 0 soft cap for a variable-pricing booking.
|
|
50
50
|
*
|
|
51
51
|
* Returns `null` when `baseRateCents` is unusable. Returns `0` when
|
|
52
|
-
* `expectedAttendees` is zero or absent
|
|
52
|
+
* `expectedAttendees` is zero or absent. Caller decides whether that means
|
|
53
53
|
* "skip the cap" (free / comp-only bash) or "force the host to set one explicitly".
|
|
54
54
|
*
|
|
55
55
|
* Worked example: 200 expected attendees @ $5 each → 200 * 500 * 1.5 = $1500 →
|
|
@@ -83,7 +83,7 @@ export function defaultMaxBillableCents(
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Parallel cap for `PER_BASHPOINTS_ATTENDEE` bookings
|
|
86
|
+
* Parallel cap for `PER_BASHPOINTS_ATTENDEE` bookings. Same formula, BashPoints
|
|
87
87
|
* units. Rounds up to the nearest 100 BashPoints by default since BashPoints
|
|
88
88
|
* are integer-only.
|
|
89
89
|
*/
|
|
@@ -118,7 +118,7 @@ export function defaultMaxBillableBashPoints(input: {
|
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* Default snippet to snapshot onto `ServiceBooking.payoutTimingNote` at booking
|
|
121
|
-
* time for any variable-pricing booking. Keep concise
|
|
121
|
+
* time for any variable-pricing booking. Keep concise. Surfaces in offer
|
|
122
122
|
* sheets, booking detail, and email summaries.
|
|
123
123
|
*/
|
|
124
124
|
export const DEFAULT_VARIABLE_PAYOUT_TIMING_NOTE =
|
|
@@ -21,7 +21,7 @@ export function cancellationRuleThresholdHours(
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export type ResolveCancellationRefundOptions = {
|
|
24
|
-
/** Event start time (UTC or local
|
|
24
|
+
/** Event start time (UTC or local. Caller must be consistent). */
|
|
25
25
|
eventStart: Date;
|
|
26
26
|
/** Defaults to `new Date()`. */
|
|
27
27
|
now?: Date;
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
*
|
|
26
26
|
* Compared with the **string literal** rather than the Prisma enum object
|
|
27
27
|
* because the browser bundle (`index-browser`) does not always re-export
|
|
28
|
-
* Prisma enums as runtime values
|
|
28
|
+
* Prisma enums as runtime values. See `bash-common/src/mirroredPrismaEnums.ts`
|
|
29
29
|
* for the same pattern.
|
|
30
30
|
*/
|
|
31
31
|
export function isPerAttendeeLockedPromotionSubType(
|
|
@@ -65,7 +65,7 @@ export const EVENT_PROMOTER_LATE_CANCEL_HOURS = 48;
|
|
|
65
65
|
/**
|
|
66
66
|
* Late-cancellation penalty as a fraction of the deposit (0..1). 0.25 means
|
|
67
67
|
* the host forfeits 25% of the deposit when they cancel inside the
|
|
68
|
-
* `EVENT_PROMOTER_LATE_CANCEL_HOURS` window
|
|
68
|
+
* `EVENT_PROMOTER_LATE_CANCEL_HOURS` window. Covers the promoter's
|
|
69
69
|
* sunk planning time.
|
|
70
70
|
*/
|
|
71
71
|
export const EVENT_PROMOTER_LATE_CANCEL_PENALTY_FRACTION = 0.25;
|
|
@@ -75,11 +75,11 @@ export type EventPromoterCanceller = "host" | "promoter" | "admin";
|
|
|
75
75
|
|
|
76
76
|
export interface EventPromoterCancellationInput {
|
|
77
77
|
who: EventPromoterCanceller;
|
|
78
|
-
/** ISO timestamp of "now"
|
|
78
|
+
/** ISO timestamp of "now". Injected so callers can test edge cases. */
|
|
79
79
|
nowMs: number;
|
|
80
80
|
/** Bash start time. */
|
|
81
81
|
bashStartMs: number | null;
|
|
82
|
-
/** Bash end time
|
|
82
|
+
/** Bash end time. Once we're past this, settlement takes over instead. */
|
|
83
83
|
bashEndMs: number | null;
|
|
84
84
|
/** Deposit cents already charged at booking. */
|
|
85
85
|
depositCents: number;
|
|
@@ -92,12 +92,12 @@ export interface EventPromoterCancellationDecision {
|
|
|
92
92
|
allow: boolean;
|
|
93
93
|
/**
|
|
94
94
|
* Outcome category for telemetry + thread messaging:
|
|
95
|
-
* - `FullRefund
|
|
95
|
+
* - `FullRefund`. Full deposit returned (host cancel outside window, or
|
|
96
96
|
* promoter cancel any time before the bash).
|
|
97
|
-
* - `PartialRefund
|
|
97
|
+
* - `PartialRefund`. Host cancels inside the late-cancel window; promoter
|
|
98
98
|
* keeps `EVENT_PROMOTER_LATE_CANCEL_PENALTY_FRACTION` of the deposit.
|
|
99
|
-
* - `NoRefund
|
|
100
|
-
* - `Blocked
|
|
99
|
+
* - `NoRefund`. Bash already happened; settlement handles it instead.
|
|
100
|
+
* - `Blocked`. Booking already settled, or impossible state; admin only.
|
|
101
101
|
*/
|
|
102
102
|
outcome: "FullRefund" | "PartialRefund" | "NoRefund" | "Blocked";
|
|
103
103
|
/** Refund amount in cents (0 when outcome is NoRefund/Blocked). */
|
|
@@ -136,7 +136,7 @@ export function decideEventPromoterCancellation(
|
|
|
136
136
|
outcome: "Blocked",
|
|
137
137
|
refundCents: 0,
|
|
138
138
|
penaltyFraction: 0,
|
|
139
|
-
reason: "Booking already settled
|
|
139
|
+
reason: "Booking already settled. Cancellation no longer applies.",
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -157,7 +157,7 @@ export function decideEventPromoterCancellation(
|
|
|
157
157
|
outcome: "NoRefund",
|
|
158
158
|
refundCents: 0,
|
|
159
159
|
penaltyFraction: 0,
|
|
160
|
-
reason: "Admin cancel after bash started
|
|
160
|
+
reason: "Admin cancel after bash started. Settlement handles money.",
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
163
|
return {
|
|
@@ -165,7 +165,7 @@ export function decideEventPromoterCancellation(
|
|
|
165
165
|
outcome: "FullRefund",
|
|
166
166
|
refundCents: input.depositCents,
|
|
167
167
|
penaltyFraction: 0,
|
|
168
|
-
reason: "Admin cancel
|
|
168
|
+
reason: "Admin cancel. Full refund of deposit.",
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -177,7 +177,7 @@ export function decideEventPromoterCancellation(
|
|
|
177
177
|
refundCents: 0,
|
|
178
178
|
penaltyFraction: 0,
|
|
179
179
|
reason:
|
|
180
|
-
"Bash already started
|
|
180
|
+
"Bash already started. Promoter must coordinate with host in the thread, not auto-cancel.",
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
183
|
return {
|
|
@@ -186,7 +186,7 @@ export function decideEventPromoterCancellation(
|
|
|
186
186
|
refundCents: input.depositCents,
|
|
187
187
|
penaltyFraction: 0,
|
|
188
188
|
reason:
|
|
189
|
-
"Promoter cancelled
|
|
189
|
+
"Promoter cancelled. Full refund of host deposit. Bash notifies the host and re-opens the slot.",
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -198,7 +198,7 @@ export function decideEventPromoterCancellation(
|
|
|
198
198
|
refundCents: 0,
|
|
199
199
|
penaltyFraction: 0,
|
|
200
200
|
reason:
|
|
201
|
-
"Bash already in progress or over
|
|
201
|
+
"Bash already in progress or over. The post-event settlement will calculate any refund automatically.",
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -208,7 +208,7 @@ export function decideEventPromoterCancellation(
|
|
|
208
208
|
outcome: "FullRefund",
|
|
209
209
|
refundCents: input.depositCents,
|
|
210
210
|
penaltyFraction: 0,
|
|
211
|
-
reason: `Host cancelled with more than ${EVENT_PROMOTER_LATE_CANCEL_HOURS}h notice
|
|
211
|
+
reason: `Host cancelled with more than ${EVENT_PROMOTER_LATE_CANCEL_HOURS}h notice. Full refund of deposit.`,
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -222,7 +222,7 @@ export function decideEventPromoterCancellation(
|
|
|
222
222
|
outcome: "PartialRefund",
|
|
223
223
|
refundCents,
|
|
224
224
|
penaltyFraction,
|
|
225
|
-
reason: `Host cancelled inside the ${EVENT_PROMOTER_LATE_CANCEL_HOURS}h window
|
|
225
|
+
reason: `Host cancelled inside the ${EVENT_PROMOTER_LATE_CANCEL_HOURS}h window. Promoter keeps ${Math.round(
|
|
226
226
|
penaltyFraction * 100
|
|
227
227
|
)}% of the deposit to cover planning time.`,
|
|
228
228
|
};
|
|
@@ -240,7 +240,7 @@ export const EVENT_PROMOTER_LOCKED_PRICING_MODEL: PricingModel =
|
|
|
240
240
|
"PER_ATTENDEE";
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
|
-
* Phase 3
|
|
243
|
+
* Phase 3. Set of pricing models the locked Event Promoter subtype may use.
|
|
244
244
|
* Any of these guarantees a per-head settlement at bash close, which is the
|
|
245
245
|
* actual constraint the worker cares about. Wizard offers them as a choice;
|
|
246
246
|
* api validator accepts any.
|
|
@@ -319,7 +319,7 @@ export interface EventPromoterSettlementInput {
|
|
|
319
319
|
totalCheckedInAttendees: number;
|
|
320
320
|
/** Per-booking host-set ceiling on attributable attendees; `null` = no cap. */
|
|
321
321
|
maxAttendeesAttributable?: number | null;
|
|
322
|
-
/** Optional floor
|
|
322
|
+
/** Optional floor. Usually `EventService.minimumQuantity` at booking time. */
|
|
323
323
|
minimumQuantity?: number | null;
|
|
324
324
|
}
|
|
325
325
|
|
|
@@ -331,7 +331,7 @@ export interface EventPromoterSettlementResult {
|
|
|
331
331
|
finalCount: number;
|
|
332
332
|
/**
|
|
333
333
|
* True iff `maxAttendeesAttributable` capped `finalCount`. Useful for
|
|
334
|
-
* analytics
|
|
334
|
+
* analytics. High `ceilingHit` rates signal v2 (per-ticket attribution).
|
|
335
335
|
*/
|
|
336
336
|
ceilingHit: boolean;
|
|
337
337
|
/**
|
|
@@ -393,18 +393,18 @@ export function computeEventPromoterSettlement(
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
// --------------------------------------------------------------------------
|
|
396
|
-
// Phase 3
|
|
396
|
+
// Phase 3. PER_PAID_ATTENDEE + PER_BASHPOINTS_ATTENDEE settlement helpers.
|
|
397
397
|
// --------------------------------------------------------------------------
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
400
|
* Which checked-in attendees count toward the settlement headcount?
|
|
401
401
|
*
|
|
402
|
-
* - `AllCheckedIn
|
|
403
|
-
* - `PaidUsdOnly
|
|
402
|
+
* - `AllCheckedIn`. Every checked-in, non-comp guest (legacy PER_ATTENDEE).
|
|
403
|
+
* - `PaidUsdOnly`. Only guests on USD-priced tiers (PER_PAID_ATTENDEE without
|
|
404
404
|
* `countsBashPointsTickets`).
|
|
405
|
-
* - `PaidBpOnly
|
|
405
|
+
* - `PaidBpOnly`. Only guests on BashPoints-priced tiers
|
|
406
406
|
* (PER_BASHPOINTS_ATTENDEE).
|
|
407
|
-
* - `PaidAny
|
|
407
|
+
* - `PaidAny`. Paid guests on either currency
|
|
408
408
|
* (PER_PAID_ATTENDEE with `countsBashPointsTickets = true`).
|
|
409
409
|
*/
|
|
410
410
|
export type EventPromoterCountingBasis =
|
|
@@ -477,7 +477,7 @@ export interface EventPromoterMixedSettlementInput {
|
|
|
477
477
|
expectedBpAttendeesAtBooking?: number | null;
|
|
478
478
|
/** Snapshots from the bash checkout (see `EventPromoterAttendeeSnapshots`). */
|
|
479
479
|
snapshots: EventPromoterAttendeeSnapshots;
|
|
480
|
-
/** Optional ceilings
|
|
480
|
+
/** Optional ceilings. Separate caps for USD and BP. */
|
|
481
481
|
maxUsdAttendeesAttributable?: number | null;
|
|
482
482
|
maxBpAttendeesAttributable?: number | null;
|
|
483
483
|
/** Optional dollar cap on USD side (from `maxBillableCents`). */
|
|
@@ -568,7 +568,7 @@ export function computeEventPromoterMixedSettlement(
|
|
|
568
568
|
}
|
|
569
569
|
|
|
570
570
|
// --------------------------------------------------------------------------
|
|
571
|
-
// Phase 3
|
|
571
|
+
// Phase 3. BashPoints payout source resolver (pool-then-wallet).
|
|
572
572
|
// --------------------------------------------------------------------------
|
|
573
573
|
|
|
574
574
|
export type BashPointsPayoutSourceValue = "HostWallet" | "BashBpPool";
|
|
@@ -596,7 +596,7 @@ export interface BashPointsPayoutResolverResult {
|
|
|
596
596
|
fromWalletBp: number;
|
|
597
597
|
/** BP that could NOT be sourced (resulting failure → dunning). */
|
|
598
598
|
shortfallBp: number;
|
|
599
|
-
/** True when fromWalletBp > 0
|
|
599
|
+
/** True when fromWalletBp > 0. Used to surface UI / push notifications. */
|
|
600
600
|
walletDebited: boolean;
|
|
601
601
|
}
|
|
602
602
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Headcount floors at minimumQuantity if set.
|
|
7
7
|
* - Dollar total floors at minimumChargeCents if set.
|
|
8
8
|
* - Packages and add-ons still stack on top.
|
|
9
|
-
* - No check-in true-up (promoter settlement)
|
|
9
|
+
* - No check-in true-up (promoter settlement). Headcount is snapshotted
|
|
10
10
|
* at booking time only.
|
|
11
11
|
*
|
|
12
12
|
* Keep this module pure (no Prisma, no React). Import it in bash-app, api,
|
|
@@ -45,7 +45,7 @@ export const FOOD_AND_BEVERAGE_SUBTYPES = new Set([
|
|
|
45
45
|
]);
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Custom-order celebration cakes
|
|
48
|
+
* Custom-order celebration cakes. Consultation, serving-size packages,
|
|
49
49
|
* pickup/delivery. Not a dessert station (DessertBar) and not per-guest catering.
|
|
50
50
|
*/
|
|
51
51
|
export function isCelebrationCakeEventService(opts: {
|
|
@@ -55,7 +55,7 @@ export function isCelebrationCakeEventService(opts: {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* Charcuterie boards and grazing tables
|
|
58
|
+
* Charcuterie boards and grazing tables. Board/table packages, not per-guest catering.
|
|
59
59
|
*/
|
|
60
60
|
export function isGrazingTableEventService(opts: {
|
|
61
61
|
eventServiceSubType?: string | null;
|
|
@@ -64,7 +64,7 @@ export function isGrazingTableEventService(opts: {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Wedding / ceremony officiant. Hosting Support
|
|
67
|
+
* Wedding / ceremony officiant. Hosting Support. Not F&B, not Entertainment Emcee.
|
|
68
68
|
*/
|
|
69
69
|
export function isOfficiantEventService(opts: {
|
|
70
70
|
eventServiceSubType?: string | null;
|
|
@@ -88,7 +88,7 @@ export function isPackagePricedFoodEventService(opts: {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
* Return true when a listing is an F&B EventService
|
|
91
|
+
* Return true when a listing is an F&B EventService. Either by top-level
|
|
92
92
|
* type or by subtype string (for legacy/alias safety).
|
|
93
93
|
*/
|
|
94
94
|
export function isFoodAndBeverageEventService(opts: {
|
|
@@ -102,7 +102,7 @@ export function isFoodAndBeverageEventService(opts: {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
* Per-guest F&B only. Cake and grazing use packages
|
|
105
|
+
* Per-guest F&B only. Cake and grazing use packages. Never this path.
|
|
106
106
|
*/
|
|
107
107
|
export function isPerGuestFoodAndBeverageEventService(opts: {
|
|
108
108
|
eventServiceType?: string | null;
|
|
@@ -155,7 +155,7 @@ export const FULFILLMENT_MODE_LABEL: Record<FoodAndBeverageFulfillmentMode, stri
|
|
|
155
155
|
/**
|
|
156
156
|
* Suggested menu category chips shown in the wizard and on the listing.
|
|
157
157
|
* Providers can add custom values; these are just pre-populated starting points.
|
|
158
|
-
* Not SKUs
|
|
158
|
+
* Not SKUs. No flavors, quantities, or prices here.
|
|
159
159
|
*/
|
|
160
160
|
export const FB_MENU_CATEGORY_SUGGESTIONS: Record<string, readonly string[]> = {
|
|
161
161
|
Caterer: [
|
|
@@ -283,7 +283,7 @@ export function quotedGuestCount(
|
|
|
283
283
|
* 2. Compute rate total: baseRateCents × quotedGuests
|
|
284
284
|
* 3. Floor at minimumChargeCents
|
|
285
285
|
*
|
|
286
|
-
* Packages and add-ons are NOT included here
|
|
286
|
+
* Packages and add-ons are NOT included here. They are added on top by
|
|
287
287
|
* frontendServiceBookingUtils (same as for all other service types).
|
|
288
288
|
*/
|
|
289
289
|
export function foodAndBeverageQuoteCents({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Phase 5 of the unified-pricing roadmap
|
|
2
|
+
* Phase 5 of the unified-pricing roadmap. Pure projection of a `ServiceBookingOffer`
|
|
3
3
|
* candidate into expected / worst-case / best-case totals (in cents).
|
|
4
4
|
*
|
|
5
5
|
* Used by:
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
* host's expected attendees and any host-side caps.
|
|
11
11
|
*
|
|
12
12
|
* Heuristics for `worstCaseCents` / `bestCaseCents`:
|
|
13
|
-
* - `FLAT_FEE` / `HOURLY` / `PER_DAY` / `CUSTOM
|
|
13
|
+
* - `FLAT_FEE` / `HOURLY` / `PER_DAY` / `CUSTOM`. All three bands equal the
|
|
14
14
|
* expected total (no variability).
|
|
15
|
-
* - `PER_ATTENDEE` / `PER_PAID_ATTENDEE
|
|
15
|
+
* - `PER_ATTENDEE` / `PER_PAID_ATTENDEE`. Worst case = floor (minimumQuantity
|
|
16
16
|
* * baseRateCents, capped by minimumChargeCents); best case = capped to
|
|
17
17
|
* `maxBillableCents` when present, else `expectedAttendees * 1.5`.
|
|
18
|
-
* - `PER_BASHPOINTS_ATTENDEE
|
|
18
|
+
* - `PER_BASHPOINTS_ATTENDEE`. Same shape but in BashPoints, so we surface
|
|
19
19
|
* `expectedTotalBp` and the USD bands return null.
|
|
20
|
-
* - `TICKET_REVENUE_PERCENTAGE` / `PRODUCT_SALES_PERCENTAGE
|
|
20
|
+
* - `TICKET_REVENUE_PERCENTAGE` / `PRODUCT_SALES_PERCENTAGE`. Caller passes
|
|
21
21
|
* an `expectedBasisCents` (usually the bash's projected ticket revenue or
|
|
22
22
|
* vendor gross sales). Worst case = 0 if pre-sale, best case = basis * pct.
|
|
23
|
-
* - `TIERED
|
|
23
|
+
* - `TIERED`. Worst case = lowest tier price, best case = highest tier
|
|
24
24
|
* price; expected resolves via the supplied `tieredExpectedTierCents`.
|
|
25
25
|
*/
|
|
26
26
|
import type { PricingModel } from "@prisma/client";
|
|
@@ -99,7 +99,7 @@ export function computeOfferComparisonBands(
|
|
|
99
99
|
reasoning:
|
|
100
100
|
total > 0
|
|
101
101
|
? `Fixed price: you pay ${fmt(total)} regardless of turnout.`
|
|
102
|
-
: "Fixed price
|
|
102
|
+
: "Fixed price. Provider has not set a rate.",
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -190,7 +190,7 @@ export function computeOfferComparisonBands(
|
|
|
190
190
|
expectedTotalBp: null,
|
|
191
191
|
worstCaseBp: null,
|
|
192
192
|
bestCaseBp: null,
|
|
193
|
-
reasoning: `Unrecognized pricing model "${input.pricingModel}"
|
|
193
|
+
reasoning: `Unrecognized pricing model "${input.pricingModel}". Treated as flat.`,
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Phase 0 adoption guardrails
|
|
2
|
+
* Phase 0 adoption guardrails. Aggregate cost exposure for a bash's service
|
|
3
3
|
* bookings. Pure functions so the api endpoint (Prisma query, then this util)
|
|
4
4
|
* and bash-app (display) share one source of truth.
|
|
5
5
|
*
|
|
6
6
|
* Each booking resolves to:
|
|
7
|
-
* - `expectedCents
|
|
8
|
-
* - `worstCaseCents
|
|
7
|
+
* - `expectedCents`. The most-likely total at expected attendance.
|
|
8
|
+
* - `worstCaseCents`. The dollar ceiling if the host's caps trip. For flat
|
|
9
9
|
* models this equals `expectedCents` (no variance). For variable models it
|
|
10
10
|
* equals `maxBillableCents` if set; otherwise `1.5x expected` (matches the
|
|
11
11
|
* `defaultMaxBillableCents` heuristic in `billingCapUtils.ts`).
|
|
@@ -41,7 +41,7 @@ export interface ServiceBookingExposureInput {
|
|
|
41
41
|
label: string;
|
|
42
42
|
/**
|
|
43
43
|
* The pricing model from the booked service's subtype, if known. Phase 0
|
|
44
|
-
* bookings that predate the unified block pass `null
|
|
44
|
+
* bookings that predate the unified block pass `null`. Exposure falls
|
|
45
45
|
* back to flat-rate math.
|
|
46
46
|
*/
|
|
47
47
|
pricingModel?: string | null;
|
|
@@ -63,7 +63,7 @@ export interface ServiceBookingExposureInput {
|
|
|
63
63
|
*/
|
|
64
64
|
maxBillableCents?: number | null;
|
|
65
65
|
/**
|
|
66
|
-
* The booking's grand total (cents) when it was confirmed
|
|
66
|
+
* The booking's grand total (cents) when it was confirmed. Used as the
|
|
67
67
|
* fallback "expected" amount for non-variable bookings whose pricing model
|
|
68
68
|
* isn't yet tracked. Mirrors `ServiceBooking.totalATBCents`.
|
|
69
69
|
*/
|
|
@@ -92,7 +92,7 @@ export interface AggregateExposureSummary {
|
|
|
92
92
|
/** Sum of `worstCaseCents` across all bookings (cents). */
|
|
93
93
|
worstCaseTotalCents: number;
|
|
94
94
|
/**
|
|
95
|
-
* Per-booking breakdown
|
|
95
|
+
* Per-booking breakdown. Preserves input order so callers can render rows
|
|
96
96
|
* alongside the booking list without re-sorting.
|
|
97
97
|
*/
|
|
98
98
|
byBooking: ServiceBookingExposure[];
|
|
@@ -124,7 +124,7 @@ export function isVariablePricingModel(
|
|
|
124
124
|
* - TICKET_REVENUE_PERCENTAGE / PRODUCT_SALES_PERCENTAGE / TIERED / CUSTOM:
|
|
125
125
|
* expected = totalATBCents ?? 0
|
|
126
126
|
* worst = maxBillableCents ?? expected * 1.5 (variance unknown without
|
|
127
|
-
* settlement basis math
|
|
127
|
+
* settlement basis math. See Phase 2 for venue rev-share).
|
|
128
128
|
* - FLAT_FEE / HOURLY / PER_DAY (or null pricingModel): flat → expected = worst.
|
|
129
129
|
*/
|
|
130
130
|
export function computeServiceBookingExposure(
|
|
@@ -162,7 +162,7 @@ export function computeServiceBookingExposure(
|
|
|
162
162
|
if (isAttendeeDriven) {
|
|
163
163
|
expected = expectedAttendees * baseRate;
|
|
164
164
|
} else {
|
|
165
|
-
// Revenue-share / tiered / custom
|
|
165
|
+
// Revenue-share / tiered / custom. TotalATBCents is the most we know.
|
|
166
166
|
expected = Math.max(0, flatFallback);
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -64,11 +64,11 @@ export type ServiceBookingRequiredData = MakeNullablePropsOptional<
|
|
|
64
64
|
| "creatorId"
|
|
65
65
|
| "creator"
|
|
66
66
|
| "checkout"
|
|
67
|
-
// Event Promoter settlement fields
|
|
67
|
+
// Event Promoter settlement fields. DB applies defaults at creation,
|
|
68
68
|
// so callers building a new booking shape may omit them.
|
|
69
69
|
| "settlementStatus"
|
|
70
70
|
| "settlementAttempts"
|
|
71
|
-
// Reschedule lifecycle
|
|
71
|
+
// Reschedule lifecycle. DB defaults `rescheduleStatus` to None; the rest are
|
|
72
72
|
// nullable and set only when a host moves the date.
|
|
73
73
|
| "rescheduleStatus"
|
|
74
74
|
>
|
|
@@ -35,7 +35,7 @@ function isActiveFeatured(s: FeaturedServiceSortable, now: Date): boolean {
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Tier 0 = paid / admin / membership feature, 1 = AutoNewService, 2 = unfeatured
|
|
38
|
-
* (or featured but with no reason recorded
|
|
38
|
+
* (or featured but with no reason recorded. These existed before the migration
|
|
39
39
|
* and are treated as "legacy featured" sitting just below auto-features).
|
|
40
40
|
*/
|
|
41
41
|
function featuredTier(s: FeaturedServiceSortable, now: Date): number {
|
|
@@ -69,7 +69,7 @@ export function compareFeaturedServices(
|
|
|
69
69
|
if (ta < 3) {
|
|
70
70
|
const fa = toMs(a.featuredAt);
|
|
71
71
|
const fb = toMs(b.featuredAt);
|
|
72
|
-
if (fa !== fb) return fa - fb; // ASC
|
|
72
|
+
if (fa !== fb) return fa - fb; // ASC. Earliest paid wins
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
return toMs(b.createdAt) - toMs(a.createdAt); // DESC for non-featured / tie-break
|
|
@@ -26,7 +26,7 @@ export function isOwnerProfileListingImageUrl(
|
|
|
26
26
|
return profileUrls.some((profileUrl) => profileUrl === normalized);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/** Gallery images suitable for public service cards
|
|
29
|
+
/** Gallery images suitable for public service cards. Excludes videos and profile avatars. */
|
|
30
30
|
export function filterServiceListingMedia(
|
|
31
31
|
service: Pick<ServiceExt, "media"> & { owner?: ServiceListingOwner }
|
|
32
32
|
): Media[] {
|
|
@@ -45,7 +45,7 @@ export function filterServiceListingMedia(
|
|
|
45
45
|
* Resolve the still image for browse cards and list heroes.
|
|
46
46
|
*
|
|
47
47
|
* Prefers `coverPhoto`, then the first gallery image. Supporting videos in
|
|
48
|
-
* `media` are never used
|
|
48
|
+
* `media` are never used. Cards must not autoplay performance clips.
|
|
49
49
|
*/
|
|
50
50
|
export function resolveServiceListingImage(
|
|
51
51
|
service: Pick<ServiceExt, "coverPhoto" | "media"> & {
|
|
@@ -245,7 +245,7 @@ function generateDescription(
|
|
|
245
245
|
* Vendor cancellation policy copy shown in the service wizard. Hosts send
|
|
246
246
|
* **booking requests**; after acceptance and payment, the vendor's obligation
|
|
247
247
|
* is a **verified booking**. Use "verified booking" for vendor-initiated
|
|
248
|
-
* cancellation
|
|
248
|
+
* cancellation. Never "booking request" in this generator.
|
|
249
249
|
*/
|
|
250
250
|
function generateVendorDescription(
|
|
251
251
|
refundPolicy: ServiceCancellationRefundPolicy[]
|
|
@@ -691,7 +691,7 @@ export const serviceSpecificInfoAI = {
|
|
|
691
691
|
isArray: true,
|
|
692
692
|
},
|
|
693
693
|
goodsOrServices: {
|
|
694
|
-
description: `goodsOrServices (array of specific items offered
|
|
694
|
+
description: `goodsOrServices (array of specific items offered. E.g. "Donuts", "Coffee", "Glazed doughnuts", not just category names). When the user names a famous brand, infer typical menu or product lines for that brand.`,
|
|
695
695
|
example: `["Donuts", "Coffee", "Seasonal flavors"]`,
|
|
696
696
|
type: "string",
|
|
697
697
|
isArray: true,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Phase 6 of the unified-pricing roadmap
|
|
2
|
+
* Phase 6 of the unified-pricing roadmap. Forward-looking dual-read.
|
|
3
3
|
*
|
|
4
4
|
* Reads the unified pricing block from whichever subtype owns it (EventService,
|
|
5
5
|
* Vendor, Exhibitor, Sponsor, Venue, EntertainmentService, VolunteerService),
|
|
6
6
|
* then falls back to the legacy `ServiceRate` row pinned on the service if the
|
|
7
|
-
* unified block is null. Plain object passing only
|
|
7
|
+
* unified block is null. Plain object passing only. No Prisma client calls,
|
|
8
8
|
* no fetches, no I/O.
|
|
9
9
|
*
|
|
10
10
|
* Use this from the booking + checkout paths so existing data keeps working
|
|
@@ -21,7 +21,7 @@ export interface UnifiedPricingBlock {
|
|
|
21
21
|
rateUnit: string | null;
|
|
22
22
|
minimumChargeCents: number | null;
|
|
23
23
|
minimumQuantity: number | null;
|
|
24
|
-
/** Json
|
|
24
|
+
/** Json. Keep `unknown` so callers narrow at use sites. */
|
|
25
25
|
tierPricing: unknown;
|
|
26
26
|
pricingNotes: string | null;
|
|
27
27
|
/** True iff this came from a unified block (vs the legacy ServiceRate). */
|
|
@@ -39,7 +39,7 @@ export interface UnifiedPricingSourceCandidates {
|
|
|
39
39
|
venue?: PartialPricingBlock | null;
|
|
40
40
|
entertainmentService?: PartialPricingBlock | null;
|
|
41
41
|
volunteerService?: PartialPricingBlock | null;
|
|
42
|
-
/** Legacy fallback
|
|
42
|
+
/** Legacy fallback. The active `ServiceRate` row. */
|
|
43
43
|
legacyRate?: LegacyServiceRateShape | null;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -55,7 +55,7 @@ type PartialPricingBlock = {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
type LegacyServiceRateShape = {
|
|
58
|
-
/** Legacy doesn't carry a pricing model
|
|
58
|
+
/** Legacy doesn't carry a pricing model. Caller can default to FLAT_FEE. */
|
|
59
59
|
ratePerUnitCents?: number | null;
|
|
60
60
|
rateUnit?: string | null;
|
|
61
61
|
minimumQuantity?: number | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Phase 2 of the unified-pricing roadmap
|
|
2
|
+
* Phase 2 of the unified-pricing roadmap. Pure math for Venue F&B minimums
|
|
3
3
|
* and revenue share. Pure functions only (no Prisma / no fetches) so the
|
|
4
4
|
* wizard, api validators, settlement worker, and offer-suggestion AI can all
|
|
5
5
|
* share one source of truth.
|
|
@@ -34,7 +34,7 @@ export const REVENUE_SHARE_BASES = [
|
|
|
34
34
|
] as const;
|
|
35
35
|
export type RevenueShareBasis = (typeof REVENUE_SHARE_BASES)[number];
|
|
36
36
|
|
|
37
|
-
/** Internal helper
|
|
37
|
+
/** Internal helper. Cents → non-negative rounded integer. */
|
|
38
38
|
function nonNegInt(value: number): number {
|
|
39
39
|
if (!Number.isFinite(value) || value <= 0) return 0;
|
|
40
40
|
return Math.round(value);
|
|
@@ -63,7 +63,7 @@ export interface ResolveFBMinimumInput {
|
|
|
63
63
|
* is used. Returns `null` if neither produces a value.
|
|
64
64
|
*
|
|
65
65
|
* Callers that need timezone-aware day-of-week selection should pre-shift the
|
|
66
|
-
* Date before passing it in
|
|
66
|
+
* Date before passing it in. This function uses `Date.getDay()` directly.
|
|
67
67
|
*/
|
|
68
68
|
export function resolveFBMinimumForDate(
|
|
69
69
|
input: ResolveFBMinimumInput
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Volunteer compensation
|
|
2
|
+
* Volunteer compensation. Closed-loop BashPoints stipends + on-site perks.
|
|
3
3
|
*
|
|
4
4
|
* Volunteers are NOT employees or contractors. This util intentionally avoids
|
|
5
5
|
* any USD rate / wage / per-attendee math, because crossing that line would
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - never cashed out,
|
|
10
10
|
* - never used to settle third-party USD invoices,
|
|
11
11
|
* - only redeemable against Bash-issued goods (tickets, BashPass upgrades,
|
|
12
|
-
* premium features)
|
|
12
|
+
* premium features). See the closed-loop BP plan.
|
|
13
13
|
*
|
|
14
14
|
* Pure functions only so the wizard, api validators, and help-center page
|
|
15
15
|
* share one source of truth.
|
|
@@ -119,7 +119,7 @@ export function volunteerCompensationSummary(args: {
|
|
|
119
119
|
}): string {
|
|
120
120
|
switch (args.compensationType) {
|
|
121
121
|
case "None":
|
|
122
|
-
return "Pure volunteer
|
|
122
|
+
return "Pure volunteer. No stipend or perks beyond appreciation.";
|
|
123
123
|
case "BashPointsStipend":
|
|
124
124
|
return `${args.bashPointsStipend ?? 0} BashPoints per ${args.rateUnit ?? "shift"}.`;
|
|
125
125
|
case "PerksOnly":
|
package/src/utils/slugUtils.ts
CHANGED
|
@@ -85,7 +85,7 @@ export function getPublicBashDetailPath(
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
|
-
* Path to Your Memories (private vault) for a bash
|
|
88
|
+
* Path to Your Memories (private vault) for a bash. Nested under bash detail
|
|
89
89
|
* (`/bash/{id}-{slug}/memories`). Requires sign-in + eligibility; not a public
|
|
90
90
|
* unauthenticated recap page.
|
|
91
91
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Buyer-facing surcharge for physical ticket delivery (mail-to-buyer or venue
|
|
3
|
-
* will-call), both fulfilled as individually-addressed Lob postcards
|
|
3
|
+
* will-call), both fulfilled as individually-addressed Lob postcards. One
|
|
4
4
|
* ticket = one piece, same product used by Flyer Blast's addressed mail path.
|
|
5
5
|
*
|
|
6
6
|
* Reuses the Lob per-piece cost table from `lobFlyerUtils.ts` rather than
|
|
7
|
-
* duplicating pricing
|
|
7
|
+
* duplicating pricing. Same "verify before production" caveat applies here.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { TicketDeliveryMethod, TicketPrintOrderStatus } from "@prisma/client";
|
|
@@ -21,7 +21,7 @@ export function ticketPrintSurchargeCentsPerPiece(size: LobPostcardSizeKey): num
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Total buyer-facing surcharge (integer cents) for `quantity` physical ticket
|
|
24
|
-
* pieces of the given size
|
|
24
|
+
* pieces of the given size. Used as the Stripe checkout line item amount.
|
|
25
25
|
*/
|
|
26
26
|
export function ticketPrintSurchargeCentsForQuantity(
|
|
27
27
|
size: LobPostcardSizeKey,
|
|
@@ -32,7 +32,7 @@ export function ticketPrintSurchargeCentsForQuantity(
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Buyer-facing badge copy for a ticket's physical delivery status
|
|
35
|
+
* Buyer-facing badge copy for a ticket's physical delivery status. Shared by
|
|
36
36
|
* My Tickets and the ticket details view so both surfaces stay in sync.
|
|
37
37
|
* `null`/`undefined` (Digital) means no badge should render.
|
|
38
38
|
*/
|
|
@@ -52,7 +52,7 @@ export function ticketDeliveryStatusLabel(
|
|
|
52
52
|
return "Physical ticket cancelled";
|
|
53
53
|
}
|
|
54
54
|
if (status === TicketPrintOrderStatus.Failed) {
|
|
55
|
-
return "Physical ticket delivery failed
|
|
55
|
+
return "Physical ticket delivery failed. Contact the host";
|
|
56
56
|
}
|
|
57
57
|
if (deliveryMethod === TicketDeliveryMethod.VenueWillCall) {
|
|
58
58
|
switch (status) {
|