@bash-app/bash-common 29.20.6 → 29.21.22

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.20.6",
3
+ "version": "29.21.22",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -726,8 +726,6 @@ model Media {
726
726
  serviceReferencingMe Service[]
727
727
  volunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
728
728
  volunteerServiceId String?
729
-
730
- stripeAccount StripeAccount[]
731
729
  }
732
730
 
733
731
  enum MediaType {
@@ -936,7 +934,7 @@ model AssociatedService {
936
934
  model Service {
937
935
  id String @id @default(cuid())
938
936
 
939
- serviceType ServiceTypes?
937
+ serviceType ServiceTypes
940
938
  serviceStatus ServiceStatus @default(Draft)
941
939
  serviceCondition ServiceCondition @default(Pending)
942
940
 
@@ -949,7 +947,7 @@ model Service {
949
947
  creator User? @relation("CreatedService", fields: [creatorId], references: [id])
950
948
 
951
949
  createdAt DateTime @default(now())
952
- updatedAt DateTime? @updatedAt
950
+ updatedAt DateTime @updatedAt
953
951
 
954
952
  associatedBashesReferencingMe AssociatedBash[]
955
953
  associatedServicesReferencingMe AssociatedService[]
@@ -1020,13 +1018,10 @@ model StripeAccount {
1020
1018
  id String @id @default(cuid())
1021
1019
 
1022
1020
  ownerId String
1023
- owner User @relation(fields: [ownerId], references: [id], onDelete: Restrict)
1021
+ owner User @relation(fields: [ownerId], references: [id])
1024
1022
 
1025
1023
  stripeAccountId String
1026
1024
 
1027
- logoId String?
1028
- logo Media? @relation(fields: [logoId], references: [id], onDelete: SetNull)
1029
-
1030
1025
  createdAt DateTime @default(now())
1031
1026
  updatedAt DateTime @updatedAt
1032
1027
 
@@ -79,7 +79,7 @@ export const PRISMA_USER_TTL_SECONDS = 60 * 7; // 7 hours
79
79
  export const PRISMA_BASH_EVENT_TTL_SECONDS = 60 as const;
80
80
  export const PRISMA_SERVICE_TTL_SECONDS = 60 as const;
81
81
 
82
- export const MIN_PASSWORD_LENGTH = 8 as const;
82
+ export const MIN_PASSWORD_LENGTH = 10 as const;
83
83
 
84
84
  export const DEBOUNCE_WAIT = 1000 as const;
85
85
 
@@ -229,16 +229,6 @@ export interface SignInEmailWithPassword {
229
229
  password: string;
230
230
  }
231
231
 
232
- export interface ForgotPassword {
233
- email: string;
234
- }
235
-
236
- export interface ResetPassword {
237
- email: string;
238
- password: string;
239
- otp: string;
240
- }
241
-
242
232
  export interface ApiResult<T, P extends ErrorDataType = ErrorDataType> {
243
233
  data?: T;
244
234
  status?: number;
@@ -317,7 +307,7 @@ export type StripeLinkingStatus = {
317
307
  };
318
308
 
319
309
  export type StripeBusinessDataPublic = {
320
- logoUrl?: string; //not possible to fetch logo directly from stripe
310
+ logo?: string; //not possible to fetch logo directly from stripe
321
311
  businessName?: string;
322
312
  businessNameDBA?: string;
323
313
  supportEmail?: string;
@@ -35,7 +35,6 @@ import {
35
35
  ServiceDailyRates,
36
36
  ServiceSpecialRates,
37
37
  ServiceAddon,
38
- ServicePackage,
39
38
  } from "@prisma/client";
40
39
  import { SERVICE_LINK_DATA_TO_INCLUDE, UnionFromArray } from "./definitions";
41
40
 
@@ -177,32 +176,6 @@ export const SERVICE_FULL_DATA_TO_INCLUDE = {
177
176
  ...createAllTrueObject(serviceKeysArray)
178
177
  } satisfies Prisma.ServiceInclude;
179
178
 
180
- export const SERVICE_PACKAGE_DATA_TO_INCLUDE = {
181
- serviceAddons: true
182
- } satisfies Prisma.ServicePackageInclude;
183
-
184
- export const SERVICE_DAILYRATES_DATA_TO_INCLUDE = {
185
- serviceRate: true
186
- } satisfies Prisma.ServiceDailyRatesInclude;
187
-
188
- export const SERVICE_SPECIALRATES_DATA_TO_INCLUDE = {
189
- serviceRate: true
190
- } satisfies Prisma.ServiceSpecialRatesInclude;
191
-
192
- export const SERVICE_RATES_ASSOCIATION_DATA_TO_INCLUDE = {
193
- serviceGeneralRates: true,
194
- serviceDailyRates: {
195
- include: SERVICE_DAILYRATES_DATA_TO_INCLUDE
196
- },
197
- serviceSpecialRates: {
198
- include: SERVICE_SPECIALRATES_DATA_TO_INCLUDE
199
- },
200
- addons: true,
201
- packages: {
202
- include: SERVICE_PACKAGE_DATA_TO_INCLUDE
203
- },
204
- } satisfies Prisma.ServiceRatesAssociationInclude;
205
-
206
179
  export interface BashNotificationExt extends BashNotification {
207
180
  creator?: PublicUser;
208
181
  bashEvent?: BashEvent;
@@ -257,16 +230,6 @@ export const EVENT_TASK_DATA_TO_INCLUDE = {
257
230
  }
258
231
  } satisfies Prisma.EventTaskInclude;
259
232
 
260
-
261
- //------------Stripe Accounts--------------
262
- export const STRIPE_ACCOUNT_DATA_TO_INCLUDE = {
263
- logo: true
264
- } satisfies Prisma.StripeAccountInclude;
265
-
266
- export interface StripeAccountExt extends StripeAccount {
267
- logo?: Media | null;
268
- }
269
-
270
233
  //---------------Services------------------
271
234
  export interface ServiceExt extends Service {
272
235
  owner?: PublicUser | null;
@@ -289,18 +252,18 @@ export interface ServiceExt extends Service {
289
252
  venue?: Venue;
290
253
  organization?: Organization;
291
254
 
292
- serviceRatesAssociation?: ServiceRatesAssociationExt | null;
255
+ serviceRatesAssociation?: ServiceRatesAssociationExt;
293
256
 
294
257
  // googleReviews: GoogleReview[];
295
258
  }
296
- export interface ServicePackageExt extends ServicePackage {
297
- serviceAddons: ServiceAddon[];
259
+ export interface ServicePackageExt extends ServiceDailyRates {
260
+ serviceAddons: ServiceAddon[]
298
261
  }
299
262
 
300
263
  export interface ServiceDailyRatesExt extends ServiceDailyRates {
301
264
  serviceRate?: ServiceRate;
302
265
  }
303
- export interface ServiceSpecialRatesExt extends ServiceSpecialRates {
266
+ export interface ServiceSpecialRatesExt extends ServiceRatesAssociation {
304
267
  serviceRate?: ServiceRate;
305
268
  }
306
269
 
@@ -308,9 +271,9 @@ export interface ServiceRatesAssociationExt extends ServiceRatesAssociation {
308
271
  serviceGeneralRates?: ServiceRate;
309
272
  serviceDailyRates?: ServiceDailyRates;
310
273
  serviceSpecialRates?: ServiceSpecialRates;
311
-
274
+
275
+ packages?: ServicePackageExt;
312
276
  addons: ServiceAddon[];
313
- packages: ServicePackageExt[];
314
277
  }
315
278
 
316
279