@bash-app/bash-common 27.2.11 → 27.2.13
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 +1 -26
- package/src/extendedSchemas.ts +3 -2
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 {
|
|
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
|
};
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -23,8 +23,9 @@ import {
|
|
|
23
23
|
Organization,
|
|
24
24
|
Booking,
|
|
25
25
|
VolunteerService, Prisma, ServiceRange,
|
|
26
|
+
ServiceTypes,
|
|
26
27
|
} from "@prisma/client";
|
|
27
|
-
import {
|
|
28
|
+
import {UnionFromArray} from "./definitions";
|
|
28
29
|
|
|
29
30
|
export const FRONT_END_USER_DATA_TO_SELECT = {
|
|
30
31
|
id: true,
|
|
@@ -272,7 +273,7 @@ targetAudience?: TargetAudience | null;
|
|
|
272
273
|
sponsors?: Sponsor[];
|
|
273
274
|
organizations?: Organization[];
|
|
274
275
|
bookings?: Booking[];
|
|
275
|
-
|
|
276
|
+
serviceType: ServiceTypes;
|
|
276
277
|
}
|
|
277
278
|
|
|
278
279
|
|