@bash-app/bash-common 30.14.0 → 30.16.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.14.0",
3
+ "version": "30.16.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -928,12 +928,12 @@ enum SocialMediaPlatform {
928
928
  }
929
929
 
930
930
  model User {
931
- id String @id @default(cuid())
932
- email String @unique
933
- createdOn DateTime @default(now())
934
- stripeCustomerId String? @unique
935
- stripeAccountId String? @unique
936
- isSuperUser Boolean @default(false)
931
+ id String @id @default(cuid())
932
+ email String @unique
933
+ createdOn DateTime @default(now())
934
+ stripeCustomerId String? @unique
935
+ stripeAccountId String? @unique
936
+ isSuperUser Boolean @default(false)
937
937
  // isSuspended Boolean @default(false)
938
938
  intent UserIntent?
939
939
  googleCalendarAccess String?
@@ -946,12 +946,12 @@ model User {
946
946
  dob DateTime?
947
947
  gender Gender?
948
948
  sex Sex?
949
- roles UserRole[] @default([User])
950
- ownedServices Service[] @relation("OwnedService")
951
- createdServices Service[] @relation("CreatedService")
952
- createdEvents BashEvent[] @relation("CreatedEvent")
953
- ticketsISent Ticket[] @relation("TicketsISent")
954
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
949
+ roles UserRole[] @default([User])
950
+ ownedServices Service[] @relation("OwnedService")
951
+ createdServices Service[] @relation("CreatedService")
952
+ createdEvents BashEvent[] @relation("CreatedEvent")
953
+ ticketsISent Ticket[] @relation("TicketsISent")
954
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
955
955
  reviews Review[]
956
956
  sponsorships SponsoredEvent[]
957
957
  investments Investment[]
@@ -974,34 +974,37 @@ model User {
974
974
  city String?
975
975
  state String?
976
976
  zipCode String?
977
- country String? @default("US")
977
+ country String? @default("US")
978
978
  phone String?
979
979
  socialMediaProfiles SocialMediaProfile[]
980
- documentIDId String? @unique
980
+ documentIDId String? @unique
981
981
  documentID DocumentID?
982
982
  comment BashComment[]
983
983
  associatedBashes AssociatedBash[]
984
984
  associatedServices AssociatedService[]
985
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
986
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
987
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
988
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
989
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
990
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
985
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
986
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
987
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
988
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
989
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
990
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
991
991
  checkouts Checkout[]
992
992
  ticketTiersWaitListsIveJoined TicketTier[]
993
993
  contacts Contact[]
994
- bashEventPromoCodesIUsed BashEventPromoCode[]
994
+ contactLists ContactList[] @relation("UserContactLists")
995
+ contactlist ContactList[]
996
+
997
+ bashEventPromoCodesIUsed BashEventPromoCode[]
995
998
  // bookingForMe Booking[]
996
- userSubscription UserSubscription?
999
+ userSubscription UserSubscription?
997
1000
  // serviceSubscriptions ServiceSubscription[]
998
- volunteerService VolunteerService[]
999
- stripeAccounts StripeAccount[]
1000
- userPromoCodeRedemption UserPromoCodeRedemption[]
1001
- accepted Boolean? @default(false) // Tracks if the user accepted the invitation
1002
- boughtTicket Boolean? @default(false) // Tracks if the user bought a ticket
1003
- noPay Boolean? @default(false) // Tracks if the user is marked as "noPay"
1004
- supportedEvent Boolean? @default(false) // Tracks if the user supported the event
1001
+ volunteerService VolunteerService[]
1002
+ stripeAccounts StripeAccount[]
1003
+ userPromoCodeRedemption UserPromoCodeRedemption[]
1004
+ accepted Boolean? @default(false) // Tracks if the user accepted the invitation
1005
+ boughtTicket Boolean? @default(false) // Tracks if the user bought a ticket
1006
+ noPay Boolean? @default(false) // Tracks if the user is marked as "noPay"
1007
+ supportedEvent Boolean? @default(false) // Tracks if the user supported the event
1005
1008
 
1006
1009
  // primaryStripeAccountDBId String? @unique
1007
1010
  // primaryStripeAccountDB StripeAccount? @relation("PrimaryStripeAccount", fields: [primaryStripeAccountDBId], references: [id], onDelete: Restrict, onUpdate: Restrict)
@@ -1010,6 +1013,11 @@ model User {
1010
1013
  serviceBookingCheckout ServiceBookingCheckout[]
1011
1014
  promoter Promoter[]
1012
1015
  promoterStats PromoterStats?
1016
+
1017
+ blocksCreated BlockedUser[] @relation("UserBlocksMade")
1018
+ blocksReceived BlockedUser[] @relation("UserBlocksReceived")
1019
+ unblocksCreated UnblockedUserHistory[] @relation("UserUnblocksMade")
1020
+ unblocksReceived UnblockedUserHistory[] @relation("UserUnblocksReceived")
1013
1021
  }
1014
1022
 
1015
1023
  model Contact {
@@ -1026,6 +1034,47 @@ model Contact {
1026
1034
  @@index([contactEmail])
1027
1035
  }
1028
1036
 
1037
+ model ContactList {
1038
+ id String @id @default(cuid())
1039
+ name String
1040
+ ownerId String
1041
+ owner User @relation("UserContactLists", fields: [ownerId], references: [id], onDelete: Cascade)
1042
+ contactIds String[] // Array of contact IDs
1043
+ createdAt DateTime @default(now())
1044
+ updatedAt DateTime @updatedAt
1045
+ User User? @relation(fields: [userId], references: [id])
1046
+ userId String?
1047
+
1048
+ @@index([ownerId])
1049
+ }
1050
+
1051
+ model BlockedUser {
1052
+ id String @id @default(cuid())
1053
+ blockerId String // User who blocked
1054
+ blockedId String // User who was blocked
1055
+ createdAt DateTime @default(now())
1056
+ updatedAt DateTime @updatedAt
1057
+
1058
+ // Relations
1059
+ blocker User @relation("UserBlocksMade", fields: [blockerId], references: [id], onDelete: Cascade)
1060
+ blocked User @relation("UserBlocksReceived", fields: [blockedId], references: [id], onDelete: Cascade)
1061
+
1062
+ // Unique constraint to prevent duplicate blocks
1063
+ @@unique([blockerId, blockedId])
1064
+ }
1065
+
1066
+ // UnblockedUserHistory for tracking when users are unblocked
1067
+ model UnblockedUserHistory {
1068
+ id String @id @default(cuid())
1069
+ blockerId String // User who had blocked
1070
+ blockedId String // User who was blocked but is now unblocked
1071
+ createdAt DateTime @default(now())
1072
+
1073
+ // Relations
1074
+ blocker User @relation("UserUnblocksMade", fields: [blockerId], references: [id], onDelete: Cascade)
1075
+ blocked User @relation("UserUnblocksReceived", fields: [blockedId], references: [id], onDelete: Cascade)
1076
+ }
1077
+
1029
1078
  // anyone that is invited to the bash, is an organizer of a bash, and or the creator/owner of the bash...for having others (including services) edit or post about a bash in the bashfeed
1030
1079
  model AssociatedBash {
1031
1080
  id String @id @default(cuid())