@bash-app/bash-common 29.32.0 → 29.34.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
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1168,7 +1168,7 @@ model Venue {
|
|
|
1168
1168
|
vibe String?
|
|
1169
1169
|
dress String?
|
|
1170
1170
|
|
|
1171
|
-
pricingPlan VenuePricingPlan?
|
|
1171
|
+
pricingPlan VenuePricingPlan?
|
|
1172
1172
|
subscriptionStatus SubscriptionStatus?
|
|
1173
1173
|
subscriptionStartDate DateTime?
|
|
1174
1174
|
|
|
@@ -1374,6 +1374,7 @@ model ServiceRate {
|
|
|
1374
1374
|
rateType ServiceRateType
|
|
1375
1375
|
hourlyRate Int?
|
|
1376
1376
|
dailyRate Int?
|
|
1377
|
+
cleaningFeePerBooking Int?
|
|
1377
1378
|
minimumTimeBlockHours Int?
|
|
1378
1379
|
serviceSpecialRates ServiceSpecialRates?
|
|
1379
1380
|
serviceDailyRates ServiceDailyRates?
|
package/src/definitions.ts
CHANGED
|
@@ -283,6 +283,14 @@ export interface StripeCreateBashEventDonationCheckoutSessionArgs {
|
|
|
283
283
|
donationAmount: number;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
export interface StripeCreateServiceSubscriptionCheckoutSessionArgs {
|
|
287
|
+
serviceId: string;
|
|
288
|
+
currency: string;
|
|
289
|
+
paymentMethodType: string;
|
|
290
|
+
promoCode?: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
286
294
|
export type StripeSessionRedirect = {
|
|
287
295
|
stripeAccountIdDB: string;
|
|
288
296
|
redirectUrl: string;
|
|
@@ -19,7 +19,8 @@ export type ServiceCancelationPolicyMap = {
|
|
|
19
19
|
export const ServiceCancelationPolicyData: ServiceCancelationPolicyMap = {
|
|
20
20
|
[ServiceCancelationPolicyOption.None]: {
|
|
21
21
|
name: "None",
|
|
22
|
-
refundPolicy: []
|
|
22
|
+
refundPolicy: [],
|
|
23
|
+
description: "No cancelation policy."
|
|
23
24
|
},
|
|
24
25
|
[ServiceCancelationPolicyOption.VeryFlexible]: {
|
|
25
26
|
name: "Very Flexible",
|
|
@@ -94,7 +95,7 @@ function generateDescription(refundPolicy: ServiceCancelationRefundPolicy[]): st
|
|
|
94
95
|
return descriptions.join(" ");
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
Object.keys(ServiceCancelationPolicyData).forEach((policyKey) => {
|
|
98
|
+
Object.keys(ServiceCancelationPolicyData).filter((policyKey) => policyKey as ServiceCancelationPolicyOption != ServiceCancelationPolicyOption.None).forEach((policyKey) => {
|
|
98
99
|
const policy = ServiceCancelationPolicyData[policyKey as ServiceCancelationPolicyOption];
|
|
99
100
|
policy.description = generateDescription(policy.refundPolicy);
|
|
100
101
|
});
|
|
@@ -14,7 +14,7 @@ export type VenuePricingPlanMap = {
|
|
|
14
14
|
|
|
15
15
|
export const VenuePricingPlanData: VenuePricingPlanMap = {
|
|
16
16
|
[VenuePricingPlanOption.Percentage]: {
|
|
17
|
-
name: "Pay per booking
|
|
17
|
+
name: "Pay per booking",
|
|
18
18
|
description: "15% of each booking goes to Bash.",
|
|
19
19
|
percentageFee: 0.15,
|
|
20
20
|
monthlyFee: 0.0,
|