chore: fix all Typescript warnings (#8618)

* [CAL-1517] fix all Typescript warnings

* solve conflicts

* Update stripeCheckoutSession.handler.ts

Parse is a guard, so even though the variable is unused the parse itself is needed.

* Update ToolbarPlugin.tsx

Don't change dependency tree

---------

Co-authored-by: gitstart-calcom <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-06-06 11:59:57 +00:00
1 parent 87e1ad7115
commit 2dbc73c75b
106 files changed
+425 -319

No files matched your search

@@ -14,7 +14,7 @@ import type { LocationObject } from "@calcom/app-store/locations";
import { getLocationValueForDB } from "@calcom/app-store/locations";
import { MeetLocationType } from "@calcom/app-store/locations";
import type { EventTypeAppsList } from "@calcom/app-store/utils";
import { getAppFromSlug, getEventTypeAppData } from "@calcom/app-store/utils";
import { getAppFromSlug } from "@calcom/app-store/utils";
import { cancelScheduledJobs, scheduleTrigger } from "@calcom/app-store/zapier/lib/nodeScheduler";
import EventManager from "@calcom/core/EventManager";
import { getEventName } from "@calcom/core/event";
@@ -68,7 +68,13 @@ import {
userMetadata as userMetadataSchema,
} from "@calcom/prisma/zod-utils";
import type { BufferedBusyTime } from "@calcom/types/BufferedBusyTime";
import type { AdditionalInformation, AppsStatus, CalendarEvent, Person } from "@calcom/types/Calendar";
import type {
AdditionalInformation,
AppsStatus,
CalendarEvent,
IntervalLimit,
Person,
} from "@calcom/types/Calendar";
import type { EventResult, PartialReference } from "@calcom/types/EventManager";
import type { WorkingHours, TimeRange as DateOverride } from "@calcom/types/schedule";
@@ -556,7 +562,7 @@ function getBookingData({
function getCustomInputsResponses(
reqBody: {
responses?: Record<string, any>;
responses?: Record<string, object>;
customInputs?: z.infer<typeof bookingCreateSchemaLegacyPropsForApi>["customInputs"];
},
eventTypeCustomInputs: Awaited<ReturnType<typeof getEventTypesFromDB>>["customInputs"]
@@ -760,10 +766,10 @@ async function handler(
) {
const startAsDate = dayjs(reqBody.start).toDate();
if (eventType.bookingLimits) {
await checkBookingLimits(eventType.bookingLimits, startAsDate, eventType.id);
await checkBookingLimits(eventType.bookingLimits as IntervalLimit, startAsDate, eventType.id);
}
if (eventType.durationLimits) {
await checkDurationLimits(eventType.durationLimits, startAsDate, eventType.id);
await checkDurationLimits(eventType.durationLimits as IntervalLimit, startAsDate, eventType.id);
}
}
@@ -952,7 +958,6 @@ async function handler(
},
});
if (bookingSeat) {
bookingSeat = bookingSeat;
rescheduleUid = bookingSeat.booking.uid;
}
originalRescheduledBooking = await getOriginalRescheduledBooking(
@@ -1778,7 +1783,7 @@ async function handler(
if (booking && booking.id && eventType.seatsPerTimeSlot) {
const currentAttendee = booking.attendees.find(
(attendee) => attendee.email === req.body.responses.email
)!;
);
// Save description to bookingSeat
const uniqueAttendeeId = uuid();
@@ -42,7 +42,9 @@ export const CheckedTeamSelect = ({
className={classNames("mt-3 rounded-md", value.length >= 1 && "border-subtle border")}
ref={animationRef}>
{value.map((option, index) => (
<li key={option.value} className={`flex py-2 px-3 ${index === value.length - 1 ? "" : "border-subtle border-b"}`}>
<li
key={option.value}
className={`flex py-2 px-3 ${index === value.length - 1 ? "" : "border-subtle border-b"}`}>
<Avatar size="sm" imageSrc={option.avatar} alt={option.label} />
<p className="text-emphasis ms-3 my-auto text-sm">{option.label}</p>
<X
@@ -19,7 +19,6 @@ import {
BooleanToggleGroupField,
SelectField,
InputField,
Input,
showToast,
Switch,
} from "@calcom/ui";
+1 -1
View File
@@ -29,7 +29,7 @@ export function UpgradeTip({
const { isLoading, hasTeamPlan } = useHasTeamPlan();
if (hasTeamPlan) return children;
if (isLoading) return <>{isParentLoading}</>;
return (
@@ -32,8 +32,8 @@ const WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP_V2: Record<string, WebhookTriggerEve
core: [
{ value: WebhookTriggerEvents.BOOKING_CANCELLED, label: "booking_cancelled" },
{ value: WebhookTriggerEvents.BOOKING_CREATED, label: "booking_created" },
{ value: WebhookTriggerEvents.BOOKING_REJECTED, label: "booking_rejected"},
{ value: WebhookTriggerEvents.BOOKING_REQUESTED, label: "booking_requested"},
{ value: WebhookTriggerEvents.BOOKING_REJECTED, label: "booking_rejected" },
{ value: WebhookTriggerEvents.BOOKING_REQUESTED, label: "booking_requested" },
{ value: WebhookTriggerEvents.BOOKING_RESCHEDULED, label: "booking_rescheduled" },
{ value: WebhookTriggerEvents.MEETING_ENDED, label: "meeting_ended" },
{ value: WebhookTriggerEvents.RECORDING_READY, label: "recording_ready" },