@bash-app/bash-common 27.2.13 → 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 +1 -1
- package/src/definitions.ts +26 -1
package/package.json
CHANGED
package/src/definitions.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
User,
|
|
10
10
|
YearsOfExperience
|
|
11
11
|
} from "@prisma/client";
|
|
12
|
-
import { CheckoutExt, PublicUser} 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,17 @@ 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}
|
|
94
105
|
|
|
95
106
|
export type FilterFields = {
|
|
96
107
|
price: string[];
|
|
@@ -296,6 +307,7 @@ export const DayOfWeekToString: { [key in DayOfWeek]: string } = {
|
|
|
296
307
|
[DayOfWeek.Saturday]: 'S',
|
|
297
308
|
}
|
|
298
309
|
|
|
310
|
+
|
|
299
311
|
export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } = {
|
|
300
312
|
[YearsOfExperience.LessThanOneYear]: 'Less than one year',
|
|
301
313
|
[YearsOfExperience.OneToThreeYears]: 'One to three years',
|
|
@@ -303,6 +315,19 @@ export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } =
|
|
|
303
315
|
[YearsOfExperience.FivePlusYears]: 'More than five years',
|
|
304
316
|
};
|
|
305
317
|
|
|
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
|
+
|
|
306
331
|
export type BashEventTypeToStringType = {
|
|
307
332
|
[key in BashEventType]: string;
|
|
308
333
|
};
|