@bash-app/bash-common 30.51.0 → 30.53.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 +668 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +467 -0
- package/dist/definitions.js.map +1 -0
- package/dist/extendedSchemas.d.ts +2206 -0
- package/dist/extendedSchemas.d.ts.map +1 -0
- package/dist/extendedSchemas.js +429 -0
- package/dist/extendedSchemas.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/addressUtils.d.ts +14 -0
- package/dist/utils/addressUtils.d.ts.map +1 -0
- package/dist/utils/addressUtils.js +177 -0
- package/dist/utils/addressUtils.js.map +1 -0
- package/dist/utils/apiUtils.d.ts +14 -0
- package/dist/utils/apiUtils.d.ts.map +1 -0
- package/dist/utils/apiUtils.js +61 -0
- package/dist/utils/apiUtils.js.map +1 -0
- package/dist/utils/arrayUtils.d.ts +2 -0
- package/dist/utils/arrayUtils.d.ts.map +1 -0
- package/dist/utils/arrayUtils.js +5 -0
- package/dist/utils/arrayUtils.js.map +1 -0
- package/dist/utils/awsS3Utils.d.ts +10 -0
- package/dist/utils/awsS3Utils.d.ts.map +1 -0
- package/dist/utils/awsS3Utils.js +89 -0
- package/dist/utils/awsS3Utils.js.map +1 -0
- package/dist/utils/badgeUtils.d.ts +33 -0
- package/dist/utils/badgeUtils.d.ts.map +1 -0
- package/dist/utils/badgeUtils.js +57 -0
- package/dist/utils/badgeUtils.js.map +1 -0
- package/dist/utils/blog/blogDbUtils.d.ts +48 -0
- package/dist/utils/blog/blogDbUtils.d.ts.map +1 -0
- package/dist/utils/blog/blogDbUtils.js +218 -0
- package/dist/utils/blog/blogDbUtils.js.map +1 -0
- package/dist/utils/blogUtils.d.ts +19 -0
- package/dist/utils/blogUtils.d.ts.map +1 -0
- package/dist/utils/blogUtils.js +118 -0
- package/dist/utils/blogUtils.js.map +1 -0
- package/dist/utils/dateTimeUtils.d.ts +38 -0
- package/dist/utils/dateTimeUtils.d.ts.map +1 -0
- package/dist/utils/dateTimeUtils.js +207 -0
- package/dist/utils/dateTimeUtils.js.map +1 -0
- package/dist/utils/entityUtils.d.ts +5 -0
- package/dist/utils/entityUtils.d.ts.map +1 -0
- package/dist/utils/entityUtils.js +5 -0
- package/dist/utils/entityUtils.js.map +1 -0
- package/dist/utils/generalDateTimeUtils.d.ts +15 -0
- package/dist/utils/generalDateTimeUtils.d.ts.map +1 -0
- package/dist/utils/generalDateTimeUtils.js +38 -0
- package/dist/utils/generalDateTimeUtils.js.map +1 -0
- package/dist/utils/luxonUtils.d.ts +95 -0
- package/dist/utils/luxonUtils.d.ts.map +1 -0
- package/dist/utils/luxonUtils.js +623 -0
- package/dist/utils/luxonUtils.js.map +1 -0
- package/dist/utils/mathUtils.d.ts +2 -0
- package/dist/utils/mathUtils.d.ts.map +1 -0
- package/dist/utils/mathUtils.js +4 -0
- package/dist/utils/mathUtils.js.map +1 -0
- package/dist/utils/objUtils.d.ts +3 -0
- package/dist/utils/objUtils.d.ts.map +1 -0
- package/dist/utils/objUtils.js +29 -0
- package/dist/utils/objUtils.js.map +1 -0
- package/dist/utils/paymentUtils.d.ts +18 -0
- package/dist/utils/paymentUtils.d.ts.map +1 -0
- package/dist/utils/paymentUtils.js +50 -0
- package/dist/utils/paymentUtils.js.map +1 -0
- package/dist/utils/promoCodesUtils.d.ts +6 -0
- package/dist/utils/promoCodesUtils.d.ts.map +1 -0
- package/dist/utils/promoCodesUtils.js +23 -0
- package/dist/utils/promoCodesUtils.js.map +1 -0
- package/dist/utils/qrCodeUtils.d.ts +4 -0
- package/dist/utils/qrCodeUtils.d.ts.map +1 -0
- package/dist/utils/qrCodeUtils.js +22 -0
- package/dist/utils/qrCodeUtils.js.map +1 -0
- package/dist/utils/recurrenceUtils.d.ts +8 -0
- package/dist/utils/recurrenceUtils.d.ts.map +1 -0
- package/dist/utils/recurrenceUtils.js +153 -0
- package/dist/utils/recurrenceUtils.js.map +1 -0
- package/dist/utils/reviewUtils.d.ts +29 -0
- package/dist/utils/reviewUtils.d.ts.map +1 -0
- package/dist/utils/reviewUtils.js +65 -0
- package/dist/utils/reviewUtils.js.map +1 -0
- package/dist/utils/service/apiServiceBookingApiUtils.d.ts +21 -0
- package/dist/utils/service/apiServiceBookingApiUtils.d.ts.map +1 -0
- package/dist/utils/service/apiServiceBookingApiUtils.js +131 -0
- package/dist/utils/service/apiServiceBookingApiUtils.js.map +1 -0
- package/dist/utils/service/attendeeOptionUtils.d.ts +11 -0
- package/dist/utils/service/attendeeOptionUtils.d.ts.map +1 -0
- package/dist/utils/service/attendeeOptionUtils.js +9 -0
- package/dist/utils/service/attendeeOptionUtils.js.map +1 -0
- package/dist/utils/service/frontendServiceBookingUtils.d.ts +53 -0
- package/dist/utils/service/frontendServiceBookingUtils.d.ts.map +1 -0
- package/dist/utils/service/frontendServiceBookingUtils.js +134 -0
- package/dist/utils/service/frontendServiceBookingUtils.js.map +1 -0
- package/dist/utils/service/regexUtils.d.ts +6 -0
- package/dist/utils/service/regexUtils.d.ts.map +1 -0
- package/dist/utils/service/regexUtils.js +16 -0
- package/dist/utils/service/regexUtils.js.map +1 -0
- package/dist/utils/service/serviceBookingStatusUtils.d.ts +21 -0
- package/dist/utils/service/serviceBookingStatusUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceBookingStatusUtils.js +130 -0
- package/dist/utils/service/serviceBookingStatusUtils.js.map +1 -0
- package/dist/utils/service/serviceBookingTypes.d.ts +19 -0
- package/dist/utils/service/serviceBookingTypes.d.ts.map +1 -0
- package/dist/utils/service/serviceBookingTypes.js +2 -0
- package/dist/utils/service/serviceBookingTypes.js.map +1 -0
- package/dist/utils/service/serviceDBUtils.d.ts +5 -0
- package/dist/utils/service/serviceDBUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceDBUtils.js +48 -0
- package/dist/utils/service/serviceDBUtils.js.map +1 -0
- package/dist/utils/service/serviceRateDBUtils.d.ts +1 -0
- package/dist/utils/service/serviceRateDBUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceRateDBUtils.js +159 -0
- package/dist/utils/service/serviceRateDBUtils.js.map +1 -0
- package/dist/utils/service/serviceRateTypes.d.ts +9 -0
- package/dist/utils/service/serviceRateTypes.d.ts.map +1 -0
- package/dist/utils/service/serviceRateTypes.js +2 -0
- package/dist/utils/service/serviceRateTypes.js.map +1 -0
- package/dist/utils/service/serviceRateUtils.d.ts +24 -0
- package/dist/utils/service/serviceRateUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceRateUtils.js +183 -0
- package/dist/utils/service/serviceRateUtils.js.map +1 -0
- package/dist/utils/service/serviceUtils.d.ts +83 -0
- package/dist/utils/service/serviceUtils.d.ts.map +1 -0
- package/dist/utils/service/serviceUtils.js +311 -0
- package/dist/utils/service/serviceUtils.js.map +1 -0
- package/dist/utils/service/venueUtils.d.ts +13 -0
- package/dist/utils/service/venueUtils.d.ts.map +1 -0
- package/dist/utils/service/venueUtils.js +18 -0
- package/dist/utils/service/venueUtils.js.map +1 -0
- package/dist/utils/slugUtils.d.ts +9 -0
- package/dist/utils/slugUtils.d.ts.map +1 -0
- package/dist/utils/slugUtils.js +47 -0
- package/dist/utils/slugUtils.js.map +1 -0
- package/dist/utils/sortUtils.d.ts +7 -0
- package/dist/utils/sortUtils.d.ts.map +1 -0
- package/dist/utils/sortUtils.js +26 -0
- package/dist/utils/sortUtils.js.map +1 -0
- package/dist/utils/stringUtils.d.ts +2 -0
- package/dist/utils/stringUtils.d.ts.map +1 -0
- package/dist/utils/stringUtils.js +6 -0
- package/dist/utils/stringUtils.js.map +1 -0
- package/dist/utils/stripeAccountUtils.d.ts +3 -0
- package/dist/utils/stripeAccountUtils.d.ts.map +1 -0
- package/dist/utils/stripeAccountUtils.js +10 -0
- package/dist/utils/stripeAccountUtils.js.map +1 -0
- package/dist/utils/ticketListUtils.d.ts +12 -0
- package/dist/utils/ticketListUtils.d.ts.map +1 -0
- package/dist/utils/ticketListUtils.js +78 -0
- package/dist/utils/ticketListUtils.js.map +1 -0
- package/dist/utils/typeUtils.d.ts +11 -0
- package/dist/utils/typeUtils.d.ts.map +1 -0
- package/dist/utils/typeUtils.js +8 -0
- package/dist/utils/typeUtils.js.map +1 -0
- package/dist/utils/urlUtils.d.ts +10 -0
- package/dist/utils/urlUtils.d.ts.map +1 -0
- package/dist/utils/urlUtils.js +66 -0
- package/dist/utils/urlUtils.js.map +1 -0
- package/dist/utils/userPromoCodeUtils.d.ts +21 -0
- package/dist/utils/userPromoCodeUtils.d.ts.map +1 -0
- package/dist/utils/userPromoCodeUtils.js +13 -0
- package/dist/utils/userPromoCodeUtils.js.map +1 -0
- package/dist/utils/userSubscriptionUtils.d.ts +36 -0
- package/dist/utils/userSubscriptionUtils.d.ts.map +1 -0
- package/dist/utils/userSubscriptionUtils.js +56 -0
- package/dist/utils/userSubscriptionUtils.js.map +1 -0
- package/dist/utils/userUtils.d.ts +2 -0
- package/dist/utils/userUtils.d.ts.map +1 -0
- package/dist/utils/userUtils.js +2 -0
- package/dist/utils/userUtils.js.map +1 -0
- package/package.json +5 -3
- package/prisma/schema.prisma +117 -0
- package/src/definitions.ts +52 -1
- package/src/extendedSchemas.ts +177 -6
- package/src/index.ts +32 -21
- package/src/utils/blog/blogDbUtils.ts +343 -0
- package/src/utils/blogUtils.ts +134 -0
- package/src/utils/qrCodeUtils.ts +4 -2
- package/src/utils/service/apiServiceBookingApiUtils.ts +0 -0
- package/src/utils/slugUtils.ts +60 -0
- package/src/utils/ticketListUtils.ts +24 -6
- package/src/utils/typeUtils.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../src/utils/typeUtils.ts"],"names":[],"mappings":"AAsBA,sCAAsC;AACtC,MAAM,UAAU,mBAAmB,CACjC,IAAS;IAET,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QAChB,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAqB,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function getFrontendHost(): string;
|
|
2
|
+
export declare function getBackendHost(): string;
|
|
3
|
+
export declare function getSsrBashDetailUrl(bashEventId: string | undefined): string;
|
|
4
|
+
export interface QueryParam {
|
|
5
|
+
key: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function urlAppendQueryParam(url: string, params: QueryParam[]): string;
|
|
9
|
+
export declare function urlRemoveQueryParam(url: string, keys: string[]): string;
|
|
10
|
+
//# sourceMappingURL=urlUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlUtils.d.ts","sourceRoot":"","sources":["../../src/utils/urlUtils.ts"],"names":[],"mappings":"AAKA,wBAAgB,eAAe,IAAI,MAAM,CAKxC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAKvC;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAO3E;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CA0B7E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CA0BvE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { isProduction } from "./apiUtils";
|
|
2
|
+
import { BASH_DETAIL_URL } from "../definitions";
|
|
3
|
+
const API_HOST = process.env.REACT_APP_API ?? "http://localhost:3500";
|
|
4
|
+
export function getFrontendHost() {
|
|
5
|
+
const host = isProduction()
|
|
6
|
+
? `${window.location.protocol}//${window.location.host}`
|
|
7
|
+
: `${window.location.protocol}//${window.location.hostname}:3000`;
|
|
8
|
+
return host;
|
|
9
|
+
}
|
|
10
|
+
export function getBackendHost() {
|
|
11
|
+
const host = isProduction()
|
|
12
|
+
? API_HOST
|
|
13
|
+
: `${window.location.protocol}//${window.location.hostname}:3500`;
|
|
14
|
+
return host;
|
|
15
|
+
}
|
|
16
|
+
export function getSsrBashDetailUrl(bashEventId) {
|
|
17
|
+
if (bashEventId) {
|
|
18
|
+
const url = `/api/ssr${BASH_DETAIL_URL}/${bashEventId}`;
|
|
19
|
+
return url;
|
|
20
|
+
}
|
|
21
|
+
console.error(`BashEventId was not specified for the ssr bash detail url`);
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
export function urlAppendQueryParam(url, params) {
|
|
25
|
+
// Split the URL into base and hash
|
|
26
|
+
const [base, hash = ""] = url.split("#");
|
|
27
|
+
// Split the base into path and query
|
|
28
|
+
const [path, query = ""] = base.split("?");
|
|
29
|
+
// Initialize URLSearchParams with existing query
|
|
30
|
+
const searchParams = new URLSearchParams(query);
|
|
31
|
+
// Append each new query parameter
|
|
32
|
+
params.forEach(({ key, value }) => searchParams.append(key, value));
|
|
33
|
+
// Convert searchParams back to string
|
|
34
|
+
const newQuery = searchParams.toString();
|
|
35
|
+
// Reconstruct the URL
|
|
36
|
+
let newUrl = path;
|
|
37
|
+
if (newQuery) {
|
|
38
|
+
newUrl += `?${newQuery}`;
|
|
39
|
+
}
|
|
40
|
+
if (hash) {
|
|
41
|
+
newUrl += `#${hash}`;
|
|
42
|
+
}
|
|
43
|
+
return newUrl;
|
|
44
|
+
}
|
|
45
|
+
export function urlRemoveQueryParam(url, keys) {
|
|
46
|
+
// Split the URL into base and hash
|
|
47
|
+
const [base, hash = ""] = url.split("#");
|
|
48
|
+
// Split the base into path and query
|
|
49
|
+
const [path, query = ""] = base.split("?");
|
|
50
|
+
// Initialize URLSearchParams with existing query
|
|
51
|
+
const searchParams = new URLSearchParams(query);
|
|
52
|
+
// Remove each specified query parameter
|
|
53
|
+
keys.forEach((key) => searchParams.delete(key));
|
|
54
|
+
// Convert searchParams back to string
|
|
55
|
+
const newQuery = searchParams.toString();
|
|
56
|
+
// Reconstruct the URL
|
|
57
|
+
let newUrl = path;
|
|
58
|
+
if (newQuery) {
|
|
59
|
+
newUrl += `?${newQuery}`;
|
|
60
|
+
}
|
|
61
|
+
if (hash) {
|
|
62
|
+
newUrl += `#${hash}`;
|
|
63
|
+
}
|
|
64
|
+
return newUrl;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=urlUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlUtils.js","sourceRoot":"","sources":["../../src/utils/urlUtils.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UserPromoCodeType = "PerUser" | "PerService" | "PerBashEvent";
|
|
2
|
+
export type UserPromoCodeDuration = {
|
|
3
|
+
days?: number;
|
|
4
|
+
};
|
|
5
|
+
export type UserPromoCode = {
|
|
6
|
+
code?: string;
|
|
7
|
+
maxRedemptions?: number;
|
|
8
|
+
isTrial?: boolean;
|
|
9
|
+
discountPercentageFee?: number;
|
|
10
|
+
discountMonthlyFee?: number;
|
|
11
|
+
duration: UserPromoCodeDuration;
|
|
12
|
+
type: UserPromoCodeType;
|
|
13
|
+
automaticallyApplied: boolean;
|
|
14
|
+
expiresAfter?: number;
|
|
15
|
+
};
|
|
16
|
+
export type UserPromoCodeMap = {
|
|
17
|
+
[key: string]: UserPromoCode;
|
|
18
|
+
};
|
|
19
|
+
export declare const SERVICE_FREE_TRIAL_PROMO_CODE: "ServiceFreeTrial0000";
|
|
20
|
+
export declare const USER_PROMO_CODES: UserPromoCodeMap;
|
|
21
|
+
//# sourceMappingURL=userPromoCodeUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPromoCodeUtils.d.ts","sourceRoot":"","sources":["../../src/utils/userPromoCodeUtils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,IAAI,EAAE,iBAAiB,CAAC;IACxB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAG,sBAA+B,CAAC;AAE7E,eAAO,MAAM,gBAAgB,EAAE,gBASrB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const SERVICE_FREE_TRIAL_PROMO_CODE = "ServiceFreeTrial0000";
|
|
2
|
+
export const USER_PROMO_CODES = {
|
|
3
|
+
[SERVICE_FREE_TRIAL_PROMO_CODE]: {
|
|
4
|
+
isTrial: true,
|
|
5
|
+
duration: {
|
|
6
|
+
days: 90,
|
|
7
|
+
},
|
|
8
|
+
type: "PerUser",
|
|
9
|
+
automaticallyApplied: true,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
Object.entries(USER_PROMO_CODES).forEach((promoCode) => (promoCode[1].code = promoCode[0]));
|
|
13
|
+
//# sourceMappingURL=userPromoCodeUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userPromoCodeUtils.js","sourceRoot":"","sources":["../../src/utils/userPromoCodeUtils.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,MAAM,6BAA6B,GAAG,sBAA+B,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAChD,CAAC,6BAA6B,CAAC,EAAE;QAC/B,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE;YACR,IAAI,EAAE,EAAE;SACT;QACD,IAAI,EAAE,SAAS;QACf,oBAAoB,EAAE,IAAI;KAC3B;CACO,CAAC;AAEX,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,CACtC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAClD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ServiceTypes, UserSubscriptionType } from "@prisma/client";
|
|
2
|
+
export declare const ServiceSubscriptionTier: {
|
|
3
|
+
readonly Ally: "Ally";
|
|
4
|
+
readonly Partner: "Partner";
|
|
5
|
+
readonly Patreon: "Patron";
|
|
6
|
+
};
|
|
7
|
+
export type ServiceSubscriptionTier = "Ally" | "Partner" | "Patron";
|
|
8
|
+
export type UserSubscriptionServiceTierInfo = {
|
|
9
|
+
name: string;
|
|
10
|
+
type?: ServiceSubscriptionTier;
|
|
11
|
+
description: string;
|
|
12
|
+
price: number;
|
|
13
|
+
};
|
|
14
|
+
export type UserSubscriptionServiceTierInfoMap = {
|
|
15
|
+
[key in ServiceSubscriptionTier]: UserSubscriptionServiceTierInfo;
|
|
16
|
+
};
|
|
17
|
+
export type UserSubscriptionInfo = {
|
|
18
|
+
name: string;
|
|
19
|
+
type?: UserSubscriptionType;
|
|
20
|
+
description: string;
|
|
21
|
+
price: number;
|
|
22
|
+
};
|
|
23
|
+
export type UserSubscriptionServiceInfoMap = {
|
|
24
|
+
[key in UserSubscriptionType]: UserSubscriptionInfo;
|
|
25
|
+
};
|
|
26
|
+
export type UserServiceSubscriptionTierToServiceTypes = {
|
|
27
|
+
[key in ServiceSubscriptionTier]: ServiceTypes[];
|
|
28
|
+
};
|
|
29
|
+
export type UserServiceSubscriptionTierFromServiceTypes = {
|
|
30
|
+
[key in ServiceTypes]: ServiceSubscriptionTier;
|
|
31
|
+
};
|
|
32
|
+
export declare const SERVICE_TIER_TO_SERVICES_LIST: UserServiceSubscriptionTierToServiceTypes;
|
|
33
|
+
export declare const SERVICE_TIER_FROM_SERVICE_TYPE: UserServiceSubscriptionTierFromServiceTypes;
|
|
34
|
+
export declare const USER_SUBSCRIPTION_TYPES: UserSubscriptionServiceInfoMap;
|
|
35
|
+
export declare const SERVICE_SUBSCRIPTION_TIERS: UserSubscriptionServiceTierInfoMap;
|
|
36
|
+
//# sourceMappingURL=userSubscriptionUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userSubscriptionUtils.d.ts","sourceRoot":"","sources":["../../src/utils/userSubscriptionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEpE,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;KAC9C,GAAG,IAAI,uBAAuB,GAAG,+BAA+B;CAClE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CAIf,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;KAC1C,GAAG,IAAI,oBAAoB,GAAG,oBAAoB;CACpD,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG;KACrD,GAAG,IAAI,uBAAuB,GAAG,YAAY,EAAE;CACjD,CAAC;AACF,MAAM,MAAM,2CAA2C,GAAG;KACvD,GAAG,IAAI,YAAY,GAAG,uBAAuB;CAC/C,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAIrC,yCAAyC,CAAC;AAE/C,eAAO,MAAM,8BAA8B,6CAOU,CAAC;AAEtD,eAAO,MAAM,uBAAuB,EAqB/B,8BAA8B,CAAC;AAEpC,eAAO,MAAM,0BAA0B,EAgBlC,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export const ServiceSubscriptionTier = {
|
|
2
|
+
Ally: "Ally",
|
|
3
|
+
Partner: "Partner",
|
|
4
|
+
Patreon: "Patron",
|
|
5
|
+
};
|
|
6
|
+
export const SERVICE_TIER_TO_SERVICES_LIST = {
|
|
7
|
+
Ally: ["EventServices", "EntertainmentServices"],
|
|
8
|
+
Partner: ["Vendors", "Exhibitors", "Sponsors"],
|
|
9
|
+
Patron: ["Venues", "Organizations"],
|
|
10
|
+
};
|
|
11
|
+
export const SERVICE_TIER_FROM_SERVICE_TYPE = Object.entries(SERVICE_TIER_TO_SERVICES_LIST).reduce((sofar, [type, serviceTypes]) => {
|
|
12
|
+
serviceTypes.forEach((serviceType) => (sofar[serviceType] = type));
|
|
13
|
+
return sofar;
|
|
14
|
+
}, {});
|
|
15
|
+
export const USER_SUBSCRIPTION_TYPES = {
|
|
16
|
+
// "Free": {
|
|
17
|
+
// name: "Free",
|
|
18
|
+
// description: "Free",
|
|
19
|
+
// price: 0,
|
|
20
|
+
// },
|
|
21
|
+
Basic: {
|
|
22
|
+
name: "Basic",
|
|
23
|
+
description: "Basic",
|
|
24
|
+
price: 0,
|
|
25
|
+
},
|
|
26
|
+
// "Premium": {
|
|
27
|
+
// name: "Premium",
|
|
28
|
+
// description: "Premium",
|
|
29
|
+
// price: 200,
|
|
30
|
+
// },
|
|
31
|
+
// "VIP": {
|
|
32
|
+
// name: "VIP",
|
|
33
|
+
// description: "VIP",
|
|
34
|
+
// price: 500,
|
|
35
|
+
// }
|
|
36
|
+
};
|
|
37
|
+
export const SERVICE_SUBSCRIPTION_TIERS = {
|
|
38
|
+
Ally: {
|
|
39
|
+
name: "Ally",
|
|
40
|
+
description: "Ally",
|
|
41
|
+
price: 14,
|
|
42
|
+
},
|
|
43
|
+
Partner: {
|
|
44
|
+
name: "Partner",
|
|
45
|
+
description: "Partner",
|
|
46
|
+
price: 49.0,
|
|
47
|
+
},
|
|
48
|
+
Patron: {
|
|
49
|
+
name: "Patron",
|
|
50
|
+
description: "Patron",
|
|
51
|
+
price: 99.0,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
Object.entries(USER_SUBSCRIPTION_TYPES).forEach(([type, info]) => (info.type = type));
|
|
55
|
+
Object.entries(SERVICE_SUBSCRIPTION_TIERS).forEach(([type, info]) => (info.type = type));
|
|
56
|
+
//# sourceMappingURL=userSubscriptionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userSubscriptionUtils.js","sourceRoot":"","sources":["../../src/utils/userSubscriptionUtils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,QAAQ;CACT,CAAC;AAmCX,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,IAAI,EAAE,CAAC,eAAe,EAAE,uBAAuB,CAAC;IAChD,OAAO,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC;IAC9C,MAAM,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;CACS,CAAC;AAE/C,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,OAAO,CAC1D,6BAA6B,CAC9B,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,EAAE;IACvC,YAAY,CAAC,OAAO,CAClB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAA+B,CAAC,CACxE,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,EAAiD,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,YAAY;IACZ,oBAAoB;IACpB,2BAA2B;IAC3B,gBAAgB;IAChB,KAAK;IACL,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,OAAO;QACpB,KAAK,EAAE,CAAC;KACT;IACD,eAAe;IACf,uBAAuB;IACvB,8BAA8B;IAC9B,kBAAkB;IAClB,KAAK;IACL,WAAW;IACX,mBAAmB;IACnB,0BAA0B;IAC1B,kBAAkB;IAClB,IAAI;CAC6B,CAAC;AAEpC,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,MAAM;QACnB,KAAK,EAAE,EAAE;KACV;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,SAAS;QACtB,KAAK,EAAE,IAAI;KACZ;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,QAAQ;QACrB,KAAK,EAAE,IAAI;KACZ;CACoC,CAAC;AAExC,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAC7C,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAA4B,CAAC,CAC7D,CAAC;AACF,MAAM,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAChD,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAA+B,CAAC,CAChE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userUtils.d.ts","sourceRoot":"","sources":["../../src/utils/userUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userUtils.js","sourceRoot":"","sources":["../../src/utils/userUtils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bash-app/bash-common",
|
|
3
|
-
"version": "30.
|
|
3
|
+
"version": "30.53.0",
|
|
4
4
|
"description": "Common data and scripts to use on the frontend and backend",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"build": "npm run generate && npm run tsc",
|
|
9
10
|
"generate": "prisma generate",
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
"lodash-es": "^4.17.21",
|
|
27
28
|
"mixpanel-browser": "^2.65.0",
|
|
28
29
|
"npm": "^10.5.0",
|
|
29
|
-
"qrcode": "^1.5.3"
|
|
30
|
+
"qrcode": "^1.5.3",
|
|
31
|
+
"slugify": "^1.6.6"
|
|
30
32
|
},
|
|
31
33
|
"peerDependencies": {
|
|
32
34
|
"@prisma/client": "^6.1.0",
|
package/prisma/schema.prisma
CHANGED
|
@@ -311,6 +311,7 @@ model BashEvent {
|
|
|
311
311
|
id String @id @default(cuid())
|
|
312
312
|
source BashEventSource @default(Bash)
|
|
313
313
|
title String
|
|
314
|
+
slug String? @unique
|
|
314
315
|
creatorId String
|
|
315
316
|
creator User @relation("CreatedEvent", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
316
317
|
createdAt DateTime? @default(now())
|
|
@@ -374,6 +375,7 @@ model BashEvent {
|
|
|
374
375
|
serviceBookings ServiceBooking[] // Add this field to create the reverse relation
|
|
375
376
|
userReport UserReport[]
|
|
376
377
|
favoritedBy UserFavorite[]
|
|
378
|
+
slugHistory BashSlugHistory[]
|
|
377
379
|
}
|
|
378
380
|
|
|
379
381
|
model Coordinates {
|
|
@@ -1167,6 +1169,10 @@ model User {
|
|
|
1167
1169
|
favorites UserFavorite[]
|
|
1168
1170
|
|
|
1169
1171
|
vendorBid VendorBid[]
|
|
1172
|
+
|
|
1173
|
+
// Blog relations
|
|
1174
|
+
blogPosts BlogPost[] @relation("BlogAuthor")
|
|
1175
|
+
blogComments BlogComment[] @relation("BlogCommentAuthor")
|
|
1170
1176
|
}
|
|
1171
1177
|
|
|
1172
1178
|
model UserPreferences {
|
|
@@ -3466,3 +3472,114 @@ model UserFavorite {
|
|
|
3466
3472
|
@@index([serviceId])
|
|
3467
3473
|
@@index([bashEventId])
|
|
3468
3474
|
}
|
|
3475
|
+
|
|
3476
|
+
model BashSlugHistory {
|
|
3477
|
+
id String @id @default(cuid())
|
|
3478
|
+
bashId String
|
|
3479
|
+
bash BashEvent @relation(fields: [bashId], references: [id], onDelete: Cascade)
|
|
3480
|
+
oldSlug String
|
|
3481
|
+
createdAt DateTime @default(now())
|
|
3482
|
+
|
|
3483
|
+
@@index([oldSlug])
|
|
3484
|
+
@@index([bashId])
|
|
3485
|
+
}
|
|
3486
|
+
|
|
3487
|
+
model BlogPost {
|
|
3488
|
+
id String @id @default(cuid())
|
|
3489
|
+
title String
|
|
3490
|
+
slug String @unique
|
|
3491
|
+
excerpt String?
|
|
3492
|
+
content String // Rich text content
|
|
3493
|
+
coverImage String?
|
|
3494
|
+
authorId String
|
|
3495
|
+
author User @relation("BlogAuthor", fields: [authorId], references: [id], onDelete: Cascade)
|
|
3496
|
+
|
|
3497
|
+
// SEO fields
|
|
3498
|
+
metaTitle String?
|
|
3499
|
+
metaDescription String?
|
|
3500
|
+
metaKeywords String[] @default([])
|
|
3501
|
+
|
|
3502
|
+
// Publishing
|
|
3503
|
+
status BlogStatus @default(Draft)
|
|
3504
|
+
publishedAt DateTime?
|
|
3505
|
+
scheduledFor DateTime?
|
|
3506
|
+
|
|
3507
|
+
// Engagement
|
|
3508
|
+
viewCount Int @default(0)
|
|
3509
|
+
readTime Int? // Estimated read time in minutes
|
|
3510
|
+
|
|
3511
|
+
// Categorization
|
|
3512
|
+
categoryId String?
|
|
3513
|
+
category BlogCategory? @relation(fields: [categoryId], references: [id], onDelete: SetNull)
|
|
3514
|
+
tags BlogTag[]
|
|
3515
|
+
|
|
3516
|
+
// Timestamps
|
|
3517
|
+
createdAt DateTime @default(now())
|
|
3518
|
+
updatedAt DateTime @updatedAt
|
|
3519
|
+
|
|
3520
|
+
// Relations
|
|
3521
|
+
comments BlogComment[]
|
|
3522
|
+
|
|
3523
|
+
@@index([status, publishedAt])
|
|
3524
|
+
@@index([categoryId])
|
|
3525
|
+
@@index([authorId])
|
|
3526
|
+
@@index([slug])
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
model BlogCategory {
|
|
3530
|
+
id String @id @default(cuid())
|
|
3531
|
+
name String @unique
|
|
3532
|
+
slug String @unique
|
|
3533
|
+
description String?
|
|
3534
|
+
color String? // Hex color for UI
|
|
3535
|
+
posts BlogPost[]
|
|
3536
|
+
createdAt DateTime @default(now())
|
|
3537
|
+
updatedAt DateTime @updatedAt
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
model BlogTag {
|
|
3541
|
+
id String @id @default(cuid())
|
|
3542
|
+
name String @unique
|
|
3543
|
+
slug String @unique
|
|
3544
|
+
color String? // Hex color for UI
|
|
3545
|
+
posts BlogPost[]
|
|
3546
|
+
createdAt DateTime @default(now())
|
|
3547
|
+
updatedAt DateTime @updatedAt
|
|
3548
|
+
}
|
|
3549
|
+
|
|
3550
|
+
model BlogComment {
|
|
3551
|
+
id String @id @default(cuid())
|
|
3552
|
+
content String
|
|
3553
|
+
authorId String
|
|
3554
|
+
author User @relation("BlogCommentAuthor", fields: [authorId], references: [id], onDelete: Cascade)
|
|
3555
|
+
postId String
|
|
3556
|
+
post BlogPost @relation(fields: [postId], references: [id], onDelete: Cascade)
|
|
3557
|
+
|
|
3558
|
+
// Nested comments
|
|
3559
|
+
parentId String?
|
|
3560
|
+
parent BlogComment? @relation("CommentReplies", fields: [parentId], references: [id], onDelete: Cascade)
|
|
3561
|
+
replies BlogComment[] @relation("CommentReplies")
|
|
3562
|
+
|
|
3563
|
+
// Moderation
|
|
3564
|
+
status CommentStatus @default(Published)
|
|
3565
|
+
|
|
3566
|
+
createdAt DateTime @default(now())
|
|
3567
|
+
updatedAt DateTime @updatedAt
|
|
3568
|
+
|
|
3569
|
+
@@index([postId])
|
|
3570
|
+
@@index([authorId])
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
enum BlogStatus {
|
|
3574
|
+
Draft
|
|
3575
|
+
Published
|
|
3576
|
+
Scheduled
|
|
3577
|
+
Archived
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3580
|
+
enum CommentStatus {
|
|
3581
|
+
Published
|
|
3582
|
+
Pending
|
|
3583
|
+
Spam
|
|
3584
|
+
Trash
|
|
3585
|
+
}
|
package/src/definitions.ts
CHANGED
|
@@ -137,7 +137,8 @@ export const SERVICE_BOOKING_DETAILS_SERVICE_VIEW_URL_PAGE =
|
|
|
137
137
|
|
|
138
138
|
export const VERIFICATION_RETURN_URL = `/sign-up` as const;
|
|
139
139
|
export const MY_SERVICES_URL = "/my-services" as const;
|
|
140
|
-
export const BASH_DETAIL_URL = `/bash
|
|
140
|
+
export const BASH_DETAIL_URL = `/bash` as const;
|
|
141
|
+
export const BASH_DETAIL_URL_PATTERN = `/bash/$bashEventIdSlug` as const;
|
|
141
142
|
export const SERVICE_PAGE_URL = `/service-page` as const;
|
|
142
143
|
export const LOGIN_URL = `/login` as const;
|
|
143
144
|
export const TICKET_DETAILS = `/ticket-details` as const;
|
|
@@ -969,6 +970,20 @@ export enum BadgeCategory {
|
|
|
969
970
|
Special = "Special"
|
|
970
971
|
}
|
|
971
972
|
|
|
973
|
+
export enum BlogStatus {
|
|
974
|
+
Draft = "Draft",
|
|
975
|
+
Published = "Published",
|
|
976
|
+
Scheduled = "Scheduled",
|
|
977
|
+
Archived = "Archived"
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export enum CommentStatus {
|
|
981
|
+
Published = "Published",
|
|
982
|
+
Pending = "Pending",
|
|
983
|
+
Spam = "Spam",
|
|
984
|
+
Trash = "Trash"
|
|
985
|
+
}
|
|
986
|
+
|
|
972
987
|
// Type definitions for badges and reviews
|
|
973
988
|
export interface Badge {
|
|
974
989
|
id: string;
|
|
@@ -1160,3 +1175,39 @@ export const REVIEW_API_ENDPOINTS = {
|
|
|
1160
1175
|
`/user/${userId}/eligible-for-review/${hostId}`,
|
|
1161
1176
|
CREATE_REVIEW: () => `/reviews`,
|
|
1162
1177
|
};
|
|
1178
|
+
|
|
1179
|
+
export const DEFAULT_BASH_EVENT_IMAGE = "https://via.placeholder.com/400x300/e5e7eb/6b7280?text=Bash+Event" as const;
|
|
1180
|
+
|
|
1181
|
+
// Blog constants
|
|
1182
|
+
export const BLOG_URL = "/blog" as const;
|
|
1183
|
+
export const BLOG_DETAIL_URL = "/blog" as const;
|
|
1184
|
+
export const DEFAULT_BLOG_IMAGE = "https://via.placeholder.com/800x400/e5e7eb/6b7280?text=Blog+Post" as const;
|
|
1185
|
+
|
|
1186
|
+
// Blog pagination
|
|
1187
|
+
export const BLOG_POSTS_PER_PAGE = 12 as const;
|
|
1188
|
+
export const BLOG_EXCERPT_LENGTH = 150 as const;
|
|
1189
|
+
|
|
1190
|
+
// Blog categories
|
|
1191
|
+
export const DEFAULT_BLOG_CATEGORIES = [
|
|
1192
|
+
{ name: "Event Planning", slug: "event-planning", color: "#3B82F6" },
|
|
1193
|
+
{ name: "Industry News", slug: "industry-news", color: "#10B981" },
|
|
1194
|
+
{ name: "Tips & Tricks", slug: "tips-tricks", color: "#F59E0B" },
|
|
1195
|
+
{ name: "Success Stories", slug: "success-stories", color: "#8B5CF6" },
|
|
1196
|
+
{ name: "Community", slug: "community", color: "#EF4444" },
|
|
1197
|
+
] as const;
|
|
1198
|
+
|
|
1199
|
+
// Blog tags
|
|
1200
|
+
export const POPULAR_BLOG_TAGS = [
|
|
1201
|
+
"event-planning",
|
|
1202
|
+
"networking",
|
|
1203
|
+
"marketing",
|
|
1204
|
+
"venues",
|
|
1205
|
+
"catering",
|
|
1206
|
+
"entertainment",
|
|
1207
|
+
"photography",
|
|
1208
|
+
"decorations",
|
|
1209
|
+
"budgeting",
|
|
1210
|
+
"timeline",
|
|
1211
|
+
] as const;
|
|
1212
|
+
|
|
1213
|
+
export const SITE_NAME = "Bash" as const;
|