@bash-app/bash-common 6.13.0 → 6.15.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": "6.13.0",
3
+ "version": "6.15.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",
@@ -798,14 +798,15 @@ model Service {
798
798
  id String @id @default(cuid())
799
799
  ownerId String
800
800
  owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
801
- email String @unique
801
+ email String
802
802
  streetAddress String
803
803
  city String
804
804
  state String
805
805
  zipCode String
806
806
  country String
807
+ phone String
807
808
  privacy Privacy @default(Public)
808
- title String?
809
+ title String @unique
809
810
  coverPhoto String?
810
811
  media Media[]
811
812
  serviceTypes ServiceType[]
@@ -825,6 +826,9 @@ model Service {
825
826
  serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
826
827
  availableDateTimes DateTime?
827
828
  serviceTargetAudience ServiceTargetAudience[]
829
+
830
+ @@index([email])
831
+ @@index([phone])
828
832
  }
829
833
 
830
834
  enum ServiceTag {
@@ -26,6 +26,16 @@ export const FRONT_END_USER_DATA_TO_SELECT = {
26
26
  services: true,
27
27
  }
28
28
 
29
+ export const PRIVATE_USER_ACCOUNT_TO_SELECT = {
30
+ ...FRONT_END_USER_DATA_TO_SELECT,
31
+ streetAddress: true,
32
+ city: true,
33
+ state: true,
34
+ zipCode: true,
35
+ country: true,
36
+ phone: true,
37
+ }
38
+
29
39
  export interface BashEventExt extends BashEvent {
30
40
  targetAudience?: TargetAudience;
31
41
  amountOfGuests?: AmountOfGuests;