@bash-app/bash-common 29.38.0 → 29.39.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
|
@@ -944,9 +944,12 @@ model ServiceSubscription {
|
|
|
944
944
|
|
|
945
945
|
model ServiceListingSubscription {
|
|
946
946
|
id String @id @default(cuid())
|
|
947
|
+
stripeAccountId String
|
|
947
948
|
stripeCheckoutSessionId String? @unique
|
|
948
949
|
stripeSubscriptionId String? @unique
|
|
949
950
|
|
|
951
|
+
subscriptionStatus ServiceSubscriptionStatus @default(None)
|
|
952
|
+
|
|
950
953
|
serviceId String? @unique
|
|
951
954
|
service Service? @relation(fields: [serviceId], references: [id], onDelete: Restrict)
|
|
952
955
|
}
|
|
@@ -1182,9 +1185,9 @@ model Venue {
|
|
|
1182
1185
|
vibe String?
|
|
1183
1186
|
dress String?
|
|
1184
1187
|
|
|
1185
|
-
pricingPlan
|
|
1186
|
-
subscriptionStatus SubscriptionStatus?
|
|
1187
|
-
subscriptionStartDate DateTime?
|
|
1188
|
+
pricingPlan VenuePricingPlan?
|
|
1189
|
+
// subscriptionStatus SubscriptionStatus?
|
|
1190
|
+
// subscriptionStartDate DateTime?
|
|
1188
1191
|
|
|
1189
1192
|
bashEvents BashEvent[]
|
|
1190
1193
|
}
|
|
@@ -1215,7 +1218,8 @@ enum VenuePricingPlan {
|
|
|
1215
1218
|
Subscription
|
|
1216
1219
|
}
|
|
1217
1220
|
|
|
1218
|
-
enum
|
|
1221
|
+
enum ServiceSubscriptionStatus {
|
|
1222
|
+
None
|
|
1219
1223
|
Active
|
|
1220
1224
|
Canceled
|
|
1221
1225
|
Suspended
|
|
@@ -20,7 +20,7 @@ export const ServiceCancelationPolicyData: ServiceCancelationPolicyMap = {
|
|
|
20
20
|
[ServiceCancelationPolicyOption.None]: {
|
|
21
21
|
name: "None",
|
|
22
22
|
refundPolicy: [],
|
|
23
|
-
description: "No
|
|
23
|
+
description: "No cancellation policy."
|
|
24
24
|
},
|
|
25
25
|
[ServiceCancelationPolicyOption.VeryFlexible]: {
|
|
26
26
|
name: "Very Flexible",
|
|
@@ -102,15 +102,17 @@ Object.keys(ServiceCancelationPolicyData).filter((policyKey) => policyKey as Ser
|
|
|
102
102
|
|
|
103
103
|
export type ServicePromoCodeType = "PerUser" | "PerService";
|
|
104
104
|
|
|
105
|
+
export type ServicePromoCodeDuration = {
|
|
106
|
+
days?: number;
|
|
107
|
+
};
|
|
108
|
+
|
|
105
109
|
export type ServicePromoCode = {
|
|
106
110
|
code?: string;
|
|
107
111
|
maxRedemptions?: number;
|
|
108
112
|
isTrial?: boolean;
|
|
109
113
|
discountPercentageFee?: number;
|
|
110
114
|
discountMonthlyFee?: number;
|
|
111
|
-
duration:
|
|
112
|
-
days?: number;
|
|
113
|
-
},
|
|
115
|
+
duration: ServicePromoCodeDuration,
|
|
114
116
|
type: ServicePromoCodeType;
|
|
115
117
|
automaticallyApplied: boolean;
|
|
116
118
|
};
|