@bash-app/bash-common 30.181.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.181.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?
@@ -1707,6 +1710,7 @@ model User {
1707
1710
  birthdayRewardRedemptions BirthdayRewardRedemption[]
1708
1711
  birthdayRewardFavorites BirthdayRewardFavorite[]
1709
1712
  birthdayDealSuggestions BirthdayDealSuggestion[]
1713
+ birthdayCityResourceSuggestions BirthdayCityResourceSuggestion[]
1710
1714
  rewardReports RewardReport[]
1711
1715
  birthdayFreebieVotes BirthdayFreebieVote[]
1712
1716
  rewardReportsReviewed RewardReport[] @relation("RewardReportReviewedBy")
@@ -1716,6 +1720,7 @@ model User {
1716
1720
  birthdayLocation UserLocation? @relation("UserBirthdayLocation", fields: [birthdayLocationId], references: [id], onDelete: SetNull)
1717
1721
  offerClaims OfferClaim[]
1718
1722
  birthdayPlans BirthdayPlan[]
1723
+ birthdayFreebiesSavedPlan BirthdayFreebiesSavedPlan?
1719
1724
 
1720
1725
  associatedBashes AssociatedBash[]
1721
1726
  associatedServices AssociatedService[]
@@ -5958,12 +5963,27 @@ model BirthdayRewardRedemption {
5958
5963
  ratingComment String? @db.Text
5959
5964
  ratedAt DateTime?
5960
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?
5961
5968
  user User @relation(fields: [userId], references: [id], onDelete: Cascade)
5962
5969
  offer BirthdayOffer? @relation(fields: [offerId], references: [id], onDelete: SetNull)
5970
+ catalog BirthdayFreebieCatalog? @relation(fields: [catalogId], references: [id], onDelete: SetNull)
5963
5971
 
5964
5972
  @@index([userId])
5965
5973
  @@index([userId, birthdayYear])
5966
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)
5967
5987
  }
5968
5988
 
5969
5989
  enum BirthdayDealSuggestionStatus {
@@ -6059,6 +6079,7 @@ model BirthdayFreebieCatalog {
6059
6079
  rewardReports RewardReport[]
6060
6080
  /// User quality votes (Awesome / Okay / Lame); one row per user per catalog entry.
6061
6081
  votes BirthdayFreebieVote[]
6082
+ birthdayRewardRedemptions BirthdayRewardRedemption[]
6062
6083
 
6063
6084
  @@index([stateSlug, citySlug])
6064
6085
  @@index([isActive])
@@ -6100,10 +6121,39 @@ model BirthdayCityResource {
6100
6121
  sortOrder Int @default(0)
6101
6122
  createdAt DateTime @default(now())
6102
6123
  updatedAt DateTime @updatedAt
6124
+ suggestionCreatedFor BirthdayCityResourceSuggestion? @relation("CityResourceFromSuggestion")
6103
6125
 
6104
6126
  @@index([stateSlug, citySlug])
6105
6127
  }
6106
6128
 
6129
+ enum BirthdayCityResourceSuggestionStatus {
6130
+ Pending
6131
+ Approved
6132
+ Rejected
6133
+ }
6134
+
6135
+ // User-suggested "free things to do" links — admin approves into BirthdayCityResource
6136
+ model BirthdayCityResourceSuggestion {
6137
+ id String @id @default(cuid())
6138
+ stateSlug String
6139
+ citySlug String
6140
+ url String @db.Text
6141
+ label String? @db.Text
6142
+ notes String? @db.Text
6143
+ contactEmail String? @db.Text
6144
+ userId String?
6145
+ status BirthdayCityResourceSuggestionStatus @default(Pending)
6146
+ createdAt DateTime @default(now())
6147
+ reviewedAt DateTime?
6148
+ reviewedById String?
6149
+ createdResourceId String? @unique
6150
+ user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
6151
+ createdResource BirthdayCityResource? @relation("CityResourceFromSuggestion", fields: [createdResourceId], references: [id], onDelete: SetNull)
6152
+
6153
+ @@index([status])
6154
+ @@index([stateSlug, citySlug])
6155
+ }
6156
+
6107
6157
  enum RewardReportStatus {
6108
6158
  Pending
6109
6159
  Approved