@bash-app/bash-common 10.5.0 → 10.6.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": "10.5.0",
3
+ "version": "10.6.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",
@@ -555,6 +555,11 @@ enum BashStatus {
555
555
  Published
556
556
  }
557
557
 
558
+ enum ServiceStatus {
559
+ Draft
560
+ Created
561
+ }
562
+
558
563
  model DocumentID {
559
564
  id String @id @default(cuid())
560
565
  givenName String?
@@ -830,6 +835,7 @@ model Service {
830
835
  serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
831
836
  availableDateTimes String[] /// Stored in format: ["startDateTime,endDateTime",...]
832
837
  serviceTargetAudience ServiceTargetAudience[]
838
+ status ServiceStatus @default(Draft)
833
839
 
834
840
  @@index([email])
835
841
  @@index([phone])
@@ -13,7 +13,7 @@ import {
13
13
  ServiceTargetAudience,
14
14
  Checkout,
15
15
  ServiceLink,
16
- Link
16
+ Link,
17
17
  } from "@prisma/client";
18
18
 
19
19
  export const FRONT_END_USER_DATA_TO_SELECT = {
@@ -67,7 +67,6 @@ export const BASH_EVENT_DATA_TO_INCLUDE = {
67
67
  eventTasks: true,
68
68
  media: true,
69
69
  promoCodes: true,
70
- ...BASH_EVENT_DATA_TO_SELECT,
71
70
  }
72
71
 
73
72
  export const BASH_EVENT_DATA_TO_CLONE = [
@@ -205,6 +204,19 @@ export interface ReviewExt extends Review {
205
204
  comments: BashComment[];
206
205
  }
207
206
 
207
+ export interface ContactExt extends Contact {
208
+ user: User;
209
+ media: Media[];
210
+ }
211
+
212
+ export const CONTACT_DATA_TO_INCLUDE = {
213
+ user: {
214
+ select: FRONT_END_USER_DATA_TO_SELECT
215
+ },
216
+ media: true
217
+ };
218
+
219
+
208
220
  export interface UserExtraData extends User {
209
221
  password?: string;
210
222
  otp?: string;