* refactor: extract getEventTypeByViewer for private user dashboard event types * refactor: extract getEventTypesPublic for public event types to book * refactor: group event-types lib functions in single folder * refactor: rename getEventTypeByViewer to getEventTypesByViewer * feat: add event type helpers from lib to platform libraries * feat: v2 endpoint for private event types * driveby:fix: fixed date in docs instead of being re-generated * feature: endpoint to fetch public endpoints * fix: getting private event types * tests: fetch private event types * tests: fetch private event types * feat: hooks for public and private events * fix: yarn test * tests: IMO better mocking * refactor: track dynamic prop in react query * fix: distinct query key for public events * fix: username in query key and example app demo * fix: swagger for endpoint get public event input --------- Co-authored-by: Morgan Vernay <morgan@cal.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
65 lines
3.0 KiB
TypeScript
65 lines
3.0 KiB
TypeScript
import * as newBookingMethods from "@calcom/features/bookings/lib/handleNewBooking";
|
|
import { getPublicEvent } from "@calcom/features/eventtypes/lib/getPublicEvent";
|
|
import * as instantMeetingMethods from "@calcom/features/instant-meeting/handleInstantMeeting";
|
|
import { updateHandler as updateScheduleHandler } from "@calcom/trpc/server/routers/viewer/availability/schedule/update.handler";
|
|
import { getAvailableSlots } from "@calcom/trpc/server/routers/viewer/slots/util";
|
|
import { createNewUsersConnectToOrgIfExists } from "@calcom/trpc/server/routers/viewer/teams/inviteMember/utils";
|
|
|
|
export { updateScheduleHandler };
|
|
export type UpdateScheduleOutputType = Awaited<
|
|
ReturnType<
|
|
typeof import("@calcom/trpc/server/routers/viewer/availability/schedule/update.handler").updateHandler
|
|
>
|
|
>;
|
|
export { getEventTypeById } from "@calcom/lib/event-types/getEventTypeById";
|
|
export { getEventTypesByViewer } from "@calcom/lib/event-types/getEventTypesByViewer";
|
|
export { getEventTypesPublic } from "@calcom/lib/event-types/getEventTypesPublic";
|
|
|
|
export type { EventType } from "@calcom/lib/event-types/getEventTypeById";
|
|
export type { EventTypesByViewer } from "@calcom/lib/event-types/getEventTypesByViewer";
|
|
export type { EventTypesPublic } from "@calcom/lib/event-types/getEventTypesPublic";
|
|
|
|
export type PublicEventType = Awaited<ReturnType<typeof getPublicEvent>>;
|
|
export { getPublicEvent };
|
|
export { getUsernameList } from "@calcom/lib/defaultEvents";
|
|
|
|
const handleNewBooking = newBookingMethods.default;
|
|
export { handleNewBooking };
|
|
const handleInstantMeeting = instantMeetingMethods.default;
|
|
export { handleInstantMeeting };
|
|
|
|
export { getAvailableSlots };
|
|
export type AvailableSlotsType = Awaited<ReturnType<typeof getAvailableSlots>>;
|
|
export { handleNewRecurringBooking } from "@calcom/features/bookings/lib/handleNewRecurringBooking";
|
|
|
|
export { getConnectedDestinationCalendars } from "@calcom/lib/getConnectedDestinationCalendars";
|
|
export type { ConnectedDestinationCalendars } from "@calcom/lib/getConnectedDestinationCalendars";
|
|
export { getBusyCalendarTimes } from "@calcom/core/CalendarManager";
|
|
|
|
export {
|
|
transformWorkingHoursForClient,
|
|
transformAvailabilityForClient,
|
|
transformDateOverridesForClient,
|
|
} from "@calcom/lib/schedules/client/transformers";
|
|
export type {
|
|
ScheduleWithAvailabilities,
|
|
ScheduleWithAvailabilitiesForWeb,
|
|
} from "@calcom/lib/schedules/client/transformers";
|
|
export type {
|
|
BookingCreateBody,
|
|
BookingResponse,
|
|
RecurringBookingCreateBody,
|
|
} from "@calcom/features/bookings/types";
|
|
export { HttpError } from "@calcom/lib/http-error";
|
|
export type { AppsStatus } from "@calcom/types/Calendar";
|
|
|
|
export { MINUTES_TO_BOOK } from "@calcom/lib/constants";
|
|
|
|
export { cityTimezonesHandler } from "@calcom/lib/cityTimezonesHandler";
|
|
export type { CityTimezones } from "@calcom/lib/cityTimezonesHandler";
|
|
|
|
export { TRPCError } from "@trpc/server";
|
|
export type { TUpdateInputSchema } from "@calcom/trpc/server/routers/viewer/availability/schedule/update.schema";
|
|
|
|
export { createNewUsersConnectToOrgIfExists };
|