@bash-app/bash-common 29.49.0 → 29.51.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.
@@ -10,23 +10,42 @@ import {
10
10
  Ticket,
11
11
  TicketTier,
12
12
  User,
13
- YearsOfExperience
13
+ UserSubscriptionType,
14
+ YearsOfExperience,
14
15
  } from "@prisma/client";
15
- import { ServiceExt, CheckoutExt, PublicUser, VolunteerServiceExt, BashEventExt} from "./extendedSchemas";
16
+ import {
17
+ ServiceExt,
18
+ CheckoutExt,
19
+ PublicUser,
20
+ VolunteerServiceExt,
21
+ BashEventExt,
22
+ } from "./extendedSchemas";
23
+ import { ServiceSubscriptionTier } from "./utils/userSubscriptionUtils";
16
24
 
17
25
  export const PASSWORD_MIN_LENGTH = 8 as const;
18
- export const PASSWORD_REQUIREMENTS_REGEX = new RegExp(String.raw`^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&^#])[A-Za-z\d@$!%*?&^#]{${PASSWORD_MIN_LENGTH},}$`);
19
- export const BASH_FEE_PERCENTAGE = 0.10;
20
- export const GOOGLE_CALLBACK_URL = '/auth/google/callback' as const;
21
- export const CHECKOUT_RETURN_SUCCESS_URL = `/checkout-return/success/{CHECKOUT_SESSION_ID}` as const;
22
- export const CHECKOUT_RETURN_CANCEL_URL = `/checkout-return/cancel/{CHECKOUT_SESSION_ID}` as const;
23
- export const CHECKOUT_RETURN_SUCCESS_URL_PAGE = '/checkout-return/success/$checkoutSessionId' as const;
24
- export const CHECKOUT_RETURN_CANCEL_URL_PAGE = '/checkout-return/cancel/$checkoutSessionId' as const;
25
- export const DONATION_CHECKOUT_RETURN_SUCCESS_URL = `/donation-checkout-return/success/{CHECKOUT_SESSION_ID}` as const;
26
- export const DONATION_CHECKOUT_RETURN_CANCEL_URL = `/donation-checkout-return/cancel/{CHECKOUT_SESSION_ID}` as const;
27
- export const DONATION_CHECKOUT_RETURN_SUCCESS_URL_PAGE = '/donation-checkout-return/success/$checkoutSessionId' as const;
28
- export const DONATION_CHECKOUT_RETURN_CANCEL_URL_PAGE = '/donation-checkout-return/cancel/$checkoutSessionId' as const;
26
+ export const PASSWORD_REQUIREMENTS_REGEX = new RegExp(
27
+ String.raw`^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&^#])[A-Za-z\d@$!%*?&^#]{${PASSWORD_MIN_LENGTH},}$`
28
+ );
29
+ export const BASH_FEE_PERCENTAGE = 0.1;
30
+ export const GOOGLE_CALLBACK_URL = "/auth/google/callback" as const;
31
+ export const CHECKOUT_RETURN_SUCCESS_URL =
32
+ `/checkout-return/success/{CHECKOUT_SESSION_ID}` as const;
33
+ export const CHECKOUT_RETURN_CANCEL_URL =
34
+ `/checkout-return/cancel/{CHECKOUT_SESSION_ID}` as const;
35
+ export const CHECKOUT_RETURN_SUCCESS_URL_PAGE =
36
+ "/checkout-return/success/$checkoutSessionId" as const;
37
+ export const CHECKOUT_RETURN_CANCEL_URL_PAGE =
38
+ "/checkout-return/cancel/$checkoutSessionId" as const;
39
+ export const DONATION_CHECKOUT_RETURN_SUCCESS_URL =
40
+ `/donation-checkout-return/success/{CHECKOUT_SESSION_ID}` as const;
41
+ export const DONATION_CHECKOUT_RETURN_CANCEL_URL =
42
+ `/donation-checkout-return/cancel/{CHECKOUT_SESSION_ID}` as const;
43
+ export const DONATION_CHECKOUT_RETURN_SUCCESS_URL_PAGE =
44
+ "/donation-checkout-return/success/$checkoutSessionId" as const;
45
+ export const DONATION_CHECKOUT_RETURN_CANCEL_URL_PAGE =
46
+ "/donation-checkout-return/cancel/$checkoutSessionId" as const;
29
47
  export const VERIFICATION_RETURN_URL = `/sign-up` as const;
48
+ export const MY_SERVICES_URL = "/my-services" as const;
30
49
  export const BASH_DETAIL_URL = `/bash-detail` as const;
31
50
  export const SERVICE_PAGE_URL = `/service-page` as const;
32
51
  export const LOGIN_URL = `/login` as const;
@@ -37,43 +56,48 @@ export const SWR_KEY_AUTH_TOKEN = "auth-token" as const;
37
56
  export const PRICE_DOLLARS_AND_CENTS_RATIO = 100 as const;
38
57
 
39
58
  export const MIN_AMOUNT_OF_TICKETS_FOR_PUBLIC_EVENT_TO_SHOW = 0 as const;
40
- export const DEFAULT_MAX_NUMBER_OF_TICKETS = 35 as const
59
+ export const DEFAULT_MAX_NUMBER_OF_TICKETS = 35 as const;
41
60
  export const MIN_NUMBER_OF_TICKETS = 0 as const;
42
61
 
43
- export const MAX_NUMBER_OF_FREE_TICKETS_PER_USER_FOR_A_BASH_EVENT = 100 as const;
62
+ export const MAX_NUMBER_OF_FREE_TICKETS_PER_USER_FOR_A_BASH_EVENT =
63
+ 100 as const;
44
64
  export const MAX_NUMBER_OF_TICKETS_PER_REQUEST_FOR_A_BASH_EVENT = 50 as const;
45
65
 
46
- export const MONTHS_PREVIOUS_THAT_STRIPE_ACCOUNTS_WILL_BE_SEARCHED_BY_EMAIL = 1 as const;
66
+ export const MONTHS_PREVIOUS_THAT_STRIPE_ACCOUNTS_WILL_BE_SEARCHED_BY_EMAIL =
67
+ 1 as const;
47
68
 
48
69
  export const HTTP_CODE_OK = 200 as const;
49
70
  export const HTTP_CODE_TEMPORARY_REDIRECT = 307 as const;
50
- export const HTTP_CODE_INTERNAL_SERVER_ERR = 500 as const
71
+ export const HTTP_CODE_INTERNAL_SERVER_ERR = 500 as const;
51
72
  export const HTTP_CODE_BAD_REQUEST = 400 as const;
52
73
  export const HTTP_CODE_UNAUTHORIZED = 401 as const;
53
74
  export const HTTP_CODE_NOT_FOUND = 404 as const;
54
- export const ERR_UNAUTHORIZED_REQUEST = "Unauthorized to perform requested action. Have you logged in?" as const;
55
-
56
- export const URL_PARAMS_BASH_EVENT_ID = 'bashEventId' as const;
57
- export const URL_PARAMS_BASH_EVENT_TITLE = 'bashEventTitle' as const;
58
- export const URL_PARAMS_BASH_EVENT_DESC = 'bashEventDesc' as const;
59
- export const URL_PARAMS_BASH_EVENT_COVER_PHOTO = 'bashEventCoverPhoto' as const;
60
- export const URL_PARAMS_EMAIL = 'email' as const;
61
- export const URL_PARAMS_OTP_CODE = 'code' as const;
62
- export const URL_PARAMS_INCLUDE = 'include' as const;
63
- export const URL_PARAMS_REDIRECT = 'redirect' as const;
64
- export const URL_PARAMS_GOOGLE_ACCESS_CODE = 'code' as const;
65
- export const URL_PARAMS_LINKED_IN_CODE = 'code' as const;
66
- export const URL_PARAMS_STATE = 'state' as const;
67
- export const URL_PARAMS_STRIPE_CHECKOUT = 'checkout' as const;
68
- export type UrlParamsStripeCheckoutOptions = 'complete' | 'incomplete';
69
-
70
- export const URL_PARAMS_TICKET_LIST_DELIM = ',' as const;
71
- export const URL_PARAMS_TICKET_TIER_ID_NUMBER_OF_TICKETS_DATE_DELIM = '__' as const
72
- export const URL_PARAMS_NUMBER_OF_TICKETS_TICKETS_DATE_DELIM = '~~' as const
73
- export const URL_PARAMS_TICKETS_DATE_DELIM = ';;' as const
74
-
75
- export const URL_INCLUDE_QUERY_PARAM_DELIM = ',' as const;
76
- export const URL_INCLUDE_PRISMA_DATA_KEYS_DELIM = '.' as const;
75
+ export const ERR_UNAUTHORIZED_REQUEST =
76
+ "Unauthorized to perform requested action. Have you logged in?" as const;
77
+
78
+ export const URL_PARAMS_BASH_EVENT_ID = "bashEventId" as const;
79
+ export const URL_PARAMS_BASH_EVENT_TITLE = "bashEventTitle" as const;
80
+ export const URL_PARAMS_BASH_EVENT_DESC = "bashEventDesc" as const;
81
+ export const URL_PARAMS_BASH_EVENT_COVER_PHOTO = "bashEventCoverPhoto" as const;
82
+ export const URL_PARAMS_EMAIL = "email" as const;
83
+ export const URL_PARAMS_OTP_CODE = "code" as const;
84
+ export const URL_PARAMS_INCLUDE = "include" as const;
85
+ export const URL_PARAMS_REDIRECT = "redirect" as const;
86
+ export const URL_PARAMS_GOOGLE_ACCESS_CODE = "code" as const;
87
+ export const URL_PARAMS_LINKED_IN_CODE = "code" as const;
88
+ export const URL_PARAMS_STATE = "state" as const;
89
+ export const URL_PARAMS_STRIPE_CHECKOUT = "checkout" as const;
90
+ export const URL_PARAMS_SETUP_PAYMENT = "paymentSetup" as const;
91
+ export type UrlParamsStripeCheckoutOptions = "complete" | "incomplete";
92
+
93
+ export const URL_PARAMS_TICKET_LIST_DELIM = "," as const;
94
+ export const URL_PARAMS_TICKET_TIER_ID_NUMBER_OF_TICKETS_DATE_DELIM =
95
+ "__" as const;
96
+ export const URL_PARAMS_NUMBER_OF_TICKETS_TICKETS_DATE_DELIM = "~~" as const;
97
+ export const URL_PARAMS_TICKETS_DATE_DELIM = ";;" as const;
98
+
99
+ export const URL_INCLUDE_QUERY_PARAM_DELIM = "," as const;
100
+ export const URL_INCLUDE_PRISMA_DATA_KEYS_DELIM = "." as const;
77
101
 
78
102
  export const DEFAULT_PRISMA_TTL_SECONDS = 60 as const;
79
103
  export const PRISMA_MEDIA_TTL_SECONDS = 60 * 5; // 5 hours
@@ -83,7 +107,7 @@ export const PRISMA_SERVICE_TTL_SECONDS = 60 as const;
83
107
 
84
108
  export const DEBOUNCE_WAIT = 1000 as const;
85
109
 
86
- export const ASSET_KEY_DELIM = '__' as const;
110
+ export const ASSET_KEY_DELIM = "__" as const;
87
111
  export const ASSET_MAX_MD5_BYTE_LENGTH = 1024 * 100; // 100kb
88
112
 
89
113
  export const MIN_NUMBER_OF_HOURS = 1;
@@ -93,7 +117,6 @@ export const SERVICE_LINK_DATA_TO_INCLUDE = {
93
117
  link: true,
94
118
  } satisfies Prisma.ServiceLinkInclude;
95
119
 
96
-
97
120
  // export type ServiceSpecificName = keyof Pick<
98
121
  // ServiceExt,
99
122
  // "eventService" |
@@ -105,9 +128,7 @@ export const SERVICE_LINK_DATA_TO_INCLUDE = {
105
128
  // "organization"
106
129
  // >;
107
130
 
108
- export const VENUE_DATA_TO_INCLUDE = {
109
-
110
- } satisfies Prisma.VenueInclude;
131
+ export const VENUE_DATA_TO_INCLUDE = {} satisfies Prisma.VenueInclude;
111
132
 
112
133
  export const VENDOR_DATA_TO_INCLUDE = {
113
134
  crowdSize: true,
@@ -124,7 +145,9 @@ export const VOLUNTEER_DATA_TO_INCLUDE = {
124
145
  } satisfies Prisma.VolunteerServiceInclude;
125
146
 
126
147
  export type DateTimeArgType = Date | string | undefined | null;
127
- export type RequiredStripeInfoMissingErrorDataType = { [k in keyof User]?: { type: string, label: string } };
148
+ export type RequiredStripeInfoMissingErrorDataType = {
149
+ [k in keyof User]?: { type: string; label: string };
150
+ };
128
151
  export type ContactOrUser = Contact | PublicUser;
129
152
 
130
153
  export type UnionFromArray<T extends ReadonlyArray<any>> = T[number];
@@ -143,7 +166,9 @@ export type FilterFields = {
143
166
  eventFormat: string[];
144
167
  };
145
168
 
146
- export type TicketTierWherePriceIsAString = Omit<TicketTier, 'price'> & {price: string} & {cannotDelete: boolean};
169
+ export type TicketTierWherePriceIsAString = Omit<TicketTier, "price"> & {
170
+ price: string;
171
+ } & { cannotDelete: boolean };
147
172
 
148
173
  export interface DeletedAndHiddenTiers {
149
174
  deletedTiers: TicketTier[];
@@ -189,7 +214,7 @@ export interface AvailableTicketsForTicketTier {
189
214
  }
190
215
 
191
216
  export interface AvailableTicketsForTicketTierForDate {
192
- ticketTier: TicketTier,
217
+ ticketTier: TicketTier;
193
218
  availableTicketsForDate: NumberOfTicketsForDate;
194
219
  }
195
220
 
@@ -267,7 +292,28 @@ export enum ApiErrorType {
267
292
  export type ErrorDataType = Record<RecordKey, any>;
268
293
 
269
294
  export const StripeErrorToApiErrorType = {
270
- "stripe_tax_inactive": ApiErrorType.StripeAccountHasNotSetupTaxData
295
+ stripe_tax_inactive: ApiErrorType.StripeAccountHasNotSetupTaxData,
296
+ };
297
+
298
+ export interface ServiceGetSubscriptionCostArgs {
299
+ serviceId: string;
300
+ }
301
+
302
+ export interface StripeSubscriptionItemCost {
303
+ tax: number;
304
+ subtotal: number;
305
+ total: number;
306
+ }
307
+
308
+ export interface StripeServiceSubscriptionCost {
309
+ serviceId: string;
310
+ tier: ServiceSubscriptionTier;
311
+ isTrial: boolean;
312
+ cost: StripeSubscriptionItemCost;
313
+ }
314
+
315
+ export interface UserSubscriptionData {
316
+ subscriptionType: UserSubscriptionType;
271
317
  }
272
318
 
273
319
  export interface StripeCreateBashEventTicketsCheckoutSessionArgs {
@@ -285,11 +331,8 @@ export interface StripeCreateBashEventDonationCheckoutSessionArgs {
285
331
  donationAmount: number;
286
332
  }
287
333
 
288
- export interface StripeCreateServiceSubscriptionCheckoutSessionArgs {
289
- serviceId: string;
334
+ export interface StripeCreateSetupPaymentMethodSessionArgs {
290
335
  currency: string;
291
- paymentMethodType: string;
292
- promoCode?: string;
293
336
  successUrl: string;
294
337
  cancelUrl: string;
295
338
  }
@@ -302,7 +345,7 @@ export interface StripeCreateAccountPortalSessionArgs {
302
345
  export type StripeSessionRedirect = {
303
346
  stripeAccountIdDB: string;
304
347
  redirectUrl: string;
305
- }
348
+ };
306
349
 
307
350
  // export type ServiceStripeSessionRedirect = {
308
351
  // service: ServiceExt;
@@ -389,15 +432,15 @@ export interface IPreSignedUrlResult {
389
432
  }
390
433
 
391
434
  export const ASSET_MIME_TYPES_TO_EXT = {
392
- 'image/jpeg': '.jpeg',
393
- 'image/png': '.png',
394
- 'image/gif': '.gif',
395
- 'image/bmp': '.bmp',
396
- 'image/webp': '.webp',
397
- 'image/svg+xml': '.svg',
398
- 'image/tiff': '.tiff',
399
- 'image/vnd': '.ico',
400
- 'video/mp4': '.mp4',
435
+ "image/jpeg": ".jpeg",
436
+ "image/png": ".png",
437
+ "image/gif": ".gif",
438
+ "image/bmp": ".bmp",
439
+ "image/webp": ".webp",
440
+ "image/svg+xml": ".svg",
441
+ "image/tiff": ".tiff",
442
+ "image/vnd": ".ico",
443
+ "video/mp4": ".mp4",
401
444
  // '.webm',
402
445
  // '.ogg',
403
446
  // '.avi',
@@ -409,12 +452,12 @@ export const VALID_ASSET_MIME_TYPES = Object.keys(ASSET_MIME_TYPES_TO_EXT);
409
452
  export const VibeTagsToString: { [key in BashEventVibeTags]: string } = {
410
453
  [BashEventVibeTags.Wild]: "Wild",
411
454
  [BashEventVibeTags.Calm]: "Chill",
412
- }
455
+ };
413
456
  export const DressTagsToString: { [key in BashEventDressTags]: string } = {
414
457
  [BashEventDressTags.Casual]: "Casual",
415
458
  [BashEventDressTags.BusinessCasual]: "Business casual",
416
- [BashEventDressTags.Formal]: "Formal"
417
- }
459
+ [BashEventDressTags.Formal]: "Formal",
460
+ };
418
461
 
419
462
  // export const ServicesTagsToString: { [key in ServicesTags]: string } = {
420
463
  // [ServicesTags.Fast]: "Fast",
@@ -423,23 +466,23 @@ export const DressTagsToString: { [key in BashEventDressTags]: string } = {
423
466
  // }
424
467
 
425
468
  export const DayOfWeekToString: { [key in DayOfWeek]: string } = {
426
- [DayOfWeek.Sunday]: 'S',
427
- [DayOfWeek.Monday]: 'M',
428
- [DayOfWeek.Tuesday]: 'T',
429
- [DayOfWeek.Wednesday]: 'W',
430
- [DayOfWeek.Thursday]: 'T',
431
- [DayOfWeek.Friday]: 'F',
432
- [DayOfWeek.Saturday]: 'S',
433
- }
434
-
435
-
436
- export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } = {
437
- [YearsOfExperience.LessThanOneYear]: 'Less than one year',
438
- [YearsOfExperience.OneToThreeYears]: 'One to three years',
439
- [YearsOfExperience.ThreeToFiveYears]: 'Three to five years',
440
- [YearsOfExperience.FivePlusYears]: 'More than five years',
469
+ [DayOfWeek.Sunday]: "S",
470
+ [DayOfWeek.Monday]: "M",
471
+ [DayOfWeek.Tuesday]: "T",
472
+ [DayOfWeek.Wednesday]: "W",
473
+ [DayOfWeek.Thursday]: "T",
474
+ [DayOfWeek.Friday]: "F",
475
+ [DayOfWeek.Saturday]: "S",
441
476
  };
442
477
 
478
+ export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } =
479
+ {
480
+ [YearsOfExperience.LessThanOneYear]: "Less than one year",
481
+ [YearsOfExperience.OneToThreeYears]: "One to three years",
482
+ [YearsOfExperience.ThreeToFiveYears]: "Three to five years",
483
+ [YearsOfExperience.FivePlusYears]: "More than five years",
484
+ };
485
+
443
486
  export type BashEventTypeToStringType = {
444
487
  [key in BashEventType]: string;
445
488
  };
@@ -469,8 +512,10 @@ export const BashEventTypeToString: BashEventTypeToStringType = {
469
512
  [BashEventType.ChurchEvent]: "Church Event",
470
513
  [BashEventType.CircusOrCarnivalParty]: "Circus/Carnival Party",
471
514
  [BashEventType.CocktailParty]: "Cocktail Party",
472
- [BashEventType.CollegeParty_FraternityOrSorority]: "College Party (Fraternity/Sorority)",
473
- [BashEventType.ComedyShowOrStandUpComedyNight]: "Comedy Show Or Stand-Up Comedy Night",
515
+ [BashEventType.CollegeParty_FraternityOrSorority]:
516
+ "College Party (Fraternity/Sorority)",
517
+ [BashEventType.ComedyShowOrStandUpComedyNight]:
518
+ "Comedy Show Or Stand-Up Comedy Night",
474
519
  [BashEventType.ComicConvention]: "Comic Convention",
475
520
  [BashEventType.Competition]: "Competition",
476
521
  [BashEventType.Concert]: "Concert",
@@ -508,7 +553,8 @@ export const BashEventTypeToString: BashEventTypeToStringType = {
508
553
  [BashEventType.HousewarmingParty]: "Housewarming Party",
509
554
  [BashEventType.KaraokeNight]: "Karaoke Night",
510
555
  [BashEventType.KiteFlyingFestival]: "Kite Flying Festival",
511
- [BashEventType.LiveBandPerformanceInALocalVenue]: "Live Band Performance in a Local Venue",
556
+ [BashEventType.LiveBandPerformanceInALocalVenue]:
557
+ "Live Band Performance in a Local Venue",
512
558
  [BashEventType.Luau]: "Luau",
513
559
  [BashEventType.MansionParty]: "Mansion Party",
514
560
  [BashEventType.MardiGras]: "Mardi Gras",
@@ -521,7 +567,8 @@ export const BashEventTypeToString: BashEventTypeToStringType = {
521
567
  [BashEventType.OpenMicNight]: "Open Mic Night",
522
568
  [BashEventType.OutdoorActivity]: "Outdoor Activity",
523
569
  [BashEventType.OutdoorConcert]: "Outdoor Concert",
524
- [BashEventType.OutdoorMovieNight_WithAProjector]: "Outdoor Movie Night (With a Projector)",
570
+ [BashEventType.OutdoorMovieNight_WithAProjector]:
571
+ "Outdoor Movie Night (With a Projector)",
525
572
  [BashEventType.Parade]: "Parade",
526
573
  [BashEventType.Party]: "Party",
527
574
  [BashEventType.PoolParty]: "Pool Party",
@@ -532,9 +579,11 @@ export const BashEventTypeToString: BashEventTypeToStringType = {
532
579
  [BashEventType.ProfessionalNetworkingEvent]: "Professional Networking Event",
533
580
  [BashEventType.Rave_General]: "Rave (General)",
534
581
  [BashEventType.RetirementCelebration]: "Retirement Celebration",
535
- [BashEventType.Reunion_FamilyOrSchoolOrFriends]: "Reunion (Family/School/Friends)",
582
+ [BashEventType.Reunion_FamilyOrSchoolOrFriends]:
583
+ "Reunion (Family/School/Friends)",
536
584
  [BashEventType.SafariAdventureParty]: "Safari Adventure Party",
537
- [BashEventType.SchoolEvent_MiddleSchoolOrHighSchoolOrCollege]: "School Event (MiddleSchool, High School, College)",
585
+ [BashEventType.SchoolEvent_MiddleSchoolOrHighSchoolOrCollege]:
586
+ "School Event (MiddleSchool, High School, College)",
538
587
  [BashEventType.ScienceFictionThemedParty]: "Science Fiction-Themed Party",
539
588
  [BashEventType.SocialClubEvent]: "Social Club Event",
540
589
  [BashEventType.SportsTournament]: "Sports Tournament",
@@ -554,20 +603,24 @@ export const BashEventTypeToString: BashEventTypeToStringType = {
554
603
  [BashEventType.WellnessFestival]: "Wellness Festival",
555
604
  [BashEventType.WineTastingEvent]: "Wine Tasting Event",
556
605
  [BashEventType.Other]: "Other",
557
- }
606
+ };
558
607
 
559
608
  export type RecordKey = string | number | symbol;
560
- export type PartialExcept<T, K extends keyof T> = Partial<T> & {[P in K]: T[P]};
609
+ export type PartialExcept<T, K extends keyof T> = Partial<T> & {
610
+ [P in K]: T[P];
611
+ };
561
612
  type GetTypeOfArray<T> = T extends (infer U)[] ? U : never;
562
613
 
563
614
  export type AllKeysUnionOfDescendants<T> = T extends object
564
615
  ? T[keyof T] extends infer K
565
616
  ? K extends string | number | symbol
566
- ? {[K in keyof T]-?: T[K] extends any[]
567
- ? GetTypeOfArray<T[K]> extends Record<RecordKey, any>
568
- ? `${K & string}` | `${AllKeysUnion<GetTypeOfArray<T[K]>>}`
569
- : never
570
- : `${K & string}` | `${AllKeysUnion<T[K]>}`}[keyof T]
617
+ ? {
618
+ [K in keyof T]-?: T[K] extends any[]
619
+ ? GetTypeOfArray<T[K]> extends Record<RecordKey, any>
620
+ ? `${K & string}` | `${AllKeysUnion<GetTypeOfArray<T[K]>>}`
621
+ : never
622
+ : `${K & string}` | `${AllKeysUnion<T[K]>}`;
623
+ }[keyof T]
571
624
  : never
572
625
  : never
573
626
  : never;
@@ -577,20 +630,33 @@ export type AllKeysOfDescendants<T> = AllKeysUnionOfDescendants<T>[];
577
630
  type AllKeysUnion<T> = T extends object
578
631
  ? T[keyof T] extends infer K
579
632
  ? K extends string | number | symbol
580
- ? {[K in keyof T]-?: T[K] extends any[]
581
- ? GetTypeOfArray<T[K]> extends Record<RecordKey, any>
582
- ? `${K & string}` | `${K & string}${typeof URL_INCLUDE_PRISMA_DATA_KEYS_DELIM}${AllKeysUnion<GetTypeOfArray<T[K]>> & string}`
583
- : never
584
- : T[K] extends Function
585
- ? never
586
- : `${K & string}` | `${K & string}${typeof URL_INCLUDE_PRISMA_DATA_KEYS_DELIM}${AllKeysUnion<T[K]> & string}`}[keyof T]
633
+ ? {
634
+ [K in keyof T]-?: T[K] extends any[]
635
+ ? GetTypeOfArray<T[K]> extends Record<RecordKey, any>
636
+ ?
637
+ | `${K & string}`
638
+ | `${K &
639
+ string}${typeof URL_INCLUDE_PRISMA_DATA_KEYS_DELIM}${AllKeysUnion<
640
+ GetTypeOfArray<T[K]>
641
+ > &
642
+ string}`
643
+ : never
644
+ : T[K] extends Function
645
+ ? never
646
+ :
647
+ | `${K & string}`
648
+ | `${K &
649
+ string}${typeof URL_INCLUDE_PRISMA_DATA_KEYS_DELIM}${AllKeysUnion<
650
+ T[K]
651
+ > &
652
+ string}`;
653
+ }[keyof T]
587
654
  : never
588
655
  : never
589
656
  : never;
590
657
 
591
658
  export type AllKeys<T> = AllKeysUnion<T>[];
592
659
 
593
-
594
660
  export interface IAddress {
595
661
  place?: string;
596
662
  googlePlaceId?: string;
@@ -601,7 +667,6 @@ export interface IAddress {
601
667
  country: string;
602
668
  }
603
669
 
604
-
605
670
  export interface SocialMediaProfile {
606
671
  id: string;
607
672
  platform: string; // Enum type if available