@bash-app/bash-common 29.40.3 → 29.40.4
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
|
@@ -808,43 +808,6 @@ enum SponsorType {
|
|
|
808
808
|
CompetitionPrizeProvider
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
-
model SocialMediaProfile {
|
|
812
|
-
id String @id @default(uuid())
|
|
813
|
-
platform SocialMediaPlatform
|
|
814
|
-
url String
|
|
815
|
-
visibility VisibilityPreference @default(Private)
|
|
816
|
-
user User @relation(fields: [userId], references: [id])
|
|
817
|
-
userId String
|
|
818
|
-
|
|
819
|
-
@@unique([userId, platform])
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
enum SocialMediaPlatform {
|
|
823
|
-
Facebook
|
|
824
|
-
Instagram
|
|
825
|
-
LinkedIn
|
|
826
|
-
TikTok
|
|
827
|
-
X
|
|
828
|
-
YouTube
|
|
829
|
-
Snapchat
|
|
830
|
-
Pinterest
|
|
831
|
-
Reddit
|
|
832
|
-
WhatsApp
|
|
833
|
-
Messenger
|
|
834
|
-
Telegram
|
|
835
|
-
Discord
|
|
836
|
-
Clubhouse
|
|
837
|
-
Twitch
|
|
838
|
-
Medium
|
|
839
|
-
BeReal
|
|
840
|
-
Mastodon
|
|
841
|
-
Tumblr
|
|
842
|
-
Threads
|
|
843
|
-
WeChat
|
|
844
|
-
Vk
|
|
845
|
-
Line
|
|
846
|
-
}
|
|
847
|
-
|
|
848
811
|
model User {
|
|
849
812
|
id String @id @default(cuid())
|
|
850
813
|
email String @unique
|
|
@@ -892,8 +855,7 @@ model User {
|
|
|
892
855
|
zipCode String?
|
|
893
856
|
country String? @default("US")
|
|
894
857
|
phone String?
|
|
895
|
-
|
|
896
|
-
documentIDId String? @unique
|
|
858
|
+
documentIDId String? @unique
|
|
897
859
|
documentID DocumentID?
|
|
898
860
|
comment BashComment[]
|
|
899
861
|
associatedBashes AssociatedBash[]
|
|
@@ -981,12 +943,18 @@ model ServiceSubscription {
|
|
|
981
943
|
}
|
|
982
944
|
|
|
983
945
|
model ServiceListingSubscription {
|
|
984
|
-
id String
|
|
985
|
-
|
|
986
|
-
|
|
946
|
+
id String @id @default(cuid())
|
|
947
|
+
stripeAccountId String
|
|
948
|
+
stripeAccount StripeAccount @relation(fields: [stripeAccountId], references: [id], onDelete: Restrict, onUpdate: Restrict)
|
|
949
|
+
stripeCheckoutSessionId String? @unique
|
|
950
|
+
stripeSubscriptionId String? @unique
|
|
951
|
+
|
|
952
|
+
subscriptionStatus ServiceSubscriptionStatus @default(None)
|
|
987
953
|
|
|
988
954
|
serviceId String? @unique
|
|
989
955
|
service Service? @relation(fields: [serviceId], references: [id], onDelete: Restrict)
|
|
956
|
+
|
|
957
|
+
@@index([stripeCheckoutSessionId, stripeSubscriptionId])
|
|
990
958
|
}
|
|
991
959
|
|
|
992
960
|
// Common data for all services; 1-1 relation between each individual service model such as Venue
|
|
@@ -1094,7 +1062,8 @@ model StripeAccount {
|
|
|
1094
1062
|
createdAt DateTime @default(now())
|
|
1095
1063
|
updatedAt DateTime @updatedAt
|
|
1096
1064
|
|
|
1097
|
-
service
|
|
1065
|
+
service Service[]
|
|
1066
|
+
ServiceListingSubscription ServiceListingSubscription[]
|
|
1098
1067
|
|
|
1099
1068
|
@@index([ownerId])
|
|
1100
1069
|
}
|
|
@@ -1220,9 +1189,9 @@ model Venue {
|
|
|
1220
1189
|
vibe String?
|
|
1221
1190
|
dress String?
|
|
1222
1191
|
|
|
1223
|
-
pricingPlan
|
|
1224
|
-
subscriptionStatus SubscriptionStatus?
|
|
1225
|
-
subscriptionStartDate DateTime?
|
|
1192
|
+
pricingPlan VenuePricingPlan?
|
|
1193
|
+
// subscriptionStatus SubscriptionStatus?
|
|
1194
|
+
// subscriptionStartDate DateTime?
|
|
1226
1195
|
|
|
1227
1196
|
bashEvents BashEvent[]
|
|
1228
1197
|
}
|
|
@@ -1253,7 +1222,8 @@ enum VenuePricingPlan {
|
|
|
1253
1222
|
Subscription
|
|
1254
1223
|
}
|
|
1255
1224
|
|
|
1256
|
-
enum
|
|
1225
|
+
enum ServiceSubscriptionStatus {
|
|
1226
|
+
None
|
|
1257
1227
|
Active
|
|
1258
1228
|
Canceled
|
|
1259
1229
|
Suspended
|
package/src/definitions.ts
CHANGED
|
@@ -288,6 +288,8 @@ export interface StripeCreateServiceSubscriptionCheckoutSessionArgs {
|
|
|
288
288
|
currency: string;
|
|
289
289
|
paymentMethodType: string;
|
|
290
290
|
promoCode?: string;
|
|
291
|
+
successUrl: string;
|
|
292
|
+
cancelUrl: string;
|
|
291
293
|
}
|
|
292
294
|
|
|
293
295
|
|
|
@@ -592,11 +594,3 @@ export interface IAddress {
|
|
|
592
594
|
zipCode: string;
|
|
593
595
|
country: string;
|
|
594
596
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
export interface SocialMediaProfile {
|
|
598
|
-
id: string;
|
|
599
|
-
platform: string; // Enum type if available
|
|
600
|
-
url: string;
|
|
601
|
-
userId: string;
|
|
602
|
-
}
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -37,7 +37,6 @@ import {
|
|
|
37
37
|
ServiceAddon,
|
|
38
38
|
ServicePackage,
|
|
39
39
|
ServiceListingSubscription,
|
|
40
|
-
SocialMediaProfile,
|
|
41
40
|
} from "@prisma/client";
|
|
42
41
|
import { SERVICE_LINK_DATA_TO_INCLUDE, UnionFromArray, VENUE_DATA_TO_INCLUDE } from "./definitions";
|
|
43
42
|
|
|
@@ -521,8 +520,6 @@ export const CONTACT_DATA_TO_INCLUDE = {
|
|
|
521
520
|
export interface UserExtraData extends User {
|
|
522
521
|
password?: string;
|
|
523
522
|
otp?: string;
|
|
524
|
-
socialMediaProfiles?: SocialMediaProfile[];
|
|
525
|
-
|
|
526
523
|
}
|
|
527
524
|
|
|
528
525
|
export interface UserExt extends User {
|
|
@@ -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
|
};
|