@bash-app/bash-common 6.0.0 → 6.1.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.0.0",
3
+ "version": "6.1.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",
@@ -40,25 +40,22 @@ export interface BashEventExt extends BashEvent {
40
40
  invitations: InvitationExt[];
41
41
  }
42
42
 
43
- export interface BashNotificationsExt extends BashNotification {
44
- creator?: User;
45
- bashEvent?: BashEvent;
46
- eventTask?: EventTask;
47
- invitation?: Invitation;
48
- reminders?: Reminder[];
49
- }
50
-
51
43
  export const BASH_EVENT_DATA_TO_INCLUDE = {
52
44
  targetAudience: true,
53
45
  amountOfGuests: true,
54
46
  recurrence: true,
55
47
  ticketTiers: true,
56
- creator: true,
57
48
  eventTasks: true,
58
49
  media: true,
59
50
  promoCodes: true,
60
51
  }
61
52
 
53
+ export const BASH_EVENT_DATA_TO_SELECT = {
54
+ creator: {
55
+ select: FRONT_END_USER_DATA_TO_SELECT
56
+ }
57
+ }
58
+
62
59
  export const BASH_EVENT_DATA_TO_CLONE = [
63
60
  'targetAudience',
64
61
  'amountOfGuests',
@@ -69,6 +66,14 @@ export const BASH_EVENT_DATA_TO_CLONE = [
69
66
  'promoCodes',
70
67
  ] as const;
71
68
 
69
+ export interface BashNotificationsExt extends BashNotification {
70
+ creator?: User;
71
+ bashEvent?: BashEvent;
72
+ eventTask?: EventTask;
73
+ invitation?: Invitation;
74
+ reminders?: Reminder[];
75
+ }
76
+
72
77
  type RemoveCommonProperties<T, U> = keyof (Omit<T, keyof U> & Omit<U, keyof T>);
73
78
  type UnionFromArray<T extends ReadonlyArray<any>> = T[number];
74
79
  type BashEventExtMinusDataToCloneType = Omit<BashEventExt, UnionFromArray<typeof BASH_EVENT_DATA_TO_CLONE>>;
@@ -164,16 +169,13 @@ export interface UserExtraData extends User {
164
169
  }
165
170
 
166
171
  export interface UserExt extends User {
167
- services: Service[];
172
+ services?: Service[];
168
173
 
169
174
  // Do not include in fetch as there could be thousands of these
170
175
  associatedBashes?: AssociatedBash[]
171
176
  reviews?: ReviewExt[];
172
177
  contacts?: Contact[];
173
- }
174
-
175
- export const USER_DATA_TO_INCLUDE = {
176
- services: true,
178
+ ticketsIOwn?: Ticket[];
177
179
  }
178
180
 
179
181
  export const USER_DATA_SELECT_REVIEWS_COMMENTS = {