@bash-app/bash-common 29.22.5 → 29.23.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/extendedSchemas.ts +13 -1
- package/src/utils/dateTimeUtils.ts +8 -0
package/package.json
CHANGED
package/src/extendedSchemas.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
Reminder,
|
|
13
13
|
Checkout,
|
|
14
14
|
ServiceLink,
|
|
15
|
-
Link, Venue,
|
|
15
|
+
Link, Venue,
|
|
16
16
|
// Availability,
|
|
17
17
|
TargetAudience,
|
|
18
18
|
Vendor,
|
|
@@ -272,6 +272,7 @@ export interface StripeAccountExt extends StripeAccount {
|
|
|
272
272
|
//---------------Services------------------
|
|
273
273
|
export interface ServiceExt extends Service {
|
|
274
274
|
owner?: PublicUser | null;
|
|
275
|
+
creator?: PublicUser | null;
|
|
275
276
|
|
|
276
277
|
stripeAccount?: StripeAccount | null;
|
|
277
278
|
|
|
@@ -290,11 +291,22 @@ export interface ServiceExt extends Service {
|
|
|
290
291
|
sponsor?: Sponsor;
|
|
291
292
|
venue?: Venue;
|
|
292
293
|
organization?: Organization;
|
|
294
|
+
volunteerService?: VolunteerService;
|
|
295
|
+
bashEvent: BashEvent[];
|
|
293
296
|
|
|
294
297
|
serviceRatesAssociation?: ServiceRatesAssociationExt | null;
|
|
298
|
+
associatedBashesReferencingMe?: AssociatedBash[];
|
|
299
|
+
associatedServicesReferencingMe?: AssociatedService[];
|
|
295
300
|
|
|
296
301
|
// googleReviews: GoogleReview[];
|
|
297
302
|
}
|
|
303
|
+
|
|
304
|
+
export interface ServiceRateExt extends ServiceRate {
|
|
305
|
+
serviceSpecialRates?: ServiceSpecialRates;
|
|
306
|
+
serviceDailyRates?: ServiceDailyRates;
|
|
307
|
+
serviceRatesAssociation?: ServiceRatesAssociation;
|
|
308
|
+
}
|
|
309
|
+
|
|
298
310
|
export interface ServicePackageExt extends ServicePackage {
|
|
299
311
|
serviceAddons: ServiceAddon[];
|
|
300
312
|
}
|
|
@@ -190,3 +190,11 @@ export function parseTimeString(timeStr: string): ITime | null {
|
|
|
190
190
|
}
|
|
191
191
|
return null;
|
|
192
192
|
}
|
|
193
|
+
|
|
194
|
+
function localDateToUTC(date: Date): Date {
|
|
195
|
+
const newDate = new Date(date.getUTCFullYear(), date.getUTCMonth(),
|
|
196
|
+
date.getUTCDate(), date.getUTCHours(),
|
|
197
|
+
date.getUTCMinutes(), date.getUTCSeconds());
|
|
198
|
+
|
|
199
|
+
return newDate;
|
|
200
|
+
}
|