@bash-app/bash-common 30.35.0 → 30.36.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 +1 -2
- package/prisma/schema.prisma +67 -11
- package/src/extendedSchemas.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bash-app/bash-common",
|
|
3
|
-
"version": "30.
|
|
3
|
+
"version": "30.36.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",
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/jest": "^29.5.5",
|
|
40
40
|
"@types/luxon": "^3.4.2",
|
|
41
|
-
"@types/luxon": "^3.4.2",
|
|
42
41
|
"@types/node": "^20.11.1",
|
|
43
42
|
"@types/react": "^18.3.2",
|
|
44
43
|
"@types/shelljs": "^0.8.15",
|
package/prisma/schema.prisma
CHANGED
|
@@ -1072,19 +1072,75 @@ model User {
|
|
|
1072
1072
|
unblocksCreated UnblockedUserHistory[] @relation("UserUnblocksMade")
|
|
1073
1073
|
unblocksReceived UnblockedUserHistory[] @relation("UserUnblocksReceived")
|
|
1074
1074
|
|
|
1075
|
-
preferences
|
|
1076
|
-
|
|
1075
|
+
preferences UserPreferences?
|
|
1077
1076
|
}
|
|
1078
1077
|
|
|
1079
|
-
model
|
|
1080
|
-
id
|
|
1081
|
-
userId
|
|
1082
|
-
user
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1078
|
+
model UserPreferences {
|
|
1079
|
+
id String @id @default(cuid())
|
|
1080
|
+
userId String @unique
|
|
1081
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
1082
|
+
|
|
1083
|
+
// Notification Preferences
|
|
1084
|
+
emailNotifications Boolean @default(true)
|
|
1085
|
+
pushNotifications Boolean @default(true)
|
|
1086
|
+
smsNotifications Boolean @default(false)
|
|
1087
|
+
newMessageNotify Boolean @default(true)
|
|
1088
|
+
eventReminderNotify Boolean @default(true)
|
|
1089
|
+
friendRequestNotify Boolean @default(true)
|
|
1090
|
+
commentNotify Boolean @default(true)
|
|
1091
|
+
invitationNotify Boolean @default(true)
|
|
1092
|
+
eventUpdatesNotify Boolean @default(true)
|
|
1093
|
+
servicePromotionsNotify Boolean @default(true)
|
|
1094
|
+
|
|
1095
|
+
// Privacy Settings
|
|
1096
|
+
profileVisibility String @default("PUBLIC") // PUBLIC, FRIENDS, PRIVATE
|
|
1097
|
+
showOnlineStatus Boolean @default(true)
|
|
1098
|
+
allowTagging Boolean @default(true)
|
|
1099
|
+
allowDirectMessages Boolean @default(true)
|
|
1100
|
+
showActivityStatus Boolean @default(true)
|
|
1101
|
+
hiddenBashIds String[] @default([])
|
|
1102
|
+
hideActivitySection Boolean @default(false)
|
|
1103
|
+
allowLocationSharing Boolean @default(false)
|
|
1104
|
+
blockSearchEngineIndex Boolean @default(false)
|
|
1105
|
+
|
|
1106
|
+
// UI/UX Preferences
|
|
1107
|
+
theme String @default("SYSTEM") // LIGHT, DARK, SYSTEM
|
|
1108
|
+
language String @default("en-US")
|
|
1109
|
+
timeZone String @default("America/New_York")
|
|
1110
|
+
defaultLandingPage String @default("dashboard")
|
|
1111
|
+
contentDensity String @default("COMFORTABLE") // COMPACT, COMFORTABLE, SPACIOUS
|
|
1112
|
+
fontScale String @default("MEDIUM") // SMALL, MEDIUM, LARGE
|
|
1113
|
+
animationsEnabled Boolean @default(true)
|
|
1114
|
+
useHighContrastMode Boolean @default(false)
|
|
1115
|
+
|
|
1116
|
+
// Content Preferences
|
|
1117
|
+
contentFilters String[] @default([])
|
|
1118
|
+
topicInterests String[] @default([])
|
|
1119
|
+
hideSeenContent Boolean @default(false)
|
|
1120
|
+
autoplayVideos Boolean @default(true)
|
|
1121
|
+
contentSortPreference String @default("RECENT") // RECENT, POPULAR, RELEVANT
|
|
1122
|
+
contentLanguages String[] @default(["en"])
|
|
1123
|
+
showSensitiveContent Boolean @default(false)
|
|
1124
|
+
|
|
1125
|
+
// Calendar & Event Preferences
|
|
1126
|
+
defaultCalendarView String @default("MONTH") // DAY, WEEK, MONTH, AGENDA
|
|
1127
|
+
calendarStartDay Int @default(0) // 0=Sunday, 1=Monday
|
|
1128
|
+
defaultEventReminder Int @default(60) // Minutes before event
|
|
1129
|
+
attendancePrivacy String @default("PUBLIC") // PUBLIC, FRIENDS, PRIVATE
|
|
1130
|
+
|
|
1131
|
+
// Communications Preferences
|
|
1132
|
+
communicationFrequency String @default("NORMAL") // LOW, NORMAL, HIGH
|
|
1133
|
+
preferredContactMethod String @default("EMAIL") // EMAIL, PUSH, SMS
|
|
1134
|
+
|
|
1135
|
+
// Data & Payment Preferences
|
|
1136
|
+
dataUsageConsent Boolean @default(true)
|
|
1137
|
+
analyticsConsent Boolean @default(true)
|
|
1138
|
+
preferredCurrency String @default("USD")
|
|
1139
|
+
savePaymentInfo Boolean @default(false)
|
|
1140
|
+
showEventPrices Boolean @default(true)
|
|
1141
|
+
|
|
1142
|
+
createdAt DateTime @default(now())
|
|
1143
|
+
updatedAt DateTime @updatedAt
|
|
1088
1144
|
}
|
|
1089
1145
|
|
|
1090
1146
|
model Contact {
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
TicketTransfer,
|
|
54
54
|
TicketMetadata,
|
|
55
55
|
SponsoredEvent,
|
|
56
|
+
UserPreferences,
|
|
56
57
|
} from "@prisma/client";
|
|
57
58
|
import { SERVICE_LINK_DATA_TO_INCLUDE } from "./definitions";
|
|
58
59
|
import { serviceKeysArray } from "./utils/service/serviceUtils";
|
|
@@ -780,7 +781,8 @@ export const CONTACT_DATA_TO_INCLUDE = {
|
|
|
780
781
|
|
|
781
782
|
export interface UserExt extends User {
|
|
782
783
|
services?: Service[] | null;
|
|
783
|
-
|
|
784
|
+
preferences?: UserPreferences | null;
|
|
785
|
+
|
|
784
786
|
// Do not include in fetch as there could be thousands of these
|
|
785
787
|
userSubscription?: UserSubscriptionExt | null;
|
|
786
788
|
associatedBashes?: AssociatedBash[] | null;
|