@bash-app/bash-common 20.5.2 → 21.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": "20.5.2",
3
+ "version": "21.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",
@@ -11,15 +11,6 @@ datasource db {
11
11
  directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
12
12
  }
13
13
 
14
- model Business {
15
- id String @id @default(cuid())
16
- name String
17
- ein String?
18
- dba String?
19
- address String?
20
- media Media[]
21
- }
22
-
23
14
  model Club {
24
15
  id String @id @default(cuid())
25
16
  name String
@@ -353,7 +344,7 @@ enum BookingStatus {
353
344
  model Booking {
354
345
  id String @id @default(cuid())
355
346
  serviceId String
356
- service Service @relation(fields: [serviceId], references: [id])
347
+ service Business @relation(fields: [serviceId], references: [id])
357
348
  validDate DateTime?
358
349
  forUserId String?
359
350
  forUser User? @relation(fields: [forUserId], references: [id])
@@ -582,7 +573,7 @@ model TargetAudience {
582
573
  showOnDetailPage Boolean @default(true)
583
574
 
584
575
  bashEvent BashEvent?
585
- service Service?
576
+ service Business?
586
577
  venue Venue?
587
578
  vendor Vendor?
588
579
  eventService EventService?
@@ -699,9 +690,8 @@ model Media {
699
690
  type MediaType
700
691
  mimetype String?
701
692
  bashEventsReferencingMe BashEvent[]
702
- businessesReferencingMe Business[]
703
693
  sponsoredEventsReferencingMe SponsoredEvent[]
704
- servicesReferencingMe Service[]
694
+ businessesReferencingMe Business[]
705
695
  venueReferencingMe Venue[]
706
696
  EventService EventService? @relation(fields: [eventServiceId], references: [id])
707
697
  eventServiceId String?
@@ -808,7 +798,7 @@ model User {
808
798
  gender Gender?
809
799
  sex Sex?
810
800
  roles UserRole[] @default([User])
811
- services Service[]
801
+ services Business[]
812
802
  createdEvents BashEvent[] @relation("CreatedEvent")
813
803
  ticketsISent Ticket[] @relation("TicketsISent")
814
804
  ticketsIOwn Ticket[] @relation("TicketsIOwn")
@@ -885,7 +875,7 @@ model AssociatedBash {
885
875
  @@unique([ownerEmail, bashEventId])
886
876
  }
887
877
 
888
- model Service {
878
+ model Business {
889
879
  id String @id @default(cuid())
890
880
  ownerId String
891
881
  owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
@@ -938,7 +928,7 @@ model Service {
938
928
 
939
929
  model EventService {
940
930
  id String @id @default(cuid())
941
- service Service? @relation(fields: [serviceId], references: [id])
931
+ service Business? @relation(fields: [serviceId], references: [id])
942
932
  serviceId String?
943
933
  eventServiceName String
944
934
  eventServiceTypes EventServiceType[]
@@ -979,7 +969,7 @@ model EventService {
979
969
 
980
970
  model EntertainmentService {
981
971
  id String @id @default(cuid())
982
- service Service? @relation(fields: [serviceId], references: [id])
972
+ service Business? @relation(fields: [serviceId], references: [id])
983
973
  serviceId String?
984
974
  entertainmentServiceName String
985
975
  entertainmentServiceTypes EntertainmentServiceType[]
@@ -1020,7 +1010,7 @@ model EntertainmentService {
1020
1010
 
1021
1011
  model Vendor {
1022
1012
  id String @id @default(cuid())
1023
- service Service? @relation(fields: [serviceId], references: [id])
1013
+ service Business? @relation(fields: [serviceId], references: [id])
1024
1014
  serviceId String?
1025
1015
  vendorName String
1026
1016
  email String
@@ -1059,7 +1049,7 @@ model Vendor {
1059
1049
 
1060
1050
  model Exhibitor {
1061
1051
  id String @id @default(cuid())
1062
- service Service? @relation(fields: [serviceId], references: [id])
1052
+ service Business? @relation(fields: [serviceId], references: [id])
1063
1053
  serviceId String?
1064
1054
  exhibitorName String
1065
1055
  email String
@@ -1097,7 +1087,7 @@ model Exhibitor {
1097
1087
 
1098
1088
  model Sponsor {
1099
1089
  id String @id @default(cuid())
1100
- service Service? @relation(fields: [serviceId], references: [id])
1090
+ service Business? @relation(fields: [serviceId], references: [id])
1101
1091
  serviceId String?
1102
1092
  sponsorName String
1103
1093
  email String
@@ -1136,7 +1126,7 @@ model Sponsor {
1136
1126
 
1137
1127
  model Venue {
1138
1128
  id String @id @default(cuid())
1139
- service Service @relation(fields: [serviceId], references: [id])
1129
+ service Business @relation(fields: [serviceId], references: [id])
1140
1130
  serviceId String
1141
1131
  venueName String
1142
1132
  email String
@@ -1179,7 +1169,7 @@ model Venue {
1179
1169
 
1180
1170
  model Organization {
1181
1171
  id String @id @default(cuid())
1182
- service Service? @relation(fields: [serviceId], references: [id])
1172
+ service Business? @relation(fields: [serviceId], references: [id])
1183
1173
  serviceId String?
1184
1174
  organizationName String
1185
1175
  organizationType OrganizationType[]
@@ -1284,10 +1274,10 @@ enum YearsOfExperience {
1284
1274
  }
1285
1275
 
1286
1276
  model ServiceRange {
1287
- id String @id @default(cuid())
1288
- min Int @default(0)
1289
- max Int @default(50)
1290
- serviceServiceRange Service? @relation("ServiceRange")
1277
+ id String @id @default(cuid())
1278
+ min Int @default(0)
1279
+ max Int @default(50)
1280
+ serviceServiceRange Business? @relation("ServiceRange")
1291
1281
  }
1292
1282
 
1293
1283
  model Availability {
@@ -1392,7 +1382,7 @@ model VerificationToken {
1392
1382
  model ServiceLink {
1393
1383
  id String @id @default(cuid())
1394
1384
  serviceId String
1395
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1385
+ service Business @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1396
1386
  linkId String
1397
1387
  link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1398
1388
  eventService EventService? @relation(fields: [eventServiceId], references: [id])
@@ -6,7 +6,7 @@ import {
6
6
  Invitation,
7
7
  Ticket,
8
8
  User,
9
- TicketTier, Service, Review, Media, BashComment, Recurrence, Contact,
9
+ TicketTier, Business, Review, Media, BashComment, Recurrence, Contact,
10
10
  BashNotification, BashEventPromoCode,
11
11
  Reminder, ServiceRange,
12
12
  Checkout,
@@ -132,7 +132,7 @@ export const EVENT_TASK_DATA_TO_INCLUDE = {
132
132
 
133
133
 
134
134
  export interface EventServiceExt extends EventService {
135
- service: Service;
135
+ business: Business;
136
136
  availableDateTimes: Availability[];
137
137
  targetAudience: TargetAudience;
138
138
  links: ServiceLinkExt[];
@@ -141,7 +141,7 @@ export interface EventServiceExt extends EventService {
141
141
  }
142
142
 
143
143
  export interface EntertainmentServiceExt extends EntertainmentService {
144
- service: Service;
144
+ business: Business;
145
145
  availableDateTimes: Availability[];
146
146
  targetAudience: TargetAudience;
147
147
  links: ServiceLinkExt[];
@@ -150,7 +150,7 @@ export interface EntertainmentServiceExt extends EntertainmentService {
150
150
  }
151
151
 
152
152
  export interface ExhibitorExt extends Exhibitor {
153
- service: Service;
153
+ business: Business;
154
154
  availableDateTimes: Availability[];
155
155
  targetAudience: TargetAudience;
156
156
  links: ServiceLinkExt[];
@@ -159,7 +159,7 @@ export interface ExhibitorExt extends Exhibitor {
159
159
  }
160
160
 
161
161
  export interface SponsorExt extends Sponsor {
162
- service: Service;
162
+ business: Business;
163
163
  availableDateTimes: Availability[];
164
164
  targetAudience: TargetAudience;
165
165
  links: ServiceLinkExt[];
@@ -168,7 +168,7 @@ export interface SponsorExt extends Sponsor {
168
168
  }
169
169
 
170
170
  export interface VendorExt extends Vendor {
171
- service: Service;
171
+ business: Business;
172
172
  availableDateTimes: Availability[];
173
173
  targetAudience?: TargetAudience;
174
174
  links: ServiceLinkExt[];
@@ -177,7 +177,7 @@ export interface VendorExt extends Vendor {
177
177
  }
178
178
 
179
179
  export interface VenueExt extends Venue {
180
- service: Service;
180
+ business: Business;
181
181
  availableDateTimes: Availability[];
182
182
  targetAudience?: TargetAudience | null;
183
183
  links: ServiceLinkExt[];
@@ -186,7 +186,7 @@ export interface VenueExt extends Venue {
186
186
  }
187
187
 
188
188
  export interface OrganizationExt extends Organization {
189
- service: Service;
189
+ business: Business;
190
190
  availableDateTimes: Availability[];
191
191
  targetAudience: TargetAudience;
192
192
  links: ServiceLinkExt[];
@@ -212,7 +212,7 @@ export const VENDOR_DATA_TO_INCLUDE = {
212
212
  media: true,
213
213
  }
214
214
 
215
- export interface ServiceExt extends Service {
215
+ export interface ServiceExt extends Business {
216
216
  owner: PublicUser;
217
217
  media: Media[];
218
218
  serviceRange: ServiceRange;
@@ -337,7 +337,7 @@ export interface UserExtraData extends User {
337
337
  }
338
338
 
339
339
  export interface UserExt extends User {
340
- services?: Service[] | null;
340
+ services?: Business[] | null;
341
341
 
342
342
  // Do not include in fetch as there could be thousands of these
343
343
  associatedBashes?: AssociatedBash[] | null;