* refactor: replace Prisma.validator<Select>() with satisfies syntax
- Convert all Prisma.validator<Prisma.SomeSelect>()({...}) patterns to {...} satisfies Prisma.SomeSelect
- Update import { Prisma } to import type { Prisma } where only used for types
- Maintain existing functionality while modernizing TypeScript syntax
- Covers 89+ files across packages/prisma/selects, repository classes, tRPC handlers, and API modules
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* refactor: complete remaining Prisma.validator conversions
- Update test fixture files with satisfies syntax
- Apply lint-staged formatting fixes
- Complete refactoring of all remaining files
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* revert: remove unintended platform library update
- Revert yarn.lock changes that updated @calcom/platform-libraries from 0.0.236 to 0.0.239
- This was an unintended side effect of the refactoring process
- Keep only the intended Prisma.validator → satisfies syntax changes
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
* fix: update ESLint plugin references to correct package name
- Change @calcom/eslint to @calcom/eslint-plugin-eslint in eslint-preset.js
- Resolves 'Failed to load plugin @calcom/eslint' error causing CI failures
Co-Authored-By: alex@cal.com <me@alexvanandel.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: alex@cal.com <me@alexvanandel.com>
59 lines
1.1 KiB
TypeScript
59 lines
1.1 KiB
TypeScript
import type { Prisma } from "@prisma/client";
|
|
|
|
export const availabilityUserSelect = {
|
|
id: true,
|
|
timeZone: true,
|
|
email: true,
|
|
bufferTime: true,
|
|
startTime: true,
|
|
username: true,
|
|
endTime: true,
|
|
timeFormat: true,
|
|
defaultScheduleId: true,
|
|
// Relationships
|
|
schedules: {
|
|
select: {
|
|
availability: {
|
|
select: {
|
|
date: true,
|
|
startTime: true,
|
|
endTime: true,
|
|
days: true,
|
|
},
|
|
},
|
|
timeZone: true,
|
|
id: true,
|
|
},
|
|
},
|
|
availability: true,
|
|
selectedCalendars: true,
|
|
travelSchedules: true,
|
|
} satisfies Prisma.UserSelect;
|
|
|
|
export const baseUserSelect = {
|
|
name: true,
|
|
destinationCalendar: true,
|
|
locale: true,
|
|
hideBranding: true,
|
|
theme: true,
|
|
brandColor: true,
|
|
darkBrandColor: true,
|
|
...availabilityUserSelect,
|
|
} satisfies Prisma.UserSelect;
|
|
|
|
export const userSelect = {
|
|
select: {
|
|
name: true,
|
|
allowDynamicBooking: true,
|
|
destinationCalendar: true,
|
|
locale: true,
|
|
hideBranding: true,
|
|
theme: true,
|
|
brandColor: true,
|
|
darkBrandColor: true,
|
|
metadata: true,
|
|
locked: true,
|
|
...availabilityUserSelect,
|
|
},
|
|
} satisfies Prisma.UserArgs;
|