@bash-app/bash-common 29.19.36 → 29.20.2
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 +21 -39
- package/src/definitions.ts +10 -0
- package/src/extendedSchemas.ts +21 -21
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1332,10 +1332,10 @@ enum ServiceRateType {
|
|
|
1332
1332
|
//can optionally be associated with a package
|
|
1333
1333
|
model ServiceAddon {
|
|
1334
1334
|
id String @id @default(cuid())
|
|
1335
|
-
name String
|
|
1336
|
-
description String
|
|
1335
|
+
name String
|
|
1336
|
+
description String
|
|
1337
1337
|
price Int?
|
|
1338
|
-
quantity Int
|
|
1338
|
+
quantity Int
|
|
1339
1339
|
|
|
1340
1340
|
servicePackage ServicePackage? @relation(fields: [servicePackageId], references: [id], onDelete: Cascade)
|
|
1341
1341
|
servicePackageId String?
|
|
@@ -1358,61 +1358,39 @@ model ServicePackage {
|
|
|
1358
1358
|
|
|
1359
1359
|
model ServiceRate {
|
|
1360
1360
|
id String @id @default(cuid())
|
|
1361
|
-
rateType ServiceRateType
|
|
1361
|
+
rateType ServiceRateType
|
|
1362
1362
|
hourlyRate Int?
|
|
1363
1363
|
dailyRate Int?
|
|
1364
|
+
serviceSpecialRates ServiceSpecialRates?
|
|
1364
1365
|
serviceDailyRates ServiceDailyRates?
|
|
1365
|
-
|
|
1366
|
+
serviceRatesAssociation ServiceRatesAssociation?
|
|
1366
1367
|
|
|
1367
1368
|
@@index([rateType])
|
|
1368
|
-
serviceSpecialDailyRates ServiceSpecialRates[] @relation("SpecialDailyRate")
|
|
1369
|
-
serviceSpecialHourlyRates ServiceSpecialRates[] @relation("SpecialHourlyRate")
|
|
1370
1369
|
}
|
|
1371
1370
|
|
|
1372
1371
|
model ServiceSpecialRates {
|
|
1373
|
-
id String @id @default(cuid())
|
|
1374
|
-
startDate DateTime @db.Date
|
|
1375
|
-
endDate DateTime @db.Date
|
|
1376
|
-
|
|
1377
|
-
specialHourlyRateId String?
|
|
1378
|
-
specialHourlyRate ServiceRate? @relation("SpecialHourlyRate", fields: [specialHourlyRateId], references: [id], onDelete: Cascade)
|
|
1379
|
-
|
|
1380
|
-
specialDailyRateId String?
|
|
1381
|
-
specialDailyRate ServiceRate? @relation("SpecialDailyRate", fields: [specialDailyRateId], references: [id], onDelete: Cascade)
|
|
1382
|
-
|
|
1383
|
-
isAvailable Boolean
|
|
1384
|
-
|
|
1385
|
-
serviceRatesAssociationId String?
|
|
1386
|
-
|
|
1387
|
-
@@unique([specialHourlyRateId])
|
|
1388
|
-
@@unique([specialDailyRateId])
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
// different days of the week have different rates
|
|
1393
|
-
// can block of certain dates of the year and days of the week as being closed
|
|
1394
|
-
// can have special rates on different days of the year (single or range)
|
|
1395
|
-
// free trial period with promo code (1 or 2 months of listing for free)
|
|
1396
|
-
model ServiceDailyRates {
|
|
1397
1372
|
id String @id @default(cuid())
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
endTime DateTime @db.Time
|
|
1373
|
+
startDate DateTime @db.Date
|
|
1374
|
+
endDate DateTime @db.Date
|
|
1401
1375
|
|
|
1402
1376
|
serviceRateId String?
|
|
1403
1377
|
serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
|
|
1378
|
+
isAvailable Boolean
|
|
1404
1379
|
|
|
1405
1380
|
serviceRatesAssociation ServiceRatesAssociation?
|
|
1406
1381
|
|
|
1407
1382
|
@@unique([serviceRateId])
|
|
1408
1383
|
}
|
|
1409
1384
|
|
|
1410
|
-
|
|
1385
|
+
// different days of the week have different rates
|
|
1386
|
+
// can block of certain dates of the year and days of the week as being closed
|
|
1387
|
+
// can have special rates on different days of the year (single or range)
|
|
1388
|
+
// free trial period with promo code (1 or 2 months of listing for free)
|
|
1389
|
+
model ServiceDailyRates {
|
|
1411
1390
|
id String @id @default(cuid())
|
|
1412
1391
|
dayOfWeek Int
|
|
1413
1392
|
startTime DateTime @db.Time
|
|
1414
1393
|
endTime DateTime @db.Time
|
|
1415
|
-
numberOfHours Int?
|
|
1416
1394
|
|
|
1417
1395
|
serviceRateId String?
|
|
1418
1396
|
serviceRate ServiceRate? @relation(fields: [serviceRateId], references: [id], onDelete: Cascade)
|
|
@@ -1430,19 +1408,23 @@ model ServiceRatesAssociation {
|
|
|
1430
1408
|
volunteerServiceId String?
|
|
1431
1409
|
volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id], onDelete: Cascade)
|
|
1432
1410
|
|
|
1433
|
-
|
|
1434
|
-
|
|
1411
|
+
serviceGeneralRatesId String?
|
|
1412
|
+
serviceGeneralRates ServiceRate? @relation(fields: [serviceGeneralRatesId], references: [id], onDelete: Cascade)
|
|
1435
1413
|
|
|
1436
1414
|
serviceDailyRatesId String?
|
|
1437
1415
|
serviceDailyRates ServiceDailyRates? @relation(fields: [serviceDailyRatesId], references: [id], onDelete: Cascade)
|
|
1438
1416
|
|
|
1417
|
+
serviceSpecialRatesId String?
|
|
1418
|
+
serviceSpecialRates ServiceSpecialRates? @relation(fields: [serviceSpecialRatesId], references: [id], onDelete: Cascade)
|
|
1419
|
+
|
|
1439
1420
|
addons ServiceAddon[]
|
|
1440
1421
|
packages ServicePackage[]
|
|
1441
1422
|
|
|
1442
1423
|
@@unique([serviceId])
|
|
1443
1424
|
@@unique([volunteerServiceId])
|
|
1444
|
-
@@unique([
|
|
1425
|
+
@@unique([serviceGeneralRatesId])
|
|
1445
1426
|
@@unique([serviceDailyRatesId])
|
|
1427
|
+
@@unique([serviceSpecialRatesId])
|
|
1446
1428
|
}
|
|
1447
1429
|
|
|
1448
1430
|
enum VisibilityPreference {
|
package/src/definitions.ts
CHANGED
|
@@ -229,6 +229,16 @@ export interface SignInEmailWithPassword {
|
|
|
229
229
|
password: string;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
export interface ForgotPassword {
|
|
233
|
+
email: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface ResetPassword {
|
|
237
|
+
email: string;
|
|
238
|
+
password: string;
|
|
239
|
+
otp: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
232
242
|
export interface ApiResult<T, P extends ErrorDataType = ErrorDataType> {
|
|
233
243
|
data?: T;
|
|
234
244
|
status?: number;
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -181,27 +181,27 @@ export const SERVICE_PACKAGE_DATA_TO_INCLUDE = {
|
|
|
181
181
|
serviceAddons: true
|
|
182
182
|
} satisfies Prisma.ServicePackageInclude;
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
184
|
+
export const SERVICE_DAILYRATES_DATA_TO_INCLUDE = {
|
|
185
|
+
serviceRate: true
|
|
186
|
+
} satisfies Prisma.ServiceDailyRatesInclude;
|
|
187
|
+
|
|
188
|
+
export const SERVICE_SPECIALRATES_DATA_TO_INCLUDE = {
|
|
189
|
+
serviceRate: true
|
|
190
|
+
} satisfies Prisma.ServiceSpecialRatesInclude;
|
|
191
|
+
|
|
192
|
+
export const SERVICE_RATES_ASSOCIATION_DATA_TO_INCLUDE = {
|
|
193
|
+
serviceGeneralRates: true,
|
|
194
|
+
serviceDailyRates: {
|
|
195
|
+
include: SERVICE_DAILYRATES_DATA_TO_INCLUDE
|
|
196
|
+
},
|
|
197
|
+
serviceSpecialRates: {
|
|
198
|
+
include: SERVICE_SPECIALRATES_DATA_TO_INCLUDE
|
|
199
|
+
},
|
|
200
|
+
addons: true,
|
|
201
|
+
packages: {
|
|
202
|
+
include: SERVICE_PACKAGE_DATA_TO_INCLUDE
|
|
203
|
+
},
|
|
204
|
+
} satisfies Prisma.ServiceRatesAssociationInclude;
|
|
205
205
|
|
|
206
206
|
export interface BashNotificationExt extends BashNotification {
|
|
207
207
|
creator?: PublicUser;
|