@bash-app/bash-common 7.0.0 → 8.0.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": "7.0.0",
3
+ "version": "8.0.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",
@@ -168,6 +168,7 @@ model BashNotification {
168
168
 
169
169
  @@unique([creatorId, email, bashEventId])
170
170
  @@unique([creatorId, email, invitationId])
171
+ @@index([creatorId])
171
172
  }
172
173
 
173
174
  model Invitation {
@@ -243,13 +244,14 @@ model BashEvent {
243
244
  }
244
245
 
245
246
  model Checkout {
246
- id String @id @default(cuid())
247
- ownerId String
248
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
249
- bashEventId String
250
- bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
251
- tickets Ticket[]
252
- checkoutSessionId String? @unique
247
+ id String @id @default(cuid())
248
+ ownerId String
249
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
250
+ bashEventId String
251
+ bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
252
+ checkoutDateTime DateTime @default(now())
253
+ tickets Ticket[]
254
+ stripeCheckoutSessionId String? @unique
253
255
 
254
256
  @@index(bashEventId)
255
257
  }
@@ -167,6 +167,7 @@ export interface TicketTierExt extends TicketTier {
167
167
  export interface TicketExt extends Ticket {
168
168
  owner: User;
169
169
  forUser: User;
170
+ checkout?: Checkout;
170
171
  }
171
172
 
172
173
  export interface CheckoutExt extends Checkout {
@@ -201,7 +202,7 @@ export interface UserExt extends User {
201
202
  associatedBashes?: AssociatedBash[]
202
203
  reviews?: ReviewExt[];
203
204
  contacts?: Contact[];
204
- ticketsIOwn?: Ticket[];
205
+ ticketsIOwn?: TicketExt[];
205
206
  }
206
207
 
207
208
  export const USER_DATA_SELECT_REVIEWS_COMMENTS = {