@bash-app/bash-common 30.182.0 → 30.183.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "30.182.0",
3
+ "version": "30.183.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",
@@ -1610,6 +1610,9 @@ model User {
1610
1610
  birthdayLocationId String? // FK UserLocation (birthday home base)
1611
1611
  birthdayMaxDistanceMiles Int @default(25)
1612
1612
  birthdayNoPurchaseOnly Boolean @default(false)
1613
+ /// Email reminder N days before birthday (birthday rewards plan nudge)
1614
+ birthdayReminderEnabled Boolean @default(false)
1615
+ birthdayReminderDaysAdvance Int @default(7)
1613
1616
  birthdayCategories String[] @default([]) // e.g. restaurant, coffee, dessert
1614
1617
  idDocumentUrl String? // Optional: secure ID upload for verification
1615
1618
  gender Gender?
@@ -1717,6 +1720,7 @@ model User {
1717
1720
  birthdayLocation UserLocation? @relation("UserBirthdayLocation", fields: [birthdayLocationId], references: [id], onDelete: SetNull)
1718
1721
  offerClaims OfferClaim[]
1719
1722
  birthdayPlans BirthdayPlan[]
1723
+ birthdayFreebiesSavedPlan BirthdayFreebiesSavedPlan?
1720
1724
 
1721
1725
  associatedBashes AssociatedBash[]
1722
1726
  associatedServices AssociatedService[]
@@ -5959,12 +5963,27 @@ model BirthdayRewardRedemption {
5959
5963
  ratingComment String? @db.Text
5960
5964
  ratedAt DateTime?
5961
5965
  offerId String? // Part B: optional FK to structured BirthdayOffer
5966
+ /// Catalog or national reward id when marked picked up from the freebies guide
5967
+ catalogId String?
5962
5968
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
5963
5969
  offer BirthdayOffer? @relation(fields: [offerId], references: [id], onDelete: SetNull)
5970
+ catalog BirthdayFreebieCatalog? @relation(fields: [catalogId], references: [id], onDelete: SetNull)
5964
5971
 
5965
5972
  @@index([userId])
5966
5973
  @@index([userId, birthdayYear])
5967
5974
  @@index([offerId])
5975
+ @@index([catalogId])
5976
+ }
5977
+
5978
+ /// Logged-in user's saved "My Birthday Plan" offer ids + location context (separate from Part B generated BirthdayPlan).
5979
+ model BirthdayFreebiesSavedPlan {
5980
+ id String @id @default(cuid())
5981
+ userId String @unique
5982
+ planIds String[] @default([])
5983
+ stateSlug String?
5984
+ citySlug String?
5985
+ updatedAt DateTime @updatedAt
5986
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
5968
5987
  }
5969
5988
 
5970
5989
  enum BirthdayDealSuggestionStatus {
@@ -6060,6 +6079,7 @@ model BirthdayFreebieCatalog {
6060
6079
  rewardReports RewardReport[]
6061
6080
  /// User quality votes (Awesome / Okay / Lame); one row per user per catalog entry.
6062
6081
  votes BirthdayFreebieVote[]
6082
+ birthdayRewardRedemptions BirthdayRewardRedemption[]
6063
6083
 
6064
6084
  @@index([stateSlug, citySlug])
6065
6085
  @@index([isActive])