@bash-app/bash-common 4.4.0 → 5.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": "4.4.0",
3
+ "version": "5.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",
@@ -249,6 +249,8 @@ model Checkout {
249
249
  bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
250
250
  tickets Ticket[]
251
251
  checkoutSessionId String? @unique
252
+
253
+ @@index(bashEventId)
252
254
  }
253
255
 
254
256
  model TicketTier {
@@ -1,5 +1,5 @@
1
1
  import {BashEventDressTags, BashEventType, BashEventVibeTags, DayOfWeek, ServiceTag, SubServiceType, TicketTier, User, YearsOfExperience} from "@prisma/client";
2
- import { TicketExt } from "./extendedSchemas";
2
+ import { CheckoutExt } from "./extendedSchemas";
3
3
 
4
4
  export const BASH_FEE_PERCENTAGE = 0.10;
5
5
  export const GOOGLE_CALLBACK_URL = '/auth/google/callback' as const;
@@ -83,7 +83,7 @@ export type FilterFields = {
83
83
  };
84
84
 
85
85
  export interface FirstFewAttendingBashEvent {
86
- tickets: TicketExt[];
86
+ checkouts: CheckoutExt[];
87
87
  totalTicketCount: number;
88
88
  }
89
89
 
@@ -10,7 +10,8 @@ import {
10
10
  TicketTier, Service, Review, Media, BashComment, Recurrence, Contact,
11
11
  BashNotification, BashEventPromoCode,
12
12
  Reminder, ServiceRange,
13
- ServiceTargetAudience
13
+ ServiceTargetAudience,
14
+ Checkout
14
15
  } from "@prisma/client";
15
16
 
16
17
  export const FRONT_END_USER_DATA_TO_SELECT = {
@@ -137,6 +138,10 @@ export interface TicketExt extends Ticket {
137
138
  forUser: User;
138
139
  }
139
140
 
141
+ export interface CheckoutExt extends Checkout {
142
+ owner: User;
143
+ }
144
+
140
145
  export interface ReviewExt extends Review {
141
146
  comments: BashComment[];
142
147
  }