@bash-app/bash-common 27.2.10 → 27.2.12

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": "27.2.10",
3
+ "version": "27.2.12",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -17,7 +17,7 @@ model Club {
17
17
  street String
18
18
  userId String
19
19
  price Int?
20
- events BashEvent[]
20
+ events BashEvent[]
21
21
  members ClubMember[]
22
22
  admin ClubAdmin[]
23
23
  }
@@ -900,6 +900,7 @@ model Service {
900
900
  // stripeServiceCustomerId String? @unique
901
901
  stripeBusinessId String @unique
902
902
  // stripeBusinessType String @default("Individual")
903
+ serviceType ServiceTypes
903
904
  creatorId String
904
905
  creator User @relation("CreatedService", fields: [creatorId], references: [id], onDelete: Cascade)
905
906
  dateCreated DateTime @default(now())
@@ -9,7 +9,7 @@ import {
9
9
  User,
10
10
  YearsOfExperience
11
11
  } from "@prisma/client";
12
- import { ServiceExt, CheckoutExt, PublicUser, VolunteerServiceExt} from "./extendedSchemas";
12
+ import { CheckoutExt, PublicUser} from "./extendedSchemas";
13
13
 
14
14
  export const PASSWORD_MIN_LENGTH = 10 as const;
15
15
  export const PASSWORD_REQUIREMENTS_REGEX = new RegExp(String.raw`^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{${PASSWORD_MIN_LENGTH},}$`);
@@ -91,17 +91,6 @@ export type ContactOrUser = Contact | PublicUser;
91
91
  export type UnionFromArray<T extends ReadonlyArray<any>> = T[number];
92
92
  export type ValueOf<T> = T[keyof T];
93
93
 
94
- export type ValueOfServiceType = ValueOf<typeof ServiceTypes>;
95
-
96
- export const ServiceTypes = {
97
- 'EventServices': 'eventServices',
98
- 'Organizations': 'organizations',
99
- 'Venues': 'venues',
100
- 'Vendors': 'vendors',
101
- 'Sponsors': 'sponsors',
102
- 'Exhibitors': 'exhibitors',
103
- 'EntertainmentServices': 'entertainmentServices',
104
- } satisfies {[key: string]: keyof ServiceExt}
105
94
 
106
95
  export type FilterFields = {
107
96
  price: string[];
@@ -307,7 +296,6 @@ export const DayOfWeekToString: { [key in DayOfWeek]: string } = {
307
296
  [DayOfWeek.Saturday]: 'S',
308
297
  }
309
298
 
310
-
311
299
  export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } = {
312
300
  [YearsOfExperience.LessThanOneYear]: 'Less than one year',
313
301
  [YearsOfExperience.OneToThreeYears]: 'One to three years',
@@ -315,19 +303,6 @@ export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } =
315
303
  [YearsOfExperience.FivePlusYears]: 'More than five years',
316
304
  };
317
305
 
318
- export type ServiceTypeToStringType = {
319
- [key in ValueOf<typeof ServiceTypes>]: string;
320
- };
321
- export const ServiceTypeToString: ServiceTypeToStringType = {
322
- [ServiceTypes.EventServices]: "/servicesDefault.webp",
323
- [ServiceTypes.EntertainmentServices]: "/servicesDefault.webp",
324
- [ServiceTypes.Vendors]: "/servicesDefault.webp",
325
- [ServiceTypes.Exhibitors]: "/servicesDefault.webp",
326
- [ServiceTypes.Sponsors]: "/servicesDefault.webp",
327
- [ServiceTypes.Venues]: "/servicesDefault.webp",
328
- [ServiceTypes.Organizations]: "/servicesDefault.webp"
329
- }
330
-
331
306
  export type BashEventTypeToStringType = {
332
307
  [key in BashEventType]: string;
333
308
  };
@@ -24,7 +24,7 @@ import {
24
24
  Booking,
25
25
  VolunteerService, Prisma, ServiceRange,
26
26
  } from "@prisma/client";
27
- import {ServiceTypes, UnionFromArray} from "./definitions";
27
+ import {UnionFromArray} from "./definitions";
28
28
 
29
29
  export const FRONT_END_USER_DATA_TO_SELECT = {
30
30
  id: true,
@@ -272,7 +272,6 @@ targetAudience?: TargetAudience | null;
272
272
  sponsors?: Sponsor[];
273
273
  organizations?: Organization[];
274
274
  bookings?: Booking[];
275
- type?: keyof typeof ServiceTypes; // Add this line to include the service type
276
275
  }
277
276
 
278
277