Skip to content

Commit d62dc67

Browse files
author
Hariom Balhara
committed
fix ts error
1 parent 0b4fa8f commit d62dc67

File tree

2 files changed

+37
-13
lines changed

2 files changed

+37
-13
lines changed

packages/lib/server/repository/selectedCalendar.ts

+25-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,31 @@ export type UpdateArguments = {
88
where: FindManyArgs["where"];
99
data: Prisma.SelectedCalendarUpdateManyArgs["data"];
1010
};
11-
export type FindManyArgs = any;
11+
12+
export type FindManyArgs = {
13+
// https://github.com/microsoft/TypeScript/issues/55217 It crashes atoms build with this if we become too generic here. Seems like a TS bug with complex prisma types.
14+
where?: {
15+
userId?:
16+
| number
17+
| {
18+
in: number[];
19+
};
20+
credentialId?: number | null;
21+
integration?: string;
22+
externalId?: string;
23+
eventTypeId?: number | null;
24+
googleChannelId?:
25+
| string
26+
| null
27+
| {
28+
not: null;
29+
};
30+
};
31+
orderBy?: {
32+
userId?: "asc" | "desc";
33+
};
34+
select?: Prisma.SelectedCalendarSelect;
35+
};
1236

1337
const ensureUserLevelWhere = {
1438
eventTypeId: null,

packages/prisma/schema.prisma

+12-12
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,9 @@ model Team {
487487
488488
/// @zod.custom(imports.intervalLimitsType)
489489
bookingLimits Json?
490-
includeManagedEventsInLimits Boolean @default(false)
490+
includeManagedEventsInLimits Boolean @default(false)
491491
internalNotePresets InternalNotePreset[]
492-
organizationOnboarding OrganizationOnboarding?
492+
organizationOnboarding OrganizationOnboarding?
493493
494494
@@unique([slug, parentId])
495495
@@index([parentId])
@@ -1841,34 +1841,34 @@ enum BillingPeriod {
18411841

18421842
model OrganizationOnboarding {
18431843
// TODO: Use uuid for id
1844-
id String @id @default(uuid())
1844+
id String @id @default(uuid())
18451845
18461846
// User who started the onboarding. It is different from orgOwnerEmail in case Cal.com admin is doing the onboarding for someone else.
18471847
// TODO: To be added when we start creating organizationOnboarding on intentToCreateOrg
18481848
// userId Int @unique
18491849
18501850
// We keep the email only here and don't need to connect it with user because on User deletion, we don't delete the entry here.
1851-
orgOwnerEmail String @unique
1851+
orgOwnerEmail String @unique
18521852
error String?
18531853
18541854
createdAt DateTime @default(now())
18551855
updatedAt DateTime @updatedAt
18561856
18571857
// Set after organization payment is done and the organization is created
1858-
organizationId Int? @unique
1858+
organizationId Int? @unique
18591859
organization Team? @relation(fields: [organizationId], references: [id], onDelete: Cascade)
1860-
1860+
18611861
billingPeriod BillingPeriod
18621862
pricePerSeat Float
18631863
seats Int
1864-
1865-
isPlatform Boolean @default(false)
1864+
1865+
isPlatform Boolean @default(false)
18661866
18671867
// Organization info
1868-
name String
1869-
slug String @unique
1870-
logo String?
1871-
bio String?
1868+
name String
1869+
slug String @unique
1870+
logo String?
1871+
bio String?
18721872
isDomainConfigured Boolean @default(false)
18731873
18741874
// Set when payment intent is there.

0 commit comments

Comments
 (0)