@bash-app/bash-common 27.2.13 → 27.3.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 +1 -1
- package/src/definitions.ts +22 -3
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 { CheckoutExt, PublicUser, ServiceExt} 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,7 +91,15 @@ 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
|
-
|
|
94
|
+
export const ServiceTypes = {
|
|
95
|
+
'EventServices': 'eventServices',
|
|
96
|
+
'Organizations': 'organizations',
|
|
97
|
+
'Venues': 'venues',
|
|
98
|
+
'Vendors': 'vendors',
|
|
99
|
+
'Sponsors': 'sponsors',
|
|
100
|
+
'Exhibitors': 'exhibitors',
|
|
101
|
+
'EntertainmentServices': 'entertainmentServices',
|
|
102
|
+
} satisfies {[key: string]: keyof ServiceExt}
|
|
95
103
|
export type FilterFields = {
|
|
96
104
|
price: string[];
|
|
97
105
|
ageRequirement: string[];
|
|
@@ -302,7 +310,18 @@ export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } =
|
|
|
302
310
|
[YearsOfExperience.ThreeToFiveYears]: 'Three to five years',
|
|
303
311
|
[YearsOfExperience.FivePlusYears]: 'More than five years',
|
|
304
312
|
};
|
|
305
|
-
|
|
313
|
+
export type ServiceTypeToStringType = {
|
|
314
|
+
[key in ValueOf<typeof ServiceTypes>]: string;
|
|
315
|
+
};
|
|
316
|
+
export const ServiceTypeToString: ServiceTypeToStringType = {
|
|
317
|
+
[ServiceTypes.EventServices]: "/servicesDefault.webp",
|
|
318
|
+
[ServiceTypes.EntertainmentServices]: "/servicesDefault.webp",
|
|
319
|
+
[ServiceTypes.Vendors]: "/servicesDefault.webp",
|
|
320
|
+
[ServiceTypes.Exhibitors]: "/servicesDefault.webp",
|
|
321
|
+
[ServiceTypes.Sponsors]: "/servicesDefault.webp",
|
|
322
|
+
[ServiceTypes.Venues]: "/servicesDefault.webp",
|
|
323
|
+
[ServiceTypes.Organizations]: "/servicesDefault.webp"
|
|
324
|
+
}
|
|
306
325
|
export type BashEventTypeToStringType = {
|
|
307
326
|
[key in BashEventType]: string;
|
|
308
327
|
};
|