@bash-app/bash-common 27.6.0 → 27.8.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": "27.6.0",
3
+ "version": "27.8.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",
@@ -17,7 +17,7 @@ model Club {
17
17
  street String
18
18
  userId String
19
19
  price Int?
20
- events BashEvent[]
20
+ events BashEvent[]
21
21
  members ClubMember[]
22
22
  admin ClubAdmin[]
23
23
  }
@@ -862,8 +862,6 @@ model User {
862
862
  sponsor Sponsor[]
863
863
  venue Venue[]
864
864
  organization Organization[]
865
- venueCreator Venue[] @relation("VenueProfileOwner")
866
- venueOwner Venue[] @relation("VenueProfileCreator")
867
865
  }
868
866
 
869
867
  model Contact {
@@ -897,37 +895,36 @@ model AssociatedBash {
897
895
 
898
896
  model Service {
899
897
  id String @id @default(cuid())
900
- // ownerId String
901
- // owner PublicUser @relation(fields: [ownerId], references: [id], onDelete: Cascade)
898
+ // ownerId String
899
+ // owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
902
900
  // stripeServiceCustomerId String? @unique
903
- stripeBusinessId String? @unique
901
+ stripeBusinessId String @unique
904
902
  // stripeBusinessType String @default("Individual")
905
- serviceType ServiceTypes
906
- creatorId String?
907
- creator User? @relation("CreatedService", fields: [creatorId], references: [id], onDelete: Cascade)
908
- createdAt DateTime @default(now())
909
- updatedAt DateTime @updatedAt
910
- email String?
903
+ serviceType ServiceTypes
904
+ creatorId String
905
+ creator User @relation("CreatedService", fields: [creatorId], references: [id], onDelete: Cascade)
906
+ dateCreated DateTime @default(now())
907
+ email String
911
908
  place String?
912
- street String?
913
- city String?
914
- state String?
915
- zipCode String?
916
- country String?
917
- phone String?
918
- name String? @default("New Service")
909
+ street String
910
+ city String
911
+ state String
912
+ zipCode String
913
+ country String
914
+ phone String
915
+ name String @default("New Service")
919
916
  coverPhoto String?
920
917
  agreedToAgreement Boolean?
921
918
  media Media[]
922
919
  customServiceTag String[]
923
- yearsOfExperince YearsOfExperience? @default(LessThanOneYear)
920
+ yearsOfExperince YearsOfExperience @default(LessThanOneYear)
924
921
  serviceLinks ServiceLink[]
925
922
  description String?
926
923
  canContact Boolean?
927
924
  // musicGenre MusicGenreType?
928
- visibility VisibilityPreference? @default(Public)
925
+ visibility VisibilityPreference @default(Public)
929
926
  // bashesInterestedIn BashEventType[]
930
- status ServiceStatus? @default(Draft)
927
+ status ServiceStatus @default(Draft)
931
928
  venues Venue[]
932
929
  targetAudienceId String? @unique
933
930
  targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
@@ -980,34 +977,32 @@ model VolunteerService {
980
977
  address String?
981
978
  email String?
982
979
  phone String?
983
- agreedToAgreement Boolean? @default(false)
980
+ agreedToAgreement Boolean? @default(false)
984
981
  description String?
985
982
  status VolunteerServiceStatus?
986
983
  }
987
984
 
988
985
  model EventService {
989
986
  id String @id @default(cuid())
990
- creatorId String?
991
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
992
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
993
- serviceId String?
994
- serviceConnectionId String?
995
- serviceConnection String?
996
- name String?
987
+ ownerId String
988
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
989
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
990
+ serviceId String
991
+ eventServiceName String
997
992
  eventServiceTypes EventServiceType[]
998
993
  eventServiceSubType String?
999
- email String?
1000
- street String?
1001
- city String?
1002
- state String?
1003
- zipCode String?
1004
- country String?
1005
- phone String?
994
+ email String
995
+ street String
996
+ city String
997
+ state String
998
+ zipCode String
999
+ country String
1000
+ phone String
1006
1001
  coverPhoto String?
1007
1002
  media Media[]
1008
- visibility VisibilityPreference? @default(Public)
1009
- status ServiceStatus ? @default(Draft)
1010
- yearsOfExperience YearsOfExperience?
1003
+ visibility VisibilityPreference @default(Public)
1004
+ status ServiceStatus @default(Draft)
1005
+ yearsOfExperience YearsOfExperience
1011
1006
  description String?
1012
1007
  crowdSizeId String? @unique
1013
1008
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
@@ -1032,28 +1027,26 @@ model EventService {
1032
1027
 
1033
1028
  model EntertainmentService {
1034
1029
  id String @id @default(cuid())
1035
- creatorId String?
1036
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1037
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1038
- serviceId String?
1039
- serviceConnectionId String?
1040
- serviceConnection String?
1041
- name String?
1030
+ ownerId String
1031
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1032
+ service Service @relation(fields: [serviceId], references: [id])
1033
+ serviceId String
1034
+ entertainmentServiceName String
1042
1035
  entertainmentServiceTypes EntertainmentServiceType[]
1043
1036
  entertainmentServiceSubType String?
1044
1037
  genre MusicGenreType?
1045
- email String?
1046
- street String?
1047
- city String?
1048
- state String?
1049
- zipCode String?
1050
- country String?
1051
- phone String?
1038
+ email String
1039
+ street String
1040
+ city String
1041
+ state String
1042
+ zipCode String
1043
+ country String
1044
+ phone String
1052
1045
  coverPhoto String?
1053
1046
  media Media[]
1054
- visibility VisibilityPreference? @default(Public)
1055
- status ServiceStatus? @default(Draft)
1056
- yearsOfExperience YearsOfExperience?
1047
+ visibility VisibilityPreference @default(Public)
1048
+ status ServiceStatus @default(Draft)
1049
+ yearsOfExperience YearsOfExperience
1057
1050
  description String?
1058
1051
  crowdSizeId String? @unique
1059
1052
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
@@ -1077,25 +1070,23 @@ model EntertainmentService {
1077
1070
 
1078
1071
  model Vendor {
1079
1072
  id String @id @default(cuid())
1080
- creatorId String?
1081
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1082
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1083
- serviceId String?
1084
- serviceConnectionId String?
1085
- serviceConnection String?
1086
- name String?
1087
- email String?
1088
- street String?
1089
- city String?
1090
- state String?
1091
- zipCode String?
1092
- country String?
1093
- phone String?
1073
+ ownerId String
1074
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1075
+ service Service @relation(fields: [serviceId], references: [id])
1076
+ serviceId String
1077
+ vendorName String
1078
+ email String
1079
+ street String
1080
+ city String
1081
+ state String
1082
+ zipCode String
1083
+ country String
1084
+ phone String
1094
1085
  coverPhoto String?
1095
1086
  media Media[]
1096
- visibility VisibilityPreference? @default(Public)
1097
- status ServiceStatus ? @default(Draft)
1098
- yearsOfExperience YearsOfExperience?
1087
+ visibility VisibilityPreference @default(Public)
1088
+ status ServiceStatus @default(Draft)
1089
+ yearsOfExperience YearsOfExperience
1099
1090
  description String?
1100
1091
  crowdSizeId String? @unique
1101
1092
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
@@ -1120,24 +1111,22 @@ model Vendor {
1120
1111
 
1121
1112
  model Exhibitor {
1122
1113
  id String @id @default(cuid())
1123
- creatorId String?
1124
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1125
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1126
- serviceId String?
1127
- serviceConnectionId String?
1128
- serviceConnection String?
1129
- name String?
1130
- email String?
1131
- street String?
1132
- city String?
1133
- state String?
1134
- zipCode String?
1135
- country String?
1136
- phone String?
1114
+ ownerId String
1115
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1116
+ service Service @relation(fields: [serviceId], references: [id])
1117
+ serviceId String
1118
+ exhibitorName String
1119
+ email String
1120
+ street String
1121
+ city String
1122
+ state String
1123
+ zipCode String
1124
+ country String
1125
+ phone String
1137
1126
  coverPhoto String?
1138
1127
  media Media[]
1139
- visibility VisibilityPreference? @default(Public)
1140
- yearsOfExperience YearsOfExperience?
1128
+ visibility VisibilityPreference @default(Public)
1129
+ yearsOfExperience YearsOfExperience
1141
1130
  description String?
1142
1131
  crowdSizeId String? @unique
1143
1132
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
@@ -1147,7 +1136,7 @@ model Exhibitor {
1147
1136
  goodsOrServices String[]
1148
1137
  venueTypes String[]
1149
1138
  availableDateTimes Availability[] @relation("AvailableDateTimes")
1150
- status ServiceStatus ? @default(Draft)
1139
+ status ServiceStatus @default(Draft)
1151
1140
  mission String?
1152
1141
  communityInvolvement String?
1153
1142
  emergencyContact String?
@@ -1162,25 +1151,23 @@ model Exhibitor {
1162
1151
 
1163
1152
  model Sponsor {
1164
1153
  id String @id @default(cuid())
1165
- creatorId String?
1166
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1167
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1168
- serviceId String?
1169
- serviceConnectionId String?
1170
- serviceConnection String?
1171
- name String?
1172
- email String?
1173
- street String?
1174
- city String?
1175
- state String?
1176
- zipCode String?
1177
- country String?
1178
- phone String?
1154
+ ownerId String
1155
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1156
+ service Service @relation(fields: [serviceId], references: [id])
1157
+ serviceId String
1158
+ sponsorName String
1159
+ email String
1160
+ street String
1161
+ city String
1162
+ state String
1163
+ zipCode String
1164
+ country String
1165
+ phone String
1179
1166
  coverPhoto String?
1180
1167
  media Media[]
1181
- visibility VisibilityPreference? @default(Public)
1182
- status ServiceStatus ? @default(Draft)
1183
- yearsOfExperience YearsOfExperience?
1168
+ visibility VisibilityPreference @default(Public)
1169
+ status ServiceStatus @default(Draft)
1170
+ yearsOfExperience YearsOfExperience
1184
1171
  description String?
1185
1172
  crowdSizeId String? @unique
1186
1173
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
@@ -1204,15 +1191,13 @@ model Sponsor {
1204
1191
 
1205
1192
  model Venue {
1206
1193
  id String @id @default(cuid())
1207
- creatorId String?
1208
- creator User? @relation("VenueProfileCreator", fields: [creatorId], references: [id], onDelete: Cascade)
1194
+ ownerId String
1195
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1209
1196
  service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1210
1197
  serviceId String?
1211
1198
  serviceConnectionId String?
1212
1199
  serviceConnection String?
1213
- ownerId String?
1214
- owner User? @relation("VenueProfileOwner", fields: [ownerId], references: [id], onDelete: Cascade)
1215
- name String?
1200
+ venueName String?
1216
1201
  email String?
1217
1202
  place String?
1218
1203
  street String?
@@ -1252,30 +1237,27 @@ model Venue {
1252
1237
  amountOfGuestsId String? @unique
1253
1238
  trademark Boolean?
1254
1239
  manager Boolean?
1255
- user User[]
1256
1240
  }
1257
1241
 
1258
1242
  model Organization {
1259
1243
  id String @id @default(cuid())
1260
- creatorId String?
1261
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1262
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1244
+ ownerId String
1245
+ owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1246
+ service Service? @relation(fields: [serviceId], references: [id])
1263
1247
  serviceId String?
1264
- serviceConnectionId String?
1265
- serviceConnection String?
1266
- name String?
1248
+ organizationName String
1267
1249
  organizationType OrganizationType[]
1268
- email String?
1269
- street String?
1270
- city String?
1271
- state String?
1272
- zipCode String?
1273
- country String?
1274
- phone String?
1250
+ email String
1251
+ street String
1252
+ city String
1253
+ state String
1254
+ zipCode String
1255
+ country String
1256
+ phone String
1275
1257
  coverPhoto String?
1276
1258
  media Media[]
1277
- visibility VisibilityPreference? @default(Public)
1278
- status ServiceStatus? @default(Draft)
1259
+ visibility VisibilityPreference @default(Public)
1260
+ status ServiceStatus @default(Draft)
1279
1261
  description String?
1280
1262
  crowdSizeId String? @unique
1281
1263
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
@@ -91,25 +91,6 @@ export type ContactOrUser = Contact | PublicUser;
91
91
  export type UnionFromArray<T extends ReadonlyArray<any>> = T[number];
92
92
  export type ValueOf<T> = T[keyof T];
93
93
 
94
- export type ValueOfServiceType = typeof ServiceTypes[keyof typeof ServiceTypes];
95
-
96
- export const ServiceTypes = {
97
- 'EventServices': 'eventServices',
98
- 'Organizations': 'organizations',
99
- 'Venues': 'venues',
100
- 'Vendors': 'vendors',
101
- 'Sponsors': 'sponsors',
102
- 'Exhibitors': 'exhibitors',
103
- 'EntertainmentServices': 'entertainmentServices',
104
- } as const;
105
-
106
- export type ValueOfServiceStatus = typeof ServiceStatus[keyof typeof ServiceStatus];
107
-
108
- export const ServiceStatus = {
109
- 'Draft': 'draft',
110
- 'Created': 'created',
111
- } as const;
112
-
113
94
  export type FilterFields = {
114
95
  price: string[];
115
96
  ageRequirement: string[];
@@ -322,19 +303,6 @@ export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } =
322
303
  [YearsOfExperience.FivePlusYears]: 'More than five years',
323
304
  };
324
305
 
325
- export type ServiceTypeToStringType = {
326
- [key in ValueOf<typeof ServiceTypes>]: string;
327
- };
328
- export const ServiceTypeToString: ServiceTypeToStringType = {
329
- [ServiceTypes.EventServices]: "/servicesDefault.webp",
330
- [ServiceTypes.EntertainmentServices]: "/servicesDefault.webp",
331
- [ServiceTypes.Vendors]: "/servicesDefault.webp",
332
- [ServiceTypes.Exhibitors]: "/servicesDefault.webp",
333
- [ServiceTypes.Sponsors]: "/servicesDefault.webp",
334
- [ServiceTypes.Venues]: "/servicesDefault.webp",
335
- [ServiceTypes.Organizations]: "/servicesDefault.webp"
336
- }
337
-
338
306
  export type BashEventTypeToStringType = {
339
307
  [key in BashEventType]: string;
340
308
  };
@@ -13,8 +13,6 @@ import {
13
13
  ServiceLink,
14
14
  Link, Venue, Availability,
15
15
  TargetAudience,
16
- ServiceStatus,
17
- VolunteerServiceStatus,
18
16
  Vendor,
19
17
  EventService,
20
18
  EntertainmentService,
@@ -23,7 +21,6 @@ import {
23
21
  Organization,
24
22
  Booking,
25
23
  VolunteerService, Prisma, ServiceRange,
26
- ServiceTypes,
27
24
  } from "@prisma/client";
28
25
  import {UnionFromArray} from "./definitions";
29
26
 
@@ -157,7 +154,6 @@ export interface EventServiceExt extends EventService {
157
154
  links: ServiceLinkExt[];
158
155
  crowdSize?: AmountOfGuests;
159
156
  media?: Media[];
160
- serviceType: ServiceTypes;
161
157
  }
162
158
 
163
159
  export interface EntertainmentServiceExt extends EntertainmentService {
@@ -167,8 +163,6 @@ export interface EntertainmentServiceExt extends EntertainmentService {
167
163
  links: ServiceLinkExt[];
168
164
  crowdSize?: AmountOfGuests;
169
165
  media?: Media[];
170
- status: ServiceStatus;
171
- serviceType: ServiceTypes;
172
166
  }
173
167
 
174
168
  export interface ExhibitorExt extends Exhibitor {
@@ -178,8 +172,6 @@ export interface ExhibitorExt extends Exhibitor {
178
172
  links: ServiceLinkExt[];
179
173
  crowdSize?: AmountOfGuests;
180
174
  media?: Media[];
181
- status: ServiceStatus;
182
- serviceType: ServiceTypes;
183
175
  }
184
176
 
185
177
  export interface SponsorExt extends Sponsor {
@@ -189,8 +181,6 @@ export interface SponsorExt extends Sponsor {
189
181
  links: ServiceLinkExt[];
190
182
  crowdSize?: AmountOfGuests;
191
183
  media?: Media[];
192
- status: ServiceStatus;
193
- serviceType: ServiceTypes;
194
184
  }
195
185
 
196
186
  export interface VendorExt extends Vendor {
@@ -200,8 +190,6 @@ export interface VendorExt extends Vendor {
200
190
  links: ServiceLinkExt[];
201
191
  crowdSize?: AmountOfGuests;
202
192
  media?: Media[];
203
- status: ServiceStatus;
204
- serviceType: ServiceTypes;
205
193
  }
206
194
 
207
195
  export interface VenueExt extends Venue {
@@ -214,8 +202,6 @@ export interface VenueExt extends Venue {
214
202
  coverPhotoUrl?: string;
215
203
  media?: Media[];
216
204
  amountOfGuests?: AmountOfGuests | null;
217
- status: ServiceStatus;
218
- serviceType: ServiceTypes;
219
205
  }
220
206
 
221
207
  export interface OrganizationExt extends Organization {
@@ -225,8 +211,6 @@ export interface OrganizationExt extends Organization {
225
211
  links: ServiceLinkExt[];
226
212
  crowdSize?: AmountOfGuests;
227
213
  media?: Media[];
228
- status: ServiceStatus;
229
- serviceType: ServiceTypes;
230
214
  }
231
215
 
232
216
  export interface VolunteerServiceExt extends VolunteerService {
@@ -235,12 +219,6 @@ export interface VolunteerServiceExt extends VolunteerService {
235
219
  media?: Media[];
236
220
  links?: Link[];
237
221
  availableDateTimes?: Availability[];
238
- fullName: string | null;
239
- address: string | null;
240
- email: string | null;
241
- phone: string | null;
242
- description: string | null;
243
- status: VolunteerServiceStatus | null;
244
222
  }
245
223
 
246
224
  export interface ServiceExt extends Service {
@@ -259,7 +237,6 @@ targetAudience?: TargetAudience | null;
259
237
  sponsors?: Sponsor[];
260
238
  organizations?: Organization[];
261
239
  bookings?: Booking[];
262
- serviceType: ServiceTypes;
263
240
  }
264
241
 
265
242
 
@@ -348,7 +325,7 @@ export interface UserExtraData extends User {
348
325
  }
349
326
 
350
327
  export interface UserExt extends User {
351
- servicees?: Service[] | null;
328
+ services?: Service[] | null;
352
329
 
353
330
  // Do not include in fetch as there could be thousands of these
354
331
  associatedBashes?: AssociatedBash[] | null;