@bash-app/bash-common 29.18.7 → 29.18.9
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 +1 -1
- package/prisma/schema.prisma +15 -4
- package/src/definitions.ts +29 -2
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -227,7 +227,8 @@ model BashEvent {
|
|
|
227
227
|
dateTimePublished DateTime?
|
|
228
228
|
comments BashComment[]
|
|
229
229
|
includedItems String[]
|
|
230
|
-
associatedBashesReferencingMe AssociatedBash[]
|
|
230
|
+
associatedBashesReferencingMe AssociatedBash[] //maybe rename later to AssociatedWithABash
|
|
231
|
+
associatedServicesReferencingMe Service[] //maybe rename later to AssociatedWithAService
|
|
231
232
|
bashNotificationsReferencingMe BashNotification[]
|
|
232
233
|
checkouts Checkout[]
|
|
233
234
|
eventTasks EventTask[]
|
|
@@ -915,6 +916,7 @@ model Contact {
|
|
|
915
916
|
@@index([contactEmail])
|
|
916
917
|
}
|
|
917
918
|
|
|
919
|
+
//anyone that is invited to the bash, is an organizer of a bash, and or the creator/owner of the bash...for having others (including services) edit or post about a bash in the bashfeed
|
|
918
920
|
model AssociatedBash {
|
|
919
921
|
id String @id @default(cuid())
|
|
920
922
|
bashEventId String
|
|
@@ -926,10 +928,13 @@ model AssociatedBash {
|
|
|
926
928
|
owner User? @relation(fields: [ownerUserId], references: [id], onDelete: Cascade)
|
|
927
929
|
isOrganizer Boolean?
|
|
928
930
|
isFavorite Boolean?
|
|
931
|
+
service Service[]
|
|
929
932
|
|
|
930
933
|
@@unique([ownerEmail, bashEventId])
|
|
934
|
+
|
|
931
935
|
}
|
|
932
936
|
|
|
937
|
+
//anyone that is invited to be an organizer of a service profile or is the creator/owner...for having others edit or post about a service in the bashfeed (but the service must be associated with a bash to post)
|
|
933
938
|
model AssociatedService {
|
|
934
939
|
id String @id @default(cuid())
|
|
935
940
|
serviceId String
|
|
@@ -964,6 +969,7 @@ model Service {
|
|
|
964
969
|
createdAt DateTime @default(now())
|
|
965
970
|
updatedAt DateTime @updatedAt
|
|
966
971
|
|
|
972
|
+
associatedBashesReferencingMe AssociatedBash[]
|
|
967
973
|
associatedServicesReferencingMe AssociatedService[]
|
|
968
974
|
|
|
969
975
|
serviceName String?
|
|
@@ -1021,6 +1027,8 @@ model Service {
|
|
|
1021
1027
|
organization Organization?
|
|
1022
1028
|
|
|
1023
1029
|
// googleReviews GoogleReview[]
|
|
1030
|
+
|
|
1031
|
+
bashEvent BashEvent[] //because a service needs to be associated with a bash to post to the bashfeed
|
|
1024
1032
|
}
|
|
1025
1033
|
|
|
1026
1034
|
model StripeAccount {
|
|
@@ -1240,11 +1248,14 @@ model ServiceRange {
|
|
|
1240
1248
|
Sponsor Sponsor[]
|
|
1241
1249
|
}
|
|
1242
1250
|
|
|
1251
|
+
//different days of the week have different rates
|
|
1252
|
+
//can block of certain dates of the year and days of the week as being closed
|
|
1253
|
+
//can have special rates on different days of the year (single or range)
|
|
1243
1254
|
model Availability {
|
|
1244
1255
|
id String @id @default(cuid())
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1256
|
+
dayOfWeek Int
|
|
1257
|
+
startDateTime DateTime @db.Time
|
|
1258
|
+
endDateTime DateTime @db.Time
|
|
1248
1259
|
serviceId String?
|
|
1249
1260
|
service Service? @relation("AvailableDateTimes", fields: [serviceId], references: [id])
|
|
1250
1261
|
volunteerServiceId String?
|
package/src/definitions.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
User,
|
|
13
13
|
YearsOfExperience
|
|
14
14
|
} from "@prisma/client";
|
|
15
|
-
import { ServiceExt, CheckoutExt, PublicUser, VolunteerServiceExt,
|
|
15
|
+
import { ServiceExt, CheckoutExt, PublicUser, VolunteerServiceExt, BashEventExt} from "./extendedSchemas";
|
|
16
16
|
|
|
17
17
|
export const PASSWORD_MIN_LENGTH = 10 as const;
|
|
18
18
|
export const PASSWORD_REQUIREMENTS_REGEX = new RegExp(String.raw`^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{${PASSWORD_MIN_LENGTH},}$`);
|
|
@@ -285,10 +285,37 @@ export interface StripeCreateBashEventDonationCheckoutSessionArgs {
|
|
|
285
285
|
donationAmount: number;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
export
|
|
288
|
+
export type StripeSessionRedirect = {
|
|
289
289
|
redirectUrl: string;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
export type ServiceStripeSessionRedirect = {
|
|
293
|
+
service: ServiceExt;
|
|
294
|
+
} & StripeSessionRedirect;
|
|
295
|
+
|
|
296
|
+
export type BashEventStripeSessionRedirect = {
|
|
297
|
+
bashEvent: BashEventExt;
|
|
298
|
+
} & StripeSessionRedirect;
|
|
299
|
+
|
|
300
|
+
export type StripeLinkingStatus = "Complete" | "Incomplete";
|
|
301
|
+
|
|
302
|
+
export interface StripeBusinessDataOwned {
|
|
303
|
+
logo?: string;
|
|
304
|
+
businessName?: string;
|
|
305
|
+
businessNameDBA?: string;
|
|
306
|
+
email: string;
|
|
307
|
+
phone: string;
|
|
308
|
+
website: string;
|
|
309
|
+
address: string;
|
|
310
|
+
accountType: string;
|
|
311
|
+
bankAccount: string;
|
|
312
|
+
paymentsEnabled: boolean;
|
|
313
|
+
createdDate: Date;
|
|
314
|
+
updatedDate: Date;
|
|
315
|
+
linkingStatus: StripeLinkingStatus; //enum
|
|
316
|
+
taxMonitoringEnabled: boolean;
|
|
317
|
+
}
|
|
318
|
+
|
|
292
319
|
export interface StripeConfirmPayment {
|
|
293
320
|
checkoutSessionId: string;
|
|
294
321
|
}
|