@bash-app/bash-common 29.40.2 → 29.40.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "29.40.2",
3
+ "version": "29.40.3",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -808,6 +808,43 @@ 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
+
811
848
  model User {
812
849
  id String @id @default(cuid())
813
850
  email String @unique
@@ -855,7 +892,8 @@ model User {
855
892
  zipCode String?
856
893
  country String? @default("US")
857
894
  phone String?
858
- documentIDId String? @unique
895
+ socialMediaProfiles SocialMediaProfile[]
896
+ documentIDId String? @unique
859
897
  documentID DocumentID?
860
898
  comment BashComment[]
861
899
  associatedBashes AssociatedBash[]
@@ -943,13 +981,9 @@ model ServiceSubscription {
943
981
  }
944
982
 
945
983
  model ServiceListingSubscription {
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)
984
+ id String @id @default(cuid())
985
+ stripeCheckoutSessionId String? @unique
986
+ stripeSubscriptionId String? @unique
953
987
 
954
988
  serviceId String? @unique
955
989
  service Service? @relation(fields: [serviceId], references: [id], onDelete: Restrict)
@@ -1060,8 +1094,7 @@ model StripeAccount {
1060
1094
  createdAt DateTime @default(now())
1061
1095
  updatedAt DateTime @updatedAt
1062
1096
 
1063
- service Service[]
1064
- ServiceListingSubscription ServiceListingSubscription[]
1097
+ service Service[]
1065
1098
 
1066
1099
  @@index([ownerId])
1067
1100
  }
@@ -1187,9 +1220,9 @@ model Venue {
1187
1220
  vibe String?
1188
1221
  dress String?
1189
1222
 
1190
- pricingPlan VenuePricingPlan?
1191
- // subscriptionStatus SubscriptionStatus?
1192
- // subscriptionStartDate DateTime?
1223
+ pricingPlan VenuePricingPlan?
1224
+ subscriptionStatus SubscriptionStatus?
1225
+ subscriptionStartDate DateTime?
1193
1226
 
1194
1227
  bashEvents BashEvent[]
1195
1228
  }
@@ -1220,8 +1253,7 @@ enum VenuePricingPlan {
1220
1253
  Subscription
1221
1254
  }
1222
1255
 
1223
- enum ServiceSubscriptionStatus {
1224
- None
1256
+ enum SubscriptionStatus {
1225
1257
  Active
1226
1258
  Canceled
1227
1259
  Suspended
@@ -288,8 +288,6 @@ export interface StripeCreateServiceSubscriptionCheckoutSessionArgs {
288
288
  currency: string;
289
289
  paymentMethodType: string;
290
290
  promoCode?: string;
291
- successUrl?: string;
292
- cancelUrl?: string;
293
291
  }
294
292
 
295
293
 
@@ -594,3 +592,11 @@ export interface IAddress {
594
592
  zipCode: string;
595
593
  country: string;
596
594
  }
595
+
596
+
597
+ export interface SocialMediaProfile {
598
+ id: string;
599
+ platform: string; // Enum type if available
600
+ url: string;
601
+ userId: string;
602
+ }
@@ -37,6 +37,7 @@ import {
37
37
  ServiceAddon,
38
38
  ServicePackage,
39
39
  ServiceListingSubscription,
40
+ SocialMediaProfile,
40
41
  } from "@prisma/client";
41
42
  import { SERVICE_LINK_DATA_TO_INCLUDE, UnionFromArray, VENUE_DATA_TO_INCLUDE } from "./definitions";
42
43
 
@@ -520,6 +521,8 @@ export const CONTACT_DATA_TO_INCLUDE = {
520
521
  export interface UserExtraData extends User {
521
522
  password?: string;
522
523
  otp?: string;
524
+ socialMediaProfiles?: SocialMediaProfile[];
525
+
523
526
  }
524
527
 
525
528
  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 cancellation policy."
23
+ description: "No cancelation policy."
24
24
  },
25
25
  [ServiceCancelationPolicyOption.VeryFlexible]: {
26
26
  name: "Very Flexible",
@@ -102,17 +102,15 @@ 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
-
109
105
  export type ServicePromoCode = {
110
106
  code?: string;
111
107
  maxRedemptions?: number;
112
108
  isTrial?: boolean;
113
109
  discountPercentageFee?: number;
114
110
  discountMonthlyFee?: number;
115
- duration: ServicePromoCodeDuration,
111
+ duration: {
112
+ days?: number;
113
+ },
116
114
  type: ServicePromoCodeType;
117
115
  automaticallyApplied: boolean;
118
116
  };