@bash-app/bash-common 30.73.0 → 30.74.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.
@@ -2,9 +2,9 @@ export const stripeAccountFullyLinked = (linkingStatus) => {
2
2
  return (linkingStatus != null &&
3
3
  !linkingStatus.hasOutstandingRequirements &&
4
4
  linkingStatus.isOnboarded &&
5
- linkingStatus.paymentsEnabled &&
6
- linkingStatus.taxMonitoringEnabled
7
- // (!isProduction() || linkingStatus.taxMonitoringEnabled);
5
+ linkingStatus.paymentsEnabled
6
+ // Tax monitoring is optional - removing this requirement
7
+ // && linkingStatus.taxMonitoringEnabled
8
8
  );
9
9
  };
10
10
  //# sourceMappingURL=stripeAccountUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stripeAccountUtils.js","sourceRoot":"","sources":["../../src/utils/stripeAccountUtils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,aAAqD,EAC5C,EAAE;IACX,OAAO,CACL,aAAa,IAAI,IAAI;QACrB,CAAC,aAAa,CAAC,0BAA0B;QACzC,aAAa,CAAC,WAAW;QACzB,aAAa,CAAC,eAAe;QAC7B,aAAa,CAAC,oBAAoB;IAClC,2DAA2D;KAC5D,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"stripeAccountUtils.js","sourceRoot":"","sources":["../../src/utils/stripeAccountUtils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,aAAqD,EAC5C,EAAE;IACX,OAAO,CACL,aAAa,IAAI,IAAI;QACrB,CAAC,aAAa,CAAC,0BAA0B;QACzC,aAAa,CAAC,WAAW;QACzB,aAAa,CAAC,eAAe;IAC7B,yDAAyD;IACzD,wCAAwC;KACzC,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "30.73.0",
3
+ "version": "30.74.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",
@@ -469,13 +469,16 @@ model UserReferralCode {
469
469
  userId String @unique
470
470
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
471
471
  referralCode String @unique
472
- referralTier ReferralTier @default(Starter)
472
+ referralTier ReferralTier @default(Ambashador)
473
473
  totalReferrals Int @default(0)
474
474
  totalEarnings Int @default(0) // Total earnings in cents
475
475
  isActive Boolean @default(true)
476
476
  createdAt DateTime @default(now())
477
477
  updatedAt DateTime @updatedAt
478
478
 
479
+ // Ambashador application relation
480
+ ambashadorApplication AmbashadorApplication?
481
+
479
482
  @@index([referralCode])
480
483
  }
481
484
 
@@ -1317,6 +1320,10 @@ model User {
1317
1320
  // Push notification relations
1318
1321
  pushNotificationTokens PushNotificationToken[]
1319
1322
 
1323
+ // Ambashador application relations
1324
+ ambashadorApplications AmbashadorApplication[]
1325
+ reviewedAmbashadorApps AmbashadorApplication[] @relation("AmbashadorReviewer")
1326
+
1320
1327
  // Vendor booking relations
1321
1328
  vendorBookingRequestsAsHost VendorBookingRequest[] @relation("VendorBookingHost")
1322
1329
 
@@ -4306,10 +4313,10 @@ enum CreditTransactionType {
4306
4313
  }
4307
4314
 
4308
4315
  enum ReferralTier {
4309
- Starter // 0-2 referrals: $10/referral
4310
- Advocate // 3-5 referrals: $15/referral
4311
- Influencer // 6-9 referrals: $20/referral
4312
- Ambashador // 10+ referrals: $25/referral
4316
+ Ambashador // 1+ referrals: $5/referral - Cultural leaders and community builders
4317
+ NanoInfluencer // 3+ referrals: $10/referral - Growing influence
4318
+ MicroInfluencer // 6+ referrals: $15/referral - Established community presence
4319
+ Influencer // 10+ referrals: $don’t 20/referral - Top tier influencers
4313
4320
  }
4314
4321
 
4315
4322
  model Voucher {
@@ -4349,3 +4356,46 @@ model PushNotificationToken {
4349
4356
  @@unique([userId, platform])
4350
4357
  @@map("push_notification_tokens")
4351
4358
  }
4359
+
4360
+ model AmbashadorApplication {
4361
+ id String @id @default(cuid())
4362
+ userId String? // Optional - if user is logged in
4363
+ user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
4364
+
4365
+ // Application form data
4366
+ email String
4367
+ firstName String
4368
+ lastName String
4369
+ phone String?
4370
+ city String
4371
+ state String?
4372
+ country String @default("US")
4373
+
4374
+ // Why they want to be an Ambashador
4375
+ motivation String // Why do you want to be an Ambashador?
4376
+ experience String? // Previous event/community experience
4377
+ socialMedia String? // Social media handles
4378
+ businessInfo String? // Business/brand they want to promote
4379
+
4380
+ // Application status
4381
+ status AmbashadorApplicationStatus @default(Pending)
4382
+ reviewedAt DateTime?
4383
+ reviewedById String?
4384
+ reviewedBy User? @relation("AmbashadorReviewer", fields: [reviewedById], references: [id], onDelete: SetNull)
4385
+ reviewNotes String? // Internal notes from reviewer
4386
+
4387
+ // Referral code (generated upon approval)
4388
+ referralCodeId String? @unique
4389
+ referralCode UserReferralCode? @relation(fields: [referralCodeId], references: [id], onDelete: SetNull)
4390
+
4391
+ createdAt DateTime @default(now())
4392
+ updatedAt DateTime @updatedAt
4393
+
4394
+ @@map("ambashador_applications")
4395
+ }
4396
+
4397
+ enum AmbashadorApplicationStatus {
4398
+ Pending
4399
+ Approved
4400
+ Rejected
4401
+ }
@@ -311,3 +311,6 @@ export function shouldWarnUser(violations: ContentViolation[], userTier: string)
311
311
  message: 'Please avoid mentioning external payment methods. Use the platform\'s payment system instead.'
312
312
  };
313
313
  }
314
+
315
+
316
+
@@ -7,8 +7,8 @@ export const stripeAccountFullyLinked = (
7
7
  linkingStatus != null &&
8
8
  !linkingStatus.hasOutstandingRequirements &&
9
9
  linkingStatus.isOnboarded &&
10
- linkingStatus.paymentsEnabled &&
11
- linkingStatus.taxMonitoringEnabled
12
- // (!isProduction() || linkingStatus.taxMonitoringEnabled);
10
+ linkingStatus.paymentsEnabled
11
+ // Tax monitoring is optional - removing this requirement
12
+ // && linkingStatus.taxMonitoringEnabled
13
13
  );
14
14
  };