@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* badgeUtils
|
|
2
|
+
* badgeUtils. Host level / temp-badge helpers.
|
|
3
3
|
*
|
|
4
4
|
* The level-badge calculation is the public reputation signal on every host
|
|
5
5
|
* profile. A bug here either over- or under-credits a host (= unfair / loss
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import type { UserTemporaryBadge } from "../../definitions.js";
|
|
23
23
|
|
|
24
24
|
// ============================================================================
|
|
25
|
-
// getLevelBadgeById / getTemporaryBadgeById
|
|
25
|
+
// getLevelBadgeById / getTemporaryBadgeById. Registry lookups
|
|
26
26
|
// ============================================================================
|
|
27
27
|
|
|
28
28
|
describe("getLevelBadgeById", () => {
|
|
@@ -88,7 +88,7 @@ describe("isTemporaryBadgeExpired", () => {
|
|
|
88
88
|
|
|
89
89
|
it("returns true when expiresOn is RIGHT NOW (boundary: not strictly in the future)", () => {
|
|
90
90
|
// Source uses `expiryDate < currentDate`. A simultaneous tick = false (not expired),
|
|
91
|
-
// but Date.now() inside the function is sampled later than ours
|
|
91
|
+
// but Date.now() inside the function is sampled later than ours. Which is enough
|
|
92
92
|
// to flip <. We pin the practical observable: "earlier than now → expired".
|
|
93
93
|
const past = new Date(Date.now() - 1).toISOString();
|
|
94
94
|
const badge: UserTemporaryBadge = {
|
|
@@ -130,10 +130,10 @@ describe("filterExpiredTemporaryBadges", () => {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
// ============================================================================
|
|
133
|
-
// determineLevelBadge
|
|
133
|
+
// determineLevelBadge. The reputation ladder
|
|
134
134
|
// ============================================================================
|
|
135
135
|
|
|
136
|
-
describe("determineLevelBadge
|
|
136
|
+
describe("determineLevelBadge. Host reputation ladder", () => {
|
|
137
137
|
it("returns null when the host has no events", () => {
|
|
138
138
|
expect(determineLevelBadge(0, 5)).toBeNull();
|
|
139
139
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* bashPointsPaymentUtils
|
|
2
|
+
* bashPointsPaymentUtils. Earning math + display + deprecated stubs.
|
|
3
3
|
*
|
|
4
4
|
* BashPoints are loyalty cashback. The active code paths are:
|
|
5
5
|
* - calculateBashPointsCashback(amountCents, rate) → integer points
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* The "service booking" overloads were intentionally deprecated because
|
|
9
9
|
* BashPoints have no fixed dollar value and cannot pay for services. We pin
|
|
10
10
|
* the deprecated stubs here so they stay benign (return safe defaults, log a
|
|
11
|
-
* warning)
|
|
11
|
+
* warning). Accidentally re-enabling them would cause real money loss.
|
|
12
12
|
*/
|
|
13
13
|
import {
|
|
14
14
|
formatBashPoints,
|
|
@@ -39,7 +39,7 @@ describe("formatBashPoints", () => {
|
|
|
39
39
|
expect(formatBashPoints(1_000_000)).toBe("1,000,000 points");
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
it("formats negative values (defensive
|
|
42
|
+
it("formats negative values (defensive. Should never happen but no throw)", () => {
|
|
43
43
|
// -1 !== 1 so it gets the plural suffix
|
|
44
44
|
expect(formatBashPoints(-5)).toBe("-5 points");
|
|
45
45
|
});
|
|
@@ -78,7 +78,7 @@ describe("calculateBashPointsCashback", () => {
|
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
describe("DEPRECATED stubs
|
|
81
|
+
describe("DEPRECATED stubs. Must remain safe defaults", () => {
|
|
82
82
|
let warnSpy: jest.SpyInstance;
|
|
83
83
|
|
|
84
84
|
beforeEach(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* contentFilterUtils
|
|
2
|
+
* contentFilterUtils. Anti-fee-evasion content moderation.
|
|
3
3
|
*
|
|
4
4
|
* Strategic context: hosts can lose Bash money (and break ToS) by telling
|
|
5
5
|
* attendees "DM me on Venmo to pay" instead of using the platform's payment
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
} from "../contentFilterUtils.js";
|
|
28
28
|
|
|
29
29
|
// ============================================================================
|
|
30
|
-
// filterContent
|
|
30
|
+
// filterContent. Defensive input handling
|
|
31
31
|
// ============================================================================
|
|
32
32
|
|
|
33
|
-
describe("filterContent
|
|
33
|
+
describe("filterContent. Defensive input handling", () => {
|
|
34
34
|
it("returns clean for empty / null / non-string input without throwing", () => {
|
|
35
35
|
expect(filterContent("")).toEqual({
|
|
36
36
|
isClean: true,
|
|
@@ -69,10 +69,10 @@ describe("filterContent — defensive input handling", () => {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
// ============================================================================
|
|
72
|
-
// filterContent
|
|
72
|
+
// filterContent. P2P payment service detection (the core money use case)
|
|
73
73
|
// ============================================================================
|
|
74
74
|
|
|
75
|
-
describe("filterContent
|
|
75
|
+
describe("filterContent. Direct P2P payment service mentions", () => {
|
|
76
76
|
it.each([
|
|
77
77
|
["venmo", "Venmo"],
|
|
78
78
|
["zelle", "Zelle"],
|
|
@@ -111,10 +111,10 @@ describe("filterContent — direct P2P payment service mentions", () => {
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
// ============================================================================
|
|
114
|
-
// filterContent
|
|
114
|
+
// filterContent. Leetspeak / dot-separator bypass attempts
|
|
115
115
|
// ============================================================================
|
|
116
116
|
|
|
117
|
-
describe("filterContent
|
|
117
|
+
describe("filterContent. Bypass attempts (leetspeak, dot-separators)", () => {
|
|
118
118
|
it("catches dot-separated 'v.e.n.m.o'", () => {
|
|
119
119
|
const result = filterContent("Send to v.e.n.m.o please");
|
|
120
120
|
expect(result.isClean).toBe(false);
|
|
@@ -136,7 +136,7 @@ describe("filterContent — bypass attempts (leetspeak, dot-separators)", () =>
|
|
|
136
136
|
expect(result.isClean).toBe(false);
|
|
137
137
|
// 'v3nm0' matches both the literal P2P pattern (recorded as p2p_payment / low)
|
|
138
138
|
// AND the phonetic pattern (recorded as bypass_attempt / high). We assert the
|
|
139
|
-
// phonetic / high entry exists
|
|
139
|
+
// phonetic / high entry exists. That's the one that drives enforcement.
|
|
140
140
|
const phoneticHigh = result.violations.find(
|
|
141
141
|
(v) =>
|
|
142
142
|
v.match === "v3nm0" &&
|
|
@@ -157,10 +157,10 @@ describe("filterContent — bypass attempts (leetspeak, dot-separators)", () =>
|
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
// ============================================================================
|
|
160
|
-
// filterContent
|
|
160
|
+
// filterContent. High-severity contact info (handles, phones, emails)
|
|
161
161
|
// ============================================================================
|
|
162
162
|
|
|
163
|
-
describe("filterContent
|
|
163
|
+
describe("filterContent. High-severity contact info patterns", () => {
|
|
164
164
|
it("flags '@handle' style mentions as high severity (Venmo handle)", () => {
|
|
165
165
|
const result = filterContent("DM @cooluser123");
|
|
166
166
|
const handleMatch = result.violations.find((v) =>
|
|
@@ -199,7 +199,7 @@ describe("filterContent — high-severity contact info patterns", () => {
|
|
|
199
199
|
it("DOES detect parenthesized US phone numbers, but classifies them as 'low' (known gap in getSeverity)", () => {
|
|
200
200
|
// The pattern /\(\d{3}\)\s*\d{3}[-.]?\d{4}/ matches "(415) 555-0123",
|
|
201
201
|
// but getSeverity's high-severity heuristic uses /\d{3}[-.]?\d{3}[-.]?\d{4}/
|
|
202
|
-
// which doesn't allow ')' between the area code and prefix
|
|
202
|
+
// which doesn't allow ')' between the area code and prefix. So this gets 'low'.
|
|
203
203
|
// This test pins that behavior so a future tightening of getSeverity is intentional.
|
|
204
204
|
const result = filterContent("(415) 555-0123");
|
|
205
205
|
const phoneViolation = result.violations.find((v) =>
|
|
@@ -227,10 +227,10 @@ describe("filterContent — high-severity contact info patterns", () => {
|
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
// ============================================================================
|
|
230
|
-
// filterContent
|
|
230
|
+
// filterContent. Bypass phrasing (DM me, contact me directly, etc.)
|
|
231
231
|
// ============================================================================
|
|
232
232
|
|
|
233
|
-
describe("filterContent
|
|
233
|
+
describe("filterContent. Bypass phrasing", () => {
|
|
234
234
|
it.each([
|
|
235
235
|
"dm me for payment",
|
|
236
236
|
"message me to pay",
|
|
@@ -266,10 +266,10 @@ describe("filterContent — bypass phrasing", () => {
|
|
|
266
266
|
});
|
|
267
267
|
|
|
268
268
|
// ============================================================================
|
|
269
|
-
// filterContent
|
|
269
|
+
// filterContent. Overall severity bubbling
|
|
270
270
|
// ============================================================================
|
|
271
271
|
|
|
272
|
-
describe("filterContent
|
|
272
|
+
describe("filterContent. Overall severity rollup", () => {
|
|
273
273
|
it("returns 'low' overall severity for clean content", () => {
|
|
274
274
|
expect(filterContent("Have a great party").severity).toBe("low");
|
|
275
275
|
});
|
|
@@ -287,7 +287,7 @@ describe("filterContent — overall severity rollup", () => {
|
|
|
287
287
|
|
|
288
288
|
it("escalates to 'high' overall when a brand mention also trips the phonetic pattern", () => {
|
|
289
289
|
// 'venmo' is matched by BOTH /venmo/gi (low p2p_payment)
|
|
290
|
-
// AND /v[e3][n][m][o0]/gi (high bypass_attempt)
|
|
290
|
+
// AND /v[e3][n][m][o0]/gi (high bypass_attempt). So the rollup is high.
|
|
291
291
|
// This documents that even a casual "we accept venmo" is treated as high.
|
|
292
292
|
const result = filterContent("we accept venmo");
|
|
293
293
|
expect(result.severity).toBe("high");
|
|
@@ -295,10 +295,10 @@ describe("filterContent — overall severity rollup", () => {
|
|
|
295
295
|
});
|
|
296
296
|
|
|
297
297
|
// ============================================================================
|
|
298
|
-
// filterContent
|
|
298
|
+
// filterContent. CleanedContent masking
|
|
299
299
|
// ============================================================================
|
|
300
300
|
|
|
301
|
-
describe("filterContent
|
|
301
|
+
describe("filterContent. CleanedContent masking", () => {
|
|
302
302
|
it("replaces every matched substring with the same number of asterisks", () => {
|
|
303
303
|
const result = filterContent("Hit me on venmo");
|
|
304
304
|
expect(result.cleanedContent).toBe("Hit me on *****");
|
|
@@ -317,7 +317,7 @@ describe("filterContent — cleanedContent masking", () => {
|
|
|
317
317
|
});
|
|
318
318
|
|
|
319
319
|
// ============================================================================
|
|
320
|
-
// isContentClean
|
|
320
|
+
// isContentClean. Fast-path predicate
|
|
321
321
|
// ============================================================================
|
|
322
322
|
|
|
323
323
|
describe("isContentClean", () => {
|
|
@@ -349,7 +349,7 @@ describe("isContentClean", () => {
|
|
|
349
349
|
});
|
|
350
350
|
|
|
351
351
|
// ============================================================================
|
|
352
|
-
// filterMultipleFields
|
|
352
|
+
// filterMultipleFields. Bulk validation
|
|
353
353
|
// ============================================================================
|
|
354
354
|
|
|
355
355
|
describe("filterMultipleFields", () => {
|
|
@@ -396,7 +396,7 @@ describe("filterMultipleFields", () => {
|
|
|
396
396
|
});
|
|
397
397
|
|
|
398
398
|
// ============================================================================
|
|
399
|
-
// getViolationMessage
|
|
399
|
+
// getViolationMessage. User-facing copy
|
|
400
400
|
// ============================================================================
|
|
401
401
|
|
|
402
402
|
describe("getViolationMessage", () => {
|
|
@@ -458,10 +458,10 @@ describe("getViolationMessage", () => {
|
|
|
458
458
|
});
|
|
459
459
|
|
|
460
460
|
// ============================================================================
|
|
461
|
-
// shouldWarnUser
|
|
461
|
+
// shouldWarnUser. Tier-aware action mapping (the actual gate)
|
|
462
462
|
// ============================================================================
|
|
463
463
|
|
|
464
|
-
describe("shouldWarnUser
|
|
464
|
+
describe("shouldWarnUser. Tier-aware enforcement", () => {
|
|
465
465
|
it("returns 'allow' with empty message when there are no violations", () => {
|
|
466
466
|
expect(shouldWarnUser([], "Basic")).toEqual({
|
|
467
467
|
action: "allow",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* displayDateUtils
|
|
2
|
+
* displayDateUtils. UI date formatting (browser local timezone).
|
|
3
3
|
*
|
|
4
4
|
* These two helpers feed every "card date" / "long form date" string in the
|
|
5
5
|
* app. Any regression here ripples across feed cards, ticket emails (preview),
|
|
@@ -149,7 +149,7 @@ describe("flyerUtils", () => {
|
|
|
149
149
|
expect(distanceMiles(40.7, -112, 40.7, -112)).toBe(0);
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
it("distanceMiles SLC to Provo is in plausible range (~35
|
|
152
|
+
it("distanceMiles SLC to Provo is in plausible range (~35 to 50 mi)", () => {
|
|
153
153
|
const mi = distanceMiles(40.7608, -111.891, 40.2338, -111.6585);
|
|
154
154
|
expect(mi).toBeGreaterThan(30);
|
|
155
155
|
expect(mi).toBeLessThan(55);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* getBackendHost
|
|
2
|
+
* getBackendHost. Chooses the API origin (api.bash.community vs Vite dev same-origin
|
|
3
3
|
* vs the bundled API_HOST for native Capacitor builds).
|
|
4
4
|
*
|
|
5
5
|
* This file pins the contract so a future "let's tidy up env handling" change
|
|
@@ -42,7 +42,7 @@ afterEach(() => {
|
|
|
42
42
|
clearWindow();
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
describe("getBackendHost
|
|
45
|
+
describe("getBackendHost. Local dev (Vite NODE_ENV=development)", () => {
|
|
46
46
|
let origNodeEnv: string | undefined;
|
|
47
47
|
|
|
48
48
|
beforeAll(() => {
|
|
@@ -88,7 +88,7 @@ describe("getBackendHost — local dev (Vite NODE_ENV=development)", () => {
|
|
|
88
88
|
expect(getBackendHost()).toBe("http://192.168.1.42:3000");
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
-
it("matches page origin when Vite listens on PORT=3500
|
|
91
|
+
it("matches page origin when Vite listens on PORT=3500. Set VITE_API_PROXY_TARGET so /api proxies to Express (not the same TCP port)", () => {
|
|
92
92
|
setWindow({
|
|
93
93
|
protocol: "http:",
|
|
94
94
|
hostname: "localhost",
|
|
@@ -99,7 +99,7 @@ describe("getBackendHost — local dev (Vite NODE_ENV=development)", () => {
|
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
describe("getBackendHost
|
|
102
|
+
describe("getBackendHost. Local non-dev (e.g. jest NODE_ENV=test)", () => {
|
|
103
103
|
it("falls back to canonical API port :3500 when not in Vite development bundle", () => {
|
|
104
104
|
const orig = process.env.NODE_ENV;
|
|
105
105
|
process.env.NODE_ENV = "test";
|
|
@@ -118,11 +118,11 @@ describe("getBackendHost — local non-dev (e.g. jest NODE_ENV=test)", () => {
|
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
describe("getBackendHost
|
|
121
|
+
describe("getBackendHost. Deployed web", () => {
|
|
122
122
|
// For deployed web, getBackendHost falls back to API_HOST (compiled in from
|
|
123
123
|
// process.env.REACT_APP_API at bundle time; defaults to http://localhost:3500
|
|
124
124
|
// when unset, which is what jest sees here). The contract we pin is "for any
|
|
125
|
-
// non-local hostname, do NOT derive the API URL from window.location"
|
|
125
|
+
// non-local hostname, do NOT derive the API URL from window.location". That
|
|
126
126
|
// would silently route prod browsers at api.bash.community… instead of the
|
|
127
127
|
// configured API_HOST.
|
|
128
128
|
it("does not derive the backend host from window.location for deployed sites", () => {
|
|
@@ -149,7 +149,7 @@ describe("getBackendHost — deployed web", () => {
|
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
describe("getBackendHost
|
|
152
|
+
describe("getBackendHost. Capacitor native (iOS / Android)", () => {
|
|
153
153
|
it("uses the bundled API_HOST when running inside a Capacitor WebView (hostname is 'localhost' but it's not really local dev)", () => {
|
|
154
154
|
// Capacitor loads from a localhost-like origin inside the WebView. If we
|
|
155
155
|
// routed to the localhost dev API based on hostname alone, the app would
|
|
@@ -171,7 +171,7 @@ describe("getBackendHost — Capacitor native (iOS / Android)", () => {
|
|
|
171
171
|
});
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
describe("getFrontendHost
|
|
174
|
+
describe("getFrontendHost. Capacitor native (iOS / Android)", () => {
|
|
175
175
|
it("uses the public web host instead of the WebView localhost origin", () => {
|
|
176
176
|
setWindow(
|
|
177
177
|
{
|
|
@@ -39,7 +39,7 @@ afterEach(() => {
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
describe("getFrontendHost
|
|
42
|
+
describe("getFrontendHost. Native public URL contract", () => {
|
|
43
43
|
it("returns bash.community for a Capacitor localhost WebView", async () => {
|
|
44
44
|
setWindow(
|
|
45
45
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* getFrontendHost
|
|
2
|
+
* getFrontendHost. The single source of truth for the URL prefix that goes
|
|
3
3
|
* into every shareable Bash link (SharePopup, embed snippets, LinkedIn
|
|
4
4
|
* Announce, Facebook event helper, QR codes…).
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* ----------------------
|
|
8
8
|
* Pre-fix, getFrontendHost() called isProduction() which inspects
|
|
9
9
|
* process.env.ENVIRONMENT / BASH_ENV / NODE_ENV. Those env vars are server-
|
|
10
|
-
* only
|
|
10
|
+
* only. Vite's envPlugin only inlines REACT_APP_* / VITE_* / NODE_ENV /
|
|
11
11
|
* PUBLIC_URL into the browser bundle. As a result, in the production browser
|
|
12
12
|
* `process.env.ENVIRONMENT` is undefined → isProduction() returns false →
|
|
13
13
|
* getFrontendHost() falls into the dev branch → appends ":3000" to whatever
|
|
@@ -60,7 +60,7 @@ afterEach(() => {
|
|
|
60
60
|
// PRODUCTION (the regression we're fixing)
|
|
61
61
|
// ============================================================================
|
|
62
62
|
|
|
63
|
-
describe("getFrontendHost
|
|
63
|
+
describe("getFrontendHost. Production (the share-link bug)", () => {
|
|
64
64
|
it("returns 'https://bash.community' for the production domain (NO :3000)", () => {
|
|
65
65
|
setLocation({
|
|
66
66
|
protocol: "https:",
|
|
@@ -132,7 +132,7 @@ describe("getFrontendHost — production (the share-link bug)", () => {
|
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
it("preserves an EXPLICIT non-default port if the deployed site is running on one", () => {
|
|
135
|
-
// (uncommon but legal
|
|
135
|
+
// (uncommon but legal. E.g. preview deploy on :8080)
|
|
136
136
|
setLocation({
|
|
137
137
|
protocol: "https:",
|
|
138
138
|
hostname: "preview.bash.community",
|
|
@@ -147,7 +147,7 @@ describe("getFrontendHost — production (the share-link bug)", () => {
|
|
|
147
147
|
// LOCAL DEV (must keep working)
|
|
148
148
|
// ============================================================================
|
|
149
149
|
|
|
150
|
-
describe("getFrontendHost
|
|
150
|
+
describe("getFrontendHost. Local development", () => {
|
|
151
151
|
it("returns http://localhost:3000 for hostname=localhost", () => {
|
|
152
152
|
setLocation({
|
|
153
153
|
protocol: "http:",
|
|
@@ -180,10 +180,10 @@ describe("getFrontendHost — local development", () => {
|
|
|
180
180
|
});
|
|
181
181
|
|
|
182
182
|
// ============================================================================
|
|
183
|
-
// NGROK / TUNNELS (deployed-equivalent
|
|
183
|
+
// NGROK / TUNNELS (deployed-equivalent. Should NOT get :3000)
|
|
184
184
|
// ============================================================================
|
|
185
185
|
|
|
186
|
-
describe("getFrontendHost
|
|
186
|
+
describe("getFrontendHost. Ngrok / public tunnels", () => {
|
|
187
187
|
it("does NOT append :3000 to an ngrok-free.dev tunnel hostname", () => {
|
|
188
188
|
// ngrok forwards port 443 publicly to the local :3000; the link Facebook
|
|
189
189
|
// crawls must hit the public 443, never the local 3000.
|
|
@@ -211,7 +211,7 @@ describe("getFrontendHost — ngrok / public tunnels", () => {
|
|
|
211
211
|
// SHARE-URL ASSEMBLY (the exact concatenation SharePopup performs)
|
|
212
212
|
// ============================================================================
|
|
213
213
|
|
|
214
|
-
describe("getFrontendHost
|
|
214
|
+
describe("getFrontendHost. Composed share URL (SharePopup integration)", () => {
|
|
215
215
|
it("composes the canonical share URL Facebook can crawl", () => {
|
|
216
216
|
setLocation({
|
|
217
217
|
protocol: "https:",
|
|
@@ -226,7 +226,7 @@ describe("getFrontendHost — composed share URL (SharePopup integration)", () =
|
|
|
226
226
|
expect(fullShareUrl).toBe(
|
|
227
227
|
"https://bash.community/bash/evt_123-empanada-fest-slc"
|
|
228
228
|
);
|
|
229
|
-
// Hard guard
|
|
229
|
+
// Hard guard. This is the literal regression we're preventing.
|
|
230
230
|
expect(fullShareUrl).not.toMatch(/bash\.community:3000/);
|
|
231
231
|
});
|
|
232
232
|
});
|
|
@@ -77,7 +77,7 @@ describe("organizationHasCustomDomainAccess", () => {
|
|
|
77
77
|
expect(organizationHasCustomDomainAccess(undefined)).toBe(false);
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
test("Growth is not entitled
|
|
80
|
+
test("Growth is not entitled. Custom domains stay Enterprise-only", () => {
|
|
81
81
|
expect(
|
|
82
82
|
organizationHasCustomDomainAccess({
|
|
83
83
|
subscriptionTier: "Growth",
|
|
@@ -159,7 +159,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
159
159
|
expect(r.performerCommissionCents).toBe(0);
|
|
160
160
|
});
|
|
161
161
|
|
|
162
|
-
test("computeTicketApplicationFeeAmountCents
|
|
162
|
+
test("computeTicketApplicationFeeAmountCents. Explicit isVerifiedNonprofitHost: false matches default", () => {
|
|
163
163
|
const baseArgs = {
|
|
164
164
|
discountedSubtotalCents: 10000,
|
|
165
165
|
platformFeeEnabled: true,
|
|
@@ -175,7 +175,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
175
175
|
expect(explicitFalse).toEqual(defaulted);
|
|
176
176
|
});
|
|
177
177
|
|
|
178
|
-
test("computeTicketApplicationFeeAmountCents
|
|
178
|
+
test("computeTicketApplicationFeeAmountCents. Verified nonprofit host: zero Bash platform, guest may pay processing when GuestPays", () => {
|
|
179
179
|
const r = computeTicketApplicationFeeAmountCents({
|
|
180
180
|
discountedSubtotalCents: 10000,
|
|
181
181
|
platformFeeEnabled: true,
|
|
@@ -198,7 +198,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
198
198
|
expect(r.applicationFeeAmountCents).toBe(r.stripeProcessingCents);
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
-
test("computeTicketApplicationFeeAmountCents
|
|
201
|
+
test("computeTicketApplicationFeeAmountCents. Verified nonprofit waiver overrides platform on GuestPays", () => {
|
|
202
202
|
const nonNonprofit = computeTicketApplicationFeeAmountCents({
|
|
203
203
|
discountedSubtotalCents: 5000,
|
|
204
204
|
platformFeeEnabled: true,
|
|
@@ -236,7 +236,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
236
236
|
);
|
|
237
237
|
});
|
|
238
238
|
|
|
239
|
-
test("computeTicketApplicationFeeAmountCents
|
|
239
|
+
test("computeTicketApplicationFeeAmountCents. Verified nonprofit waiver beats any membership-tier math", () => {
|
|
240
240
|
const tierCases = [
|
|
241
241
|
{ feeHandling: "HostAbsorbs" as const, bashPassWaivesGuestFee: false },
|
|
242
242
|
{ feeHandling: "Split" as const, bashPassWaivesGuestFee: false },
|
|
@@ -268,7 +268,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
268
268
|
}
|
|
269
269
|
});
|
|
270
270
|
|
|
271
|
-
test("computeTicketApplicationFeeAmountCents
|
|
271
|
+
test("computeTicketApplicationFeeAmountCents. Verified nonprofit + platformFeeEnabled=false still zeroes the take", () => {
|
|
272
272
|
const r = computeTicketApplicationFeeAmountCents({
|
|
273
273
|
discountedSubtotalCents: 2500,
|
|
274
274
|
platformFeeEnabled: false,
|
|
@@ -460,7 +460,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
460
460
|
});
|
|
461
461
|
|
|
462
462
|
describe("guest ticket checkout breakdown (No Platform Fees. Free for Everyone.)", () => {
|
|
463
|
-
test("HostAbsorbs
|
|
463
|
+
test("HostAbsorbs. $20 ticket → $20 due, no processing line", () => {
|
|
464
464
|
const r = computeGuestTicketCheckoutBreakdown({
|
|
465
465
|
discountedSubtotalCents: 2000,
|
|
466
466
|
platformFeeEnabled: false,
|
|
@@ -473,7 +473,7 @@ describe("PaymentUtils - Core Functions", () => {
|
|
|
473
473
|
expect(r.totalDueCents).toBe(2000);
|
|
474
474
|
});
|
|
475
475
|
|
|
476
|
-
test("GuestPays
|
|
476
|
+
test("GuestPays. $20 ticket → $20.88 all-in with processing line on subtotal", () => {
|
|
477
477
|
const processing = calculateStripeProcessingFeeCents(2000);
|
|
478
478
|
expect(processing).toBe(88);
|
|
479
479
|
const r = computeGuestTicketCheckoutBreakdown({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* promoCodesUtils
|
|
2
|
+
* promoCodesUtils. Locate / aggregate / re-distribute promo codes across a
|
|
3
3
|
* BashEvent's ticket tiers.
|
|
4
4
|
*
|
|
5
5
|
* These three helpers are tiny but they sit on the path between checkout
|
|
@@ -101,7 +101,7 @@ describe("findPromoCodeFromBashEvent", () => {
|
|
|
101
101
|
expect(findPromoCodeFromBashEvent(bash, "p2")).toBe(promo);
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
it("returns the FIRST match if the same id appears on multiple tiers (defensive
|
|
104
|
+
it("returns the FIRST match if the same id appears on multiple tiers (defensive. Shouldn't happen but guard the order)", () => {
|
|
105
105
|
const dupOnT1 = makePromo("dup", "t1");
|
|
106
106
|
const dupOnT2 = makePromo("dup", "t2");
|
|
107
107
|
const bash = makeBashEvent([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* qrCodeUtils
|
|
2
|
+
* qrCodeUtils. URL builders for the *navigable* `/ticket-details` deep
|
|
3
3
|
* links that get encoded into ticket QR codes (and createQrCodeImage that
|
|
4
4
|
* renders them as PNG data URLs).
|
|
5
5
|
*
|
|
@@ -31,7 +31,7 @@ jest.mock("qrcode", () => ({
|
|
|
31
31
|
}));
|
|
32
32
|
|
|
33
33
|
// ============================================================================
|
|
34
|
-
// bashEventPrismaCheckoutQrCodeUrl
|
|
34
|
+
// bashEventPrismaCheckoutQrCodeUrl. Checkout-id deep link
|
|
35
35
|
// ============================================================================
|
|
36
36
|
|
|
37
37
|
describe("bashEventPrismaCheckoutQrCodeUrl", () => {
|
|
@@ -54,7 +54,7 @@ describe("bashEventPrismaCheckoutQrCodeUrl", () => {
|
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
// ============================================================================
|
|
57
|
-
// bashEventQrCodeUrl
|
|
57
|
+
// bashEventQrCodeUrl. Base / tier / ticket / slug variants
|
|
58
58
|
// ============================================================================
|
|
59
59
|
|
|
60
60
|
describe("bashEventQrCodeUrl", () => {
|
|
@@ -122,7 +122,7 @@ describe("bashEventQrCodeUrl", () => {
|
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
// ============================================================================
|
|
125
|
-
// createQrCodeImage
|
|
125
|
+
// createQrCodeImage. PNG data URL
|
|
126
126
|
// ============================================================================
|
|
127
127
|
|
|
128
128
|
describe("createQrCodeImage", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* stripeAccountUtils
|
|
2
|
+
* stripeAccountUtils. The gate that decides whether a host can accept money.
|
|
3
3
|
*
|
|
4
4
|
* `stripeAccountFullyLinked` returns `true` ONLY when ALL FOUR of these are true:
|
|
5
5
|
* - linkingStatus is non-null
|
|
@@ -59,7 +59,7 @@ describe("ticketPrintPostageUtils", () => {
|
|
|
59
59
|
deliveryMethod: TicketDeliveryMethod.PhysicalMail,
|
|
60
60
|
status: TicketPrintOrderStatus.Failed,
|
|
61
61
|
})
|
|
62
|
-
).toBe("Physical ticket delivery failed
|
|
62
|
+
).toBe("Physical ticket delivery failed. Contact the host");
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
it.each([
|
|
@@ -244,7 +244,7 @@ export async function getAddressFromCoordinates( lat: number, lng: number ): Pro
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
// Place is intentionally empty here
|
|
247
|
+
// Place is intentionally empty here. Only filled when user picks a Place in Maps UI or types it.
|
|
248
248
|
return { place: "", street, city, state, zipCode, country: "USA" };
|
|
249
249
|
} else {
|
|
250
250
|
throw new Error("No address found");
|
package/src/utils/apiUtils.ts
CHANGED
|
@@ -61,7 +61,7 @@ export function getUserImage(
|
|
|
61
61
|
return uploaded;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// If only one image exists, return it (never return ""
|
|
64
|
+
// If only one image exists, return it (never return "". That breaks <img src="">)
|
|
65
65
|
return uploaded ?? googleImg ?? noProfilePicture;
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared Quality of Experience math for birthday freebie catalog offers.
|
|
3
|
-
* Vote tiers map to star bands; the displayed score is a weighted average of band midpoints (0
|
|
3
|
+
* Vote tiers map to star bands; the displayed score is a weighted average of band midpoints (0 to 5).
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export type BirthdayExperienceVoteTier = "Awesome" | "Okay" | "Lame";
|
|
@@ -15,9 +15,9 @@ export const EXPERIENCE_STAR_BANDS: Record<
|
|
|
15
15
|
BirthdayExperienceVoteTier,
|
|
16
16
|
{ min: number; max: number; label: string }
|
|
17
17
|
> = {
|
|
18
|
-
Lame: { min: 0, max: 1.999, label: "0
|
|
19
|
-
Okay: { min: 2.0, max: 3.499, label: "2.0
|
|
20
|
-
Awesome: { min: 3.5, max: 5.0, label: "3.5
|
|
18
|
+
Lame: { min: 0, max: 1.999, label: "0 to 2.0" },
|
|
19
|
+
Okay: { min: 2.0, max: 3.499, label: "2.0 to 3.5" },
|
|
20
|
+
Awesome: { min: 3.5, max: 5.0, label: "3.5 to 5.0" },
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const MIDPOINT: Record<BirthdayExperienceVoteTier, number> = {
|
package/src/utils/blogUtils.ts
CHANGED
|
@@ -22,7 +22,7 @@ export function getBlogDetailUrl(blogId: string, slug?: string, title?: string):
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
/** Prisma default IDs are CUID / CUID2-like: start with `c`, 21
|
|
25
|
+
/** Prisma default IDs are CUID / CUID2-like: start with `c`, 21 to 33 chars. */
|
|
26
26
|
export function looksLikePrismaCuid(id: string): boolean {
|
|
27
27
|
return /^c[a-z0-9]{20,32}$/i.test(id);
|
|
28
28
|
}
|
|
@@ -41,7 +41,7 @@ export function parseBlogUrlParams(blogIdSlug: string): { id: string; slug?: str
|
|
|
41
41
|
const slug = blogIdSlug.substring(hyphenIndex + 1);
|
|
42
42
|
|
|
43
43
|
// Sitemap and SPA links use `/blog/:slug`. Only split id-slug when the
|
|
44
|
-
// prefix is a Prisma CUID
|
|
44
|
+
// prefix is a Prisma CUID. Otherwise "bash-community-vs-eventbrite"
|
|
45
45
|
// would be parsed as id "bash".
|
|
46
46
|
if (looksLikePrismaCuid(id)) {
|
|
47
47
|
return { id, slug };
|
|
@@ -58,7 +58,7 @@ export const calculatePromoCodeDiscount = (
|
|
|
58
58
|
amountDiscounted,
|
|
59
59
|
originalPrice: originalTotal,
|
|
60
60
|
finalPrice,
|
|
61
|
-
// Attribution = promoter's User id only (never Promoter row id
|
|
61
|
+
// Attribution = promoter's User id only (never Promoter row id. Breaks dashboards).
|
|
62
62
|
// Omit if promoter pending signup (no userId yet) or relation not loaded.
|
|
63
63
|
...(promoCode.promoterId &&
|
|
64
64
|
promoCode.promoter?.userId && {
|