089a39f59f
* init: improvements for update location endpoint * chore: init function to update calendar event * fix: bad imports * chore: update calendar event when updating location * chore: update platform libraries * fix: update calendar event * chore: update platform libraries * chore: cleanup * feat: add logic for video conferecing integrations * chore: update platform libraries * feat: add sms and email notifications * chore: update e2e tests * chore: update openapi spec * chore: implement cubic feedback * chore: update openapi spec * fix: add Jest mock for Daily.co video adapter in e2e test Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com> * fix: mock createMeeting directly to bypass database check in e2e test Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com> * chore: implement PR feedback * chore: implement feedback * fix: mock throttler guard to prevent rate limiting in e2e tests Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com> * fix: merge conflicts * chore: update platform libraries * chore: implement feedback part 1 * chore: implement feedback part 2 * chore: remove unnecessary type casting * chore: implement cubic feedback * chore: implement devin feedback * chore: implement PR feedback * fix: type error * chore: update openapi spec * test: add mocks and tests for Google Meet and Microsoft Teams integration location updates Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com> * refactor: simplify service code - extract shared helpers, remove duplication Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com> * feat: implement fixtures for bookings references --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
133 lines
2.7 KiB
TypeScript
133 lines
2.7 KiB
TypeScript
import type { Prisma } from "../client";
|
|
|
|
export const bookingMinimalSelect = {
|
|
id: true,
|
|
title: true,
|
|
userPrimaryEmail: true,
|
|
description: true,
|
|
customInputs: true,
|
|
startTime: true,
|
|
endTime: true,
|
|
attendees: true,
|
|
metadata: true,
|
|
createdAt: true,
|
|
} satisfies Prisma.BookingSelect;
|
|
|
|
export const bookingDetailsSelect = {
|
|
uid: true,
|
|
rescheduled: true,
|
|
fromReschedule: true,
|
|
tracking: {
|
|
select: {
|
|
utm_source: true,
|
|
utm_medium: true,
|
|
utm_campaign: true,
|
|
utm_term: true,
|
|
utm_content: true,
|
|
},
|
|
},
|
|
} satisfies Prisma.BookingSelect;
|
|
|
|
export const bookingWithUserAndEventDetailsSelect = {
|
|
title: true,
|
|
description: true,
|
|
startTime: true,
|
|
endTime: true,
|
|
userPrimaryEmail: true,
|
|
uid: true,
|
|
iCalUID: true,
|
|
iCalSequence: true,
|
|
eventTypeId: true,
|
|
id: true,
|
|
userId: true,
|
|
location: true,
|
|
responses: true,
|
|
metadata: true,
|
|
destinationCalendar: {
|
|
select: {
|
|
id: true,
|
|
integration: true,
|
|
externalId: true,
|
|
primaryEmail: true,
|
|
userId: true,
|
|
eventTypeId: true,
|
|
credentialId: true,
|
|
delegationCredentialId: true,
|
|
domainWideDelegationCredentialId: true,
|
|
createdAt: true,
|
|
updatedAt: true,
|
|
customCalendarReminder: true,
|
|
},
|
|
},
|
|
attendees: {
|
|
select: {
|
|
email: true,
|
|
name: true,
|
|
timeZone: true,
|
|
locale: true,
|
|
},
|
|
},
|
|
references: {
|
|
select: {
|
|
id: true,
|
|
type: true,
|
|
uid: true,
|
|
deleted: true,
|
|
credentialId: true,
|
|
delegationCredentialId: true,
|
|
externalCalendarId: true,
|
|
},
|
|
},
|
|
user: {
|
|
select: {
|
|
email: true,
|
|
name: true,
|
|
timeZone: true,
|
|
locale: true,
|
|
credentials: {
|
|
select: {
|
|
id: true,
|
|
type: true,
|
|
delegationCredentialId: true,
|
|
},
|
|
},
|
|
destinationCalendar: {
|
|
select: {
|
|
id: true,
|
|
integration: true,
|
|
externalId: true,
|
|
primaryEmail: true,
|
|
userId: true,
|
|
eventTypeId: true,
|
|
credentialId: true,
|
|
delegationCredentialId: true,
|
|
domainWideDelegationCredentialId: true,
|
|
createdAt: true,
|
|
updatedAt: true,
|
|
customCalendarReminder: true,
|
|
},
|
|
},
|
|
profiles: {
|
|
select: {
|
|
organizationId: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
eventType: {
|
|
select: {
|
|
title: true,
|
|
metadata: true,
|
|
recurringEvent: true,
|
|
seatsPerTimeSlot: true,
|
|
seatsShowAttendees: true,
|
|
hideOrganizerEmail: true,
|
|
customReplyToEmail: true,
|
|
},
|
|
},
|
|
} satisfies Prisma.BookingSelect;
|
|
|
|
export type BookingWithUserAndEventDetails = Prisma.BookingGetPayload<{
|
|
select: typeof bookingWithUserAndEventDetailsSelect;
|
|
}>;
|