@bash-app/bash-common 29.37.3 → 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
|
@@ -943,8 +943,12 @@ model ServiceSubscription {
|
|
|
943
943
|
}
|
|
944
944
|
|
|
945
945
|
model ServiceListingSubscription {
|
|
946
|
-
id
|
|
947
|
-
|
|
946
|
+
id String @id @default(cuid())
|
|
947
|
+
stripeAccountId String
|
|
948
|
+
stripeCheckoutSessionId String? @unique
|
|
949
|
+
stripeSubscriptionId String? @unique
|
|
950
|
+
|
|
951
|
+
subscriptionStatus ServiceSubscriptionStatus @default(None)
|
|
948
952
|
|
|
949
953
|
serviceId String? @unique
|
|
950
954
|
service Service? @relation(fields: [serviceId], references: [id], onDelete: Restrict)
|
|
@@ -1181,9 +1185,9 @@ model Venue {
|
|
|
1181
1185
|
vibe String?
|
|
1182
1186
|
dress String?
|
|
1183
1187
|
|
|
1184
|
-
pricingPlan
|
|
1185
|
-
subscriptionStatus SubscriptionStatus?
|
|
1186
|
-
subscriptionStartDate DateTime?
|
|
1188
|
+
pricingPlan VenuePricingPlan?
|
|
1189
|
+
// subscriptionStatus SubscriptionStatus?
|
|
1190
|
+
// subscriptionStartDate DateTime?
|
|
1187
1191
|
|
|
1188
1192
|
bashEvents BashEvent[]
|
|
1189
1193
|
}
|
|
@@ -1214,7 +1218,8 @@ enum VenuePricingPlan {
|
|
|
1214
1218
|
Subscription
|
|
1215
1219
|
}
|
|
1216
1220
|
|
|
1217
|
-
enum
|
|
1221
|
+
enum ServiceSubscriptionStatus {
|
|
1222
|
+
None
|
|
1218
1223
|
Active
|
|
1219
1224
|
Canceled
|
|
1220
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
|
};
|