@bash-app/bash-common 30.61.0 → 30.62.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.
@@ -63,7 +63,7 @@ export interface MembershipSubscriptionResult {
63
63
  clientSecret?: string;
64
64
  }
65
65
  export declare const MEMBERSHIP_PRICING: {
66
- Guest: {
66
+ Basic: {
67
67
  monthly: number;
68
68
  yearly: number;
69
69
  };
@@ -3,14 +3,14 @@ import { MembershipTier, ReferralTier, CreditTransactionType } from '@prisma/cli
3
3
  export { MembershipTier, ReferralTier, CreditTransactionType };
4
4
  // Pricing in cents (for Stripe)
5
5
  export const MEMBERSHIP_PRICING = {
6
- Guest: { monthly: 0, yearly: 0 },
6
+ Basic: { monthly: 0, yearly: 0 },
7
7
  Creator: { monthly: 2499, yearly: 20000 }, // $24.99/month, $200/year
8
8
  Pro: { monthly: 9900, yearly: 99900 }, // $99/month, $999/year
9
9
  Elite: { monthly: 49900, yearly: 500000 }, // $499/month, $5,000/year
10
10
  Legend: { monthly: 99900, yearly: 1000000 }, // $999/month, $10,000/year
11
11
  };
12
12
  export const MEMBERSHIP_TIER_HIERARCHY = [
13
- 'Guest', 'Creator', 'Pro', 'Elite', 'Legend'
13
+ 'Basic', 'Creator', 'Pro', 'Elite', 'Legend'
14
14
  ];
15
15
  export const MEMBERSHIP_FEATURES = {
16
16
  // Core Creator features
@@ -91,11 +91,11 @@ export function getRequiredTierForFeature(feature) {
91
91
  }
92
92
  // Complete tier definitions with features and pricing
93
93
  export const MEMBERSHIP_TIER_INFO = {
94
- Guest: {
95
- tier: 'Guest',
96
- name: 'Guest',
97
- monthlyPrice: MEMBERSHIP_PRICING.Guest.monthly,
98
- yearlyPrice: MEMBERSHIP_PRICING.Guest.yearly,
94
+ Basic: {
95
+ tier: 'Basic',
96
+ name: 'Basic',
97
+ monthlyPrice: MEMBERSHIP_PRICING.Basic.monthly,
98
+ yearlyPrice: MEMBERSHIP_PRICING.Basic.yearly,
99
99
  features: [
100
100
  'Browse and attend public events',
101
101
  'Host your own events with a $5 minimum ticket required',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "30.61.0",
3
+ "version": "30.62.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -768,8 +768,12 @@ model AmountOfGuests {
768
768
 
769
769
  enum Privacy {
770
770
  Public
771
- ConnectionsOnly
771
+ ContactsOnly
772
772
  InviteOnly
773
+ CreatorOnly
774
+ ProOnly
775
+ EliteOnly
776
+ LegendOnly
773
777
  }
774
778
 
775
779
  model TargetAudience {
@@ -1153,6 +1157,7 @@ model User {
1153
1157
  remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
1154
1158
  eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
1155
1159
  contacts Contact[]
1160
+ vouchersRedeemed Voucher[] @relation("UserVouchersRedeemed")
1156
1161
  contactLists ContactList[] @relation("UserContactLists")
1157
1162
  contactlist ContactList[]
1158
1163
 
@@ -1209,7 +1214,7 @@ model User {
1209
1214
  artistsToSee String[] @default([])
1210
1215
 
1211
1216
  // Membership system fields
1212
- membershipTier MembershipTier @default(Guest)
1217
+ membershipTier MembershipTier @default(Basic)
1213
1218
  membershipExpiresAt DateTime?
1214
1219
  membershipAutoRenew Boolean @default(false)
1215
1220
  membershipBillingInterval String? // Monthly, Yearly
@@ -3656,7 +3661,7 @@ enum CommentStatus {
3656
3661
  }
3657
3662
 
3658
3663
  enum MembershipTier {
3659
- Guest
3664
+ Basic
3660
3665
  Creator
3661
3666
  Pro
3662
3667
  Elite
@@ -3675,3 +3680,24 @@ enum ReferralTier {
3675
3680
  Influencer // 6-9 referrals: $20/referral
3676
3681
  Ambashador // 10+ referrals: $25/referral
3677
3682
  }
3683
+
3684
+ // Vouchers sold via external stores (e.g., Shopify) to discount memberships
3685
+ model Voucher {
3686
+ id String @id @default(cuid())
3687
+ codeHash String @unique
3688
+ issuedToEmail String?
3689
+ shopifyOrderId String?
3690
+ createdAt DateTime @default(now())
3691
+ redeemedAt DateTime?
3692
+ redeemedById String?
3693
+ redeemedBy User? @relation("UserVouchersRedeemed", fields: [redeemedById], references: [id], onDelete: SetNull)
3694
+ status VoucherStatus @default(Active)
3695
+ stripePromotionCodeId String?
3696
+ stripeCouponId String?
3697
+ }
3698
+
3699
+ enum VoucherStatus {
3700
+ Active
3701
+ Used
3702
+ Cancelled
3703
+ }
@@ -77,7 +77,7 @@ export interface MembershipSubscriptionResult {
77
77
 
78
78
  // Pricing in cents (for Stripe)
79
79
  export const MEMBERSHIP_PRICING = {
80
- Guest: { monthly: 0, yearly: 0 },
80
+ Basic: { monthly: 0, yearly: 0 },
81
81
  Creator: { monthly: 2499, yearly: 20000 }, // $24.99/month, $200/year
82
82
  Pro: { monthly: 9900, yearly: 99900 }, // $99/month, $999/year
83
83
  Elite: { monthly: 49900, yearly: 500000 }, // $499/month, $5,000/year
@@ -85,7 +85,7 @@ export const MEMBERSHIP_PRICING = {
85
85
  };
86
86
 
87
87
  export const MEMBERSHIP_TIER_HIERARCHY: MembershipTier[] = [
88
- 'Guest', 'Creator', 'Pro', 'Elite', 'Legend'
88
+ 'Basic', 'Creator', 'Pro', 'Elite', 'Legend'
89
89
  ];
90
90
 
91
91
  export const MEMBERSHIP_FEATURES = {
@@ -178,11 +178,11 @@ export function getRequiredTierForFeature(feature: string): MembershipTier | nul
178
178
 
179
179
  // Complete tier definitions with features and pricing
180
180
  export const MEMBERSHIP_TIER_INFO: Record<MembershipTier, MembershipTierInfo> = {
181
- Guest: {
182
- tier: 'Guest',
183
- name: 'Guest',
184
- monthlyPrice: MEMBERSHIP_PRICING.Guest.monthly,
185
- yearlyPrice: MEMBERSHIP_PRICING.Guest.yearly,
181
+ Basic: {
182
+ tier: 'Basic',
183
+ name: 'Basic',
184
+ monthlyPrice: MEMBERSHIP_PRICING.Basic.monthly,
185
+ yearlyPrice: MEMBERSHIP_PRICING.Basic.yearly,
186
186
  features: [
187
187
  'Browse and attend public events',
188
188
  'Host your own events with a $5 minimum ticket required',