@bash-app/bash-common 30.114.0 → 30.115.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.114.0",
3
+ "version": "30.115.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",
@@ -26,7 +26,7 @@
26
26
  "@types/qrcode": "^1.5.5",
27
27
  "lodash-es": "^4.17.21",
28
28
  "mixpanel-browser": "^2.65.0",
29
- "npm": "^10.5.0",
29
+ "npm": "^11.7.0",
30
30
  "qrcode": "^1.5.3",
31
31
  "slugify": "^1.6.6"
32
32
  },
@@ -44,10 +44,10 @@
44
44
  "@types/mixpanel-browser": "^2.60.0",
45
45
  "@types/node": "^20.11.1",
46
46
  "@types/react": "^18.3.2",
47
- "@types/shelljs": "^0.8.15",
47
+ "@types/shelljs": "^0.10.0",
48
48
  "jest": "^29.7.0",
49
- "shelljs": "^0.8.5",
50
- "stripe": "^16.12.0",
49
+ "shelljs": "^0.10.0",
50
+ "stripe": "^20.1.2",
51
51
  "ts-jest": "^29.1.1",
52
52
  "ts-node": "^10.9.1",
53
53
  "tslib": "^2.6.2",
@@ -252,6 +252,7 @@ model CompetitionParticipant {
252
252
  id String @id @default(cuid())
253
253
  competitionId String
254
254
  userId String? // Optional: links to user if registered
255
+ email String? // For non-registered participants
255
256
  name String // Display name
256
257
  description String? @db.Text // Why they should win
257
258
  imageUrl String? // Photo/avatar
@@ -260,6 +261,10 @@ model CompetitionParticipant {
260
261
  isEliminated Boolean @default(false) // For tournament brackets
261
262
  placement Int? // Final placement (1st, 2nd, 3rd, etc.)
262
263
  addedBy String @default("host") // 'host' or 'self'
264
+ status ParticipantStatus @default(ACCEPTED) // Invitation/request status
265
+ invitedAt DateTime? // When host invited them
266
+ acceptedAt DateTime? // When they accepted invitation
267
+ declinedAt DateTime? // When they declined invitation/request
263
268
  createdAt DateTime @default(now())
264
269
  competition Competition @relation(fields: [competitionId], references: [id], onDelete: Cascade)
265
270
  user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
@@ -272,7 +277,9 @@ model CompetitionParticipant {
272
277
 
273
278
  @@index([competitionId])
274
279
  @@index([userId])
280
+ @@index([email])
275
281
  @@index([voteCount])
282
+ @@index([status])
276
283
  }
277
284
 
278
285
  // Tournament bracket matches
@@ -3041,6 +3048,12 @@ enum NotificationType {
3041
3048
  CompetitionEnding
3042
3049
  CompetitionWon
3043
3050
  CompetitionResults
3051
+ CompetitionParticipantInvited // Host invited you to compete
3052
+ CompetitionParticipantAccepted // Participant accepted invitation
3053
+ CompetitionParticipantDeclined // Participant declined invitation
3054
+ CompetitionParticipantRequested // Someone requested to join your competition
3055
+ CompetitionParticipantApproved // Host approved your request to compete
3056
+ CompetitionParticipantRejected // Host rejected your request
3044
3057
  BashRating
3045
3058
  BashRatingMilestone
3046
3059
  BashFeedPost
@@ -3447,6 +3460,14 @@ enum BracketType {
3447
3460
  SWISS // Pairing based on performance
3448
3461
  }
3449
3462
 
3463
+ enum ParticipantStatus {
3464
+ INVITED // Host invited them, waiting for acceptance
3465
+ PENDING // User requested to join, waiting for host approval
3466
+ ACCEPTED // Confirmed participant
3467
+ DECLINED // Declined invitation or request denied
3468
+ REMOVED // Host removed them
3469
+ }
3470
+
3450
3471
  enum RecurrenceEndsType {
3451
3472
  NEVER // Never ends
3452
3473
  ON_DATE // Ends on specific date