@bash-app/bash-common 30.158.0 → 30.160.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/dist/definitions.d.ts +6 -6
- package/dist/definitions.d.ts.map +1 -1
- package/dist/extendedSchemas.d.ts +2 -2
- package/dist/extendedSchemas.d.ts.map +1 -1
- package/dist/extendedSchemas.js +1 -1
- package/dist/extendedSchemas.js.map +1 -1
- package/dist/index.d.ts +45 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -44
- package/dist/index.js.map +1 -1
- package/dist/utils/__tests__/paymentUtils.test.js +1 -1
- package/dist/utils/__tests__/paymentUtils.test.js.map +1 -1
- package/dist/utils/addressUtils.d.ts +1 -1
- package/dist/utils/addressUtils.d.ts.map +1 -1
- package/dist/utils/apiUtils.d.ts +2 -2
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/badgeUtils.d.ts +1 -1
- package/dist/utils/badgeUtils.d.ts.map +1 -1
- package/dist/utils/badgeUtils.js +1 -1
- package/dist/utils/badgeUtils.js.map +1 -1
- package/dist/utils/blog/blogDbUtils.d.ts +1 -1
- package/dist/utils/blog/blogDbUtils.d.ts.map +1 -1
- package/dist/utils/blog/blogDbUtils.js +3 -3
- package/dist/utils/blog/blogDbUtils.js.map +1 -1
- package/dist/utils/blogUtils.js +2 -2
- package/dist/utils/blogUtils.js.map +1 -1
- package/dist/utils/dateTimeUtils.d.ts +1 -1
- package/dist/utils/dateTimeUtils.d.ts.map +1 -1
- package/dist/utils/discountEngine/__tests__/bestPriceResolver.test.js +1 -1
- package/dist/utils/discountEngine/__tests__/bestPriceResolver.test.js.map +1 -1
- package/dist/utils/discountEngine/__tests__/eligibilityValidator.test.js +1 -1
- package/dist/utils/discountEngine/__tests__/eligibilityValidator.test.js.map +1 -1
- package/dist/utils/discountEngine/bestPriceResolver.d.ts +1 -1
- package/dist/utils/discountEngine/bestPriceResolver.d.ts.map +1 -1
- package/dist/utils/discountEngine/bestPriceResolver.js +1 -1
- package/dist/utils/discountEngine/bestPriceResolver.js.map +1 -1
- package/dist/utils/discountEngine/discountCalculator.js +1 -1
- package/dist/utils/discountEngine/discountCalculator.js.map +1 -1
- package/dist/utils/discountEngine/index.d.ts +3 -3
- package/dist/utils/discountEngine/index.d.ts.map +1 -1
- package/dist/utils/discountEngine/index.js +3 -3
- package/dist/utils/discountEngine/index.js.map +1 -1
- package/dist/utils/index.d.ts +41 -41
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +41 -41
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/luxonUtils.d.ts +1 -1
- package/dist/utils/luxonUtils.d.ts.map +1 -1
- package/dist/utils/luxonUtils.js +2 -2
- package/dist/utils/luxonUtils.js.map +1 -1
- package/dist/utils/paymentUtils.d.ts +1 -1
- package/dist/utils/paymentUtils.d.ts.map +1 -1
- package/dist/utils/paymentUtils.js +2 -2
- package/dist/utils/paymentUtils.js.map +1 -1
- package/dist/utils/promoCodesUtils.d.ts +1 -1
- package/dist/utils/promoCodesUtils.d.ts.map +1 -1
- package/dist/utils/qrCodeUtils.js +2 -2
- package/dist/utils/qrCodeUtils.js.map +1 -1
- package/dist/utils/recurrenceUtils.d.ts +1 -1
- package/dist/utils/recurrenceUtils.d.ts.map +1 -1
- package/dist/utils/recurrenceUtils.js +2 -2
- package/dist/utils/recurrenceUtils.js.map +1 -1
- package/dist/utils/reviewUtils.d.ts +1 -1
- package/dist/utils/reviewUtils.d.ts.map +1 -1
- package/dist/utils/service/apiServiceBookingApiUtils.d.ts +4 -4
- package/dist/utils/service/apiServiceBookingApiUtils.d.ts.map +1 -1
- package/dist/utils/service/apiServiceBookingApiUtils.js +2 -2
- package/dist/utils/service/apiServiceBookingApiUtils.js.map +1 -1
- package/dist/utils/service/frontendServiceBookingUtils.d.ts +5 -5
- package/dist/utils/service/frontendServiceBookingUtils.d.ts.map +1 -1
- package/dist/utils/service/frontendServiceBookingUtils.js +3 -3
- package/dist/utils/service/frontendServiceBookingUtils.js.map +1 -1
- package/dist/utils/service/serviceBookingStatusUtils.d.ts +1 -1
- package/dist/utils/service/serviceBookingStatusUtils.d.ts.map +1 -1
- package/dist/utils/service/serviceBookingTypes.d.ts +3 -3
- package/dist/utils/service/serviceBookingTypes.d.ts.map +1 -1
- package/dist/utils/service/serviceDBUtils.d.ts +2 -2
- package/dist/utils/service/serviceDBUtils.d.ts.map +1 -1
- package/dist/utils/service/serviceRateTypes.d.ts +2 -2
- package/dist/utils/service/serviceRateTypes.d.ts.map +1 -1
- package/dist/utils/service/serviceRateUtils.d.ts +4 -4
- package/dist/utils/service/serviceRateUtils.d.ts.map +1 -1
- package/dist/utils/service/serviceRateUtils.js +1 -1
- package/dist/utils/service/serviceRateUtils.js.map +1 -1
- package/dist/utils/service/serviceUtils.d.ts +1 -1
- package/dist/utils/service/serviceUtils.d.ts.map +1 -1
- package/dist/utils/stripeAccountUtils.d.ts +1 -1
- package/dist/utils/stripeAccountUtils.d.ts.map +1 -1
- package/dist/utils/ticketListUtils.d.ts +1 -1
- package/dist/utils/ticketListUtils.d.ts.map +1 -1
- package/dist/utils/ticketListUtils.js +6 -2
- package/dist/utils/ticketListUtils.js.map +1 -1
- package/dist/utils/urlUtils.js +3 -3
- package/dist/utils/urlUtils.js.map +1 -1
- package/dist/utils/userSubscriptionUtils.d.ts +1 -1
- package/dist/utils/userSubscriptionUtils.d.ts.map +1 -1
- package/dist/utils/userSubscriptionUtils.js +1 -1
- package/dist/utils/userSubscriptionUtils.js.map +1 -1
- package/package.json +1 -1
- package/src/definitions.ts +6 -6
- package/src/extendedSchemas.ts +2 -2
- package/src/index.ts +45 -45
- package/src/utils/__tests__/paymentUtils.test.ts +1 -1
- package/src/utils/addressUtils.ts +1 -1
- package/src/utils/apiUtils.ts +2 -2
- package/src/utils/badgeUtils.ts +1 -1
- package/src/utils/blog/blogDbUtils.ts +3 -3
- package/src/utils/blogUtils.ts +2 -2
- package/src/utils/dateTimeUtils.ts +1 -1
- package/src/utils/discountEngine/__tests__/bestPriceResolver.test.ts +1 -1
- package/src/utils/discountEngine/__tests__/eligibilityValidator.test.ts +1 -1
- package/src/utils/discountEngine/bestPriceResolver.ts +1 -1
- package/src/utils/discountEngine/discountCalculator.ts +1 -1
- package/src/utils/discountEngine/index.ts +3 -3
- package/src/utils/index.ts +41 -41
- package/src/utils/luxonUtils.ts +2 -2
- package/src/utils/paymentUtils.ts +2 -2
- package/src/utils/promoCodesUtils.ts +1 -1
- package/src/utils/qrCodeUtils.ts +2 -2
- package/src/utils/recurrenceUtils.ts +4 -4
- package/src/utils/reviewUtils.ts +1 -1
- package/src/utils/service/apiServiceBookingApiUtils.ts +6 -6
- package/src/utils/service/frontendServiceBookingUtils.ts +7 -7
- package/src/utils/service/serviceBookingStatusUtils.ts +1 -1
- package/src/utils/service/serviceBookingTypes.ts +4 -4
- package/src/utils/service/serviceDBUtils.ts +2 -2
- package/src/utils/service/serviceRateTypes.ts +2 -2
- package/src/utils/service/serviceRateUtils.ts +4 -4
- package/src/utils/service/serviceUtils.ts +1 -1
- package/src/utils/stripeAccountUtils.ts +1 -1
- package/src/utils/ticketListUtils.ts +6 -2
- package/src/utils/urlUtils.ts +3 -3
- package/src/utils/userSubscriptionUtils.ts +1 -1
package/src/utils/index.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export * from './addressUtils';
|
|
2
|
-
export * from './apiUtils';
|
|
3
|
-
export * from './arrayUtils';
|
|
4
|
-
export * from './awsS3Utils';
|
|
5
|
-
export * from './badgeUtils';
|
|
6
|
-
export * from './bashPointsPaymentUtils';
|
|
7
|
-
export * from './blog/blogDbUtils';
|
|
8
|
-
export * from './blogUtils';
|
|
9
|
-
export * from './contentFilterUtils';
|
|
10
|
-
export * from './dateTimeUtils';
|
|
11
|
-
export * from './entityUtils';
|
|
12
|
-
export * from './generalDateTimeUtils';
|
|
13
|
-
export * from './luxonUtils';
|
|
14
|
-
export * from './mathUtils';
|
|
15
|
-
export * from './objUtils';
|
|
16
|
-
export * from './paymentUtils';
|
|
17
|
-
export * from './promoCodesUtils';
|
|
18
|
-
export * from './qrCodeUtils';
|
|
19
|
-
export * from './recurrenceUtils';
|
|
20
|
-
export * from './reviewUtils';
|
|
21
|
-
export * from './service/apiServiceBookingApiUtils';
|
|
22
|
-
export * from './service/attendeeOptionUtils';
|
|
23
|
-
export * from './service/frontendServiceBookingUtils';
|
|
24
|
-
export * from './service/regexUtils';
|
|
25
|
-
export * from './service/serviceBookingStatusUtils';
|
|
26
|
-
export * from './service/serviceBookingTypes';
|
|
27
|
-
export * from './service/serviceDBUtils';
|
|
28
|
-
export * from './service/serviceRateTypes';
|
|
29
|
-
export * from './service/serviceRateUtils';
|
|
30
|
-
export * from './service/serviceUtils';
|
|
31
|
-
export * from './slugUtils';
|
|
32
|
-
export * from './sortUtils';
|
|
33
|
-
export * from './stringUtils';
|
|
34
|
-
export * from './stripeAccountUtils';
|
|
35
|
-
export * from './ticketListUtils';
|
|
36
|
-
export * from './typeUtils';
|
|
37
|
-
export * from './urlUtils';
|
|
38
|
-
export * from './userPromoCodeUtils';
|
|
39
|
-
export * from './userSubscriptionUtils';
|
|
40
|
-
export * from './userUtils';
|
|
41
|
-
export * from './venueTypeFormatter';
|
|
1
|
+
export * from './addressUtils.js';
|
|
2
|
+
export * from './apiUtils.js';
|
|
3
|
+
export * from './arrayUtils.js';
|
|
4
|
+
export * from './awsS3Utils.js';
|
|
5
|
+
export * from './badgeUtils.js';
|
|
6
|
+
export * from './bashPointsPaymentUtils.js';
|
|
7
|
+
export * from './blog/blogDbUtils.js';
|
|
8
|
+
export * from './blogUtils.js';
|
|
9
|
+
export * from './contentFilterUtils.js';
|
|
10
|
+
export * from './dateTimeUtils.js';
|
|
11
|
+
export * from './entityUtils.js';
|
|
12
|
+
export * from './generalDateTimeUtils.js';
|
|
13
|
+
export * from './luxonUtils.js';
|
|
14
|
+
export * from './mathUtils.js';
|
|
15
|
+
export * from './objUtils.js';
|
|
16
|
+
export * from './paymentUtils.js';
|
|
17
|
+
export * from './promoCodesUtils.js';
|
|
18
|
+
export * from './qrCodeUtils.js';
|
|
19
|
+
export * from './recurrenceUtils.js';
|
|
20
|
+
export * from './reviewUtils.js';
|
|
21
|
+
export * from './service/apiServiceBookingApiUtils.js';
|
|
22
|
+
export * from './service/attendeeOptionUtils.js';
|
|
23
|
+
export * from './service/frontendServiceBookingUtils.js';
|
|
24
|
+
export * from './service/regexUtils.js';
|
|
25
|
+
export * from './service/serviceBookingStatusUtils.js';
|
|
26
|
+
export * from './service/serviceBookingTypes.js';
|
|
27
|
+
export * from './service/serviceDBUtils.js';
|
|
28
|
+
export * from './service/serviceRateTypes.js';
|
|
29
|
+
export * from './service/serviceRateUtils.js';
|
|
30
|
+
export * from './service/serviceUtils.js';
|
|
31
|
+
export * from './slugUtils.js';
|
|
32
|
+
export * from './sortUtils.js';
|
|
33
|
+
export * from './stringUtils.js';
|
|
34
|
+
export * from './stripeAccountUtils.js';
|
|
35
|
+
export * from './ticketListUtils.js';
|
|
36
|
+
export * from './typeUtils.js';
|
|
37
|
+
export * from './urlUtils.js';
|
|
38
|
+
export * from './userPromoCodeUtils.js';
|
|
39
|
+
export * from './userSubscriptionUtils.js';
|
|
40
|
+
export * from './userUtils.js';
|
|
41
|
+
export * from './venueTypeFormatter.js';
|
|
42
42
|
|
package/src/utils/luxonUtils.ts
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
dayOfWeekIdxToDay,
|
|
6
6
|
dayOfWeekIdxToDayOfWeek,
|
|
7
7
|
dayOfWeekToIdx,
|
|
8
|
-
} from "./generalDateTimeUtils";
|
|
9
|
-
import { roundToNearestDivisor } from "./mathUtils";
|
|
8
|
+
} from "./generalDateTimeUtils.js";
|
|
9
|
+
import { roundToNearestDivisor } from "./mathUtils.js";
|
|
10
10
|
|
|
11
11
|
// export const LUXON_DATETIME_FORMAT_STANDARD = "MM/dd/yyyy - hh:mm a";
|
|
12
12
|
export const LUXON_DATETIME_FORMAT_STANDARD = "D t";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
BASH_EVENT_FEES,
|
|
4
4
|
SERVICE_BOOKING_FEES,
|
|
5
5
|
PARTNER_PAYMENT_FEES,
|
|
6
|
-
} from "../membershipDefinitions";
|
|
6
|
+
} from "../membershipDefinitions.js";
|
|
7
7
|
import {
|
|
8
8
|
NumberOfTicketsForDate,
|
|
9
9
|
PRICE_DOLLARS_AND_CENTS_RATIO,
|
|
10
|
-
} from "../definitions";
|
|
10
|
+
} from "../definitions.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns the amount of discount in dollars
|
package/src/utils/qrCodeUtils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import QRCode from "qrcode";
|
|
2
|
-
import { TICKET_DETAILS } from "../definitions";
|
|
3
|
-
import { generateBashDetailUrl } from "./slugUtils";
|
|
2
|
+
import { TICKET_DETAILS } from "../definitions.js";
|
|
3
|
+
import { generateBashDetailUrl } from "./slugUtils.js";
|
|
4
4
|
|
|
5
5
|
export function bashEventPrismaCheckoutQrCodeUrl(bashEventId: string | undefined | null, prismaCheckoutId: string | undefined | null): string {
|
|
6
6
|
return `${TICKET_DETAILS}/${bashEventId}/${prismaCheckoutId}`;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DayOfWeek, Recurrence, RecurringFrequency } from "@prisma/client";
|
|
2
2
|
import { DateTime, WeekdayNumbers } from "luxon";
|
|
3
|
-
import { DateTimeArgType } from "../definitions";
|
|
3
|
+
import { DateTimeArgType } from "../definitions.js";
|
|
4
4
|
import {
|
|
5
5
|
dateTimeFromDate,
|
|
6
6
|
dateTimeSetTime,
|
|
7
7
|
dayOfWeekGetIdx,
|
|
8
8
|
LUXON_DATETIME_FORMAT_ISO_LIKE,
|
|
9
|
-
} from "./luxonUtils";
|
|
10
|
-
import { compareDateTime } from "./dateTimeUtils";
|
|
11
|
-
import { dayOfWeekToIdx } from "./generalDateTimeUtils";
|
|
9
|
+
} from "./luxonUtils.js";
|
|
10
|
+
import { compareDateTime } from "./dateTimeUtils.js";
|
|
11
|
+
import { dayOfWeekToIdx } from "./generalDateTimeUtils.js";
|
|
12
12
|
|
|
13
13
|
export function getRecurringBashEventPossibleDateTimes(
|
|
14
14
|
startDateTime: DateTimeArgType,
|
package/src/utils/reviewUtils.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ApiServiceBookedDayParamsLuxon,
|
|
7
7
|
ApiServiceBookingParams,
|
|
8
8
|
ApiServicePriceToBookResult,
|
|
9
|
-
} from "../../definitions";
|
|
9
|
+
} from "../../definitions.js";
|
|
10
10
|
import {
|
|
11
11
|
ServiceAddonExt,
|
|
12
12
|
ServiceBookingAddOnExt,
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
ServiceBookingFeeExt,
|
|
16
16
|
ServiceBookingPriceBreakdownExt,
|
|
17
17
|
ServiceExt,
|
|
18
|
-
} from "../../extendedSchemas";
|
|
19
|
-
import { dateTimeFromString, dateTimeRangeFromDates } from "../luxonUtils";
|
|
20
|
-
import { serviceAttendeeOptions } from "./attendeeOptionUtils";
|
|
18
|
+
} from "../../extendedSchemas.js";
|
|
19
|
+
import { dateTimeFromString, dateTimeRangeFromDates } from "../luxonUtils.js";
|
|
20
|
+
import { serviceAttendeeOptions } from "./attendeeOptionUtils.js";
|
|
21
21
|
import {
|
|
22
22
|
FrontendServiceBookingDayInfo,
|
|
23
23
|
FrontendServiceGetPriceToBookResult,
|
|
24
24
|
ServiceAddonInput,
|
|
25
|
-
} from "./frontendServiceBookingUtils";
|
|
25
|
+
} from "./frontendServiceBookingUtils.js";
|
|
26
26
|
import {
|
|
27
27
|
ServiceBookingPriceBreakdownBaseT,
|
|
28
28
|
ServiceBookingRequiredData,
|
|
29
|
-
} from "./serviceBookingTypes";
|
|
29
|
+
} from "./serviceBookingTypes.js";
|
|
30
30
|
|
|
31
31
|
export type ApiServiceCantBookReason = {
|
|
32
32
|
type: string;
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
ServiceDailyRatesExt,
|
|
13
13
|
ServiceRatesAssociationExt,
|
|
14
14
|
ServiceSpecialRatesExt,
|
|
15
|
-
} from "../../extendedSchemas";
|
|
16
|
-
import { ServiceAttendeeOption } from "./attendeeOptionUtils";
|
|
15
|
+
} from "../../extendedSchemas.js";
|
|
16
|
+
import { ServiceAttendeeOption } from "./attendeeOptionUtils.js";
|
|
17
17
|
import {
|
|
18
18
|
getServiceRatePricingInfo,
|
|
19
19
|
SERVICE_DAILY_RATE_HOURS_MIN,
|
|
@@ -21,19 +21,19 @@ import {
|
|
|
21
21
|
serviceRatesFilter,
|
|
22
22
|
serviceRatesHasRates,
|
|
23
23
|
ServiceRatesLuxon,
|
|
24
|
-
} from "./serviceRateUtils";
|
|
24
|
+
} from "./serviceRateUtils.js";
|
|
25
25
|
import {
|
|
26
26
|
dateTimeDiffHours,
|
|
27
27
|
dateTimeRangeHours,
|
|
28
28
|
LuxonDateRange,
|
|
29
|
-
} from "../luxonUtils";
|
|
29
|
+
} from "../luxonUtils.js";
|
|
30
30
|
import {
|
|
31
31
|
ServiceBookingFeeBase,
|
|
32
32
|
ServiceBookingPriceBreakdownBaseT,
|
|
33
33
|
ServiceBookingAddOnBase,
|
|
34
|
-
} from "./serviceBookingTypes";
|
|
35
|
-
import { convertDollarsToCents } from "../paymentUtils";
|
|
36
|
-
import { SERVICE_BOOKING_FEES } from "../../membershipDefinitions";
|
|
34
|
+
} from "./serviceBookingTypes.js";
|
|
35
|
+
import { convertDollarsToCents } from "../paymentUtils.js";
|
|
36
|
+
import { SERVICE_BOOKING_FEES } from "../../membershipDefinitions.js";
|
|
37
37
|
|
|
38
38
|
// Use centralized service fee percentage (2.9% Stripe fee for Basic tier)
|
|
39
39
|
// Note: This is ONLY the Stripe payment processing fee (2.9% + $0.30).
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
ServiceDailyRatesExt,
|
|
8
8
|
ServiceSpecialRatesExt,
|
|
9
9
|
ServiceBookingExt,
|
|
10
|
-
} from "../../extendedSchemas";
|
|
11
|
-
import { LuxonDateRange } from "../luxonUtils";
|
|
12
|
-
import { FrontendServiceGetPriceToBookResult } from "./frontendServiceBookingUtils";
|
|
13
|
-
import { MakeNullablePropsOptional, MakeOptional } from "../typeUtils";
|
|
10
|
+
} from "../../extendedSchemas.js";
|
|
11
|
+
import { LuxonDateRange } from "../luxonUtils.js";
|
|
12
|
+
import { FrontendServiceGetPriceToBookResult } from "./frontendServiceBookingUtils.js";
|
|
13
|
+
import { MakeNullablePropsOptional, MakeOptional } from "../typeUtils.js";
|
|
14
14
|
|
|
15
15
|
export type ServiceBookingAddOnBase = Omit<
|
|
16
16
|
ServiceBookingAddOnExt,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ServiceExt } from "../../extendedSchemas";
|
|
2
|
-
import { DeepPartial } from "../typeUtils";
|
|
1
|
+
import { ServiceExt } from "../../extendedSchemas.js";
|
|
2
|
+
import { DeepPartial } from "../typeUtils.js";
|
|
3
3
|
|
|
4
4
|
/** Converts service data for DB write. Currently a pass-through; rate conversion was removed. */
|
|
5
5
|
export function serviceToDb(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServiceDailyRatesExt,
|
|
3
3
|
ServiceSpecialRatesExt,
|
|
4
|
-
} from "../../extendedSchemas";
|
|
5
|
-
import { LuxonDateRange } from "../luxonUtils";
|
|
4
|
+
} from "../../extendedSchemas.js";
|
|
5
|
+
import { LuxonDateRange } from "../luxonUtils.js";
|
|
6
6
|
|
|
7
7
|
export type ServiceDailyRatesExtT = Omit<
|
|
8
8
|
ServiceDailyRatesExt,
|
|
@@ -8,18 +8,18 @@ import {
|
|
|
8
8
|
ServiceDailyRatesExt,
|
|
9
9
|
ServiceRatesAssociationExt,
|
|
10
10
|
ServiceSpecialRatesExt,
|
|
11
|
-
} from "../../extendedSchemas";
|
|
11
|
+
} from "../../extendedSchemas.js";
|
|
12
12
|
import {
|
|
13
13
|
LuxonDateRange,
|
|
14
14
|
dateRangeNormalizeToMWY,
|
|
15
15
|
dateTimeFromDate,
|
|
16
16
|
dateTimeRangeIntersection,
|
|
17
|
-
} from "../luxonUtils";
|
|
18
|
-
import { ServiceBookingPriceBreakdownBaseT } from "./serviceBookingTypes";
|
|
17
|
+
} from "../luxonUtils.js";
|
|
18
|
+
import { ServiceBookingPriceBreakdownBaseT } from "./serviceBookingTypes.js";
|
|
19
19
|
import {
|
|
20
20
|
ServiceDailyRatesExtT,
|
|
21
21
|
ServiceSpecialRatesExtT,
|
|
22
|
-
} from "./serviceRateTypes";
|
|
22
|
+
} from "./serviceRateTypes.js";
|
|
23
23
|
|
|
24
24
|
export const SERVICE_DAILY_RATE_HOURS_MIN = 8;
|
|
25
25
|
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
URL_PARAMS_TICKET_LIST_DELIM,
|
|
6
6
|
URL_PARAMS_TICKET_TIER_ID_NUMBER_OF_TICKETS_DATE_DELIM,
|
|
7
7
|
URL_PARAMS_TICKETS_DATE_DELIM,
|
|
8
|
-
} from "../definitions";
|
|
8
|
+
} from "../definitions.js";
|
|
9
9
|
import {
|
|
10
10
|
dateTimeFormat,
|
|
11
11
|
dateTimeFromDate,
|
|
12
12
|
dateTimeFromString,
|
|
13
13
|
LUXON_DATETIME_FORMAT_ISO_LIKE,
|
|
14
|
-
} from "./luxonUtils";
|
|
14
|
+
} from "./luxonUtils.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Encodes a string to Base64 URL-safe format
|
|
@@ -135,6 +135,10 @@ export function ticketListStrToTicketList(
|
|
|
135
135
|
`Could not parse ticketListStr. Maybe it is just an amount?`
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
|
+
// Skip entries missing the delimiter (malformed input, e.g. a bare tierId)
|
|
139
|
+
if (ticketNumAndDatesStr === undefined) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
138
142
|
// ~~[numberOfTickets];;[date]~~[numberOfTickets];;[date]~~...
|
|
139
143
|
const ticketNumAndDates = ticketNumAndDatesStr
|
|
140
144
|
.split(URL_PARAMS_NUMBER_OF_TICKETS_TICKETS_DATE_DELIM)
|
package/src/utils/urlUtils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isProduction } from "./apiUtils";
|
|
2
|
-
import { BASH_DETAIL_URL, STRIPE_CHECKOUT_TIMEOUT_MS, STRIPE_REDIRECT_TIMEOUT_MS } from "../definitions";
|
|
3
|
-
import { generateBashDetailUrl } from "./slugUtils";
|
|
1
|
+
import { isProduction } from "./apiUtils.js";
|
|
2
|
+
import { BASH_DETAIL_URL, STRIPE_CHECKOUT_TIMEOUT_MS, STRIPE_REDIRECT_TIMEOUT_MS } from "../definitions.js";
|
|
3
|
+
import { generateBashDetailUrl } from "./slugUtils.js";
|
|
4
4
|
|
|
5
5
|
const API_HOST = process.env.REACT_APP_API ?? "http://localhost:3500";
|
|
6
6
|
|