@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* No Luxon dependency to avoid timezone behavior changes for UTC ISO strings.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/** "Mar 7, 2026"
|
|
7
|
+
/** "Mar 7, 2026". Standard short display date for UI components. Formats in browser local timezone. */
|
|
8
8
|
export function formatShortDate(
|
|
9
9
|
date: Date | string | null | undefined,
|
|
10
10
|
fallback = 'Date TBD'
|
|
@@ -19,7 +19,7 @@ export function formatShortDate(
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/** "March 7, 2026"
|
|
22
|
+
/** "March 7, 2026". Long display date for blog/billing UI. Formats in browser local timezone. */
|
|
23
23
|
export function formatLongDate(
|
|
24
24
|
date: Date | string | null | undefined,
|
|
25
25
|
fallback = ''
|
|
@@ -59,7 +59,7 @@ export interface DrawCapacityFitResult {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Score how well an entertainer's draw fits a venue's capacity (0
|
|
62
|
+
* Score how well an entertainer's draw fits a venue's capacity (0 to 15 points).
|
|
63
63
|
* Partial credit when only one side has data.
|
|
64
64
|
*/
|
|
65
65
|
export function scoreDrawCapacityFit(
|
|
@@ -92,7 +92,7 @@ export function isValidIanaTimezone(timezone: string | null | undefined): boolea
|
|
|
92
92
|
// Newer ICU accepts offset ids (`+05:00`) as timeZone; those are not IANA names.
|
|
93
93
|
if (/^[+-]\d{1,2}(?::?\d{2})?$/.test(t)) return false;
|
|
94
94
|
|
|
95
|
-
// Intl throws RangeError for unknown IANA ids
|
|
95
|
+
// Intl throws RangeError for unknown IANA ids. No luxon needed.
|
|
96
96
|
try {
|
|
97
97
|
Intl.DateTimeFormat(undefined, { timeZone: t });
|
|
98
98
|
return true;
|
|
@@ -121,7 +121,7 @@ export function getIanaTimezoneFromCoordinates(
|
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
// Null Island / indeterminate
|
|
124
|
+
// Null Island / indeterminate. Do not guess a zone from (0, 0).
|
|
125
125
|
if (latitude === 0 && longitude === 0) {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -144,7 +144,7 @@ export function getIanaTimezoneFromCoordinates(
|
|
|
144
144
|
return "America/Anchorage";
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
// Continental US
|
|
147
|
+
// Continental US. Fixed west-to-east bands (avoids misclassifying Mountain vs Central)
|
|
148
148
|
if (latitude >= 18.9 && latitude <= 71.5388) {
|
|
149
149
|
if (longitude <= -114) {
|
|
150
150
|
return "America/Los_Angeles";
|
|
@@ -332,7 +332,7 @@ export type ResolveEventTimezoneForDisplayArgs = InferEventTimezoneArgs & {
|
|
|
332
332
|
|
|
333
333
|
/**
|
|
334
334
|
* For public surfaces (e.g. BashCard): prefer geographic inference when location
|
|
335
|
-
* data is available
|
|
335
|
+
* data is available. It is more reliable than the stored timezone which may have
|
|
336
336
|
* been set by AI or defaulted incorrectly. Falls back to the stored IANA only when
|
|
337
337
|
* geographic inference produces no opinion (returns UTC). Never uses the viewer's
|
|
338
338
|
* device timezone.
|
package/src/utils/flyerUtils.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const FLYER_EDDM_HEIGHT_IN = 11;
|
|
|
7
7
|
export const FLYER_EDDM_MIN_WIDTH_IN = 6.125;
|
|
8
8
|
export const FLYER_EDDM_MIN_HEIGHT_IN = 11;
|
|
9
9
|
|
|
10
|
-
/** USPS EDDM Retail per-piece postage (2026
|
|
10
|
+
/** USPS EDDM Retail per-piece postage (2026. Verify periodically). */
|
|
11
11
|
export const USPS_EDDM_RETAIL_PER_PIECE_CENTS = 24.7;
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -57,7 +57,7 @@ export const FLYER_PRICING_TIERS: FlyerTierQuote[] = [
|
|
|
57
57
|
},
|
|
58
58
|
];
|
|
59
59
|
|
|
60
|
-
/** Default sponsor slot list prices (Utah / intermountain
|
|
60
|
+
/** Default sponsor slot list prices (Utah / intermountain. Cents). */
|
|
61
61
|
export const FLYER_SPONSOR_DEFAULT_FEATURED_CENTS = 10000;
|
|
62
62
|
export const FLYER_SPONSOR_DEFAULT_SUPPORTING_CENTS = 5000;
|
|
63
63
|
export const FLYER_SPONSOR_BUSINESS_NAME_MAX_LENGTH = 48;
|
|
@@ -143,7 +143,7 @@ export function quoteFlyerTierForHouseholds(
|
|
|
143
143
|
return tier;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
// Above metro max
|
|
146
|
+
// Above metro max. Use metro as ceiling for MVP
|
|
147
147
|
const last = FLYER_PRICING_TIERS[FLYER_PRICING_TIERS.length - 1];
|
|
148
148
|
if (totalHouseholds > last.maxHouseholds) {
|
|
149
149
|
return last;
|
|
@@ -22,7 +22,7 @@ export function validateGroupTicketCartForTiers(
|
|
|
22
22
|
if (packageQty < 1) {
|
|
23
23
|
return {
|
|
24
24
|
ok: false,
|
|
25
|
-
message: `${tier.title} is a group package
|
|
25
|
+
message: `${tier.title} is a group package. Select one package to buy.`,
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
if (packageQty > 1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Curated guest visibility
|
|
2
|
+
* Curated guest visibility. Shared policy resolver for API + bash-app.
|
|
3
3
|
* Three layers compose: event teaser policy, per-guest visibility, viewer roster depth.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -72,7 +72,7 @@ export type GuestSurfacePayload = {
|
|
|
72
72
|
attendeeVisibilityByUserId?: Record<string, AttendeeVisibility>;
|
|
73
73
|
/** Event has public guest list enabled on bash detail */
|
|
74
74
|
attendeeListPublic?: boolean;
|
|
75
|
-
/** Preview | Public | TicketHolders
|
|
75
|
+
/** Preview | Public | TicketHolders. Supersedes attendeeListPublic when set */
|
|
76
76
|
attendeeListAccess?: string | null;
|
|
77
77
|
/**
|
|
78
78
|
* When set, the viewer sees a blurred preview and must RSVP (or buy a ticket)
|
|
@@ -200,7 +200,7 @@ export function resolveGuestSurfacePolicy(
|
|
|
200
200
|
showNetworkSlice: false,
|
|
201
201
|
rosterDepth: "None",
|
|
202
202
|
previewLimit: 5,
|
|
203
|
-
/** Named faces for avatar stack + overflow (+N) tooltip
|
|
203
|
+
/** Named faces for avatar stack + overflow (+N) tooltip. Not only the 5 visible bubbles. */
|
|
204
204
|
apiPreviewLimit: 60,
|
|
205
205
|
effectiveMode: eventMode,
|
|
206
206
|
};
|
|
@@ -214,7 +214,7 @@ export function resolveGuestSurfacePolicy(
|
|
|
214
214
|
showNetworkSlice: isAuthenticated,
|
|
215
215
|
rosterDepth: effectiveDepth,
|
|
216
216
|
previewLimit: 5,
|
|
217
|
-
/** Named faces for avatar stack + overflow (+N) tooltip
|
|
217
|
+
/** Named faces for avatar stack + overflow (+N) tooltip. Not only the 5 visible bubbles. */
|
|
218
218
|
apiPreviewLimit: 60,
|
|
219
219
|
effectiveMode: eventMode,
|
|
220
220
|
};
|
|
@@ -246,7 +246,7 @@ export function resolveGuestSurfacePolicy(
|
|
|
246
246
|
showNetworkSlice,
|
|
247
247
|
rosterDepth: effectiveDepth,
|
|
248
248
|
previewLimit: 5,
|
|
249
|
-
/** Named faces for avatar stack + overflow (+N) tooltip
|
|
249
|
+
/** Named faces for avatar stack + overflow (+N) tooltip. Not only the 5 visible bubbles. */
|
|
250
250
|
apiPreviewLimit: 60,
|
|
251
251
|
effectiveMode: eventMode,
|
|
252
252
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lob addressed postcard economics and trim sizes.
|
|
3
3
|
*
|
|
4
|
-
* Do not use EDDM (`flyerUtils.ts`) per-piece rates for Lob
|
|
4
|
+
* Do not use EDDM (`flyerUtils.ts`) per-piece rates for Lob. Different product.
|
|
5
5
|
*
|
|
6
6
|
* **Pricing source:** Replace `LOB_ADDRESSED_UNIT_CENTS_BY_SIZE` after verifying
|
|
7
7
|
* print+postage with your Lob dashboard or account rep (note the date in comments
|
|
@@ -33,7 +33,7 @@ export const LOB_POSTCARD_TRIM_IN: Record<
|
|
|
33
33
|
/**
|
|
34
34
|
* Verified placeholder unit cost (print + postage to mailbox) in US cents per piece.
|
|
35
35
|
* TODO: replace with values from Lob dashboard for your mail class (e.g. first class).
|
|
36
|
-
* Last reviewed placeholder: 2026-04-26
|
|
36
|
+
* Last reviewed placeholder: 2026-04-26. Not for production pricing without verification.
|
|
37
37
|
*/
|
|
38
38
|
export const LOB_ADDRESSED_UNIT_CENTS_BY_SIZE: Record<LobPostcardSizeKey, number> = {
|
|
39
39
|
LOB_4X6: 85,
|
package/src/utils/luxonUtils.ts
CHANGED
|
@@ -403,7 +403,7 @@ export function formatDayOfWeekHours(hours: LuxonDayOfWeekHours): string[] {
|
|
|
403
403
|
const formattedRanges = ranges
|
|
404
404
|
.map(
|
|
405
405
|
({ start, end }) =>
|
|
406
|
-
`${start.toFormat("h:mm a")}
|
|
406
|
+
`${start.toFormat("h:mm a")} to ${end.toFormat("h:mm a")}`
|
|
407
407
|
)
|
|
408
408
|
.join(", ");
|
|
409
409
|
return `${dayName}: ${formattedRanges}`;
|
|
@@ -873,10 +873,10 @@ export function dateTimeRangeCrossesMidnight(range: LuxonDateRange) {
|
|
|
873
873
|
* end: March 9, 2025 9:00 pm
|
|
874
874
|
*
|
|
875
875
|
* then the segments produced are:
|
|
876
|
-
* March 5, 11:00 am
|
|
877
|
-
* March 6, 11:00 am
|
|
878
|
-
* March 7, 11:00 am
|
|
879
|
-
* March 8, 11:00 am
|
|
876
|
+
* March 5, 11:00 am. March 6, 9:00 pm
|
|
877
|
+
* March 6, 11:00 am. March 7, 9:00 pm
|
|
878
|
+
* March 7, 11:00 am. March 8, 9:00 pm
|
|
879
|
+
* March 8, 11:00 am. March 9, 9:00 pm
|
|
880
880
|
*
|
|
881
881
|
* (You can then filter out partial segments if you want only full "days.")
|
|
882
882
|
*/
|
|
@@ -3,7 +3,7 @@ import type { Organization } from "@prisma/client";
|
|
|
3
3
|
/**
|
|
4
4
|
* Subset of `Organization` fields the verified-nonprofit helpers need. Callers
|
|
5
5
|
* may pass any prisma payload that selects (or includes) at least these
|
|
6
|
-
* columns
|
|
6
|
+
* columns. Keeps consumers free to use narrow `select` shapes.
|
|
7
7
|
*/
|
|
8
8
|
export type NonprofitVerificationFields = Pick<
|
|
9
9
|
Organization,
|
|
@@ -15,7 +15,7 @@ export type NonprofitVerificationFields = Pick<
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Verified-nonprofit status is determined solely by an admin stamp:
|
|
18
|
-
* `nonprofitVerifiedAt` is set (in the past or now
|
|
18
|
+
* `nonprofitVerifiedAt` is set (in the past or now. Future timestamps do
|
|
19
19
|
* NOT count) AND we captured `nonprofitCountry` + `nonprofitRegistrationNumber`.
|
|
20
20
|
* The Stripe nonprofit-pricing status is informational only and DOES NOT gate
|
|
21
21
|
* verification (a charity can be verified by Bash even before applying to
|
|
@@ -23,7 +23,7 @@ export type NonprofitVerificationFields = Pick<
|
|
|
23
23
|
*
|
|
24
24
|
* IMPORTANT: `BashEvent.nonProfit` is a user-entered flag and MUST NOT be
|
|
25
25
|
* passed in here. Fee-waiver code reads only the Organization's verification
|
|
26
|
-
* fields
|
|
26
|
+
* fields. See Phase 3 of the donation-followups-leak-fix plan.
|
|
27
27
|
*/
|
|
28
28
|
export function isVerifiedNonprofitOrganization(
|
|
29
29
|
org: NonprofitVerificationFields | null | undefined
|
|
@@ -17,7 +17,7 @@ export interface OrganizationEntitlementInput {
|
|
|
17
17
|
subscriptionStatus?: string | null;
|
|
18
18
|
/**
|
|
19
19
|
* True only when ops provisioned Enterprise via a signed deal (admin
|
|
20
|
-
* enterprise-provisioning endpoint)
|
|
20
|
+
* enterprise-provisioning endpoint). The only way to reach
|
|
21
21
|
* subscriptionTier="Enterprise" (see docs/ENTERPRISE-B2B-SALES-PLAYBOOK.md;
|
|
22
22
|
* self-serve checkout rejects Enterprise). Optional/undefined is treated as
|
|
23
23
|
* false so legacy call sites that don't select this field fail closed on the
|
|
@@ -56,7 +56,7 @@ function hasActiveGrowthOrAboveTier(
|
|
|
56
56
|
* Vanity subdomains ({slug}.bash.community) are a Growth-tier-and-up perk, not
|
|
57
57
|
* Enterprise-only: unlike custom domains, granting one costs nothing extra
|
|
58
58
|
* (a slug lookup against the existing bash.community CloudFront distribution,
|
|
59
|
-
* no per-org AWS resources)
|
|
59
|
+
* no per-org AWS resources). It's a cheap, visible upgrade incentive to dangle
|
|
60
60
|
* in front of Starter orgs. See {@link organizationHasCustomDomainAccess} for
|
|
61
61
|
* the pricier, Enterprise-only white-label surface.
|
|
62
62
|
*/
|
|
@@ -119,8 +119,8 @@ export function organizationHasComplianceAccess(
|
|
|
119
119
|
* Custom domains (white-label tier): real DNS (e.g. members.acme.com) provisioned
|
|
120
120
|
* via AWS CloudFront SaaS Manager Distribution Tenants, plus the "Powered by Bash"
|
|
121
121
|
* removal toggle. Unlike {@link organizationHasVanitySubdomain}, this needs a real
|
|
122
|
-
* per-org CloudFront Distribution Tenant + managed cert + the org's own DNS work
|
|
123
|
-
* actual infra cost and complexity per org
|
|
122
|
+
* per-org CloudFront Distribution Tenant + managed cert + the org's own DNS work.
|
|
123
|
+
* actual infra cost and complexity per org. So it stays Enterprise-only (today
|
|
124
124
|
* always sales-provisioned, since self-serve Enterprise checkout is blocked; see
|
|
125
125
|
* docs/ENTERPRISE-B2B-SALES-PLAYBOOK.md). Does NOT require
|
|
126
126
|
* {@link organizationHasEnterprisePlatformAccess}'s `enterpriseSalesProvisioned`
|
|
@@ -150,7 +150,7 @@ export function convertDollarsToCents(
|
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Calculate Stripe's standard card processing fee: 2.9% + $0.30.
|
|
153
|
-
* This is passed through transparently
|
|
153
|
+
* This is passed through transparently. Stripe charges it regardless.
|
|
154
154
|
* @param amountDollars - Transaction amount in dollars (not cents)
|
|
155
155
|
* @returns Stripe fee in dollars
|
|
156
156
|
*/
|
|
@@ -161,7 +161,7 @@ export function calculateStripeFee(amountDollars: number): number {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
|
-
* Stripe card processing pass-through (2.9% + $0.30), in cents
|
|
164
|
+
* Stripe card processing pass-through (2.9% + $0.30), in cents. Single source of truth with {@link STRIPE_PROCESSING_FEE}.
|
|
165
165
|
* Use for Connect `application_fee_amount` and checkout line items so totals match the checkout UI.
|
|
166
166
|
*/
|
|
167
167
|
export function calculateStripeProcessingFeeCents(amountCents: number): number {
|
|
@@ -171,7 +171,7 @@ export function calculateStripeProcessingFeeCents(amountCents: number): number {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
|
-
* Bash **platform** fee only (currently 0
|
|
174
|
+
* Bash **platform** fee only (currently 0%. No Bash take on tickets). Not the Stripe processing fee.
|
|
175
175
|
* @deprecated Prefer {@link calculateStripeProcessingFeeCents} for Stripe pass-through on ticket/donation charges.
|
|
176
176
|
*/
|
|
177
177
|
export function calculateBashAppFee(total: number): number {
|
|
@@ -179,7 +179,7 @@ export function calculateBashAppFee(total: number): number {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* Calculate Stripe's processing fee for donations
|
|
182
|
+
* Calculate Stripe's processing fee for donations. Transparent pass-through only.
|
|
183
183
|
* Same formula as tickets: {@link STRIPE_PROCESSING_FEE}.
|
|
184
184
|
* @param amountCents - Donation amount in cents
|
|
185
185
|
* @returns Stripe processing fee in cents (integer)
|
|
@@ -356,7 +356,7 @@ export function guestCheckoutHasNoAddedFees(
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
|
-
* Full guest ticket checkout breakdown
|
|
359
|
+
* Full guest ticket checkout breakdown. Single source for API charges and UI copy.
|
|
360
360
|
*
|
|
361
361
|
* HostAbsorbs (default): guest pays subtotal (+ optional platform guest line only).
|
|
362
362
|
* GuestPays/Split (enterprise): guest also pays a visible processing line (fee on subtotal, donation-style).
|
|
@@ -461,7 +461,7 @@ export function clampTicketCommissionBps(
|
|
|
461
461
|
* along with its constituent parts.
|
|
462
462
|
*
|
|
463
463
|
* `isVerifiedNonprofitHost` waives ONLY Bash's platform take
|
|
464
|
-
* (`bashPlatformTotalCents`)
|
|
464
|
+
* (`bashPlatformTotalCents`). Stripe's pass-through (2.9% + $0.30) is untouched
|
|
465
465
|
* because that's not ours to waive. The host applies for Stripe nonprofit
|
|
466
466
|
* pricing directly. When `true`:
|
|
467
467
|
* - `bashPlatformTotalCents` and `guestPlatformLineCents` are both zero
|
|
@@ -480,7 +480,7 @@ export function computeTicketApplicationFeeAmountCents(args: {
|
|
|
480
480
|
bashPassWaivesGuestFee: boolean;
|
|
481
481
|
/**
|
|
482
482
|
* Verified-nonprofit hosts pay no Bash platform fee. Sourced from
|
|
483
|
-
* `isVerifiedNonprofitOrganization()` over the host's Organization row
|
|
483
|
+
* `isVerifiedNonprofitOrganization()` over the host's Organization row.
|
|
484
484
|
* NEVER from `BashEvent.nonProfit`, which is user-entered.
|
|
485
485
|
*/
|
|
486
486
|
isVerifiedNonprofitHost?: boolean;
|
|
@@ -571,9 +571,9 @@ export function getEffectiveBashPassTier(user: {
|
|
|
571
571
|
|
|
572
572
|
/**
|
|
573
573
|
* Remaining BashPass redemptions this billing month.
|
|
574
|
-
* - `0
|
|
575
|
-
* - positive integer
|
|
576
|
-
* - `null
|
|
574
|
+
* - `0`. No BashPass or cap exhausted
|
|
575
|
+
* - positive integer. Spots left
|
|
576
|
+
* - `null`. Unlimited tier (no monthly cap)
|
|
577
577
|
*/
|
|
578
578
|
export function getBashPassMonthlyCapRemaining(user: {
|
|
579
579
|
bashPassTier: BashPassTier | null | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Promoter Competition
|
|
2
|
+
* Promoter Competition. Pure utility functions for the Street Team / Promoter
|
|
3
3
|
* Competition workstream.
|
|
4
4
|
*
|
|
5
|
-
* No side effects, no DB imports
|
|
5
|
+
* No side effects, no DB imports. Safe to import in bash-app (browser) and in api.
|
|
6
6
|
*/
|
|
7
7
|
import { PromoterRewardMode, PromoterRewardType } from '../definitions.js';
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ export interface PromoterMilestoneInput {
|
|
|
21
21
|
export interface PromoterCompetitionEconomics {
|
|
22
22
|
grossPotentialRevenueCents: number;
|
|
23
23
|
maxCashRewardExposureCents: number;
|
|
24
|
-
/** 0
|
|
24
|
+
/** 0 to 100 range; maxCashReward / grossRevenue × 100, rounded to 1 decimal. */
|
|
25
25
|
effectiveAcquisitionCostPct: number;
|
|
26
26
|
/** gross − maxCashReward */
|
|
27
27
|
estimatedNetRevenueCents: number;
|
|
@@ -110,7 +110,7 @@ export function computePromoterCompetitionEconomics(params: {
|
|
|
110
110
|
// Only the highest single threshold reward is effective at once.
|
|
111
111
|
thresholdExposure = Math.max(0, ...thresholdCash.map((m) => m.rewardAmountCents ?? 0));
|
|
112
112
|
} else {
|
|
113
|
-
// ADDITIVE
|
|
113
|
+
// ADDITIVE. Every threshold reward stacks.
|
|
114
114
|
thresholdExposure = thresholdCash.reduce(
|
|
115
115
|
(sum, m) => sum + (m.rewardAmountCents ?? 0),
|
|
116
116
|
0
|
|
@@ -132,7 +132,7 @@ export function computePromoterCompetitionEconomics(params: {
|
|
|
132
132
|
|
|
133
133
|
const estimatedNetRevenueCents = grossPotentialRevenueCents - maxCashRewardExposureCents;
|
|
134
134
|
|
|
135
|
-
// Build rewardBreakdown
|
|
135
|
+
// Build rewardBreakdown. Threshold milestones sorted ascending, rank milestones last.
|
|
136
136
|
const sortedMilestones = [...milestones].sort((a, b) => {
|
|
137
137
|
const aIsRank = a.rank != null;
|
|
138
138
|
const bIsRank = b.rank != null;
|
|
@@ -141,7 +141,7 @@ export function computePromoterCompetitionEconomics(params: {
|
|
|
141
141
|
if (!aIsRank && !bIsRank) {
|
|
142
142
|
return (a.threshold ?? Infinity) - (b.threshold ?? Infinity);
|
|
143
143
|
}
|
|
144
|
-
// Both rank-based
|
|
144
|
+
// Both rank-based. Sort by rank ascending.
|
|
145
145
|
return (a.rank ?? Infinity) - (b.rank ?? Infinity);
|
|
146
146
|
});
|
|
147
147
|
|
|
@@ -168,7 +168,7 @@ const SALES_GOAL_SNAP_POINTS = [25, 50, 75, 100, 150, 200] as const;
|
|
|
168
168
|
/**
|
|
169
169
|
* Suggests a sales goal for the promoter competition wizard.
|
|
170
170
|
*
|
|
171
|
-
* Logic: take 40
|
|
171
|
+
* Logic: take 40 to 60% of remaining capacity (capacity − ticketsSold), then snap
|
|
172
172
|
* to the nearest common benchmark in [25, 50, 75, 100, 150, 200]. Returns null
|
|
173
173
|
* when data is insufficient (null inputs or capacity ≤ 0).
|
|
174
174
|
*/
|
|
@@ -183,7 +183,7 @@ export function suggestPromoterSalesGoal(params: {
|
|
|
183
183
|
const remaining = Math.max(0, capacity - sold);
|
|
184
184
|
if (remaining === 0) return null;
|
|
185
185
|
|
|
186
|
-
// Target the midpoint of 40
|
|
186
|
+
// Target the midpoint of 40 to 60% of remaining.
|
|
187
187
|
const target = remaining * 0.5;
|
|
188
188
|
|
|
189
189
|
// Snap to the nearest benchmark.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Promotion Blast
|
|
2
|
+
* Promotion Blast. On-site partner promos (time-boxed + geofence).
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export type PromotionBlastPackageTierId = "starter" | "standard" | "premium";
|
|
@@ -89,11 +89,11 @@ export function promotionBlastPackageTotalCents(pkg: PromotionBlastPackageTerms)
|
|
|
89
89
|
export function promotionBlastPackageLabel(tierId: PromotionBlastPackageTierId): string {
|
|
90
90
|
switch (tierId) {
|
|
91
91
|
case "starter":
|
|
92
|
-
return "Starter
|
|
92
|
+
return "Starter. 1 time-boxed blast";
|
|
93
93
|
case "standard":
|
|
94
|
-
return "Standard
|
|
94
|
+
return "Standard. 3 blasts + geofence";
|
|
95
95
|
case "premium":
|
|
96
|
-
return "Premium
|
|
96
|
+
return "Premium. Unlimited blasts + geofence";
|
|
97
97
|
default:
|
|
98
98
|
return tierId;
|
|
99
99
|
}
|
package/src/utils/qrCodeUtils.ts
CHANGED
|
@@ -6,7 +6,7 @@ export function bashEventPrismaCheckoutQrCodeUrl(bashEventId: string | undefined
|
|
|
6
6
|
return `${TICKET_DETAILS}/${bashEventId}/${prismaCheckoutId}`;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
/** Builds a **navigable** `/ticket-details/...` URL for QR or links (not the JSON scan-at-door payload
|
|
9
|
+
/** Builds a **navigable** `/ticket-details/...` URL for QR or links (not the JSON scan-at-door payload. See bash-app `encodeTicketQrPayload`). */
|
|
10
10
|
export function bashEventQrCodeUrl(bashEventId: string | undefined | null, ticketTierId?: string | undefined | null, ticketId?: string | undefined | null, slug?: string | undefined | null): string {
|
|
11
11
|
const baseUrl = slug ? generateBashDetailUrl(bashEventId!, slug).replace('/bash/', '/ticket-details/') : `${TICKET_DETAILS}/${bashEventId}`;
|
|
12
12
|
|
|
@@ -26,14 +26,14 @@ export async function createQrCodeImage(qrData: string): Promise<string> {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Door-scan admission QR payload for a ticket
|
|
29
|
+
* Door-scan admission QR payload for a ticket. The same shape the buyer's
|
|
30
30
|
* "show at door" QR encodes (bash-app `MyTicketInlineQr.tsx`, built inline as
|
|
31
31
|
* `checkInData` for `encodeTicketQrPayload`) and what the API's door-verify
|
|
32
32
|
* parser reads (`parseTicketQrScanPayload` in `ticketApi.ts`, which requires
|
|
33
33
|
* string `eventId`/`ticketId` and reads an optional `qrToken`).
|
|
34
34
|
*
|
|
35
35
|
* Server-side callers (e.g. printed ticket artwork) MUST use this so a
|
|
36
|
-
* physical ticket's QR scans identically to the in-app one
|
|
36
|
+
* physical ticket's QR scans identically to the in-app one. No new
|
|
37
37
|
* verification path, no schema changes to `qrToken` handling.
|
|
38
38
|
*/
|
|
39
39
|
export function encodeTicketDoorQrPayload(args: {
|
|
@@ -414,7 +414,7 @@ function getYearlyRecurringDates(
|
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
* For a daily run-of-shows (same start/end clock each night), returns the first and last
|
|
417
|
-
* occurrence instants so UIs can show "Apr 3
|
|
417
|
+
* occurrence instants so UIs can show "Apr 3 to 5" instead of the first day plus "+N more".
|
|
418
418
|
*
|
|
419
419
|
* Returns null unless: Daily interval 1, `endDateTime` on the same calendar day as
|
|
420
420
|
* `startDateTime` (per-show duration), and all generated occurrences are on consecutive
|
|
@@ -11,11 +11,11 @@ export type ReputationActorType = "host" | "service" | "venue" | "artist";
|
|
|
11
11
|
|
|
12
12
|
export interface ReputationSummary {
|
|
13
13
|
actorType: ReputationActorType;
|
|
14
|
-
/** Raw average rating (0
|
|
14
|
+
/** Raw average rating (0 to 5), or null when there isn't enough signal. */
|
|
15
15
|
averageRating: number | null;
|
|
16
16
|
/** Number of ratings behind the average. */
|
|
17
17
|
totalRatings: number;
|
|
18
|
-
/** Bayesian-adjusted score (0
|
|
18
|
+
/** Bayesian-adjusted score (0 to 5) for ranking; null below the minimum. */
|
|
19
19
|
bayesianScore: number | null;
|
|
20
20
|
/** Whether there are enough ratings to show stars publicly. */
|
|
21
21
|
hasEnoughSignal: boolean;
|
|
@@ -26,7 +26,7 @@ export const MIN_RATINGS_FOR_DISPLAY = 3;
|
|
|
26
26
|
|
|
27
27
|
/** Prior strength (how many "virtual" average-rated reviews to blend in). */
|
|
28
28
|
const BAYESIAN_PRIOR_COUNT = 10;
|
|
29
|
-
/** Prior mean
|
|
29
|
+
/** Prior mean. The platform's assumed baseline rating. */
|
|
30
30
|
const BAYESIAN_PRIOR_MEAN = 4.0;
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Optional 1
|
|
1
|
+
/** Optional 1 to 5 dimension rating from API/UI payloads. */
|
|
2
2
|
export type OptionalDimensionRating = number | null | undefined;
|
|
3
3
|
|
|
4
4
|
export interface EventReviewDimensionsInput {
|
|
@@ -32,7 +32,7 @@ export interface ReviewDimensionAverages {
|
|
|
32
32
|
const MIN_DIM = 1;
|
|
33
33
|
const MAX_DIM = 5;
|
|
34
34
|
|
|
35
|
-
/** Validate optional 1
|
|
35
|
+
/** Validate optional 1 to 5 dimension; returns null when omitted. */
|
|
36
36
|
export function parseOptionalDimensionRating(
|
|
37
37
|
value: OptionalDimensionRating,
|
|
38
38
|
fieldName: string
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
describe("defaultMaxBillableCents", () => {
|
|
11
11
|
it("computes 1.5x of expectedAttendees * baseRateCents, rounded up to $10", () => {
|
|
12
|
-
// 200 * $5 * 1.5 = $1500
|
|
12
|
+
// 200 * $5 * 1.5 = $1500. Already a $10 multiple.
|
|
13
13
|
expect(
|
|
14
14
|
defaultMaxBillableCents({ expectedAttendees: 200, baseRateCents: 500 })
|
|
15
15
|
).toBe(150_000);
|
|
@@ -82,7 +82,7 @@ describe("defaultMaxBillableCents", () => {
|
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
it("respects a custom rounding granularity", () => {
|
|
85
|
-
// 200 * 500 * 1.5 = 150,000 cents = $1,500
|
|
85
|
+
// 200 * 500 * 1.5 = 150,000 cents = $1,500. Already a $100 multiple.
|
|
86
86
|
expect(
|
|
87
87
|
defaultMaxBillableCents({
|
|
88
88
|
expectedAttendees: 200,
|
|
@@ -116,7 +116,7 @@ describe("defaultMaxBillableCents", () => {
|
|
|
116
116
|
|
|
117
117
|
describe("defaultMaxBillableBashPoints", () => {
|
|
118
118
|
it("computes the BP parallel of the USD cap, rounded up to nearest 100 BP", () => {
|
|
119
|
-
// 100 * 50 * 1.5 = 7,500
|
|
119
|
+
// 100 * 50 * 1.5 = 7,500. Already a 100-multiple.
|
|
120
120
|
expect(
|
|
121
121
|
defaultMaxBillableBashPoints({
|
|
122
122
|
expectedAttendees: 100,
|
|
@@ -330,7 +330,7 @@ describe("decideEventPromoterCancellation", () => {
|
|
|
330
330
|
expect(result.refundCents).toBe(75_000);
|
|
331
331
|
});
|
|
332
332
|
|
|
333
|
-
it("host: NoRefund once the bash has started
|
|
333
|
+
it("host: NoRefund once the bash has started. Settlement handles money", () => {
|
|
334
334
|
const result = decideEventPromoterCancellation({
|
|
335
335
|
who: "host",
|
|
336
336
|
nowMs: now,
|
|
@@ -67,7 +67,7 @@ function makePackageInput(
|
|
|
67
67
|
const ATTENDEE_OPTION = null as unknown as ServiceAttendeeOption;
|
|
68
68
|
const RANGE_2H = makeRange("2025-07-01T09:00:00Z", "2025-07-01T11:00:00Z");
|
|
69
69
|
|
|
70
|
-
describe("frontendServiceGetPriceToBookFees
|
|
70
|
+
describe("frontendServiceGetPriceToBookFees. Packages", () => {
|
|
71
71
|
it("returns an empty packages array and adds nothing to the subtotal when no packages are given", () => {
|
|
72
72
|
const result = frontendServiceGetPriceToBookFees(
|
|
73
73
|
makeFlatRateAssociation(20000),
|
|
@@ -189,7 +189,7 @@ describe("frontendServiceGetPriceToBookFees — packages", () => {
|
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
191
|
|
|
192
|
-
describe("frontendServiceGetPriceToBook
|
|
192
|
+
describe("frontendServiceGetPriceToBook. Packages", () => {
|
|
193
193
|
it("passes packages through to frontendServiceGetPriceToBookFees", () => {
|
|
194
194
|
const result = frontendServiceGetPriceToBook(makeFlatRateAssociation(20000), {
|
|
195
195
|
addOns: [],
|
|
@@ -29,7 +29,7 @@ describe("isVariablePricingModel", () => {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
describe("computeServiceBookingExposure", () => {
|
|
32
|
-
it("treats null pricingModel as flat
|
|
32
|
+
it("treats null pricingModel as flat. Expected equals worst from totalATBCents", () => {
|
|
33
33
|
const out = computeServiceBookingExposure({
|
|
34
34
|
bookingId: "b1",
|
|
35
35
|
label: "Legacy booking",
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "../serviceBookingStatusUtils";
|
|
18
18
|
import type { ServiceBookingExt } from "../../../extendedSchemas";
|
|
19
19
|
|
|
20
|
-
// Minimal booking factory
|
|
20
|
+
// Minimal booking factory. Only supply the fields each predicate inspects
|
|
21
21
|
function makeBooking(overrides: Partial<ServiceBookingExt> = {}): ServiceBookingExt {
|
|
22
22
|
return {
|
|
23
23
|
id: "b1",
|
|
@@ -135,7 +135,7 @@ describe("serviceBookingHasApprovalDecision", () => {
|
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
// ---------------------------------------------------------------------------
|
|
138
|
-
// Compound predicates
|
|
138
|
+
// Compound predicates. CanBePaid
|
|
139
139
|
// ---------------------------------------------------------------------------
|
|
140
140
|
|
|
141
141
|
describe("serviceBookingCanBePaid", () => {
|
|
@@ -60,10 +60,10 @@ describe("serviceBookingPriceBreakdownGetTypeText", () => {
|
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
// ---------------------------------------------------------------------------
|
|
63
|
-
// serviceBookingCalcDayPriceBreakdown
|
|
63
|
+
// serviceBookingCalcDayPriceBreakdown. Flat rate
|
|
64
64
|
// ---------------------------------------------------------------------------
|
|
65
65
|
|
|
66
|
-
describe("serviceBookingCalcDayPriceBreakdown
|
|
66
|
+
describe("serviceBookingCalcDayPriceBreakdown. Flat rate", () => {
|
|
67
67
|
it("uses flat rate when flatRateCents is set, ignoring hourly", () => {
|
|
68
68
|
const rate = makeRate({ flatRateCents: 50000, hourlyRateCents: 10000 });
|
|
69
69
|
const result = serviceBookingCalcDayPriceBreakdown(RANGE_8H, [rate], false, 8);
|
|
@@ -82,10 +82,10 @@ describe("serviceBookingCalcDayPriceBreakdown — flat rate", () => {
|
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
// ---------------------------------------------------------------------------
|
|
85
|
-
// serviceBookingCalcDayPriceBreakdown
|
|
85
|
+
// serviceBookingCalcDayPriceBreakdown. Hourly rate
|
|
86
86
|
// ---------------------------------------------------------------------------
|
|
87
87
|
|
|
88
|
-
describe("serviceBookingCalcDayPriceBreakdown
|
|
88
|
+
describe("serviceBookingCalcDayPriceBreakdown. Hourly rate", () => {
|
|
89
89
|
it("calculates hourly total correctly", () => {
|
|
90
90
|
const rate = makeRate({ hourlyRateCents: 5000 });
|
|
91
91
|
const result = serviceBookingCalcDayPriceBreakdown(RANGE_8H, [rate], false, 3);
|
|
@@ -103,10 +103,10 @@ describe("serviceBookingCalcDayPriceBreakdown — hourly rate", () => {
|
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
// ---------------------------------------------------------------------------
|
|
106
|
-
// serviceBookingCalcDayPriceBreakdown
|
|
106
|
+
// serviceBookingCalcDayPriceBreakdown. Daily rate
|
|
107
107
|
// ---------------------------------------------------------------------------
|
|
108
108
|
|
|
109
|
-
describe("serviceBookingCalcDayPriceBreakdown
|
|
109
|
+
describe("serviceBookingCalcDayPriceBreakdown. Daily rate", () => {
|
|
110
110
|
it("calculates daily total based on full-day slots", () => {
|
|
111
111
|
const rate = makeRate({ dailyRateCents: 40000 });
|
|
112
112
|
// 16 hours = floor(16/8) = 2 days
|