@bash-app/bash-common 27.3.0 → 27.3.1

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.3.0",
3
+ "version": "27.3.1",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -9,7 +9,7 @@ import {
9
9
  User,
10
10
  YearsOfExperience
11
11
  } from "@prisma/client";
12
- import { CheckoutExt, PublicUser, ServiceExt} from "./extendedSchemas";
12
+ import { ServiceExt, CheckoutExt, PublicUser, VolunteerServiceExt} 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,6 +91,8 @@ 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
+
94
96
  export const ServiceTypes = {
95
97
  'EventServices': 'eventServices',
96
98
  'Organizations': 'organizations',
@@ -100,6 +102,7 @@ export const ServiceTypes = {
100
102
  'Exhibitors': 'exhibitors',
101
103
  'EntertainmentServices': 'entertainmentServices',
102
104
  } satisfies {[key: string]: keyof ServiceExt}
105
+
103
106
  export type FilterFields = {
104
107
  price: string[];
105
108
  ageRequirement: string[];
@@ -304,12 +307,14 @@ export const DayOfWeekToString: { [key in DayOfWeek]: string } = {
304
307
  [DayOfWeek.Saturday]: 'S',
305
308
  }
306
309
 
310
+
307
311
  export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } = {
308
312
  [YearsOfExperience.LessThanOneYear]: 'Less than one year',
309
313
  [YearsOfExperience.OneToThreeYears]: 'One to three years',
310
314
  [YearsOfExperience.ThreeToFiveYears]: 'Three to five years',
311
315
  [YearsOfExperience.FivePlusYears]: 'More than five years',
312
316
  };
317
+
313
318
  export type ServiceTypeToStringType = {
314
319
  [key in ValueOf<typeof ServiceTypes>]: string;
315
320
  };
@@ -322,6 +327,7 @@ export const ServiceTypeToString: ServiceTypeToStringType = {
322
327
  [ServiceTypes.Venues]: "/servicesDefault.webp",
323
328
  [ServiceTypes.Organizations]: "/servicesDefault.webp"
324
329
  }
330
+
325
331
  export type BashEventTypeToStringType = {
326
332
  [key in BashEventType]: string;
327
333
  };