@bash-app/bash-common 30.368.0 → 30.371.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/accessScreening.js +1 -0
- package/dist/aiApproval.js +1 -0
- package/dist/aiEventPlan.js +1 -0
- package/dist/bashFeedTypes.js +1 -0
- package/dist/bookingIntent.js +1 -0
- package/dist/causeTags.js +1 -0
- package/dist/entertainmentNotableVenues.js +1 -0
- package/dist/groupTicketUtils.js +1 -0
- package/dist/guestPartySize.js +1 -0
- package/dist/hostCrmAutomation.js +1 -0
- package/dist/hostCrmConstants.js +1 -0
- package/dist/hostCrmInsights.js +1 -0
- package/dist/hostCrmSegments.js +1 -0
- package/dist/icebreakerPrompts.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/influencerAudience.js +1 -0
- package/dist/legalTemplates.js +1 -0
- package/dist/liveActivity/liveActivityTypes.d.ts +59 -0
- package/dist/liveActivity/liveActivityTypes.d.ts.map +1 -0
- package/dist/liveActivity/liveActivityTypes.js +27 -0
- package/dist/liveActivity/liveActivityTypes.js.map +1 -0
- package/dist/membershipDefinitions.js +1 -0
- package/dist/mirroredPrismaEnums.js +1 -0
- package/dist/onSaleCapabilityRecommendations.js +1 -0
- package/dist/partnerStoreTypes.js +1 -0
- package/dist/productLaunch.js +1 -0
- package/dist/relationshipHealth.js +1 -0
- package/dist/requestAuthUser.js +1 -0
- package/dist/sideQuestIdeas.js +1 -0
- package/dist/storePrintArtworkUtils.js +1 -0
- package/dist/storeTypes.js +1 -0
- package/dist/stripeListingSubscriptionMessages.js +1 -0
- package/dist/templates/eventTemplates.js +1 -0
- package/dist/ticketBnplPaymentMethods.js +1 -0
- package/dist/userReportTypes.js +1 -0
- package/dist/utils/__tests__/organizationEntitlements.test.js +42 -9
- package/dist/utils/__tests__/organizationEntitlements.test.js.map +1 -1
- package/dist/utils/agencyBookingCheckoutCopy.js +1 -0
- package/dist/utils/arrayUtils.js +1 -0
- package/dist/utils/bashPointsPaymentUtils.js +1 -0
- package/dist/utils/birthdayExperienceQuality.js +1 -0
- package/dist/utils/contentFilterUtils.js +1 -0
- package/dist/utils/discountEngine/eligibilityValidator.js +1 -0
- package/dist/utils/displayDateUtils.js +1 -0
- package/dist/utils/entertainmentDrawFit.js +1 -0
- package/dist/utils/entityUtils.js +1 -0
- package/dist/utils/featuredDiscoveryGeo.js +1 -0
- package/dist/utils/flyerUtils.js +1 -0
- package/dist/utils/generalDateTimeUtils.js +1 -0
- package/dist/utils/lobFlyerUtils.js +1 -0
- package/dist/utils/localPartnerHours.js +1 -0
- package/dist/utils/luxonUtils.js +1 -0
- package/dist/utils/mathUtils.js +1 -0
- package/dist/utils/mediaClientDefaults.js +1 -0
- package/dist/utils/nonprofitUtils.js +1 -0
- package/dist/utils/objUtils.js +1 -0
- package/dist/utils/orgPromotionalPackageUtils.js +1 -0
- package/dist/utils/organizationEntitlements.d.ts +27 -7
- package/dist/utils/organizationEntitlements.d.ts.map +1 -1
- package/dist/utils/organizationEntitlements.js +28 -11
- package/dist/utils/organizationEntitlements.js.map +1 -1
- package/dist/utils/promotionBlastUtils.js +1 -0
- package/dist/utils/reputationUtils.js +1 -0
- package/dist/utils/reviewDimensionUtils.js +1 -0
- package/dist/utils/service/attendeeOptionUtils.js +1 -0
- package/dist/utils/service/billingCapUtils.js +1 -0
- package/dist/utils/service/eventPromoterUtils.js +1 -0
- package/dist/utils/service/offerAllowListUtils.js +1 -0
- package/dist/utils/service/offerComparisonUtils.js +1 -0
- package/dist/utils/service/regexUtils.js +1 -0
- package/dist/utils/service/serviceBookingExposureUtils.js +1 -0
- package/dist/utils/service/serviceFeaturedSortUtils.js +1 -0
- package/dist/utils/service/unifiedPricingResolver.js +1 -0
- package/dist/utils/service/venueSettlementUtils.js +1 -0
- package/dist/utils/service/volunteerCompensationUtils.js +1 -0
- package/dist/utils/serviceAvailabilityDisplay.js +1 -0
- package/dist/utils/sortUtils.js +1 -0
- package/dist/utils/stringUtils.js +1 -0
- package/dist/utils/ticketCheckInDisplay.js +1 -0
- package/dist/utils/trustScoreUtils.js +1 -0
- package/dist/utils/typeUtils.js +1 -0
- package/dist/utils/userPromoCodeUtils.js +1 -0
- package/dist/utils/userUtils.js +1 -0
- package/dist/utils/venueLoyalty/redemptionCodeUtils.js +1 -0
- package/dist/utils/venueTypeFormatter.js +1 -0
- package/dist/utmAttribution.js +1 -0
- package/dist/venueMatch.js +1 -0
- package/package.json +1 -1
- package/prisma/schema.prisma +377 -0
- package/src/index.ts +1 -0
- package/src/liveActivity/liveActivityTypes.ts +75 -0
- package/src/utils/__tests__/organizationEntitlements.test.ts +47 -8
- package/src/utils/organizationEntitlements.ts +42 -11
|
@@ -15,14 +15,17 @@ export const ACTIVE_ORG_SUBSCRIPTION_STATUSES = [
|
|
|
15
15
|
export interface OrganizationEntitlementInput {
|
|
16
16
|
subscriptionTier?: string | null;
|
|
17
17
|
subscriptionStatus?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* True only when ops provisioned Enterprise via a signed deal (admin
|
|
20
|
+
* enterprise-provisioning endpoint). Self-serve Stripe checkout can also set
|
|
21
|
+
* subscriptionTier="Enterprise" but never sets this. Optional/undefined is
|
|
22
|
+
* treated as false so legacy call sites that don't select this field fail
|
|
23
|
+
* closed on the sales-gated surface rather than open.
|
|
24
|
+
*/
|
|
25
|
+
enterpriseSalesProvisioned?: boolean | null;
|
|
18
26
|
}
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
* Vanity subdomains ({slug}.bash.community) are an Enterprise-only perk. All other
|
|
22
|
-
* orgs use the canonical path URL (bash.community/org/{slug}). Requires an active
|
|
23
|
-
* (or trialing) subscription so a lapsed Enterprise org falls back to the path.
|
|
24
|
-
*/
|
|
25
|
-
export function organizationHasVanitySubdomain(
|
|
28
|
+
function hasActiveEnterpriseTier(
|
|
26
29
|
org: OrganizationEntitlementInput | null | undefined
|
|
27
30
|
): boolean {
|
|
28
31
|
if (!org) return false;
|
|
@@ -36,18 +39,30 @@ export function organizationHasVanitySubdomain(
|
|
|
36
39
|
);
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Vanity subdomains ({slug}.bash.community) and custom domains (white-label)
|
|
44
|
+
* are self-serve-eligible Enterprise perks — available whether Enterprise was
|
|
45
|
+
* bought via self-serve Stripe checkout or a sales-negotiated deal.
|
|
46
|
+
*/
|
|
47
|
+
export function organizationHasVanitySubdomain(
|
|
48
|
+
org: OrganizationEntitlementInput | null | undefined
|
|
49
|
+
): boolean {
|
|
50
|
+
return hasActiveEnterpriseTier(org);
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
/**
|
|
40
54
|
* Shared gate for the enterprise platform surface: org-scoped audit logs,
|
|
41
55
|
* SSO/identity setup, procurement approval policy, API keys, webhooks, and
|
|
42
|
-
* third-party integrations (Mailchimp/Salesforce).
|
|
43
|
-
* perks
|
|
44
|
-
*
|
|
45
|
-
*
|
|
56
|
+
* third-party integrations (Mailchimp/Salesforce). Unlike the white-label
|
|
57
|
+
* perks above, this surface requires a sales-negotiated deal
|
|
58
|
+
* (`enterpriseSalesProvisioned`) — self-serve $495/mo checkout alone does not
|
|
59
|
+
* unlock SSO, compliance, procurement, or API access, since those typically
|
|
60
|
+
* involve a security review or contract terms sales owns.
|
|
46
61
|
*/
|
|
47
62
|
export function organizationHasEnterprisePlatformAccess(
|
|
48
63
|
org: OrganizationEntitlementInput | null | undefined
|
|
49
64
|
): boolean {
|
|
50
|
-
return
|
|
65
|
+
return hasActiveEnterpriseTier(org) && org?.enterpriseSalesProvisioned === true;
|
|
51
66
|
}
|
|
52
67
|
|
|
53
68
|
/** Org-admin audit log viewer + CSV export. */
|
|
@@ -84,3 +99,19 @@ export function organizationHasComplianceAccess(
|
|
|
84
99
|
): boolean {
|
|
85
100
|
return organizationHasEnterprisePlatformAccess(org);
|
|
86
101
|
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Custom domains (white-label tier): real DNS (e.g. members.acme.com) provisioned
|
|
105
|
+
* via AWS CloudFront SaaS Manager Distribution Tenants, plus the "Powered by Bash"
|
|
106
|
+
* removal toggle. Same Enterprise + active/trialing gate as
|
|
107
|
+
* {@link organizationHasVanitySubdomain} for MVP — reuse the existing tier rather
|
|
108
|
+
* than invent a new pricing tier now. A dedicated "White-label" tier is a
|
|
109
|
+
* fast-follow if sales needs separate pricing. Self-serve-eligible: does NOT
|
|
110
|
+
* require {@link organizationHasEnterprisePlatformAccess}'s
|
|
111
|
+
* `enterpriseSalesProvisioned` flag.
|
|
112
|
+
*/
|
|
113
|
+
export function organizationHasCustomDomainAccess(
|
|
114
|
+
org: OrganizationEntitlementInput | null | undefined
|
|
115
|
+
): boolean {
|
|
116
|
+
return organizationHasVanitySubdomain(org);
|
|
117
|
+
}
|