@bash-app/bash-common 30.16.0 → 30.18.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.16.0",
3
+ "version": "30.18.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",
@@ -240,6 +240,7 @@ model Invitation {
240
240
  acceptedDate DateTime?
241
241
  rejectedDate DateTime?
242
242
  maybeDate DateTime?
243
+ isFreeGuest Boolean @default(false)
243
244
  tickets Ticket[] @relation("TicketsForInvitation")
244
245
  bashNotifications BashNotification[]
245
246
  associatedBash AssociatedBash?
@@ -312,6 +313,7 @@ model BashEvent {
312
313
  venue Venue? @relation(fields: [venueId], references: [id])
313
314
  userPromoCodeRedemption UserPromoCodeRedemption[]
314
315
  averageRating Float? @default(0)
316
+ serviceBookings ServiceBooking[] // Add this field to create the reverse relation
315
317
  }
316
318
 
317
319
  model Coordinates {
@@ -1926,6 +1928,9 @@ model ServiceBooking {
1926
1928
  daysTotalATBCents Int //ATB=At Time of Booking
1927
1929
  totalATBCents Int
1928
1930
 
1931
+ bashEventId String?
1932
+ bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
1933
+
1929
1934
  @@index([status])
1930
1935
  @@index([creatorId])
1931
1936
  @@index([forUserId])
@@ -256,6 +256,7 @@ export type ApiServiceBookingParams = {
256
256
  bookedDays: ApiServiceBookedDayParams[];
257
257
  timezone: string;
258
258
  attendeeOption: ServiceAttendeeOption;
259
+ bashEventId?: string;
259
260
  };
260
261
 
261
262
  export type ApiServiceCanBookParams = {} & ApiServiceBookingParams;
@@ -137,6 +137,18 @@ export interface BashEventExt extends BashEvent {
137
137
  // Do not include in fetch. Could be hundreds of these
138
138
  invitations: Partial<InvitationExt>[];
139
139
  coordinates?: Coordinates[];
140
+ venueServiceId?: string;
141
+ venueOwner?: {
142
+ id: string;
143
+ email: string;
144
+ givenName?: string;
145
+ familyName?: string;
146
+ };
147
+ sponsorships?: Array<{
148
+ sponsorId: string;
149
+ sponsorEmail: string;
150
+ name?: string;
151
+ }>;
140
152
  }
141
153
 
142
154
  export const TICKET_TIER_DATA_TO_INCLUDE = {
@@ -632,7 +644,7 @@ export const INVITATION_DATA_TO_INCLUDE = {
632
644
  } satisfies Prisma.InvitationInclude;
633
645
 
634
646
  export interface InvitationExtraData extends Invitation {
635
- isFreeGuest?: boolean;
647
+ isFreeGuest: boolean;
636
648
  isOrganizer?: boolean;
637
649
  }
638
650
 
@@ -1,13 +1,14 @@
1
1
  import { StripeLinkingStatus } from "../definitions";
2
- import { isProduction } from "./apiUtils";
3
2
 
4
3
  export const stripeAccountFullyLinked = (
5
- linkingStatus: StripeLinkingStatus
4
+ linkingStatus: StripeLinkingStatus | null | undefined
6
5
  ): boolean => {
7
6
  return (
7
+ linkingStatus != null &&
8
8
  !linkingStatus.hasOutstandingRequirements &&
9
9
  linkingStatus.isOnboarded &&
10
10
  linkingStatus.paymentsEnabled &&
11
- (!isProduction() || linkingStatus.taxMonitoringEnabled)
11
+ linkingStatus.taxMonitoringEnabled
12
+ // (!isProduction() || linkingStatus.taxMonitoringEnabled);
12
13
  );
13
14
  };